You can use both Help+Manual's predefined variables and your own user-defined variables in your topics and topic headers. These are all displayed automatically in the Insert Text Variable dialog so you don't need to refer to a list to use them.
If you use HTML variables in your topics and headers only the plain-text portion of the variable value will be inserted. If the variable does not contain a plain-text portion (text outside of any HTML tags) nothing will be inserted.
The procedure is identical for predefined variables and user-defined variables. They are all displayed together in the same dialog:
1.Click in the editor where you want to insert the variable, either in the text or the topic header above the text.
2.Select Write > Insert Object > or press Ctrl+T.
3.Select the variable you want to use from the list and click on OK (or just double-click on the variable in the list).
Variables inserted with this method are displayed with a button-style highlight like this: This is only to make the variable easier to see in the editor. Variables typed in manually (see below) are also fully functional.See Variables and Conditional Output for lists of the available predefined variables and what they do.
Editing highlighted variables:
Double-clicking on a variable opens the Insert Variable dialog with which you can change the variable to a different variable or access the Edit Variables dialog by clicking on More...
Variables can also be typed in manually in topics and headers. They are evaluated automatically when you publish your output and work in exactly the same way as variables entered with the Insert Variable dialog.
•Just type in the variable exactly as it appears in the variable list. Use all upper-case characters, and enclose the variable name in <% and %> tag delimiters. Spaces are permitted in variable names.
•Example: This sentence contains a <%USER_DEFINED_VARIABLE%> typed in manually.
Variables inserted with this method are not highlighted in the topic text and you cannot double-click on them to open the Edit Variables dialog. Also, if you make a mistake when you type the name of a variable it won't work!
A number of the predefined variables in Help+Manual enter the current date or time or the date or time associated with an item in your project. Normally these variables will automatically use the date and time format set in your Windows configuration. In addition to this they also automatically use the current language for words in the time and date, if applicable.
However, the <%NOW%> and <%TOPICLASTEDITED%> variables that also support the use of a "format string" with which you can define the entire date and time format to be displayed. You define the format by adding the format string to the variable in parentheses like this:
<%NOW(dddd, mmmm d, yyyy)%>
See Date & time formatting in variables for details of the syntax.
Note that this only works with variables that return date and time values, if you add format strings to any other variables the variable will no longer work. Also, you can only use this option by editing variables in the Help+Manual editor – you cannot use the date and time formatting syntax in variable definitions.
Variables and Conditional Output (Reference)