[Tex/LaTex] Better way to produce V\llap{–}

math-modesymbols

Is there a better way to get the symbol produced by V\llap{--}? I need it in math mode. The symbol is someitmes used to represent volume. The above hack is not the right symbol but something close.

Best Answer

\documentclass{article}
\newcommand{\volume}{{\ooalign{\hfil$V$\hfil\cr\kern0.08em--\hfil\cr}}}
\begin{document}
$\volume(abc)$
\end{document}

enter image description here

A better implementation, where the dash is built as above, but over a phantom V; the real one is added later, so subscripts and superscripts are placed with respect to it.

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\DeclareRobustCommand{\volume}{\text{\volumedash}V}
\newcommand{\volumedash}{%
  \makebox[0pt][l]{%
    \ooalign{\hfil\hphantom{$\m@th V$}\hfil\cr\kern0.08em--\hfil\cr}%
  }%
}
\makeatother

\begin{document}

$d\volume(abc)$

$x^{}_{\volume}$

$\volume_x$

$V_x$

\end{document}

enter image description here