[英]Disabling underscore-to-subscript in Emacs Org-Mode export
When I export to PDF via org-mode (Cc Ce d), any words with underscores end up being partially converted to subscript. 当我通过org-mode(Cc Ce d)导出为PDF时,任何带下划线的单词最终都会被部分转换为下标。 How can I prevent this from happening?
我怎样才能防止这种情况发生?
I found this article on the subject: 我发现这篇文章的主题是:
Disabling Underscore subscript in Emacs Tex Mode 在Emacs Tex模式中禁用下划线下标
However, I either wasn't able to figure out the correct elisp or it simply didn't work. 但是,我要么无法弄清楚正确的elisp,要么根本不起作用。 Note, I don't want to change any global font options.
注意,我不想更改任何全局字体选项。 I only want this fix to apply to tex/latex/org-mode.
我只希望此修复程序适用于tex / latex / org-mode。
I also found this post, though it didn't work either: 我也找到了这篇文章,虽然它也没有用:
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: Cc Ce #
以下命令插入包含所有选项的模板:
Cc Ce #
我能够通过设置以下变量来解决问题:
(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: 我认为这会更容易: http : //orgmode.org/manual/Subscripts-and-superscripts.html用反斜杠转义下划线:
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/ 你可以在这里看到这个: 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? 是否要阻止源文件的屏幕显示或输出PDF文本中的下标? If the latter, then you want
如果是后者,那么你想要
\usepackage{underscore}
It won't break the use of underscores in maths mode, either. 它也不会破坏数学模式中下划线的使用。
对于个别情况,请以这种方式插入文字下划线:
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. 然后它将相应地导出。
Use \\under
(Documentation on The Org Manual: Special symbols ) 使用
\\under
( 组织手册上的文档:特殊符号 )
For example: 例如:
text\under{}text
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.