# Unwanted space added to my equation

Please consider the following LaTex Statement:

    $$WACC = \left( \dfrac{ E}{E+D}\right) r_e + \left( \dfrac{ D}{E+D} \right) r_d(1-t_c)$$


When it gets rendered, I am seeing a small amount of white space between the W and the A. I do not want any white space in the string WACC.

• Most likely, you want \textrm{WACC} if "WACC" is some sort of abbreviation. If you insist on italic, use \textit{WACC}. However, just using WACC is telling LaTeX that you have a variable "W" multiplied by three additional variables, "A", "C", and "C". May 20, 2022 at 0:30
• Without the textit or textrm, TeX thinks you mean the variable W times the variable A times the variable C twice, and spaces things accordingly. May 20, 2022 at 0:33
• @StevenB.Segletes Thanks for the response. If you could post your comment as an answer, I will accept it and close the question.
– Bob
May 20, 2022 at 0:33

Most likely, you want \textrm{WACC} (meaning present "WACC" as roman text) if "WACC" is some sort of abbreviation. If you insist on italic, use \textit{WACC} (meaning, present as italic text). David, in a comment suggests that \mathrm{WACC} or \mathit{WACC} would be even better. However, just using WACC is telling LaTeX that you have a math expression, comprising variable "W" multiplied by three additional variables, "A", "C", and "C".

\documentclass{article}
\begin{document}
$WACC$

$\textit{WACC}$

$\textrm{WACC}$
\end{document}


If, in fact, you really did intend a math multiplication of "W", "A", "C", and "C", and thought the natural kerning a bit out of "wacc", you could use $W\!ACC$, inserting a small negative kern between the "W" and "A", to obtain

• mathrm or mathit would be better than textrm or textit May 20, 2022 at 5:44

(La)TeX does what it's instructed to, in this case to print the product of the four variables W A C C.

I believe your WACC stands for a single variable, so the strategy would be to use \mathit, but there's a better one.

\documentclass{article}
\usepackage{amsmath}

\newcommand{\cvar}[1]{\mathit{#1}}

\begin{document}

$\cvar{WACC} = \left(\frac{E}{E+D}\right) r_e + \left(\frac{D}{E+D}\right) r_d(1-t_c)$

$\cvar{WACC} = \frac{E}{E+D} r_e + \frac{D}{E+D} r_d(1-t_c)$

$\cvar{WACC} = \frac{E}{E+D} \, r_e + \frac{D}{E+D} \, r_d(1-t_c)$

$\cvar{WACC} = \frac{E r_e + D r_d(1-t_c)}{E+D}$

\end{document}


The idea is to define a command for such kind of objects (choose the name you prefer), which will ensure uniformity across the whole document and will also have the benefit that, if you want to globally change their typesetting, you just need to act on a single place, that is, the definition of \cvar.

Don't use  in LaTeX. I also added alternative formats for the equation, as the large parentheses don't seem really useful. Note that you don't need \dfrac, but just \frac.