TransWikia.com

hbox_set:Nn ⟨hbox⟩ {⟨contents⟩} typesets but doesn't print the ⟨contents⟩

TeX - LaTeX Asked on July 30, 2021

In the interface3.pdf documentation, it is said:

hbox:n {⟨contents⟩} Typesets the ⟨contents⟩ into a horizontal box of
natural width and then includes this box in the current list for
typesetting.

hbox_set:Nn ⟨hbox⟩ {⟨contents⟩} Typesets the ⟨contents⟩ at natural
width and then stores the result inside the ⟨hbox⟩.

I wonder what is the meaning here of "Typesets the ⟨contents⟩", since the latter doesn’t print anything, unlike the former which, admittedly, is said to "include th[e] box in the current list for typesetting".

documentclass{article}
begin{document}
ExplSyntaxOn
hbox:n { Foo }
hbox_set:Nn l_tmpa_box { Bar }
ExplSyntaxOff
end{document}

One Answer

As the docs says, it typesets the material, i.e. turns it from a series of input tokens into a list of glyphs, etc., which can be printed. However, hbox_set:Nn does not add anything to the current list (in contrast to hbox:n), which means that typeset material is simply stored (under the name of the N-type variable).

Correct answer by Joseph Wright on July 30, 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