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.

Q: Which commands can I supply back to LaTeX when it pauses on a line of code during compilation and is waiting for me to give it more information before proceeding?

E.g., in the post How do I use \show? (to which this question is a follow-up) I found that with \show\section in my code the LaTeX compilation would pause and I would get useful information about \section printed to the terminal. I could supply X back to the terminal and have the program exit (printing that useful information already mentioned to a .log file).

Q: So, what other commands could I supply at this point?

I'm having trouble finding information on the web regarding this. The post Different LaTeX interaction modes mentions that q will get LaTeX to proceed in a different, "quiet" mode. Running this, I see that something different is happening in the log-file. However (as with X) no .pdf is created.

Q: Is there a command I can supply that would sort of ignore the \show\section command in my .tex file and produce a .pdf?

share|improve this question
a tip: It's best if you don't post answers in your question. (It's a question, after all!) However, if you have things to tell that are not contained in the answer you just got, it's quite OK if you post an answer to your own question. (I'd recommend removing everything from the question that looks like an answer.) –  Hendrik Vogt Feb 24 '11 at 14:23
Thanks @Hendrik. Fixed. –  lowndrul Feb 24 '11 at 16:25

3 Answers 3

up vote 8 down vote accepted

So, what other commands could I supply at this point?

At the prompt you can enter a question mark to see the possible commands:

/tmp $ tex
This is TeX, Version 3.1415926 (TeX Live 2010)
> \x=undefined.
<*> \show\x

? ?
Type <return> to proceed, S to scroll future error messages,
R to run without stopping, Q to run quietly,
I to insert something, 
1 or ... or 9 to ignore the next 1 to 9 tokens of input,
H for help, X to quit.

Is there a command I can supply that would sort of ignore the \show\section command in my .tex file and produce a .pdf?

Press return, then the compilation proceeds. However, \show is always treated as an error:

/tmp $ tex
This is TeX, Version 3.1415926 (TeX Live 2010)
> \x=undefined.
<*> \show\x



Output written on texput.dvi (1 page, 196 bytes).
Transcript written on texput.log.
/tmp $ echo $?

So you should use \show only for debugging purposes, not for normal compilation runs. If you want to print the meaning of a control sequence without giving an error, use \immediate\write16{\meaning\foo} (in LaTeX, \typeout is equivalent to \immediate\write16).

share|improve this answer
@Phillip. Wonderful. Tested it out and everything works perfectly (i.e., \typeout and ?). Thx! –  lowndrul Feb 24 '11 at 14:45

UPDATE AND PARTIAL ANSWER: by running latex in interaction mode (typing latex in the command window directly) and proceeding along I'm given a message that basically says:

<return> to proceed S to scroll future error messages R to run without stopping Q to run quietly H for help X to quit

I found that actually entering R doesn't lead to a .pdf being produced as I'd hoped. I'm starting to think that including \show\section in my code will prevent that from happening no matter which command I supply.

ANOTHER UPDATE: See @Phillipp for the answer. \show\section will always be processed as an error and will not allow production of a .pdf. Should be run as a debugger.

share|improve this answer

Going back to where we started,

\def\myshow#1{\typeout{\string#1: \meaning#1}%
  \read 0 to \carryon

does the \show part of what you were after, and then prompts you to carry on (ignoring what you write, merely paying attention to the fact that you wrote something).

[It comes from a post somewhere, recently; my test harness has long had the \typeout bit, but not the \read bit.]

(I had never noticed that responses to those "press ... to proceed" things affected the return code from the TeX command and/or production of real output. unobservant sort of guy, y'see...)

share|improve this answer
a tip: you can use backticks ` to mark your inline code as I did in my edit. –  Hendrik Vogt Feb 24 '11 at 16:45

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.