TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I work with large TikZ graphics for which the default bufsize of lualatex/pdflatex is too small:

Unable to read an entire line---bufsize=200000.
Please increase buf_size in texmf.cnf.

Is there a quick way to increase the buffer size for either lualatex or pdflatex without editing texmf.cnf?

If there is no quick solution, could someone please describe the obscure configuration mechanism of LaTeX that needs to be executed to process changes made to texmf.cf?

Also, where is texmf.cnf in a standard installation of a Ubuntu texlive package? What happens to my changes to texmf.cf when I update the texlive package?

share|improve this question
up vote 6 down vote accepted

To find the texmf.cnf of your installation, use kpsewhich:

kpsewhich texmf.cnf

In a normal installation of texlive this will point you to a file that will probably tell you not to edit any other texmf.cnf.

You could try to increase the buf_size for one run by setting it on the cmdline:

buf_size=100000 pdflatex foo.tex

This may work, but you may also have to change texmf.cnf and recreate the formats.

See also Memory settings with MacTeX - Which texmf.cnf to modify

share|improve this answer
buf_size=100000 lualatex foo.tex worked for me. So it's just an environment variable. :-) – Bernhard Anderson Feb 4 '12 at 23:00
@BernhardAnderson: The settings in texmf.cnf can be overridden by environment variables. – Martin Schröder Feb 4 '12 at 23:03
@MartinSchröder How should I exactly buf_size=100000... in cmdline(windows)? because I get the error buf_size not an internal or external command – Negin May 21 '14 at 8:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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