# Problem with unpaired [] in math mode in comments [duplicate]

The following text is typeset correctly in a post, but it seems to be broken when posted in a comment. (Markdown somehow interprets left [ as beginning of a hyperlink).

Any concave function $f\colon[0,\infty)\to\mathbb R$ such that $f(0)=0$ is [subadditive](http://en.wikipedia.org/wiki/Subadditivity).

Any concave function $f\colon[0,\infty)\to\mathbb R$ such that $f(0)=0$ is subadditive.

I'm posting two comments below this post to illustrate this. I've tried this also in Formatting Sandbox and here's a screenshot: (Of course this is not very important and it should be easy to circumvent this, when you notice the problem. I just thought I should mention such behavior here at meta, when I ran into it.)

• Any concave function $f\colon[0,\infty)\to\mathbb R$ such that $f(0)=0$ is subadditive. – Martin Sleziak Jun 28 '12 at 14:15
• Any concave function $f\colon[0,\infty]\to\mathbb R$ such that $f(0)=0$ is subadditive. – Martin Sleziak Jun 28 '12 at 14:15
• After seeing Zev's answer, the problem seems to be related to this: MathJax requires escaping of certain markdown symbols between single dollar signs. However, it is to some extent surprising that the behavior is different in a post and in a comment. – Martin Sleziak Jun 28 '12 at 15:03
• I've accepted Zev's answer. (It worked at the time when I posted this question.) It seems that in the meantime the things have changed, to find more recent information have a look at the duplicate question. – Martin Sleziak Oct 10 '13 at 18:44

I think that "escaping" the delimiters with a backslash, e.g. \[ and \), fixes the problem:

$\[0,\infty\)$  [google](http://www.google.com)


in a comment produces • Test: $\[0,\infty\)$ [google](http://www.google.com) produces $\[0,\infty\)$ google. – Martin Sleziak Jun 28 '12 at 15:04

The mini-markdown in the comments is different from the full-blown markdown in the answer and it's optimized for efficiency even though this means we can't support all the features of normal markdown.

There are ways to make invisible close brackets. \vphantom] will usually do the trick, I imagine, as the previous open bracket will have made the line the same height this otherwise would. If you're desperate, \smash{\vphantom]} might work in a few more cases. There may be stronger ways I don't know about.
• Test: $[0,\infty)\vphantom]$ [google](http://www.google.com) produces $[0,\infty)\vphantom]$ google. – dfeuer Oct 10 '13 at 14:36