4

By setting max_print_line=1000 in texmf.cnf or the environment, the logfile becomes more readable.

How should we set the environment in .latexmk?

I want to set the variable per project. Not global.

3
  • Any special reason why you want to set it in .latexmk and not simply in texmf.cnf? Commented Jul 31, 2017 at 13:22
  • You could make an alias for alias mylatexmk='export max_print_line=1000; latexmk (if you are not using bash, the commands need to be adjusted accordingly) Commented Jul 31, 2017 at 13:35
  • @samcarter that is not so clean. It would apply for all projects then. Besides that I think it belongs to the "makefile". One could make a run.sh but there is latexmk already which should manage this. Commented Jul 31, 2017 at 13:52

1 Answer 1

6

Just put

$ENV{max_print_line} = $log_wrap = 1000;

in the project's .latexmkrc file. The Perl variable $ENV{max_print_line} is equivalent to the corresponding environment variable for the OS, and it is passed to all the programs that latexmk invokes. The corresponding internal variable for latexmk is $log_wrap, and is used in its analysis of log files.

(Notes to myself as latexmk maintainer: Latexmk should be changed so that it uses $ENV{max_print_line} instead of $log_wrap whenever it is found that the environment variable is set. Also $log_wrap should be documented although it currently isn't.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .