Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it possible to tell the LaTeX command not to use line breaks in its console / log output?

This would make it easier to automate the processing of the log file, e.g. extracting the names of missing graphics files like in this output

! LaTeX Error: File `figures/triggers/muontriggers/notmu18_medium_mu10_loose/2d
map_abs_eta_phi.pdf' not found.

which are otherwise cut into pieces and unnecessarily difficult to grep etc.

share|improve this question
1  
See tex.stackexchange.com/questions/4047/…. One of the answers there might help. –  Ethan Bolker Apr 23 '12 at 12:50
add comment

2 Answers 2

up vote 13 down vote accepted

You can modify the texmf.cnf variables error_line and max_print_line, adding to the "local" texmf.cnf file, whose location depends on the distribution you're using; for TeX Live it is

/usr/local/texlive/2011/texmf.cnf

and the lines to be added are

max_print_line=1000
error_line=254
half_error_line=238

The first number is actually arbitrary, but 1000 seems to be sufficient. The error_line variable must be less than 255 and the maximum value of half_error_line is less than error_line-15

For experimenting you can also set the variables in the environment; assuming a Bash shell,

export max_print_line=1000
export error_line=254
export half_error_line=238
share|improve this answer
    
export max_print_line=1000 works perfect for me. Thanks. –  fuenfundachtzig Apr 26 '12 at 14:41
add comment

In MiKTeX you can use the option --max-print-line=140 to get longer log lines. This will also affect the output in the command line window but only if have enlarged it before.

share|improve this answer
add comment

Your Answer

 
discard

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.