Date: Tue, 10 May 2011 10:28:32 -0700
Reply-To: "Jfh@alumni.stanford.org" <jfh@STANFORDALUMNI.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Jfh@alumni.stanford.org" <jfh@STANFORDALUMNI.ORG>
Subject: Re: Titles with unicode symbols and SAS/Graph
In-Reply-To: <BANLkTi=rjhyz7==Socjqwb7Ja90zAm57+Q@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Perhaps if you create a custom style that doesn't display what you don't want?
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
John Hendrickx <john2.hendrickx@GMAIL.COM> wrote:
Hi Ya, That would work for RTF. The thing is, I want to create an rtf and an pdf version of all my results. If I use a title then it will also appear in the pdf file. Here's a slightly more accurate version of what I'm trying to do. Data is at http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#gpldtpt1-ex.htm ods _all_ close; ods pdf file=c:\test1.pdf' startpage=no style=Journal bookmarklist=hide pdftoc=1; ods tagsets.rtf file='c:\test1.rtf' startpage=no style=Journal startpage=no ; ods escapechar='^'; title1 "Dow Jones Yearly Highs ^{unicode 20AC}"; title; symbol1 interpol=join value=dot; data _null_; file print; put "Dow Jones Yearly Highs in ^{unicode 20AC}"; run; proc gplot data=stocks; plot high*year / haxis=1955 to 1995 by 5 vaxis=0 to 6000 by 1000 hminor=3 vminor=1 vref=1000 3000 5000 lvref=2; run; quit; ods _all_ close; 2011/5/10 Ya Huang <ya.huang@amylin.com> > John, > > Try bodytitle and nogtitle: > > ods rtf file="c:\temp\junk.rtf"
bodytitle nogtitle; > ods escapechar='^'; > > goptions reset=all dev=sasemf; > > title "Dow Jones Yearly Highs in ^{unicode 20AC}"; > proc gchart data=sashelp.class; > vbar weight; > run; > > title "Second page ^{unicode 20AC}"; > proc gchart data=sashelp.class; > vbar age; > run; > > ods rtf close; > > bodytitle make sure the title is in the body part of the > document, not in the header section. nogtitle make sure > title is separated from the graph, which means title now > is part of the regular ods and embeded style can work now. > The above code did not use startpage=no and datastep, yet > you get the unicode character in the title for both of the > two pages. > > HTH > > Ya > > On Tue, 10 May 2011 14:46:12 +0200, John Hendrickx > <john2.hendrickx@GMAIL.COM> wrote: > > >What scourge for cluelessness can the dark monarchy afford the bozo > >programmers at SI who FINALLY implemented unicode for SAS/Graph in 9.2 but > >using a totally different syntax than the rest of SAS?"
^{unicode 20AC}" > in > >a title statement won't work ('^' is the ods escapechar), you have to > resort > >to something like > >FOOTNOTE "Sales plot - all values in " FONT="Arial/unicode" '20AC'x; > >(See > > > http://support.sas.com/kb/31/addl/fusion_31477_1_enhancementsandnewfeatures > insas92robertallison.pdf > >). > > > >A workaround is to use ods pdf with startpage=no and to preceed the > >SAS/Graph procedure by a data _null_ statement and use put. > > > >data _null_; > > file print; > > put "Dow Jones Yearly Highs in ^{unicode 20AC}"; > >run; > > > >proc gplot data=stocks; > > plot high*year / haxis=1955 to 1995 by 5 > > vaxis=0 to 6000 by 1000 > > hminor=3 > > vminor=1 > > vref=1000 3000 5000 > > lvref=2; > >run; > > > >This works fine for a single graph per page, using ods pdf and > startpage=no. > >If you add a second graph, the text in the put statement will be placed > too > >high. A workaround for this is to add some blank lines, e.g. put //// "Dow > >Jones Yearly
Highs
in ^{unicode 20AC}"; > > > >This doesn't work as well for RTF output though. In that case, the text is > >written as a table with borders as in the specified style. > > > >Does anyone have a better solution to this problem (other than chucking > >SAS)? And does anyone know of a way to output the text in PDF and RTF at > the > >same time, but without the borders in the RTF output? > > > >John Hendrickx >
|