Math & ScienceSetting locant numbers in xymtex

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
tobiwan
Posts: 2
Joined: Thu Jul 02, 2009 5:33 pm

Setting locant numbers in xymtex

Post by tobiwan »

Hi all!

I want to set locant numbers on a xymtex formula. I got as far as the following, but I'd like to have the subscripts more left and not affecting the Carbon-Atoms to shift right. any suggestions?

This is as far as I got:

Code: Select all

    \documentclass{article}
    \usepackage{xymtex}
    \usepackage{chemist}
    \usepackage{upgreek}
    \pagestyle{empty}
    \begin{document}
    \begin{figure}
    \begin{center}
    \tetrahedral{0==C;1==\utrigonal{0==C;1==(yl);3D==O;2==O$^-$};2==$^+$H$_3$N;3==\tetrahedral{%
    0==C;1==(yl);2==H;4==H;3==\tetrahedral{0==C;1==(yl);2==H;4==H;3==\dtrigonal{0==C;1==(yl);2==O$^-$;3D==O}}};4==H}
    \hspace{5cm}
    \tetrahedral{0==$_{\upalpha}$\vspace{-10pt}C;1==\utrigonal{0==C;1==(yl);3D==O;2==O$^-$};2==$^+$H$_3$N;3==\tetrahedral{%
    0==$_{\upbeta}$\vspace{-2pt}C;1==(yl);2==H;4==H;3==\tetrahedral{0==$_{\upgamma}$\vspace{-2pt}C;1==(yl);2==H;4==COOH;3==\dtrigonal{0==C;1==(yl);2==O$^-$;3D==O}}};4==H}
    \end{center}
    \end{figure}
    \end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

fbf
Posts: 2
Joined: Thu Jul 23, 2009 12:03 am

Setting locant numbers in xymtex

Post by fbf »

Hi,
Not so elegant, but you can use \put(){}:

Code: Select all

\documentclass{article}
    \usepackage{xymtex}
    \usepackage{chemist}
    \usepackage{upgreek}
    \pagestyle{empty}
    \begin{document}
    \begin{figure}
    \begin{center}
    \tetrahedral{0==C;1==\utrigonal{0==C;1==(yl);3D==O;2==O$^-$};2==$^+$H$_3$N;3==\tetrahedral{%
    0==C;1==(yl);2==H;4==H;3==\tetrahedral{0==C;1==(yl);2==H;4==H;3==\dtrigonal{0==C;1==(yl);2==O$^-$;3D==O}}};4==H}
    \hspace{5cm}
    \tetrahedral{0==\put(-50,-40){$_{\upalpha}$}\vspace{-10pt}C;1==\utrigonal{0==C;1==(yl);3D==O;2==O$^-$};2==$^+$H$_3$N;3==\tetrahedral{%
    0==\put(-50,-40){$_{\upbeta}$}\vspace{-2pt}C;1==(yl);2==H;4==H;3==\tetrahedral{0==\put(-50,-40){$_{\upgamma}$}\vspace{-2pt}C;1==(yl);2==H;4==COOH;3==\dtrigonal{0==C;1==(yl);2==O$^-$;3D==O}}};4==H}
    \end{center}
    \end{figure}
    \end{document}
Bye,
Fabio
tobiwan
Posts: 2
Joined: Thu Jul 02, 2009 5:33 pm

Re: Setting locant numbers in xymtex

Post by tobiwan »

Thanks a lot! At this point elegant is not that important ;-)
Post Reply