I have below code and output the figure in RTF. Some Chinese characters are truncated in the legend but all English characters are showed. Is there anything wrong with the template? Thanks. %macro RTF_Template2(escapechar=@,_StFont=Courier New, _nbpt=8 ); %global line line2 tablestyle liststyle graphstyle lastfootnote1 lastfootnote2 lastfootnote3; %*--------------------------------------------------------------------------*; %* Step 01: Macro Variables for table display *; %*--------------------------------------------------------------------------*; %let line="&escapechar.R/RTF'\fs0\brdrb\brdrs\brdrw20"; %let line2=%str(&escapechar.R/RTF%'\fs0\brdrb\brdrs\brdrw10); /* font for table and listing */ %let tablestyle=kltnr_8_uk; %let liststyle=kltnr_8_uk; %let graphstyle=kltnr_9_uk; %*--------------------------------------------------------------------------*; %* Step 02: define fonts for tables and listings *; %*--------------------------------------------------------------------------*; *****fonts for tables; ods path work.templat(update) sasuser.templat(read) sashelp.tmplmst(read); ***** define rtf template; proc template; define style styles.kltnr_9_uk; parent=styles.rtf; replace fonts/ 'TitleFont'= ("&_StFont", &_nbpt.pt) 'TitleFont2'= ("&_StFont", &_nbpt.pt, Bold) 'FixedFont'= ("&_StFont", &_nbpt.pt, Bold) 'StrongFont'= ("&_StFont", &_nbpt.pt, Bold) 'docFont'= ("&_StFont", &_nbpt.pt) 'footFont'=("&_StFont", &_nbpt.pt) 'EmphasisFont' = ("&_StFont", &_nbpt.pt,normal) 'headingFont' = ("&_StFont", &_nbpt.pt) 'headingEmphasisFont' = ("&_StFont", &_nbpt.pt) 'FixedEmphasisFont' = ("&_StFont", &_nbpt.pt) 'FixedStrongFont' = ("&_StFont", &_nbpt.pt) 'FixedHeadingFont' = ("&_StFont", &_nbpt.pt) 'BatchFixedFont' = ("&_StFont", &_nbpt.pt); replace color_list / 'link' = blue 'bgH' = white 'fg' = black 'bg' = white; replace body from Document/ bottommargin=1.26in topmargin=1.26in rightmargin=2in leftmargin=2in; style table from output/ frame = void rules = groups cellpadding = 1 cellspacing=0 borderwidth=0 outputwidth=100%; style table from container/ frame=void rules=groups cellpadding=.4pt cellspacing=0pt borderwidth=.4pt asis=on; /* style table/*/ /* frame=hsides*/ ; class GraphFonts "Fonts used in graph styles" / 'GraphDataFont' = ("&_StFont",&_nbpt.pt, demi_bold) 'GraphValueFont' = ("&_StFont",&_nbpt.pt, demi_bold) 'GraphLabelFont' = ("&_StFont",&_nbpt.pt, demi_bold) 'GraphFootnoteFont' = ("&_StFont",&_nbpt.pt, demi_bold) 'GraphTitleFont' = ("&_StFont",&_nbpt.pt, demi_bold) 'GraphAnnoFont' = ("&_StFont",&_nbpt.pt, demi_bold) 'GraphUnicodeFont' = ("&_StFont",&_nbpt.pt, demi_bold) 'GraphLabel2Font' = ("&_StFont",&_nbpt.pt, demi_bold) 'GraphTitle1Font' = ("&_StFont",&_nbpt.pt, demi_bold) 'NodeTitleFont' = ("&_StFont",&_nbpt.pt, demi_bold) 'NodeLabelFont' = ("&_StFont",&_nbpt.pt, demi_bold) 'NodeInputLabelFont'= ("&_StFont",&_nbpt.pt, demi_bold) 'NodeDetailFont' = ("&_StFont",&_nbpt.pt, demi_bold); style GraphData1 from GraphData1 / markersymbol = "circle" linestyle=1; style GraphData2 from GraphData2 / markersymbol = "Asterisk" linestyle=2; style GraphData3 from GraphData3 / markersymbol = "triangle" linestyle=20; style GraphData4 from GraphData4 / markersymbol = "square" linestyle=33; style GraphData5 from GraphData5 / markersymbol = "X" linestyle=41; style GraphData6 from GraphData6 / markersymbol = "Star" linestyle=5; style GraphData7 from GraphData7 / markersymbol = "Diamond" linestyle=8; style GraphData8 from GraphData8 / markersymbol = "circlefilled" linestyle=28; style GraphData9 from GraphData9 / markersymbol = "Plus" linestyle=15; style GraphData10 from GraphData10 / markersymbol = "starfilled" linestyle=2; style GraphData11 from GraphData11 / markersymbol = "trianglefilled" linestyle=20; style GraphDataText/font=("&_StFont", 9pt, normal); style GraphLabelText/font=("&_StFont", 9pt, normal); style GraphValueText/font=("&_StFont", 9pt, normal); end; run; %mend; %RTF_Template2; proc format; value $sex 'F'='十分士大夫士大夫的' 'M'='fgdgdfghjfdgsdg' ; run; options device=emf ; ods rtf file="test.rtf" style=kltnr_9_uk nogtitle nogfootnote; proc sgplot data=sashelp.class; vbar age/group=sex response=height stat=mean groupdisplay=cluster limits=upper ; keylegend / title='' ; format sex $sex. ; run;
... View more