我在使用\raisebox
表格环境时遇到了一个小问题。在表格中,我想使用输出前三个元素(二聚体、Atom1、Atom2)multicolumn
。\raisebox
这是我的代码的输出 latex 输出
也是我想要的。
我的代码如下,
\documentclass[11pt,a4paper,english]{article}
\usepackage{multirow}
\usepackage{pdflscape, rotating}
\usepackage{booktabs}
\usepackage{epsf, graphicx, amsmath, amssymb, subfigure, hyperref, natbib, pdflscape, rotating, multirow, caption, longtable}
\usepackage[normalem]{ulem}
\usepackage[english]{babel}
\begin{document}
\begin{landscape}
\tiny \renewcommand{\arraystretch}{0.8} \setlength{\tabcolsep}{3pt}
\begin{longtable}[c]{@{}r*{27}{r}@{}}
\multirow{2}{*}{\raisebox{-\heavyrulewidth}{dimer}}& {\raisebox{-\totalheight}{Atom1}}& {\raisebox{-\totalheight}{Atom1}}& \multicolumn{6}{c}{EXP\textunderscore TOPXD} & \multicolumn{6}{c}{UBDB\textunderscore TOPXD} & \multicolumn{6}{c}{EXP\textunderscore TOPOND} & \multicolumn{6}{c}{OPT\textunderscore TOPOND} \\
\cmidrule(r){4-9} \cmidrule(r){10-15}\cmidrule(r){16-21}\cmidrule(r){22-27}
%dimer&Atom1&Atom2
& $R_{ab}$ & d1 & d1 & $\rho(r)$& $\nabla^{2}\rho(r)$ & $\epsilon$& $R_{ab}$ & d1 &d2 & $\rho(r)$& $\nabla^{2}\rho(r)$ & $\epsilon$& $R_{ab}$ & d1&d2 & $\rho(r)$& $\nabla^{2}\rho(r)$ & $\epsilon$& $R_{ab}$ & d1 &d2 & $\rho(r)$& $\nabla^{2}\rho(r)$ & $\epsilon$\\
%& $R_{ij}$(BPL) & d1 & d2& $\rho$ & $\Delta$& $\epsilon$ & $R_{ij}$(BPL) & d1 & d2& $\rho$ & $\Delta$& $\epsilon$& $R_{ij}$(BPL) & d1 & d2& $\rho$ & $\Delta$& $\epsilon$& $R_{ij}$(BPL) & d1 & d2& $\rho$ & $\Delta$& $\epsilon$ \\
\bottomrule
AA1&H(8)&O(10)&0.519&1.198&1.321&0.083&1.75&0.30&2.406&1.102&1.304&0.103&1.713&0.367&2.343&1.020&1.322&0.108&1.49&0.28&2.279&0.976&1.303&0.115&1.61&0.25\\
\end{longtable}
\end{landscape}
\end{document}
答案1
&
第二行缺少了一些。
我不会使用\multirow
前三个标题:它们的级别与“EXP_TOPXD”和其他标题的级别相同。如果你降低它们,它们所指的内容就会变得不清楚:读者可能会认为它们指的是标题本身,而不是它们下面的列。
我还用它siunitx
来打印漂亮的图形。
\documentclass[11pt,a4paper,english]{article}
\usepackage{pdflscape, rotating}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{siunitx}
\begin{document}
\begin{landscape}
\renewcommand{\arraystretch}{0.8}
\addtolength{\tabcolsep}{-4.04pt}
\tiny
\begin{longtable}{
@{}
ccc
*{24}{S[table-format=1.3,round-mode=places,round-precision=3]}
@{}
}
dimer& Atom1 & Atom1 &
\multicolumn{6}{c}{EXP\textunderscore TOPXD} &
\multicolumn{6}{c}{UBDB\textunderscore TOPXD} &
\multicolumn{6}{c}{EXP\textunderscore TOPOND} &
\multicolumn{6}{c}{OPT\textunderscore TOPOND} \\
\cmidrule(lr){4-9} \cmidrule(lr){10-15}\cmidrule(lr){16-21}\cmidrule(l){22-27}
&&&
{$R_{ab}$} & {d1} & {d2} & {$\rho(r)$} & {$\nabla^{2}\rho(r)$} & {$\epsilon$} &
{$R_{ab}$} & {d1} & {d2} & {$\rho(r)$} & {$\nabla^{2}\rho(r)$} & {$\epsilon$} &
{$R_{ab}$} & {d1} & {d2} & {$\rho(r)$} & {$\nabla^{2}\rho(r)$} & {$\epsilon$} &
{$R_{ab}$} & {d1} & {d2} & {$\rho(r)$} & {$\nabla^{2}\rho(r)$} & {$\epsilon$} \\
\midrule
AA1&H(8)&O(10)&0.519&1.198&1.321&0.083&1.75&0.30&2.406&1.102&1.304&0.103&1.713&0.367&2.343&1.020&1.322&0.108&1.49&0.28&2.279&0.976&1.303&0.115&1.61&0.25\\
AA1&H(8)&O(10)&0.519&1.198&1.321&0.083&1.75&0.30&2.406&1.102&1.304&0.103&1.713&0.367&2.343&1.020&1.322&0.108&1.49&0.28&2.279&0.976&1.303&0.115&1.61&0.25\\
AA1&H(8)&O(10)&0.519&1.198&1.321&0.083&1.75&0.30&2.406&1.102&1.304&0.103&1.713&0.367&2.343&1.020&1.322&0.108&1.49&0.28&2.279&0.976&1.303&0.115&1.61&0.25\\
AA1&H(8)&O(10)&0.519&1.198&1.321&0.083&1.75&0.30&2.406&1.102&1.304&0.103&1.713&0.367&2.343&1.020&1.322&0.108&1.49&0.28&2.279&0.976&1.303&0.115&1.61&0.25\\
\end{longtable}
\end{landscape}
\end{document}
请注意,它epsf
已被弃用二十多年,仅用于与较新的文档兼容。我已删除此特定示例不需要的大多数包。