BookmarkSubscribeRSS Feed
aharris2693
Calcite | Level 5

I am trying to output a footnote onto one line with part left aligned and part right aligned.  The issue I am having is when the left aligned part is longer than half of the page, it wraps just the left part.  Is there anyway to make the left aligned part go past the halfway point on the page?

 

Code is here:

footnote%eval(&nfoot+1) j=l "\brdrt\brdrs\brdrw1 \fs12 &pathstring" j=r "\brdrt\brdrs\brdrw1 \fs16 &pagestring ";
 
Output looks like this
 
aharris2693_0-1730131578485.png

I'm not sure what forces that wrap at that positioning and if there is a way to change that.  Thanks in advance for any help.

 

8 REPLIES 8
ballardw
Super User

Does is wrap without the raw rtf codes?

 

Note, there is no way we can test anything like this without an example of all of the ODS destination statement in effect as well as the values of the macro variables.

aharris2693
Calcite | Level 5

Yes, it still wraps this way when I remove the rtf codes.  It seems like there are 2 "cells" being created, one for the left and one for the right.  I'm a bit unfamiliar with with how titles and footnotes work with proc report and ODS, so if there is anything else I can post that would help, please let me know.  ODS options and our style sheet code are below.  

 

options
nodate
nonumber
orientation = landscape
papersize = 'LETTER'
nobyline
;
ods graphics on /
reset = all
height = 4.92in
width =10in
border = no
;
ods listing close;
ods rtf
file = ".\_outputs\figures\&outfile..rtf"
nogtitle
nogfootnote 
style = epscistyle
;
ods
escapechar = '^'
;

 

Style sheet

 

 

proc template;
define style Styles.epscistyle;
   parent = styles.rtf;
   style fonts /
      'FixedFont' = ("Courier",9pt)
      'BatchFixedFont' = ("Courier",6.7pt)
      'FixedHeadingFont' = ("Courier",9pt,bold)
      'FixedStrongFont' = ("Courier",9pt,bold)
      'FixedEmphasisFont' = ("Courier",9pt,italic)
      'footFont' = ("Courier New",8pt)
      'docFont' = ("Courier New",8pt)
      'headingFont' = ("Courier New",8pt)
      'headingEmphasisFont' = ("Courier New",8pt)
      'EmphasisFont' = ("Courier New",8pt)
      'StrongFont' = ("Courier New",8pt)
      'TitleFont2' = ("Courier New",8pt)
      'TitleFont' = ("Courier New",8pt);
   style body from document /
      protectspecialchars = off
      borderspacing = 0pt
      cellpadding = 0pt
      backgroundcolor = _undef_
      fontsize = 10pt
      fontfamily = "Courier"
      marginleft = 1in
      marginright = 1in
      margintop = 1in
      marginbottom = 1in;
   style Header /
      asis = on
      borderwidth = 0px;
   style usertext from usertext /
      width = 100%
      protectspecialchars = off;
   style table from table /
      borderwidth = .75pt
      borderspacing = 0pt
      cellpadding = 0.6pt
      asis = on
      frame = above
      rules = groups;
   style Byline from Byline /
      foreground=black;
end;
run;

 

 

 

 

aharris2693
Calcite | Level 5
I should also say that &pathstring is everything on the left and &pagestring is "Page x of x". All of this is resolving fine
Tom
Super User Tom
Super User

I do not understand what your question is.  Are you using a FOOTNOTE statement?  Are you using the J=L and J=R options?
Example:

title1 'This is the title';
footnote1 j=l 'pathstring' j=r 'Page X of Y' ;
proc print data=sashelp.class(obs=3);
run;
title; footnote;

Result

Tom_0-1730134863341.png

What is it that you want to happen differently?

aharris2693
Calcite | Level 5

Tom, if in your example, pathstring is a string longer than half of the width of the page, it will break at the midway point instead of extending even if there is room for it to extend.  See the example in my original post.  

ballardw
Super User

A brief test makes me think that the issue that Just=R or Just=C creates a "guard space" for the right or center portion of the footnote output so the left part if long enough is not allowed to enter that space.

 

Which may mean that you don't want to have a J=R at all an perhaps insert a number of non-breaking space characters after the "left" text to space the the right text over.

Which will be load of fun as you are apparently using two different font sizes in the RTF codes.

 

Another option would be two footnotes. Have the Left justified by itself in Footnote1 and

the right justified by itself in Footnote2.

aharris2693
Calcite | Level 5

Thanks for the response.  It was originally written the way that you suggest using /tabs between the two.  I was hoping to get away from this as it creates problems when directory names are too long.  Your thoughts on the reserved space are my thinking of what is going on too.  Thanks again for looking into this.  

ballardw
Super User

@aharris2693 wrote:

Thanks for the response.  It was originally written the way that you suggest using /tabs between the two.  I was hoping to get away from this as it creates problems when directory names are too long.  Your thoughts on the reserved space are my thinking of what is going on too.  Thanks again for looking into this.  


Did you see the bit about adding a separate footnote for the PAGE information so you don't have a J=R on the same footnote as the long text? And if you are using Options NOCENTER; The other footnote wouldn't need a J=L either.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 1235 views
  • 0 likes
  • 3 in conversation