|
|
楼主

楼主 |
发表于 2009-3-13 13:02:15
|
只看该作者
产生的RTF有问题 请教如何解决
[code:1nholnho]proc format library=work ;
value greek
1 = '61'x /* Lowercase Alpha */
2 = '62'x /* Lowercase Beta */
3 = '63'x /* Lowercase Chi */
4 = '6c'x /* Lowercase Lambda */
5 = '71'x /* Lowercase Theta */
other = 'A5'x /* Infinity */ ;
value greekx /* Used to help understand the results */
1 = 'ALPHA'
2 = 'BETA'
3 = 'CHI'
4 = 'LAMBDA'
5 = 'THETA'
other = 'INFINITY' ;
run ; quit ;
ods escapechar = "?" ;
data work.test ;
do Unformatted = 1 to 6 ;
* Insert the Greek symbol into a variable value, along with escape character and the font required ;
Special_Var = 'Special character ' !!
trim(put(unformatted,greekx.)) !!
' "?S={font_face=symbol}' !!
trim(put(unformatted,greek.)) !!
'?S={ }" in Data Values' ;
output ;
end ;
run ;
ods listing close ;
ods rtf file = 'c:\Special_Characters.rtf' ;
title font="Times New Roman" 'Special character Infinity "'
font="Symbol" 'A5'x
font="Times New Roman" '" in Title' ;
proc report data=work.test nowd ;
column unformatted unformatted=Greekx unformatted=Greek Special_Var ;
define unformatted / 'Unformatted/Value' ;
define Greekx / 'Symbol' format=greekx. ;
define Greek / 'Greek/Character' format=greek.
style(column)={font_face=Symbol} ;
* To insert a symbol into a label, the LABEL statement must be used, rather than a DEFINE statement. The label must be one continuous string and should not contain any line breaks, but it may appear that it does in this document ;
label special_var='Special character /Infinity "?S={font_face=Symbol}'"A5"x'?S={ }" /in Variable Label' ;
run ;
proc tabulate data=work.test ;
class special_var ;
var unformatted ;
table special_var,
(unformatted='Greek Symbol' * [style=[font_face=symbol]]
* f=greek. * sum=' ') ;
* The label must be one continuous string and should not contain any line breaks, but it may appear that it does in this document ;
label special_var = 'Special character Infinity ?S={font_face=symbol}'"A5"x'?S={ } in Variable Label' ;
run;
ods rtf close ;
ods listing ;
[/code:1nholnho]
产生的RTF有问题 请教如何解决 |
|