[Tex/LaTex] \vec{x} but with arrow from right to left

macrosvector

I have two variables: \vec{x} and another one which is somehow dual to the first. Therefore I would like to symbolize the second with something similar but a leftarrow on top of the x. I already tried \stackrel{leftarrow}{x} but it looks to different (too big gap between x and the arrow, and too big arrow).

Is there a way to define a \cev command which does what I want?

Best Answer

This may not be the best way, but two \reflectbox commands will do the trick:

\documentclass{article}
\usepackage{graphicx}
\newcommand{\cev}[1]{\reflectbox{\ensuremath{\vec{\reflectbox{\ensuremath{#1}}}}}}
\begin{document}
\[
\vec{a} \quad \cev{a} \quad \vec{b} \quad \cev{b}
\]
\end{document}
Related Question