BookmarkSubscribeRSS Feed
Haris
Lapis Lazuli | Level 10

Is there a way to control vertical line spacing in ODS TEXT, PROC ODSTEXT, and PROC ODSLIST?

While outputting to ODS PDF, I am trying to replace line-by-line paragraph syntax:

ods text "Text for Line 1: Some long text to the end of the line 1 of the paragraph.";

ods text "Text for Line 2: Text for line 2 of the paragraph.";

... with this syntax:

ods text "Text for Line 1: Some long text to the end of the line 1 of the paragraph. Text for Line 2: Text for line 2 of the paragraph.";

In the code I am trying to improve, the paragraphs are entered one line at a time with manual line breaks.  The general idea is to eliminate manual line breaks to accommodate things like font changes and text edits of the future.  The approach works and automatic line breaks are inserted in the right places.  Trouble I am encountering is that the line spacing from a single ODS TEXT statement is much larger than the one for line-by-line syntax and the text no longer fits on one page.

I suspect that the reason for this is in the fact that the default font size for the template is 9pt.  Each line of the broken line-by-line paragraphs begins with a style statement that specifies font size of 12pt.  In other words, it appears that the font size for a line is 12pt but the font size in between the two ODS TEXT statements is only 9pt.  Hence the question, can I decrease/control the vertical line spacing within paragraphs?  Something like a style option VSpacing=9pt?  I can't seem to find any style elements like that.

Thanks,

Haris

1 REPLY 1
ballardw
Super User

I haven't played with the vertical spacing but I suspect that you may want to work with ODS PDF Text or ODS RTF Text and use some specific-to-destination coding with ESCAPECHAR to put in raw codes.

Also the style you are using may have an impact and changing styles might address the issue.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2456 views
  • 0 likes
  • 2 in conversation