Discussion:
Problem with 'mathtext' package after update of 'cyrillic' one
(too old to reply)
Vladimir Lomov
2018-04-09 01:59:30 UTC
Permalink
Raw Message
Hello,
today update of TeX Live 2018 (pretest) breaks in another way the same
document as 'latex' package earlier. The problem is with 'mathtext'
package from t2 bundle (https://ctan.org/pkg/t2).

I attached minimal example document to show the problem. This is
relevant part of .log file:

------------------------------ 8< --------------------------------
! Package inputenc Error: Unicode character П (U+41F)
(inputenc) not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type H <return> for immediate help.
...

l.15 П
рПба пера.
------------------------------ 8< --------------------------------


P.S. As for my previous report I decided to fix the '[]' portion of
'\ProvidesPackage' because that was much easier.

---
WBR, Vladimir Lomov
--
Money will say more in one moment than the most eloquent lover can in years.
Enrico Gregorio
2018-04-09 08:45:04 UTC
Permalink
Raw Message
Post by Vladimir Lomov
Hello,
today update of TeX Live 2018 (pretest) breaks in another way the same
document as 'latex' package earlier. The problem is with 'mathtext'
package from t2 bundle (https://ctan.org/pkg/t2).
I attached minimal example document to show the problem. This is
------------------------------ 8< --------------------------------
! Package inputenc Error: Unicode character П (U+41F)
(inputenc) not set up for use with LaTeX.
See the inputenc package documentation for explanation.
Type H <return> for immediate help.
...
l.15 П
роба пера.
------------------------------ 8< --------------------------------
P.S. As for my previous report I decided to fix the '[]' portion of
'\ProvidesPackage' because that was much easier.
---
WBR, Vladimir Lomov
Load mathtext after fontenc (and inputenc).

Ciao
Enrico
David Carlisle
2018-04-09 08:47:23 UTC
Permalink
Raw Message
the mathtext package redefines the latex format command
\DeclareFontEncoding@ command. Previously the inputenc utf8.def file
redefined it again and so the utf8 definitions were loaded. Now
effectively the load order is changed as inputenc is pre-loaded and so
the mathtext definition is in force, as a workaround you can put
\UseRawInputEncoding
at the top of the file which forces
\usepackage[utf8]{inputenc}
to be re-loaded and work as before.
or simply load mathtext later, after fontenc.

mathtext.sty will need a small update to avoid needing this, I'll work
something out later to suggest.

Thanks for the report,

David
Post by Vladimir Lomov
Hello,
today update of TeX Live 2018 (pretest) breaks in another way the same
document as 'latex' package earlier. The problem is with 'mathtext'
package from t2 bundle (https://ctan.org/pkg/t2).
I attached minimal example document to show the problem. This is
------------------------------ 8< --------------------------------
! Package inputenc Error: Unicode character П (U+41F)
(inputenc) not set up for use with LaTeX.
See the inputenc package documentation for explanation.
Type H <return> for immediate help.
...
l.15 П
роба пера.
------------------------------ 8< --------------------------------
P.S. As for my previous report I decided to fix the '[]' portion of
'\ProvidesPackage' because that was much easier.
---
WBR, Vladimir Lomov
--
Money will say more in one moment than the most eloquent lover can in years.
David Carlisle
2018-04-09 09:34:59 UTC
Permalink
Raw Message
Werner, Vladimir,

It's been reported on the texlive list that there is an issue with
mathtext.sty in the new latex release which essentially preloads
\usepackage[utf8]{inputenc]

\mathtext.sty defines \DeclareFontEncoding@ inputenc's utf8 support
redefines it again (to load dfu files for the unicode range covered by
the font) so previously it worked but now as utf8 is already in force
the utf8.def does not get reloaded and so mathtext.sty definition
stays in force and the t2.dfu file is not loaded in the example at the
end

A simple fix would be to add dfu loading to mathtext's version of
\DeclareFontEncoding@ something like:


\def\DeclareFontEncoding@#1#2#3{%
\expandafter
\ifx\csname T@#1\endcsname\relax
\def\***@elt{\noexpand\***@elt}%
\xdef\***@list{\***@list\***@elt{#1}%
{\***@family}{\***@series}%
{\***@shape}}%
\expandafter\let\csname#1-cmd\endcsname\@***@cmd
\expandafter\let\csname#1-tmcmd\endcsname\@***@tmcmd
% add
\begingroup
\wlog{Now handling font encoding #1 ...}%
\lowercase{%
\InputIfFileExists{#1enc.dfu}}%
{\wlog{... processing UTF-8 mapping file for font %
encoding #1}}%
{\wlog{... no UTF-8 mapping file for font encoding #1}}%
\endgroup
% end addition
\else
\@***@info{Redeclaring font encoding #1}%
\fi
\global\@namedef{T@#1}{#2}%
\global\@namedef{M@#1}{\***@M#3}%
\xdef\LastDeclaredEncoding{#1}%
\DeclareSymbolFont{#1letters}{#1}\rmdefault\mddefault\updefault
}



David


%\UseRawInputEncoding
\documentclass{article}

\usepackage{mathtext}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}

\begin{document}

Проба пера.

\end{document}
Post by David Carlisle
the mathtext package redefines the latex format command
redefined it again and so the utf8 definitions were loaded. Now
effectively the load order is changed as inputenc is pre-loaded and so
the mathtext definition is in force, as a workaround you can put
\UseRawInputEncoding
at the top of the file which forces
\usepackage[utf8]{inputenc}
to be re-loaded and work as before.
or simply load mathtext later, after fontenc.
mathtext.sty will need a small update to avoid needing this, I'll work
something out later to suggest.
Thanks for the report,
David
Post by Vladimir Lomov
Hello,
today update of TeX Live 2018 (pretest) breaks in another way the same
document as 'latex' package earlier. The problem is with 'mathtext'
package from t2 bundle (https://ctan.org/pkg/t2).
I attached minimal example document to show the problem. This is
------------------------------ 8< --------------------------------
! Package inputenc Error: Unicode character П (U+41F)
(inputenc) not set up for use with LaTeX.
See the inputenc package documentation for explanation.
Type H <return> for immediate help.
...
l.15 П
роба пера.
------------------------------ 8< --------------------------------
P.S. As for my previous report I decided to fix the '[]' portion of
'\ProvidesPackage' because that was much easier.
---
WBR, Vladimir Lomov
--
Money will say more in one moment than the most eloquent lover can in years.
Werner LEMBERG
2018-04-09 10:04:48 UTC
Permalink
Raw Message
Hello David, and – after a looong time – hello Vladimir!
Post by David Carlisle
It's been reported on the texlive list that there is an issue with
mathtext.sty in the new latex release which essentially preloads
\usepackage[utf8]{inputenc]
redefines it again (to load dfu files for the unicode range covered
by the font) so previously it worked but now as utf8 is already in
force the utf8.def does not get reloaded and so mathtext.sty
definition stays in force and the t2.dfu file is not loaded in the
example at the end
Uh, oh, a ghost from the past! I can't remember at all that I wrote
\DeclareTextMathSymbol... :-)
Post by David Carlisle
A simple fix would be to add dfu loading to mathtext's version of
\expandafter
% add
\begingroup
\wlog{Now handling font encoding #1 ...}%
\lowercase{%
\InputIfFileExists{#1enc.dfu}}%
{\wlog{... processing UTF-8 mapping file for font %
encoding #1}}%
{\wlog{... no UTF-8 mapping file for font encoding #1}}%
\endgroup
% end addition
\else
\fi
\xdef\LastDeclaredEncoding{#1}%
\DeclareSymbolFont{#1letters}{#1}\rmdefault\mddefault\updefault
}
Thanks, looks good! Vladimir, can you add this and quickly do a new
release so that a fix is available in the forthcoming TeXLive release?
IIRC, it was always you who did releases of T2 stuff...


Werner
Karl Berry
2018-04-13 22:12:22 UTC
Permalink
Raw Message
Vladimir's test document:

\documentclass{article}

\usepackage{mathtext}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
[...]

works for me without change in the current (TL pretest) LaTeX2e. That is
a nice surprise :). I hope it is expected behavior. --thanks, karl.
Karl Berry
2018-04-13 22:29:33 UTC
Permalink
Raw Message
Unless you have an update to t2/mathtext.sty not yet checked in,

I don't.

not the expected behaviour

I was afraid of that. Oh, I see my error now. Never mind. Spurious success :(.

Ok, I've been discussing this with Werner and VladimirL. All we could
think of to do is for me install your change to mathtext.sty in TL (with
some sort of version ident change too :). There is no way anyone is
going to create an update to the t2 package any time soon -- t2 is
effectively looking for a maintainer, according to my understanding.
(VladimirV has been sadly absent from TeX for a while now, and Werner
can't take it on.)

Unless you think it's better to force mathtext users to update any
newly failing documents by changing package load order, etc. --thanks, karl.
David Carlisle
2018-04-13 22:41:41 UTC
Permalink
Raw Message
Karl changing at tl would be better than nothing, better would be to
update mathtext.dtx at ctan.
I'd be happy to do that if ctan would allow me just to upload
mathtext.{dtx,ins} into
https://ctan.org/tex-archive/macros/latex/contrib/t2/etc
I don't have the resources (or cyrillic understanding) to take over
(or even build) the whole t2 collection but I could fairly reliably
update mathtext.dtx.

David
Post by Karl Berry
Unless you have an update to t2/mathtext.sty not yet checked in,
I don't.
not the expected behaviour
I was afraid of that. Oh, I see my error now. Never mind. Spurious success :(.
Ok, I've been discussing this with Werner and VladimirL. All we could
think of to do is for me install your change to mathtext.sty in TL (with
some sort of version ident change too :). There is no way anyone is
going to create an update to the t2 package any time soon -- t2 is
effectively looking for a maintainer, according to my understanding.
(VladimirV has been sadly absent from TeX for a while now, and Werner
can't take it on.)
Unless you think it's better to force mathtext users to update any
newly failing documents by changing package load order, etc. --thanks, karl.
Karl Berry
2018-04-13 22:51:22 UTC
Permalink
Raw Message
I've updated mathtext.sty with your patch from
http://tug.org/pipermail/tex-live/2018-April/041437.html.
Thanks.

I think/hope this will be the last change for TL18. -k

Loading...