Un breve código de muestra
% pdfTeX
\newbox\thbx
\setbox\thbx\hbox{abc}
\newbox\tvbx
\setbox\tvbx\vbox{\unhbox\thbx}
\showbox\tvbx
\bye
daría salida
\thbx=\box16
\tvbx=\box17
> \box17=
\vbox(6.94444+0.0)x469.75499
.\hbox(6.94444+0.0)x469.75499, glue set 434.47717fil
..\hbox(0.0+0.0)x20.0
..\tenrm a
..\tenrm b
..\kern0.27779
..\tenrm c
..etc.
¿Qué significa la última línea de la salida ( etc.
) y por qué TeX la coloca allí?
Respuesta1
De forma predeterminada \showboxbreadth=5
, es decir, después de que TeX muestre los primeros cinco elementos de la lista, escribirá etc.
para indicar que hay más.
Hay otro parámetro que influye en la salida de \showbox
y es \showboxdepth
(predeterminado 3
), que es el nivel de anidamiento al que desciende TeX. Si se ha excedido la profundidad, esto se indica con []
.
Vea también este extracto del TeXbook:
\danger When \TeX\ displays a box as part of diagnostic output, the amount
of data is controlled by two parameters called ^|\showboxbreadth| and
^|\showboxdepth|. The first of these, which plain \TeX\ sets equal to~5,
tells the maximum number of items shown per level; the second, which plain
\TeX\ sets to~3, tells the deepest level. For example, a small box
whose full contents are ^^{internal box format} ^^{symbolic box format}
\begintt
\hbox(4.30554+1.94444)x21.0, glue set 0.5
.\hbox(4.30554+1.94444)x5.0
..\tenrm g
.\glue 5.0 plus 2.0
.\tenrm || (ligature ---)
\endtt
will be abbreviated as follows when |\showboxbreadth=1| and |\showboxdepth=1|:
^^{ligature} ^^{em-dash}
\begintt
\hbox(4.30554+1.94444)x21.0, glue set 0.5
.\hbox(4.30554+1.94444)x5.0 []
.etc.
\endtt
And if you set |\showboxdepth=0|, you get only the top level:
\begintt
\hbox(4.30554+1.94444)x21.0, glue set 0.5 []
\endtt
(Notice how `^|[]|' and `^|etc.|'~indicate that the data has been
truncated.)