A noticeable downside to aesthetics in the \vec{}
notation is that, for "short" and "tall" characters (a
, i
, v
vs b
, k
, l
), the overset vector notation shows difference in its height from the baseline. Is it possible to define (or redefine) overset characters to show a fixed, consistent height from the baseline (or any other horizontal standard), regardless of the character it is set upon? Below is a quick, crude comparison of the status quo and the objective:
Status Quo: Heights vary.
Objective: Heights are consistent.
ANOTHER EDIT: The customised vector comes from a script written by the user Todd Lehman:
\makeatletter
\newlength\xvec@height%
\newlength\xvec@depth%
\newlength\xvec@width%
\newcommand{\xvec}[2][]{%
\ifmmode%
\settoheight{\xvec@height}{$#2$}%
\settodepth{\xvec@depth}{$#2$}%
\settowidth{\xvec@width}{$#2$}%
\else%
\settoheight{\xvec@height}{#2}%
\settodepth{\xvec@depth}{#2}%
\settowidth{\xvec@width}{#2}%
\fi%
\def\xvec@arg{#1}%
\def\xvec@dd{:}%
\def\xvec@d{.}%
\raisebox{.2ex}{\raisebox{\xvec@height}{\rlap{%
\kern.05em% (Because left edge of drawing is at .05em)
\begin{tikzpicture}[scale=1]
\pgfsetroundcap
\draw (.05em,0)--(\[email protected],0);
\draw (\[email protected],0)--(\[email protected], .075em);
\draw (\[email protected],0)--(\[email protected],-.075em);
\ifx\xvec@arg\xvec@d%
\fill(\xvec@width*.45,.5ex) circle (.5pt);%
\else\ifx\xvec@arg\xvec@dd%
\fill(\xvec@width*.30,.5ex) circle (.5pt);%
\fill(\xvec@width*.65,.5ex) circle (.5pt);%
\fi\fi%
\end{tikzpicture}%
}}}%
#2%
}
\makeatother
\let\stdvec\vec
\renewcommand{\vec}[1]{\xvec[]{#1}}
% --- Define \dvec and \ddvec for dotted and double-dotted vectors.
\newcommand{\dvec}[1]{\xvec[.]{#1}}
\newcommand{\ddvec}[1]{\xvec[:]{#1}}
\vec{a}\cdot\vec{b}
. Can you please add you current code?.tex
file that I found somewhere on TEX.SX a few months back, and I liked how it looked. Uploading now...Done!