<?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 Put titles headers and footnotes in section automatically created for contents in ods rtf in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Put-titles-headers-and-footnotes-in-section-automatically/m-p/928289#M365227</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to add a contents table in a rtf file. As I saw in other discussions and examples, the code is something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"ods rtf file="myfolder\Table_X.rtf" style=Journalvs CONTENTS toc_data;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everything fine, and in the rtf output, the table of contents is created and when I update the field, the contents appear. The problem is about the headers and footnotes. I have defined this headers and footnotes for the entire document, and I change it in each report, but, the TOC seems to be in a separated section of the document, and these titles are not populated. How can I add them?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lord_Sapens_0-1715695938533.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96509i790B09BA563BE4CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Lord_Sapens_0-1715695938533.png" alt="Lord_Sapens_0-1715695938533.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, and this is minnor at this time, I would like to know how to change the font size of the TOC elements, I tryied with proc template, but with any change..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;options orientation=landscape replace center nodate nonumber ;
ODS LISTING CLOSE;
ods ESCAPECHAR='^';


Title1 J=l "Study 1" J=R "Page ^{thispage} of ^{lastpage}";
Footnote1 J=L " myself";

ods rtf file="myfolder\Table_X.rtf" style=Journalvs CONTENTS toc_data;


title2 J=l "Table 1. Baseline and disease categorical characteristics.";
Footnote1 j=l "P-values obtained from Fisher exact test(*) or simulated MC Fisher test (#).; NA: Not apply.";
Footnote2 J=L " myself";


ODS PROCLABEL=' ';&amp;nbsp;
proc report data=tmp.cats contents='Table 1' center style(report)={just=center} style(header)=[background=white bordercolor=black borderbottomwidth=0.1pt vjust=center] nowd split="@" style(column)=[bordercolor=white];
column order_1 order_2 order_3 col1 col2;


column order_1 order_2 order_3 col1 col2;


define order_1 / order noprint;
define order_2 / order noprint;
define order_3 / order noprint;
define col1 / display "Group" left style(column)=[cellwidth=10% asis=on];
define col2 / display "Parameter" left style(column)=[cellwidth=15% asis=on] style(header)=[bordertopwidth=0pt];

compute before order_2 / style=[just=l font_face=Courier font_size=8pt font_weight=bold foreground=black background=white];
line j=l " ";
endcomp;

compute before order_2 / style=[just=l font_face=Courier font_size=8pt font_weight=bold foreground=black background=white];
line j=l " ";
endcomp;


break after order_1 / page contents=' ';
break before order_1 / page contents=' ';

run;

title2 J=l "Table 2.";
Footnote1 j=l "P-values obtained from t-test of equal or unequal (**) variances.; NA: Not apply.";
Footnote2 J=L "myself";

ODS PROCLABEL=' ';&amp;nbsp;
proc report data=tmp.conts contents='Table 2' center style(report)={just=center} style(header)=[background=white bordercolor=black borderbottomwidth=0.1pt vjust=center] nowd split="@" style(column)=[bordercolor=white];
column order_1 order_2 order_3 col1 col2;


define order_1 / order noprint;
define order_2 / order noprint;
define order_3 / order noprint;
define col1 / display "Group" left style(column)=[cellwidth=10% asis=on];
define col2 / display "Parameter" left style(column)=[cellwidth=15% asis=on] style(header)=[bordertopwidth=0pt];

compute before order_2 / style=[just=l font_face=Courier font_size=8pt font_weight=bold foreground=black background=white];
line j=l " ";
endcomp;

break after order_1 / page contents=' ';
break before order_1 / page contents=' ';
run;

ods rtf close;
ods html close;
ods listing;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 May 2024 14:23:00 GMT</pubDate>
    <dc:creator>Lord_Sapens</dc:creator>
    <dc:date>2024-05-14T14:23:00Z</dc:date>
    <item>
      <title>Put titles headers and footnotes in section automatically created for contents in ods rtf</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Put-titles-headers-and-footnotes-in-section-automatically/m-p/928289#M365227</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to add a contents table in a rtf file. As I saw in other discussions and examples, the code is something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"ods rtf file="myfolder\Table_X.rtf" style=Journalvs CONTENTS toc_data;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everything fine, and in the rtf output, the table of contents is created and when I update the field, the contents appear. The problem is about the headers and footnotes. I have defined this headers and footnotes for the entire document, and I change it in each report, but, the TOC seems to be in a separated section of the document, and these titles are not populated. How can I add them?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lord_Sapens_0-1715695938533.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96509i790B09BA563BE4CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Lord_Sapens_0-1715695938533.png" alt="Lord_Sapens_0-1715695938533.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, and this is minnor at this time, I would like to know how to change the font size of the TOC elements, I tryied with proc template, but with any change..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;options orientation=landscape replace center nodate nonumber ;
ODS LISTING CLOSE;
ods ESCAPECHAR='^';


Title1 J=l "Study 1" J=R "Page ^{thispage} of ^{lastpage}";
Footnote1 J=L " myself";

ods rtf file="myfolder\Table_X.rtf" style=Journalvs CONTENTS toc_data;


title2 J=l "Table 1. Baseline and disease categorical characteristics.";
Footnote1 j=l "P-values obtained from Fisher exact test(*) or simulated MC Fisher test (#).; NA: Not apply.";
Footnote2 J=L " myself";


ODS PROCLABEL=' ';&amp;nbsp;
proc report data=tmp.cats contents='Table 1' center style(report)={just=center} style(header)=[background=white bordercolor=black borderbottomwidth=0.1pt vjust=center] nowd split="@" style(column)=[bordercolor=white];
column order_1 order_2 order_3 col1 col2;


column order_1 order_2 order_3 col1 col2;


define order_1 / order noprint;
define order_2 / order noprint;
define order_3 / order noprint;
define col1 / display "Group" left style(column)=[cellwidth=10% asis=on];
define col2 / display "Parameter" left style(column)=[cellwidth=15% asis=on] style(header)=[bordertopwidth=0pt];

compute before order_2 / style=[just=l font_face=Courier font_size=8pt font_weight=bold foreground=black background=white];
line j=l " ";
endcomp;

compute before order_2 / style=[just=l font_face=Courier font_size=8pt font_weight=bold foreground=black background=white];
line j=l " ";
endcomp;


break after order_1 / page contents=' ';
break before order_1 / page contents=' ';

run;

title2 J=l "Table 2.";
Footnote1 j=l "P-values obtained from t-test of equal or unequal (**) variances.; NA: Not apply.";
Footnote2 J=L "myself";

ODS PROCLABEL=' ';&amp;nbsp;
proc report data=tmp.conts contents='Table 2' center style(report)={just=center} style(header)=[background=white bordercolor=black borderbottomwidth=0.1pt vjust=center] nowd split="@" style(column)=[bordercolor=white];
column order_1 order_2 order_3 col1 col2;


define order_1 / order noprint;
define order_2 / order noprint;
define order_3 / order noprint;
define col1 / display "Group" left style(column)=[cellwidth=10% asis=on];
define col2 / display "Parameter" left style(column)=[cellwidth=15% asis=on] style(header)=[bordertopwidth=0pt];

compute before order_2 / style=[just=l font_face=Courier font_size=8pt font_weight=bold foreground=black background=white];
line j=l " ";
endcomp;

break after order_1 / page contents=' ';
break before order_1 / page contents=' ';
run;

ods rtf close;
ods html close;
ods listing;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 14:23:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Put-titles-headers-and-footnotes-in-section-automatically/m-p/928289#M365227</guid>
      <dc:creator>Lord_Sapens</dc:creator>
      <dc:date>2024-05-14T14:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Put titles headers and footnotes in section automatically created for contents in ods rtf</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Put-titles-headers-and-footnotes-in-section-automatically/m-p/928318#M365239</link>
      <description>&lt;P&gt;Hi: You may want to work with SAS Tech Support on this. I do not think that SAS Titles or Footnotes are ever visible on the TOC page. There may be a workaround for that by writing your own code to generate a Table of Contents, but it may not be worth the effort. Then, I remember reading/hearing about how some of the TOC elements could not have the font changed by changing the style template. What I don't know is whether these types of changes are different in ODS WORD. So, your best resource on this might be SAS Tech Support.&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 16:21:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Put-titles-headers-and-footnotes-in-section-automatically/m-p/928318#M365239</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2024-05-14T16:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Put titles headers and footnotes in section automatically created for contents in ods rtf</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Put-titles-headers-and-footnotes-in-section-automatically/m-p/928434#M365283</link>
      <description>&lt;P&gt;Hi Cynthia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response!&amp;nbsp;I always use this website for consultation, but never for asking, and seems that the community responds very quick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was looking for an answer of that the entire day yesterday, at least, I have now a bit confirmation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My other option was to use something like that, that I found in some manuscripts of Lax Jensen and others (actually, I think that your name was in some of them?):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ODS RTF TEXT="{\pard\b\fs28\qc {Table of Contents} \par}"; 
ODS RTF TEXT="{\field{\*\fldinst {\\TOC \\f \\h}} \par }"; &lt;/PRE&gt;&lt;P&gt;but, in this case, I had other two issues. &lt;SPAN&gt;Although &lt;/SPAN&gt;the table is created, the pages are not showed (the concepts yes, i.e. "Table 1 ........." without the page number), and doesn't appear in a distinct page. I mean, the table has shown just before the first table. Maybe you or some other have a solution for this second option issues?&amp;nbsp;I don't know if it is possible to add a pagebrake using the "RTF lenguage" for example, or if this works. I completely naive in RTF coding.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 05:35:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Put-titles-headers-and-footnotes-in-section-automatically/m-p/928434#M365283</guid>
      <dc:creator>Lord_Sapens</dc:creator>
      <dc:date>2024-05-15T05:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Put titles headers and footnotes in section automatically created for contents in ods rtf</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Put-titles-headers-and-footnotes-in-section-automatically/m-p/928443#M365287</link>
      <description>&lt;P&gt;Hi again,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm autoresponding me, I think that I found a "solution", with some trick.. Using this at the beggining:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ods rtf text="{\pard\f2\b\fs32\qc {Index of Tables}
\par\cell}{\row}\pard{\field{\*\fldinst {\\TOC \\f \\h \\e "" "" \\c ""4"" \\z ""1033""
}}}\par\trowd\trgaph180\cellx1440\pard\intbl{}";

ods rtf notoc_data;
	ODS PROCLABEL=" "; 
      data _null_;
            file print;
			put "^S={borderbottomwidth=0 bordertopwidth=0 bordercolor=white borderbottomcolor=white}";
		run;
 ods rtf toc_data;
ODS RTF startpage=yes; &lt;/PRE&gt;&lt;P&gt;For now, it will do my choice. If any one have more elegant solution, I'm open !&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 07:39:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Put-titles-headers-and-footnotes-in-section-automatically/m-p/928443#M365287</guid>
      <dc:creator>Lord_Sapens</dc:creator>
      <dc:date>2024-05-15T07:39:36Z</dc:date>
    </item>
  </channel>
</rss>

