should be rendered as an escaped backslash but it actually ends up displayed as an escaped backtick.

  • Just to test the rendering: ``. Jul 31 '09 at 13:36
  • Looks like \` just escapes the backtick and prevents it from forming a code section. What's wrong with that? Escaping is good!
    – Welbog
    Jul 31 '09 at 13:45
  • 5
    Note, to form the output \` I needed the following sequence: backtick, backslash, backslash, backtick, backtick. Which makes sense. I'm escaping the backslash so that it doesn't escape the backtick, and enclosing both the slash and backtick in a code section.
    – Welbog
    Jul 31 '09 at 13:47
  • 3
    @Toronto: The problem is not the escaping convention. The problem is that one needs a different escaping convention in comments to that used for the body of qns&answers. Oct 5 '10 at 8:10
  • 1
    @ALLCAPS: I think this is not quite the correct explanation: In comments, the backslash doesn't need an escape (in fact, it can't be escaped), and the 2nd backslash does escape the backtick. In other words: Since a backtick needs to be escaped with a backslash, you need to type another backslash. Jan 24 '11 at 16:24
  • @Stijn Jeff posted an answer at the same time he added the status-declined tag, stating that XMLbog's reasoning meant that the current behavior is correct. He deleted his answer after Hendrik Vogt's comment. Jul 3 '14 at 9:38
  • @Gilles ah, that clears it up then. But it's still a bug, right? No matter what I try, I'm not able to get it right.
    – Stijn
    Jul 3 '14 at 9:44
  • 2
    @Stijn enjoy and when marking a bug as "by design" it's the same as declining a feature request i.e. "that's how the system works and we're not going to change it". But then of course, the team is now very different, they might change their (Jeff's :-)) mind. :) Jul 3 '14 at 10:20
  • So... to conclude... how do we write a backslash with code tags in a comment?
    – Dan
    Sep 18 '14 at 6:42
  • 2
    @Dan If the backslash is not the last character in the code span, you don't have to do anything special. If it is the last character, enclose the span with double backticks like this: ``\`` Nov 2 '14 at 0:11
  • Testing double backticks: \ — Edit: works! :)
    – myrdd
    Dec 4 '18 at 16:30

But it is a pain and not obvious for the tex.stackexchange.com

Since the same sequence is rendered differently in the question/answer vs comment.

Please see

Backslash in ticks in comments

with transcripts on tests in question vs comments.

How come it is bydesign that questions and comments are treated differently with the same syntax?

  • "How come it is bydesign that questions and comments are treated differently with the same syntax?" Because comments only support a subset of Markdown syntax. They don't support images, either, and for good reason. Nov 2 '14 at 18:35

workaround using double backticks — (already mentioned by @ThisSuitIsBlackNot)



and you will get \.

You must log in to answer this question.

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