Punto 1a: (Internamente) todos los «fragmentos que van en una página pero se están manipulando» en TeX son \box 0....\box 65535. (o \box0 ...., en condiciones normales el espacio solo ayuda a los humanos a leerlo, pero en algunas condiciones podría causar un error).
Los números se vuelven confusos, por lo que podemos usar \newbox\something para reemplazar el número con una etiqueta (\something) si queremos reservarlo permanentemente. \box 0 hasta \box9 están reservados como cajas temporales sin nombre. Varias otras cajas también están reservadas para funciones especiales.
Un simple \box 0 imprime el contenido de la caja y vacía la definición. \copy 0 imprimirá la caja y conservará la definición. Para definir el contenido, la sintaxis es \setbox[número/etiqueta][alguna caja], donde [alguna caja] es \hbox{contents} \vbox{contents} o un \box o \copy
Punto 2: Supuse que box0 era seguro como caja temporal de uso general, y luego tuve un momento de incertidumbre y lo verifiqué.
Puntos 3 y 1b: Como estás usando z_f_caller_bottom para el estilo del llamador de notas, el llamador en el texto y el llamador (o llamado) en el área de notas se tratan de manera diferente.
Supongamos que el llamado relevante para una nota dada es ¤. Lo que normalmente sucede en este caso es que el código define \box0 como (efectivamente) \hbox{\+z_f_caller_bottom ¤\+z_f_caller_bottom*} (aunque no genera exactamente ese código). Luego, procesa esa caja como lo haría con cualquier llamado:
- mide qué tan ancha es esa caja y, si es de ancho no nulo pero más estrecha que
\NoteCallerWidth, la rellena hasta ese tamaño (para que las cosas se alineen mejor).
- Si el resultado de eso tiene un ancho no nulo, entonces añade el
\NoteCallerSpace
El código que te di se interpreta a medida que se aplican los estilos de caracteres dentro de la caja, por lo que efectivamente termina siendo:
\setbox0{\+z_f_caller_bottom
\setbox0\bgroup
¤
\egroup\llap{box0 \kern 3pt}
\+z_f_caller_bottom*}
Excepto que (a) si lo escribieras, casi con seguridad se rompería, dado los catcodes, espacios y otras cosas peligrosas y confusas, y (b) los hooks se procesan realmente en medio del código de inicio y fin de z_f_caller
Bullet point 1a: (Internally) all ‘snippets that go on a page but are being played with’ in TeX are \box 0....\box 65535. (or \box0 ...., in normal conditions the space just helps humans read it, but in some conditions it might actually cause an error).
Numbers get confusing, so we can use \newbox\something replace the number with a label (\something) if we want to permanently reserve it. \box 0 up to \box9 are reserved as unnamed temporary boxes. Various other boxes are also reserved for special functions.
Just a straight \box 0 will output the contents of the box and empty the definition. \copy 0 will output the box and keep the definition. To define the contents, then the syntax is \setbox[number/label][some box] where [some box] is \hbox{contents} \vbox{contents} or a \box or \copy
Bullet point 2: I made a guess that box0 was safe as a general purpose temporary box, and then had a moment of uncertainty and checked it.
Bullet points 3 and 1b: Because you’re using z_f_caller_bottom for the note caller style, the caller in the text and the caller (or callee) in the notes area are treated differently.
Let’s assume that the relevant callee for a given note is ¤. What normally happens in this case is that code defines \box0 to be (effectively) \hbox{\+z_f_caller_bottom ¤\+z_f_caller_bottom*} (although it doesn’t actually generate that exact code), It then processes that box like it would for any callee:
- it measures how wide that box is and if it’s non-zero but narrower than
\NoteCallerWidth it pads to be that size (so things line up more nicely).
- If the result of that is of non-zero width, then it adds the
\NoteCallerSpace
The code I gave you gets interpreted as the character styles are being applied inside the box, so it effectively ends up as:
\setbox0{\+z_f_caller_bottom
\setbox0\bgroup
¤
\egroup\llap{box0 \kern 3pt}
\+z_f_caller_bottom*}
Except that (a) if you typed that it’d almost certainly break, given catcodes, spaces and other dangerous and confusing things and (b) the hooks are actually processed in the middle of the start and end code for z_f_caller
Traducción automática desde English