Recently my roomie showed me a presentation in LaTeX. This renewed my interest in this (About 2 years ago, I installed LaTeX only to give up). I went through the paces installing MikTeX as my LaTeX distribution and LEd and TeXnicCenter as the front-ends. I created a nice cover letter for a company as one of my first documents. My next task was to see if I can really write publication length articles in LaTeX, with figures.

The various options I explored for using figures (plots, charts etc. from excel/other software) in LaTeX in a Windows XP box are :

  1. Excel – print plot – print to pdf – insert figure as pdf
  2. Excel – print plot – print to eps (install a postscript printer) – further process in ghostscript with ps to eps command to get a better bounding box around your figure
  3. Gnuplot - terminal epslatex – include the tex file
  4. Gnuplot – terminal postscript enhanced eps – include eps file

Option #1 was clearly the easiest and so I tried it first. It worked with the latex->pdf convertor. The main downside to this is that my pdf printer (pdfcreator) was printing the whole page and my graph did not have a tight bounding box. Therefore, there was a lot of white space between the plot and the figure caption. This can be overcome by selectively trimming the edges with trim and clip, but I think it goes against the main idea of using LaTeX (we should be less worried about how the document looks like and concentrate more on the content). Therefore I explored Option #2 : eps printing with post-processing with ghostscript to get a file with a better bounding box. This option gave me better results than the pdf printing. The main disadvantages here were that the plots each had slightly different sizes (as in option #1) and also had different fonts from the rest of the document.

This led me to do some more searching and I came across gnuplot with its LaTeX export functionalities. This means that the text parts of the figure will be in a font compatible with the rest of the document. This is much better than Options 1 and 2. The downsides are: a) gnuplot is not a fully GUI based software (at least in windows), so one has to learn the commands and how to use them.  Everything you see on the plot is a command, so you better have your default settings correct, or you are going to do a lot of tweaking before getting things right. b) It is not easy to caption charts once they have been inserted as .tex files ( I tried captioning the float both in the parent file and also in the gnuplot generated tex file, they did not work out for some reason.) (This has been fixed, use the \figure in the main .tex file around in\input(picturefilename.tex))

Therefore, I tried the  fourth option of exporting a chart from gnuplot as a eps file that can be compiled with latex-ps-pdf. This option gives aggreable results, but the main drawback here is that I could not format the axis labels with superscripts and subscripts, unlike Options 1-3. This might be a drawback when I want to say CO(subscript)2 instead of CO2.

In conclusion, I think I will stick to Option 2 for now. If I can overcome the axis label problem, I might consider gnuplot again. The make-or-break items for me writing a paper in LaTeX are:

  • figuring out a good method for entering graphics (both charts and image files)
  • Bibliography – I currently use EndNote, but will download my reference list again in a BibTeX format to avoid any errors in EndNote to BibTeX conversion.

I saw my advisor today and he was complaining how difficult it was for him to annotate pdf files with comments. After hearing that, I dont think I will get a manuscript to him in pdf format :-) .

In conclusion,  I will use LaTeX if I want to play around or create personal documents like CVs, resumes etc. or make easy  presentations. I probably will not use LaTeX to write my thesis. It is too far down the road to switch from crappy jpegs to better looking eps :-)