
Ich habe die in diesem Beitrag gezeigte Tabelle gezeichnet, aber mir gefällt der Stil nicht besonders. Haben Sie eine Idee für ein besseres Design oder scheint es, als ob es doch in Ordnung wäre?
Vielen Dank im Voraus an alle!
Tabellenausgabe:
Code:
\documentclass{article}
\usepackage{tabu,booktabs,rotating,multirow}
\begin{document}
\begin{table}[H]
\centering
\caption{Divalent and trivalent metallic cations associations in anionic clays ($^{\star}$monovalent, $^{\star\star}$tetravalent)}
\label{tab:association}
\begin{tabu}{ccccccccccc}
\cmidrule[1pt]{3-11}
\multicolumn{1}{l}{} &
\multicolumn{1}{l}{} &
\multicolumn{9}{c}{\textbf{Divalent cations}} \\ \cline{3-11}
\multicolumn{1}{l}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{Mg} &
\multicolumn{1}{c|}{Mn} &
\multicolumn{1}{c|}{Fe} &
\multicolumn{1}{c|}{Co} &
\multicolumn{1}{c|}{Ni} &
\multicolumn{1}{c|}{Cu} &
\multicolumn{1}{c|}{Zn} &
\multicolumn{1}{c|}{Ca} &
\multicolumn{1}{c|}{Li$^{\star}$} \\ \cline{2-11}
\multicolumn{1}{|[1pt]c|}{\multirow{8}{*}{\begin{sideways}\textbf{Trivalent cations}\end{sideways}}} &
\multicolumn{1}{c|}{Al} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{$\times$} \\ \cline{2-11}
\multicolumn{1}{|[1pt]c|}{} &
\multicolumn{1}{c|}{Cr} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} \\ \cline{2-11}
\multicolumn{1}{|[1pt]c|}{} &
\multicolumn{1}{c|}{Mn} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} \\ \cline{2-11}
\multicolumn{1}{|[1pt]c|}{} &
\multicolumn{1}{c|}{Fe} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} \\ \cline{2-11}
\multicolumn{1}{|[1pt]c|}{} &
\multicolumn{1}{c|}{Co} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} \\ \cline{2-11}
\multicolumn{1}{|[1pt]c|}{} &
\multicolumn{1}{c|}{Ni} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} \\ \cline{2-11}
\multicolumn{1}{|[1pt]c|}{} &
\multicolumn{1}{c|}{La} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} \\ \cline{2-11}
\multicolumn{1}{|[1pt]c|}{} &
\multicolumn{1}{c|}{Ti$^{\star\star}$} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{$\times$} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} &
\multicolumn{1}{c|}{} \\ \cline{2-11}
\end{tabu}
\end{table}
\end{document}
Antwort1
Meiner bescheidenen Meinung nach würde die Tabelle besser aussehen, wenn (a) die Datenspalten alle die gleiche Breite hätten und (b) etwas enger beieinander stünden. Dies kann beispielsweise erreicht werden, indem man vom Spaltentyp c
zum w
Spaltentyp wechselt und den Wert von reduziert tabcolsep
, dem Parameter, der die Menge der Leerzeichen bestimmt, die auf beiden Seiten jeder Spalte eingefügt werden.
Allerdings würde ich auf jeden Fall auch praktisch alle Wrapper entfernen \multicolumn{1}{...}{...}
. Sie machen das Lesen des Codes ziemlich mühsam und erschweren außerdem das Anwenden von Änderungen oder Optimierungen.
\documentclass{article}
\usepackage{array} % for 'w' column type
\usepackage{rotating,multirow}
\newcommand\ts{$\times$} % handy shortcut macro
\begin{document}
\begin{table}
\setlength\tabcolsep{4pt} % default: 6pt
\setlength\extrarowheight{1.5pt} % for a more open "look"
\centering
\caption{Divalent and trivalent metallic cations associations in
anionic clays ($^{\star}$monovalent, $^{\star\star}$tetravalent)}
\label{tab:association}
\begin{tabular}{ *{2}{l|} *{9}{w{c}{4mm}|} }
\multicolumn{2}{l}{} & \multicolumn{9}{c}{\textbf{Divalent cations}} \\
\cline{3-11}
\multicolumn{2}{l|}{} & Mg & Mn & Fe & Co & Ni & Cu & Zn & Ca & Li$^{\star}$ \\
\cline{2-11}
\multirow{8.5}{*}{\begin{sideways}\textbf{Trivalent cations}\end{sideways}}
& Al & \ts & & \ts & \ts & \ts & \ts & \ts & \ts & \ts \\
\cline{2-11}
& Cr & & & & & \ts & \ts & \ts & & \\
\cline{2-11}
& Mn & & \ts & & & & & & & \\
\cline{2-11}
& Fe & \ts & & \ts & \ts & & & & & \\
\cline{2-11}
& Co & & & & \ts & \ts & & & & \\
\cline{2-11}
& Ni & & & & & \ts & & & & \\
\cline{2-11}
& La & & & & & \ts & & & & \\
\cline{2-11}
& Ti$^{\star\star}$ & & & & \ts & & & & & \\
\cline{2-11}
\end{tabular}
\end{table}
\end{document}
Nachtrag: Um das Erscheinungsbild der Tabelle und der zugehörigen Überschrift noch weiter aufzupeppen, könnte man das threeparttable
Paket laden und die \caption
Anweisung und die tabular
Umgebung in eine threeparttable
Umgebung einschließen. Auf diese Weise wird die Breite der Überschrift auf die Breite der tabular
Umgebung eingestellt. Diese Ergänzung, zusammen mit dem Weglassen derFettdruckder Zeilen- und Spaltenüberschriften und eine weitere Verringerung des Wertes \tabcolsep
(von 4pt auf 3pt) hätte folgendes Ergebnis:
\documentclass{article}
\usepackage{array} % for 'w' column type
\usepackage{rotating,multirow}
\usepackage{threeparttable} % for 'threeparttable' env.
\newcommand\ts{$\times$} % handy shortcut macro
\begin{document}
\begin{table}
\centering
\begin{threeparttable}
\setlength\tabcolsep{3pt} % default: 6pt
\setlength\extrarowheight{2pt} % for a more open "look"
\caption{Divalent and trivalent metallic cation associations in
anionic clays ($^{\star}$mono\-valent, $^{\star\star}$tetravalent)}
\label{tab:association}
\begin{tabular}{ *{2}{l|} *{9}{w{c}{4mm}|} }
\multicolumn{2}{l}{} & \multicolumn{9}{c}{Divalent cations} \\
\cline{3-11}
\multicolumn{2}{l|}{} & Mg & Mn & Fe & Co & Ni & Cu & Zn & Ca & Li$^{\star}$ \\
\cline{2-11}
\multirow{8.5}{*}{\begin{sideways} Trivalent cations \end{sideways}\,}
& Al & \ts & & \ts & \ts & \ts & \ts & \ts & \ts & \ts \\
\cline{2-11}
& Cr & & & & & \ts & \ts & \ts & & \\
\cline{2-11}
& Mn & & \ts & & & & & & & \\
\cline{2-11}
& Fe & \ts & & \ts & \ts & & & & & \\
\cline{2-11}
& Co & & & & \ts & \ts & & & & \\
\cline{2-11}
& Ni & & & & & \ts & & & & \\
\cline{2-11}
& La & & & & & \ts & & & & \\
\cline{2-11}
& Ti$^{\star\star}$ & & & & \ts & & & & & \\
\cline{2-11}
\end{tabular}
\end{threeparttable}
\end{table}
\end{document}
Antwort2
Also nahm ich dieAntwortvon @leandriis als Grundlage.
Habe Booktabs verwendet und die meisten Zeilen entfernt. Ich habe beide Zeilen in der ersten Zeile und Spalte beibehalten, um zu unterstreichen, dass die erste Spalte der ersten Zeile ähnelt. Sie können versuchen, sie zu entfernen. Außerdem ein anderes Symbol, daher „ amssymb
include“.
\documentclass{article}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{chemmacros}
\usepackage{caption}
\usepackage{amssymb}
\usepackage[column=0]{cellspace}
\begin{document}
\begin{table}
\centering
\caption{Mono- to tetravalent metallic cations associations in anionic clays }
\label{tab:association}
\begin{tabular}{c|*{10}{0c}}
\toprule
\multicolumn{1}{c|}{}
& \ch{Mg^{2+}} & \ch{Mn^{2+}}& \ch{Fe^{2+}} & \ch{Co^{2+}} & \ch{Ni^{2+}} & \ch{Cu^{2+}} & \ch{Zn^{2+}} & \ch{Ca^{2+}} & \ch{Li^{+}} \\
\midrule
\ch{Al^{3+}} & \checkmark & & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\
\ch{Cr^{3+}} & & & & & \checkmark & \checkmark & \checkmark & & \\
\ch{Mn^{3+}} & & \checkmark & & & & & & & \\
\ch{Fe^{3+}} & \checkmark & & \checkmark & \checkmark & & & & & \\
\ch{Co^{3+}} & & & & \checkmark & \checkmark & & & & \\
\ch{Ni^{3+}} & & & & & \checkmark & & & & \\
\ch{La^{3+}} & & & & & \checkmark & & & & \\
\ch{Ti^{4+}} & & & & \checkmark & & & & & \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
Antwort3
Hier ist ein weiterer Vorschlag:
\documentclass{article}
\usepackage{array,rotating,multirow, booktabs}
\usepackage[table, svgnames]{xcolor}
\usepackage{bbding}
\newcommand\xs{\cellcolor{Gainsboro!50!Lavender}\XSolid}
\newcommand{\mc}[1]{\multicolumn{1}{c}{\bfseries#1}}
\begin{document}
\begin{table}
\setlength\tabcolsep{4pt}
\setlength\extrarowheight{6pt}
\setlength{\aboverulesep}{0pt}
\setlength{\belowrulesep}{0pt}
\centering
\caption{Divalent and trivalent metallic cations associations
in anionic clays ($^{\star}$monovalent, $^{\star\star}$tetravalent)}
\label{tab:association}
\begin{tabular}{ *{2}{ >{\bfseries}l}!{\vrule width 1.2pt}w{c}{5mm} *{8}{|w{c}{5mm}}!{\vrule width 1.2pt}}
\multicolumn{1}{l}{} & \multicolumn{1}{l}{} &
\multicolumn{9}{c}{\textbf{Divalent cations}} \\
\multicolumn{2}{c}{} & \mc{Mg} & \mc{Mn} & \mc{Fe} & \mc{Co} & \mc{Ni} & \mc{Cu} & \mc{Zn} & \mc{Ca} & \mc{Li$^{\star}$} \\[1ex]
\cmidrule[1.2pt](l{-1.2pt}){3-11}
\multirow{8.5}{*}{\begin{sideways}\textbf{Trivalent cations}\end{sideways}\enspace}
& Al & \xs & & \xs & \xs & \xs & \xs & \xs & \xs & \xs \\
\cmidrule[0.4pt](l{-1.2pt}){3-11}
& Cr & & & & & \xs & \xs & \xs & & \\
\cmidrule[0.4pt](l{-1.2pt}){3-11}
& Mn & & \xs & & & & & & & \\
\cmidrule[0.4pt](l{-1.2pt}){3-11}
& Fe & \xs & & \xs & \xs & & & & & \\
\cmidrule[0.4pt](l{-1.2pt}){3-11}
& Co & & & & \xs & \xs & & & & \\
\cmidrule[0.4pt](l{-1.2pt}){3-11}
& Ni & & & & & \xs & & & & \\
\cmidrule[0.4pt](l{-1.2pt}){3-11}
& La & & & & & \xs & & & & \\
\cmidrule[0.4pt](l{-1.2pt}){3-11}
& Ti$^{\star\star}$ & & & & \xs & & & & & \\[-1.2pt]
\cmidrule[1.2pt](l{-1.2pt}){3-11}
\end{tabular}
\end{table}
\end{document}
Antwort4
Das Hinzufügen von winzigen Details zu Forschungsarbeiten oder Abschlussarbeiten lenkt ab und kann sogar beleidigend sein: Ein Experte auf dem Gebietweißüber Kationen, die zweiwertig oder dreiwertig oder beides sind (und der Gutachter einer Dissertation wird prüfen, obDuwissen Sie Bescheid). Daher würde ich die langen Beschriftungen weglassen; Sie können sie wieder einfügen, wenn Sie das möchten.
Der Vollständigkeit halber können der Überschrift selbst einige Einzelheiten hinzugefügt werden; das optionale Argument dient \caption
genau diesem Zweck: Sie können Informationen in die eigentliche Überschrift aufnehmen, ohne dass diese in der Tabellenliste enthalten sind.
Das Hinzufügen von Käfigen um Einträge ist ebenfalls störend. Etwas zusätzlicher Platz zwischen den Zeilen erleichtert das Verfolgen. Ich habe alle Zellen auf eine feste Breite von 1,5 em eingestellt und \Y
in der Eingabe verwendet, um den Code nicht zu überladen, sodass Sie die Eingabe sehr einfach visuell überprüfen können.
All das \multicolumn{1}{c|}{...}
ist böse! Die Zellen wurden bereits als deklariert c|
. Warum also überschreiben, nur um die gleiche Ausrichtung zu verwenden?
\documentclass{article}
\usepackage{array,booktabs,caption}
\begin{document}
\begin{table}[htp]
\centering
\caption
[Divalent and trivalent metallic cations associations in anionic clays]
{Divalent and trivalent metallic cations associations in anionic clays;
* is monovalent, ** is tetravalent, rows list trivalent
cations, columns list divalent cations}
\label{tab:association}
% local command for simplifying input and reading
\newcommand{\Y}{$\times$}
\begin{tabular}{@{} w{l}{1.5em} *{9}{w{c}{1.5em}} @{}}
\toprule
& Mg & Mn & Fe & Co & Ni & Cu & Zn & Ca & Li* \\
\midrule
Al & \Y & & \Y & \Y & \Y & \Y & \Y & \Y & \Y \\
\addlinespace
Cr & & & & & \Y & \Y & \Y & & \\
\addlinespace
Mn & & \Y & & & & & & & \\
\addlinespace
Fe & \Y & & \Y & \Y & & & & & \\
\addlinespace
Co & & & & \Y & \Y & & & & \\
\addlinespace
Ni & & & & & \Y & & & & \\
\addlinespace
La & & & & & \Y & & & & \\
\addlinespace
Ti** & & & & \Y & & & & & \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
Die Version mit den Beschriftungen. Da auch hier ein gewisses Maß an Raten erforderlich ist \multirow
, habe ich mich dafür entschieden, die gedrehte Beschriftung außerhalb der Tabelle zu platzieren und sie unten zu verankern, um das Raten zu erleichtern.
\documentclass{article}
\usepackage{array,booktabs,caption,rotating}
\begin{document}
\begin{table}[htp]
\centering
\caption
[Divalent and trivalent metallic cations associations in anionic clays]
{Divalent and trivalent metallic cations associations in anionic clays;
* is monovalent, ** is tetravalent, rows list trivalent
cations, columns list divalent cations}
\label{tab:association}
% local command for simplifying input and reading
\newcommand{\Y}{$\times$}
\rotatebox{90}{\makebox[11.5\normalbaselineskip]{Trivalent cations}}\quad
\begin{tabular}[b]{@{} w{l}{1.5em} *{9}{w{c}{1.5em}} @{}}
\toprule
& \multicolumn{9}{c}{Divalent cations} \\
& Mg & Mn & Fe & Co & Ni & Cu & Zn & Ca & Li* \\
\midrule
Al & \Y & & \Y & \Y & \Y & \Y & \Y & \Y & \Y \\
\addlinespace
Cr & & & & & \Y & \Y & \Y & & \\
\addlinespace
Mn & & \Y & & & & & & & \\
\addlinespace
Fe & \Y & & \Y & \Y & & & & & \\
\addlinespace
Co & & & & \Y & \Y & & & & \\
\addlinespace
Ni & & & & & \Y & & & & \\
\addlinespace
La & & & & & \Y & & & & \\
\addlinespace
Ti** & & & & \Y & & & & & \\
\bottomrule
\end{tabular}
\end{table}
\end{document}