• A New Series of Articles: TeX Tokens and Related Concepts—But Why (and How)? - Overleaf, Online LaTeX Editor
    https://www.overleaf.com/learn/latex/Articles/A_New_Series_of_Articles:_TeX_Tokens_and_Related_Concepts%E2%80%94But_Why_

    The motivation to write this series of articles arose through reading material about TeX which explained many of TeX’s activities through the concept of “tokens” together with TeX’s “tokenization process”, “token lists” and related concepts such as “macro expansion” and “expandable commands”. Whenever I encountered TeX-related explanations phrased in terms of “TeX tokens” the same question kept coming to mind: What, precisely, is a TeX token? I needed to find out.

    The scope and content of the first article, What is a “TeX token”?, is, by its very nature, quite “close to the metal” as programmers might say and there’s no doubt that “TeX tokens” could be classified as a pretty arcane topic to write about: so why bother? Ultimately, you take a view—or, perhaps, a leap of faith—that other people may also have been puzzling over the same topic and that there’s scope for an article or two to fill in some gaps. My aim is to provide some useful background explanations which can complement other material you might be reading and, hopefully, may help to better understand some key concepts which arise as you learn about TeX and explore macros and programming.

    Clearly, within the confines of blog articles we can only skim the surface—it’s simply not practical to attempt an explanation of all salient topics or to dive into the murkiest waters. Of necessity, I will skip considerable detail and walk the fine line between over-simplification and pushing analogies to breaking point.

    “Write articles you’d like to have read” is a useful guide and one I’ve tried hard to apply as I wrote this series.

    #TeX #analyse_de_code #programmation_littérale #attention_c'est_très_technique

    et on pourrait aussi ajouter #archéologie

    • où l’on apprend que le code de TeX (original, celui de Knuth) est plein de variable globales, de nom de variables cryptic et de goto. Bienvenu 40 ans en arrière.