01-07-2018 07:17 PM
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
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:
By far my titles appear single-spaced:
01-07-2018 08:48 PM
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 --