我有這個代碼:
\begin{center}
$\left.% Use `\left.` if don't want arrow on this side.
\begin{tabular}{r r r }
\toprule
strength & region & comments \\
\midrule
$H_B \ll H_0$ & Landau levels \\
$ H_B \lessapprox H_0 $& $n$-mixing & $n$ not good\\
& $\ell$-lmixing & $\ell$ not good \\
$H_B \ll B_0$ & Paschen-Back regime & $J$ noot good, $L$ and $S$ good \\
& Intermediate regime & $J$ and $I$ good, $F$ not good \\
& Zeeman effect & $F$ good \\
\bottomrule
\end{tabular}
\quad
\right\updownarrow% Use `\right.` if don't want arrow on this side.
\rotatebox[origin=100]{0}{Landau limit}$
\caption{HAILO}
\end{center}
生成:
我想要什麼:
如何使第一列(強度、區域、評論)中的條目以列內容為中心?
如何讓朗道極限文字位於表格的右上角,就像我用紅色箭頭繪製的那樣?
謝謝。
答案1
基於bigdelim
和,這個怎麼樣makecell
?標題的邊距是透過反覆試驗獲得的 - 它取決於最後一欄的文字。
\documentclass{article}
\usepackage{geometry}
\usepackage{amssymb}
\usepackage{caption, booktabs, bigdelim, makecell}%
\renewcommand{\theadfont}{\normalsize\bfseries}
\begin{document}
\begin{table}[!htb]
\centering
\captionsetup{margin={0pt,28mm},skip=6pt}
\caption{HAILO}
\begin{tabular}{r r r c@{}l}
\cmidrule[\heavyrulewidth]{1-3}
\thead{strength} & \thead{region} & \thead{comments} & \rdelim\updownarrow{7}{*} & Landau limit \\
\cmidrule{1-3}
$H_B \ll H_0$ & Landau levels \\
$ H_B \lessapprox H_0 $& $n$-mixing & $n$ not good\\
& $\ell$-lmixing & $\ell$ not good \\
$H_B \ll B_0$ & Paschen-Back regime & $J$ noot good, $L$ and $S$ good \\
& Intermediate regime & $J$ and $I$ good, $F$ not good \\
& Zeeman effect & $F$ good \\
\cmidrule[\heavyrulewidth]{1-3}
\end{tabular}
\end{table}
\end{document}
答案2
不使用表格的 booktabs(而是clines
相反),並使用帶有箭頭的 tikz,透過測試找到其高度:
\documentclass{article}
\usepackage{amssymb}
\usepackage{caption}
\usepackage{tikz}
\usepackage{multirow}
\begin{document}
\begin{center}
$% Use `\left.` if don't want arrow on this side.
\begin{tabular}[t]{r r r c l}\cline{1-3}
\multicolumn{1}{c}{strength} & \multicolumn{1}{c}{region} & \multicolumn{1}{c}{comments} &\multirow{6}{*}{\begin{tikzpicture}\draw[<->](0,0)--(0,2.9cm);\end{tikzpicture}}&Landau limit\\
\cline{1-3}
$H_B \ll H_0$ & Landau levels &&\\
$ H_B \lessapprox H_0 $& $n$-mixing & $n$ not good&&\\
& $\ell$-lmixing & $\ell$ not good &&\\
$H_B \ll B_0$ & Paschen-Back regime & $J$ noot good, $L$ and $S$ good &&\\
& Intermediate regime & $J$ and $I$ good, $F$ not good &&\\
& Zeeman effect & $F$ good &&\\
\cline{1-3}
\end{tabular}
\rotatebox[origin=100]{0}{}$
\captionof{table}{HAILO}
\end{center}
\end{document}
輸出:
PS:作為一個開始...
(OP的非工作範例所需的套件:
\usepackage{booktabs}
\usepackage{amssymb}
\usepackage{rotating}
和
\usepackage{caption}
修復\captionof{table}
而不是\caption{}
)
答案3
為了達到$\left...$
效果,需要一張[c]
表格。但為了對齊文本,需要一張[t]
表格。因此,我測量了[t]
表格並使用\raisebox
和 \rule
偽造了一個具有正確尺寸的居中物件。最後,表格的頂部基準實際上是\toprule
,所以我不得不將文字放入另一個表格的第二行。
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{amssymb}
\usepackage{caption, booktabs, graphics}%
\begin{document}
\begin{center}
\sbox0{\begin{tabular}[t]{r r r}
\toprule
\multicolumn{1}{c}{strength} & \multicolumn{1}{c}{region} & \multicolumn{1}{c}{comments} \\
\midrule
$H_B \ll H_0$ & Landau levels \\
$ H_B \lessapprox H_0 $& $n$-mixing & $n$ not good\\
& $\ell$-lmixing & $\ell$ not good \\
$H_B \ll B_0$ & Paschen-Back regime & $J$ noot good, $L$ and $S$ good \\
& Intermediate regime & $J$ and $I$ good, $F$ not good \\
& Zeeman effect & $F$ good \\
\bottomrule
\end{tabular}}%
\usebox0
\raisebox{\dimexpr 0.5\ht0-0.5\dp0 + 0.5\dp\strutbox-0.5\ht\strutbox}{$\left.\rule{0pt}{\dimexpr 0.5\ht0+0.5\dp0}\right\updownarrow$}%
\begin{tabular}[t]{l} \\Landau limit \end{tabular}
\captionof{table}{HAILO}
\end{center}
\end{document}