How to do stuff with LaTeX


IDEs (or UDEs) for writing papers with LaTeX

  • Using TeXnic Center
    • An MS Visual Studio (like) environment for creating LaTeX based documents. If you are a programmer, and you used to write makefiles for your TeX compilation, then this tool does what Visual Studio did for writing makefiles.
  • Using WinEDT
    • Another environment for creating LaTeX documents, but not freely available.
  • Using Emacs
    • A less desireable environment, unless you already understand how to use it. Plugins for emacs will color code your documents as you create them, as well as provide special keystrokes to do things more easily.

Creating .eps files from Windows Metafiles

When using the DVI or PS output from LaTeX, you actually have to put any graphics into some external file, and include that in the final output. This is because TeX does not manage your images like Word or WordPerfect; rather, it simply says something like "leave this box alone, because something else will go in there".

In this sense, WYSIWYG packages are somewhat superior, since it is very easy to import images of all kinds. Nonetheless, there are times when even this little extra pain makes LaTeX superior, due to its ability to guarantee that the captions are correctly numbered, and that they actually stay with the images.

Assuredly, it is very easy to produce figures for papers in drawing packages such as PowerPoint, or Visio, as well as importing graphics from the clipboard in Windows. Most of these files are already in (or can be converted to) Enhanced MetaFile, or Windows MetaFile format, which is a terse representation for graphics, storing the image as a set of lines and text rather than bits. This allows it to be resized with sharpness. It is such a good idea, that it has actually been thought of before, notably in the EPS (Embedded PostScript) format. By an amazing coincidence, this is a common input format to LaTeX's DVI/PS output formats. By an even more amazing coincidence, there is a package to convert from {W,E}MF to EPS.

  • Download the EMFtoEPS package, from Dirk Struve, at http://www.projectory.de/emftoeps/ and install it on you machine, making sure to choose a PostScript printer in your output settings.
  • Save your PPT, Word Drawing, or other image into Enhanced Metafile Format (EMF) as, say, figure.emf
  • Open EMFtoEPS (available on the desktop, when remotely logged in to ransom) and open the EMF file you just saved
  • Choose Convert from the menu to do either all files, or those selected by you
  • The files are saved in the same directory, with the extension *.eps, say figure.eps
  • Open the generated EPS file with GhostView, and choose the File->PS to EPS, allow the bounding box to be automatically calculated, and save with a different filename, say, figure_use.eps
  • You may import figure_use.eps into a latex document.

Creating .pdf files from .eps/.ps (without using Acrobat Distiller)

Nuances in the generation power of LaTeX mean that it is nontrivial to produce PDF files and DVI/PS files from the same source. This is because pdflatex (which produces PDF files as output) does not accept the same set of graphics formats as input as does latex (which produces DVI files).

Therefore, in order to produce PDF files from LaTeX source, it is necessary to either (a) Buy Acrobat Distiller, which allows you to migrate PS to PDF, or (b) do this for free with GhostView. You can then either change all of your images to PDF and use pdflatex, or change the final output to PDF from generated PS format.

  • Open the EPS/PS file with GhostView.
  • Choose File->Convert
    • Device: pdfwrite
    • Resolution: (you choose, probably 600dpi)
    • Properties:
      • CompatabilityLevel:
        • 1.2: Acrobat 3-and-later compatible
        • 1.3: Acrobat 4-and-later compatible
        • 1.4: Acrobat 5-and-later compatible
      • EmbedAllFonts:
        • If you are using funny fonts, then make sure this is true
      • Check the rest for any other nuances you come across
  • Choose your filename
  • Note that the size is not exactly what Distiller would have given you. There could be many reasons for this (compatability level, picture compression, fonts embedded...) so you should only worry about it if you have problems reading the file on other computers.

Each of these requires an installation of MiKTeX.

 


 

Last updated September 23, 2004