Difference between revisions of "System Macros/User Interaction"

From Wiki
Jump to navigation Jump to search
(split off section)
 
m (Basic navigation)
Line 1: Line 1:
[[System_Macros]]
+
< '''Prev:''' [[System Macros/Key Value Assignments|Key-Value Assignments]] | '''Top:''' [[System Macros]] |
  
 
This macro hardly needs explanation. It stops TeX until you input something.
 
This macro hardly needs explanation. It stops TeX until you input something.
Line 20: Line 20:
  
 
This message will only be output if <code>\debuggerinfo</code> is true. (it usually isn't). If you need to calculate something to be used inside the message, embrace your calculating code with <code>\ifdebuggerinfo ... \fi</code>.
 
This message will only be output if <code>\debuggerinfo</code> is true. (it usually isn't). If you need to calculate something to be used inside the message, embrace your calculating code with <code>\ifdebuggerinfo ... \fi</code>.
 +
 +
< '''Prev:''' [[System Macros/Key Value Assignments|Key-Value Assignments]] | '''Top:''' [[System Macros]] |
 +
 +
[[Category:System Macros]]
 +
[[Category:ConTeXt programming]]

Revision as of 01:28, 2 August 2006

< 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 |