Tag Info

Hot answers tagged

51

Formats that work with LaTeX (dvi mode, using dvips): eps Formats that work with LaTeX (dvi mode, using dvipdfm(x)): pdf png jpeg eps Formats that work with pdfLaTeX (pdf mode): pdf png jpeg jbig2 LuaTeX can also read jpeg 2000 TeX Live since 2010 will automatically convert eps files to pdf format. This can currently be done if you include ...


47

EPS is more than an image format: it's an entire programming language. The way that DVI mode includes EPS images is to simply leave a space for them in the output. If you look at a DVI, you'll find that the EPS images are not actually added to it: they have to be present for appropriate interpretation when looking at the DVI. When you convert the DVI to EPS ...


42

Yes it can and it will be default in TeXLive2010. You need: \usepackage{epstopdf} in the preemble Include graphics without extension e.g \includegraphics{picture} pdflatex -shell-escape or enabling write18 on windows


36

Use PDF. EPS cannot be imported directly by pdftex but must be converted using something like epstopdf. These conversion procedures will often cause unwanted changes to the graphics, such as lossy JPEG encoding of embedded bitmap images. Pdftex will include PDF files directly without making any changes (except for unifying fonts, and even that can be ...


29

Providing such a tool is not the task of a TeX distribution. You need to use an external tool. There are a couple of them which should be able to convert PDF to EPS, sometimes by going over PS first. I can recommend the following 3 tools which produce nice results for me: Inkscape (Vector graphic editor, free & multi-platform) Can be either used ...


26

Nowadays everything is actually very simple. In essence, you only need to worry about three different file formats: PDF for vector graphics JPEG for photos PNG for other kinds of raster graphics. pdflatex supports all of these, and virtually any graphics file can be converted to one of these formats. And pdflatex not only supports these, but it does it ...


25

Here is a Linux script pdf2eps, can easily be translated into a batch script for Windows #!/bin/sh # $Id: pdf2eps,v 0.01 2005/10/28 00:55:46 Herbert Voss Exp $ # Convert PDF to encapsulated PostScript. # usage: # pdf2eps <page number> <pdf file without ext> pdfcrop $2.pdf pdftops -f $1 -l $1 -eps "$2-crop.pdf" rm "$2-crop.pdf" mv ...


17

epstopdf, of course, which is what the epstopdf package relies on. (If you used the package there would be no need to convert.) Or is that what you meant by eps2pdf? I've never noticed any problems with it. I suppose you could also try Inkscape; I think it does have some batch functions, perhaps even command-line options for conversion, even though it is ...


15

It seems you're using graphics in the .eps format. A relatively easy way of solving this problem is loading \usepackage{epstopdf} in your preamble and compiling with pdfLaTeX as usual. This will convert any .eps graphics to .pdf first, you'll see the actual .pdf files in your directory.


14

This is not an answer to the question as asked, but I think it may be of use to those trying to work out which format to use and how to select it. If you are using the graphicx package and your intention is to be flexible (in that you want to be able to produce different output formats from the same source file) then there is a simple way to avoid having to ...


14

As noted in the comments on the question, EPS is not an ideal way to store the plot. For scatter plots with many points and also for pseudo colour plots, it's a better idea to store the plot itself (without axes and annotations) as a raster graphic such as a PNG. In the case of a pseudo colour plot, this is actually minimal and no information is lost. See ...


12

DVI is never self-contained: It doesn't contain fonts. Apart from this: The pstricks package puts the code in the dvi (through \special commands). What should it do else? It can't refer to external files. The graphics package doesn't include eps as it is not necessary. The driver (dvips) will have to get the fonts anyway. So it can also load the eps.


10

You could load the epstopdf package or the epspdfconversion package to convert the .eps file to a .pdf file "on the fly". The first time you compile your LaTeX program (going directly from .tex to .pdf, without the "detour" via .ps), a format conversion from .eps to .pdf will be performed on the graphics file. Thereafter, LaTeX will know to load the (much ...


10

Try this configuration file: \Preamble{xhtml} \Configure{graphics*} {pdf} {\Needs{"convert \csname Gin@base\endcsname.pdf \csname Gin@base\endcsname.png"}% \Picture[pict]{\csname Gin@base\endcsname.png}% \special{t4ht+@File: \csname Gin@base\endcsname.png} } ...


10

There is a package epsf.tex by Tom Rokicki. Try \input epsf \epsfbox{myfile.eps} \bye Reading the file epsf.tex (in my system it is /usr/local/texlive/2012/texmf-dist/tex/generic/epsf/epsf.tex) will give you an insight into the way TeX works with postscript graphics.


10

The LaTeX package graphicx also can be used in plain TeX with the help of miniltx.tex. For driver dvips.def there is already a TeX file that can be loaded: \input graphicx.tex \includegraphics{myimage.eps} The file graphicx.tex contains: \input miniltx \def\Gin@driver{dvips.def} \input graphicx.sty \resetatcatcode Usually the TeX distribution has an ...


9

You have to increase the sampling rate, which is in the variable ngraph and defaults to 100. Here's the result with 1000: size(8cm,6cm,IgnoreAspect); import graph; ngraph=1000; real f(real x){return Sin(x)^4;} real g(real x){return (Sin(x)^2)*(Cos((x/2)^2));} xlimits(0, 180); labely(1,2W); yaxis(Label("$y$",position=EndPoint, ...


9

You are probably use pdflatex instead of latex. The former is actually recommended but doesn't support EPS graphics but only JPG, PNG and PDF. You should convert the EPS to PDF using e.g. epstopdf. Newer versions of pdflatex from TeX Live should do this conversion automatically by running a restricted version (for safety reasons) called repstopdf.


9

TeX Live 2010 and 2011 automatically convert EPS files to PDF, but it looks like it keeps converting, even when the EPS file hasn't changed. Working from Herbert's suggestion, this should do the trick. It may also work with other distributions, but I've not tried. \documentclass{article} \usepackage{graphicx} \usepackage{epstopdf} \epstopdfsetup{update} % ...


9

You are probably compiling your TEX document using pdftex (or pdflatex) while including an EPS image. This will not work. You need to convert the EPS to PDF (using something like the epstopdf package), or Distiller from Adobe Acrobat. For more information on this type of problem, read the this UK TeX FAQ entry. Alternatively, you may switch the compiler ...


8

It can't be done. The PostScript language does not support arbitrary opacity (only fully opaque and completely transparent). See this wikipedia reference. The Ghostscript language, however, does support arbitrary opacity, as an extension to the language (extra commands such as .setopacityalpha). See here for details. This is how pstricks made an ...


8

I summarize my findings. Hopefully others will find it useful. Since EPS and TIFF figures were allowed, opening the EPS file in Gimp with 600dpi (with antialiasing and color/bw depending on the figure) and saving as TIFF with LZW compression made an importable figure. Despite the bitmap size of 4000x1600 and such, the file size was comparable to that of ...


8

I already saw comments where you got a recommendation to use ImageMagick to convert your EPS file to PNG image file format. Based on my own experience I would suggest that you use GraphicsMagick (ImageMagick's cousin) to convert your image in one of lossy compression image file formats like JPEG for example before converting it back to EPS format. Then ...


7

The standard advice is to use whatever you are comfortable with. Nowadays the most expensive part of the system is the human's time, so optimize your effort first. Having said this, there is one nagging problem with eps files made in Inscape and other applications: the font of the text part. More often than not people use one font in the body and another ...


7

The syntax for mk4ht is as given below: mk4ht command file option1 option2 option3 command could be htlatex or mzlatex or oolatex of any one of the scripts provided by tex4ht. option1 is passed on to tex4ht.sty (like html, xhtml, mathml ...) option2 is passed on to tex4ht.env and tex4ht binary, the post-processor of *.dvi output. option3 is those ...


7

I guess that this is what you want (don't load geometry): \setstocksize{25cm}{18cm} %Finale \settrimmedsize{24cm}{17cm}{*} \settrims{0.5cm}{0.5cm} \setlrmarginsandblock{3cm}{2cm}{*}%%%% \setulmarginsandblock{2.5cm}{3cm}{*} \checkandfixthelayout \fixpdflayout The summary printed by memoir says ****************************************************** Stock ...


7

The graphics formats that you can use depend on the graphics driver not on (pdf)LaTeX: As others have said pdfLaTeX in pdf-mode can use pdf, png, jpg, and mps. LaTeX in dvi-mode and dvips as driver can use eps (and mps). LaTeX in dvi-mode and dvipdfmx as driver can use eps (and mps), pdf, png, and jpg if you provide information about the bounding box and ...


7

This question has received excellent answers to the general question relating to what graphics formats the two Tex engines, but the Metapost part has been neglected (Just to confuse matters, metapost produces .eps but I can use these with pdflatex as long as I put in a four line incantation), so I shall document what you can get from Metapost. Hobby's ...


7

This problem is almost certainly caused by an incorrect bounding box in the eps file. One way to fix this is to rename your file to 'Fig3.ps' and in the terminal do ps2eps --ignoreBB Fig3.ps Alternatively, you can fix the bounding box yourself. Open the eps file in your favourite text editor. The second line will be something like %%BoundingBox: A B C D ...


6

Clearly PDF: pdf is an ISO standard, eps is not pdf can directly be used via \includegraphics and compiled with pdflatex (see answer by Lev Bishop) pdf has more features than eps, i.e. transparency (see answer by Will Robertson) even your grandma has a pdf reader on her computer, so if you send her just the images she will be able to look at them more ...



Only top voted, non community-wiki answers of a minimum length are eligible