1

I am trying to create an array of chemical equations with the equations enumerated from (1) - (7) aligned left but only one reference enumeration on the right. The enumeration (1) - (7) should be aligned with the text. I tried it like that but than the enumberation on the left is centered with the rest of the equation and not in line with the text.

\begin{equation}
\begin{array}{lrcl}
(1)&\ch{2 A + O2_g &->& O2_{\:ads}}\\
(2)&\ch{O2_{\:ads} + 2 e^- &->& O2^{2-}_{\:ads}}\\
(3)&\ch{O2^{2-}_{\:ads} + 2 e^- &->& 2 O^{2-}_{\:ads}}\\
(4)&\ch{O^{2-}_{\:ads} + B &->& CO_{\:ads} + 2 e^- + A}\\
(5)&\ch{CO_{\:ads} &->& CO_{\:g} + B}\\
(6)&\ch{O^{2-}_{\:ads} + CO_{ads} &->& CO2_{\:ads} + 2 e^- + A}\\
(7)&\ch{CO2_{\:ads} &->& CO2_{\:g} + B}
\end{array}
\label{eq:sevenStep}
\end{equation}

but than the enumberation on the left is centered with the rest of the equation and not in line with the text.

5
  • 3
    Welcome to TeX.SE. How or where is \ch defined? Please advise.
    – Mico
    Dec 13 '20 at 12:41
  • 2
    @Mico \ch is defined by the chemformula package (even though the question was tagged with mhchem)
    – cgnieder
    Dec 13 '20 at 13:22
  • @cgnieder - Thanks.
    – Mico
    Dec 13 '20 at 13:27
  • Your current solution numbers mathematical equations and chemical reactions using the same counter. Probably you might want to use different counters for each of them. It might also be better to not use the same style of numbering for the individual steps as well as for the whole system of equations since a reference to "(1)" in the text now is ambiguous and could point to the whole system or just to the first step.
    – leandriis
    Dec 13 '20 at 13:33
  • Sorry for the confusion. As @cgnieder pointed out I mixed up the two packages!
    – maxgo
    Dec 14 '20 at 10:10
1

Edit: Considered is @leandriis comment below answer.

Like this?

enter image description here

(red lines indicate text borders)

\documentclass[12pt,letterpaper]{article}
\usepackage{chemformula}
\usepackage{nccmath}

\begin{document}
    \begin{fleqn}
\begin{equation}\label{eq:sevenStep}
    \begin{aligned}
(1) &\qquad&\ch{2 A + O2_g}          &\ch{-> O2_{\:ads}}\\
(2) &&\ch{O2_{\:ads} + 2 e^-}        &\ch{-> O2^{2-}_{\:ads}}\\
(3) &&\ch{O2^{2-}_{\:ads} + 2 e^-}   &\ch{-> 2 O^{2-}_{\:ads}}\\
(4) &&\ch{O^{2-}_{\:ads} + B}        &\ch{-> CO_{\:ads} + 2 e^- + A}\\
(5) &&\ch{CO_{\:ads}}                &\ch{-> CO_{\:g} + B}\\
(6) &&\ch{O^{2-}_{\:ads} + CO_{ads}} &\ch{-> CO2_{\:ads} + 2 e^- + A}\\
(7) &&\ch{CO2_{\:ads}}               &\ch{-> CO2_{\:g} + B}
    \end{aligned}
\end{equation}
    \end{fleqn}
\end{document}
3
  • In order to correct the output of -> to the original arrow, you might want to include it in the \ch command.
    – leandriis
    Dec 13 '20 at 13:36
  • chemistry is not my background :-). I found in OP code fragment more issues in writing chem formulate ...
    – Zarko
    Dec 13 '20 at 13:44
  • I think that is the solution I was looking for. Thank you very much!
    – maxgo
    Dec 14 '20 at 10:07
0

See if the following solution works for you. The idea of this solution is taken from the solution by Ian Thompson to a different question.

\documentclass{article}
\usepackage{amsmath}
\usepackage{chemformula}
\newcounter{number}
\setcounter{number}{0}
\newcommand\leftno{\addtocounter{number}{1} (\arabic{number})\quad }

\begin{document}

\begin{flalign}
\leftno & \ch{2 A + O2_g -> O2_{\:ads}}  &  \nonumber \\
\leftno & \ch{O2_{\:ads} + 2 e^- -> O2^{2-}_{\:ads}} & \nonumber\\
\leftno & \ch{O2^{2-}_{\:ads} + 2 e^- -> 2 O^{2-}_{\:ads}} & \nonumber\\
\leftno & \ch{O^{2-}_{\:ads} + B -> CO_{\:ads} + 2 e^- + A} & \label{eqn.sevenStep}\\ 
\leftno & \ch{CO_{\:ads} -> CO_{\:g} + B} & \nonumber\\
\leftno & \ch{O^{2-}_{\:ads} + CO_{ads} -> CO2_{\:ads} + 2 e^- + A} & \nonumber\\
\leftno & \ch{CO2_{\:ads} -> CO2_{\:g} + B} & \nonumber
\end{flalign}
   
\end{document}

enter image description here

Using \ce defined mhchem package, the arrows in the chemical equation would look much better. Here is a solution to the same using mhchem package.

\documentclass{article}
\usepackage{amsmath}

\usepackage[version=4,arrows=pgf{stealth}{0.085ex}]{mhchem}

\newcounter{number}
\setcounter{number}{0}
\newcommand\leftno{\addtocounter{number}{1} (\arabic{number})\quad }

\begin{document}

\begin{flalign}
\leftno & \ce{2 A + O2_g -> O2_{\:ads}}  &  \nonumber \\
\leftno & \ce{O2_{\:ads} + 2 e^- -> O2^{2-}_{\:ads}} & \nonumber\\
\leftno & \ce{O2^{2-}_{\:ads} + 2 e^- -> 2 O^{2-}_{\:ads}} & \nonumber\\
\leftno & \ce{O^{2-}_{\:ads} + B -> CO_{\:ads} + 2 e^- + A} & \label{eqn.sevenStep}\\ 
\leftno & \ce{CO_{\:ads} -> CO_{\:g} + B} & \nonumber\\
\leftno & \ce{O^{2-}_{\:ads} + CO_{ads} -> CO2_{\:ads} + 2 e^- + A} & \nonumber\\
\leftno & \ce{CO2_{\:ads} -> CO2_{\:g} + B} & \nonumber
\end{flalign}

\end{document}

enter image description here

1
  • 1
    Re: “the arrows in the chemical equation would look much better.” Besides this being a subjective opinion: you can change the tips of the arrows used by chemformula as well ;)
    – cgnieder
    Dec 13 '20 at 14:12

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.