0

Thank you Micha for reminding me to this new question.

I followed the first steps for tex4ebook this weekend for the first time and got close to the finish. I follow a discussion here some years after the origin, and tried using tex4ebook. I think a last step seems not to work.

The last run of tex4ebook gives a problem with the encoding of german special characters, like ä, ü, ä, ß in the \index{Abhängigkeiten}.

In the .ind file you find this: Which says that xindy worked fine.

\begin{theindex}
  \providecommand*\lettergroupDefault[1]{}
  \providecommand*\lettergroup[1]{%
      \par\textbf{#1}\par
      \nopagebreak
  }
  \lettergroup{A}
  \item \idxkeyword{Abhängigkeiten}, \idxlocator{173}
  \item \idxkeyword{Absolutisten}, \idxlocator{127}

The ! message show the following lines:

 Missing \endcsname inserted.
<to be read again>
                   \let
l.9   \item \idxkeyword{Abhngigkeiten}
                                       , \idxlocator{173}

Obviously the character ä is omitted and give the problem.

My tex files is big, but the relevant code seems to be:

\documentclass[11pt]{report}
\usepackage[some options to set the page]{geometry}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage[ngermen]{babel}
... and some others which might be irrelevant here

Maybe some of you can say how to handle this last problem to get my first epub?

I really follow the advice oe Micha for tex4ebook, used the source codes presented here.

Thank you, Thomkrates

10
  • You should add a link to the question to which you refer.
    – dexteritas
    Mar 12 at 11:20
  • Welcome to TeX.SX! Please extend your code to a minimal working example (MWE).
    – dexteritas
    Mar 12 at 11:20
  • a full example would help but \usepackage[ansinew]{inputenc} makes everything harder, you can not post such code on this site as this site uses utf-8. the conversion is likely to be easier if you saved your file in utf-8 and deleted that line Mar 12 at 11:56
  • @David Carlisle thank you. I tried to put a small example to produce the problem, but the problem shows itself in the small example. Since my texeditor is utf8 encoded (Texstudio), but out of traditional reason I used ansinew in inputenc. All was well up to this point trying an epub with tex4ebook. I found, when I use \usepackage[utf8]{inputenc} I got an error "Invalid UTF-8 byte ..." concerning the special german character. But in the source is Ü Ä Ö ß used etc. and I do not know, if I should make something like \"a to mask that. Or whatever the problem is. I do not understand the problem.
    – Thomkrates
    Mar 12 at 14:17
  • I am not sure what you mean by "Since my texeditor is utf8 encoded (Texstudio), but out of traditional reason I used ansinew in inputenc" If the file is utf-8 encoded but you declare it as ansinew latex can not work at all, either generating normal pdf or ebook. The Ü Ä Ö ß you posted above are UTF-8, but the act of posting to this page will convert to that encoding. The question is what enoding is used in your file, I do not know texstudio but I am sure it will give an option to save as utf-8. Mar 12 at 14:23

1 Answer 1

1

In the comments the answer is hidden. Here in short:

I installed notepad++ editor and converted my sourcename.tex (which had been in ansinew encoding) all in utf8 encoding. And additionally changed the ansinew encoding of the sourcename.tex in \usepackage[utf8]{ìnputenc} which solved the problem here addressed.

You must log in to answer this question.

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