DVIPDFM: Transformation Matrix Error

Problem

The dvipdfm program is used to convert a DVI file to a PDF file. For a DVI file which has EPS image files inside, this conversion might sometimes fail with the error shown below:

C:\Users\joe>dvipdfm foo.dvi
foo.dvi -> foo.pdf
[1
** WARNING ** Image width=0.0!
** WARNING ** Image height=0.0!
** WARNING ** Transformation matrix not invertible.
** WARNING ** --- M = [0 0 0 0 233.624 -249.417]
]

Solution

This error indicates that one or more of the EPS image files included in the DVI file have no width and height information. This is typically caused by EPS files whose BoundingBox parameters are all zero. You can check this by opening the EPS file in a text editor and look for a line that resembles this:

%%BoundingBox: 0 0 0 0

If you can generate EPS files that have non-zero bounding box values, this conversion error should be gone. For a quick hack to fix an existing EPS file with these values see here.

Tried with: MiKTeX 2.9

LEd and MikTeX 2.9

The LEd (LaTeX Editor) was last released in 2009 and supported MikTeX 2.8 back then. To use it with MikTeX 2.9, open ConfigurationOptions and change these settings:

  • Set TeX executables option to C:\Program Files\MiKTeX 2.9\miktex\bin (32-bit Windows) or C:\Program Files (x86)\MiKTeX 2.9\miktex\bin (64-bit Windows).
  • Leave the TeX distribution option at MikTeX 2.8

Tried with: LEd 0.53

MikTeX: Installers

MikTeX can be installed in many ways, only one of which I have found to be easy in the long term.

There are 2 kinds of MikTeX installers:

  • Basic Installer: Installs the basic files. Whenever any TeX file you try to compile needs an unavailable package, it will need to be installed from the Internet by using the MikTeX Package Manager.
  • Net Installer: This single installer is used to achieve two separate tasks:
    1. To download the files required for a complete MikTeX system.
    2. To install either a basic or full MikTeX system using the setup files downloaded in the above step.

I used to use the Basic Installer, but have come to loathe it! :-( Installing packages when required is a pain since that needs Administrator privileges. Also, the MikTeX package website is sometimes offline or slow and you will be unable to install the oh-so-urgently-needed package you want.

Since, both Internet speed and disk space is cheap these days, I recommend running the Net Installer to download the entire MikTeX archive from a nearby mirror. Run the Net Installer a second time to install a complete MikTeX system from your downloaded MikTeX archive.

Tried with: MikTeX 2.9

TeX: Kannada using XeTeX

LaTeX neither supports Windows fonts nor Unicode text. This makes creating documents in Indian languages with LaTeX very hard. But, there is a solution: XeTeX. It extends the TeX implementation to work with Windows fonts and Unicode text.

If you are using MikTeX on Windows, XeTeX is already included in its default installation! Here is how to obtain the Kannada PDF shown above:

  1. Create a kannada.tex file with this text:
    \documentclass{article}
    \usepackage{fontspec}
    \setmainfont[Script=Kannada]{Tunga}
    \begin{document}
    ಏನಿದು ಲಾಟೆಕ್! ಗೊತ್ತಾ ನಿಮಗೆ?
    \end{document}

    Script indicates the language (Kannada) and Tunga is the name of a Kannada font on Windows. The Kannada text was typed using the Baraha IME transliteration software.

  2. Make sure to save the file as UTF-8 or any other Unicode encoding.
  3. Compile the file to PDF using xelatex, which is latex built on top of XeTeX:
    $ xelatex kannada.tex

That is it, it is that simple! :-) To create a PDF in a different Indian language, change the respective parameters in \setmainfont.

MikTeX: Install/Uninstall packages

To install a package into MikTeX:

  1. Close all open applications that use LaTeX/MikTeX.
  2. Open the MikTeX Package Manager in Admin mode. (Under the Start menu you will find it in MikTeX → Maintenance (Admin) → Package Manager (Admin) )
  3. Type the partial or full name of the package you want to install in the toolbar and click on Filter.
  4. In the search results, right-click on the package you want and choose Install.

Uninstalling a package is the same as above, just choose Uninstall in step 4.

Note: I use LEd as my primary LaTeX editor. Whenever I try to compile a .tex file which uses a package that is not installed in my MikTeX system, LEd tries to install it automatically from the web. However, LEd’s install dialog disappears while installing and neither shows the success/failure of the operation nor the progress. This is the reason I prefer to do installation/uninstallation manually using MikTeX.

MikTeX: Package import

MikTeX 2.8 has been released recently. Since MikTeX cannot intelligently update over its previous installation, the extra (non-MikTeX) packages I had installed in the older installation need to be imported into the new installation. To do this, first install MikTeX 2.8. And then import the packages from the older installation using this command:

mpm --admin --verbose --repository="C:\Program Files\MiKTeX 2.7" --import-all

Make sure to use the MikTeX 2.8 mpm.exe for this.

For more: MikTeX 2.8 installation page