SAS中操作RTF 格式


1.

就是ESCAPECHAR的使用

SAS 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 WordsDocument Formatting Properties

SAS ESCAPECHAR_1


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM