Email this Page Log Support Call Send Feedback Print

Previous Topic

Next Topic

Book Contents

Book Index

Using Variables and Nested Variables

Some time ago I had a question from a potential client who used a lot of formatted expressions in their documents – with lots of subscript/superscript, and changes between uppercase/lowercase. In their MS Word environment, rather than manually applying the subscript/superscript etc, they would type the expressions all in lower case (eg e=mc2) and had set up Word autocorrects to automatically apply the required formatting.

The question was asked: could Author-it do the same? My reply: YES! While Author-it may not have an autocorrect feature, it has variables that can simulate the same functionality (as well as SO much more)...

I myself have a dyslexic keyboard - where my keyboard (through no fault of mine of course) constantly mistypes the text I enter – auhtor-it instead of author-it, administartor instead of administrator, ollfine instead of offline, and so on... Of course I can pick these up quickly with a spell check, but I have another tendency of forgetting that little step. So I've created a number of variables including: <ait> (Author-it), <aa> (Author-itAdministrator) and <oa> (Offline Authoring), which not only saves me time, but also ensures the terms are spelt correctly in the first place. So while you may find the odd typo in our documentation, I bet you won't find AuhtorIT Administartor or Ollfine Auhtoring anywhere! And maybe you could call me lazy, but when I'm holding my coffee it takes me a lot longer to type as I only have one hand free!

So let's get back to our original scenario - the formatted expressions. In this case you would use nested variables, as text variables can only have one style applied to them. What are nested Variables I hear you ask? Text variables that are embedded inside other text variables. Author-it keeps on substituting variable values until everything is finally resolved, or until the information contained within the variable markers - < > - is no longer a variable that Author-it knows about.

Using our example of E=mc2 (where the E is uppercase and the 2 appears in superscript), I would create two variables:

  • <e=mc2> where the default value is 'E=mc<squared>' and the style is 'don't inherit',

    and

  • <squared> where the default value is '2' and the style is Superscript.

I can then simply drag the variable <e=mc2> into my topics – saving time and improving accuracy.

Top of Page Email this Page Log Support Call Send Feedback Print