3

I've been trying to set up this redox reaction for quite some time now, having searched the web for answers and being unable to find them I resorted to ask in here. I'm looking for a way to modify the code below so that hydrazine molecule can stay as a molecule but get the right amount of atoms, currently I'm only able to append a number to the last atom in the molecule, but not on the nitrogen atom, does anyone have a solution or workaround for this?

\documentclass[a4paper,danish,11pt,final]{article}

\usepackage{chemmacros}
\begin{document}

\vspace{7mm}
\ch{
"\OX{o1,\ox{0,N}\ox{0,Cl}}" {}2 + "\OX{r1,\ox{0,Cl}}" {}3
->
"\OX{o2,\ox{+1,Na}}" {}+ + 2 "\OX{r2,\ox{-1,Cl}}" {}-
}
\redox(o1,o2){\small OX: $- 2\el$}
\redox(r1,r2)[][-1]{\small RED: $+ 2\el$}
\vspace{7mm}

\end{document}

Ends up looking like this: pic

I wanna append the 2 to the Nitrogen instead of the Chlorine atom. We're looking at the first molecule here, I wanted to get that one setup before writing the rest out, seeing how the first one didn't go too well..

6
  • Welcome to TeX.sx! Which »code below«?
    – cgnieder
    Aug 17, 2015 at 9:43
  • Added in! Sorry about that, prematurely pressed enter or something and it posted.
    – Shisk
    Aug 17, 2015 at 9:47
  • Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.
    – Pouya
    Aug 17, 2015 at 9:50
  • Not ideal but: "\OX{o1,\ox{1,N}\chcpd{2}\ox{-1,Cl}}" {}2. Possibly "\OX{o1,\ox{1,N}\chcpd{2}\ox{-1,Cl}\chcpd{2}}"
    – cgnieder
    Aug 17, 2015 at 9:53
  • Pouya: I see what you're saying, will keep that in mind! clemens: Might not be too ideal, but it works, and that's all I really care about right now ;) Now how do I mark something as an answer on here, if that's possible?
    – Shisk
    Aug 17, 2015 at 9:57

1 Answer 1

2

You can use \chcpd inside \OX, \ox (and even \ch) for typesetting compounds. \chcpd is described in the manual for chemformula. In this case you can use it for adding the subscripts. It looks a bit clumsy but works…

\documentclass{article}
\usepackage{chemmacros}
\begin{document}

\ch{
"\OX{o1,\ox{1,N}\chcpd{2}\ox{-1,Cl}\chcpd{2}}" + "\OX{r1,\ox{0,Cl}}" {}3
->
"\OX{o2,\ox{+1,Na}}" {}+ + 2 "\OX{r2,\ox{-1,Cl}}" {}-
}
\redox(o1,o2){\small OX: $- 2\el$}
\redox(r1,r2)[][-1]{\small RED: $+ 2\el$}

\end{document}

enter image description here

3
  • From the perspective of chemistry, the above reaction equation is awfully wrong. Not balanced in atoms (5 chlorine atoms left, 2 on the right), and suggesting transformation of nitrogen N to sodium Na. But so equally is the one in the original question, too. Just spot because of a relevant question on chemistry.se.
    – Buttonwood
    Mar 4, 2023 at 11:32
  • @Buttonwood true ;)
    – cgnieder
    Mar 4, 2023 at 14:27
  • Do you want to advance to correct $\ce{N2Cl2}$ and $\ce{Cl3}$ to something to the result of $\ce{2 Na + Cl2 -> 2 Na+ + 2 Cl^-}$? Second surprise: chemistry.se has mhchem up and running in the bodies of questions, answers, and comments while tex.se does not. So far, I assumed mhchem would be a tool all across stackexchange, including tex.se (or at least here; if not mistaken, mhchem once started as usepackage for LaTeX, subsequently entered MathJax & Cie.
    – Buttonwood
    Mar 4, 2023 at 18:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .