Inline Text Formatting Tags
While working within the Labeling Configuration dialog > Style tab, the Font, Size, and Color apply to the entire label. Notice in this example, the Structure ID and the Region are both Arial, Size 10, and Black.
Using the Style tab is the easiest way to control the look and feel of the label. However, on the Content tab, you can also incorporate tags to modify portions of the label.
For example, if you surround a label attribute with the <BOL> </BOL> tag, it bolds that attribute but leaves the other attributes alone.
When using tags, keep the following in mind:
-
The Esri help article Text Formatting Tags contains useful syntax rules to follow when using tags.
-
Designer XI currently supports the following tags:
-
Bold: <BOL> </BOL>
-
Color (with RGB 0–255 and alpha 0–100 attributes): <CLR> </CLR> (see below under “Tags with Additional Values” for more guidance)
-
Font (with name and scale attributes): <FNT> </FNT> (see below under “Tags with Additional Values” for more guidance)
-
Italic: <ITA> </ITA>
-
Underline: <UND> </UND>
-
-
-
Click the Apply Preview
button each time you make a change to verify it.
-
You are allowed to nest tags as long as you keep the end tags in a mirrored (or reverse) order from the begin tags. For example:
-
Correct: <UND><ITA><BOL> {attribute} </BOL></ITA></UND>
-
Incorrect: <UND><ITA><BOL> {attribute} </ITA></UND></BOL> (notice how the end tags are out of order)
-
-
If you click the Apply Preview
button, and the label renders showing the tags, something is askew in your syntax. Check the tag names and the punctuation, then try again.
Tags with Additional Values
The Bold, Italic, and Underline tags do not have any additional values. Surround your label variable with the tag, and it renders accordingly.
However, the Color and Font tags require additional values or information for the tag to render appropriately.
-
Color
-
The Color tag respects red, green, and blue values of 1–255.
-
You declare the values in the following format (the numbers are just examples):
<CLR red = "61" green = "205" blue = "88">
-
If you leave out a red, green, or blue value, it assumes “0.”
-
-
Further, the tag respects an alpha (opacity) value of 1–100.
-
You declare the value in the following format: <CLR alpha="50">
-
If you leave out the alpha value, it assumes “100” which is fully opaque (visible).
-
-
For example, <CLR red = "61" green = "205" blue = "88" alpha="50"> {name} </CLR> - {division} produces:
Notice the RGB of 61, 205, 88 produces an Emerald Green for the structure name, and the alpha of 50 reduces its visibility.
-
-
Font
-
The Font tag respects font name and font scale.
-
You declare the values in the following format (the font and scale are just examples):
<FNT name = "Rockwell" scale= "150">
-
We recommend you use the “scale” value. While this tag also accepts a “size” value, it does not re-size well when you zoom in or out.
-
-
For example, <FNT name = "Rockwell" scale= "150"> {name} </FNT> - {division} produces:
-