[Tex/LaTex] Aligning chemical equations in a table

horizontal alignmentmhchemtables

I have a table containing some chemical equations, some with more than one line. Can I align all of them at their reaction arrows without some much space around it? Dividing the reactions into parts is my best solution so far:

\documentclass[10pt]{scrreprt}

    \usepackage[utf8]{inputenc} 
    \usepackage[a4paper,left=35mm,right=20mm, top=25mm, bottom=25mm]{geometry}
    \usepackage{textcomp}
    \usepackage[version=4]{mhchem} 
    \usepackage{booktabs}
    \usepackage{makecell}
    \usepackage{tabulary} 

\begin{document}

    \begin{tabulary}{\linewidth}{LrclR}
    corrosion product & \multicolumn{3}{c}{degradation process} & max. T\textcelsius\\
    \toprule
    Malachite & \ce{CuCO3.CH(OH)2} & \ce{->T[380\textcelsius]} & \ce{2CuO + H2O + CO2} & 380\\
    \addlinespace
    Azurite & \ce{2CuCO3.Cu(OH)2} & \ce{->T[320--355\textcelsius]} & \ce{CuCO3.Cu(OH)2 + CuO + CO2 + H2O} & 390\\
            & \ce{CuCO3.Cu(OH)2} & \ce{->T[390\textcelsius]} & \ce{CuO + O2 + H2O} & \\ 
    \addlinespace
    Atacamite & \ce{CU(OH)3Cl} & \ce{->T[250\textcelsius]} & \ce{CuO.CuCl2 + CuO +H2O} & 400\\
            & \ce{CuO.CuCl2 + 1/2 O2} & \ce{->T[400\textcelsius]} & \ce{2CuO + Cl2} & \\
    \bottomrule
   \end{tabulary}

\end{document}

But it looks rather ragged. Is there a more elegant way to do this?

Best Answer

You can get equal length central arrows by deciding which one is the widest:

\documentclass[10pt]{scrreprt}

\usepackage[utf8]{inputenc} 
\usepackage[a4paper,left=35mm,right=20mm, top=25mm, bottom=25mm]{geometry}
\usepackage{textcomp}
\usepackage[version=4]{mhchem} 
\usepackage{booktabs}

\newlength{\cewidth}
\newcommand{\cet}[1]{\makebox[\cewidth]{#1}}

\begin{document}

\settowidth{\cewidth}{\scriptsize 320--355\textcelsius}

\begin{tabular}{@{} l r@{}c@{}l r@{}}
\toprule
\begin{tabular}[t]{@{}c@{}} Corrosion \\ product \end{tabular} &
  \multicolumn{3}{c}{Degradation process} &
  \begin{tabular}[t]{@{}c@{}} Max.\\ T\textcelsius \end{tabular} \\
\midrule
Malachite
  & \ce{CuCO3.CH(OH)2} & \ce{->T[\cet{380\textcelsius}]} & \ce{2CuO + H2O + CO2} & 380\\
\addlinespace
Azurite
  & \ce{2CuCO3.Cu(OH)2} & \ce{->T[320--355\textcelsius]} & \ce{CuCO3.Cu(OH)2 + CuO + CO2 + H2O}
    & 390\\
  & \ce{CuCO3.Cu(OH)2} & \ce{->T[\cet{390\textcelsius}]} & \ce{ CuO + O2 + H2O} & \\ 
\addlinespace
Atacamite
  & \ce{CU(OH)3Cl} & \ce{->T[\cet{250\textcelsius}]} & \ce{CuO.CuCl2 + CuO +H2O} & 400\\
  & \ce{CuO.CuCl2 + 1/2 O2} & \ce{->T[\cet{400\textcelsius}]} & \ce{ 2CuO + Cl2} & \\
\bottomrule
\end{tabular}

\end{document}

enter image description here

With another trick you can center the header above the arrows:

\documentclass[10pt]{scrreprt}

\usepackage[utf8]{inputenc} 
\usepackage[a4paper,left=35mm,right=20mm, top=25mm, bottom=25mm]{geometry}
\usepackage{textcomp}
\usepackage[version=4]{mhchem} 
\usepackage{booktabs}

\newlength{\cewidth}
\newcommand{\cet}[1]{\makebox[\cewidth]{#1}}

\begin{document}

\settowidth{\cewidth}{\scriptsize 320--355\textcelsius}

\begin{tabular}{@{} l r@{}c@{}l r@{}}
\toprule
\begin{tabular}[t]{@{}c@{}} Corrosion \\ product \end{tabular} &
  & \makebox[0pt]{Degradation process} & &
  \begin{tabular}[t]{@{}c@{}} Max.\\ T\textcelsius \end{tabular} \\
\midrule
Malachite
  & \ce{CuCO3.CH(OH)2} & \ce{->T[\cet{380\textcelsius}]} & \ce{2CuO + H2O + CO2} & 380\\
\addlinespace
Azurite
  & \ce{2CuCO3.Cu(OH)2} & \ce{->T[320--355\textcelsius]} & \ce{CuCO3.Cu(OH)2 + CuO + CO2 + H2O}
    & 390\\
  & \ce{CuCO3.Cu(OH)2} & \ce{->T[\cet{390\textcelsius}]} & \ce{ CuO + O2 + H2O} & \\ 
\addlinespace
Atacamite
  & \ce{CU(OH)3Cl} & \ce{->T[\cet{250\textcelsius}]} & \ce{CuO.CuCl2 + CuO +H2O} & 400\\
  & \ce{CuO.CuCl2 + 1/2 O2} & \ce{->T[\cet{400\textcelsius}]} & \ce{ 2CuO + Cl2} & \\
\bottomrule
\end{tabular}

\end{document}

I insert the text in the column with the arrows, but inside \makebox[0pt]{...} which makes the text occupy no width (from the point of view of TeX) and stick on either side of this zero width box. Of course this can work only because the neighboring columns are wide enough.

enter image description here