4

I have this code:

\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}

that generates:

enter image description here

What I would like:

  • how can I make the entries in the first column (strengh, region, comments) centred with the columns contents?

  • How can I have the Landau limit text at the top right corner of the table, like I drew with the red arrow?

Thanks.

3 Answers 3

6

How about this, based on bigdelim and makecell? The margin for the caption was obtained by trial and error – it depends on the text of the last column.

\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} 

enter image description here

0
5

Without use of booktabs for the table (but clines instead) and with use of tikz with a n arrow that its height is found with tests:

\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}

Output:

enter image description here

PS: Just as a start...

(Needed packages for OP's non working example:

\usepackage{booktabs}
\usepackage{amssymb}
\usepackage{rotating}

and

\usepackage{caption}

for the fix with \captionof{table} instead of \caption{}

)

2

For the $\left...$ effect one needs a [c] tabular. But to align the text, one need a [t] tabular. So I measured the [t] tabular and used \raisebox and \rule to fake a centered object with the right size. Finally, the top baseline of the tabular is actually \toprule, so I had to put the text into the second line of another tabular.

\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} 

demo

1
  • Nice answer!... But your image is not as good as it should be (a recompilation was needed) +1
    – koleygr
    Commented Mar 10, 2019 at 8:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .