Poin 1a: (Secara internal) semua ‘snippet yang ada di halaman tetapi sedang dimainkan’ dalam TeX adalah \box 0....\box 65535. (atau \box0 ...., dalam kondisi normal spasi hanya membantu manusia membacanya, tetapi dalam beberapa kondisi itu mungkin benar-benar menyebabkan kesalahan).
Angka bisa membingungkan, jadi kita bisa menggunakan \newbox\something untuk mengganti angka dengan label (\something) jika kita ingin menyisihkannya secara permanen. \box 0 hingga \box9 disisihkan sebagai kotak sementara tanpa nama. Berbagai kotak lainnya juga disisihkan untuk fungsi khusus.
Hanya \box 0 yang lurus akan mengeluarkan isi kotak dan mengosongkan definisi. \copy 0 akan mengeluarkan kotak dan menjaga definisi. Untuk mendefinisikan isinya, maka sintaksisnya adalah \setbox[number/label][some box] di mana [some box] adalah \hbox{contents} \vbox{contents} atau \box atau \copy
Poin 2: Saya membuat tebakan bahwa box0 aman sebagai kotak sementara umum, dan kemudian saya merasa ragu dan memeriksanya.
Poin 3 dan 1b: Karena Anda menggunakan z_f_caller_bottom untuk gaya pemanggil catatan, pemanggil di teks dan pemanggil (atau yang dipanggil) di area catatan diperlakukan secara berbeda.
Misalkan callee yang relevan untuk catatan tertentu adalah ¤. Yang biasanya terjadi dalam kasus ini adalah kode mendefinisikan \box0 menjadi (secara efektif) \hbox{\+z_f_caller_bottom ¤\+z_f_caller_bottom*} (meskipun tidak benar-benar menghasilkan kode yang persis seperti itu), kemudian memproses kotak itu seperti yang akan dilakukan untuk callee mana pun:
- ia mengukur seberapa lebar kotak itu dan jika lebarnya bukan nol tetapi lebih sempit dari
\NoteCallerWidth, ia menambahkan padding agar ukurannya menjadi sebesar itu (agar hal-hal sejajar dengan lebih rapi).
- Jika hasilnya memiliki lebar bukan nol, maka ia menambahkan
\NoteCallerSpace
Kode yang saya berikan kepada Anda ditafsirkan sebagai gaya karakter yang diterapkan di dalam kotak, jadi pada akhirnya secara efektif menjadi:
\setbox0{\+z_f_caller_bottom
\setbox0\bgroup
¤
\egroup\llap{box0 \kern 3pt}
\+z_f_caller_bottom*}
Kecuali bahwa (a) jika Anda mengetik itu, hampir pasti akan rusak, mengingat catcodes, spasi, dan hal-hal berbahaya dan membingungkan lainnya, dan (b) hook sebenarnya diproses di tengah kode awal dan akhir untuk 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
Diterjemahkan secara otomatis dari English