11

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

\begin{equation}
\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}
...
\end{equation}

Any suggestions?

2
  • 6
    I'd write the explanation before or after the equation, using plain language: where $n$ is the number of weeks, $M$ the missed weeks,...
    – egreg
    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

3 Answers 3

14

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

enter image description here

or

enter image description here

\documentclass{article}

\begin{document}

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

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

\end{document}
5

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.

1
  • 2
    ... 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
3

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}}
%
\begin{equation}
\sum_{i=0}^{n}\frac{\left(\omega_MM_i+\omega_PP_i+\omega_TT_i\right)\omega_i}{n}\,;
\end{equation}
%
\sbox{\myendhook}{}% reset
%
\begin{equation}
\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{equation}
\end{document}

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

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .