![]() |
Source mode: pitfalls | ![]() |
The items marked (checked) were verified on 2026-10-06 by scripts which call the editing commands in a headless TeXmacs.
Named commands take precedence over macros (checked). activate_hybrid first tries the named commands of the keyboard tables, so \alpha always inserts the symbol \(\alpha\), even in a document which defines a macro alpha; such a macro has to be inserted in another way, for instance as an inactive compound tag which is then activated. The search order is that of entering a tag by name.
Unknown names outside source mode (checked). Outside source mode, \ followed by an unknown name and ↩ leaves the inactive hybrid tag in the document with an error message; only source mode creates new tags from unknown names.
Symbol codes above 255 (checked, issue #305 of mgubi/texmacs). activate_symbol converts a numeric name with a cast to char (
edit_dynamic.cpp:625
): <symbol|233> gives the Cork character 233 (e with an acute accent), but <symbol|300> gives , (300 modulo 256). Unicode code points are not supported; the documentation of symbol speaks of ASCII codes.
Invalid presentation values are ignored. An unknown value of src-style, src-special, src-compact or src-close keeps the previous setting without a warning (
env_semantics.cpp:729
).
The macro editor writes to the document. In the global mode, Apply rewrites the existing assign or adds one to the preamble (and then also to the master); in the local mode it adds a with around the tag. It never writes to a style file, so editing a macro of a style package creates a local override. Use Focus\(\rightarrow\)Preferences\(\rightarrow\)Edit source to change the package itself.
Preamble and source tree modes are document settings. Document\(\rightarrow\)Source\(\rightarrow\)Edit source tree stores preamble as an initial value of the document, and the preamble mode changes the tree (show-preamble instead of hide-preamble); both are saved with the document if it is saved in that state.