乳胶压痕/表格居中
是否可以使用 ctable 设置各行的居中,即使第 1 列前 3 行左居中,后 5 行右居中?
更具体地说,我希望此表中的male/female 和1..3 右对齐而不是左对齐,而其余变量名保持左居中。
\documentclass[12pt]{article}
\usepackage{relsize}
\usepackage{setspace}
\usepackage{ctable}
\usepackage{Sweave}
\usepackage{amsmath,amsfonts,amssymb}
\begin{document}
\ctable[ caption={ compldich }, label=z, pos=!tbp, ]{lcc} {\tnote[***]{P$<$0.001}\tnote[**]{P$<$0.01}\tnote[*]{P$<$0.05}} {\FL\multicolumn{1}{l}{Variable}&\multicolumn{1}{c}{Univariate}&\multicolumn{1}{c}{Multivariate}\NN
\multicolumn{1}{l}{}&\multicolumn{1}{c}{Odds ratio}&\multicolumn{1}{c}{Odds ratio }\NN
\ML
Prom&1.071&0.77\NN
& (0.739,1.557) & (0.568,1.034) \NN
\NN
Ag&0.987&0.989***\NN
& (0.97,1.004) & (0.983,0.995) \NN
\NN
Gend&&\NN
Male&1&1\NN
\NN
Fema&1.195&1.153\NN
& (0.606,2.388) & (0.863,1.538) \NN
\NN
HSSE&&\NN
1&1&1\NN
\NN
2&0.562&0.685\NN
& (0.113,2.259) & (0.454,1.029) \NN
\NN
3&0.007***&0.019***\NN
& (0,0.058) & (0.004,0.054) \NN
\NN
\FL
}
\end {document}
Is it possible to set the centering of the individual rows with ctable, ie so that column 1 has left centering for the first 3 rows and then right centering for the last 5 rows?
On a more specific note--I´d like male/female and 1..3 in this table to be right aligned instead of left aligned whilst the rest of the variablenames remain left centered.
\documentclass[12pt]{article}
\usepackage{relsize}
\usepackage{setspace}
\usepackage{ctable}
\usepackage{Sweave}
\usepackage{amsmath,amsfonts,amssymb}
\begin{document}
\ctable[ caption={ compldich }, label=z, pos=!tbp, ]{lcc} {\tnote[***]{Plt;$0.001}\tnote[**]{Plt;$0.01}\tnote[*]{Plt;$0.05}} {\FL\multicolumn{1}{l}{Variable}&\multicolumn{1}{c}{Univariate}&\multicolumn{1}{c}{Multivariate}\NN
\multicolumn{1}{l}{}&\multicolumn{1}{c}{Odds ratio}&\multicolumn{1}{c}{Odds ratio }\NN
\ML
Prom&1.071&0.77\NN
& (0.739,1.557) & (0.568,1.034) \NN
\NN
Ag&0.987&0.989***\NN
& (0.97,1.004) & (0.983,0.995) \NN
\NN
Gend&&\NN
Male&1&1\NN
\NN
Fema&1.195&1.153\NN
& (0.606,2.388) & (0.863,1.538) \NN
\NN
HSSE&&\NN
1&1&1\NN
\NN
2&0.562&0.685\NN
& (0.113,2.259) & (0.454,1.029) \NN
\NN
3&0.007***&0.019***\NN
& (0,0.058) & (0.004,0.054) \NN
\NN
\FL
}
\end {document}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试将相应的单元格放入框中,如下所示:
You could try putting the respective cells in a box like so: