<?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: How to superscript in ods pdf? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/936718#M368147</link>
    <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I have used your code to troubleshoot. The problem seems to be the definition of a fontfamily. If I use the following code the problem occurs. But without the fontfamily statement it works as intended. Unfortunately, I need a font different to the default one. Arial would be fine as well, but the problem occurs there too.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data testsuper;
	length tline $200;
	infile datalines dlm =",";
	input ord tline $;
	datalines;
	1, Here^{super 1} There^{super 2} and what about here^{super 3}
	2, Twas^{super 4} and what about now^{super 5}
	3, No other context given but this^{super 6}
	;
run;

ods escapechar="^";
options papersize=a4 orientation=portrait nobyline nodate leftmargin=1.5cm rightmargin=2.5cm bottommargin=0.5cm topmargin=2cm nonumber;
ods pdf file="yourpath\testSUPER.pdf";
proc report data=testsuper;
column ord tline;
define ord / order;
define tline / "TestLine" display style(column)=[cellwidth=15cm fontfamily=calibri fontsize=10pt];
run;
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 23 Jul 2024 07:23:56 GMT</pubDate>
    <dc:creator>_Manhattan</dc:creator>
    <dc:date>2024-07-23T07:23:56Z</dc:date>
    <item>
      <title>How to superscript in ods pdf?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/936584#M368117</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would like to add some superscript to my PDF document. I have found some information on how to do this, but my output looks a bit off.&lt;/P&gt;
&lt;P&gt;I have imported an excel file (see screenshot below) to test how the outcome looks. I would like the outcome to look like in the first row "HERE". You can see that the superscript "1" is directly matched to the text. I have noticed the longer the string is the wider the gap between the content and the text gets. Do you have an idea how to stick the superscript to the text like in the first row?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import
  datafile="yourpath\superscript_test.xlsx"
  out=supers
  dbms=excel
  replace;
run;

options papersize=a4 orientation=portrait nobyline nodate leftmargin=1.5cm rightmargin=2.5cm bottommargin=0.5cm topmargin=2cm nonumber;
ods pdf file="yourpath\testSUPER.pdf";
proc report data=supers;
column test;
define test / "test" display style(column)=[cellwidth=15cm fontfamily=calibri fontsize=10pt];
run;
ods pdf close;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Output PDF::&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_Manhattan_1-1721655052030.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98576i1B8ACAA324A72E92/image-size/medium?v=v2&amp;amp;px=400" role="button" title="_Manhattan_1-1721655052030.png" alt="_Manhattan_1-1721655052030.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Excel:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_Manhattan_2-1721655117645.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98577i5CA29B6E7AC6AC3D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="_Manhattan_2-1721655117645.png" alt="_Manhattan_2-1721655117645.png" /&gt;&lt;/span&gt;&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;P&gt;&amp;nbsp;&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>Mon, 22 Jul 2024 13:32:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/936584#M368117</guid>
      <dc:creator>_Manhattan</dc:creator>
      <dc:date>2024-07-22T13:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to superscript in ods pdf?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/936640#M368126</link>
      <description>&lt;P&gt;Hi, I'm not sure how/where the Excel fits in here. When I run this test, the ODS PDF super and subscripts look fine to me:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1721670389994.png" style="width: 690px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98590i03157F6415E5E5C4/image-dimensions/690x441?v=v2" width="690" height="441" role="button" title="Cynthia_sas_0-1721670389994.png" alt="Cynthia_sas_0-1721670389994.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As you can see, it is possible with ODS to use either the ESCAPECHAR SUPER/SUB or UNICODE functions to insert superscript or subscripts into text. However, key to this working is to be sure you have an ODS ESCAPECHAR statement so that ODS knows which character to use for the ESCAPECHAR string.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 17:48:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/936640#M368126</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2024-07-22T17:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to superscript in ods pdf?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/936718#M368147</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I have used your code to troubleshoot. The problem seems to be the definition of a fontfamily. If I use the following code the problem occurs. But without the fontfamily statement it works as intended. Unfortunately, I need a font different to the default one. Arial would be fine as well, but the problem occurs there too.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data testsuper;
	length tline $200;
	infile datalines dlm =",";
	input ord tline $;
	datalines;
	1, Here^{super 1} There^{super 2} and what about here^{super 3}
	2, Twas^{super 4} and what about now^{super 5}
	3, No other context given but this^{super 6}
	;
run;

ods escapechar="^";
options papersize=a4 orientation=portrait nobyline nodate leftmargin=1.5cm rightmargin=2.5cm bottommargin=0.5cm topmargin=2cm nonumber;
ods pdf file="yourpath\testSUPER.pdf";
proc report data=testsuper;
column ord tline;
define ord / order;
define tline / "TestLine" display style(column)=[cellwidth=15cm fontfamily=calibri fontsize=10pt];
run;
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Jul 2024 07:23:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/936718#M368147</guid>
      <dc:creator>_Manhattan</dc:creator>
      <dc:date>2024-07-23T07:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to superscript in ods pdf?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/936842#M368167</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Interesting. I thought Calibri was a Microsoft-specific font only available with Office. As a test, when I try to use either calibri or Calibri, I get some version of this message:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1721757439393.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98639i7F7EF7555D40E713/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1721757439393.png" alt="Cynthia_sas_0-1721757439393.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So this implies to me that 1) either Calibri needs to be registered with SAS (but that is still no guarantee that PDF will use a Microsoft font) or 2) you need to find the unicode equivalent of Calibri that Adobe respects. As an example, if I wanted to use the Arial font in a PDF document, I would need to specify the font as "Arial Unicode MS" as shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1721757559906.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98640iD990D2D2EA0C48C4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1721757559906.png" alt="Cynthia_sas_1-1721757559906.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; But when I tried "Calibri Unicode MS" that is also not a valid font name. So my suspicion is that Calibri, like Arial is a Windows/Microsoft-defined font, which means that you probably have to register it with SAS and also, if you are going to be creating the output on a Unix/Linux server, you may have to copy the font over to the server so it can be used. Or you may want to just use Helvetica which is very similar to Calibri and Arial. Or, instead of Calibri or Arial use Albany AMT, which is shipped with SAS. Here's a comparison of the 2 Microsoft fonts with Albany (shown in Word):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_2-1721758670788.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98647i3A312BAB22DACE60/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_2-1721758670788.png" alt="Cynthia_sas_2-1721758670788.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; My recommendation is that you work with SAS Tech Support on this since if Calibri is a Microsoft specific font, it may not work for PDF.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 18:21:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/936842#M368167</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2024-07-23T18:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to superscript in ods pdf?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/936863#M368168</link>
      <description>&lt;P&gt;FWIW, I ran your code minus the OPTIONS statement and it generated the superscripts and document properties show Calibri as one of the fonts. I also checked my SAS fontlist and Calibri does appear there. I suspect that I ran Proc FONTREG a long time ago for some font and loaded many of the MS fonts. Changing Calibri for Arial and I still get the superscripts and the Arial font appears in the document properties.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 19:12:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/936863#M368168</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-07-23T19:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to superscript in ods pdf?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/936935#M368188</link>
      <description>&lt;P&gt;I have run the following code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc registry listhelp startat='ods\fonts'; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and noticed that I do not have calibri as a font installed in SAS.&lt;/P&gt;
&lt;P&gt;However, if I try to add Fonts with the following code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc fontreg
  mode=add
  msglevel=normal
  usesashelp
;
  truetype "C:\yourpath\Microsoft\Windows\Fonts";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I receive the ERROR:&amp;nbsp; User does not have appropriate authorization level for file SASHELP.REGSTRY.ITEMSTOR&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know any work around to resolve this issue? Alternatively, I will consider using Albany MT (thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt; for the short overview of the comparison of the fonts)&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 07:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/936935#M368188</guid>
      <dc:creator>_Manhattan</dc:creator>
      <dc:date>2024-07-24T07:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to superscript in ods pdf?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/937012#M368207</link>
      <description>&lt;P&gt;Sounds like you do not have write privileges in the SASHELP library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remove the USESASHELP and try that instead. This will update the registry in the SASUSER library.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 15:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/937012#M368207</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-07-24T15:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to superscript in ods pdf?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/937084#M368214</link>
      <description>&lt;P&gt;I just realised that I did not use the right file path. With the following code I got the Log down below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc fontreg
  mode=all
  msglevel=verbose
;
  fontfile "C:\Windows\Fonts\calibri.ttf";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; WARNING: The "Calibri" font family being processed supports more character encodings than the 
          existing family of the same name in the SAS registry. Only the encodings currently 
          supported by the family in the SAS registry will be available. 
 
 NOTE: The font "Calibri" (Style: Regular, Weight: Normal) has been replaced in the SAS Registry 
       at [CORE\PRINTING\FREETYPE\FONTS\&amp;lt;ttf&amp;gt; Calibri]. Because it is a TRUETYPE font, it can be 
       referenced as "Calibri" or "&amp;lt;ttf&amp;gt; Calibri" in SAS. The font resides in file 
       "C:\Windows\Fonts\calibri.ttf". &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I read that as "it worked". Unfortunately, my output still looks the same&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_Manhattan_0-1721895868575.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98711iEA59BAC9B3BCF143/image-size/medium?v=v2&amp;amp;px=400" role="button" title="_Manhattan_0-1721895868575.png" alt="_Manhattan_0-1721895868575.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 08:23:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/937084#M368214</guid>
      <dc:creator>_Manhattan</dc:creator>
      <dc:date>2024-07-25T08:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to superscript in ods pdf?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/937085#M368215</link>
      <description>This blog post has been helpful &lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/sgf/2020/03/20/how-to-debug-5-common-sas-software-font-issues/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2020/03/20/how-to-debug-5-common-sas-software-font-issues/&lt;/A&gt;</description>
      <pubDate>Thu, 25 Jul 2024 08:24:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-superscript-in-ods-pdf/m-p/937085#M368215</guid>
      <dc:creator>_Manhattan</dc:creator>
      <dc:date>2024-07-25T08:24:25Z</dc:date>
    </item>
  </channel>
</rss>

