ConTeXt and Lua programming/Tutorials/System Macros/User Interaction

From Wiki
< ConTeXt and Lua programming‎ | Tutorials‎ | System Macros
Revision as of 20:35, 14 January 2025 by Garulfoo (talk | contribs) (Garulfoo moved page System Macros/User Interaction to ConTeXt and Lua programming/Tutorials/System Macros/User Interaction without leaving a redirect: improving wiki structure and navigation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

< Prev: Key-Value Assignments | Top: System Macros |

This macro hardly needs explanation. It stops TeX until you input something.

Macros for showing messages. In the multi-lingual modules, we will also introduce a mechanism for message passing. For the moment we stick to the core macros:

\writestring {string}
\writeline
\writestatus {category} {message}

Messages are formatted: the category appears within a fixed number of columns, on it's own, followed by a colon. One can provide the maximum width of the identification string with the macro \statuswidth.

For debugging purposes we can enhance macros with the next alternative. Here debuggerinfo stands for both a macro accepting two arguments and a boolean (in fact a few macro's too).

\debuggerinfo {subcategory} {message}

This message will only be output if \debuggerinfo is true. (it usually isn't). If you need to calculate something to be used inside the message, embrace your calculating code with \ifdebuggerinfo ... \fi.

< Prev: Key-Value Assignments | Top: System Macros |