将脚注放置在与proc报告的特定对齐中

时间:2015-03-02 10:02:15

标签: sas

我想把我的脚注放在桌子的底部,并完美地与桌子的左侧数据对齐。有人可以帮助我实现这一目标吗?

目前

           ___________bottom line of table___________ 

Note: Is my footnote just under the line and aligned ? 

但是希望如此:

 ______________bottom line of table here________           
 Note: Is my footnote just under the line and aligned ? 

以下是代码:

data test;
input alpha $1-16 beta $18-41;
cards;
abc+def+ghi+jkl (zmc*[100]/1000-200)+23)
cab+ddd+ggg+jjj (zab*[100]/1000-200)+21)
;
run;



%let path=C:\;
ODS LISTING CLOSE;
ODS RTF  PATH="&path." FILE='test.rtf '

                       BODYTITLE;
ODS TRACE ON;
ODS ESCAPECHAR='^';
ODS PATH SHOW;

proc report data=TEST  nowd 
style(report)=[background=white fontstyle=roman fontsize=2.5  fontweight=medium  width=85% fontfamily='courier new']
style(header)=[background=white foreground=blue fontstyle=roman fontsize=2.5  fontweight=medium just=left fontfamily='courier new']
style(column)=[background=white fontstyle=roman fontsize=2.5  fontweight=medium fontfamily='courier new' ]
;
title   "^S={ fontstyle=roman fontsize=2.5 fontweight=medium fontfamily='courier new'} testsing my footnote";
footnote"^S={fontstyle=roman just=l fontfamily='courier new'fontsize=2.5 fontweight=medium } Note: Is my footnote just under the line and aligned ?";

column alpha beta;
define alpha/order ;
define  beta/order;

compute before;
line @1 '';
endcomp;

run;

ODS RTF CLOSE;
ODS LISTING;

3 个答案:

答案 0 :(得分:0)

不是一个很好的解决方案,但在转义之外用j = l替换just = l,然后添加一些空格以使其与表对齐。

footnote j=l "^S={fontstyle=roman just=l fontfamily='courier new'fontsize=2.5 fontweight=medium } Note: Is my footnote just under the line and aligned ?";

否则,为了使其完全对齐在表格下方,默认情况下左对齐使用跨行作为proc报告的一部分,请参阅下面的示例。

options nodate nonumber;
title 'Notes After Every Table';

ods rtf file='c:\temp\tablenote.rtf' startpage=no;
ods escapechar='^';

proc report data=sashelp.class nowd;
  column sex height,(Min Mean Max N);
  define sex / group 'Sex ^{super 1}';
  define height /analysis 'Height';
  compute after / style={just=l};
    line '^{super 1} Age span for students 11-16 years';
  endcomp;
run;

proc report data=sashelp.class nowd;
  column sex weight,(Min Mean Max N);
  define sex / group 'Sex ^{super 2}';
  define weight /analysis 'Weight';
  compute after / style={just=l};
    line '^{super 2} Note there are more boys than girls';
  endcomp;
run;
ods _all_ close;

由Cynthia Zender @ SAS提供:https://communities.sas.com/message/231503#231503

答案 1 :(得分:0)

如果你想要保留所有合理的东西,你可以使用options nocenter;

如果您只想让报告左对齐,可以使用nocenter语句中的proc report选项。

答案 2 :(得分:0)

好的,我看到......当我使用这个模板程序时,它没有工作:

proc template;

  define style styles.testme;
   parent=styles.rtf;

   replace color_list/
   'bgH'=white;

   replace body from document / bottommargin = .2in
                                 topmargin    = .2in
                                 rightmargin  = .2in
                                 leftmargin   = .2in;

   replace table from output / outputwidth = 50%
                                frame       = hsides 
                                rules       = groups 
                                cellpadding = 1.0pt 
                                cellspacing = 0.1pt 
                                borderwidth = 1.0pt;

   end;

run;