LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 7 Dec 2005 12:13:16 -0500
Reply-To:   "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Subject:   Re: 9.1 multiple spaces in footnote using ODS HTML
Comments:   To: sas-l@uga.edu

clanning345@gmail.com wrote: > I want this to work. It worked in 8.2: > > ods html body='c:\test.html'; > footnote 'Hello &nbsp&nbsp&nbsp There'; > data stuff; > input x; > cards; > 1 > ; > run; > > proc print; > run; > ods html close; > > The problem is that 9.1 is converting my "&nbsp" to "&amp;nbsp". How > do I tell SAS 9.1 to not convert it? > > Thanks, > Chris

The operative feature you want is PROTECTSPECIALCHARS See http://support.sas.com/techsup/unotes/SN/013/013433.html

For the HTML destination, when a title or footnote begins and ends with an HTML tag, the contents of the title or footnote are automatically processed with PROTECTSPECIALCHARS=off. ------------------------------------ ods html file="%sysfunc(pathname(WORK))\myreport.html" style=sasweb ;

proc print data=sashelp.class ; footnote1 "This is footnote 1"; footnote2 '<SPAN>This is &nbsp;&nbsp;&nbsp;&nbsp; footnote 2</SPAN>'; footnote3 "<DIV>This is <SPAN style='width:3in'></SPAN>footnote 3</DIV>"; footnote4 'This is &nbsp; footnote has its special chars escaped which are thus rendered via HTML entities'; run;

ods html close; ------------------------------------

For the procedures PRINT, REPORT and TABULATE there are STYLE(location) options for selectively setting SAS styling options (which includes PROTECTSPECIALCHARS) for locations such as column headers, data, bylines, etc... The procedures don't allow for specification of selective stylizing of titles and footnotes, and thus the usage note 013433 solution.

Perhaps a future release will see TITLE and FOOTNOTE having a slash option for styling ? TITLE 'This and&nbsb;&nbsp;&nbsb;&nbsb;&nbsb;&nbsb;&nbsb;That' / style={protectspecialchars=off};

The selective setting of styling elements at 'source code' or 'proc' level override the corresponding setting that is initially prepared in the style template (which can be called out using the STYLE= option of the ODS statement that opens a destination)

-- Richard A. DeVenezia http://www.devenezia.com/


Back to: Top of message | Previous page | Main SAS-L page