0

Feeding

\documentclass{standalone}
\usepackage{newtxtext}
\usepackage[slantedGreek,subscriptcorrection]{newtxmath}
\begin{document}
\(\vec{I'}\) \(\overrightarrow{I'}\)
\end{document}

to pdflatex yields

output

The first arrow is too short (because the reader could hypothetically see it mathematically as a primed arrowed , whereas you wish to have an arrowed primed ), and the second one too long, protruding too much to the left. Neither of the two arrows made it into the text layer of the generated PDF file as an arrow.

Is there a good intermediate-size arrow for ʹ to be used with NewTX and pdflatex? Ideally, but not necessarily, it should also be visible as an arrow in the text layer of the PDF file. The old commands \vec and \overrirghtarrow should retain their current meaning, so I need a new command (say, \intermediatevec or similar).

(For the UTF-8 engines lualatex and xelatex, there is going to be a separate question; don't suggest it here.)

2 Answers2

2

The problem is that \vec uses a fixed size (depending on font size, of course) arrow. \overrightarrow uses \rightarrow, if necessary extended with a bar. The size of \rightarrow is rather large, unfortunately.

I see two possible solutions for you.

  1. Add a small space after I', so that the arrow is positioned better.
  2. Use the esvect package. This is a rather old package, buit it still seems to work. It has different style arrows which can be chosen with an option. None is like the arrows in \vec and \overrightarrow, however. But these two are also different, by the way.
\documentclass{standalone}
\usepackage{newtxtext}
\usepackage[slantedGreek,subscriptcorrection]{newtxmath}
\usepackage[a]{esvect}

\begin{document} (\vec{I'}) (\overrightarrow{I'}) (\overrightarrow{I',}) (\vv{I'}) \end{document}

enter image description here

  • First, thx! Second, I really need the shorter arrow that in \overrightarrow because the effect of repositioning is small when compared to \vec. Third, the \vv arrow is shorter, but it still protrudes to the right over the rightmost point of the prime. –  Jan 07 '22 at 14:35
  • Does it produce an arrow in the PDF text layer? –  Jan 09 '22 at 17:05
  • The arrows of the esvect package are characters in a special font, but they don't use the Unicode codepoints for arrows. Instead it has its own encoding. – Pieter van Oostrum Jan 09 '22 at 23:24
1

You can use \overrightsmallarrow from https://tex.stackexchange.com/a/248297/4427

\documentclass{article}
\usepackage{newtxtext}
\usepackage[slantedGreek,subscriptcorrection]{newtxmath}

\makeatletter \newcommand{\overrightsmallarrow}{\mathpalette{\overarrowsmall@\rightarrowfill@}} \newcommand{\overarrowsmall@}[3]{% \vbox{% \ialign{% ##\crcr #1{\smaller@style{#2}}\crcr \noalign{\nointerlineskip}% $\m@th\hfil#2#3\hfil$\crcr }% }% } \def\smaller@style#1{% \ifx#1\displaystyle\scriptstyle\else \ifx#1\textstyle\scriptstyle\else \scriptscriptstyle \fi \fi } \makeatother

\begin{document}

(\vec{I'}) (\overrightarrow{I'}) (\overrightsmallarrow{I'})

\end{document}

enter image description here

Of course, the best way would be to abandon the old-fashioned arrow notation…

egreg
  • 1,121,712
  • First, thanks! Second, considering abandoning the arrow notation, I don't use the arrow to typeset vectors, but something completely unrelated. –  Jan 07 '22 at 14:40
  • Does it produce an arrow in the PDF text layer? –  Jan 09 '22 at 17:05