[LaTeX] Re: beamer and inputenc (utf8x) issue

Zdenek Wagner zdenek.wagner at gmail.com
Fri Jul 1 10:26:29 CEST 2022


Hi,

in fact the problem is inputenc. The letters have \catcode 11, other
characters 12 (backslash is 0, left brace 1, right brace 2 etc).
Inputenc changes many of them to 13 which means "active". Such octets
act as macros and these definitions are loaded by inputenc from other
files. 8-bit engines assumes that each octet is a character but in
UTF8 a character needs up to 5 octets. If you read The TeXbook, you
will see that D. E. Knuth speaks about the mouth and stomach. Inputenc
means that actions, which were oroginally intended to happen in the
mouth, must be postponed to the stomach. It then causes problems in
constructs with \everypar, \futurelet etc. TCX tables and encTeX by
Petr Olšák solve partially the problem but there are still liitations.
If your input is in UTF8, it is better to use an engine working
internaly in Unicode, i.e luatex or xetex.

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml

pá 1. 7. 2022 v 10:13 odesílatel Walter Cazzola <cazzola at di.unimi.it> napsal:
>
> On Thu, 30 Jun 2022, Ulrike Fischer wrote:
>
> > Am Thu, 30 Jun 2022 15:09:51 +0200 (CEST) schrieb Walter Cazzola:
> >
> >> Dear TeX-perts,
> >> I'm using TeX live 2022 with a full and up-to-date installation on a linux
> >> box.
> >>
> >> Recently the combination between beamer and inputenc gives an error
> >>
> >>    ! Argument of � has an extra }.
> >>    <inserted text>
> >>                  \par
> >>    l.5 \begin{document}
> >>
> >>    ?
> >>    Runaway argument?
> >>    ! Paragraph ended before � was complete.
> >>    <to be read again>
> >>                     \par
> >>    l.5 \begin{document}
> >>
> >> and pdflatex gives up on generating  the output.
> >>
> >> This is a minimal example showing the issue:
> >>
> >> \documentclass[a4paper]{beamer}
> >>
> >> \usepackage[utf8x]{inputenc}
> >>
> >> \begin{document}
> >>
> >> \end{document}
> >>
> >> The example is so minimal than this sounds as a bug to me but maybe I'm still
> >> doing something wrong. Attached you have the corresponding log file.
> >>
> >> I know that the usage of utf8x is discouraged but this seems a bug that to
> >> some extends could impede its use also when is the only option.
> >
> > I wrote the maintainer of ucs some weeks ago and told them what they
> > must do if they want to stay compatible with the changes in hyperref
> > (which followed changes in the utf8 handling in latex).
> >
> > My advice is: don't to use utf8x/ucs anymore if it doesn't get
> > updated. It doesn't support the various improvement which have be
> > done in the utf8 handling in latex, for example you can't load files
> > with umlauts or use umlauts in \label with it.
> >
> > See also https://github.com/latex3/hyperref/issues/248
>
> Thank you very much to clarify the issue. I didn't dig enough to get that the
> problem was with hyperref rathern than with beamer. I will stop using utf8x.
>
> Walter
>
> --



More information about the tex-live mailing list.