I am trying to make my assignments look better. Here is the code and the current output:
\documentclass{article}
\usepackage[version=4,layout=stacked]{mhchem}
\usepackage{graphicx}
\usepackage{chemfig}
\usepackage{xymtexpdf}
\usepackage{tikz}
\begin{document}
How to align SOCl2/Peroxide and arrow to the middle of the ring, not the middle of the molecule?
Also how to do the same in xymtex?
\schemestart \chemfig{*6(----(-OH)--)} \arrow{->[SOCl$_2$]} \schemestop
\schemestart \chemfig{*6(-=-=(-CH_2-[::-90]CH=[:0]CH_2)-=)} \arrow{->[Peroxide]} \schemestop
The first sentence is correct with the correct placement of organic molecule , how to change xymtex to do the same in second?
(Correct) - Out of {\tiny\setchemfig{atom sep=1.5em}\chemfig{*6(--=-(-X)--)}} and {\tiny\setchemfig{atom sep=1.5em}\chemfig{*6(--=(-X)---)}} which is an example of allylic halide?
(Need Correction) - Out of \fbox{\cyclohexanev[b]{1==OH}} and \fbox{\cyclohexanev[b]{2==OH}} which is an example of allylic halide?
(correct) - \scalebox{0.6}{\schemestart \chemfig{NO_2-*6(-=-(-CH_2-CH_3)=-=)} \arrow{->[Br$_2$][UV Light]} \schemestop}
(incorrect) - \fbox{\ce{\bzdrh{1==NO$_2$;4==CH$_2$-CH$_3$} ->[Br_2, UV Light]}}
\end{document}
It might look huge, but its descriptive of my issue.
Here is the current output:
As you can see,
-
in the first example the SOCl2 arrow is slightly above the middle of the ring. i would like to align it with the middle of the cyclohexane ring ( not the molecule, just the ring)
-
same with the peroxide reaction as well
-
(3rd and 4th reaction/sentence)for the third reaction this is the correct output i would like that i am getting with chemfig, however i am more fond of how the ring is drawn on xymtex. how do i resize or shift, or remake in xymtex so that the molecule lines up with the text just like in chemfig?
-
(last two reactions with NO2 group) the arrow is lined up at the centre of the molecular with chemfig but its not when i do the same example with xymtex. how do i line up the reaction arrow?
Thanks in advance for your help folks!
Best Answer
I increased the length of the arrow, too
\schemestart
\chemfig{*6(---[@{a}]-(-OH)--)} \arrow(@{a}--){->[SOCl$_2$]}[,1.5]
\schemestop
\schemestart
\chemfig{*6(-=-[@{b}]=(-CH_2-[::-90]CH=[:0]CH_2)-=)} \arrow(@{b}--){->[Peroxide]}[,1.5]
\schemestop
You can use "quickreaction"
\documentclass{article}
\usepackage[version=4,layout=stacked]{mhchem}
\usepackage{xparse}
\usepackage{chemfig}
\usepackage{xymtexpdf}
\usepackage{tikz}
\usepackage[iupac]{quickreaction}
\begin{document}
\end{document}
\begin{quickreaction}
(incorrect) - & \hspace{1cm} \ce{\bzdrh{1==NO$_2$;4==CH$_2$-CH$_3$}} &\hspace{1cm} \ce{->[Br_2, UV Light]} \
\end{quickreaction}
It is possible to write (4) only with chemfig and quick reaction
\begin{quickreaction}
(incorrect) & \chemfig{O_2N-*6(=-=(-CH_2-CH_3)-=-)} & \quickarrow[Br$_2$][UV Light] \
\end{quickreaction}