A clarification of text formatting
Origin uses escape sequences in a string that allow different ways of displaying text.
These sequences begin with the '\' character. All Text Objects (those created with the
Text Tool or the LabTalk label command) as well as text plotted from a Label
column will display according to the rules of these sequences. Here are some examples:
String
Some \b(bold) text
Some \c2(red) text
Some \i(italic) text
Appearance
Some bold text
Some red text
Some italic text
Display of a '\' character presents a problem. If an unsupported escape option or no
parenthesis follows the escape character, then the character(s) are ignored. Following
standard conventions, sequential '\\' will be interpreted as one '\':
String
C:\My Documents
C:\\My Documents
Appearance
C:My Documents
C:\My Documents
There is also the special notation to ignore escape sequences which Manfred Deicher
pointed out:
String
\v(C:\My Documents)
Appearance
C:\My Documents
Now we can look at Origin's ability to substitute the value of a string variable for
its name as well as LabTalks ability to generate text labels. In these examples, my Origin string variable percentY is equal to D:\MYORIGIN50\:
note: due to a display problem with this post the word 'percent' is used rather than the symbol for percent. If you were using the notation in script, the symbol
for percent should be used.
LabTalk Command
label -n title1 My Origin is in percentY;
label -s -n title2 My Origin is in percentY;
label -s -n title4 My Origin is in \v(percentY);
Label displays as...
My Origin is in percentY
My Origin is in D:MYORIGIN50
My Origin is in D:\MYORIGIN50\
Note that the first label did not substitute the percentY with its value (D:\MYORIGIN50\). An additional command option (-s) was needed. This is
equivalent to turming on the 'Link to Variables' check box in the Label Control of a text
object. Once substituted, the text appeared, but without the '\' characters which required
the special \v() notation.
[Note: This message was edited by Julie]