# Accents package messing with kerning

I had redefined the \vec command to remove kerning, and have noticed how after loading "accents" the kerning is back to normal (it is as if my redefinition of \vec was being ignored).

\documentclass{article}
\usepackage[utf8]{inputenc}

% Accents
\usepackage{accents}

% Change kerning for vectors
\let\originalvec\vec
\renewcommand\vec[1]{\originalvec{\kern0pt #1}}

\begin{document}
$\vec{r}$
\end{document}


Any idea on what could be happening? Thanks!

• show a complete example, not only a snippet. That makes it much easier to test your issue. Aug 15 '21 at 16:03
• It is simply seeing the difference between $\vec{r}$ with and without "accents". Should I add an image? Aug 15 '21 at 17:19

Your \originalvec is the version used by accents, which disregards the \kern0pt instruction.

\documentclass{article}

\NewCommandCopy{\originalvec}{\vec} % better than \let
\usepackage{accents}

% Change kerning for vectors
\renewcommand\vec[1]{\originalvec{\kern0pt #1}}

\begin{document}

$\vec{r}$

$\originalvec{r}$

\end{document}


I'm not sure you really want it, anyway.

• That does it, thanks a lot! Aug 15 '21 at 22:39