For the ENTRY, ENTRYTITLE,
and ENTRYFOOTNOTE statements, the default font attributes are determined
by the active ODS style. To change the default font attributes, you
can use the TEXTATTRS= option, which has the following syntax (see
General Syntax for Attribute Options for the syntax
on using a
style-element and
Text Options for available
text-options):
TEXTATTRS=style-element | style-element(text-options) |
(text-options)
For example, the following
ENTRYTITLE statement uses prefix options to create this title line:
entrytitle textattrs=(color=black) "Center"
textattrs=(color=red) " Text"
halign=right textattrs=(color=black size=10pt) "Right "
textattrs=(color=red size=10pt) "side"
halign=left
textattrs=(color=black style=italic size=10pt) "Left"
textattrs=(color=red style=italic size=10pt) " side";
-
The TEXTATTRS= options are reset
each time a new TEXTATTRS= appears—there is no “carry
over” or accumulation of the settings.
-
Blanks (spaces) must be provided
as needed to achieve the desired concatenation. If you are concatenating
dynamics that are stripped of leading and trailing blanks, you might
need to introduce a literal space to separate them, as shown in the
following example:
Alternatively, you
can specify font attributes by overriding style element defaults.
The following specification overrides the settings of the GraphTitleText
style element, which sets the default attributes for ENTRYTITLE text:
entrytitle
halign=left
textattrs=GraphTitleText(color=black style=italic) "Left"
textattrs=GraphTitleText(color=red style=italic) " side"
halign=center
textattrs=(color=black) "Center"
textattrs=(color=red) " Text"
halign=right
textattrs=GraphTitleText(color=black weight=bold) "Right "
textattrs=GraphTitleText(color=red weight=bold) "side" ;
You can also use dynamics
in the
text-items. In the following
ENTRYTITLE statement, assume that _DEPLABEL and _MODELLABEL are dynamics
that are specified on PROC TEMPLATE’s DYNAMIC statement:
entrytitle "Residual by Predicted for " _DEPLABEL
halign=left textattrs=GraphTitleText _MODELLABEL /
pad=(bottom=5);
-
The default style element for ENTRYTITLE
is GraphTitleText, so all three text items (one literal and two dynamics)
get these font properties as a starting point.
-
The text
"Residual
by Predicted for " _DEPLABEL is center-aligned
by default.
-
The prefix options HALIGN= and
TEXTATTRS= override the center alignment and font properties for the
text _MODELLABEL.
Notice that this could
have been coded as follows:
entrytitle halign=left
textattrs=GraphTitleText _MODELLABEL
halign=center textattrs=()
"Residual by Predicted for " _DEPLABEL;
In this example, the
second HALIGN= and TEXTATTRS=() were necessary to reset alignment
and font properties to their defaults.
Note that the string
length of the resolved dynamic _MODELLABEL does not affect the placement
of the center-aligned text.