[Tex/LaTex] Change only ONE character in Latex template

charactersmath-modetemplates

I have a book template of Elsevier for which in the math environment the character "v" looks very similar to greek \nu. This causes a lot of misunderstanding and frustration for the readers. I have tried the txfonts package and it solves the problem. Here are the outputs
enter image description here

Since the book is already finished and I cannot replace all the "v" characters with \varv

MY QUESTION IS:
Is there any way that I can change the "v" letter with \varv in the Latex template that I have? This will be a lifesaver.

Best Answer

Just change the \mathcode of v:

\documentclass{book}

\usepackage{amsmath}
\usepackage{txfonts}

\AtBeginDocument{\mathcode`v=\varv}

\begin{document}

A `v' in math: $v$

A `nu' in math: $\nu$

\end{document}

Output with the \AtBeginDocument line commented out

enter image description here

Output with the \AtBeginDocument line uncommented

enter image description here

Comments

I'd suggest using

\usepackage{newtxtext}
\usepackage[varvw]{newtxmath}

instead of \usepackage{txfonts}. The fonts are essentially the same, but the defects of txfonts are straightened off.

\documentclass{book}

\usepackage{amsmath}
\usepackage{newtxtext}
\usepackage[varvw]{newtxmath}

\begin{document}

A `v' in math: $v$

A `nu' in math: $\nu$

\end{document}

enter image description here

Related Question