1

Basically, TeX has a lot to say, and I'm not really interested in most of it. If I were, I'd read the log. The silence package suppresses output, but it suppresses output to the log as well, and further, it only suppresses some of the output, not nearly enough. I don't want hundreds of lines of output to appear every time I run the command, but I still want to be told about errors and be given a prompt.

I know that I can run something like

lualatex myfile.tex 1>/dev/null

or batch-mode to simply suppress all output. But it's useful when LuaTeX tells me about a compiling error, and I would like to keep that while getting rid of everything else.

1

You can use the reporting callbacks to turn off most messages, for example

\documentclass{article}

\usepackage{array}

\begin{document}

\zzz

\end{document}

produces terminal output of

This is LuaTeX, Version 1.0.4 (TeX Live 2017) 
 restricted system commands enabled.
(./pp009.tex
LaTeX2e <2017-04-15>
(using write cache: /usr/local/texlive/2017/texmf-var/luatex-cache/generic)(usi
ng read cache: /usr/local/texlive/2017/texmf-var/luatex-cache/generic /home/dav
idc/.texlive2017/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.652 seconds
Babel <3.10> and hyphenation patterns for 1 language(s) loaded.
(/home/davidc/texmf/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/home/davidc/texmf/tex/latex/base/size10.clo(load luc: /usr/local/texlive/2017
/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.luc)))
(/home/davidc/texmf/tex/latex/tools/array.sty) (./pp009.aux)
! Undefined control sequence.
l.7 \zzz

? 
(./pp009.aux))
 365 words of node memory still in use:
   2 hlist, 1 vlist, 1 rule, 2 glue, 4 attribute, 46 glue_spec, 4 attribute_lis
t, 2 write nodes
   avail lists: 2:7,3:1,4:1,5:4,7:1,8:1,9:1

warning  (pdf backend): no pages of output.
Transcript written on pp009.log.

but

\directlua{
function be_quiet ()
end
luatexbase.add_to_callback('start_run', be_quiet, 'stop start run')
luatexbase.add_to_callback('stop_run', be_quiet, 'stop stop run')
luatexbase.add_to_callback('start_page_number', be_quiet, 'stop start page')
luatexbase.add_to_callback('stop_page_number', be_quiet, 'stop stop page')
luatexbase.add_to_callback('start_file', be_quiet, 'stop start file')
luatexbase.add_to_callback('stop_file', be_quiet, 'stop stop file')
luatexbase.add_to_callback('show_warning_message', be_quiet, 'stop show warning message')
}
\documentclass{article}

\usepackage{array}

\begin{document}

\zzz

\end{document}

Produces terminal output of

This is LuaTeX, Version 1.0.4 (TeX Live 2017) 
 restricted system commands enabled.
(./pp009.tex
LaTeX2e <2017-04-15>
(using write cache: /usr/local/texlive/2017/texmf-var/luatex-cache/generic)(usi
ng read cache: /usr/local/texlive/2017/texmf-var/luatex-cache/generic /home/dav
idc/.texlive2017/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.664 seconds
Babel <3.10> and hyphenation patterns for 1 language(s) loaded.

Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(load luc: /usr/local/texlive/2017/texmf-var/luatex-cache/generic/fonts/otl/lmr
oman10-regular.luc)
! Undefined control sequence.
l.18 \zzz

? 
  • actually as written it suppresses the log as well but instead of doin nothing the supplied functions could write to the log but not the terminal. – David Carlisle Jun 10 '17 at 22:04

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.