1.
就是ESCAPECHAR的使用
可以用(*ESC*)代替,作用等同於escapechar=

title1 "~R/RTF'\brdrb\brdrhair'"; title2 "(*ESC*)R/RTF'\brdrb\brdrhair'"; title3 'This value is superscripted^{super 2} '; title4 'This value is superscripted(*ESC*){super 2} ';
title1和title2等價
title3和title4等價
如果title1和2中那種插入下划線形式無效,可使用下述形式。


2.

上述意思是使用escapechar時候,不要使用/符號,因為/是個特殊的RTF character。


R是原始文本函數,/RTF指定只在RTF中生效。上述的^可以使用(*ESC*)代替。

| Style |
RTF Control Word | Example Code |
|---|---|---|
| Italicize | \i | title '\i italicized title'; |
| Underline | \ul | title '\ul underline title'; |
| Double underline | \dul | title '\dul title'; |
| New line | \line | title 'this is the first \line this is the second '; |
| Bullet | \bullet | title '\bullet bullet preceding title'; |
| Emboss | \embo | title '\embo embossed title'; |
| Engrave | \impr | title '\impr engraved title'; |
| Subscript | \sub | title 'This is a subscript T\sub 1'; |
| Superscript | \super | title 'This is a subscript T\super 2'; |
| Outline | \outl | title '\outl This is outlined'; |
| Shadow | \shad | title '\shad This is shadowed'; |
| Strike | \strike | title '\strike This is striked'; |
| double strike | \strikedl | |
| dotted underline | \uld | title '\uld dotted underline'; |
| Wave underline | \ulw | title '\ulw wave underline'; |
| Thick underline | \ulth | title '\ulth thick underline'; |
| foreground color | \cfn | title '\cf2 foreground color'; |
| Font size in half points | \fs24 | title '\fs40 fonts increased'; |
| Highlight | \highlightN | title '\highlight2'; |
| Bold | \b | title '\b bold title'; |
| Left aligned | \ql | title '\ql left aligned. |
| Right aligned | \qr | title '\qr right aligned. |
| centered | \qc | title '\qc left aligned. |
用Notepad打開RTF文件,即可查看源碼
data a; a='aa~\line cc';
d1 = "(*ESC*)R/RTF'\i\b value value";
d2 = "(*ESC*)R/RTF'{\super value} value";*{之前的叫原始文本插入,這只有第一個value被打上格式,/RTF說只在rtf格式中生效; run;
這是所有RTF標記的方法:Appendix B: Index of RTF Control Words,Document Formatting Properties
