2

I get some strange errors that I can't explain when I use mak4ht with my miktex distribution. Does anyone have an idea?

First there are two warnings: [WARNING] tocid: char-def module not found [WARNING] tocid: cannot fix section id's

Then I get "Missing \endcsname inserted" for each section and subserction, each repeated 5 times, the first howver with a wrong line number (855).

Best Christian

\documentclass[12pt,a4paper,notitlepage,german,twoside]{book}%
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage[ngerman]{babel}
\usepackage{eurosym}
\usepackage{amsfonts}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{minitoc}
\usepackage{verbatim}
\usepackage{hyperref}
\usepackage{textcomp}
\usepackage{tabularx}
\usepackage{etoc}


\begin{document}
\shorthandoff{"}
\part{Markt}
%\input{dynvwl-part1-markt.tex}
\chapter{test}
\section{test2}
test
\part{Übungen}
\end{document}

1 Answer 1

1

I don't get any error with your file, so it is possible that the error is caused by an older version of some packages on your system. Looking at the packages you use, I see that some of them are not useful with TeX4ht. Namely Minitoc and Etoc. You can include them conditionally, only when you don't compile your document with TeX4ht:

\documentclass[12pt,a4paper,notitlepage,german,twoside]{book}%
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage[ngerman]{babel}
\usepackage{eurosym}
\usepackage{amsfonts}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{verbatim}
\usepackage{hyperref}
\usepackage{textcomp}
\usepackage{tabularx}
\ifdefined\HCode\else
\usepackage{minitoc}
\usepackage{etoc}
\fi


\begin{document}
\shorthandoff{"}
\part{Markt}
%\input{dynvwl-part1-markt.tex}
\chapter{test}
\section{test2}
test
\part{Übungen}
\end{document}

If you still get the error, try to move more packages to this part:

\ifdefined\HCode\else
\usepackage{minitoc}
\usepackage{etoc}
\fi

These packages will be not used with TeX4ht.

3
  • Thanks for the idea. But it doesn't help. I even removed all packages. The error remains. I also chekced for updates, but there are non. Is it possible, that the miktex distribution is the problem?
    – ChristianB
    Commented Apr 18, 2023 at 13:59
  • @ChristianB I am afrad that it can certainly be caused by the fact that TeX4ht files in Miktex are sometimes quite old. The problem is that TeX4ht doesn't get updates to CTAN, but directly to TeX Live, so Miktex cannot pull them automatically.
    – michal.h21
    Commented Apr 18, 2023 at 14:18
  • Ok, thanks, maybe I'll try TeX Live then.
    – ChristianB
    Commented Apr 19, 2023 at 8:55

You must log in to answer this question.

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