Hello, I'm running context mkiv, version: 2013.05.28 00:36 (from the 2013 TeX Live CD). We're getting floods of output from context, including lots of Underfull hboxes, and the names of .tex files that are being opened and closed. This is all within a build script that does several other things besides running context. I'd like to suppress non-critical output from context so that other important output from the script doesn't get so easily lost. I'm already logging that output to a file, but I'd like to be able to take advantage of the console as well. I've tried the following command-line options to context, as suggested by context --help: --batchmode --silent --silent=typesetting --noconsole but none of these seem to have any effect on the output! I could just have the script discard stdout from context; I'm not sure how much of the output that would get rid of, but it may be good enough. However it's not ideal. (When an error occurs, as sometimes happens, I don't want the error message and its context to be hidden while the console waits for the user to respond blindly. I assume that would be on stderr anyway though...) Can anyone tell me how to suppress non-critical messages from context as it runs? Thanks, Lars
On Wed, 19 Mar 2014, Lars Huttar wrote:
Can anyone tell me how to suppress non-critical messages from context as it runs?
There are two types of messages that ConTeXt generates: Messages that come from TeX engine and messages that come from ConTeXt macro code. If you use context --noconsole filename the messages from ConTeXt are suppressed. I don't know of a way to suppress messages that originate from TeX engine. Aditya
On 3/19/2014 4:03 PM, Aditya Mahajan wrote:
On Wed, 19 Mar 2014, Lars Huttar wrote:
Can anyone tell me how to suppress non-critical messages from context as it runs?
There are two types of messages that ConTeXt generates: Messages that come from TeX engine and messages that come from ConTeXt macro code. If you use
context --noconsole filename
the messages from ConTeXt are suppressed. I don't know of a way to suppress messages that originate from TeX engine.
\dontcomplain ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Wed, 19 Mar 2014, Hans Hagen wrote:
On 3/19/2014 4:03 PM, Aditya Mahajan wrote:
On Wed, 19 Mar 2014, Lars Huttar wrote:
Can anyone tell me how to suppress non-critical messages from context as it runs?
There are two types of messages that ConTeXt generates: Messages that come from TeX engine and messages that come from ConTeXt macro code. If you use
context --noconsole filename
the messages from ConTeXt are suppressed. I don't know of a way to suppress messages that originate from TeX engine.
\dontcomplain
And what about these messages: context --noconsole test mtx-context | warning: no (local) file './test', proceeding mtx-context | run 1: luatex --fmt="/home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="test" --lua="/home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:directives="logs.target=file" --c:fulljobname="./test" --c:input="./test" --c:kindofrun=1 --c:maxnofruns=8 --c:noconsole "cont-yes.mkiv" This is LuaTeX, Version beta-0.76.0-2013040516 (rev 4627) \write18 enabled. (/home/adityam/media/opt/context-minimals/texmf-context/tex/context/base/cont-yes.mkiv ConTeXt ver: 2013.12.24 17:52 MKIV beta fmt: 2013.12.24 int: english/english (/home/adityam/media/opt/context-minimals/texmf-context/tex/context/base/cont-new.mkiv) (/tmp/test.tex{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/pdftex/context/mkiv-base.map}{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-math.map}{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-rm.map} (/home/adityam/media/opt/context-minimals/texmf-context/tex/context/sample/knuth.tex) ) ) system | total runtime: 0.495 seconds Can one get rid of these? Aditya
On 3/19/2014 4:15 PM, Aditya Mahajan wrote:
On Wed, 19 Mar 2014, Hans Hagen wrote:
On 3/19/2014 4:03 PM, Aditya Mahajan wrote:
On Wed, 19 Mar 2014, Lars Huttar wrote:
Can anyone tell me how to suppress non-critical messages from context as it runs?
There are two types of messages that ConTeXt generates: Messages that come from TeX engine and messages that come from ConTeXt macro code. If you use
context --noconsole filename
the messages from ConTeXt are suppressed. I don't know of a way to suppress messages that originate from TeX engine.
\dontcomplain
And what about these messages:
context --noconsole test
mtx-context | warning: no (local) file './test', proceeding mtx-context | run 1: luatex --fmt="/home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="test" --lua="/home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:directives="logs.target=file" --c:fulljobname="./test" --c:input="./test" --c:kindofrun=1 --c:maxnofruns=8 --c:noconsole "cont-yes.mkiv" This is LuaTeX, Version beta-0.76.0-2013040516 (rev 4627) \write18 enabled. (/home/adityam/media/opt/context-minimals/texmf-context/tex/context/base/cont-yes.mkiv
ConTeXt ver: 2013.12.24 17:52 MKIV beta fmt: 2013.12.24 int: english/english
(/home/adityam/media/opt/context-minimals/texmf-context/tex/context/base/cont-new.mkiv) (/tmp/test.tex{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/pdftex/context/mkiv-base.map}{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-math.map}{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-rm.map} (/home/adityam/media/opt/context-minimals/texmf-context/tex/context/sample/knuth.tex) ) )
currently there is no callback for open/close file message but at some point we can also intercept these (low priority, to be done when the luatex io is cleaned up) Hans ----------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 3/19/2014 11:33 AM, Hans Hagen wrote:
On 3/19/2014 4:15 PM, Aditya Mahajan wrote:
On Wed, 19 Mar 2014, Hans Hagen wrote:
On 3/19/2014 4:03 PM, Aditya Mahajan wrote:
On Wed, 19 Mar 2014, Lars Huttar wrote:
Can anyone tell me how to suppress non-critical messages from context as it runs?
There are two types of messages that ConTeXt generates: Messages that come from TeX engine and messages that come from ConTeXt macro code. If you use
context --noconsole filename
the messages from ConTeXt are suppressed. I don't know of a way to suppress messages that originate from TeX engine.
\dontcomplain
And what about these messages:
context --noconsole test
mtx-context | warning: no (local) file './test', proceeding mtx-context | run 1: luatex --fmt="/home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
--jobname="test" --lua="/home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
--no-parse-first-line --c:currentrun=1 --c:directives="logs.target=file" --c:fulljobname="./test" --c:input="./test" --c:kindofrun=1 --c:maxnofruns=8 --c:noconsole "cont-yes.mkiv" This is LuaTeX, Version beta-0.76.0-2013040516 (rev 4627) \write18 enabled. (/home/adityam/media/opt/context-minimals/texmf-context/tex/context/base/cont-yes.mkiv
ConTeXt ver: 2013.12.24 17:52 MKIV beta fmt: 2013.12.24 int: english/english
(/home/adityam/media/opt/context-minimals/texmf-context/tex/context/base/cont-new.mkiv)
(/tmp/test.tex{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/pdftex/context/mkiv-base.map}{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-math.map}{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-rm.map}
(/home/adityam/media/opt/context-minimals/texmf-context/tex/context/sample/knuth.tex)
) )
currently there is no callback for open/close file message but at some point we can also intercept these (low priority, to be done when the luatex io is cleaned up)
Hans
Thanks. In our case these amount to pages and pages of output, because our document consists of many many files that reference each other (including images). So I would vote a big +1 for that change. Lars
On 3/19/2014 4:37 PM, Lars Huttar wrote:
In our case these amount to pages and pages of output, because our document consists of many many files that reference each other (including images). So I would vote a big +1 for that change.
doesn't --batchmode help then? ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 3/19/2014 11:45 AM, Hans Hagen wrote:
On 3/19/2014 4:37 PM, Lars Huttar wrote:
In our case these amount to pages and pages of output, because our document consists of many many files that reference each other (including images). So I would vote a big +1 for that change.
doesn't --batchmode help then?
My mistake... --batchmode does seem to get rid of the file open/close messages. (Until I learned that --noconsole takes an argument, there was still so much output that it was hard to see a difference in output due to --batchmode.) Unfortunately, --batchmode also seems to suppresses printing fatal error messages and stopping on them (as its --help documentation suggests). So when the tex code has an error, the compilation continues to the end (wasting significant time) and then exits with a failure status code, but no indication of where the error occurred. So --batchmode doesn't really seem to be an option for us. Unless we use batchmode most of the time and then rerun without batchmode after an error occurs. I tried having the build script discard stdout from the context process (with --noconsole=tmp.log but without --batchmode). But apparently, the error output of context goes to stdout instead of stderr: Context stops on a fatal error but the error message and prompt are lost, and the process hangs, waiting for the user to respond to a message they can't see. Lars
On 3/19/2014 5:37 PM, Lars Huttar wrote:
Unfortunately, --batchmode also seems to suppresses printing fatal error messages and stopping on them (as its --help documentation suggests). So when the tex code has an error, the compilation continues to the end (wasting significant time) and then exits with a failure status code, but no indication of where the error occurred.
Normally more runtime is lost as side effect of (inefficient) settings than by messages to the console -) How many pps do you get in a run? What kind of hardware? Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 3/19/2014 11:09 AM, Hans Hagen wrote:
On 3/19/2014 4:03 PM, Aditya Mahajan wrote:
On Wed, 19 Mar 2014, Lars Huttar wrote:
Can anyone tell me how to suppress non-critical messages from context as it runs?
There are two types of messages that ConTeXt generates: Messages that come from TeX engine and messages that come from ConTeXt macro code. If you use
context --noconsole filename
the messages from ConTeXt are suppressed.
Thanks, Aditya. I will try adding a filename argument. This does seem to get rid of a lot of non-critical output, though not all, as you noted in your followup email.
I don't know of a way to suppress messages that originate from TeX engine.
\dontcomplain
Is there any documentation about what kinds of complaints this suppresses? I couldn't find any in the usual places. Apparently it is a ConTeXt command rather than a primitive TeX one. Lars
On 3/19/2014 4:29 PM, Lars Huttar wrote:
On 3/19/2014 11:09 AM, Hans Hagen wrote:
On 3/19/2014 4:03 PM, Aditya Mahajan wrote:
On Wed, 19 Mar 2014, Lars Huttar wrote:
Can anyone tell me how to suppress non-critical messages from context as it runs?
There are two types of messages that ConTeXt generates: Messages that come from TeX engine and messages that come from ConTeXt macro code. If you use
context --noconsole filename
the messages from ConTeXt are suppressed.
Thanks, Aditya. I will try adding a filename argument. This does seem to get rid of a lot of non-critical output, though not all, as you noted in your followup email.
I don't know of a way to suppress messages that originate from TeX engine.
\dontcomplain
Is there any documentation about what kinds of complaints this suppresses? I couldn't find any in the usual places. Apparently it is a ConTeXt command rather than a primitive TeX one.
\show\dontcomplain if console output is slowing down a run make sure you have an efficient console (i use conemu on windows and on unixes i always make sure that i use a proper font); sometimes you can set delays (standard cmd on windows is char-by-char but there are variants); when one runs from an editor normally the drawbacks are neglectable (at leats in scite) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 3/19/2014 11:36 AM, Hans Hagen wrote:
On 3/19/2014 4:29 PM, Lars Huttar wrote:
Is there any documentation about what kinds of complaints this suppresses? I couldn't find any in the usual places. Apparently it is a ConTeXt command rather than a primitive TeX one.
\show\dontcomplain
system > tex > error on line 2 in file C:/Users/Huttar/Documents/work/tex/test-dontcomplain.tex: ? ... 1 \starttext 2 >> \show\dontcomplain 3 \stoptext 4 l.2 \show\dontcomplain ?
if console output is slowing down a run make sure you have an efficient console (i use conemu on windows and on unixes i always make sure that i use a proper font); sometimes you can set delays (standard cmd on windows is char-by-char but there are variants); when one runs from an editor normally the drawbacks are neglectable (at leats in scite)
Thanks, the slowdown is one of our concerns. I will look into alternative terminals. Lars
Am 19.03.2014 um 16:46 schrieb Lars Huttar
On 3/19/2014 11:36 AM, Hans Hagen wrote:
On 3/19/2014 4:29 PM, Lars Huttar wrote:
Is there any documentation about what kinds of complaints this suppresses? I couldn't find any in the usual places. Apparently it is a ConTeXt command rather than a primitive TeX one.
\show\dontcomplain
system > tex > error on line 2 in file C:/Users/Huttar/Documents/work/tex/test-dontcomplain.tex: ? ...
1 \starttext
2 >> \show\dontcomplain
3 \stoptext
4
l.2 \show\dontcomplain
?
Read the output which comes before the error message:
\dontcomplain=\protected macro: ->\hbadness \plustenthousand \vbadness \plustenthousand \hfuzz \maxdimen \vfuzz \maxdimen .
Wolfgang
On Wed, 19 Mar 2014, Lars Huttar wrote:
On 3/19/2014 11:36 AM, Hans Hagen wrote:
On 3/19/2014 4:29 PM, Lars Huttar wrote:
Is there any documentation about what kinds of complaints this suppresses? I couldn't find any in the usual places. Apparently it is a ConTeXt command rather than a primitive TeX one.
\show\dontcomplain
system > tex > error on line 2 in file C:/Users/Huttar/Documents/work/tex/test-dontcomplain.tex: ? ...
context --pipe mtx-context | entering scrollmode, end job with \endThis is LuaTeX, Version beta-0.76.0-2013040516 (rev 4627) \write18 enabled. ConTeXt ver: 2013.12.24 17:52 MKIV beta fmt: 2013.12.24 int: english/english system > 'cont-new.mkiv' loaded (/home/adityam/media/opt/context-minimals/texmf-context/tex/context/base/cont-new.mkiv) system > files > jobname 'cont-new', input 'cont-new', result 'cont-new' fonts > latin modern fonts are not preloaded languages > language 'en' is active *\show\dontcomplain
\dontcomplain=\protected macro: ->\hbadness \plustenthousand \vbadness \plustenthousand \hfuzz \maxdimen \vfuzz \maxdimen .
system > tex > error on line 0 in file : ? ... <empty file> <*> \show\dontcomplain * This gets rid of underfull overfull hbox messages. Aditya
On 3/19/2014 4:46 PM, Lars Huttar wrote:
On 3/19/2014 11:36 AM, Hans Hagen wrote:
On 3/19/2014 4:29 PM, Lars Huttar wrote:
Is there any documentation about what kinds of complaints this suppresses? I couldn't find any in the usual places. Apparently it is a ConTeXt command rather than a primitive TeX one.
\show\dontcomplain
system > tex > error on line 2 in file C:/Users/Huttar/Documents/work/tex/test-dontcomplain.tex: ? ...
1 \starttext
2 >> \show\dontcomplain
3 \stoptext
4
l.2 \show\dontcomplain
?
if console output is slowing down a run make sure you have an efficient console (i use conemu on windows and on unixes i always make sure that i use a proper font); sometimes you can set delays (standard cmd on windows is char-by-char but there are variants); when one runs from an editor normally the drawbacks are neglectable (at leats in scite)
Thanks, the slowdown is one of our concerns. I will look into alternative terminals.
a simple \dorecurse can help to test it \starttext \dorecurse{1000}{test\page} \stoptext % mkiv lua stats > runtime: 1.949 seconds, 1000 processed pages, 1000 shipped pages, 513.084 pages/second % mkiv lua stats > runtime: 1.906 seconds, 1000 processed pages, 1000 shipped pages, 524.659 pages/second (--jit) \starttext \dorecurse{1000}{\input tufte\page} \stoptext % mkiv lua stats > runtime: 4.918 seconds, 1000 processed pages, 1000 shipped pages, 200.080 pages/second % mkiv lua stats > runtime: 3.500 seconds, 1000 processed pages, 1000 shipped pages, 285.714 pages/second (--jit) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Aditya Mahajan
-
Hans Hagen
-
Lars Huttar
-
Wolfgang Schuster