是否可以使用ctable设置各行的居中,即,使第1列的前3行为中心,然后为最后5行的右中心?
更具体的说明 - 我喜欢男性/女性,并且此表中的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}
答案 0 :(得分:1)
您可以尝试将相应的单元格放在如下的框中:
Text & \ makebox [3 cm ][r]{ to the right } \NN