# Tag Info

59

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 ...

51

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 ...

46

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

38

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 ...

36

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 ...

28

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 ... 28 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 ... 23 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. 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 ... 16 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. 12 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. 12 This plot needs quite a large number of samples to be represented correctly. I know you're asking for a way to do this in Asymptote, but I'd like to show a way to generate the plot directly within LaTeX using the PGFPlots package: \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ ... 11 To enable shell escape in TeXShop: 11 EPS doesn't support transparency and embeds bitmap images without compression. PDF all the way. 11 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} % ... 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 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 ... 9 I use this little trick to solve this problem:$> convert filename.gif filename.ps $> ps2eps -f --fixps filename.ps 9 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 ... 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 ... 9 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 ... 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, ...

8

You can save the path in a variable and transform it. Example: path mypath; beginfig(1); z1=(10,-10); x1=-x4; y1=y4; x2=x1; y2=-y1; z3=-z1; mypath = z1--z3--z2--z4--cycle; draw mypath; draw mypath shifted z2; endfig; end

8

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 ...

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 ...

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