Ipe: Import Ipe Figures

Ipe is the editor of choice to draw figures for Computational Geometry papers and presentations. It is common to create a Ipe figure composed of other Ipe figures (stored in different .ipe files). But, there is no straightforward way to accomplish this import operation.

One way to achieve this is:

  1. Open the source and destination Ipe figures in separate Ipe instances.
  2. In the source Ipe instance, do a Select All to select the complete source Ipe figure. Copy it.
  3. Switch back to the destination Ipe and Paste.

CDBurnerXP: Copy a Bootable Disc

A little care is needed when making a copy of OS installation discs. Making a normal data copy does not copy the boot data and renders the new disc un-bootable. To create a bootable disc copy of a bootable disc using CDBurnerXP:

  1. Put the original bootable disc in the drive. Use Copy Data Disc with the destination as your harddisk. This creates a bootable ISO copy of the disc.
  2. Put a blank disc in the drive. Choose the Burn ISO Image option and use the bootable ISO created in the above step.

OpenVPN: Route Add Failure on Windows Vista

Problem

OpenVPN (and OpenVPN GUI) on Windows Vista fails silently if executed without Administrator privileges. The error is almost not noticeable since VPN succeeds in obtaining an IP address (see the green OpenVPN icon in the screenshot). But, the VPN is not established due to the error:

ERROR: Windows route add command failed: system() returned error code 1
The requested operation requires elevation.

Solution

Run OpenVPN as Administrator or if this is a frequent used application change its shortcut to always run as Administrator.

Windows Vista: Service Pack 2 Cleanup

I am using a LG C1 Express Dual tablet PC for a few weeks. It came with a fresh Vista image, which on connecting to the Internet underwent long hours of Windows updates, pulling itself through Vista SP1 (Service Pack 1) and later Vista SP2.

After these updates, I saw that the free space on C: had reduced quite a bit and ran Treesize Free to check out the situation. I found the C:\Windows\WinSxS directory occupying a lot of space!

It turns out that the WinSxS directory keeps components from all old updates so that uninstall (and rollback) of updates can be supported. Since, SP2 is a pretty significant update, I am not interested in keeping the files from the updates older than SP2. If you are sure of this, you can recover a lot of space by running the Windows Component Clean Tool (compcln.exe).

compcln.exe resides in a super-long-name directory inside C:\Windows\WinSxS, but it is hardlinked to the C:\Windows\Sytem32 directory. So, to execute it, open cmd and type:

$ C:\Windows\System32\compcln

Press Y when it asks for confirmation of cleanup. Running compcln.exe recovered ~1GB of disk space on this tablet PC.

Beamer: Image Animation

Beamer makes it very easy to include a series of images and display them in a serial animated style in separate frames (slides).

For example, to display the images foobar-0.png, foobar-1.png and foobar-2.png in a serial fashion use:

\usepackage{xmpmulti}
\begin{frame}
\multiinclude[format=png]{foobar}
\end{frame}

xmpmulti is a package that ships along with the Beamer package. \multiinclude is the command that takes care of putting the foobar-x.png into different frames. Make sure that the files are named as basename-number.format, i.e., the basename and the number are separated by a hyphen. The format option is the extension of the files.

\multiinclude starts from file number 0. To start from a different number, say 9:

\multiinclude[format=png,start=9]{foobar}

\multiinclude inserts all files that are in the above format. To make it stop at a certain number, say 7:

\multiinclude[format=png,end=7]{foobar}

Typically, images are inserted using the \includegraphics command. The settings passed to \includegraphics can be passed to \multiinclude using its graphics option. For example, to set the scale of the image to 0.3:

\multiinclude[format=png,graphics={scale=0.3}]{foobar}

By default, the images are placed one on top of another. To replace each image by the next image try:

\multiinclude[<+>][format=png]{foobar}

IrfanView: Replicate Crop on Multiple Images

I had a series of images and wanted to crop all of them with the same bounds. Eyeballing the original crop and approximating the same on the rest of the images was out of the question, since the crops had to match to the very last pixel.

I tried to note down the crop parameters and redo the same on the rest of the images. When a crop rectangle is drawn on the image, its parameters can be seen on the Irfanview titlebar. The first 2 numbers are the coordinates of the origin (top left) and the next two numbers are the dimensions of the crop rectangle.

Redoing this crop manually on many images turned out bad since it was tiring to draw the rectangle with a mouse correctly to match the parameters.

Thankfully, the swiss army knife that is IrfanView has a better solution. Choose EditCreate custom crop selection. If you have chosen a crop rectangle its parameters will already be displayed. Click on Save current values, click on Apply to image and crop the image. Open the rest of the images and do the same.

PDF: Split into Multiple Files

Ensure that PDFTK is installed and the directory of pdftk.exe is in the %PATH% environment variable.

To split a PDF file into multiple PDF files, one per page of the original PDF file, invoke:

$ pdftk foobar.pdf burst output foobar-%d.pdf

If foobar.pdf is a 2 page PDF, this splits it into foobar-1.pdf and foobar-2.pdf.
It would be much nicer to invoke the above simply as:

$ splitpdf foobar

To be able to do that, turn the above invocation into a batch file:

REM splitpdf.bat
pdftk %1.pdf burst output %1-%%d.pdf

The %1 is the first input argument to the batch file invocation. And %% is the way to escape %, which is a special character in a batch file.

(via Beamer + Ipe + views)

Beamer: Fonts

If you are not satisfied with the font themes that ship with Beamer, you can use any font family you want for your Beamer document. The font family you intend to use has to be available as a package. For example, to use the Helvetica font family include:

\usepackage{helvet}

The font theme has to match the style of the font family, else the resulting document may have a mix of fonts used in it. That is, use the serif font theme for a serif font family and so on. For example, to use the Concrete Math font family (which is serif):

\usefonttheme{serif}     % Font theme: serif
\usepackage{ccfonts}     % Font family: Concrete Math
\usepackage[T1]{fontenc} % Font encoding: T1

Sometimes, a font encoding may also have to be specified for the font family. For example, the T1 font encoding for Concrete Math font family in the example above.

Beamer: Font Themes

A Beamer font theme represents the style of the font used in the document. Beamer comes with the following predefined font themes:

  • default (This is sans serif.)
  • professionalfonts
  • serif
  • structurebold
  • structureitalicserif
  • strucutresmallcapsserif

To set the font theme for a Beamer document use the \usefonttheme command in the preamble of the document.

For example to set the font to serif:

\usefonttheme{structurebold}