13
$\begingroup$

I tried to submit a question to math.SE, and received the following message:

Title cannot contain "$$".

Why are block equations not allowed in question titles on Mathematics Stack Exchange? (To be honest, I don't even think I was using a block equation. How can I avoid this message?)

$\endgroup$
3
  • 1
    $\begingroup$ Yes, I know this is at least very close to other questions on meta. We are actually in the process of requesting that $$...$$ be blacklisted from titles on math.SE, and this clean and focused question/answer will likely be pointed to in the error message. The answer is CW, so if you think of any appropriate additions, feel free to add them. $\endgroup$
    – user642796
    Commented Oct 2, 2014 at 6:24
  • $\begingroup$ This is relevant? $\endgroup$ Commented Oct 2, 2014 at 6:58
  • 1
    $\begingroup$ @NajibIdrissi: (Assuming that your comment is indeed a question.) It is relevant in the sense that before that question (and the commentary underneath) I hadn't thought of the possibility of simply filtering out displayed equations (as SO filters out problems). After a short chat with Shog9 and Tim Post it became clear that it is possible, and they're willing to do it. Previous meta posts (one, two, and likely others) indicate a community consensus against displayed equations in titles. $\endgroup$
    – user642796
    Commented Oct 2, 2014 at 7:19

1 Answer 1

18
$\begingroup$

Background

The use of block (displayed) equations ($$...$$) in question titles has been disallowed on Mathematics Stack Exchange. Titles are meant to be short descriptions of the question, and using block equations generally causes your equations to be larger: compare $$\lim_{n \to \infty} \frac{1}{n}$$ to $\lim_{n \to \infty} \frac{1}{n}$ which produce $$\lim_{n \to \infty} \frac{1}{n}$$ and $\lim_{n \to \infty} \frac{1}{n}$, respectively.

More importantly, block equations introduce line breaks, and these line-breaks also appear on the front-page (and in all pages listing questions by title). Together, this means that titles containing block equations usually take up significantly more vertical space than question titles which do not. While not as much an issue when viewing the site on traditional monitors, on mobile devices with significantly smaller displays titles with block equations take up too much screen real estate.

What to do

Instead, all mathematics in titles should use inline equations ($...$), and should additionally be designed to take up as little vertical space as possible.

More guidelines for the proper use of MathJax in question titles may be found here.

False positives

It is possible that you received this message because your title includes two immediately adjacent inline equations $...$$...$. Often, you will be able to simply remove the inner $$ and retain the desired formatting of the title.

In cases where this is not possible (e.g., your title contains $\bf f$$(x)$ which produces $\bf f$$(x)$, while $\bf f(x)$ produces $\bf f(x)$), additionally placing braces {...} around the first part should produce the desired formatting (in the example above, ${\bf f}(x)$ produces ${\bf f}(x)$).

$\endgroup$
7
  • $\begingroup$ In the false positives section, using \mathbf f(x) also works out just fine. $\endgroup$
    – Asaf Karagila Mod
    Commented Oct 3, 2014 at 9:43
  • 1
    $\begingroup$ I think it is (typographically) also not a good idea to use $\displaystyle ... $ in the title either. This objection may already be covered by "should additionally be designed to take up as little vertical space as possible". $\endgroup$ Commented Oct 3, 2014 at 10:47
  • 1
    $\begingroup$ @HagenvonEitzen It's explicitly covered by "more guidelines. It's not just \displaystyle; folks put matrices and cases environments in titles, too. $\endgroup$
    – user147263
    Commented Oct 3, 2014 at 11:27
  • $\begingroup$ @Asaf: Yes, using a different command will often also fix the formatting, but this is a quick-and-dirty solution that should always work, and doesn't depend on the particular font-shape desired in the first part of the equation. $\endgroup$
    – user642796
    Commented Oct 3, 2014 at 11:56
  • $\begingroup$ @HagenvonEitzen: While \displaystyle is also bad form, the blacklist only deals with the explicit $$...$$ for now. And this question/answer pair is intended to be focused on this particular case, since the error message links here. (As Care Bear mentions, that is specifically mentioned in the "more information" link, which can probably stand an expansion.) $\endgroup$
    – user642796
    Commented Oct 3, 2014 at 11:59
  • 1
    $\begingroup$ @ArthurFischer Since $\displaystyle$ is effectively equivalent to $$ $$ shouldn't at least this ($...\displaystyle...$) be blacklisted as well? I've seen it multiple times already. I know that \pmatrix etc. also cause displaystyle, but they are much less common than the \displaystyle directive. $\endgroup$
    – AlexR
    Commented Oct 8, 2014 at 20:46
  • 1
    $\begingroup$ @AlexR It's not equivalent, since it does not create linebreaks before and after formula. It's bad and should be edited out, but it's not quite as big a problem $\endgroup$
    – user147263
    Commented Oct 14, 2014 at 4:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .