How do I make a hashtag character appear as a hashtag character in a Comment (or anywhere else I assume)?

Enclosing the hashtag in quotation marks did not seem to work.

2 Answers
Jan 12, 2018

Use a line break to separate the hashtags.

Explanation:

To add the # symbol in answers and in comments, include a line break in between any two hashtags symbols. This will prevent the editor from converting everything written in between the two hashtags symbols to math text.

So, for example, I used a # symbol in the previous paragraph and I can use one in this paragraph because I inserted a line break--newline, or simply an EOL character--to separate the paragraphs.

For illustration purposes--I'm pretty sure you've seen this happen before--I'll use two # symbols in the same line.

If you use one # symbol in a paragraph and forget to do a line break, the editor will simply use the second # symbol to convert everything written after the first hashtag and before the second one to math text.

enter image source here

So as long as you have one # symbol per line, you should be in good shape.

Now, writing a hashtag symbol in between hashtags, i.e. getting the editor to format a hashtag symbol as math text, is a little more tedious mainly because I don't remember how to do it :D

I'll try to see if I can find a reference somewhere and come back to edit this answer.

Jul 27, 2018

Is this what is wanted?

Some text. Now math: #a^2+b^2=c^2#. Hashtag: ###. Now math: #e^(pii)+1=0#. Some text. Hashtag: ### ... some more text. Now math: #2+3#.

A new paragraph with two hashtags: ### and ###.

The effect is achieved by three consecutive hashtags in a row (though it shows up improperly in the preview), which as seen above, is not affected even if math is added into the same paragraph.

By the way, it seems that it is possible to format a hashtag as math using a hashtag, two backslashes, and two hash tags. However, this only works in preview and does not, sadly, appear properly in the answer, as I learned the hard way.