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? 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. Commented Apr 18, 2023 at 14:18
  • Ok, thanks, maybe I'll try TeX Live then. Commented Apr 19, 2023 at 8:55

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.