Hot answers tagged

18

I am using TeXStudio 2.5.1 on Windows 7, and found I need to have the \usepackage{epstopdf} line after the line \usepackage{graphicx} in my preamble ... Not sure why it would matter, but it works.


17

You shouldn't add the extension The / at the beginning of the path looks wrong. You have a better chance with \includegraphics[scale=1]{../model_1_2} However: You might not be allowed to work with a file that is one folder up, due to (reasonable) security restrictions disallowing this.


16

Method A: Dealing directly with PostScript Since you're dealing with PostScript images, one option might be to use GhostView; I've done so successfully in the past. As an example, consider tiger.eps. Open tiger.eps using GhostView. Show the bounding box if you wish to see the extent of the existing whitespace: Position the cursor on to identify the left, ...


16

There are two reasons why eps files produced by Mathematica (such as p01.eps linked in your question) are often excessively large. The first is specific to Mathematica, but the second seems to be common to a few applications that generate postscript images. 1: Some methods for exporting images (such as right-clicking on the image) will include a large ...


15

Make sure you have loaded the graphicx package not graphics then \includegraphics[width=6.0in,angle=90]{file} should work. Note if it is an EPS file then you need latex (and it may not show rotated in a dvi previewer) if you are using pdflatex you should convert the EPS to pdf first (or if I read your question correctly, just use the original pdf not the ...


13

There is a trick with the graphics driver file pdftex.def for pdfTeX in PDF mode. If the PDF image does not contain color settings, then pdftex.def does not enforce black, but uses the current color. First we need to convert the EPS file to PDF: ps2pdf -dEPSCrop -dCompressPages=false Logo_Buchcover_hellblau.eps Logo_Buchcover.pdf Option -dCompressPages=...


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}[ domain=0:...


10

Unfortunately, the EPS format does not handle transparency. If the PDF source file includes transparency, then the tools listed above will rasterize the image in the EPS output, leading to pixelation and larger file sizes. One possible solution is to use an EPS file with non-standard extensions (link). Conversion from PDF to EPS can be achieved without ...


10

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


10

Windows Quotes should be used in a Windows command window to protect the spaces: for %f in ("C:\path\to\image\folder with spaces\*.eps") do epstopdf "%f" Inside a .bat file, the percent needs to be doubled. Linux/bash Special characters like spaces can be escaped with the backslash in bash: for f in /path/to/image/folder\ with\ spaces/*.eps; do ...


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, align=2E),Ticks("%",extend=true)...


9

I handle image formatting outside of latex and incorporate them directly as pdf, png, or jpg. So this is not a latex answer per se, but it may still be usefull for the production of latex document. Inkscape What I usually do is, if I know the image in the pdf is in vectorial format, I will open the image directly in Inkscape, delete the content I don't ...


8

Just to add my findings on Mac OS X, for me it was only necessary to add the -shell-escape option to pdflatex in order to avoid the epstopdf !!! Error: Output filename ... not allowed in restricted mode. message. All .eps files were then automatically converted to .pdf without requiring the epstopdf package to be explicitly used. This may be due to the ...


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


7

The image types you can include depend on whether you use latex or pslatex, and if you use latex they depend on the dvi driver (usually dvips) that you use. So it is better to omit the extension \includegraphics[scale=1.8]{figura/pantalla1} Rather than \includegraphics[scale=1.8]{figura/pantalla1.eps} then if you use pdflatex it will find a pdf (or png) ...


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

Your EPS file doesn't tell the truth about its bounding box. It says %!PS-Adobe %%Creator: The Mighty Setlink. %%BoundingBox: 58 35 612 525 %%EndComments while you computed a bounding box equivalent to %%BoundingBox: 113 67 506 741 and it's the missing 216bp from the top that are the culprit. If I edit the EPS file so that it reads %!PS-Adobe %%Creator:...


6

Use pdftops rather than convert (from ImageMagick). The command is pdftops -f <first-page> -l <last-page> -eps <input.pdf> <output.eps> For example, pdftops -f 4 -l 4 -eps input.pdf output.pdf Simulator Try the following to diagnose your problem. % simulator.tex \documentclass[preview,border=12pt]{standalone} \usepackage{...


6

You can use epspdftk, the gui interface to Siep Kroonenberg's epspdf.texlua script. It exists both for Windows and Linux and does everything (converting and cropping the resulting .pdf) in one step. I'll take the example of one of my old graphic files, produced with pstricks and pst-eps, that had a (very) badly computed bounding box. The procedure is very ...


6

The default value for the key /Interpolate in the image dictionary of the PDF file is false, see PDF specification, section 8.9.5.3 Image Interpolation. Therefore adding /Interpolate false only makes the default explicit. Likely, the anti-aliasing is done by the PDF viewer and it should be turned off there. Notice also the note that comes with the ...


6

I made it work. And the answer is simple. As --shell-escape is an option, it should be placed before the .tex (%wm). My problem was that I was placing it after the .tex. These examples can explain better: This one worked: -synctex=-1 -max-print-line=120 -interaction=nonstopmode --shell-escape "%wm" This one was not working before: -synctex=-1 -max-print-...


6

If you have a BMP picture then I would recommend that you export it to the PNG format. You can use almost every picture software to change the format from BMP to PNG including Microsoft Paint. The PNG format will have the same quality (both are lossless) as the BMP version but will be smaller in file size. The JPG format is not lossless and therefore will ...


5

Specifically for (encapsulated) Postscript images you can use psfrag to substitute "tags" within the image with your own LaTeX constructions (equations, picture environments, etc.). The advantage with such an approach is that you can even scale the included graphics and psfrag will still be able to keep a consistent font size. As an example, see Consistent ...


5

WinEdt uses its own algorithm to store auxiliary files, that is, it saves all auxiliary files in a folder named TeXAux (unless you've changed it, it is customisable) and uses this folder as working folder. Files placed in folders relative to your main .tex file are found thanks to the TEXINPUTS environmental variable to which your main folder is added. The ...


5

Thanks for your question. It's good to learn that EPS rasterization is caused by the lack of support for transparency. In my case, it is publisher requirements that force me to convert my figures from PDF to EPS. I've found that this can be achieved without pixelation using the Adobe Acrobat software (pdftops has the problem you mentioned). I selected Save ...


5

As @egreg says in the comments, the original eps file is defective, and gets cropped when it is converted to pdf. The bounding box is wrong, but you probably won't see this in a viewer because the first line is also wrong, causing the file to be displayed as ordinary (non-encapsulated) postscript (so the bounding box will be ignored and you will see a lot of ...


5

2013 the configuration of in file dvipdfmx.cfg (also used for XeTeX's xdvipdfmx) was changed to add -dEPSCrop for the conversion of EPS to PDF. After that TeX reads the PostScript BoundingBox, but the driver embeds the PDF with a different BoundingBox virtually starting at (0,0). Also xetex.def (and dvipdfmx.def etc.) were changed to handle the new settings....


5

From the Latex Wikibooks page: The package rotating gives you the possibility to rotate any object of an arbitrary angle. Once you have loaded it with the standard command in the preamble: \usepackage{rotating} you can use three new environments: \begin{sideways} %... \end{sideways} it will rotate the whole argument by 90 degrees counterclockwise. ...


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