Tag Info

Hot answers tagged

11

When you take a screenshot or export a figure from Matlab as a rasterised image,usually the resulting image file will not contain any resolution information (or "pixel density", usually measured in "dots per inch", or "DPI") in its metadata. When you include such an image in a LaTeX document using \includegraphics, a resolution of 72 DPI will be assumed. ...


11

I've tried a little black magic with LaTeX, and found out how to do it without external scripts ─ though it still is somewhat dirty and not that easy to use. Basically, you would need to call ImageMagick from inside LaTeX. To do this, you need to call it with --shell-escape parameter. This allows for using a command named \write18, that executes a parameter ...


9

The samples axis setting lets you do this: \begin{tikzpicture} \begin{axis}[samples=15,xmin=0,xmax=360,ymin=-1, ymax=1] \addplot+[domain=0:360,mark=none] {sin( x )}; \end{axis} \end{tikzpicture} Looks blocky: Upping samples to samples=65 looks quite a bit smoother for this zoom level:


7

LaTeX does not have a dpi setting so your question is rather unclear. LaTeX itself doesn't handle images at all, In classic TeX it just puts a request to include an image into the dvi file and a separate program (eg dvips) selects an image. In pdftex the pdftex engine does handle both aspects but again it doesn't have any setting called dpi the nearest it ...


7

The parameter to set is \pdfpkresolution that TeX Live (and MiKTeX, I believe) sets to 600 (dpi). It can be set in the document by \pdfpkresolution=2400 There is also a token register \pdfpkmode that chooses the Metafont mode for creating the bitmaps, if non empty: \pdfpkmode={supre} The supre mode is found in modes.mf and is for a 2400 dpi printer ...


5

In the log file are you getting a message saying that TeX cannot find the bounding box size of the .png file? If so then you will have to supply the bounding box dimensions by measuring them in some graphics editor and then use the following \includegraphics command: \includegraphics[bb=0 0 urx ury, width=40mm]{yourGraphicsFile.png} where urx, ury are the ...


5

Well, these fonts are not available as Type 1 fonts. This means that they are rendered as bitmaps with the current bitmap resolution. To increase the quality of the fonts, increase the resolution. For pdflatex this is explained in this answer: add to the preamble \pdfpkresolution=2400 \pdfpkmode={supre}


5

Yes, changing the resolution using the -density operator in ImageMagick (or through the Information window in IrfanView) is a lossless operation. From the ImageMagick documentation: The -density option sets an attribute and does not alter the underlying raster image.


4

LaTeX neither knows the resolution nor the final size on the paper: \includegraphics prints the requested sizes in the .log file with driver pdftex.def: Package pdftex.def Info: foobar.png used on input line 5. (pdftex.def) Requested size: 67.0pt x 89.0pt. But \includegraphics can be put inside \scalebox or \resizebox, for example. Thus the ...


3

D:/mikTeX/fonts/type1/public/amsfonts/cm/cmr 10.pfb><D:/mikTeX/fonts/type1/public/amsfonts/cm/cmssbx10.pfb><D:/mikTeX/fonts/ type1/public/amsfonts/cm/cmssi12.pfb><D:/mikTeX/fonts/type1/public/amsfonts/cm/ cmti12.pfb> So that file just uses pfb fonts (scalable type 1 postscript fonts in binary form) and doesn't include any bitmap ...


3

To repeat my comment above for the sake of writing a reasonably coherent answer, the reason your publishers' software is complaining is that both fraction bars and horizontal rules are being rendered as a 1x1 black image stretched to the required size. This is caused by the dvips configuration you're using. If you keep the same workflow, but replace ...


3

I do beamer presentations with lots of art. While I have not experimented to find minimum values, I get good results from anything 1024x768 pixels and up. This is flickr's "large" size. I mention flickr because it's a good resource for this kind of thing. Do an advanced search and check the box for Creative Commons-licensed photos. In case you want to ...


3

In my experience, most projectors have a resolution of 1024x768 px (XGA), and there are still plenty around that only have 800x600 px (SVGA). So if your images have 1024x768 px, you should be fine, and if the images are photos (no text and no sharp lines), scaling up from 800x600 px would probably also work (try looking at this 800x600 px image in ...


3

Inkscape should export to a pure vector PDF file. There is no need to tweak the DPI value or using the --export-dpi option, since it only affects the rasterized output that you want to avoid. It can be problematic to convert from one vector format to another. That only works under two conditions: The target format supports all the features of the source ...


2

Sorry to use up space for yet another answer - just wanted to have the nice formatting :) Well, thanks to answers by @finrod and @Ken Bloom; and additionally How to execute shell script from LaTeX?; How can I save shell output to a variable in LaTeX? and Scale (resize) large images (graphics) that exceed page margins; I managed to cook up a "script" (well, ...


1

To sum up the comments: TeX doesn't have any concept of a 'document DPI' as it fundamentally does not make sense. DPI in print depend on the output device but that should only have an effect during the actual output. Thus if you want to fiddle with images you have to pre-process with a suitable third-party tool.


1

It seems I managed to find a solution by myself. I rolled back the change to tex4ht.env, so that math formulas rendered as image are safe now, and I added the following section to my above mentioned preamble myconfig.cfg: \Configure{graphics*} {eps} {\Needs{"convert -density 110x110 \csname Gin@base\endcsname.eps \csname Gin@base\endcsname.png"} ...


1

I've found one solution is to post-process the PDF, re-saving it in an application which will resize the images in the PDF to a maximum resolution. Adobe Acrobat Pro (not just Acrobat Reader) can do this via File / Save As / Optimized PDF. Have recently tested this on Mac OS X (and so assume it works on Windows too) with Acrobat Pro X. You can specify what ...


1

You may change resolution automatically using ImageMagick's convert -resample. Here is an awk script that parses the tex file, finds \includegraphics statements and then converts images embedded there to a required resolution: (/\\includegraphics/&&(/{.*\.png}/||/{.*\.jpg}/)){ if(match($0,"width=[0123456789\.]*in")==0){ print "%Cannot ...



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