I want two double columns of letters with arrows between. The headers should be centred above each of the double columns:
Header 1 Header 2
A B <=> C D
E F <=> G H
I'm using
cc@{$\Leftrightarrow$}cc
for the tabular body template and \multicolumn for the headers. However, when I write \multicolumn{2} the header is centred over the first double column plus the arrow.
Header 1 Header 2
A B <=> C D
E F <=> G H
Is there any way to achieve what I want without manually inserting arrows in every row?
\documentclass[11pt]{article}
\begin{document}
\begin{tabular}{cc@{$\Leftrightarrow$}cc}
%Header centred over first double column of letters, then omit arrow, then header centred over second double column of letters.
\multicolumn{2}{c}{Header 1}
&\multicolumn{2}{c}{Header 2}\\
%double column of letters, then arrow, then double column of letters
A& B& C& D\\
E& F& G& H\\
\end{tabular}
\end{document}
\documentclass[11pt]{article} \usepackage{array} \begin{document} \begin{tabular}{cc>{$\Leftrightarrow$}ccc} \multicolumn{2}{c}{Header 1} & \multicolumn{1}{c}{} &\multicolumn{2}{c}{Header 2}\\ A& B& &C& D\\ E& F& &G& H\\ \end{tabular} \end{document}
?