[tex4ht] tex4ht and cej document class
Ulrike Fischer
news3 at nililand.de
Mon Jul 11 12:26:10 CEST 2011
Am Fri, 24 Jun 2011 17:29:55 +0200 schrieb Oliver Kopp:
> Hi,
>
> I'm trying to use the cej document class with LaTeX. The class is
> available at http://www.versita.com/cejcs/authors/
>
> The minimal example is:
>
> --cut--
> \documentclass[DVI]{cej}
> \begin{document}
> test
> \end{document}
> --end--
>
> It compiles fine with LaTeX, but tex4ht outputs following:
>
> --cut--
> (C:\tex4ht\texmf\tex\generic\tex4ht\latex.4ht
> ! You can't use `\gdef' after \the.
> <recently read> \gdef
>
> l.106 \edef\:today{\the\year-
> \ifnum \month<10 0\fi
> --end--
>
>
> I looked into cej.cls and produced a bare minimum example:
>
> \documentclass{article}
> \makeatletter
> \def\year#1{\expandafter\gdef\csname cej at year\endcsname{#1}}
> \makeatother
> \begin{document}
> test
> \end{document}
>
> This document compiles fine with latex, but tex4ht has the above problem.
>
> Is it possible to find a solution in latex.4ht or have I change cej.sty?
\year (like \month, \day \time) is a TeX-primitive (a register which
contains the current year). It is absolutly not a good idea that the
class redefines it.
Your small example works with latex, but you only need to add today
to get errors:
\documentclass{article}
\makeatletter
\def\year#1{\expandafter\gdef\csname cej at year\endcsname{#1}}
\makeatother
\begin{document}
test \today
\end{document}
--
Ulrike Fischer
More information about the tex4ht
mailing list