1

I use \VerbatimInput in package fancyvrb to wrap my text, which is loaded from external file. But when the external file is too large, it gives the following error:

TeX capacity exceeded, sorry [grouping levels=255].
<argument> ...

Is there any solution to increase the file size limit?

Stefan Pinnow
  • 29,535
  • 1
    Welcome to TeX.SE. Just out of curiosity: How large is the external file? Second, what are you doing with file at the moment? Third, are you open to a LuaLaTeX-based solution? – Mico Aug 23 '17 at 19:52
  • Thanks for reply. The file is just about 500 KB, with 200 lines. I want to present a debugging information in pdf, while keeping the format. – firefighter Aug 23 '17 at 21:25
  • Thanks for these additional pieces of information. (I must confess to feeling a bit baffled about how 200 lines of text can take up 500KB -- unless the lines are really, really long, I suppose.) If you're open to using LuaLaTeX, do take a look at the posting How to handle verbatim material in LuaLaTeX? With Lua(La)TeX, the only meaningful size constraint should be the amount of RAM on your system. – Mico Aug 23 '17 at 21:29
  • Maybe you can convert the text file(s) to pdf in the terminal (https://unix.stackexchange.com/questions/17406/how-to-convert-txt-to-pdf) and then include the pdfs in your LaTeX document? – Marijn Aug 24 '17 at 08:26
  • Thank you. It works by converting the text files to pdf. I use the following python code http://code.activestate.com/recipes/532908-text-to-pdf-converter-rewrite/ – firefighter Aug 24 '17 at 19:38
  • I tried a 500KB file and got no problem; but 2500 byte long lines could indeed be an issue, but I can't see how you can print such lines on a sheet of paper. Not reproducible. – egreg Oct 23 '17 at 20:58

1 Answers1

0

I use the python code http://code.activestate.com/recipes/532908-text-to-pdf-converter-rewrite/ to convert the text to pdf. It works well for large text.