# Chemfig - command arrow - alignment doesn't work

I'm writing my bachelor thesis. I wanted to insert a chemical equation, but the reactant and the product are not horizontally aligned well. I found in Chemfig manual a solution to this problem but when I write \arrow(.center--.base west){<=>[\ce{H2O}]}, TeXnicCenter returns 9 errors and in pdf document there is no equation at all. When I write only \arrow{<=>[\ce{H2O}]}, it works well ...

I'm using TeXnicCenter, MikTeX and SumatraPDF on Windows 7. I'm a beginner with LaTeX.

Thanks for help.

\documentclass{article}
\usepackage[czech]{babel}

\usepackage{chemfig}

\begin{document}

\schemedebug{true}
\schemestart
AA
% \arrow{<=>[xxx]} % works
\arrow(.base east--.base west){<=>[xxx]}
BB
\schemestop

\end{document}

-
Welcome to TeX.sx! You seem to use two custom packages. Can you make an example that shows the problem and that we can compile, too? –  clemens Mar 9 '14 at 12:22
Thanks. Well, the example is above in the code: \schemedebug{true} \schemestart \chemfig{*6(-=(-CH=[:0,0.8]O)-(-CH=[:0,0.8]O)=-=)} \arrow{<=>[\ce{H2O}]} \chemfig{*6(-=(-(-[:30]OH)(-[:-90]OH))-(-CH=[:0,0.8]O)=-=)} \schemestop –  SabrielxD Mar 9 '14 at 12:43
No: the example is not complete: a complete example starts with \documentclass and ends with \end{document} - I or someone else can copy and compile the example then as is and reproduce your issue. –  clemens Mar 9 '14 at 13:03
The code above produces: ! LaTeX Error: File bakalarska_prace_en.sty' not found. because both bakalarska_prace_en and bakalarska_prace are packages that aren't part of a usual TeX distribution. Are they needed for the error? If so you should provide a link where to get them. Removing them and the dots from the preamble produces the error ! LaTeX Error: No \title given. and after that ! Undefined control sequence. for \ce... that means I have to fix quite a lot of errors before I can even try to look at your issue. –  clemens Mar 9 '14 at 13:18
Seems to be a conflict between babel with czech and chemfig. I'll edit your example to a smaller one that reproduces the issue clearly. then your private files aren't needed any more –  clemens Mar 9 '14 at 13:33

I was really a conflict between babel with czech and chemfig. I found the following solution on LaTeX community:

\documentclass[oneside,czech]{book}
\usepackage{babel}
\usepackage{chemfig}

\usepackage{etoolbox}
\pretocmd\schemestart{\shorthandoff{-}}{}{}
\apptocmd\schemestop{\shorthandon{-}}{}{}

\begin{document}

\schemestart
A \arrow(aa--bb) B
\schemestop

\end{document}
`

Thanks for help, cgnieder!

-