Contexts have backticks, which conflict with the normal way to enter inline code. How do I enter an inline context, since the initial approach:
doesn't work ( `System`` ).
This is so common in Mathematica that I suggest this should be specially included in the editor help or the FAQ on this site. Let me list the most common usages:
Contexts, for example,
``Global` `` (note the space before the closing
Precision of numbers, for example,
Accuracy of numbers, for example,
StringForm expressions, for example,
StringForm["x = ``", x]
```StringForm["x = ``", x]```
And here the question comes up, how to include a double backtick (
``) in inline code? Generally, if you want to include
n consecutive backticks, surround the inline code span with
n+1 backticks. For this reason, if the inline code has a backtick at the very end, you need to put a space after it. Don't worry, this space will be stripped when the MarkDown is rendered.
You can also use the HTML markup
<code>...</code>. This has the advantage that you can bold and italicise inside it, like so:
<code>f[x_*Pattern*]:= 50.`**watch out**</code>
f[x_Pattern]:= 50.` watch out
And as you can see, you don't need to count backticks.
According to this MSO question, you can use double backticks set off by spaces to surround a code snippet:
`` System` ``
Backslashes before backticks seem to work too. For example,
in the comment below: