2

please consider the following

\documentclass{minimal}
\usepackage{chemfig, xstring}
\begin{document}
\definesubmol{allicin}{%
           % 1
     =[::90]S% 2
              (
        -[::60]% 3
        -[::60]% 4
        =[::-60]O% 5
              )
     -[::-60]S% 6
    -[::-60]% 7
     -[::60]% 8
     =[::-60]% 9
}% allicin end
\chemfig{[:180]!{allicin}}{allicin}
\end{document}

The molecule is written in a certain way (SMILES and then mol2chemfig!!) and then it is rotated and drawn.

Also the label appear somehow rotated, in fact it is not below, as expected but above the molecule.

I've been reading the manual, but it only reports \cheminitname which regulate the alignment of labels among different molecules.

Any idea, (beside rewriting the molecule, of course) on how to write the label under the molecule ?

In this case is not that difficult to rewrite the molecule, but in more complex cases, especially when mol2chemfig is involved, the task of rewrite a molecule may be hard and time consuming.

1 Answer 1

1

You used two parameters for \chemfig, but according to page 64 of the chemfig manual, only one parameter can be used. So the second parameter was just a group of text placed next to the molecule. Therefore I used \chembelow. I tried to modify it to get the picture of Allicin at Wikipedia, but it still requires some polishing.

\documentclass{minimal}
\usepackage{chemfig, xstring}
\begin{document}
\definesubmol{Allicin}{%
           O^{-}% 1
     >[::90]S^{+}% 2
              (
        -[::60]% 3
        -[::60]% 4
        =[::-60]% 5
              )
     -[::-60]S% 6
    -[::-60]% 7
     -[::60]% 8
     =[::-60]% 9
}% allicin end
\chembelow[9pt]{\chemfig{[:180]!{Allicin}}}{Allicin}
\end{document}

mwe

1
  • You're right !! I must stop working late at night ... I completely miss the \chemname part. I should wrote \chemname{\chemfig[][scale=1]{[:180]!{allicin}}}{allicin}.
    – Ottorino
    Apr 9, 2014 at 19:29

You must log in to answer this question.

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