Discussion:
mathtext.sty update?
2018-04-14 14:20:49 UTC
Raw Message
Hello,
I don't understand why, but VL's test document works for me with current
(pretest) TL, without inserting DavidC's change -- same mathtext.sty as
ever. So I guess the LaTeX people somehow fixed the conflict (without
saying so). Sorry I didn't test this before sending my earlier mail.
On the assumption that we shouldn't fix something that isn't broken,
unless one of you says otherwise, I won't make any changes to
mathtext.sty, and what we've got now is what will be released
.. --thanks, karl.
I have to apologize for delay with answer and the most for incorrect bug
report.

First, at time of the report I didn't remember for what purpose I used
to include the 'mathtext' package (I already faced some problem with the
package and could work without it), but before update of encoding
package all was fine while the package was included.

Second, it took time to remember and investigate what 'mathtext' package
do. I think it now has very little usage, may be no one uses it at
present.

how to use Russian in LaTeX documents (it dates 2002) and found out that
I had used the 'mathtext' package in wrong way: it has to be included
before 'babel' package not before all other packages (though searching
the Web I found several examples that suggest to include it _before_
'fontenc' and 'inputenc' packages), so my example was wrong from the
beginning!

For future reference I send this message to the TeX Live too.

This is WRONG example:

% WRONG.ltx
--------------------------------- 8< --------------------------------------
\documentclass{article}

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

\begin{document}

Проба пера. Формула: $a=b+\cos{x}+а+c_{г}$.

\end{document}
--------------------------------- 8< --------------------------------------

This is CORRECT example:

% CORRECT.ltx
--------------------------------- 8< --------------------------------------
\documentclass{article}

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

\begin{document}

Проба пера. Формула: $a=b+\cos{x}+а+c_{г}$.

\end{document}
--------------------------------- 8< --------------------------------------

The CORRECT example works fine with TeX Live 2017 and 2018, WRONG example
works only with TeX Live 2017 and with 2018 it gives already mentioned
error.

For the record: the 'mathtext' package as is shown in examples above
allows to use Russian letters (actually letters from T2A encoding) with
math mode as is. Without this package Russian letters can be used in
math mode by means of command '\text' provided by 'amsmath' package that
I recommend to include in any document dealing with math. The 'mathtext'
package is designed in such a way that Russian letters in math mode will
be typeset in upright font in contrast to Latin and Greek letters.

---
--
Moonchild without an opinion? Satan is skating to work tomorrow!
-- Brett Manz
David Carlisle
2018-04-14 14:27:08 UTC
Raw Message
I have to apologize for delay with answer and the most for incorrect bug
report.

No need to apologise, and while mathtext probably isn't used much and as you say
would work unchanged if the package order is adjusted, your report is
certainly correct
that a document that previously ran without error failed in the pretest.

The patch we made should make that document work again without
affecting other "better" uses.

David