# Ipe 7 stuff

What is Ipe? Ipe is a CAD-type drawing editor which has built-in support for LaTeX. That is, you can typeset LaTeX text (labels or whole paragraphs) within Ipe. Conversely, it is simple to include Ipe figures in your LaTeX document since you can save (and re-open) your Ipe documents natively to PDF or EPS files.

It features basic drawing tools like polygonal lines, circular arcs, splines. You can add arrows at the end of those objects and you can apply affine transformations (scaling, rotating, shearing, …) to all those objects and hence, for example, draw elliptic arcs as well. Ipe now also can fill objects with complex gradients, clip objects, set transparancy and so on. Like many CAD-type programs you can snap your cursor on a grid, on vertices of objects, on crossing points of objects, and so on.

For further information you may visit Ipe’s website or the Wiki page for more features and examples.

Repository. The following scripts, style sheets and configs are available in the reposity ipestuff.git.

## Gentoo ebuilds

I maintain up to date Gentoo ebuilds for Ipe at my Gentoo overlay hosted on this website. Besides Ipe itself it also contains ebuilds for Ipe-related tools like pdftoipe or svgtoipe.

### Output precision

The ebuild files for Ipe versions >=7.0.12 provide a use-flag ‘highprec’. If enabled, a patch is applied which makes Ipe to save coordinates with up to 14 decimal digits in its Ipe files. (Currently, only 6 digits are saved which may lead to some numerical inconvenience if you use Ipe files as input for third-party code.) You can get the patch file by simply checking out the git repository listed on my Gentoo overlay site.

### ipeify.sh

You may have noticed that I put a shell script called ipeify.sh online. This script uses pdftoipe to convert pdf, eps and svg files to Ipe xml files. However, to convert svg to ipe I use inkscape and then pdftoipe. The tool svgtoipe – which is a python script – uses a direct approach. You may try svgtoipe first. In oder to convert eps files to Ipe you may first call epstopdf, which is shipped with standard LaTeX distributions.

## Customization

As the manual of Ipe 7 writes we can customize Ipe using the Lua programming language. You may download my customize.lua and place it at $HOME/.ipe/ipelets to use it. It applies the following settings: • Keymaps: • Shift+F1: hide axis. The default keymap was Ctrl+F1 which I use to switch to first virtual desktop in KDE. • Shift+F2: reset direction. Same reason as before. • 9: rotate by 90 degrees. • Shift+M: Mirror at x-axis. • Max zoom: 200 • External editor: gvim • Autosave directory: /tmp instead of$HOME/
• Browser: firefox

## Stylesheets

Ipe now supports the concept of stylesheets. So one could, for example, write a stylesheet for the LaTeX figures made for a thesis or a paper. If the fonts in the LaTeX document are changed, only the stylesheet has to be adapted and the command ‘Update stylesheets’ must be invoked. See also the ‘-sheet’ option of ipe.

You may place the following style sheets in ‘/usr/share/ipe/*/styles/’ or somewhere else:

• bigpaper.isy: increases the paper size to 10000 times 6000 pt. I use this if I need a lot of space but I do not want to print the resulting document as it is.

• a4paper.isy: sets the paper size to A4, without cropping to the figure. Some printers do not like to print documents that do not fit the paper size.

• dashstyles.isy: adds two new dash styles for lines, namely dashed-narrow and dotted-narrow. The original dashed and dotted styles are too large for my taste.

• transparency.isy: adds transparency values 75, 50, 25, 10, 20, 30, 40, 60, 70, 80, 90 in percent.

• latexbeamer.isy: sets the text and math fonts to the latex beamer default fonts. You may invoke Ipe as ‘ipe -sheet latexbeamer’ in order to start a new document with this style sheet already applied. Note that latexbeamer.isy must be placed in ‘/usr/share/ipe/*/styles/’ to make this work.

I recommend to write text in Ipe with normal font size. If you use 12pt font size in your LaTeX document then include the figure with ‘\includegraphics[scale=1.2]{filename}’.

(Note: Ipe 7.0.11 comes along with a beamer.isy which covers the functionality of latexbeamer.isy)

• palantino.isy and pagella.isy: sets the text font to Palantino resp. Pagella (an updated version of Palantino). This matches the font setting of the LaTeX package classic thesis with the eulermath option set.

• eulervm.isy: sets the math font to Euler.