Automated language support for chemnum

chemnum recently got automated language support and seems to work with both babel (and pdflatex) as well as polyglossia (and XeLaTeX).

Here are two examples:

\documentclass{article}
\usepackage[american,british,ngerman,french,italian,spanish]{babel}
\usepackage{chemnum}
\begin{document}
\selectlanguage{american}\cmpd{a,b,c}

\selectlanguage{british}\cmpd{a,b,c}

\selectlanguage{ngerman}\cmpd{a,b,c}

\selectlanguage{italian}\cmpd{a,b,c}

\selectlanguage{french}\cmpd{a,b,c}

\selectlanguage{spanish}\cmpd{a,b,c}

\end{document
}

\documentclass{article}
\usepackage{xltxtra}
\usepackage[babelshorthands]{polyglossia}
\setmainlanguage[variant=uk]{english}
\setotherlanguages{german,french,italian,spanish}
\usepackage{chemnum}
\begin{document}
\cmpd{a,b,c}

\textenglish[variant=us]{\cmpd{a,b,c}
}
% this is not correct, since it should use the serial comma
% => issue for chemnum v0.3d

\textgerman{\cmpd{a,b,c}}

\textitalian{\cmpd{a,b,c}}

\textfrench{\cmpd{a,b,c}}

\textspanish{\cmpd{a,b,c}}

\end{document
}

That’s sometimes how it goes: while preparing the short examples for this post I discovered, that the automated support for the serial comma and polyglossia doesn’t work. I’ll fix this.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>