TransWikia.com

How ** prompt differs from * prompt?

TeX - LaTeX Asked on June 5, 2021

According to TeXbook p. 23, the ** prompt differs from * prompt only when first character is & or non-.

However, if we issue the following command (notice the first ) in ** and * prompts, the output is different:

setbox0=hbox{a} showbox0

Why is the output different? Where is this documented? Are there any other cases when processing of ** differs from *?

One Answer

>>> touch ilif.tex # we have a suitable file to input
>>> tex ilif # a file name has been given
This is TeX, Version 3.14159265 (TeX Live 2020) (preloaded format=tex)
(./ilif.tex)
*setbox0=hbox{a} showbox0
! OK (see the transcript file).
<*> setbox0=hbox{a} showbox0

? x
No pages of output.
Transcript written on ilif.log.
>>> tex # no file name
This is TeX, Version 3.14159265 (TeX Live 2020) (preloaded format=tex)
**setbox0=hbox{a} showbox0
> box0=
hbox(4.30554+0.0)x5.00002
.tenrm a

! OK.
<*> setbox0=hbox{a} showbox0

? x
No pages of output.

In the second case there is no .log file open yet, because TeX is still waiting for a file name in order to set the jobname. As you see, in the second case there is no annotation Transcript written on. Since no other output stream is open, TeX will use the terminal for printing diagnostics.

If you follow Donald Arsenau's hint and do setbox0=hbox{jobname} showbox0, the presence of jobname will force TeX to assign the default jobname, that is, texput. In this case the .log file can be opened and the output on the terminal is the same as in the ilif.tex case.

Correct answer by egreg on June 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP