PCTeX Talk Forum Index PCTeX Talk
Discussions on TeX, LaTeX, fonts, and typesetting
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

subscriptcorrection

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PCTeX Talk Forum Index -> MathTime Pro II Beta
View previous topic :: View next topic  
Author Message
zedler



Joined: 03 Mar 2006
Posts: 15

PostPosted: Fri Mar 24, 2006 6:38 am    Post subject: subscriptcorrection Reply with quote

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
Back to top
View user's profile Send private message
Michael Spivak



Joined: 10 Oct 2005
Posts: 52

PostPosted: Fri Mar 24, 2006 9:30 am    Post subject: Re: subscriptcorrection Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
jautschbach



Joined: 17 Mar 2006
Posts: 11

PostPosted: Fri Mar 24, 2006 9:49 am    Post subject: Re: subscriptcorrection Reply with quote

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.
Back to top
View user's profile Send private message
zedler



Joined: 03 Mar 2006
Posts: 15

PostPosted: Fri Mar 24, 2006 9:56 am    Post subject: Re: subscriptcorrection Reply with quote

Quote:
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
Back to top
View user's profile Send private message
Michael Spivak



Joined: 10 Oct 2005
Posts: 52

PostPosted: Fri Mar 24, 2006 12:43 pm    Post subject: Re: subscriptcorrection Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
WaS



Joined: 07 Feb 2006
Posts: 27
Location: Erlangen, Germany

PostPosted: Sat Mar 25, 2006 1:51 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
jautschbach



Joined: 17 Mar 2006
Posts: 11

PostPosted: Sun Mar 26, 2006 4:48 pm    Post subject: Re: subscriptcorrection Reply with quote

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}

\begin{equation}
a_\text{b}
\end{equation}

\end{document}
Back to top
View user's profile Send private message
Michael Spivak



Joined: 10 Oct 2005
Posts: 52

PostPosted: Sun Mar 26, 2006 5:33 pm    Post subject: Reply with quote

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 !!!!
Back to top
View user's profile Send private message Send e-mail
WaS



Joined: 07 Feb 2006
Posts: 27
Location: Erlangen, Germany

PostPosted: Sun Mar 26, 2006 5:34 pm    Post subject: Re: subscriptcorrection Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
jautschbach



Joined: 17 Mar 2006
Posts: 11

PostPosted: Mon Mar 27, 2006 8:42 am    Post subject: Re: subscriptcorrection Reply with quote

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
just bad style.


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.
Back to top
View user's profile Send private message
WaS



Joined: 07 Feb 2006
Posts: 27
Location: Erlangen, Germany

PostPosted: Mon Mar 27, 2006 9:22 am    Post subject: Re: subscriptcorrection Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Michael Spivak



Joined: 10 Oct 2005
Posts: 52

PostPosted: Mon Mar 27, 2006 9:55 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message Send e-mail
WaS



Joined: 07 Feb 2006
Posts: 27
Location: Erlangen, Germany

PostPosted: Mon Mar 27, 2006 12:43 pm    Post subject: Reply with quote

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"
instead. of "bad 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.
Back to top
View user's profile Send private message Visit poster's website
Michael Spivak



Joined: 10 Oct 2005
Posts: 52

PostPosted: Mon Mar 27, 2006 12:59 pm    Post subject: Reply with quote

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"
instead. of "bad 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.
Back to top
View user's profile Send private message Send e-mail
WaS



Joined: 07 Feb 2006
Posts: 27
Location: Erlangen, Germany

PostPosted: Tue Mar 28, 2006 5:54 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PCTeX Talk Forum Index -> MathTime Pro II Beta All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group