[luatex] Hash tokens meaning
Hans Hagen
pragma at wxs.nl
Tue May 28 14:48:27 CEST 2013
On 5/28/2013 1:39 PM, Arthur Reutenauer wrote:
>> Since I am not a TeX user, I compared the "LaTeX output/under the
>> hood" to an object file.
>
> That comparison clearly doesn't work at this point. Let's just move
> on.
>
>> I have tried, but it's not like what I expected.
>
> Who would have guessed ...
>
>> I know how to walk
>> through a program in source code, because that's what I'm accustomed
>> to: I find LaTeX's source code very different, I find myself
>> wandering around without any clear and sharp indication on a "main".
>
> You need to get rid of your misconceptions about programming, first.
> latex.ltx is a "program in source code" too, if you expected it to look
> different, you need to change your expectations and learn about this way
> of programming. Many languages don't need a "main" at all; you seem to
> come from an imperative programming point of view, but that's not the
> only one.
>
>> I guess I will read the TeX book, first.
>
> Probably one of the best choices.
Another option is buying a real big hard disk, start the document with
\tracingall (top of file), have a coffee break (or take a walk, or read
tex-by-topic), locate the log file, find an editor that can load this
beast and start deciphering what happens in there. Best take a real
document, with proper font usage and lots of structure, lists and
referencing as well as some interactive features.
Looking at the hash is rather useless as figuring out the expansion
chain is non trivial (comparable to reading assembler, cpu instructions
or bytecode). Looking at a traced log at least gives an impression of
what *happens* which is a good first step.
(I didn't really follow this thread, but tex usage is normally layered:
primitives, basic helper code, macro package, user code, and subsystems
like those for fonts can be pretty big and complex and one needs to
understand a bit about what typesetting and such is about in order to
get the picture.)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
More information about the luatex
mailing list