<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic italicize a single character and superscript the next character for a column header ODS RTF in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/italicize-a-single-character-and-superscript-the-next-character/m-p/493296#M21640</link>
    <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to show one of my column headers as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="h2.png" style="width: 74px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23071iB2AB1F4B4911AE4A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="h2.png" alt="h2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where h is&amp;nbsp;italicized, and 2 is not italicized and in superscript. This symbol is commonly used to mean heritability estimate in genetic studies.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ended up trying a mixture of RTF control words &lt;STRONG&gt;/i&lt;/STRONG&gt; and &lt;STRONG&gt;^{sup 2}&lt;/STRONG&gt; to get the italic effect and to mark 2 in superscript. But I am able to just italicize h. It is not clear to me how to end the RTF effect. I&amp;nbsp;haven't find a reference that uses ^{ } to italicize characters but it would be great if this is possible. The RTF control words appear to apply&amp;nbsp;an effect to every character within the quote. But what I need is&amp;nbsp;different effects on different characters.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have built a macro for writing repetitive &lt;STRONG&gt;DEFINE &lt;/STRONG&gt;column / display&lt;STRONG&gt;&amp;nbsp;"header"&lt;/STRONG&gt;&amp;nbsp; for me. It has been working well. My column headers are shown in the cName= option when the macro is called.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my macro:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro def_display(	cVar=			/*character variable*/	
					,cName=						/*name of the character variable*/	
					,isFmt=N						/*apply a format to the variable or not*/	 
					,cFmt=							/*which format*/	
					,cWide=25pt				/*cell width*/
					,headerAlign=center 	/*alignment of header text in a column: left, center, right*/
					,colAlign=right 			/*alignment of content in a column: left, center, right, d (decimal point) */
					,marginRight=0
					,background=white 		/*color of background in a column*/
					,foreground=black		/*color of foreground (i.e. font color) in a column*/
					);

	define	&amp;amp;cVar.	/	display	"&amp;amp;cName." 	
		%if &amp;amp;isFmt.=Y %then 
			%do;
					format= &amp;amp;cFmt.
					style(header)={just=&amp;amp;headerAlign.}
					style(column)={just=&amp;amp;colAlign. cellwidth= &amp;amp;cWide. rightmargin=&amp;amp;marginRight. background=&amp;amp;background. foreground=&amp;amp;foreground.};
			%end;
		%else	
			%do;
					style(header)={just=&amp;amp;headerAlign.}
					style(column)={just=&amp;amp;colAlign. cellwidth= &amp;amp;cWide. rightmargin=&amp;amp;marginRight. background=&amp;amp;background. foreground=&amp;amp;foreground.};
			%end; 
%mend def_display;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the macro is called as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%def_display(	cVar=h2_liab ,		cName=\i h \sup 2,	 cWide=1 cm,	headerAlign=right, colAlign=right);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It gives a h2 header as this output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS_ODS_RTF_h2.png" style="width: 340px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23072i16BAB1552F038044/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS_ODS_RTF_h2.png" alt="SAS_ODS_RTF_h2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the macro is called as :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%def_display(	cVar=h2_liab ,		cName=\i h ^{sup 2},	 cWide=1 cm,	headerAlign=right, colAlign=right);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It gives an output as&amp;nbsp;:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS_ODS_RTF_h2_2.png" style="width: 329px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23073i9C4993C22EAB19B4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAS_ODS_RTF_h2_2.png" alt="SAS_ODS_RTF_h2_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise if it is possible to mark my header as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="h2.png" style="width: 74px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23074i6A4C1C08FDB443BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="h2.png" alt="h2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Sep 2018 07:04:24 GMT</pubDate>
    <dc:creator>Chang</dc:creator>
    <dc:date>2018-09-07T07:04:24Z</dc:date>
    <item>
      <title>italicize a single character and superscript the next character for a column header ODS RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/italicize-a-single-character-and-superscript-the-next-character/m-p/493296#M21640</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to show one of my column headers as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="h2.png" style="width: 74px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23071iB2AB1F4B4911AE4A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="h2.png" alt="h2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where h is&amp;nbsp;italicized, and 2 is not italicized and in superscript. This symbol is commonly used to mean heritability estimate in genetic studies.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ended up trying a mixture of RTF control words &lt;STRONG&gt;/i&lt;/STRONG&gt; and &lt;STRONG&gt;^{sup 2}&lt;/STRONG&gt; to get the italic effect and to mark 2 in superscript. But I am able to just italicize h. It is not clear to me how to end the RTF effect. I&amp;nbsp;haven't find a reference that uses ^{ } to italicize characters but it would be great if this is possible. The RTF control words appear to apply&amp;nbsp;an effect to every character within the quote. But what I need is&amp;nbsp;different effects on different characters.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have built a macro for writing repetitive &lt;STRONG&gt;DEFINE &lt;/STRONG&gt;column / display&lt;STRONG&gt;&amp;nbsp;"header"&lt;/STRONG&gt;&amp;nbsp; for me. It has been working well. My column headers are shown in the cName= option when the macro is called.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my macro:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro def_display(	cVar=			/*character variable*/	
					,cName=						/*name of the character variable*/	
					,isFmt=N						/*apply a format to the variable or not*/	 
					,cFmt=							/*which format*/	
					,cWide=25pt				/*cell width*/
					,headerAlign=center 	/*alignment of header text in a column: left, center, right*/
					,colAlign=right 			/*alignment of content in a column: left, center, right, d (decimal point) */
					,marginRight=0
					,background=white 		/*color of background in a column*/
					,foreground=black		/*color of foreground (i.e. font color) in a column*/
					);

	define	&amp;amp;cVar.	/	display	"&amp;amp;cName." 	
		%if &amp;amp;isFmt.=Y %then 
			%do;
					format= &amp;amp;cFmt.
					style(header)={just=&amp;amp;headerAlign.}
					style(column)={just=&amp;amp;colAlign. cellwidth= &amp;amp;cWide. rightmargin=&amp;amp;marginRight. background=&amp;amp;background. foreground=&amp;amp;foreground.};
			%end;
		%else	
			%do;
					style(header)={just=&amp;amp;headerAlign.}
					style(column)={just=&amp;amp;colAlign. cellwidth= &amp;amp;cWide. rightmargin=&amp;amp;marginRight. background=&amp;amp;background. foreground=&amp;amp;foreground.};
			%end; 
%mend def_display;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the macro is called as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%def_display(	cVar=h2_liab ,		cName=\i h \sup 2,	 cWide=1 cm,	headerAlign=right, colAlign=right);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It gives a h2 header as this output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS_ODS_RTF_h2.png" style="width: 340px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23072i16BAB1552F038044/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS_ODS_RTF_h2.png" alt="SAS_ODS_RTF_h2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the macro is called as :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%def_display(	cVar=h2_liab ,		cName=\i h ^{sup 2},	 cWide=1 cm,	headerAlign=right, colAlign=right);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It gives an output as&amp;nbsp;:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS_ODS_RTF_h2_2.png" style="width: 329px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23073i9C4993C22EAB19B4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAS_ODS_RTF_h2_2.png" alt="SAS_ODS_RTF_h2_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise if it is possible to mark my header as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="h2.png" style="width: 74px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23074i6A4C1C08FDB443BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="h2.png" alt="h2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 07:04:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/italicize-a-single-character-and-superscript-the-next-character/m-p/493296#M21640</guid>
      <dc:creator>Chang</dc:creator>
      <dc:date>2018-09-07T07:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: italicize a single character and superscript the next character for a column header ODS RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/italicize-a-single-character-and-superscript-the-next-character/m-p/493539#M21649</link>
      <description>&lt;P&gt;ODS would look something like ^{style[fontstyle=italic]h}^{sup 2}&lt;/P&gt;
&lt;P&gt;If the 2 comes out italic then try ^{style[fontstyle=italic]h}^{style[fontstyle=roman]sup 2}&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 16:21:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/italicize-a-single-character-and-superscript-the-next-character/m-p/493539#M21649</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-07T16:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: italicize a single character and superscript the next character for a column header ODS RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/italicize-a-single-character-and-superscript-the-next-character/m-p/493550#M21651</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I found that it worked better if I used the unicode instruction for superscript 2:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="unicode_super.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23094i15242FC5E971F15D/image-size/large?v=v2&amp;amp;px=999" role="button" title="unicode_super.png" alt="unicode_super.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 16:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/italicize-a-single-character-and-superscript-the-next-character/m-p/493550#M21651</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-09-07T16:40:09Z</dc:date>
    </item>
  </channel>
</rss>

