6

When I use the command \overrightarrow{...} I observe that the space between the two lines increases due to the presence of this command. I often use the command \widebar{...}, \bar{...} or \overbar{...}. I don't like the symbol \vec{...} because the arrow is inclined.

In a university textbook in English that I use are used the classic vector symbols both in bold and without bold. Obviously the space between the two lines seems to be the same and it does not increase.

Two images from my textbook:

enter image description here

enter image description here

There are two questions:

1) If I were to use for the vector symbols complete with mtpro2 could I have vectors both in bold and those without bold?

2) Is there a possibility of not increasing the space between lines when using the vectors like English textbook images?

Here there is my MWE:

\documentclass[a4paper,12pt,fleqn]{book}
\usepackage[utf8]{inputenc}
\usepackage{mathtools,amssymb,lipsum}

\begin{document}

\noindent
\lipsum[1]
\noindent 
$\overrightarrow{d}$, $\overrightarrow{a}$, \lipsum[2]

\end{document} 

and the output:

enter image description here

You can also see in the red rectangle that the arrow overlaps the character.

4
  • 1
    The halloweenmath package offers you the \overscriptrightarrow command, which uses a smaller arrows that fits more comfortably between the lines. – GuM Mar 29 '19 at 23:19
  • Any correct answer is always welcome for me. – Sebastiano Mar 29 '19 at 23:24
  • 2
    I vaguely remembered having answered a similar question some time ago, and I didn’t want to post a duplicate answer: albeit it is not exactly the same question, have a look at this answer of mine. – GuM Mar 29 '19 at 23:30
  • 4
    I copied your MWE, added \usepackage{halloweenmath}, replaced \overrightarrow with \overscriptrightarrow, and the extra space between the lines disappeared (confirmed with \showlists). – GuM Mar 29 '19 at 23:42
5

You can use the esvect package, which defines 8 possible arrow tips that you choose through an option:

enter image description here

Here is the result with the default (option d):

    \documentclass[a4paper, 12pt, fleqn]{book}
    \usepackage[utf8]{inputenc}
    \usepackage{mathtools,amssymb,lipsum}
    \usepackage{esvect}

    \begin{document}

    \noindent
    \lipsum[1]
    \noindent
    $\vv{d}$, $\vv{a}$, \lipsum[2]

    \end{document} 

enter image description here

2
  • Very nice :-):-) I didn't know about this package. But does using the mtpro2[lite] package change the style of the vectors provided by esvect and possibly improve them? – Sebastiano Mar 29 '19 at 22:53
  • 3
    I don't think so, since it uses its own font via an own command. However, as I don't have mtpro2 installed, I cannot test it. – Bernard Mar 29 '19 at 23:06
3

Here is a way:

\documentclass[a4paper,12pt,fleqn]{book}
\usepackage[utf8]{inputenc}
\usepackage{bm}
\usepackage{mathtools,amssymb,lipsum}
\newsavebox\mybox
\newcommand\myVec[1]{\savebox\mybox{\hbox{\ensuremath{\overrightarrow{#1}}}}\ensuremath{\overrightarrow{#1}}{\rule{0pt}{\dimexpr\ht\mybox+3pt}}}

\begin{document}
\lipsum[1]
\noindent$\myVec{f}\bm{\myVec{a}}$\lipsum[1]
\end{document}

enter image description here

But I can't really understand the "possibility of not increasing the line's spacing" and also don't let the arrows overlap the previous line... because for exapmle in your textbooks the technology could be so old that they was just added after the actual text and the author had created/changed his wording in order to not leave an arrow below a character that needs space below the "baseline".

4
  • My theory about votes has been and will always be to vote positively for those who dedicate their time to others. +1. You can see in my profile the high number of votes. – Sebastiano Mar 29 '19 at 23:05
  • @Sebastiano ... I use this way too... Not always but in many cases... The bad thing with this kind of upvoting, is that you actually don't really help the next visitors to find the more appropriate/best answer and this is not really good. (But sometimes I can't not upvote too... even about the effort even about the usefulness of the answer even to give a new user the right to comment in posts instead of answering on it because has no the right to comment etc) – koleygr Mar 29 '19 at 23:10
  • Obviously the answer has to be good if it wasn't good I wouldn't have voted for it. I agree with you. – Sebastiano Mar 29 '19 at 23:11
  • 1
    Thanks... (Just said that because sometimes on answers in my posts, I prefer one, but almost always have voted for all of them... and it feels strange that could not add a second vote to the better to show to the people that it is actually better... But this happens mostly in my posts or in posts I have particiapated -that also upvoting often-). Goodnight from me! – koleygr Mar 29 '19 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.