<?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 Re: SAS ODS PDF - superscripts render incorrectly in PDF in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-ODS-PDF-superscripts-render-incorrectly-in-PDF/m-p/571471#M22958</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I found it hard to see the colors with red backgrounds, so&amp;nbsp; I simplified your code and made the background white so I could really focus on the superscripts on the "slide" text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I also simplified the data so instead of a line feed at the beginning of each line, I just made 1 obs per line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Instead of PROC PRINT I used PROC REPORT with NOHEADER so I could just see the rows without any header. This is what I came up with:&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="super_sub_PDF.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30783iA47327E69BD0C9CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="super_sub_PDF.png" alt="super_sub_PDF.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Not exactly what you showed, but I think putting the style override around the super function (instead of putting super around the style) seems to make the sizing all uniform in my output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jul 2019 17:58:04 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2019-07-05T17:58:04Z</dc:date>
    <item>
      <title>SAS ODS PDF - superscripts render incorrectly in PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-ODS-PDF-superscripts-render-incorrectly-in-PDF/m-p/571446#M22957</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When trying to format text to display in colors where I need a superscript, the superscript is always displaying low on the text line.&lt;/P&gt;&lt;P&gt;Often, depending on the color, the superscript also reverts to black as well and impacts the text color for following lines if the foreground color is not declared again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with SAS 9.4M5.&lt;/P&gt;&lt;P&gt;I am creating presentation charts in ODS PDF with titles on each page.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of the titles required by my users is to insert a quote that they want linked to a citation later in the presentation.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;They have decided to use a superscript.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The below code demonstrates the issue in Windows 10 and Base SAS and also Adobe Acrobat Reader DC.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't consistently get superscripts to work correctly.&lt;/P&gt;&lt;P&gt;If I just use the syntax ^{super 1}&amp;nbsp; I can get a superscript in black only but it does superscript.&lt;/P&gt;&lt;P&gt;However, if I want to add a style for the superscript using this syntax&amp;nbsp;"^{super^{style[foreground=green]}1}"&amp;nbsp; the superscript number is printed but no longer raised and not in the format that was requested.&amp;nbsp; The superscript always wants to print in black.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is unfortunate because I am placing white text on a black background per user requirements.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My example below is using red and white just to make it easier to see the issue.&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;ods pdf file='c:\data\temp.pdf';
ods escapechar='^';

data slide2;
length slide2text $ 2000.;
slide2text=catx(" ","^S={font_weight=medium foreground=black background=red font_size=28pt}This is a sample title black on red ",
"^S={font_weight=medium foreground=white background=red font_size=12pt}^n here is a quote that needs a superscript notation." ,
"^{super^{style[foreground=green]}1}",
"^nthis value is superscripted with style formatting ^{super^{style[background=white foreground=red]} 1} ",
"^n this value is superscripted without formatting ^{super 1} ",
" ");

/* ^{style[foreground=white]}*/
run;

proc print data=slide2;
title '^nthis value is superscripted ^{super^{style[foreground=red]} 1} ';
title2 '^nthis value is subscripted ^{sub 2} ';
title3 '^nthis value is superscripted ^{super 1} ';
/* title;*/
/* title2;*/
run;

ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This renders correctly in my Results window&amp;nbsp; &amp;nbsp;as one large black line, and three white lines following with superscirpts, but when I open the PDF file in Adober that was&amp;nbsp; created by SAS ,the superscript with style formatting always goes to black and also sets the text color to black on all subsequent lines.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been able to keep the color for the superscript in some examples but the location still is low on the line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing any commands or options that would help with this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Carl Richardson&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 16:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-ODS-PDF-superscripts-render-incorrectly-in-PDF/m-p/571446#M22957</guid>
      <dc:creator>qaguy1982</dc:creator>
      <dc:date>2019-07-05T16:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ODS PDF - superscripts render incorrectly in PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-ODS-PDF-superscripts-render-incorrectly-in-PDF/m-p/571471#M22958</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I found it hard to see the colors with red backgrounds, so&amp;nbsp; I simplified your code and made the background white so I could really focus on the superscripts on the "slide" text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I also simplified the data so instead of a line feed at the beginning of each line, I just made 1 obs per line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Instead of PROC PRINT I used PROC REPORT with NOHEADER so I could just see the rows without any header. This is what I came up with:&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="super_sub_PDF.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30783iA47327E69BD0C9CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="super_sub_PDF.png" alt="super_sub_PDF.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Not exactly what you showed, but I think putting the style override around the super function (instead of putting super around the style) seems to make the sizing all uniform in my output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 17:58:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-ODS-PDF-superscripts-render-incorrectly-in-PDF/m-p/571471#M22958</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-07-05T17:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ODS PDF - superscripts render incorrectly in PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-ODS-PDF-superscripts-render-incorrectly-in-PDF/m-p/571770#M22961</link>
      <description>&lt;P&gt;Thank you, Cynthia.&amp;nbsp; I picked off the format with style inside the ^{super 1} command from another paper online&amp;nbsp; And it worked fine for black superscripts.&amp;nbsp; I never thought of swapping them.&amp;nbsp; Also, your hints helped me remove a lot of extra style overrides, so my new code is much less busy than before. I used red in my example just to be able to demonstrate both the white and black printing.&amp;nbsp; &amp;nbsp; Also, your hint to break up the text into individual lines for the proc report was also helpful.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 14:08:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SAS-ODS-PDF-superscripts-render-incorrectly-in-PDF/m-p/571770#M22961</guid>
      <dc:creator>qaguy1982</dc:creator>
      <dc:date>2019-07-08T14:08:35Z</dc:date>
    </item>
  </channel>
</rss>

