Comma placement inline math

247 Views Asked by At

In the following sentence

If all $f(x_j), j=1,\dots,N$ are positive, then ...

Do you think there should be a comma after the $N$? I always considered the math as a single unit and read the sentence as

If all [MATH] are positive, then ...

Accordingly I only put commas when the surrounding sentence required them, as in

Given $f(x_j), j=1,\dots,N$, our goal is to ...

I am asking because I observed a lot of authors not following my thinking. However, there are also some that more or less do put the commas as I do, so I wondered if you know about guidelines regarding this question or simply have a definite opinion about it.

1

There are 1 best solutions below

0
On

To summarise those comments with which I agree: the following are preferable.

If all $f(x_j)$ are positive (as $j$ ranges from $1$ to $N$), then…

If for all $j$ with $1 \leq j \leq N$ we have $f(x_j)$ positive, then…

A little more clumsy:

If all $f(x_j)$ (where $j = 1, \dots, n$) are positive, then…