Closed kberry closed 1 week ago
Yes, so it seems that this, and a few similar such “dangerous box” leftovers (from plain) do need some action: either fixing, or perhaps removing from “basic LaTeX math”?
But note that these two “over arrow constructs” are not dangerous in amsmath — The continued presence of such problematic constructs from plain is one of the many reasons why we have moved to recommending firmly that: if you require anything beyond the most trivial mathmode stuff, then use amsmath!
Thanks for pointing this out to us, and apologies for the delayed response.
Looking at this again, I think there is nothing really that should be changed or improved. As far as I can tell the macros have been supposed to work outside of math, they just happen to do to a certain extend in the plain TeX version, but with the caveat that they do not start a paragraph and also with an odd syntax as the argument is processed as math.
With amsmath
, however, they are required to be inside math (as they should) and generate an error.
Now we could force the amsmath behavior but all that would do now is to break old documents that misused the "feature", or we could add \leavevmode
but that would look as if we endorse the usage in text, and I really do think we do, given that one day a form of amsmath may just be autoloaded into the kernel.
So m conclusion is to do nothing and leave it for the time being as a slight oddity.
As far as I can tell the macros have been supposed to work outside of math
a negation missing ... have not been supposed ... is what I wanted to write
ok. how about at least documenting their existence in base latex?
documenting what Karl? point is eventually the usage in text will break, i.e., the moment amsmath is loaded or the moment accessibility comes into play, so I could now write, don't do this, but who is going to read this in the sources?
their existence for math. not text.
I'm a bit lost, why those and not all the others? None of these kind of math constructions are documented in sourc2e other than by their definition (section 6-4-10) and nobody would look for them there I would think. The are documented in the LaTeX Companion though (3rd ed on page II-183, but also in earlier editions). Maybe also in Lamport already, but I'm too lazy to run upstairs now to check.
I was thinking usrguide, on the premise that all public macros should be mentioned in the public documentation. But, looking for various other macros, I guess that is not a goal. Closing.
This issue has been automatically marked as stale because it has not had recent activity.
\overrightarrow and \overleftarrow are defined in fontdef.dtx starting with \vbox. Should they start with your equivalent of \leavevmode so that
\overrightarrow{x} \overleftarrow{y}
doesn't come out on two separate lines?Alternatively, maybe they should start with {\mathop... like \overbrace and \underbrace? That would also have the advantage of giving an error when not used in math mode, like {over,under}brace and {over,under}line.
Also, I don't see \over{right,left}arrow in the documentation. I just grepped for over.*arrow in doc/latex/base/, so maybe that's not enough.
Trivial doc with all these commands for comparison follows. Thanks.