2

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

spportive

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

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

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

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

enter image description here

Davislor
  • 44,045

2 Answers2

1

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

TeX Gyre Termes sample

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}

With alignment

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 }.

Davislor
  • 44,045
1

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 \begin{equation} \bigl[d[i], a[i]\bigr] = f_{i}(M[i]\cdot f) \end{equation} 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}

enter image description here

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.

egreg
  • 1,121,712
  • 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. – Davislor Sep 24 '20 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. – Davislor Sep 24 '20 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. – Davislor Sep 24 '20 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. – egreg Sep 24 '20 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. – Davislor Sep 24 '20 at 12:09
  • I’ve already said more about this than I needed to, so I’ll leave it here: you raise an important point when you say presenting the information in a list is “almost like an insult to the reader.” Okay, but why is that? It’s exactly the same information, just formatted differently. It’s not being dumbed down or over-explained in any way. If it’s easier to understand the other way, or to find the information you’ll need to use the equation, isn’t that a good thing? – Davislor Sep 24 '20 at 13:34
  • @Davislor It depends on many factors. In some cases the list of explanatory clauses is long and burying it in the text may make it very heavy to read. To the contrary, a couple of clauses like those in the question are simple and don't hinder reading if set in the text. There is no “catch-all” answer. – egreg Sep 24 '20 at 14:08
  • I agree completely. – Davislor Sep 24 '20 at 20:34