For a long time I used to losslessly convert muliple PNGs to a single PDF using the following template:  \documentclass[a4paper]{article} \usepackage{pdfpages} \usepackage[margin=0pt]{geometry} \begin{document} \pagestyle{empty} \enlargethispage*{0cm} % % \centering{ \includegraphics[width=.99\paperwidth,totalheight=.99\paperheight,keepaspectratio]{img1.png} \clearpage \includegraphics[width=.99\paperwidth,totalheight=.99\paperheight,keepaspectratio]{img2.png} \clearpage } \end{document}   Lately, I've been getting (on Ubuntu 12.04)  ! Missing $ inserted. &lt;inserted text&gt;                  $ l.10 ...ht,keepaspectratio]{img1.png}   What's wrong, what's changed? Alternatives?  Update: turns out this only happens with filenames with spaces (so "img 1.pdf", not img1.pdf). How can this be avoided?
464
I want to import graphics into my main input file using the macro \includegraphics. It does not work if the filename contains spaces.   also discusses this subject, but there is no solution there.  My compilation routine is latex->dvips->ps2pdf (because of PSTricks).
29197
I receive a lot of PDF maps (vector, image, with georeference and without) and I am having to convert them to an image file before I can add them to ArcMap and georeference.    I can't see any obvious out-of-the-box utility that would allow me to add and georeference a PDF directly without having to convert to an image file first.   Any ideas?  I would prefer to add a PDF to map directly without any prior "pdf to image" conversion
6176
I have a program that generates a variable number of pictures, ordered like that: 1.jpg, 2.jpg [...] 10.jpg..etc  I can't use *.jpg as input because the 10 will be processed before 2, 3, etc. so I want to use:  convert page_{1..$N}.jpg out.pdf   but does not work. How should the command be?
8819
The  says the following:     E.g.: pages=- will insert all pages of the document [...]   however, when I put \includepdf[pages=-]{foobar.pdf} in my LaTeX doc (compiled w/ xelatex), I get this error:  ! Package pdfpages Error: Cannot find file `-'.   Similarly, just using a range like \includepdf[pages={1,3,5-last}]{foobar.pdf} results in:   &lt;use  "foobar.pdf" &gt; ! Missing = inserted for \ifnum. &lt;to be read again&gt;                     - l.91 ...df[pages={1,3,5-last}]{foobar.pdf}   I'm using the latest pdfpages downloaded from CTAN.  Any idea where could the problem lie?  edit: MWE:  \documentclass{article} \usepackage{pdfpages} \usepackage[czech]{babel} \begin{document}  \includepdf[pages={1,3-5}]{foobar.pdf} \end{document}
4900
I have recently started using the geometry package to format the margins of my documents. Although, I've noticed that the width of the header/ footer remains the same. How can I correct this?    Here's a MWE:  \documentclass{article}  \usepackage{geometry} \usepackage{fancyhdr}     \pagestyle{fancy} \usepackage{blindtext}  \lhead{} \chead{Header} \rhead{} \lfoot{} \cfoot{Footer} \rfoot{\thepage} \renewcommand{\headrulewidth}{1pt} \renewcommand{\footrulewidth}{1pt}  \begin{document}  \newgeometry{margin=0.5in, bottom=1in, top=1in} \Blinddocument  \end{document}
62432
I am trying to automate the solution proposed by egreg to  by hooking into \begin{document} and \end{document}.  So, egreg's solution works fine:  \documentclass{article} \def\MinimumPaperHeight{12cm} \usepackage{geometry} \geometry{paperwidth=\MinimumPaperHeight,paperheight=\maxdimen,margin=1cm} \usepackage{lipsum}  \begin{document} \setbox0=\vbox{ \lipsum[1-6] } \dimen0=\dp0 \pdfpageheight=\dimexpr\ht0+2cm\relax \ifdim\pdfpageheight&lt;\MinimumPaperHeight \pdfpageheight=\MinimumPaperHeight \fi \unvbox0\kern-\dimen0 \end{document}   But can't seem to get this to work:  \documentclass{article} \def\MinimumPaperHeight{12cm} \usepackage{geometry} \geometry{paperwidth=\MinimumPaperHeight,paperheight=\maxdimen,margin=1cm} \usepackage{lipsum} \usepackage{environ}  \NewEnviron{MyBox}{     \setbox0=\vbox{\BODY}% }{%     \dimen0=\dp0%     \pdfpageheight=\dimexpr\ht0+2cm\relax%     \ifdim\pdfpageheight&lt;\MinimumPaperHeight \pdfpageheight=\MinimumPaperHeight \fi%     \unvbox0\kern-\dimen0% }  \AtBeginDocument{\begin{MyBox}} \AtEndDocument{\end{MyBox}}  \begin{document} \lipsum[1-6] \end{document}   Hooking into \AtBeginDocument is per this solution on .
87415
I have a set of pictures in my working directory and I want to make a PDF report using these images. I want to include all of them, but the number of the pictures changes in each case. I would like to make a "for" loop to insert each picture one after the other sequentially. Can anyone help me? At the moment the code I have is the following:   \begin{figure}[h!] \begin{centering} \includegraphics[width=10cm,height=10cm]{Figure1.png} \caption[Sèries temporals de vent i direccions]{Sèries temporals velocitat de vent i     direccions. filtratge de pics i glaçades de velocitat.} \label{Serie} \end{centering}  \end{figure}   I would like to do it for every .png image in the directory. Thanks for your questions: I am using Windows 7 and the file names follow the pattern Figura1.png, Figura2.png and so forth. So which of these possibilities would fit best?
19746
Can I tell graphicx somehow which graphic format to choose when I omit the file extension in includegraphics and both a PDF and a PNG version of the same image exist? The reason is that I have some very large PDF vector graphics (in terms of file size/drawing primitives) that take a pretty long time to load each time I view the document. I would like to convert them to PNGs while working on the document and only use the PDF versions in the final document. Therefore, a global option that I can switch in the end would be great.  An additional plus would be to do the conversion to PNG on the fly during the LaTeX run if there is a PDF that has not been converted to PNG yet, if a tool for that exists. (I know how to use convert, but not how to include it automatically in LaTeX.)
26489
I'm using pdflatex, and use \includegraphics to include content of figures from PDF. PDF are exported from InkScape.  \begin{figure} [!h]     \centering     \includegraphics[height=3cm]{fig/SUSAN.pdf} \end{figure}   Included PDF or source SVG has same colors. Green has always RGB value (0, 255, 0). Problem occurs when I include this files from LaTeX. In output PDF on some pages colorspace is darker. Even same image on other page has different colourity.  My PDF  . As you can see on page 7 (11 in PDF) USAN areas are bright green, but then on page 5 (9 in PDF) are green points on corners more darker.
92616
Here's my preamble:  \documentclass[11pt]{amsart} \usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots. \geometry{letterpaper}                   % ... or a4paper or a5paper or ...  %\geometry{landscape}                % Activate for for rotated page geometry %\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent \usepackage{graphicx} \usepackage{amssymb} \usepackage{epstopdf} \usepackage{float} \usepackage[normalem]{ulem}  \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}  \title{\emph{Research Proposal:}\\Perceptual Effects of Cross-Contextualized Soundscapes within the Built Environment}   Here's what happens:    Any ideas?
76722
I have written in TeX the following:  \section{A} ... somethingA ...  \begin{picture}(100, 100)(-250, -110) \includegraphics[scale=1]{face.png} \end{picture}  \section{B} ... somethingB ...   I have put specific parameters in picture (-250, -110) so that the picture is added in the top right of the created page. Although this works just fine, face.png appears where I want it, the problem is that there is a big gap between somethingA and somethingB. So I have something like this in the created document:  ... somethingA ...      ... somethingB ...   Any ideas how to solve this?
98899
My document should be letterpaper and my attachments should be a4paper. I had high hopes for the \newgeometry command from the geometry package, but the documentation says      \newgeometry is almost similar to   \geometry except that \newgeometry   disables all the options specified in   the preamble and skips the   papersize-related options: landscape,   portrait and paper size options (such   as papersize, paper=a4paper and so   forth).   Any help is appreciated!
73105
I just ran into the problem of embedding fonts while trying to publish with lulu.com. Although everyone apparently is 'supposed' to handle those 35 standard fonts for some strange reason they won't accept pdf's without them included. So one way that according to  is supposed to work (I haven't tried yet, but hopefully it does work) is to convert the pdf to ps and then back to pdf and include the fonts at that time:  pdftops file.pdf ps2pdf14 -dPDFSETTINGS=/prepress file.ps   But this feels at least to me like the wrong way of doing things. Is there some way of passing the parameter directly to pdflatex to tell it to embed those fonts?   And, if not -- How do we go about getting such a feature? (Because it can't only be me who has this sort of problems)
48787
Is there a way when exporting a .psd as a .pdf to make the file smaller?   My client always has me work in Photoshop and send them finished work as .pdf's, but they say the files are too big. These products are eventually printed out, so while I need to make the files smaller, they still need to have good quality. Everything is in CMYK mode already. I just don't know a lot about compression and changing file sizes
26505
I think I'm not going to solve my problem with the Floats and positioning of figures. I have 4 diagramms and I need to place them on two pages and at the end of the second page the caption for all 4 figures. So two figures on each page. For the the diagramms on the second page I need to place the upper image near to the top because I need some place for the caption. On the page before I need both figures to be centered in the middle with some spacing between them. So this is my code:   \begin{figure}[c] \centering \includegraphics[width=\linewidth]{45.pdf} \end{figure} \begin{figure}[c] \centering \includegraphics[width=\linewidth]{46.pdf} \end{figure} \makeatletter \setlength{\@fptop}{0pt} \makeatother \begin{figure}[t!] \centering \includegraphics[width=\linewidth]{47.pdf} \captionsetup[figure]{font=small,skip=0pt} \includegraphics[width=\linewidth]{48.pdf} \caption{Konzentrationsprofile von Al, Re, Ta und W entlang der &lt;110&gt;-Richtung in der UC. } \end{figure}   The problem for the secong page was solved, but the figures on the first page were also forced to the top which I don't want!
110376
I have been trying to include pdf graphics in a document with this simple command:  \documentclass{beamer}  \begin{document}  \begin{frame}     \only&lt;1&gt;{\includegraphics[width=\textwidth]{test}}     \only&lt;2&gt;{\includegraphics[width=\textwidth]{test}}     \only&lt;3&gt;{\includegraphics[width=\textwidth]{test}} \end{frame}  \end{document}   Unfortunately, the three pictures (that are supposed to be identical), are not aligned identically (from the top).  Here is the test.pdf used for generating the pdf:   Here is the generated pdf:  (as you can(not?) see), the first and second image are not aligned.    Now if someone knows why it acts like this? Here I put a VME since it seems to me that no package were necessary except for the class Beamer. I have tried with my "usual" packages, maybe I am just missing the right one?  Just so you know, what I was able to do so far: if I put a ~ after {test}, then it gets aligned (note that it will not work on this minimal example, there are some packages missing).  Also something I noticed (because when I first met this probleme I had many more \only), it is always the one before last only that messes up! No matter how many \only, and then the last one will be aligned with the previous one (this is why we need at least three only lines).
38420
I have a graphic in PDF format (originally converted from an SVG) that is monochromatic (black on white). Is it possible using TikZ or PSTricks but not (Illustrator or Inkscape) to include this image in a different color?  Example:    While it lasts (there seems to be no long term way to host a pdf), you can .  Edit: Simple was perhaps a bit of a misnomer - the pdfs are cropped and monochromatic, but to intricate to redraw on my own. The above example is a character from a font (which I can recolor), but it gives a good example of what shapes I am talking about.