In addition to the built-in substitutions, AddMenu allows the user to specify additional text substitutions using the #subs marker with a specified file. The author uses a .txt file although any file type could be used. Each substitution requires two lines in that file: The first gives the text that will be replaced. The second gives what that the text will be replaced by.
Lets illustrate with two examples.
The following file could be used to specify these substitutions:
Java <b>Java</b> (@ <span class="blue"> @) </span>
If that file is named AddMenuSubs.txt, then the following marker would be used to invoke it some place before it actually used.
#subs AddMenuSubs.txt
Then the source code
AddMenu is written Java because Java can be used on most computers. <br><br> (@This text is blue@) and this is (@some more blue text@)
would be replaced by
AddMenu is written <b>Java</b> because <b>Java</b> can be used on most computers. <br><br> <span class="blue">This text is blue</span> and this is <span class="blue">some more blue text</span>.
Assuming the style "blue" is defined properly, a browser would displayed this as
A #subs marker can be used as many times as desired in the source file. Each time it is used, all the previous user supplied substitutions are removed before the new ones are added. Moreover, using #subs without a file name just removes all existing user defined substitutions. Together, this allows using a different set of substitutions in different parts of a file and no substitutions in other parts. (In fact, #subs markers were used while writing the source file for this page to show the above result and make this sentence blue.)
Notes:
Revised 12/15/2019 21:30.
Questions, suggestions or comments: James Brink