# 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. Jun 28 '12 at 14:15
• Any concave function $f\colon[0,\infty]\to\mathbb R$ such that $f(0)=0$ is subadditive. 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. 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. 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. 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. Oct 10 '13 at 14:36
{"ft_lang_label":"__label__en","ft_lang_prob":0.8862634,"math_prob":0.90995115,"size":709,"snap":"2021-31-2021-39","text_gpt3_token_len":182,"char_repetition_ratio":0.09078014,"word_repetition_ratio":0.097087376,"special_character_ratio":0.23977433,"punctuation_ratio":0.112676054,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9863859,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,6,null,6,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-09-18T08:12:36Z\",\"WARC-Record-ID\":\"<urn:uuid:1bff55c2-8822-4ead-b71c-6b3b735cafdd>\",\"Content-Length\":\"157109\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c66357b7-9916-4870-b20a-67a6ba3b755e>\",\"WARC-Concurrent-To\":\"<urn:uuid:777afd28-3364-45c2-9d15-5ceb5b25455f>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://math.meta.stackexchange.com/questions/4526/problem-with-unpaired-in-math-mode-in-comments\",\"WARC-Payload-Digest\":\"sha1:7JH4WQKDSK6FCWKGKVPRGW7EJHQ2G7C6\",\"WARC-Block-Digest\":\"sha1:FRSV3BOGY6Y2MUAHYPG5OQF7I2I5KQHV\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-39/CC-MAIN-2021-39_segments_1631780056348.59_warc_CC-MAIN-20210918062845-20210918092845-00533.warc.gz\"}"}