Disabling underscore-to-subscript in Emacs Org-Mode export

老子叫甜甜 提交于 2019-11-28 15:57:20

You can disable super/subscripting within an org file by adding the following line:

#+OPTIONS: ^:nil

Check the org manual for more options.
The following command inserts a template containing all the options: C-c C-e #

I was able to solve the issue by setting the following variable:

(setq org-export-with-sub-superscripts nil)

I think this would be easier: http://orgmode.org/manual/Subscripts-and-superscripts.html Escape the underscore with a backslash:

Now, escape the _:

You can see this in action here: http://www.railsonmaui.com/blog/2013/04/27/octopress-setup-with-github-and-org-mode/

Do you want to prevent subscripts in the onscreen display of the source file or in the text of the output PDF? If the latter, then you want

\usepackage{underscore}

It won't break the use of underscores in maths mode, either.

For individual cases, insert a literal underscore this way:

text text one\textunderscore{}two text

In my case any word that contains an underscore is likely to be a variable name or something similar. I just surround it with = or ~ so that it's treated as such. Then it will be exported accordingly.

Babak

Use \under (Documentation on The Org Manual: Special symbols)

For example:

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