2

I'm making a reference document for my students regarding the 14 Bravais lattices. I've gotten this table to work but it is messy. Does anyone have suggestions on how to clean it up? (I've added the figures to this post so folks can compile the code on their own to see what I mean. Someday when I have time, I'll make these in tikz, but not this year.)

\documentclass[11pt]{article} 
\usepackage[utf8]{inputenc} 
\usepackage{geometry}
\geometry{a4paper} 

\usepackage{graphicx} 
\usepackage{booktabs} 
\usepackage{array} 
\usepackage{multirow}
\usepackage{amssymb}
\usepackage{amsmath}


\begin{document}

\begin{table}\centering
\begin{tabular}{|c|c|c|cccc|c|} \hline
    &   &   & \multicolumn{4}{c|}{variants}             
                            &   \\ 
%Lattice \#     
    &   
        & system        
            & p     &bo-c           
                    & fc  & ba-c                                    
                            &   \\ \hline
1   & \multirow{3}*{$\alpha=\beta=\gamma=90^\circ; a= b= c$}
         & \multirow{3}*{cubic}
            &{\Huge \checkmark }    
                &   &   &   &\multirow{3}*{\includegraphics[width=20mm]{cubic.png}}
                                \\ 
2   & 
        &      &    & {\Huge \checkmark }
                    &   &      &    \\
3   &   &   &   &   & {\Huge \checkmark }
                        &       &   \\ \hline
4   & \multirow{4}*{$\alpha=\beta=\gamma=90^\circ; a=b\neq c$}
        & \multirow{4}*{tetragonal }
            & {\Huge \checkmark }   
                &   &   &      &\multirow{4}*{\includegraphics[width=20mm]{tetragonal.png}  }
                                \\
5   &   &       &   & {\Huge \checkmark }   
                    &   &   &   \\
6   &   &       &   &   & {\Huge \checkmark }
                        &   &   \\
7   &   &       &   &   &   & {\Huge \checkmark }
                            &   \\ \hline
8   &$\alpha=\beta=90^\circ; \gamma=120^\circ; a=b\neq c$   
        & hexagonal     
            &{\Huge \checkmark }    
                &      &        &       & \includegraphics[width=25mm]{hexagonal.png} 
                                \\ \hline
9   &\multirow{5}*{$\alpha=\beta=90^\circ;  \gamma=120^\circ; a=b\neq c$}
    & \multirow{5}*{trigonal }      
            & {\Huge \checkmark }   
                &       &   &      & \multirow{5}*{ \includegraphics[width=20mm]{trigonal.png}}
                                \\                              
\multirow{4}*{10}   
    &   &   &   &   &   & \multirow{4}*{{\Huge \checkmark } }
                            &   \\ 
    &   &   &   &   &   &   &   \\
    &   &   &   &   &   &   &   \\                              
    &   &   &   &   &   &   &   \\ \hline
11  & \multirow{4}*{$\alpha=\beta=\gamma=90^\circ; a\neq b\neq c$}
        & \multirow{4}*{orthorhombic }
            &{\Huge \checkmark }    
                &   &   &   &  \multirow{4}*{\includegraphics[width=20mm]{orthorhombic.png} }
                                \\
\multirow{4}*{12}   
    &   &   &   & \multirow{4}*{{\Huge \checkmark } }
                &   &   &       \\ 
    &   &   &   &   &   &   &   \\
    &   &   &   &   &   &   &   \\ 
    &   &   &   &   &   &   &   \\  \hline
13  & $ \alpha=\gamma=90^\circ; \hfill \beta>90^\circ ; a\neq b \neq c$ 
        & monoclinic   
            &{\Huge \checkmark }    
                &   &   &   &    \includegraphics[width=20mm]{monoclinic.png}      
                                 \\ \hline
14
    & $\alpha \neq \beta \neq \gamma;  a\neq b\neq c$   
        & triclinic    
            &{\Huge \checkmark }    
                &   &   &   &   \includegraphics[width=20mm]{triclinic.png}
                                \\ \hline                           
\end{tabular}\end{table}

\end{document}

cubic hexagonal monoclinic orthorhombic tetragonal triclinic trigonal

2

This is not more difficult to type than your \multirow based table. The idea is to use inner tables for the multiple columns, exploiting the fact that normal sized objects will make the table rows aligned automatically.

\documentclass[11pt]{article} 
\usepackage[utf8]{inputenc} 
\usepackage{geometry}
\geometry{a4paper} 

\usepackage{graphicx} 
\usepackage{amssymb}
\usepackage{amsmath}

\newcommand{\cincludegraphics}[2][]{%
  \sbox0{\includegraphics[#1]{#2}}%
  \ht0=\dimexpr\ht0+3pt\relax
  \dp0=3pt
  \splitcell{\box0}%
}
\newcommand{\splitcell}[1]{%
  \begin{tabular}{@{}c@{}}#1\end{tabular}%
}
\newcommand{\bigcheckmark}{\smash{\Large\checkmark}}

\begin{document}

\begin{table}
\centering\small
\addtolength{\tabcolsep}{-1.4pt}

\begin{tabular}{|c|c|c|cccc|c|}
\hline
\# & & system & \multicolumn{4}{c|}{variants} & \\ 
& & & p & bo-c & fc  & ba-c & \\
\hline
\splitcell{1 \\ 2 \\ 3} &
$\alpha=\beta=\gamma=90^\circ; a= b= c$ &
cubic &
\splitcell{\bigcheckmark \\ \mbox{} \\ \mbox{}} &
\splitcell{\mbox{} \\ \bigcheckmark \\ \mbox{}} &
\splitcell{\mbox{} \\ \mbox{} \\ \bigcheckmark} &
&
\cincludegraphics[height=3\normalbaselineskip]{cubic.png} \\
\hline
\splitcell{%
  \mbox{} \\[-0.7\normalbaselineskip]
  4 \\ 5 \\ 6 \\ 7
  \\[-0.7\normalbaselineskip] \mbox{}%
} &
$\alpha=\beta=\gamma=90^\circ; a=b\neq c$ &
tetragonal &
\splitcell{%
  \mbox{}\\[-0.7\normalbaselineskip]
  \bigcheckmark \\ \mbox{} \\ \mbox{} \\ \mbox{}
  \\[-0.7\normalbaselineskip] \mbox{}%
} &
\splitcell{%
  \mbox{}\\[-0.7\normalbaselineskip]
  \mbox{} \\ \bigcheckmark \\ \mbox{} \\ \mbox{}
  \\[-0.7\normalbaselineskip] \mbox{}%
} &
\splitcell{%
  \mbox{}\\[-0.7\normalbaselineskip]
  \mbox{} \\ \mbox{} \\ \bigcheckmark \\ \mbox{}
  \\[-0.7\normalbaselineskip] \mbox{}%
} &
\splitcell{%
  \mbox{}\\[-0.7\normalbaselineskip]
  \mbox{} \\ \mbox{} \\ \mbox{} \\ \bigcheckmark
  \\[-0.7\normalbaselineskip] \mbox{}%
} &
\cincludegraphics[height=3\normalbaselineskip]{tetragonal.png} \\
\hline
8 &
$\alpha=\beta=90^\circ; \gamma=120^\circ; a=b\neq c$ &
hexagonal &
\bigcheckmark & & & &
\cincludegraphics[height=3\normalbaselineskip]{hexagonal.png} \\
\hline
\splitcell{9 \\[-0.5\normalbaselineskip] \mbox{} \\ 10} &
$\alpha=\beta=90^\circ; \gamma=120^\circ; a=b\neq c$ &
trigonal &
\splitcell{\bigcheckmark \\[-0.5\normalbaselineskip] \mbox{} \\ \mbox{}} & & &
\splitcell{\mbox{} \\[-0.5\normalbaselineskip] \mbox{} \\ \bigcheckmark} &
\cincludegraphics[height=3\normalbaselineskip]{trigonal.png} \\
\hline
\splitcell{11 \\[-0.5\normalbaselineskip] \mbox{} \\ 12} &
$\alpha=\beta=\gamma=90^\circ; a\neq b\neq c$ &
orthorhombic &
\splitcell{\bigcheckmark \\[-0.5\normalbaselineskip] \mbox{} \\ \mbox{}} &
\splitcell{\mbox{} \\[-0.5\normalbaselineskip] \mbox{} \\ \bigcheckmark} & & &
\cincludegraphics[height=3\normalbaselineskip]{orthorhombic.png} \\
\hline
13 &
$\alpha=\gamma=90^\circ; \beta>90^\circ ; a\neq b \neq c$ &
monoclinic &
\bigcheckmark & & & &
\cincludegraphics[height=3\normalbaselineskip]{monoclinic.png} \\
\hline
14 &
$\alpha \neq \beta \neq \gamma;  a\neq b\neq c$ &
triclinic &
\bigcheckmark & & & &
\cincludegraphics[height=3\normalbaselineskip]{triclinic.png} \\
\hline
\end{tabular}

\end{table}

\end{document}

enter image description here

With booktabs:

\documentclass[11pt]{article} 
\usepackage[utf8]{inputenc} 
\usepackage{geometry}
\geometry{a4paper} 

\usepackage{graphicx} 
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{booktabs}

\newcommand{\cincludegraphics}[2][]{%
  \sbox0{\includegraphics[#1]{#2}}%
  \ht0=\dimexpr\ht0+3pt\relax
  \dp0=3pt
  \splitcell{\box0}%
}
\newcommand{\splitcell}[1]{%
  \begin{tabular}{@{}c@{}}#1\end{tabular}%
}
\newcommand{\bigcheckmark}{\smash{\Large\checkmark}}

\begin{document}

\begin{table}
\centering\small

\begin{tabular}{@{}cccccccc@{}}
\toprule
\# & & system & \multicolumn{4}{c}{variants} & \\
\cmidrule(lr){4-7}
& & & p & bo-c & fc  & ba-c & \\
\midrule
\splitcell{1 \\ 2 \\ 3} &
$\alpha=\beta=\gamma=90^\circ; a= b= c$ &
cubic &
\splitcell{\bigcheckmark \\ \mbox{} \\ \mbox{}} &
\splitcell{\mbox{} \\ \bigcheckmark \\ \mbox{}} &
\splitcell{\mbox{} \\ \mbox{} \\ \bigcheckmark} &
&
\cincludegraphics[height=3\normalbaselineskip]{cubic.png} \\
\midrule
\splitcell{%
  \mbox{} \\[-0.7\normalbaselineskip]
  4 \\ 5 \\ 6 \\ 7
  \\[-0.7\normalbaselineskip] \mbox{}%
} &
$\alpha=\beta=\gamma=90^\circ; a=b\neq c$ &
tetragonal &
\splitcell{%
  \mbox{}\\[-0.7\normalbaselineskip]
  \bigcheckmark \\ \mbox{} \\ \mbox{} \\ \mbox{}
  \\[-0.7\normalbaselineskip] \mbox{}%
} &
\splitcell{%
  \mbox{}\\[-0.7\normalbaselineskip]
  \mbox{} \\ \bigcheckmark \\ \mbox{} \\ \mbox{}
  \\[-0.7\normalbaselineskip] \mbox{}%
} &
\splitcell{%
  \mbox{}\\[-0.7\normalbaselineskip]
  \mbox{} \\ \mbox{} \\ \bigcheckmark \\ \mbox{}
  \\[-0.7\normalbaselineskip] \mbox{}%
} &
\splitcell{%
  \mbox{}\\[-0.7\normalbaselineskip]
  \mbox{} \\ \mbox{} \\ \mbox{} \\ \bigcheckmark
  \\[-0.7\normalbaselineskip] \mbox{}%
} &
\cincludegraphics[height=3\normalbaselineskip]{tetragonal.png} \\
\midrule
8 &
$\alpha=\beta=90^\circ; \gamma=120^\circ; a=b\neq c$ &
hexagonal &
\bigcheckmark & & & &
\cincludegraphics[height=3\normalbaselineskip]{hexagonal.png} \\
\midrule
\splitcell{9 \\[-0.5\normalbaselineskip] \mbox{} \\ 10} &
$\alpha=\beta=90^\circ; \gamma=120^\circ; a=b\neq c$ &
trigonal &
\splitcell{\bigcheckmark \\[-0.5\normalbaselineskip] \mbox{} \\ \mbox{}} & & &
\splitcell{\mbox{} \\[-0.5\normalbaselineskip] \mbox{} \\ \bigcheckmark} &
\cincludegraphics[height=3\normalbaselineskip]{trigonal.png} \\
\midrule
\splitcell{11 \\[-0.5\normalbaselineskip] \mbox{} \\ 12} &
$\alpha=\beta=\gamma=90^\circ; a\neq b\neq c$ &
orthorhombic &
\splitcell{\bigcheckmark \\[-0.5\normalbaselineskip] \mbox{} \\ \mbox{}} &
\splitcell{\mbox{} \\[-0.5\normalbaselineskip] \mbox{} \\ \bigcheckmark} & & &
\cincludegraphics[height=3\normalbaselineskip]{orthorhombic.png} \\
\midrule
13 &
$\alpha=\gamma=90^\circ; \beta>90^\circ ; a\neq b \neq c$ &
monoclinic &
\bigcheckmark & & & &
\cincludegraphics[height=3\normalbaselineskip]{monoclinic.png} \\
\midrule
14 &
$\alpha \neq \beta \neq \gamma;  a\neq b\neq c$ &
triclinic &
\bigcheckmark & & & &
\cincludegraphics[height=3\normalbaselineskip]{triclinic.png} \\
\bottomrule
\end{tabular}

\end{table}

\end{document}

enter image description here

  • Thank you! I like the booktabs one best. My students have a much spiffier sheet now! – Marlann Patterson Feb 15 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.