how to show underscores symbol in markdown?

北战南征 提交于 2021-02-05 14:17:09

问题


in markdown, my_stock_index is mystockindex. But I want it to show my_stock_index. How can do that?


回答1:


You just escape it with a backslash: my\_stock\_ticker is what you type to get my_stock_ticker

The syntax seems to work for all markdown parsers. However, php markdown parsers use the numeric character reference _ instead of the actual character in it's output.




回答2:


The single backslash escape works fine in Jupyter unless you are in an italicized block, in which case, you want to close the italicized block, write the escaped underscore, then start the italicized block again.

_the cookie_\__cutter in italics_



回答3:


There is also the option to use backticks. This is actually used to refer to mark the text as inline code, but where else would you use underscores right? Besides it is much easier than managing the backslash stuff :)

`my_stock_index`


来源:https://stackoverflow.com/questions/35827838/how-to-show-underscores-symbol-in-markdown

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!