BookmarkSubscribeRSS Feed
Chang
Quartz | Level 8

hi,

 

I'd like to increase the spacing of my title text of my tables, generated via PROC REPORT and ODS RTF, for the purpose of journal submission. The titles should appear double-double spaced, as the first printscreen shows in the following. I am wondering if it is possible to do this in the TITLE statement in conjunction with RTF control words. There seems no TITLE option that can increase the spacing. I've tried some RTF code but my titles still show the default spacing (single spaced).

 

I looked up RTF code at this website

http://www.biblioscape.com/rtf15_spec.htm

    

Here is my code. The RTF code is used from title2 to title9. Unfortunately, none of these changed the spacing.

/*Adding RTF Control Words
To use RTF control words within the TITLE and FOOTNOTE statements, you must set the attribute PROTECTSPECIALCHARS=OFF so that ODS 
does not try to protect these characters. */
/*RTF control words: http://www.biblioscape.com/rtf15_spec.htm*/

proc template;
      define style styles.test;
         parent=styles.rtf;
         style systemtitle from systemtitle /
               protectspecialchars=off;
      end;
run;

ods rtf body='temp.rtf' style=styles.test;

/*all titles appear single-spaced with the following options*/
%let longTitle3lines=Number of complete twin pairs and individual twins (parenthetical) in each zygosity and sex group and across all the groups (sum) from different waves of (1) SPHERE12 questionnaire, (2) diagnostic interviews, and (3) twins who are in both samples (overlapped). SPHERE12 data were collected from three waves NU1, NU2, and NU3. Diagnostic data were collected from two waves NU2 and NU3.;
%put longTitle3lines=&longTitle3lines.;

   proc print data=sashelp.class;
      title 'A normal title';
	  title2 "\slmult0 &longTitle3lines. ";
	  title3 "\slmult1 &longTitle3lines. " ;
	  title4 " \pard\slmult2 &longTitle3lines.  " ;
	  title5 'another title'	;
	  title6 "\sl1 &longTitle3lines. ";
	  title7 "\sl2 &longTitle3lines. ";
	  title8 ls=20 "&longTitle3lines. ";
	  title9 ls=200 "&longTitle3lines. ";
   run;

   ods rtf close;

 

To illustrate a double-spaced title that I need:

 

table_title_doubleSpaced.png

 

By far my titles appear single-spaced:

 

table_title_singleSpaced.png

 

 Thanks

 

 

 

 

 

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  I typically find it easier to just figure out how much of the long string goes on each line and then use odd-numbered TITLE statements to make them appear double-spaced. I don't really like using RTF control strings unless they are very, very simple because a mis-formed RTF command can make the file un-openable.

 

  Here's what I mean -- didn't copy the whole title text in the screen shot --

cynthia

long_title_double.png

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
  • 1 reply
  • 1516 views
  • 4 likes
  • 2 in conversation