Like macros, definitions are user-defined placeholders. You can use them to insert special commands inside the text, especially for the destination format.
The syntax is !define [<word>] [<text>]. In contrast to macros, [<text>] will not be converted in a special way. No special characters are translated inside [<text>].
This example demonstrates how to print headlines with HTML:
As you can see you can use definitions to insert special commands that aren't supported by UDO. UDO Release 4 offered a lot of special commands for LaTeX that you now have to simulate with the !define command:
You can use definitions with parameters, too. Definitions with parameters are used the same way you can use macros with parameters. Definitions with parameters are a great help to expand UDO's support of a destination format.
You declare definitions like in the upper example. You can tell
UDO the positions of the parameters by adding
(!2) up to
(!9). When you call a definition you have to
write brackets (
[...]) around the parameters.
In the upper example I have shown you how to make a heading for HTML. When using parameters it may look like the following example:
As you can see in this example you can write format depending commands UDO doesn't support already.
The upper LaTeX example can be defined nicer, too. If you use parameters you can provide all available LaTeX commands in one definition:
In this example only one parameter is used but the non-LaTeX definition contains a second parameter. You may ask yourself why it has to be like this. Well, if you call the definition with only one parameter the second parameter is empty. When expanding the non-LaTeX definition UDO will replace the definition placeholder by empty space (because there is no second parameter, you understand?). Unfortunately you have to use this work-around when using definition with placeholders.
nl. If you don't you will get problems with bold text ((!B)) or the newline command ((!nl)).