0

As the question described, how to implement the picture below in LaTeX ? Which package should I use?

enter image description here

2
2

With less arbitrary alignments:

\documentclass{article}
\usepackage{amsmath}
\usepackage{chemformula}

\begin{document}

\begin{align}
& \ch{PuF6} + 2\ch{PuF3} = 3\ch{PuF4} \quad\\
\quad-\quad \notag \\
& \ch{F2} + 2\ch{PuF3} = 2\ch{PuF4} \\[-1.2ex]
\cline{1-2}
& \ch{PuF6} = \ch{PuF4} + \ch{F2}
\end{align}

\end{document} 

enter image description here

1

Another solution with an alignat environment, chemformula and a \cmidrule:

\documentclass{article}
\usepackage{mathtools}
\usepackage{booktabs}
\usepackage{chemformula}

\usepackage{lipsum}

\begin{document}

{ \bfseries\boldmath\setlength{\aboverulesep}{-1.2ex}\setlength{\belowrulesep}{-0.5ex}
\begin{alignat}{2}
&\phantom{{}-{}} &\quad \ch{PuF6} + 2\ch{PuF3} & = 3\ch{PuF4} \\
 \notag &{}- {}& & \\
  & & \ch{F2} + 2\ch{PuF3} & = 2\ch{PuF4} \\
  \cmidrule[\heavyrulewidth](l{-0.6em}r{-1em}){1-4}
 & &\ch{PuF6} & = \ch{PuF4} + \ch{F2}
\end{alignat}
}
\end{document} 

enter image description here

3
  • \phantom{{}-{}} can be deleted... Jul 15 at 20:41
  • @PaulGaborit: No, because it helps the spacing of the minus sign. Of course, I could replace \quad with \hskip 1.5em to obtain a similar spacing, but it seems less natural (tp my eyes).
    – Bernard
    Jul 15 at 20:55
  • Here, if I delete \phantom{{}-{}}, the spacing remains the same ({}-{} on the second line is sufficient). Jul 16 at 4:44
0

Something like this:

\documentclass{article}
\usepackage{mathtools}
\usepackage{booktabs, tabularx}
\usepackage[version=4]{mhchem}

\usepackage{lipsum}

\begin{document}
\begin{tabularx}{\linewidth}{X}
\begin{gather}
    \ce{PuF6} + \ce{2PuF3} = 3\ce{Pu}   \\
\mathllap{-}\
    \ce{PuF6} + \ce{2PuF3} = 3\ce{Pu}
\end{gather}                                 \\[-5ex]
    \cmidrule[1pt](l{9em}r{9em}){1-1}        \\[-8ex]
\begin{gather}
    \ce{PuF6} + \ce{2PuF3} = 3\ce{Pu}
\end{gather}
\end{tabularx}

\lipsum[1][1-3]
\end{document}

enter image description here

1
  • Would look nicer with the = signs aligned. Jul 15 at 13:05

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.