In scientific writing, when should one enclose variable names in commas?

Take the following example sentences:

1a) "For a set of pixels S, two pixels p and q from S are said to be connected if there exists a path between them."

1b)"For a set of pixels, S, two pixels, p and q from S, are said to be connected if there exists a path between them."


2a)"The 4-neighbors N4 are marked in light gray, and the diagonal neighbors ND are marked in dark gray."

2b)"The 4-neighbors, N4, are marked in light gray, and the diagonal neighbors, ND, are marked in dark gray."

Which would you prefer and why? (Or are both bad?) More generally: is there any hard rule for this?

EDIT: My field is computer science.

  • 5
    This may depend on the scientific field. In math and computer science, the convention is not to use commas. Apr 28, 2016 at 11:42
  • 1
    Follow the style guide for the publication you are targeting. But most technical publications seek to minimize extraneous punctuation and markup.
    – Hot Licks
    Apr 28, 2016 at 11:49
  • Thanks for your suggestions. This is my PhD thesis, so there is no style guide. A person I asked to proof read it suggested I put the commata, but I find it very hard to read in many cases with them. The sentences above are OK, I picked short ones, but in some others, it gets quite ugly with so many commata. I did not want to ignore the advice without double-checking it.
    – spirit
    Apr 28, 2016 at 11:56
  • 2
    This question inspired me to take a interesting road trip to english.stackexchange.com/questions/151257/…
    – k1eran
    Apr 28, 2016 at 15:44
  • 1
    @chris-berbin I have italicized the variable names (using LaTeX math mode). I absolutely agree with your note of the mental pauses. With all those commas, all you do is pause.
    – spirit
    Apr 29, 2016 at 10:23

1 Answer 1


The Chicago Manual of Style, sixteenth edition (2010) refers to introductory phrases of the type

For a set of pixels S, ...

as "qualifying clauses." In section 12.22 ("Qualifying clauses for displayed expressions"), Chicago makes clear that it does not endorse adding a comma immediately before the symbol or symbols introduced in the qualifying clause:

The qualifying clause may appear in the text, preceding the displayed main expression:

For all real numbers a and b,

|a + b| ≤ |a| + |b|

Elsewhere Chicago gives examples with qualifying clauses such as

A function f is even if f(–x) = f(x); f is odd if f(–x) = –f(x).


If a = b, then for all real numbers x,

a + x = b + x

In each of these instances, Chicago declines to include a comma prior to the first mention of the variable or variables. That is, it implicitly endorses "all real numbers a and b," over "all real numbers, a and b," and "a function f" over "a function, f," and "for all real numbers x," over "for all real numbers, x,".

Webster's Standard American Style Manual (1985) addresses the poster's specific question more directly than Chicago does:

A sign or symbol used as an appositive directly following a descriptive term is not set off by punctuation unless it is necessary to avoid ambiguity.

Two sets A and B are said to be equivalent if there is a one-to-one correspondence between them.

According to Merriam-Webster, "A and B" functions as an appositive relative to "Two sets" and should not be set off with commas or any other punctuation marks.

I have dealt with house styles that differed on this point—but if it were up to me, I would be inclined to follow the advice of Chicago and Webster's and leave the variables comma-less unless complications elsewhere in the sentence made the sense of the construction ambiguous without supporting punctuation.

  • Thanks. In general, what I have learned from the answers here is that it is a good idea to follow some consistent and official style, be it from the style guide mentioned here or another.
    – spirit
    Jun 2, 2020 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.