BookmarkSubscribeRSS Feed
bmouctar91
Calcite | Level 5

Hi,

I am trying to make a table of contents in rtf report. I would like to customize this table of contents

I create some title with ods  text=”……” and I would like to add this title in my table of contents.

For example:

 

ods RTF file="example.rtf" startpage=no keepn ;
 
%let titniv1 = \plain\par\pard\ql\b\f1\fs32 ;
 
ods text="{&titniv1. 1.List of abbreviation\plain}" ;
     …………
     …………
ods text="{&titniv1. 5.Result\plain}" ;
…………
…………
 
Ods rtf close;
 

 

The table of contents has to content: list of abbreviation and result.  

3 REPLIES 3
ballardw
Super User

One way is to add the RTF tags \tc to add something to the table of contents, and \tclx, where x is a numeral 1, 2, 3 etc that refers to the level of the item in the table of contents. 1 being the "top" or if using an indented TOC the left most entries.

 

I have not used this mixed with other TOC entries though.

Cynthia_sas
SAS Super FREQ
Hi, I'm not sure this will work to insert ODS TEXT strings into an RTF table of contents. I think that ODS uses some field codes for the TOC, but not sure which ones. This might be a question better handled with Tech Support.

cynthia
ballardw
Super User

I probably should have mentioned the \tc  and \tclevelx codes worked when using this as the only method to add a table of contents and did that by using the Word feature to insert the TOC.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 910 views
  • 0 likes
  • 3 in conversation