# How to put your symbol explanation for the formula?

I have a formula written in LaTeX. What is the best way to explain what the symbols mean in the formula?

For example I have this equation with a where: symbol definitions

$$\sum_{i=0}^{n}\frac{\left(\omega_MM_i+\omega_PP_i+\omega_TT_i\right)\omega_i}{n}\\ \text{where} \text{n = amount of weeks} \text{M = Missed} ...$$


Any suggestions?

• I'd write the explanation before or after the equation, using plain language: where $n$ is the number of weeks, $M$ the missed weeks,... Commented Jun 7, 2012 at 23:07
• Welcome to TeX.SE. I often use \intertext{} from amsmath or \shortintertext{} from the mathtools package when this text needs to be interspersed within a set of equations. But in this case since you only have one equation, egreg's suggestion is the way to go. Commented Jun 7, 2012 at 23:10

When using a formula that introduces new variables I would try very hard to describe them in the text, either immediately before, or immediately after the formula.

Something like

or

\documentclass{article}

\begin{document}

Assuming that $n$ is the number of weeks, and $M$
represents Missed', then a formula for something is
$$\sum_{i=0}^{n}\frac{\left(\omega_MM_i+\omega_PP_i+\omega_TT_i\right)\omega_i}{n}$$

The formula for something is
$$\sum_{i=0}^{n}\frac{\left(\omega_MM_i+\omega_PP_i+\omega_TT_i\right)\omega_i}{n}$$
where $n$ is the number of weeks, and $M$ represents Missed'.

\end{document}


Another option is to use a dedicated package, such as nomencl (or listofsymbols). These are able to produce a list of all symbols used in formulae all over the document (in a separate section, usually placed at the beginning of a document), sort them, etc.

I recommend this only if you have lots of formulae and/or a long document.

• ... and consistent notations throughout the document, and only for symbols which are used at several places, I would add. Commented Jun 8, 2012 at 21:51

On page 114 of A comprehensive review of mathematics in (La)TeX you can edit the code and obtain the following:

\documentclass{article}
\usepackage{amsmath}
\makeatletter
\@fleqntrue
\let\old@mathmargin=\@mathmargin
\@mathmargin=-1sp
\let\oldmathindent=\mathindent
\let\mathindent=\@mathmargin
\newsavebox{\myendhook} % for the tabulars
\def\tagform@#1{{(\maketag@@@{\ignorespaces#1\unskip\@@italiccorr)}
\makebox[0pt][r]{% after the equation number
\makebox[0.5\textwidth][l]{\usebox{\myendhook}}}%
\global\sbox{\myendhook}{}% empty box
}}
\makeatother
\begin{document}
\sbox{\myendhook}{%
\begin{footnotesize}%
\begin{tabular}{@{}r@{$=$\,}l}
$n$ & amount of weeks\\
$M$ & Missed
\end{tabular}
\end{footnotesize}}
%
$$\sum_{i=0}^{n}\frac{\left(\omega_MM_i+\omega_PP_i+\omega_TT_i\right)\omega_i}{n}\,;$$
%
\sbox{\myendhook}{}% reset
%
\sum_{i=0}^{n}\frac{\left(\omega_MM_i+\omega_PP_i+\omega_TT_i\right)\omega_i}{n}\,;\qquad \qquad\parbox{4.0cm}{\footnotesize\begin{aligned} n &= \text{ amount of weeks}\\[-1.0ex] M &= \text{ Missed}\end{aligned}}
\end{document}


or use a \parbox as in the second example. This yields: