Valid in: | Anywhere |
Category: | ODS: Output Control |
Restrictions: | Affects all open destinations except for the LISTING
destination.
|
@
, ^
, or \
.
~
, *
, or #
can also be used. The \
is a special RTF character. Therefore, it is recommended
that you use an escape character other than \
for RTF output.
There is no default value for the escape character, but
you can use the special escape sequence (*ESC*)
in the same way as an escape character. The special escape sequence (*ESC*)
cannot be used in nested functions.
title "test of ^{super ^{style [color=red] red ^{style [color=green] green} and ^{style [color=blue] blue }formatting }} and such" ;
title 'Roman Numeral twelve is ^{unicode 216b}';
set $unicodeMap["ALPHA" ] "03B1"; set $unicodeMap["BETA" ] "03B2"; set $unicodeMap["DAGGER" ] "2020";
proc template; %inc "core.tpl"; run;The modified tagset is stored in the first writable template store in your ODS path. See Concepts: Markup Languages and the TEMPLATE Procedure for more information about PROC TEMPLATE and using tagsets.
ods escapechar="^"; ods html file='file.html'; ods pdf file='file.pdf'; ods rtf file='file.rtf'; data _null_; file print; put @1 '^{style [fontsize=8pt] ^{style [fontface=courier] ^{style [fontweight=bold]}}}' 'AAA'; put +5 '^{style [fontsize=8pt] ^{stylefontface=courier] ^{style [fontweight=bold]}}}' 'BBB'; run; ods _all_ close;The line size needed for printed output is three characters. However the inline formatting information is also counted as part of the line size, even though that count only affects the appearance of the output. This increased line size can cause the text to wrap if it exceeds the current value of the LINESIZE= system option.
data italic; x='This font is ^{style[fontstyle=italic]italic}.'; output; run; ods pdf file="italicFont.pdf"; ods escapechar='^'; proc print data=italic; run; ods _all_ close;
You must use Print Preview to view the resolved LASTPAGE function output that is generated by the TAGSETS.RTF destination.
When the \ character is specified as the ODS ESCAPECHAR character, the PAGEOF function will not be interpreted properly for the TAGSETS.RTF destination. Instead, specify a different escape character.
You can use the PAGEOF function only with the RTF and TAGSETS. RTF destinations. You must use Print Preview to view the resolved PAGEOF function output that is generated by the TAGSETS.RTF destination.
The \ is a special RTF character. The { and } are special function characters. When you use these special characters with the RAW function, ODS might generate unexpected output.
^{style rowheader [color=red] my text};or
^{style rowheader my text};
^{style [color=red] my text};
ods pdf text='^{style
[fontweight=bold] BOLDED} ^{sub a} NOT bolded}'
You can nest inline styles. The following example illustrates
nesting inline styles. For an explanation
of nesting styles, see Inline Style Attributes and Nesting.
The PRINTER destination does not recognize nesting of the SUB function. The subscript-value must immediately follow the SUB function.
Nesting of the SUPER function is not recognized by the PRINTER destination. The subscript-value must immediately follow the SUPER function.
You must use Print Preview to view the resolved THISPAGE function output that is generated by the TAGSETS.RTF destination.
PostText = " ^{leaders . } ^{tocentrypage}"
X
. The X
specifies that the value in quotes is a hexadecimal
value. This quoted value must be an actual four-place hexadecimal
Unicode value or one of the names listed in the Base.Template.Tagsets
template. For example, 03B2 is the Unicode value for the Alpha symbol.
For details
about Unicode values, see Using Unicode Symbols.The unicode-value can be enclosed with single or double quotes.
Features: |
|
Other features: |
OPTIONS statement PROC PRINT TITLE statement |
options nodate nonumber;
ods html close;
ods escapechar="^";
ods rtf file="rtfInlinFuncs.rtf"; ods pdf file="pdfInlinFuncs.pdf";
title "Examples of Inline Formatting Functions";
title2 'Example of ^{nbspace 3} Non-Breaking Spaces Function';
title3 'Example of ^{newline 2} Newline Function';
title4 'Example of ^{raw \cf12 RAW} RAW function';
title5 'Example of ^{unicode 03B1} UNICODE function';
title6 "Example ^{style [foreground=red] of Super, Alpha ^{super ^{unicode ALPHA} ^{style [foreground=green] Nested}} Formatting} and Scoping";
title7 "Example of SUB, ^{sub ^{style [foreground=red] red ^{style [foreground=green] green } and ^{style [foreground=blue] blue styles }}} and SIGMA Functions";
proc print data=sashelp.class(obs=4); run;
ods _all_ close;
title6 "Example ^{style [foreground=red] of Super, Alpha ^{super ^{unicode ALPHA} ^{style [foreground=green] Nested}} Formatting} and Scoping";
title7 "Example of SUB, ^{sub ^{style [foreground=red] red ^{style [foreground=green] green } and ^{style [foreground=blue] blue styles }}} and SIGMA Functions";
title6
because of where it is nested. The PDF destination does not recognize
the SUB function properly because the subscript-value does not immediately
follow the SUB function.