[tex-live] Problem with 'mathtext' package after update of 'cyrillic' one

David Carlisle d.p.carlisle at gmail.com
Mon Apr 9 11:34:59 CEST 2018

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

\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

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

  \ifx\csname T@#1\endcsname\relax
     \def\cdp at elt{\noexpand\cdp at elt}%
     \xdef\cdp at list{\cdp at list\cdp at elt{#1}%
                    {\default at family}{\default at series}%
                    {\default at shape}}%
     \expandafter\let\csname#1-cmd\endcsname\@changed at cmd
     \expandafter\let\csname#1-tmcmd\endcsname\@changed at tmcmd
% add
      \wlog{Now handling font encoding #1 ...}%
           {\wlog{... processing UTF-8 mapping file for font %
                      encoding #1}}%
           {\wlog{... no UTF-8 mapping file for font encoding #1}}%
% end addition
     \@font at info{Redeclaring font encoding #1}%
  \global\@namedef{M@#1}{\default at M#3}%





Проба пера.


On 9 April 2018 at 09:47, David Carlisle <d.p.carlisle at gmail.com> wrote:
> 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
> On 9 April 2018 at 02:59, Vladimir Lomov <lomov.vl at gmail.com> wrote:
>> 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.

More information about the tex-live mailing list