2

I don't seem to be able to get past the following error:

[4] [5] [6] [7] [8]
("C:\Program Files (x86)\MikTeX portable\tex\latex\lm\ot1lmr.fd")
("C:\Program Files (x86)\MikTeX portable\tex\latex\lm\omllmm.fd")
("C:\Program Files (x86)\MikTeX portable\tex\latex\lm\omslmsy.fd")
("C:\Program Files (x86)\MikTeX portable\tex\latex\lm\omxlmex.fd")
("C:\Program Files (x86)\MikTeX portable\tex\latex\lm\t1lmtt.fd") [9] [10]
(C:\infancia-y-prejuicio.4ct) [11] [12]
(C:\infancia-y-prejuicio.4ct) [13] [14] [1] [2]
Cap\'{\i }tulo 1.
! Extra \endcsname.
\language@active@arg~ ... ~@\string #1@\endcsname
                                                  \fi
l.242 \chapter {Pr├│logo}

?

The document is written in Spanish and of course it includes accents. Even the word for "chapter" includes an accent ("capítulo"), which might confuse htlatex? (Cap\'{\i }tulo 1. ! Extra \endcsname.)

In order to reproduce the error, a copy of the minimal working LaTeX code can be found here:

http://pastebin.com/raw/EF8yVTe9

My research so far:

This is a guide to configuring htlatex for a .tex written in Spanish:

This forum is talking about "~" being a problem, which I can't figure out what has to do with the "capítulo" error...

  • A minimal example of code is necessary – egreg Jan 23 '16 at 15:55
  • @egreg You are right. I pasted the minimal example of the code in this pastebin here: http://pastebin.com/raw/EF8yVTe9 . I will also edit the question and add this link. – Xavier Peña Jan 23 '16 at 16:01
  • You should try making it “more minimal”. If I do htlatex over the sample file, I get Undefined control sequence for \Hnewline. Please, add the command line you're using. – egreg Jan 23 '16 at 16:04
  • @egreg ah yes, that is one of the first htlatex errors I stumbled upon. I found here how it is solved: http://tex.stackexchange.com/questions/185349/error-using-pgfsysdriver-with-tex4ht-only-shows-up-with-texlive-2014-ok-with-t . Basically, you need to put this text I'll put in pastebin ( http://pastebin.com/raw/JHJaCVME ) in a file named pgfsys-tex4ht.defnext to the .tex, and the compiler will stop complaining. Miktex did fine without it though. About the command line, it is a simple htlatex infancia-y-prejuicio-test.tex. – Xavier Peña Jan 23 '16 at 16:12

1 Answers1

1

A minimal example showing the issue:

\documentclass{scrbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}

\begin{document}

\mainmatter

\chapter{Prólogo}

\end{document}

The fix: add es-notilde

\documentclass{scrbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish,es-notilde]{babel}

\begin{document}

\mainmatter

\chapter{Prólogo}

\end{document}

Note that hyperref should be the last package among those that you're loading.

egreg
  • 1,121,712