3

I've got a (hopefully) trivial problem. I have a python script that is generating the a .tex file for over 600 figures. The code automatically groups figures in up to 4 subplots depending on some parameters. I ran a brief test script with a reduced number of figures and everything went fine. Then, when running the entire batch of images I get the error:

geometry driver: auto-detecting geometry detected driver: pdftex [1{C:/Users/ln/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}] ("P:...\Appendix_A.lof") [1] [1]pdflatex.EXE: Not enough room in an internal buffer. texify: pdflatex failed for some reason (see log file).

The log file is useless and has the same info. The script gets the error in the code below:

\begin{figure}[ht]
\subcapcentertrue
\centering
    \subfigure[Comparison of percentile concentrations at Location ID 13]{%
        \includegraphics[width=0.45\linewidth]{"Biochemical Oxygen Demand 5 Day Un-Diluted_mgL_Percent Saturation Field Dissolved Oxygen_perSAT_13_pp.png"}
        \label{fig:subfigure}}
    \quad
%
\caption{QQ plots comparing Biochemical Oxygen Demand 5 Day Un-Diluted, mg/L, and Percent Saturation Field Dissolved Oxygen, perSAT.}
\label{fig:figure}
\end{figure}
\clearpage

If I change the includegraphics line to something shorter, like:

\includegraphics[width=0.45\linewidth]{Alkalinity as CaCO3_mgL_pH_pH Units_13_pp.png}

Everything runs fine. I'm starting the file path at C:, so this shouldn't be a windows file path length error. Is there a limitation on the length of an image name in LaTeX that I don't know about? I would ideally like to not regenerate the figures using a different naming convention.

Cheers

  • 1
    Welcome to TeX.SX! – user31729 Sep 11 '14 at 23:40
  • 2
    I have seen the error message in combination with spaces in files names (not a good idea) and too long \graphicspath content. But without an example to test it is difficult to find the real cause. – Ulrike Fischer Sep 12 '14 at 9:00
  • 1
    The issue is directly related to the length of the graphicspath. I resolved the issue by writing into the python script a function to copy and rename the figures to a new location for use the LaTeX. I'm pretty new to LaTeX, is there a place I can submit a bug/issue request? – htln Sep 18 '14 at 19:50
2

I resolved the issue by changing the file names of the images so that they are sorter and without spaces. I believe this is a bug.

| improve this answer | |
  • I too had a problem with internal buffers, but of different sort (when using large trees with Forest package). Hoping that someone somewhere finally realizes that we are now dealing with gigabytes of RAM available and relaxes the buffer size requirements across the board. – ajeh Sep 18 '14 at 20:18
  • Agreed. The only time I truly rely on TeX is for very large appendixes with hundreds of images. – htln Sep 19 '14 at 16:58
0

You can indeed use file names with whitespaces if you use the package grffile, see How to include graphics with spaces in their path?.

| improve this answer | |
0

I had faced this issue before ...

  1. ensure the \graphicspath is point to the right folders of your image such as

    \usepackage{graphicx}
    \graphicspath{{../imagesFolder1/},{/imagesFolder2}}
    

    the first folder to one level up and the second folder point to the same level of the text file path.

  2. remove the the folder name from the path of \includegraphics, i.e., \includegraphics{myFigure1.pdf} — this is the right way while \includegraphics{/imagesFolder2/ComputerScienceLogoBlack.pdf} is causing the error you have currently.

| improve this answer | |
  • Welcome to TeX.SX! The OP does not even use \graphicspath. – TeXnician Jun 24 '17 at 10:48
  • @TeXnician: In a comment he told us, he has: "The issue is directly related to the length of the graphicspath." Nevertheless, I don't think, that removing the path from \includegraphics reduces the internal buffer consumption. Using \graphicspath usually needs more internal memory and time to build and test several file names paths. – Schweinebacke Jun 24 '17 at 11:07
  • @Schweinebacke Sorry, you're right. I've only seen UlrikeFischer comment on it. – TeXnician Jun 24 '17 at 11:15
  • @Schweinebacke thanks for the reply! I think my comment was me being inattentive - I probably meant to write the length of the file path to the images, not the length of \graphicspath. But that was a few years ago so ¯_(ツ)_/¯ – htln Jul 6 '17 at 22:57
0

I saw this issue when I was compiling a latex file in a deep directory tree. Once I shortened some of the names of the directories in this tree, the problem disappeared.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.