I have been presented with graphic files in the format .png. I need to include them in a Plain TeX document. How is that possible? Is there a way to convert them to .eps?
Asked
Active
Viewed 1,119 times
3
-
are you using classic dvi tex or pdftex? – David Carlisle Jun 09 '15 at 21:10
-
Thanks for the 3 replies. The day after I asked the question, I realized that my issue is not plain vs. LaTeX. but dvi vs. pdf[la]tex. I have both .eps and .png figures, so I followed the advice of the 3rd respondent and used "convert" to get .eps files that work in dvips (which I'm used to). A junior colleague got slightly better results with gimp instead of convert. @lhf – S. A. Fulling Jun 11 '15 at 19:25
2 Answers
5
Use pdftex and the graphicx package from LaTeX with eplain
\input eplain
\beginpackages
\usepackage{graphicx}
\endpackages
Load your graphics with \includegraphics{yourpng}, and typeset your document with pdftex (not pdflatex).
If you find loading eplain too bloated, you may try graphics.tex, bundled in the graphics-pln bundle.
\input graphicx
\includegraphics{yourpng}
Beware you may need to set the driver to match your engine. In the graphics.tex file change \def\Gin@driver{dvips.def} for \def\Gin@driver{pdftex.def}.
jarnosc
- 4,266
1
To convert an image to eps, you can use convert, which you probably already have.
Just do convert foo.png foo.eps.
lhf
- 2,212