127

I just realized that I am a barbarian when it comes to writing. But I am not entirely sure, so this might be the right place to ask. When typing display-mode formulae do you guys add a period after the formula ends a sentence?

Like:

This is the formula for a circle $$x^2 + y^2 = r^2.$$
Therefore blabla...

or

This is the formula for a circle $$x^2 + y^2 = r^2$$
Therefore blabla...

My supervisor has been complaining a lot that I don't use period and commas in my display-mode formulae. But I get uneasy doing that because it doesn't feel natural to me, I took a look at two books at random and both of them so far do the punctuation in their display formulae.. I know this is stupid of me and its amazing I have never noticed that.

Edit: This would be a fantastic opportunity to see what people actually like as opposed to what they think they like. Everyone who has an opinion on what the punctuation should be should provide an illustrative example of such so that by the voting it can be seen what is actually preferred. If you do this, make your answer just the example (so provide any general homilies in another answer) so that the voting truly reflects the community view of the example.

Gerry Myerson
  • 39,024
Jose Capco
  • 2,175
  • 81
    I would object to both variants :)

    Notice that if you read either one aloud (imagine yourself reading the text to someone on the phone, so that you cannot point to the equation), you do not find a sentence: IMO both should start with «The formula for the circle is».

    – Mariano Suárez-Álvarez Nov 24 '09 at 13:29
  • 44
    @Mariano: or, since the focus is on punctuation, "This is the formula for a circle:". – Andrew Stacey Nov 24 '09 at 13:34
  • 3
    Would anybody mind if this gets closed due to having aquired enough responses? –  Sep 05 '12 at 22:23
  • I did not use commas and periods in my display-mode formulae until an editor one day added periods and commas almost everywhere before publishing the paper. Now I use them... most of the time. :-). – Philippe Gaucher Nov 19 '13 at 09:29
  • 1
    When in doubt I usually look at a book by Steenrod or at Dunford and Schwartz who were very careful expositors. However, in this case I usually follow the following rule: read the formula aloud and think that it's written in words. Then it is just a "plain case" of English usage (Chicago Manual of Style). – alvarezpaiva Nov 19 '13 at 12:06
  • I don't disagree with alvarezpaiva in this case, since I myself punctuate in display mode, but since Dunford and Schwartz are said to avoid semicolons at all costs (according to Rota's Indiscrete Thoughts), I conclude that D&S are idiosyncratic to a degree where I definitely would not go running to Linear Operators to get their opinion on matters of style! – Todd Trimble Nov 29 '13 at 02:46
  • 4
    I protected the question; if somebody disagrees please ping me. –  Sep 13 '14 at 10:47
  • Should this question be considered as off-topic, as it is not about research level mathematics as is defined in the help centre? – Zuriel Jan 23 '15 at 16:43
  • I have a perfect answer which none of you would like. :) – Włodzimierz Holsztyński Mar 23 '17 at 12:38

19 Answers19

154

My meta-guide with respect to that is

Tautology 2.3.1 — A mathematical text is, before everything else, a text.

from Michèle Audin's Conseils aux auteurs de textes mathématiques, which you can get from her webpage.

A corollary is that when one writes a mathematical text one is writing sentences, to which all rules which apply to sentences of course apply. And, say, sentences end in a period.

Joel Fine
  • 6,187
  • 10
    -1: Good quote, bad argument. There are plenty of cases where it is justified to end full sentences without punctuation. – Charles Stewart Jan 14 '10 at 13:28
  • 40
    Charles, I certainly agree that there are sentences that end without periods. (Can you find one?) However, I am hard pressed to think of a case where we don't need any punctuation. Could you give an example? – LSpice Feb 25 '10 at 16:57
  • 6
    @L Spice, I can think of at least one good reason for not ending this full sentence with any punctuation – Barry Cipra Apr 29 '13 at 19:15
  • 4
    @LSpice (missed your reply, so over 3ys later...) - The most important example: set-off or vertical lists (e.g., bullet points) - if you turn "There were three things in the basket: an old newspaper, a loaf of bread, and a rusty knife." into a Chicago-style vertical list (per CMoS 16th, 6.124), the only punctuation mark you will keep is the colon. I should not have downvoted Mariano's answer - the reasoning might be unsound, but it is commonly given and deserves to be documented. – Charles Stewart Jan 16 '14 at 10:12
  • @CharlesStewart, it's my fault for not having had the hang of at-replies in 2010! – LSpice Feb 04 '14 at 21:08
  • 1
    @LSpice, @ did not work at that time :-) – Mariano Suárez-Álvarez Feb 04 '14 at 21:26
  • 1
    In fact another controversial issue about style is: can a sentence start with a formula? – Pietro Majer Aug 04 '21 at 08:34
  • 1
    Or, more mathily, "A mathematical text is a fortiori a text." – Somatic Custard Aug 04 '21 at 18:24
83

Whichever rule you follow, the journal you send it to will want the opposite.

Autumn Kent
  • 10,559
  • 17
    So the real answer is to define a LaTeX macro which will allow you to add or remove the punctuation according to the journal's house rules. – Andrew Stacey Nov 24 '09 at 13:33
  • 14
    The journal's copy-editors will put it into house style. There's generally no need to try to approximate it yourself. It's just annoying when they take things like punctuation out after you fight with your coauthors to put it in... – Andy Putman Nov 24 '09 at 13:46
  • 2
    I have never seen that, actually. I did once publish in a UK journal, and they changed my decimal points to commas. – Gerald Edgar Nov 25 '09 at 18:01
  • 9
    I had a journal insert commas at every displayed equation that was not at the end of a sentence. Surely that is a bad rule! – Autumn Kent Nov 25 '09 at 18:31
  • @Gerald maybe they compiled the TeX with a language package that did that. – Jose Capco Nov 26 '09 at 18:22
78

This is something I've never paid attention to until graduate school, but virtually every book uses the convention that formulae in display mode are part of the text. Every Springer text for instance uses these conventions.

If we define the function $f:\mathbb{R}\rightarrow\mathbb{R}$ by

$$ f(x) = e^x, $$

then we can place a comma after the definition to indicate a pause one might take if speaking such a sentence. We could also have defined the function by

$$ f(x) = \sin(x). $$

As this last definition was the end of a sentence, it ought to have a period. Finally we could also have

$$ |f(x) - f(x_0)| < \varepsilon $$

whenever $|x - x_0| < \delta$. Here, no punctuation was needed.

There are exceptions: Spanier's Algebraic Topology doesn't follow these conventions, but Hardy does, and all modern books that I've read do. Unless I pay attention, I don't even notice the punctuation.

Jason Polak
  • 1,873
  • 7
    Commas don't indicate pauses. – Kevin H. Lin Nov 24 '09 at 16:07
  • 78
    Sometimes they do. There are times when there can be no argument - a comma is either right or wrong - and there are times when it's a stylistic choice.

    Here is a story (taken from Lynne Truss's "Eats, shoots and leaves") about a long battle between a New Yorker journalist, Thurber, and his editor, Ross, over the editor's insistence on commas. Thurber was asked by a correspondent: "Why did you have a comma in the sentence, `After dinner, the men went into the living room'?" His response: "This particular comma was Ross's way of giving the men time to push back their chairs and stand up."

    – Joel Fine Nov 24 '09 at 23:01
  • 11
    I was never taught punctuation in english, but, in french, the comma following "After dinner" is there because you have used an inverted form of the sentence. The simple form of the sentence is "The men went into the living room after dinner." (no comma). Placing the complement at the beginning of the sentence is an inversion requiring a comma. English is rather unpunctuated compared to french (or at least in its usage). All I mean to point out is that in french (at least) most of the punctuation is not a matter of style, but rather a matter of rules. – Rob Harron Nov 24 '09 at 23:24
  • 5
    There are, of course, many differences between punctuation in French and English, some of which I have been slowly learning since moving to Belgium! In English, however, there are certain situations when the decision to place a comma is up to the author or, more likely, the journal's house rules. Incidentally, if you want to learn more about punctuation in English I can recommend Lynne Truss's book. It's short and you'll pick up a lot (although her style becomes a bit annoying after a while). – Joel Fine Nov 24 '09 at 23:42
  • 6
    In any case, (in English at least) a commas is always used to separate the clauses in an "if-then" sentence. – mdeland Jan 13 '10 at 22:08
  • 1
    To exclude from "modern books" Spanier's "Algebraic Topology", which appeared (in its McGraw-Hill edition) around the time I began graduate school, is a sneaky way of making me feel old. – Andreas Blass Nov 29 '13 at 01:28
  • 2
    WARNING! If you submit a draaft ro me as editor or just for my opinion, I'm known to be very severe on commas. My parents were English teachers! – Jim Stasheff Oct 22 '14 at 17:27
  • What if the formula is replaced by a list of equations (eqnarray in LaTeX), or a commutative diagram? – Zuriel Jan 23 '15 at 16:47
76

My view on this seems to be contrary to most of the other opinions expressed here. I think periods and commas in display mode are so ugly that they should never be used. Display mode is something removed from text mode, in another dimension as it were, so vestiges of text mode like punctuation should never appear in display mode.

Granted this aesthetic judgment, what should one do instead? For a start, one can choose not to display things that don't really have to be displayed. As I see it, there are only two reasons for displaying something: Either it is too large and unwieldy to put in text mode, or it is a short formula that is so important that one wants to make it stand out on the page by displaying it. The latter situation should only occur rarely, otherwise the author seems to be constantly shouting, like writing half of one's message in ALL CAPS. Historically there may have been typographical reasons for displaying all math longer than a couple characters, but I don't think that's the case any more. As an illustration of this principle of avoiding unnecessary displays, I think the equation for a circle in the original post is something that could easily be put in text mode within the paragraph rather than in display mode. (Unless the equation for a circle was the main new result in your paper that you wanted to highlight, of course!)

So if one only displays things that really have to be displayed, the problem is somewhat ameliorated. For the large displays that remain, one can argue that their sheer size alone provides enough of a separation for the reader that putting punctuation after them is unnecessary. Certainly this is the case for commas in most situations. For periods a solution that might placate the purists is the following: If the sentence does not continue after the display, then warn the reader that this is happening by putting a colon right before the display. This might involve a slight rephrasing to make a colon fit in gracefully. In my own writing I have often ended a sentence with an unpunctuated display, with a clear conscience, but I may try using this colon rule more systematically in the future.

Allen Hatcher
  • 19,387
  • 3
    Aha, I couldn't have put it better myself. – Jose Capco Nov 25 '09 at 19:11
  • 17
    Agreed. I also don't like to use punctuation at the end of displayed formulas. Indeed LaTeX to me suggests that such a period or comma does not belong. The punctuation is certainly not part of the formula to be displayed and so doesn't belong inside the double dollar signs, and if you place it outside, then it goes to the next line! – Allan Edmonds Nov 26 '09 at 02:13
  • 11
    Upvoted and concur: I do not use commas, semi-colons, or periods in displays. They are noise. I do make sure to begin the next line with a capitalized English word, so that it is clear that a new sentence has begun. – paul garrett Sep 06 '12 at 00:21
  • 19
    @Allan: But Knuth himself punctuates displayed formulas in his books. – Algernon Sep 06 '12 at 06:39
  • 7
    This answer describes my feelings exactly. – Olivier Sep 06 '12 at 12:10
  • 6
    Finally, someone who agrees with me! I've had this debate endlessly with many people. Periods, commas, and other punctuation in displayed formulas are distracting. It's not about whether we are writing something grammatically correct or not, because if it takes away from the clarity of the mathematics, it should be avoided. In my own field, most equations are so long and horrible that they need to be in display mode. Alas, to appease to publishers I have started putting in punctuation, but I hate doing so. I wish journals (in mathematics) were more lax on this. – Spiro Karigiannis Sep 06 '12 at 13:42
  • While this is not something I'd fight about, I agree with Allen, Allan and Spiro. I don't really write research papers, but this situation often comes up with answers here and in MSE. Personally -- no doubt colored by my typical audience for this being MSE and my background as a programmer -- I feel the potential for confusion from textual punctuation in formulas far outweighs the potential for confusion of a missing period or comma. Notation like $x_\bullet$ is not unusual, for example. People are used to error-correcting text. Meanwhile, they assume significance to each detail of a formula. – Derek Elkins left SE Apr 02 '17 at 06:09
  • Having come back to here from a more recent related post, I'll express my agreement with this answer. – Lee Mosher Jul 04 '18 at 17:58
  • 1
    Even hardcore commas users may see the light. From the preface of the third edition of Ian Stewart's Galois theory: "I have spent much of my career telling students that written mathematics should have punctuation as well as symbols [...] But I have come to the conclusion that eliminating visual junk from the printed page is more important than punctuatory pedantry [...] It is time we accepted that the act of displaying a formula equips it with implicit—invisible—punctuation." – coudy Jan 22 '22 at 12:09
  • 1
    Sometimes a display equation ending with a period might cause confusion, even if only momentary. E.g. if we represent a matrix row by $A_{i\cdot}$ and later on some display equation ends with "$B_i$." One might be wondering if we are talking about the $i^{th}$ row of a matrix $B$ when what was actually meant was the $i^{th}$ matrix $B_i$ in a sequence of matrices. Of course there are various ways to clean this up so as to prevent such confusion, but eliminating the punctuation is much simpler than changing notation. The goal should be to make the equation legible and the text to flow. – jdods Jun 06 '22 at 07:40
24

The rule is: there is no rule.

Punctuation is intended to add clarity to a body of text. If punctuation after a formula does so, put it in. If it does not, leave it out. My default is to put it in on the principle that the mathematics expressions are part of the text and therefore subject to its rules. However, this can conflict with comprehension particularly where the punctuation can be mistaken for a part of the formula.

As a guideline, I would say that for short formulae, put it in (for example, in your example in your question) since the reader can read those quickly enough that they don't lose the thread of the text. However, the average reader cannot parse larger formulae so quickly and so will effectively stop reading in order to understand the mathematics, then start reading again afterwards. Thus the formula itself acts as a sort of punctuation mark and so does not need any further adornment.

Of course, there are always grey areas (even gray ones) and that's where you'll find the most vociferous eraser fights. But the zeroth law (or, if you prefer, Rule 42) is: the one that makes it clearest is the right choice.

Andrew Stacey
  • 26,373
  • 8
    I'm wondering in what situations the punctuation could be mistaken for part of the formula. The only one I can think of is mistaking the factorial for an exclamation point at the end of a sentence. I'll admit I don't write factorials at the end of sentences for this reason. – Michael Lugo Nov 24 '09 at 13:55
  • 4
    Maybe I phrased it badly. It's not that the punctuation could reasonably be mistaken for part of the formula in that the formula would make sense if the punctuation were part of it, but rather that one has to do a double-take to realise that the punctuation is not part of the formula. If you've switched to "math mode" when parsing, then the punctuation doesn't parse and so jars, and so should not be there. If you haven't switched to "math mode" then the punctuation parses properly and isn't conciously noticed. – Andrew Stacey Nov 24 '09 at 14:43
  • 12
    A sentence without a full stop always jars. – HJRW Nov 24 '09 at 16:53
  • 6
    My point is that you've forgotten that it was a sentence because you've had to take so long to figure out the mathematics. Therefore it jars to be taken back into the flow before you are ready for it. – Andrew Stacey Nov 24 '09 at 18:56
  • 10
    And my point is that if I'm reading a sentence and I don't eventually encounter a full stop then I get confused, regardless of the mathematics. If the mathematics is so complicated that it interrupts the flow of your sentence, then you shouldn't include it in the sentence. – HJRW Nov 24 '09 at 20:44
  • 1
    This is why I edited the question to specifically ask for examples. Arguing general principles this pedantically is pointless. It would probably take about 5 minutes to find an example in one of my papers where I'd done the opposite of what I advise. – Andrew Stacey Nov 24 '09 at 21:16
  • 2
    @Henry: Apart from maths, there are two main reasons that full sentences might end without punctuation: in quoted poetry (cf. my answer) and in itemised points (e.g., CUP style omits punctuation for these). – Charles Stewart Jan 12 '10 at 13:37
  • 4
    @MichaelLugo, my wife once set a calculus exam containing a differential equation involving some expression like "$\dfrac1{1 + y}$,". A student tried to solve the analogous differential equation involving "$\dfrac1{1 + y'}$". (@Mostafa reports suffering a similar trial.) – LSpice Mar 23 '17 at 21:05
  • A tricky case: Papers involving Minkowski's question mark function (it is denoted by ?). – Roland Bacher Aug 03 '21 at 20:21
  • 1
    @RolandBacher My humble opinion is that awkward notations like "x?" or "!x" should be eliminated and forgotten. Possibly, the inventors may be kindly transported in a penal colony where they could not cause other damage to maths notation :) – Pietro Majer Aug 04 '21 at 08:25
24

Displayed formulas can serve two roles in a math paper: as abbreviations for text that would otherwise be unreadable, and as figures (or illustrations) that are referred to by the text but are not part of it grammatically. My opinion is that in the former case they should be punctuated, but in the latter they should not.

Here are some examples.

1) If $x$ and $y$ are the coordinates of a point on a circle of radius $r$ then

$x^2 + y^2 = r^2$.

2) The coordinates of a point of a circle of radius $r$ satisfy the following equation.

$x^2 + y^2 = r^2$

3) The following diagram commutes.

(diagram without any punctuation)

I think these examples demonstrate the necessity of distinguishing the two roles a displayed equation can play. As Simon already pointed out above, there is no reasonable place to put a punctuation mark in a commutative diagram, presumably because a commutative diagram can't be read aloud. On the other hand, it's difficult to view the sentence in the first example as complete without a period at the end of the equation.

I suggest the following rule of thumb: if the formula can be removed from the text without breaking the flow of a sentence, then it does not need to punctuated. Otherwise, it should be punctuated as it would be if the symbols were expanded into words.


Many authors use a colon where I used a period in the second example and follow the equation with a period.

2') The coordinates of a point on circle of radius $r$ satisfy the following equation:

$x^2 + y^2 = r^2$.

I don't consider this incorrect, but I do consider it a completely different sentence from 2).

  • 5
    The problem with your situtation 2) is that it is completely wrong, in all senses. – yo' Nov 27 '13 at 19:32
  • 1
    I assume you meant to indicate the truly egregious error in 1) (since corrected). I don't think it was relevant to the point I was trying to make. – Jonathan Wise Nov 28 '13 at 23:16
  • 3
    No, nothing like that. Number two is simply wrong. Imagine someone says this: The president of the USA is. Barrack Obama (no full stop here) – yo' Nov 29 '13 at 11:07
  • 14
    I disagree. Your example certainly is wrong, but it is also not parallel to mine. The following construction is. "The following is the name of the president of the USA." The distinction is whether the president's name (or the formula) functions as part of the sentence or not. – Jonathan Wise Nov 29 '13 at 17:47
  • @JonathanWise But then, the second sentence with only "Barrack Obama." is an incomplete sentence. Probably fine if you want to have style as a writer but maybe problematic when it comes to articles where the goal is to convey ideas in a simple way. Some students tend to treat equations as floating objects like figures and tables, which does not facilitate the reading. – pluton Nov 10 '23 at 18:37
23

Yes, but I always use "\ ." or "\ ," to separate the punctuation from the formula.

Aaron Bergman
  • 4,017
  • 1
  • 29
  • 40
  • I use \qquad. Of course this is a matter of taste. –  Nov 25 '13 at 16:19
  • 13
    No, if you put the punctuation there, never use spacing larger than \, (thinspace), otherwise the punctuation just "stands out". When it's nicely fit with the formula, you basically don't notice it's there. Which is goo, because: The good typography is such one that you don't notice it! – yo' Nov 27 '13 at 19:31
  • 7
    I actually use ",\text{.}" etc and made myself a macro for this. It actually looks different then ",.". – Marcel Bischoff Nov 29 '13 at 07:45
11

A math paper should follow all the usual rules of grammar, so in particular there should be subjects and verbs and the sort of punctuation you'd expect to find in a piece of nontechnical writing. I would prefer to write the following:

The formula for a circle is $$ x^2+y^2=r^2. $$

If I had to use the wording in the original question, I would write

This is the formula for a circle: $$ x^2+y^2=r^2. $$

Occasionally, the aesthetics of the page make punctuation look awkward. For example, one might write:

Therefore, the following diagram commutes:

M×N -> M⊗RN
   \    |
    \   |
     \  | 
      v v
       A

with no punctuation after the diagram. There isn't any sensible location for a period at the end of a sentence, so I'd leave it out.

Simon
  • 803
  • 7
    In the latter situation, I'd follow Kingsley Amis's maxim: "Recast your sentence!" If there's no sensible place for the correct punctuation, then you have written a bad sentence. – HJRW Nov 24 '09 at 16:57
  • 17
    @Henry: Usually that's good advice. But trying to work a commutative diagram, of all things, into the "flow" of a sentence is sort of ridiculous. Simply the amount of time it takes to parse even a simple commutative triangle or square, let alone "read it aloud" if such a thing is possible, indicates that diagrams don't work like ordinary sentence components. – Sam Lichtenstein Nov 24 '09 at 17:04
  • 1
    Commutative diagrams have punctuations in many books I saw, an example is the famous "Categories for the working mathematician" by Mac Lane – Jose Capco Nov 24 '09 at 17:49
  • 2
    @Sam, Sure. Actually, I think even trying to include commutative diagrams in sentences is doomed to failure. So I might have rephrased your example as:

    "Therefore, the following diagram commutes.

    The diagram has no punctuation."

    Or something like that.

    – HJRW Nov 24 '09 at 20:41
  • 9
    It is very common to make commutative diagrams part of a sentence. Look at page 60 of Categories for the Working Mathematician (Mac Lane) or page 202 of Sheaves in Geometry and Logic (Mac Lane and Moerdijk). They have many other examples of the form "therefore the diagram [diagram (set off)] commutes" and similar situations. You don't have to pronounce math to read it, although I am aware that some people think the opposite. At the board, I would pronounce a complicated formula or diagram as "this" (pointing at it). That is very common. – SixWingedSeraph Nov 24 '09 at 21:13
  • SixWingedSeraph, I admit that I find that solution unproblematic. I shouldn't have been so hasty to rule diagrams out of sentences altogether! "The commutative diagram has no punctuation" would have been a nice way of dealing with Simon's last example.

    BTW: I accidentally attributed Simon's example to Sam above. Sorry!

    – HJRW Nov 24 '09 at 22:02
  • 2
    I'm surprised to not see more comments in this direction: I tend to recast sentences so that my formulae need no punctuation IF it appears confusing when I first type it; the only exception is that of Simon's last example -- namely, I feel it forgivable to end a sentence with no punctuation in the context of an offset formula following a colon. – alekzander Nov 24 '09 at 23:55
  • It would make perfect sense to say "We now study the map $$M \otimes_R N \to A.$$", so why would it be wrong to put a period after the '$A$' in your commutative diagram? (I can imagine more complicated cases where it's not so clear what a 'right' place to put the period would be, but, for me, I prefer to put the period after the rightmost or the lowest item in the diagram, with conflicts resolved according to, let's say, the phase of the moon.) – LSpice Mar 23 '17 at 21:07
10

I disagree with the convention to punctuate formulas. What does it bring to the reader, besides confusion? (one time, I confused a comma and a prime, and I wasted a lot of time).

The reader does not need punctuation after a formula anyway, because usually, he stops to understand it.

Math formulas already harbor a lot of indexes and signs, so adding punctuation does not help.

Mostafa
  • 403
  • 4
    Punctuations have a purpose http://en.wikipedia.org/wiki/Punctuation : They add clarification to sentences which may be ambiguous. Not all sentences are unambiguous without punctuation, hence your claim "reader does not benefit from punctuation anyway" is incorrect. Of course, adding the English punctuation within the section allocated for Math text would not be ideal, see http://mathoverflow.net/a/180760/55932, but omitting them altogether for all cases is not a good solution. – Pacerier Sep 13 '14 at 08:22
  • 3
    Wasting time with a prime is a popular activity in mathematics. – Roland Bacher Aug 03 '21 at 20:49
9

N. David Mermin wrote an article, What's wrong with these equations, Physics Today, October 1989, p.9, reprinted in his book, Boojums all the Way Through, in which he gave three rules concerning displayed equations in papers.

$\it Rule\ 3$ (Math is Prose Rule). The Math is Prose Rule simply says: $$\it End\ A\ Displayed\ Equation\ with\ a\ Punctuation\ Mark . \tag{3} $$

Mermin goes on to discuss this at some length.

If anyone is curious, Rule 1 is $$\it Number\ All\ Displayed\ Equations , \tag{1} $$ and Rule 2 (the "Good Samaritan Rule") is $$\it When\ Referring\ to\ an\ Equation\ Identify\ It\ by\ a\ Phrase\ as\ Well\ as\ a\ Number . \tag{2} $$

Gerry Myerson
  • 39,024
  • 8
    A reprinted version of Mermin's essay can be read at http://cgiss.boisestate.edu/~billc/Writing/equations.pdf . I especially like the anti-simile in his reasoning: "...unlike dog turds on a lawn, the equations you display are embedded in your prose, and constitute an inseparable part of it." – Barry Cipra Sep 05 '12 at 23:37
  • 1
    Since we are talking about extra-mathematical issues, it may be appropriate to mention that one should display text in math mode not $$\it Like\ this$$ $$\it Like\ this$$ but rather $$\textit{Like this.}$$ $$\textit{Like this.}$$ (The difference is subtle in a comment box but very noticeable in the spacing and kerning in your post.) P.S. I don't know whether $$\text{\textit{Like this}}$$ and $$\textit{Like this.}$$ are identical; maybe one actually needs the former. – LSpice Feb 20 '19 at 15:23
  • 1
    @BarryCipra's link has since rotted, but can still be found via the Wayback Machine: Mermin - What's wrong with these equations?. – LSpice Sep 28 '23 at 19:16
  • 1
    Re, on further reading, if that is a faithful copy of what was printed in Petrophysics, then they bizarrely left out a chunk of a paragraph in the transition between pages 54 and 55. I found a copy of the original article posted at http://www.ai.mit.edu/courses/6.899/papers/mermin.pdf that seems to include the full text. – LSpice Sep 28 '23 at 22:33
8

On a technical side, if you want to avoid cluttering your display formulas with punctuation in the LaTeX code, but still be able to show it inside the formula, take a look at this brilliant answer by Alexey on stackoverflow.

You may even later disable the display of that punctuation if you think that it gets in the way (which is my point of view), look at the comments to the answer linked above.

For me this is the perfect solution: I can send a paper with punctuation for publishing, or compile it without punctuation for me, and I can always copy-paste the display formulas without having to remove that pesky punctuation.

Olivier
  • 223
7

Note: pedantic typophile here, so don't mind the details.

First, the logic.

When sections of text of different languages [domains] are mixed, they can occur side-by-side as equals, or one section could be embedded within another [which is the typical case].

Language identification is pretty straightforward in most scenarios, eg:

The grammar of this very sentence is English, even if we embed right-to-left inline Arabic text like أبجد هوز within it.

Within the text أبجد هوز there should be no English punctuation nonsense. Not unless you happen to be re-embedding English text within the Arabic text, eg:

We can embed inline Arabic text which itself has embedded inline English text, eg قائلا أن Google Chrome is good هو الحق., within a main English text like how it's done in this very sentence.

Now consider instead of inline embedding, we do "block-level" embedding:

The grammar of this very sentence is English, even if we embed right-to-left "block-level" Arabic text like:

هذا نص على مستوى الكتلة الطويلة باللغة العربية. هذا نص على مستوى الكتلة الطويلة باللغة العربية.

..within it.

The outer English sentence may even contain no furthur text after embedding the block-level Arabic text, eg:

This very sentence ends with a block-level Arabic text, after this embedded text:

هذا نص على مستوى الكتلة الطويلة باللغة العربية. هذا نص على مستوى الكتلة الطويلة باللغة العربية.

And this very sentence is a new sentence after the embedded block-level Arabic text.

We can surmise that for English grammar, terminating punctuation marks are optional after block-level embeds (cf. 1) (cf. 2a) (cf. 2b) (cf. 3) (cf. 4) (cf. 5) (cf. 6) (cf. 7a) (cf. 7b) (cf. 8) (cf. 9) (cf. 10).

If an editor insists on having optional fullstops shown, eg:

Assume we have an editor who insists on having a fullstop after this block-level embed:

هذا نص على مستوى الكتلة الطويلة باللغة العربية. هذا نص على مستوى الكتلة الطويلة باللغة العربية.

. Said fullstop can be produced as desired, as seen right before this very sentence.

..readers will find it jarring because it's atypical for stray English punctuations to appear as the first text of the line as they would normally be kerned with the preceding text.

Hence, to make it appear less jarring to readers, we should too kern the fullstop with the preceding text [the block-level Arabic text], as such:

This very sentence has its fullstop kerned with the text before the fullstop [the block-level Arabic text]:

هذا نص على مستوى الكتلة الطويلة باللغة العربية.
                                                               .

Look carefully at the previous sentence before this very sentence. It ends with a fullstop which is kerned with the block-level Arabic text embed before it.

Also see "Widows and orphans".


Now, on to Maths text.

The concept we outlined for foreign text within English text applies regardless of the interacting languages. For block-level maths text embedded within English text, the syntax thus looks like:

enter image description here enter image description here enter image description here

Just as with the Arabic text, there are distinct non-overlapping areas allocated to the text of each language. There's no logical sense if the grapheme(s) of the outer language [English text] appears within the area allocated to the embedded language [Maths text]:

enter image description here

In fact, it is so senseless that a quick reader can't easily tell if the grapheme refers to a punctuation of the outer text [English], or if the grapheme is actually part of the embedded text [Maths] itself.

So, applying the concepts mentioned, we can either have a stray fullstop after the block-level embed:

enter image description here

..or we can kern the punctuation with the block-level embed preceding it:

enter image description here

..or we can go without the fullstops altogether (My preferred solution.). With the context of the text, and the capitalization of the next English sentence right after the Maths text, ambiguity is almost non-existent:

Consider this text:

$$x^2 + y^2 = r^2$$


Even if the reader does not see a fullstop after the Maths text, it's obvious that this very sentence is a full standalone sentence and the embedded Maths text is not part of this sentence.

..and:

Consider this text:

$$x^2 + y^2 = r^2$$


..which is a basic equation. Since the English text after the Maths text begins with a two-dot ellipsis, it's obvious to the reader that the English text which continues after the Maths text belongs to the same sentence as the Maths text.

The end.


More on MathJax.

You can produce punctuation kerning in Stackexchange posts using a combination of vertical spacing [<br>] and horizontal spacing [&nbsp;].

It's possible to use pure-MathJax to achieve punctuation kerning on StackExchange posts. Sample code:

$$
\color{transparent}{
\quad\text{.}
}
\begin{align}x^2 + y^2 = r^2
&
\\
&\quad\text{.}
\end{align}
$$

..which outputs:

$$ \color{transparent}{ \quad\text{.} } \begin{align}x^2 + y^2 = r^2 & \\ &\quad\text{.} \end{align} $$

..(And here's a screenshot:

enter image description here

..) but the font of the "fullstop" produced by MathJax is not the same as the font of the fullstop produced by normal English text.

Another issue is there is no control over pixel-perfect vertical-spacing as the vertical spacing using MathJax's align is a multiple of 24px [0px, 24px, 48px, etc].

Pacerier
  • 101
  • 5
    May the downvoter explain why? – Pacerier Sep 13 '14 at 10:39
  • 3
    It wasn't me, but you do make some serious pronouncements (eg "for English grammar, punctuation marks are optional after block-level embeds") without any apparent justification. You also don't follow the basic rule that colons separate clauses, which perhaps undermines your case with those of us who still think that they should. – HJRW Mar 23 '17 at 11:06
  • 2
    I've added 9 links to the claim. As for non-applicability of "colons separate clauses" for colon usage before lists, see ex 1a, ex 1b, ex 2a, ex 2b, ex 2c, ex 3a, ex 3b, ex 4. – Pacerier Mar 23 '17 at 11:45
  • I wasn't talking about a list. You wrote "Consider this text: $x^2+y^2=r^2$ which is a basic equation." – HJRW Mar 23 '17 at 11:53
  • @HJRW, That's a colon before a block section. Colons that are used inline do not operate the same way as colons before block sections like blockquotes, bulleted lists, numbered lists, etc. Note that inline sections shares the same paragraph as the preceding text whereas block sections stand on their own paragraphs. – Pacerier Mar 23 '17 at 12:08
  • 1
    I'm glad you're satisfied that colons can "operate" in this way. But the upshot is hideous, so I suggest you rethink it. – HJRW Mar 23 '17 at 12:32
  • @HJRW, Not sure what you meant by hideous upshot... colons for lists do operate that way and is used by tons of people that way, as the examples I've listed had shown. Thus, I believe you agree they operate that way for lists, yet your point now is that even while they operate that way for lists, they don't operate that way for other block-level elements like full blockquotes. Yet, I see no legit reason behind that as a blockquote is clearly a different linguistic element when compared to a sentence subclause ... – Pacerier Mar 23 '17 at 12:43
  • ... which is found after typical inline colons. How is the text hideous? Do you mean that once colons are used before blockquotes instead of commas or empty spaces, the appearance of the text becomes hideous? – Pacerier Mar 23 '17 at 12:56
  • Your sentence isn't visually hideous, it's grammatically hideous. The relative pronoun refers to the equation, so the equation needs to play the role of a noun. But placing it after the colon makes it want to play the role of a clause (which equations can also do, though Serre argues they shouldn't). It's just a mess. – HJRW Mar 23 '17 at 12:58
  • @HJRW, As for grammaticality, there's definitely no error here. A full analysis will show that you're most likely misparsing the (block) colon and the double-dot ellipsis as you're reading the text if you find that the text is ungrammatical. In any case, let's start from the top: The syntax of an inline colon does not require the RHS [right-hand-side] to be an independent clause. Dependent clauses like phrase and nouns are totally fine (The following employee has won the proposal: John Smith.). ... – Pacerier Mar 23 '17 at 14:44
  • 1
    ... Neither does the LHS require an independent clause (As Aristotle asserted: "We are what we repeatedly do. Excellence, then, is not an act but a habit."). With that, now let's talk about how colons are used in lists. You don't believe that inline-colons have a different syntax than block-colons. But examples after examples show that they are not the same. ... – Pacerier Mar 23 '17 at 14:44
  • ... 1) Consider ex 5: The valid values are: A [newline] B [newline] C. Now contrast that with the inline version: *The valid values: A, B, and C.. While are* is optional in block example, it is forbidden in the inline example. There's a clear grammatical difference. ... – Pacerier Mar 23 '17 at 14:46
  • ... 2) Consider ex 1b: It is my responsibility to: provide A; [newline] review B; [newline] and customize C. Now contrast that with the inline version: *It is my responsibility: to provide A; and to review B; and to customize C.* Again, there's a clear grammatical difference. It is my responsibility to: provide A. is ungrammatical for inline versions. ... – Pacerier Mar 23 '17 at 14:46
  • ... 3) Consider ex 2a: Tonight's agenda includes: A [newline] B. Now contrast that with the inline version: *Tonight's agenda: A, B, etc.. Again, there's a clear grammatical difference. Tonight's agenda includes: A, B, etc.* is not grammatical for inline versions. ... We could go on and on. There are literally thousands upon thousands of such examples. – Pacerier Mar 23 '17 at 14:46
  • 4
    I'm glad that you, the writer, are satisfied that your sentence is OK. I, the reader, found it confusing. I've explained why -- the grammatical role performed by the equation is unclear. If you're happy to write sentences that confuse your readers, then you're doing fine; if not, then you should think again. – HJRW Mar 25 '17 at 15:00
  • 3
    I'm very confused by your use of ".." at the beginning of a line. I understand the single period at the beginning of the line after the block quote, as in your example that begins "Assume we have an editor..." (though I would strongly discourage this, on aesthetic grounds!), but I've never known a "two-dot ellipsis" to be grammatical. – Alex Kruckman Sep 16 '17 at 20:00
  • In arabic, I have seen english embedded between quotation marks and as you have written you can also do away with them. I can imagine how weird it can be when you embed an arabic question at the end of an english question. – Jose Capco Aug 11 '21 at 09:28
  • While we discuss orthographic issues within this answer about orthographic issues, I do not think the punctuation at the end of «or we can go without the fullstops altogether (My preferred solution.).» is standard according to any common usage guide. I think most usage guides would prescribe that you must use either «… altogether (my preferred solution).» or «… altogether. (This is my preferred solution.)» – LSpice Sep 28 '23 at 19:10
4

Mathematics is part of a text in the same way that poetry might be part of a literary essay. When citing poetry, a set off (i.e., displayed as a quote) part of a verse almost universally keeps exactly the punctuation from the original and nothing more, with the exception of putting in ellipses to mark elided text within (i.e., not at the beginning or at the end) the excerpt.

Poetry is not exactly analogous to mathematics in this respect, since if punctuation was added, it would not be clear whether the additional punctuation were part of the original, and this is pretty crucial to the metre of the poem. But I think the analogy does show that it does not follow from "A mathematical text is, before everything else, a text." that we should add punctuation to mathematics that is set off.

There's a reasonable issue of taste here that is not settled by dogma. Publisher style nearly always trumps other considerations; if you have the luxury to choose, balance issues of consistency with your closer colleagues with practical issues of layout and your own sense of style.

4

Any punctuation should aid the reader. Don't get me started on the `Oxford comma'.

Sam Nead
  • 26,191
Jim Stasheff
  • 3,850
3

The problem is compounded by the following facts:

  • There are different style sheets for different disciplines and even subdisciplines that use mathematics. For example, do you put a punctuation mark that happens to follow a quoted item inside or outside the quotation marks? Once upon a time, it was a universal rule, so far as I know, to put the punctuation inside, but computer folk began to depart from this convention due to the importance of exact quotation in formal languages and full-text searching.

  • Different implementations of TeX and its kin, by design or oversight, force different choices with respect to: $\operatorname{Blah}, \operatorname{Blah},$ on the one hand, and $\operatorname{Blah}, \operatorname{Blah}$, on the other hand, at least, if you want to avoid the risk of having a punctuation badly split to the next line every now and then.

  • 3
    For your first point, there is a difference between British and American style (http://en.wikipedia.org/wiki/Quotation_mark#Typographical_considerations). – Harald Hanche-Olsen Nov 24 '09 at 16:42
  • Sure, even within the U.S. there are variations between journal and journalistic style with respect to every jot and tilde down to serial commas. Here's a fun blog to read if you like that sort of thing — http://johnemcintyre.blogspot.com/ – Jon Awbrey Nov 24 '09 at 21:25
  • 2
    "Every jot and tilde" ... I like that variant, especially for mathematical text. – Gerald Edgar Jan 12 '10 at 14:51
  • 1
    A pleasant aspect of English is that there are not so many clear rules. Although from the US, I long ago started punctuating quotations in what is apparently the British style, because to me it seemed more sensible. When I learned Spanish, I discovered that one does not have this flexibility in Spanish. There is a correct way to write and spell, ordained by some official academy. Something that muddies mathematical writing is that the writers are mostly not native English speakers, and bring to their writing notions typical of their own native languages, but quality copy-editing is not common. – Dan Fox Sep 06 '12 at 07:47
  • 1
    "Tilde" does come from "Medieval Latin titulus tittle" according to m-w.com; but this "jot" is not the usual "to write briefly or hurriedly" but a variant of "iota". So, "every $\iota$ and tilde"? – Noam D. Elkies Apr 29 '13 at 20:27
  • @NoamD.Elkies I believe that, in this context, "iota" means "something very small", since it uses less black ink (or fewer pixels) than other letters, and especially since the corresponding Hebrew letter, iod, is really small. So perhaps in mathematics we should say "every $\varepsilon$ and tilde". – Andreas Blass Nov 29 '13 at 01:18
2

Plain text needs some punctuation. Otherwise it can easily appear confusing. But a displayed formula should be burnt into the brain of the reader as it is. Every additional punctuation is disturbing this aim. I think that the new paragraph starting below the formula is sufficient to mark an interruption if there is any.

2

Mathematics embeds in natural language inheriting the grammatical structure of its 'host'. So mathematical constructions (eg. sets) are nouns, relations (like $\le$, $\in$ and $=$) are verbs, properties are adjectives and quantifications like $\forall x$ are adverbial phrases. The usual rules of grammar of the host natural language, including punctuation rules, now extend naturally.

So, for example, the sentence after this one is a perfectly good self-contained sentence so it should end with a period. $(x+1)^2>x^2+2x$.

Dan Piponi
  • 8,086
  • 19
    I can be sure that there would be very few disagreements that it is bad form to start a sentence with a mathematical statement. – alekzander Nov 24 '09 at 23:52
  • 13
    Serre (and many other mathematicians I know) would say that one should not use relations or equations as verbs or something containing a verb. – Jose Capco Nov 25 '09 at 01:18
  • 2
    @JoseCapco Serre also said once that "with." is an abbreviation of "without". – Z. M Aug 03 '21 at 21:58
1

The reason for including the punctuation is that text with math in it is still text, and the math is usually (not always) a grammatically functioning part of the text. The reason for leaving it out is that it looks ugly because we're juxtaposing elements of two writing systems in which symbols have completely different meanings. Either possibility can be jarring to the reader.

A good way to deal with these problems is to leave some white space between the equation and the punctuation.

The Pythagorean theorem, $$ A^2+B^2=C^2 \qquad , $$ has been known since ancient times.

The comma doesn't cling to the equation like an alien parasite, so I find the effect less jarring as a reader. In LaTeX, I use a \qquad for this.

In my personal style, I also sometimes end a sentence with a displayed equation set off by a colon, without a period after the equation.

Thus from Euclid's five postulates we have arrived at our final result, known as the Pythagorean theorem: $$ A^2+B^2=C^2 $$

The colon acts like a signal on the tracks that tells the train conductor we're nearing the end of the sentence. The construction of the sentence reinforces the reader's subconscious expectation that the sentence will not continue after the equation. Grammatically, the equation does not function as any part of speech. The style is similar to what one would use in introducing a diagram that was in-line in the body of the text and had no caption or figure number. For example, in an article about knots, you might have many little drawings of knots sprinkled throughout the text. Other possibilities would be to put a period after the equation, or to replace the colon with a period. The disadvantage of replacing the colon with a period is that we lose the glue between the sentence and the equation it's referring to.

  • 17
    I find the white space + comma quite jarring. – Todd Trimble Sep 13 '14 at 15:43
  • I would use punctuation, but only if needed. In the first example the commas don't really seem necessary. Indeed, their role should be to isolate the aside, but the display math mode already creates enough room. I would put the commas if the formula was in the text. – Pietro Majer Aug 04 '21 at 08:42
  • I also don't enjoy the space+comma. This tells to me again and again that this is more a matter of taste rather than a strict grammer rule. – Jose Capco Aug 11 '21 at 09:21
1

I follow the rules of English grammar, except when LaTeX makes it look weird. For example, I think the period looks awful here: $$\frac{\sum_{i=0}^n f(n)}{q} = \left[\frac{N_{r_i}}{M+\int g \,d\mu}\right]_H.$$

Monroe Eskew
  • 18,133