Counter variables are simple counters that cannot be referenced
User-defined variables are quite simple. They will provide you with continuous numbering but that is all. You cannot "refer" to them with variables in references like "See Figure XX". See Figure and table counters for instructions on how to create referencing counters for figures and tables.
Counter variables are not supported in the TOC
Because of the way that counter variables are processed, you can only use them in the body of your topic texts. If you use them in the table of contents (TOC) the counters will be incorrect. This is because the TOC is processed separately from the topic files. Since the counter variables can only be incremented when they are processed, this means that all counter variables in the TOC will be processed, and then the counter variables in the topics. This means that it is impossible for the count to proceed logically from a variable in the TOC to the same variable in one of the topics.
You might then assume that you can use counter variables in the TOC if they are only used there, but that also won't work. The reason for this is that in some circumstances it is quite possible for the TOC to be processed multiple times when you publish your project. If this happens, the values of the variables will be incremented every time the TOC is processed.
|