5

Clash between czech babel and chemacros in displaying reaction arrows, resulting in

chemformula error: "unknown-arrow"
The arrow type <-> doesn't exist on line 19.

If czech babel is switched of or spanish is used, it works.

How to make it work together? Repair it in similar way as done here?

Minimal working example:

\documentclass[a4paper,12pt]{article} 
% \usepackage[spanish,es-noquoting]{babel} %all working with spanish babel
\usepackage[czech]{babel} 
\usepackage{tikz} 
\usetikzlibrary{arrows}
\usepackage{chemmacros} 
\chemsetup{modules=all}
\chemsetup{formula=chemformula}

\begin{document} <<Test>>

\ch{1 glucosa_{(s)} <=>> glucosa_{(aq)}} %working

\ch{2 glucosa_{(s)} <-> glucosa_{(aq)}} %not working

\ch{3 glucosa_{(s)} -> glucosa_{(aq)}} %not working

\begin{reaction} 4 glucosa_{(s)} <=> glucosa_{(aq)} %working \end{reaction}

\begin{reaction} 5 glucosa_{(s)} <-> glucosa_{(aq)} %not working
\end{reaction}

<<Test>> 
\end{document}

Similar issues:

Spanish babel and chemformula package

Chemformula doesnt display arrows (not using dvips)

1
  • it's a similar problem: the character - is made active by czech babel, which you have to deactivate it when using these chemmacros commands. A catch-all solution is just to use \shorthandoff{-} before you use these \ch etc., and you can reactivate the shorthand with \shorthandon{-} after you're done.
    – Troy
    Commented Oct 1, 2018 at 21:25

1 Answer 1

2

Try turning off shorthands:

\usepackage[shorthands=off,czech]{babel}

You must log in to answer this question.

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