Adding "high-light" annotation escape code
s.r.chinn
I have been using somewhat complicated Textbox annotations in graphs, and would like to emphasize certain local sections. Text color or bold font codes don't do what I would prefer. Would it be feasible to add an escape code that would highlight the local character-sized background of subsequent characters (until it is disabled)? Ideally the selected high-light color alpha could be set as well. This would be similar to the high-light editing feature on Adobe pdf text. I'm presently using IP8 on Windows 10.
Dare I ask ... Have you considered using LaTeX to create an image of the annotation that you then overlay on the graph?
July 17, 2018 at 04:53 am - Permalink
In reply to Dare I ask ... Have you… by jjweimer
I am trying to simplify updating of the Textbox by liberal use of dynamic global variables \{ }, and I want to avoid further manipulation tasks. If you can convince me that LaTeX can be applied easily and automatically, I might consider it.
July 17, 2018 at 07:00 am - Permalink
In reply to I am trying to simplify… by s.r.chinn
Ha! There is a serious level of convincing for me to do no doubt.
First, I can only promise it will be 'easy' on macOS with LaTeXiT. Secondly, I cannot promise anything automatic. The use of dynamic variables kills it here.
In any case, I might wonder whether you could trick the system in this way:
* create an image that is an appropriately colored line appropriately sized (e.g. 2 characters wide by 14pt high)
* use \$PICT$ to insert the image before and after the region to be highlighted
Otherwise, I agree with the suggestion you made. A textbox has a /B flag for the entire line. We could use an equivalent \b(r,g,b) escape code to use in the text line.
July 17, 2018 at 07:44 am - Permalink
Igor 8 has native TeX support see
DisplayHelpTopic "Igor TeX"
July 17, 2018 at 04:26 pm - Permalink
In reply to Igor 8 has native TeX… by thomas_braun
Thanks all for the suggestion regarding TeX. I looked at the help links, but they seemed focused on equation and symbol formatting. Can you provide a basic building-block example of displaying a sequence of colorized blank (empty character) spaces? (I would prefer not to have to create a customized PICT for each high-lighted character string.)
July 23, 2018 at 04:41 am - Permalink
I've looked into Tex but that seems to be difficult in getting colored. How about unicode then?
TextBox/C/N=text0/F=0 "\\[0\\K(65535,43690,0)\\[1▉\\]0\\K(0,0,0)\\X1a"
The box is U+2589 found on http://www.alanwood.net/unicode/block_elements.html.
July 25, 2018 at 02:59 am - Permalink
In reply to I've looked into Tex but… by thomas_braun
Thanks, Thomas. That is an excellent suggestion. On an initial test with a multi-character text string, it appears that some fine tweaking may be required, possibly with restriction to a mono-spaced text font and/or the unicode block element description (e.g. U+2588). There are presently problems with text non-overlap and high-lighting gaps.
Addendum:
TextBox/C/N=text0/F=0 "\\F'Consolas'\\[0\\K(65535,65535,0)\\[1█████████████████\\]0\\K(0,0,0)\\X1abcd1234MMMnnnWoW"
This uses the full-block U+2588, with mono-spaced font. The end result looks good, but the process is labor intensive.
Addendum 2 (an actual example of manual post-editing an existing Textbox):
"Modify Annotation" GUI entry:
Output Optical Energy = \[0\K(65535,65535,0)\[1█████\K(0,0,0)\X1\{string1}
\{string1} is a dynamic global string variable with known 5-character numeric width. See the snipped picture of the actual graph textbox portion attached below
July 25, 2018 at 03:50 am - Permalink
Couldn't you generate a global string with the correct number of boxes and refer to that in the textbox as well?
August 2, 2018 at 02:58 pm - Permalink
In reply to Couldn't you generate a… by thomas_braun
Yes, there are a lot of options.If generating the Annotation from within an Igor function I have written a small utility function that examines the length of a global string, generates the correct number of special characters, and combines them in a large annotation string. Even there, there are more general issues if the number of hi-lite boxes should be less than than the full string length. Unless WaveMetrics can add a special hi-lite escape code, using your basic technique will have to be adapted for each user's special demands. (lsrmvn/s.r.chinn)
August 3, 2018 at 06:43 am - Permalink