I am creating a custom ToC in an ODS RTF output using tags (similar to this paper). Unfortunately, my ToC is rather lengthy and would need to cover multiple pages. However, when I press Ctrl+A, F9 in Word, the ToC gets smashed into one page and overflows. I cannot figure out how to get it to insert a page break. Please advise.
Example of how ToC is being built:
/* page 3 */
proc odstext pagebreak=yes;
h "{\scaps Contents}" / style={fontfamily='Arial' fontweight=bold font_size=12pt just=c};
run;
ods rtf text="{\field{\*\fldinst {\\TOC \\f \\h} } }"; run;
/* Section I */
proc odstext pagebreak=yes;
h "^20n {\tc \tcl1{\scaps I. Introduction & Methodology}}" / style={fontfamily='Arial' fontweight=bold font_size=12pt just=c};
run;
/* Section I Content */
proc odstext pagebreak=yes;
h "{\tc \tcl2{\scaps 1.1 Project Overview}}" / style={fontfamily='Arial' fontweight=bold font_size=10pt just=l};
p ;
p "text";
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.