I'm currently using MiKTeX 2.9 on Windows 7 and can't get to compile a French document correctly. Here is a very minimal example:
\documentclass[francais]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{hyperref}
\begin{document}
Voir \autoref{test}.
\begin{figure}
\caption{Test}
\label{test}
\end{figure}
\end{document}
pdflatex compiles this without any errors or warnings. htlatex will only produce the correct results if I specify another language, like ngerman. For francais, however, I get the following warning:
l.7 --- TeX4ht warning --- \Link{x1-21}? ---
! Missing \endcsname inserted.
<to be read again>
\special
l.7 Voir \autoref{test}
.
and this output in HTML if I ignore the warning:
Voir <a
href="#x1-21"><span class="frenchb-nbsp"> </span>:autoreffigure1</a>.
It seems that the activation of the colon character by babel conflicts with the internal command names used by TeX4ht. So I tried to use \shorthandoff{:} immediately after loading babel, as is suggested here, to no effect.
I also installed the newest version of frenchb.ldf from http://daniel.flipo.free.fr/frenchb/ (mentioned in babel documentation) and used the documentation there to alleviate some other problems. But the command \noextrasfrench, again issued right after loading babel, did not help either.
Then I resorted to directly editing frenchb.ldf -- I commented out any occurence of \initiate@active@char and \declare@shorthand containing colons. This produces the correct results, but throws warnings like this one:
! Missing control sequence inserted.
<inserted text>
\inaccessible
l.6 \begin{document}
Besides, it's hardly a permanent solution. Any help would be appreciated.
Thanks in advance.
PS. Just specifying a language without babel apparently translates expressions like "figure" in the above example -- does anyone now how that works and to what extent it is capable of internationalization/localization?
