Discussion:
Arrow head too large on \overarrowright
Dr A K Hannaby
2013-12-29 12:21:56 UTC
Permalink
Tug

No reply to this after 7+ days - anybody interested - seems a valid issue.

Keith







From: Dr A K Hannaby [mailto:***@mathshelp.com]
Sent: 14 December 2013 16:28
To: 'texhax-***@tug.org'
Subject: Arrow head too large on \overarrowright



Dear Tug



I attach a minimal file containing some code (as shown below) at about line
1200.



Near to line 1200

\noindent We would write
\hspace{39pt}$\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}$



The arrow head is much too big and touches the letters below - otherwise it
would be OK.



I tried using \vec but \vec only places an arrow over one character.



Is there a way of selecting a smaller arrow head, please, to alter the
\overarrowright?



Regards

Keith
Bob Tennent
2013-12-29 13:43:48 UTC
Permalink
|I attach a minimal file containing some code (as shown below) at
|about line
|1200.
1200+ lines isn't a minimal file. Just looking through the preamble
quickly I can see any number of possible conflicts. You use color
and xcolor, palatino and times and mathptmx, graphics and graphicx,
soul and ulem, etc.
|\noindent We would write
|\hspace{39pt}$\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}$
I suggest you start with this and *add* the packages you need to
make it work.

Bob T.
Bob Tennent
2013-12-29 14:29:59 UTC
Permalink
|\noindent We would write
|\hspace{39pt}$\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}$
|
|The arrow head is much too big and touches the letters below -
Following my own advice, I find that

\documentclass{article}
\begin{document}

$\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}$

\end{document}

demonstrates the issue. And I agree that it's a valid issue. The
current incarnation of arrows in LaTeX is a disaster. I always use
arrows from the picture environment to avoid them.

If you want to stick with conventional LaTeX arrows, a workaround
is to insert struts:

$\overrightarrow{\strut AB}+\overrightarrow{\strut BC}=\overrightarrow{\strut AC}$

Bob T.
Philip Taylor
2013-12-29 14:48:38 UTC
Permalink
\documentclass {minimal}
\begin {document}
$\overrightarrow {AB\ } + \overrightarrow {BC\ } = \overrightarrow {AC\ }$
\end {document}
Philip Taylor
William F Hammond
2013-12-29 19:59:35 UTC
Permalink
\documentclass {minimal}
\begin {document}
$\overrightarrow {AB\ } + \overrightarrow {BC\ } = \overrightarrow {AC\ }$
\end {document}
I like this better:

\stackrel{\,\longrightarrow}{AB}

If amsmath is used, I think \overset is preferred to \stackrel although
here I don't see a difference.

-- Bill


Email: ***@yahoo.com
***@gmail.com
https://www.facebook.com/william.f.hammond
http://www.albany.edu/~hammond/
Herbert Voss
2013-12-29 20:20:57 UTC
Permalink
Post by William F Hammond
\documentclass {minimal}
\begin {document}
$\overrightarrow {AB\ } + \overrightarrow {BC\ } = \overrightarrow {AC\ }$
\end {document}
\stackrel{\,\longrightarrow}{AB}
If amsmath is used, I think \overset is preferred to \stackrel although
here I don't see a difference.
\documentclass {article}
\usepackage[T1]{fontenc}
\usepackage%[a]
{esvect}
\begin {document}
$\overrightarrow {AB\ } + \overrightarrow {BC\ } = \overrightarrow {AC\ }$

\bigskip
$\vv{AB} + \vv{BC} = \vv{AC}$
\end {document}


Herbert
Khaled Hosny
2013-12-29 14:58:57 UTC
Permalink
The current incarnation of arrows in LaTeX is a disaster. I always
use arrows from the picture environment to avoid them.
Actually (this particular case at least) is a difieciency of TeX (not
supporting extensible math accents) and CM fonts (not having accent
arrows). The following example (processed by LuaTeX or XeTeX) looks
good, IMO:

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{XITS Math}
\begin{document}

$\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}$

\end{document}

Regards,
Khaled
Khaled Hosny
2013-12-29 15:03:19 UTC
Permalink
Post by Khaled Hosny
The current incarnation of arrows in LaTeX is a disaster. I always
use arrows from the picture environment to avoid them.
Actually (this particular case at least) is a difieciency of TeX (not
supporting extensible math accents)
On a second thought, I think this limitation is not crucial here, with
stix package you get the same, IMO, nice looking arrows even with
PDFTeX.

Regards,
Khaled
Donald Arseneau
2013-12-30 01:44:48 UTC
Permalink
Post by Bob Tennent
|\noindent We would write
|\hspace{39pt}$\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}$
|
|The arrow head is much too big and touches the letters below -
Following my own advice, I find that
\documentclass{article}
\begin{document}
$\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}$
\end{document}
demonstrates the issue. And I agree that it's a valid issue. The
current incarnation of arrows in LaTeX is a disaster. I always use
arrows from the picture environment to avoid them.
It isn't "LaTeX" per se, but the computer modern font.

At one time Don Knuth found his arrow heads disappeared on
photocopying, so he revised the computer modern fonts to have
enlarged arrow heads, but didn't even change the character
dimensions to match. This sort of misguided backwards compatability
is all too common, and makes a mess of things for years.




Donald Arseneau, TRIUMF CMMS, ***@triumf.ca
Bob Tennent
2013-12-29 18:36:30 UTC
Permalink
| with stix package you get the same, IMO, nice looking arrows even with
| PDFTeX.
The stix package has only otf files.

Bob T.
Khaled Hosny
2013-12-29 18:44:35 UTC
Permalink
Post by Bob Tennent
| with stix package you get the same, IMO, nice looking arrows even with
| PDFTeX.
The stix package has only otf files.
I meant the other one from the STIX project, but I just realised this
one did not make it into TeX Live (and CTAN?) yet.
Bob Tennent
2013-12-30 03:51:43 UTC
Permalink
| > The stix package has only otf files.
|
|I meant the other one from the STIX project, but I just realised this
|one did not make it into TeX Live (and CTAN?) yet.
Does anyone know why not? It seems to be dated in March.

Bob T.
Donald Arseneau
2013-12-30 09:20:00 UTC
Permalink
Post by Dr A K Hannaby
No reply to this after 7+ days - anybody interested - seems a valid issue.
I attach a minimal file containing some code (as shown below) at about
line 1200.
Hardly minimal; nevertheless...
Post by Dr A K Hannaby
\noindent We would write
\hspace{39pt}$\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}$
...this gets to the point very well.
Post by Dr A K Hannaby
The arrow head is much too big and touches the letters below - otherwise
it would be OK.
I'd have to say that the over-arrows in amsmath aren't very good,
but the major failing is with the arrow characters in the computer
modern font. At one point, historically, the designer changed them
to use bigger fatter arrow heads. I can't say if the AMS \overrightarrow
command was designed based on the original (better) arrows, or
if it is just badly executed.

The first recommendation is to use a different font set, if that
appeals to you. Perhaps \usepackage{txfonts}. But beware that the
same arrow characters got imported into some unrelated fonts.

Other than that (or in addition) put the following definitions into
a file, say fixamsarrow.sty, and then \usepackage{amsmath,fixamsarrow}

\def\overarrow@#1#2#3{\vbox{%
\ialign{##\crcr#1{\***@than#2}\crcr
\noalign{\nointerlineskip\kern.12ex}$\***@th\hfil#2#3\hfil$\crcr}}}
\def\***@than#1{\ifx\scriptstyle#1\scriptscriptstyle\else
\ifx\scriptscriptstyle#1\scriptscriptstyle\else
\scriptstyle\fi\fi}

The third shortcoming is that the arrows are not shifted based on
the slant of the letters, but correcting that is tricky and prone
to errors, so I'll say to just live with it.

Hope this helps.

Donald Arseneau, TRIUMF CMMS, ***@triumf.ca
Bob Tennent
2013-12-30 13:32:05 UTC
Permalink
|I'd have to say that the over-arrows in amsmath aren't very good,
|but the major failing is with the arrow characters in the computer
|modern font.
Donald: I agree about the CM font but the \overrightarrow macro in
non-AMS styles is even worse than in AMS styles; your redefinition
of \overarrow won't help in, say, article. And you've omitted a
definition of \m at th.

Recommending the txfonts in their original form isn't a good idea.
Michael Sharpe's newtxmath package will give better results overall.

Bob T.
Donald Arseneau
2013-12-31 06:16:22 UTC
Permalink
Post by Bob Tennent
|I'd have to say that the over-arrows in amsmath aren't very good,
|but the major failing is with the arrow characters in the computer
|modern font.
Donald: I agree about the CM font but the \overrightarrow macro in
non-AMS styles is even worse than in AMS styles; your redefinition
of \overarrow won't help in, say, article.
Of course similar modifications could be applied to the regular
LaTeX definition. Ordinary LaTeX shows even more clearly how the
enlargement of the arrowheads messed up macro packages. (It also
shows the error of freezing macro definitions "for stability".)

There were many years when the pure metafont CM had the enlarged
arrows, but the bluesky outline fonts had the original shapes, so
the worst overlaps weren't generally seen until more recently.
Post by Bob Tennent
And you've omitted a definition of \m at th.
That is a standard macro. Or do you mean I omitted a use of it?
Post by Bob Tennent
Recommending the txfonts in their original form isn't a good idea.
Michael Sharpe's newtxmath package will give better results overall.
Good to know.



Donald Arseneau, TRIUMF CMMS, ***@triumf.ca
Bob Tennent
2013-12-31 11:45:37 UTC
Permalink
Post by Donald Arseneau
Post by Bob Tennent
you've omitted a definition of \m at th.
That is a standard macro.
Donald:

\documentclass{amsbook}
\makeatletter
\def\overarrow@#1#2#3{\vbox{%
\ialign{##\crcr#1{\smaller at than#2}\crcr
\noalign{\nointerlineskip\kern.12ex}$\m at th\hfil#2#3\hfil$\crcr}}}
\def\smaller at than#1{\ifx\scriptstyle#1\scriptscriptstyle\else
\ifx\scriptscriptstyle#1\scriptscriptstyle\else
\scriptstyle\fi\fi}
\makeatother
\begin{document}
$\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}$
\end{document}

:

! Undefined control sequence.
<recently read> \m

l.11 $\overrightarrow{AB}
+\overrightarrow{BC}=\overrightarrow{AC}$

Bob T.
Herbert Voss
2013-12-31 12:21:06 UTC
Permalink
Post by Bob Tennent
Post by Donald Arseneau
Post by Bob Tennent
you've omitted a definition of \m at th.
That is a standard macro.
\documentclass{amsbook}
\makeatletter
\ialign{##\crcr#1{\smaller at than#2}\crcr
\noalign{\nointerlineskip\kern.12ex}$\m at th\hfil#2#3\hfil$\crcr}}}
\def\smaller at than#1{\ifx\scriptstyle#1\scriptscriptstyle\else
\ifx\scriptscriptstyle#1\scriptscriptstyle\else
\scriptstyle\fi\fi}
\makeatother
\begin{document}
$\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}$
\end{document}
! Undefined control sequence.
<recently read> \m
l.11 $\overrightarrow{AB}
+\overrightarrow{BC}=\overrightarrow{AC}$
copy and paste ...

\documentclass{amsbook}
\makeatletter
\def\overarrow@#1#2#3{\vbox{%
\ialign{##\crcr#1{\***@than#2}\crcr
\noalign{\nointerlineskip\kern.12ex}$\***@th\hfil#2#3\hfil$\crcr}}}
\def\***@than#1{\ifx\scriptstyle#1\scriptscriptstyle\else
\ifx\scriptscriptstyle#1\scriptscriptstyle\else
\scriptstyle\fi\fi}
\makeatother
\begin{document}
$\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}$
\end{document}

Herbert
Bob Tennent
2013-12-31 12:36:33 UTC
Permalink
|copy and paste ...
I did. I guess my browser changed ***@th into m at th. Or was it
the tug.org website?

Bob
Philip Taylor
2013-12-31 14:44:41 UTC
Permalink
\def \***@than #1{\ifx \scriptstyle #1 ...
\def \smaller at than #1{\ifx \scriptstyle #1 ...
Donald Arseneau
2014-01-01 13:06:20 UTC
Permalink
Post by Bob Tennent
Post by Donald Arseneau
Post by Bob Tennent
you've omitted a definition of \m at th.
That is a standard macro.
\documentclass{amsbook}
\makeatletter
\ialign{##\crcr#1{\smaller at than#2}\crcr
\noalign{\nointerlineskip\kern.12ex}$\m at th\hfil#2#3\hfil$\crcr}}}
\def\smaller at than#1{\ifx\scriptstyle#1\scriptscriptstyle\else
\ifx\scriptscriptstyle#1\scriptscriptstyle\else
\scriptstyle\fi\fi}
\makeatother
\begin{document}
$\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}$
\end{document}
! Undefined control sequence.
<recently read> \m
You get that error when you put it in your document instead of
a .sty file like I suggested. Oh. You have \makeatletter...

Oh Ha Ha!!!!

In your original message, I thought you were said "m at th"
because your local mailer blocked your message with "***@th".
But you got the mail that way! My message of course had the
at symbols intact when I entered it, and they stayed intact
during the round trip through texhax and back to me. I'm
not sure what nanny filter made the change.

Donald Arseneau, TRIUMF CMMS, ***@triumf.ca

Bob Tennent
2013-12-31 12:31:09 UTC
Permalink
An elegant solution to this problem is to use the esvect package,
which provides a variety of arrowheads with extensible tails and at
a suitable vertical level.

Bob T.
Loading...