Bug style handle inline inserts in text.
Note: if you use bug in a separate frame, then you don't need this procedure - it will flow in its frame.
A separate style is required for each bug text, since it is possible to adjust it to the text content width. For example, as 'Fashion' is shorter than 'COMMENT 123, one style cannot serve both. In each style you will have to test and adjust manually the distance, and hard-code it as the required indent.
To toggle bug in text, create a VBScript such as
ToggleBug "bug05"
and assign it to an icon in the toolbar. When you click the icon for the first time, the bug is inserted in the text. When you click it again, it is removed.
Important: the bug style will work well only if the break point of the paragraph is distant enough from the beginning and the end of the paragraph, thus use in the paragraphs that are long enough to leave at least one line above and one line below the bug.
Three hidden styles are required for this to work, and they have to be applied by a VBScript. The styles are:
STYLE |
PURPOSE |
TAGS |
COMMENT |
bug05a |
Ends the previous paragraph, and extends it to the margin, |
>qj< |
nothing to adjust here |
bug05b |
Creates the bug paragraph and contains the bug text |
>is<>ld LD<>ta CapH,1< >f 1<>hld 10pt<>small 2< COMMENT 123 >f 2<>d 20pt< >l 70pt<>under -5pt,0.5pt< >under 5pt, 0.5pt<>f 3< >h 15pt<>w W'800<ENQUIRY 2004 |
If you change the length of the COMMENT 123 line, adjust the value in >l 70pt<. |
bug05c |
Creates indent (the hole) |
>il 90pt,5<>a -LD*2<>is< |
Adjust the value in >il 90...<. |
The best way to adjust the styles bug05b and bug05c when changing the content of the bug05b, is to copy the whole code in a sample text (replacing the tags bug05b and bug05c on their respective places), and then modify parameters in >l...< and >il...< tags. The adjustment can be sort of clumsy, and it's based on error-and-trial, but it's worthwhile, because the application for users is very simple.
If you need more bug styles, create them following the naming convention for the one explained here, i.e. use bug0X as the root name, and the suffixes a, b, and c. Thus, the styles for the sixth bug should be named bug06a, bug06b, bug06c. Also, create another VBScript to load them.
GN4 does not have typographical variables that you can freely assign values to, without affecting text on the current position. If it would have them, that would solve this problem, but it does not have them. Anyhow, there's a sort of workaround, i.e. a way to assign a variable, and to read it later, without affecting text. If, in a 3 paragraph text, you do: >il 30mm<>l -IL<text1¶ text2¶ text3¶ this sets the IL variable to the 30mm, and the >l..< tag will cancel its effect in the current paragraph. Of course, this is just a half-way through, because it's not enough just to set a variable, you have to read it as well, and probably not in the same paragraph. Let's assume you want to read it in the paragraph text2. Therefore, let's change it a little bit: >il 30mm<>default<>l -IL<text1¶ >il IL<>a -LD<text2¶ text3¶ Now, since the left indent is globalized in the first paragraph, and cancelled only in that paragraph, it can be read in the second paragraph. But - unfortunately, a globalized left indent will affect the third paragraph too, and all the subsequent text! A possible solution (not elegant) would be to insert >il 0< and globalize it on the beginning of the third paragraph: >il 30mm<>default<>l -IL<text1¶ >il IL<>a -LD<text2¶ >il<>default<text3¶ Anyhow, there's a better solution, which uses a special(?) feature(?) of >il...< tag , i.e. if you set the number of lines to 0, this practically disables the indent, but still keeps the value in the memory. So: >il 30mm,0<>default<text1¶ >il IL<>a -LD<text2¶ text3¶ seems to work well, providing the indent set in the first paragraph without affecting that paragraph, keeping IL value alive and readable in any paragraph below. |