3

I want to align the chemical names of my components without moving the structure. Does someone have an idea how that works?

\schemedebug{true}
\schemestart
\setcrambond{2pt}{}{}
\chemname{\chemfig{H-[2,0.5](-[2,0.5]OH)-[,,,,
line width=2pt](-[6,0.5]OH)(-[2,0.5]H)>[1,0.7](-[6,0.5]OH)(-[2,0.5]H)-[3,0.7]
O-[4]?(-[2,0.3]-[3,0.5]OH)-[5,0.7](-[2,0.5]H)(-[6,0.5,,2]HO)<[7,0.7]}}{D-Glukose}
\arrow{-U>[\tiny ADP+NAD][\tiny ATP+NADH][][][60]}[,1.5]
2 \arrow{0}[,0]\chemname{\setatomsep{1.78500em}\chemfig{-[2](=[:150]O)-[:30](=[2]O)-[:-30]O^{-}}}{Pyruvat}
\arrow{-U>[\tiny NADH][\tiny NAD][][][60]}[,1.5]
2 \arrow{0}[,0]\chemname{\setatomsep{1.78500em}\chemfig{-[2](-[:150]OH)-[:30](=[2]O)-[:-30]O^{-}}}{Lactat}
\schemestop
\chemnameinit{} 
3

If you use \arrow(.base east--.base west) you'll see that \chemname does use the correct depth. The secret is choosing a suitable baseline for the molecules (remember that always the first atom inside a chemfig formula determines the baseline of the whole molecule).

\documentclass{article}
\usepackage{chemfig}
% \usepackage{showframe}
\begin{document}

\setatomsep{1.78500em}
\setcrambond{2pt}{}{}
\schemestart
  \setatomsep{1.5em}
  \chemname{%
    \chemfig{
      -[1,1.4](-[2]-[3]HO)-[,2]O-[7,1.4]
      (-[2]H)(-[6]OH)
      <[5,1.4](-[2]H)(-[6]OH)
      -[4,2,,,line width=2pt](-[2]H)(-[6]OH)
      >[3,1.4](-[6]H)(-[2]OH)
    }%
  }{D-Glukose}
  \arrow(.base east--.base west){-U>[\tiny ADP+NAD][\tiny ATP+NADH][][][60]}[,1.5]
  2
  \chemname{%
    \chemfig{O=[:-30](-[:-90])-[:30](=[:90]O)-[:-30]O^{-}}%
  }{Pyruvat}
  \arrow(.base east--.base west){-U>[\tiny NADH][\tiny NAD][][][60]}[,1.5]
  2
  \chemname{%
    \chemfig{HO-[:-30](-[:-90])-[:30](=[:90]O)-[:-30]O^{-}}%
  }{Lactat}
\schemestop

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.