The joys of LaTeX
Last year I wrote my dissertation in TeX. This was a major faff as I was incapable of making contents pages and bibliographies in it. Therefore I’ve decided to learn how to use LaTeX. So far, it’s great! I’ve worked out contents and bibiliographies without any bother and can do tables and everything I need. However, graphics seem to be beyond me! I’ve got the graphics saved as .wmf as they were what I needed for TeX, however, it seems that these are unsuitable for LaTeX. Equally, I’ve tried converting them to .jpg and .pdf and using pdflatex in the latter case, but it still won’t put graphics into my document.
Any ideas?! Thank you.
6 comments by 1 or more people
[Skip to the latest comment]My mind flicks back to Project write up 14months ago. Yeurch.
Erm. This?
01 Aug 2007, 15:36
Andy
Ideally you want your graphics in .ps or .eps format. (Postscript). In this case make sure you put:
\usepackage{graphicx}
at the top of your document.
Then you can include a figure as follows:
\begin{figure}
\begin{center}
\includegraphics{picture.ps}
\caption{this is a caption for your figure.}
\end{center}
\end{figure}
If you don’t/can’t make .ps files for your pictures then it gets a bit more complicated…
01 Aug 2007, 15:57
Andy
P.S. Also, it’s often better, instead of using PDFLaTeX, to use just Latex to create the DVI file, and then use DVItoPDF to get the PDF. Sometimes graphics don’t come out properly if you just use PDFLaTeX.
01 Aug 2007, 16:04
PDF via DVI is the way I did it many moons ago when I was actually attempting to learn stuff.
While I have the chance to say this, wmf is a really crap file format. I hated using it.
01 Aug 2007, 20:17
Lamby
Best to avoid DVI and PS these days – PDF is now not only the lingua franca of the internet and the desktop, but most of the modern ports of TeX only really focus their attention on PDF generation.
I second Andy’s “graphicx” recommendation. If you are generating PDF, then you will be able to include files other than PostScript, including JPG, PNG and PDF. Did you try using the ImageMagick tools to convert your WMF to PDF and then including them?
(Further documentation on the graphicx package is available here http://users.ecs.soton.ac.uk/srg/softwaretools/document/start/graphicx.pdf or at ”/usr/share/doc/texlive-doc/latex/graphics/graphicx.pdf” on a modern Debian-based distro.)
02 Aug 2007, 00:24
Peter M
Hi there Laura,
Nice blog – I have a suggestion for you regarding your LaTeX graphics problems. OpenOffice (you probably know it) is a nice free and open source office suite. The advantage of it to the LaTeX inclined is that if you use IMPRESS (roughly equivalent to powerpoint) and DRAW (a nice drawing package) they natively export to EPS format. So the good thing is here that you can keep a working copy of your figures in OpenOffice format and re-covert to EPS or PS as you need to. It works for me – it produces lovely postscript – and it shows the flexibility of open office. Drop me an email if you need any more information. Best of luck with the Maths and Stats.
31 Oct 2007, 11:41
Add a comment
You are not allowed to comment on this entry as it has restricted commenting permissions.