3

I doing presentation in beamer (also I need to use LuaLatex, because of font), but I have a problem with one structure. Well I don't know what is wrong here, but a bond between ring and charge nitrogen is not working.

\documentclass[border=2mm]{standalone}
\usepackage{chemfig} 
\begin{document} 

        \schemestart
            \chemfig{=^[:0,.6]-[::60,.6](-[,.6]NH-[,.6]NH-[,.6](=^[:-60,.6]-[::60,.6]=^[::60,.6]-[::60,.6]=^[::60,.6]-[::60,.6]))=^[::60,.6]-[::60,.6]=^[::60,.6]-[::60,.6]}
            \arrow{->[\chemfig{H^+}]}
            \chemfig{=^[:30,.6]-[::60,.6]=^[::60,.6](-[:90,.6,,2]H_2\charge{90:2pt=$\scriptstyle \oplus$}{N})-[::60,.6]=^[::60,.6]-[::60,.6]}
        \schemestop
\end{document} 

And its look like this:

enter image description here

I dont think its a problem with packages, because i have similar bonds in other slides, and theyre fine.

1
  • 1
    "Is not working" does not explain much: How do you want the output to look like? Commented May 21 at 17:27

2 Answers 2

6

The problem is the 2 number at "(-[:90,.6,,2]H_2\charge..."

To wtite the rings use *6(-=-=-=)

This code is more simple:

\documentclass[border=2mm]{standalone}
\usepackage{chemfig} 
\begin{document} 
        \schemestart
        \chemfig{*6([:-30]-=-(-\charge{270:3pt=H}{N}-\charge{270:3pt=H}{N}-*6(-=-=-=))=-=)}
        \arrow{->[\chemfig{H^+}]}
        \chemfig{H_2\charge{90:2pt=$\scriptstyle \oplus$}{N}-*6(-=-=-=)}
        \schemestop
    \end{document}

enter image description here

3

I get the error no atom found at position 2 which also explains what is going wrong. Maybe you want the follwing (I only removed the ,,2 part before the H_2\charge molecule):

\documentclass[border=2mm]{standalone}
\usepackage{chemfig} 
\begin{document} 
        \schemestart
            \chemfig{=^[:0,.6]-[::60,.6](-[,.6]NH-[,.6]NH-[,.6](=^[:-60,.6]-[::60,.6]=^[::60,.6]-[::60,.6]=^[::60,.6]-[::60,.6]))=^[::60,.6]-[::60,.6]=^[::60,.6]-[::60,.6]}
            \arrow{->[\chemfig{H^+}]}
            \chemfig{=^[:30,.6]-[::60,.6]=^[::60,.6](-[:90,.6]H_2\charge{90:2pt=$\scriptstyle \oplus$}{N})-[::60,.6]=^[::60,.6]-[::60,.6]}
        \schemestop
\end{document} 

enter image description here

2
  • but there should be precisely conect between ring and Nitrogen, no with H or 2 Commented May 21 at 21:26
  • @MichałSzymankiewicz Well, you did not really state that in your question so I was unsure about this. But I think CrocoDuck's answer is probably about what you're after Commented May 22 at 19:23

You must log in to answer this question.

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