# How do I add a list of definitions following “where?” [closed]

I have one small equation with two supportive terms to explain the equation.

$$[\mathrm{d}[\mathrm{i}], \mathrm{a}[\mathrm{i}]]=\mathrm{f}_{i}(\mathrm{M}[\mathrm{i}] \cdot \mathrm{f})$$

where $\mathrm{d}[\mathrm{i}] \in \mathbb{R}^{B \times n_{d}}$ and  $\mathrm{a}[\mathrm{i}] \in \mathbb{R}^{B \times n_{a}}$ \vspace{0.5\baselineskip}


That is not looking neat and good in paper. I am using mathptmx but not getting good result. How I can make it to look better.

Edit

$$[d[i], a[i]] = f_{i}(M[i]\cdot f)$$

where $d[i] \in \mathbb{R}^{B \times n_{d}}$ and  $a[i] \in \mathbb{R}^{B \times n_{a}}$ \vspace{0.5\baselineskip}


• Is there any reason for typesetting all math symbols upright? Sep 23, 2020 at 21:55
• @egreg Corrected. Any suggestions on modified equation format to make it better? Sep 23, 2020 at 22:28
• What is wrong with edited equation ? It looks nice ... Sep 23, 2020 at 22:41
• I’ve edited the title to make it more specific and less opinion-based. I think the question itself is basically fine. Sep 24, 2020 at 2:13
• Although my edit could make it a duplicate of tex.stackexchange.com/questions/167370/… Sep 24, 2020 at 2:21

This will come down to personal preference, but here’s what I would suggest.

First, you can use \shortintertext{where} from mathtools within a split to introduce the definitions.

Second, I took the liberty of making the outer brackets and parentheses one size larger than the inner brackets.

\documentclass{article}
\usepackage{mathtools} % For \shortintertext
\usepackage{unicode-math} % For \setmathfont

\defaultfontfeatures{Scale = MatchLowercase, Ligatures = TeX }
\setmainfont{TeX Gyre Termes}[Scale=1.0] % Modern version of times or newtxtext
\setmathfont{TeX Gyre Termes Math} % Modern version of mathptmx or newtxmath

%% To format the MWE for TeX.SX:
\usepackage[paperwidth=10cm]{geometry}
\pagestyle{empty}

\begin{document}
$$\begin{split} \bigl[ d[i], a[i] \bigr] = f_{i}\bigl( M[i]\cdot f \bigr) \shortintertext{where} \qquad d[i] \in \mathbb{R}^{B \times n_{d}} \textnormal{ and } a[i] \in \mathbb{R}^{B \times n_{a}} \end{split}$$
\end{document}


This solution also preserves alignment points, so you could align a list of definitions, like so:

\documentclass{article}
\usepackage{mathtools} % For \shortintertext
\usepackage{unicode-math} % For \setmathfont

\defaultfontfeatures{Scale = MatchLowercase, Ligatures = TeX }
\setmainfont{TeX Gyre Termes}[Scale=1.0] % Modern version of times or newtxtext
\setmathfont{TeX Gyre Termes Math} % Modern version of mathptmx or newtxmath

%% To format the MWE for TeX.SX:
\usepackage[paperwidth=10cm]{geometry}
\pagestyle{empty}

\begin{document}
\begin{align}
\begin{split}
\qquad \bigl[ d[i], a[i] \bigr] &= f_{i}\bigl( M[i]\cdot f \bigr)
\shortintertext{where}
d[i] &\in \mathbb{R}^{B \times n_{d}} \\
a[i] &\in \mathbb{R}^{B \times n_{a}}
\end{split}
\end{align}
\end{document}


This leaves a lot of blank space on the page, which you might care more about if it’s for a printed textbook. On the bright side, paper is an excellent carbon sink!

You can tweak this to your taste, such as changing the horizontal spacing of a line or using \begin{multilined} instead, putting only the list of variable definitions in a nested aligned environment, etc.

If you don’t like “where” on its own line, you could replace \shortintertext{where} with \textnormal{ where }.

This is somewhat opinion based, but I'll say how I'd treat the business anyway, because typographical and mathematical features are involved.

To begin with, the equation number is only pertinent to the equation and not to the explanatory clauses. Also, this seems to be higher level mathematics (possibly a research paper), so I'd start with assuming that my readers do know what I'm talking about. For instance, at this point they will already know what B, nd and na mean.

You just need to specify something about the symbols in the equation, so just add the explanations after the equation. I always start from the principle that readers can read and that a mathematical text, particularly in a research paper, should be as plain as possible.

In other words, the explanatory clauses need no special formatting: when readers have seen the equation, they'll continue reading on and find the clauses.

\documentclass[twocolumn]{article}
\usepackage{amsmath}
\usepackage{newtxtext,newtxmath}

\usepackage{lipsum} % for mock text

\begin{document}

\lipsum[1][1-3]

We can state our main equation
$$\bigl[d[i], a[i]\bigr] = f_{i}(M[i]\cdot f)$$
where $d[i] \in \mathbb{R}^{B \times n_{d}}$ and $a[i] \in \mathbb{R}^{B \times n_{a}}$.
After the $n$th step two outputs are produced.
\lipsum

\end{document}


Please, don't do $n^{th}$. It's wrong. If you really want a superscripted “th”, use $n$\textsuperscript{th}. But $n$th or $n$-th is better.

• I see your point, but I’m not sure I agree. I’m particularly used to aligned, indented definitions following where or let when writing in functional languages such as Haskell. it’s such an elegant way to express concepts in Computer Science that I never really went back, even when I use procedural languages. Sep 24, 2020 at 11:39
• Saying that the reader should be able to find all the information they need to understand the equation in the text, without the help of any formatting that makes it stand out, is at best going to make the paper harder to read. You could say the same about the equation, too—readers ought to be able to read the text and find equations in the middle of a paragraph, too, yet you’re breaking the paragraph to insert it in the center of the column with space above and below, just to make it stand out more, then numbering it to make it easier to find. Sep 24, 2020 at 11:52
• I think this is especially true of conditions or qualifiers that might otherwise be missed. It’s pretty reasonable to expect a reader who sees a b in an equation and doesn’t know what b is to realize that and look for it, although you could still create ambiguity if b has more than one possible meaning. But if you bury a warning in the next paragraph that an identity is only valid when x is in [0,1] and f is smooth, and you don’t do anything to make that information stand out at all, it could be very easy for someone looking up Equation 2 to miss. Sep 24, 2020 at 12:00
• @Davislor There is a big difference between numbered equations and formulas that don't need to be displayed. I know that, in some contexts and research fields, the variables in an equation are described with long lists; in some cases, such as this one, I'd consider it almost like an insult to the reader. Sep 24, 2020 at 12:03
• This is an especially simple example where you put the information int he very next sentence. I agree that’s no onerous burden on the reader. It’s still worth considering whether we can organize and present the information in an attractive, accessible way. Sep 24, 2020 at 12:09