
Hi, I just published my PhD thesis in ConTeXt (with graphics in LaTeX/TikZ) [1]. For a lot of typesetting tasks I got great help here. Thank you for making ConTeXt and thank you for helping me here! I published the source code here [2] to maybe give something back. For this community, probably the most interesting part are the data and acronyms "modules". ## Data For scientific papers, often you need to embed some measurement data. The simple approach here is to let some programs produce the data and then just copy them data for data into the text. This, however, is a really tedious and error-prone task when you do it multiple times. Thus, a colleague of mine develops versuchung [3] and dataref [4]. The first one is a Python library to output measurement data in a defined format and the latter is a LaTeX/PGF library to embed that data referenced by its key into a LaTeX document. For ConTeXt, this was not possible. Therefore, Versuchung is now able to directly output lua tables and "data.lua" [5] provides minimal tooling to read that data in a ConTeXt document. The idea is to have a function "get_experiment" to get all data of a specific experiment. The function returns another function that allows to give a specific string (the keys in the Lua table) to get the actual data. The meaning of returning another function is to be able to track all usages of the data (for example one can generate a datagraphy with this). Example usages are here [6] and here [7]. ## Acronyms I wrote the thesis in German but had the problem that a lot of computer science acronyms are in English. I therefore decided to use either the German long version (correctly declined) or the English acronym. However, this should happen in an automated way (I want to always write down the acronym in the source code) and it should track that the acronym is _always_ fully described before using it. This behavior is similar to the acronym package of LaTeX [8]. To simplify data transfer the logic and the acronyms are entirely in Lua and I just provided an interface for ConTeXt/TeX. The acronym logic is here [9], the TeX interface here [10]. It provides mainly the \acr command with a few arguments: \acr[f, l, p, g, d, a, b]{my-acronym} - f (full) to get the full acronym: acronym in long form in German, English long form and acronym - l (long) to get the acronym written out - p (plural) to get the plural form - g (genitive) to get the genitive form - d (dative) to get the dative form - a (accusative) to get the accusative form - b (bestimmt) to get the definite form (indefinite otherwise) A test document is also provided [11] (I attached the generated PDF for that document). This is _not_ generically usable. It works for the acronyms used in the thesis. I had a hard time figure out patterns for endings in German (I'm not a linguist) and basically provide exactly the patterns for the acronyms in the thesis. It may be useful anyway. ## General experience with ConTeXt so far I used LaTeX a lot, I've written my master's and PhD thesis in ConTeXt now. Recently, I also experimented with Typst. In general, I find ConTeXt way more consistent than LaTeX. I really like the key value interface for most functions. It also feels like (and is) a complete system (not like LaTeX as a system consisting of _a lot of_ different modules, most of them playing together just most of the times). I find Lua way easier to use as TeX as a programming language, therefore I prefer writing everything that contains programming logic in Lua. AFAIK, this aligns with ConTeXt. BTW, does a public Lua interface of ConTeXt exist with a reference what ConTeXt specific functions can be called directly in Lua? I find the ConTeXt source code hard to read. I dug around in the source code for typesetting references to personalize them and needed time to find the files that are responsible for this and understand the relevant variable and function names therein. When searching (grep) for a command, I often got some really long lists of commands containing the one I searched for, but I had a hard time finding the TeX and Lua code that implemented that specific command. I also needed some time to find out that manuals exist for most parts (first source for information was the wiki). When I found them, though, they were really helpful, especially for more low level knowledge (and as code examples). The context command line program is way better than the ones LaTeX provides (something like latexmk for example is simply not needed). Also, ConTeXt is way faster than LaTeX (though much slower than Typst but AFAIK, Typst is not as complete as ConTeXt). Best, Gerion [1] https://repo.uni-hannover.de/handle/123456789/18862 [2] https://codeberg.org/gerion/phd [3] https://github.com/stettberger/versuchung [4] https://www.ctan.org/pkg/dataref [5] https://codeberg.org/gerion/phd/src/branch/main/data.lua [6] https://codeberg.org/gerion/phd/src/branch/main/diss-style.tex#L620 [7] https://codeberg.org/gerion/phd/src/branch/main/cha/08-os-modell.tex#L283 [8] https://www.ctan.org/pkg/acronym [9] https://codeberg.org/gerion/phd/src/branch/main/acronyms.lua [10] https://codeberg.org/gerion/phd/src/branch/main/diss-style.tex#L564 [11] https://codeberg.org/gerion/phd/src/branch/main/acronymtest.tex