Category Archives: Ipe

Ipe 6.0pre30 works with pdfTeX 1.4

A month ago I wrote about how to install MiKTeX 2.5 concurrently with 2.6 so that I can run Ipe 6.0pre28 on my main production machine.

Well, Ipe 6.0pre30 has just been released yesterday. From the announcement email, the major features of this release include:

* Ipe now works with pdftex 1.40 (in MikTeX 2.6 and texlive 2007).

* Pascal-Nicolas Becker, Frederik Hermans, and Damian Schmidt
implemented the missing forms of intersection snapping (for arcs
and Bezier curves), with bug fix by Jonathan Backer.

* Fixed the broken user interface (fields were too small to contain
the text) on Unix (removed a static QFont) (bug #191).

* Figtoipe now distributed separately.

I note that the source and the windows packages are already available at the LuaForge download site.

Thanks Otfried!

How to Install MiKTeX 2.5 Today

(Updated on 2007-10-31 with simpler steps. This post assumes you are running Windows, but it’s actually applicable to Unix users if you replace the MiKTeX terms with their TeX Live counterparts. )

The most recent release of MiKTeX is 2.6 and it ships with pdfLaTeX 1.4. Unfortunately, it is incompatible with Ipe‘s latest release 6.0pre28 because this version of Ipe cannot cope with the PDF generated by pdfLaTeX 1.4. As the next version of Ipe is not coming very soon (Otfried says “Certainly not before spring 2008.”), one solution would be to downgrade to MiKTeX 2.5 so that Ipe can use the pdfLaTeX 1.3 that ships with MiKTeX 2.5. But if you have upgraded to pdfLaTeX 1.4 with a reason (like having fun with microtype), then you can also keep the two installations side-by-side with some storage overhead (~100MB). Assuming that your MiKTeX 2.6 is installed in C:\texmf-2.6, here is how you might do the MiKTeX 2.5 installation:

  1. Get a copy of basic-miktex-2.5.2580.exe. It’s the self-contained “basic installer” for MiKTeX 2.5 and contains some basic packages. This file does not seem to be available at the official MiKTeX download page any more, but Google can help you find a copy, or you can get a local copy hosted on this server.
  2. Launch the basic installer and install MiKTeX 2.5 to, say, C:\texmf-2.5.
  3. After the installation finishes, remove C:\texmf-2.5 from the PATH environment variable. That way, whenever you run latex, you are still running pdfLaTeX 1.4.
  4. Run Yap 2.6 once and you will be prompted to associate .dvi files with it. (The 2.5 installer associates .dvi files with Yap 2.5, of course. And frankly, I recommend dviout over Yap.)
  5. Set up an environment variable called IPEPDFLATEX to override IPE’s default pdflatex command, eg, IPEPDFLATEX=C:\texmf-2.5\miktex\bin\pdflatex.exe if that’s where you installed it to. At this moment, you may also be interested to set up something like IPELATEXDIR=C:\temp\iperun to control where Ipe generates the temp files.
  6. If you don’t use any special packages in your Ipe files, then you can skip this step. But for completeness, we can let MiKTeX 2.5 know about the extra packages installed in MiKTeX 2.6. From the Start menu, run MiKTeX 2.5->Settings. In the Roots tab, add C:\texmf-2.6 to the bottom of the search list. Click OK and the filename database will be refreshed. (Unix users: this is the Kpathsea step. See here.)

At this point, the side-by-side installation is complete. Have fun!

Current Ipe and pdfLaTeX Incompatibility

I upgraded my MiKTeX installation to version 2.6 because I want to use pdfLaTeX 1.4 for microtyping. But it turns out that upgrading to MiKTeX 2.6 breaks the current release of Ipe:

Ipe cannot currently cope with the PDF output generated by the new version 1.40 of Pdflatex. This version is included in MikTeX 2.6 and in TexLive 2007. Therefore, Ipe does not currently work with MikTeX 2.6 or TexLive 2007. This will be fixed in Ipe 7.0.0, but since I’m changing many other things at the same time, do not expect this version before September 2007.

Thankfully, I also have an older laptop and with Subversion, it is not difficult to work on both simultaneously.

Selecting Objects in Ipe

If you have ever wondered why there is a circle when you click to select objects in Ipe, well, hmm, that means you may want to read Section 4.2 of the manual, which explains the selection model in Ipe. :P

Basically, when the mouse button goes down, Ipe computes a list of objects that hits the circle, sorts the objects by proximity, and selects the first object by default. To cycle between the objects in this list, press the Space bar without releasing the mouse button. Note that the size of the circle is controlled by “select distance” in the Preference dialog.

It’s a great time-saver if you use Ipe for complicated figures.

Together with the ability to quickly zoom in Ipe using the wheel, selecting objects in Ipe should be a breeze.

Ipe and the Mouse Wheel

These days I use a ThinkPad X41 Tablet primarily and I have not been using a mouse for years. So it was a pleasant surprise when I used Ipe on a desktop one day and notice that the scroll wheel on the mouse actually does something quite useful: it zooms the canvas.

Now the TrackPoint system on ThinkPads actually supports scrolling as well, but it does not work by default in many applications because of some technical issues that you don’t want to know. In any case, to configure your ThinkPad so that its middle scroll button works, insert this line to your Windows\System32\tp4table.dat and then reboot.

*,*,ipe.exe,*,*,*,WheelStd,0,9

Update: Actually all Qt applications don’t have scrolling in my ThinkPad. To add scrolling to all Qt Widgets, add this line instead:

*,*,*,*,*,QWidget,WheelStd,0,9

Compiling Ipe 6.0pre26 on Windows

Recently I have looked into compiling Ipe on Windows. It’s really quite easy but here is a post on it for the public service anyway. The paths I use below are just examples.

  1. Download the source archive (currently version 6.0 preview 26) and expand it to C:\Checkouts\ipe. At this point there should be an ipe-6.0pre26 subdirectory C:\Checkouts\ipe\ipe-6.0pre26\.
  2. Duplicate this subdirectory into C:\Checkouts\ipe\current\ so that you have two parallel copies of the source tree. They are currently identical but we will change the one in this “current” directory. Below, we will call C:\Checkouts\ipe\current\ “the Ipe directory”. We want to keep ipe-6.0pre26 intact.
  3. While you are at the Ipe website, download the binary distribution too. You will need some files from there later.
  4. Download and install a MinGW distribution that has GCC 3.4.2. I use Dev-C++ since I have it already installed (and I can recommend that), but you can also get the vanilla MinGW instead. The installation must be done prior to the next step.
  5. Download Qt 4.1.1 Open Source edition and install it. During the installation, identify C:\Dev-Cpp\ as the MinGW directory to the installer.
  6. Download zlib 1.2.3 and freetype 2.1.0 from GnuWin32 and install them to C:\GnuWin32\.
  7. Modify Ipe\src\config.pri to reflect the paths below. Following our example, this is how the last section of config.pri should look like:
    win32 {
    DEFINES += WIN32
    ZLIB_INCLUDE = C:/GnuWin32/include
    ZLIB_LIBS = -LC:/GnuWin32/lib
    FREETYPE_INCLUDE = C:/GnuWin32/include/freetype2
    FREETYPE_INCLUDE += C:/GnuWin32/include
    FREETYPE_LIBS = -LC:/GnuWin32/lib
    }
  8. Turns out the current source distribution left out two small files accidentally. Get them here and put them in Ipe\src\ipe\.
  9. If you have Cygwin installed, find a way get rid of sh.exe on your path, say by renaming it. The goal is to make sure that the Cygwin shell does not get executed when you type sh in the command prompt. This is important. (Or if you know a way to force the make in MinGW32 to prefer cmd.exe to sh.exe, I would love to know.)
  10. Change directory to Ipe\src\.
  11. Execute qmake. This step takes very little time.
  12. Execute make. This can take a couple minutes.
  13. After the compilation has finished, you should have a subdirectory called Ipe\build\.
  14. From the binary distribution, copy the data\ subdirectory to Ipe\build\data\.
  15. For good measure, you should also copy the DLLs that are depended upon by your current build in Ipe\build\bin\. They are freetype6.dll, mingwm10.dll, QtCore4.dll, QtGui4.dll, zlib1.dll.
  16. This is part of the directory structure and I think it may help clarifying what happened above.

    C:\Checkouts\ipe\
    C:\Checkouts\ipe\ipe-6.0pre26\ (intact copy)
    C:\Checkouts\ipe\current\ (our working copy)
    C:\Checkouts\ipe\current\src\config.pri (edit this first)
    C:\Checkouts\ipe\current\src\ipe\ (then add two missing files)
    C:\Checkouts\ipe\current\build\ (made by the build process)
    C:\Checkouts\ipe\current\build\data\ (copied from binary distribution)
  17. At this point, you should be able to run Ipe\build\bin\ipe.exe.

You are done!