## subscriptcorrection

For feedback and discussion for testers of the MathTime Professional II fonts.

Moderators: PTIForAdmin, WaS, Michael Spivak

zedler
Posts: 15
Joined: Fri Mar 03, 2006 1:50 am

### subscriptcorrection

Hello,

\documentclass{book}
\usepackage{times,amsmath}
\usepackage[subscriptcorrection]{mtpro2}
\begin{document}
$a_\text{eff}$
\end{document}

The above example gives an error, can this be avoided without putting the subscript into extra braces?

Michael
Michael Spivak
Posts: 52
Joined: Mon Oct 10, 2005 2:10 pm

### Re: subscriptcorrection

zedler wrote:Hello,

\documentclass{book}
\usepackage{times,amsmath}
\usepackage[subscriptcorrection]{mtpro2}
\begin{document}
$a_\text{eff}$
\end{document}

The above example gives an error, can this be avoided without putting the subscript into extra braces?

Michael
No, and this shouldn't have anything to do with using the subscriptcorrection option. Whether or not it is used, _ will apply to the next token or group, and $a_\text$ should give an error
jautschbach
Posts: 11
Joined: Fri Mar 17, 2006 11:21 am

### Re: subscriptcorrection

Michael Spivak wrote: No, and this shouldn't have anything to do with using the subscriptcorrection option. Whether or not it is used, _ will apply to the next token or group, and $a_\text$ should give an error
That is not what I have experienced in the past. I have a number of documents where A_\text{B} was used in equations without problems but when I switched to MTPro (version 1) I had to change this to A_{\text{B}} in case I wanted to use the subscriptcorrection option. I didn't make a comparison with MTPro 2.
zedler
Posts: 15
Joined: Fri Mar 03, 2006 1:50 am

### Re: subscriptcorrection

No, and this shouldn't have anything to do with using the subscriptcorrection option. Whether or not it is used, _ will apply to the next token or group, and $a_\text$ should give an error
Omitting the subscriptcorrection option the example works fine.

Michael
Michael Spivak
Posts: 52
Joined: Mon Oct 10, 2005 2:10 pm

### Re: subscriptcorrection

jautschbach wrote:
Michael Spivak wrote: No, and this shouldn't have anything to do with using the subscriptcorrection option. Whether or not it is used, _ will apply to the next token or group, and $a_\text$ should give an error
That is not what I have experienced in the past. I have a number of documents where A_\text{B} was used in equations without problems but when I switched to MTPro (version 1) I had to change this to A_{\text{B}} in case I wanted to use the subscriptcorrection option. I didn't make a comparison with MTPro 2.
That's really weird. Would like to see an example. It certainly doesn't work with plain tex. I.e.,

\input amstex
$$a_\text{ff}$$
\bye

gives an error message with plain tex.
WaS
Posts: 27
Joined: Tue Feb 07, 2006 7:13 pm
Location: Erlangen, Germany
Contact:
I have consulted three LaTeX textbooks for beginners wrt/ this topic:
None of these implies that you may omit the braces after the underscore
(unless there follows one single character only, of course).
Also, I remember having learned that omitting the braces is "bad style",
and that I have to expect that it may not work.
jautschbach
Posts: 11
Joined: Fri Mar 17, 2006 11:21 am

### Re: subscriptcorrection

Michael Spivak wrote:
jautschbach wrote:
Michael Spivak wrote: No, and this shouldn't have anything to do with using the subscriptcorrection option. Whether or not it is used, _ will apply to the next token or group, and $a_\text$ should give an error
That is not what I have experienced in the past. I have a number of documents where A_\text{B} was used in equations without problems but when I switched to MTPro (version 1) I had to change this to A_{\text{B}} in case I wanted to use the subscriptcorrection option. I didn't make a comparison with MTPro 2.
That's really weird. Would like to see an example. It certainly doesn't work with plain tex. I.e.,

\input amstex
$$a_\text{ff}$$
\bye

gives an error message with plain tex.
I list an example below. a_\text{b} works when I use Y&Y MathTime (mathtimy), no MathTime, or mtproII without subscriptcorrection. With mtproII and "subscriptcorrection" I get an error message. I used recent versions of MiKTeX and Y&Y TeX, same result.

\documentclass[12pt,letterpaper]{article}
\usepackage{amsmath}

%% Font packages
\usepackage[LY1]{fontenc} %% needed for YandY TeX
\usepackage{times}
%%\usepackage[subscriptcorrection,slantedGreek,nofontinfo,boldalphabet]{mtpro2}
\usepackage{mathtimy}
\usepackage{bm}

\begin{document}

a_\text{b}

\end{document}
Michael Spivak
Posts: 52
Joined: Mon Oct 10, 2005 2:10 pm
OK, here's what's going on.

1. For some reason, amsmath.sty, or more precisely amstext.sty, which
it uses, puts an extra set of braces around the definition of \text. This
has the effect of making a_\text{b} work, even though any one reading the TeXBook, or any LaTeX manual would assume it _shouldn't_ work. I
guess some one thought this was a neat idea because people were often making the mistake of not typing a_{\text{b}}.

However, this extra set of braces doesn't help out when subscriptcorrection is used.
One _could_ make a special addition to the macros when subscriptcorrection is used that would allow
this, but this seem utterly ridiculous. Why, for example, should
a_\text{b} be OK, even though a_\hat{b} isn't !!!!
WaS
Posts: 27
Joined: Tue Feb 07, 2006 7:13 pm
Location: Erlangen, Germany
Contact:

### Re: subscriptcorrection

jautschbach wrote: a_\text{b} works when I use Y&Y MathTime (mathtimy)
I suppose it works only because you forgot to enable subscript
correction with mathtimy (if it supports subscript correction at all).

(If I'm wrong, I'd kindly ask you to send me the package code of
mathtimy.)

When I use (on a non-Y&Y-TeX-system) the old Y&Y mathtime.sty
with subscriptcorrection enabled, $a_\text{b}$ does not
work, wheras $_{\text{b}} does. The syntax "_\text.." may work, and it even does in most cases, but nobody has ever promised that it would always work. It's just bad style. jautschbach Posts: 11 Joined: Fri Mar 17, 2006 11:21 am ### Re: subscriptcorrection WaS wrote: jautschbach wrote: a_\text{b} works when I use Y&Y MathTime (mathtimy) I suppose it works only because you forgot to enable subscript correction with mathtimy (if it supports subscript correction at all). (If I'm wrong, I'd kindly ask you to send me the package code of mathtimy.) When I use (on a non-Y&Y-TeX-system) the old Y&Y mathtime.sty with subscriptcorrection enabled,$a_\text{b}$does not work, wheras$_{\text{b}} does.

The syntax "_\text.." may work, and it even does in most cases,
but nobody has ever promised that it would always work. It's
1. The topic of the discussion was related to the subscriptcorrection option in mtproII and whether a_\text{b} works at all, not about an option in mathtimy that may or may not exist

2. It really doesn't add much to the discussion if you keep pointing out that it is bad style. I think we all know that. As part of the mtproII beta testing I have responded to someone else's claim that $a_\text{b}$ never works and that the reported behavior has nothing to do with the subscriptcorrection of the mtpro package. As it turned out, under certain circumstances a_\text{b} does not lead to an error message but when using subscripcorrection it does. The question is whether the mtproII authors want to add support for a_\text{b} + subscriptcorrection or not.

3. Sometimes people use bad style LaTeX code as long as it works. Perhaps you want to contact the authors of the amsmath package and discuss this issue with them. In addition I suggest to add a line to the mtproII manual saying that bad style LaTeX such as a_\text{b} is not supported by MTProII. I suppose that should resolve the issue.
WaS
Posts: 27
Joined: Tue Feb 07, 2006 7:13 pm
Location: Erlangen, Germany
Contact:

### Re: subscriptcorrection

jautschbach wrote: In addition I suggest to add a line to the mtproII manual saying that bad style LaTeX such as a_\text{b} is not supported by MTProII. I suppose that should resolve the issue.
Since we agree that the syntax in question is officially unsupported,
anyway, this looks like an appropriate solution to me. I will add that
to the documentation.
Michael Spivak
Posts: 52
Joined: Mon Oct 10, 2005 2:10 pm
Perhaps the last post by jautschbach was made having read only WaS' reply, not mine.

I would like to point out that I never said anything about bad style. [In fact, in my opinion, it's crummy style to type extra braces when they are not needed. I always type \hat a, not \hat{a}, although I presume that
LaTeXites would always type the latter.]

My point was, and remains, that it's just a weird happenstance that
the amsmath package defines \text in such a way that a_\text{bc} works
[this wasn't the case with the original definition in amstex.tex], and
that this conflicts with virtually all other situations, like a_\hat{b}, which
don't work even when _ is used in the standard way; similarly, if a user
were to define a new command \mycmd with one argument, then
a_\mycmd{b} wouldn't work either.

If any remarks about style should be added, it should be that whoever added the extra braces to the definition of \text totally obfuscated the issue by creating a special anomalous case that will only serve to confuse everyone unnecessarily!
WaS
Posts: 27
Joined: Tue Feb 07, 2006 7:13 pm
Location: Erlangen, Germany
Contact:
Michael,
the issue is not specific for the \text command: For instance, in standard LaTeX
(without subscript correction) you can also write $a_\mathrm{b}$, whereas
$a_\hat{b}$ would not work. That's why omitting the braces in these cases is
dangerous and is never recommended. Maybe I should have written "sloppy style"

I suppose the programmers at AMS have defined \text the way they did, because
textual subscripts are often needed, and they wanted \text to behave in the same
way as \mathrm, even though this is neither documented nor advertised in any way.
Michael Spivak
Posts: 52
Joined: Mon Oct 10, 2005 2:10 pm
WaS wrote:Michael,
the issue is not specific for the \text command: For instance, in standard LaTeX
(without subscript correction) you can also write $a_\mathrm{b}$, whereas
$a_\hat{b}$ would not work. That's why omitting the braces in these cases is
dangerous and is never recommended. Maybe I should have written "sloppy style"

I suppose the programmers at AMS have defined \text the way they did, because
textual subscripts are often needed, and they wanted \text to behave in the same
way as \mathrm, even though this is neither documented nor advertised in any way.
Well, perhaps the best thing to say is that in certain situations, like
_\text and _\mathrm, braces happen not to be needed, even though
situations that look syntactically similar, like _\hat , do need them, so
leaving out braces can be considered dangerous style [rather than
"bad" or "sloppy"]. And that, in any case, when subscriptcorrection
is used, the braces are needed, so, although a foolish consistency is the hobglobin of small minds, a wise consistency will save a lot of unnecessary grief.
WaS
Posts: 27
Joined: Tue Feb 07, 2006 7:13 pm
Location: Erlangen, Germany
Contact:
good news:

Mike Spivak has found a new implementation for the subscript correction,
which should behave like standard LaTeX, i.e., _\text and _\mathrm should
no longer fail. There will soon be a beta release including this patch.