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

后端 未结 7 1755
名媛妹妹
名媛妹妹 2020-12-12 15:31

When I export to PDF via org-mode (C-c C-e d), any words with underscores end up being partially converted to subscript. How can I prevent this from happening?

I fou

相关标签:
7条回答
  • 2020-12-12 16:02

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

    enter image description here

    enter image description here

    Now, escape the _:

    enter image description here

    enter image description here

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

    0 讨论(0)
  • 2020-12-12 16:03

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

    For example:

    text\under{}text
    
    0 讨论(0)
  • 2020-12-12 16:06

    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.

    0 讨论(0)
  • 2020-12-12 16:10

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

    (setq org-export-with-sub-superscripts nil)
    
    0 讨论(0)
  • 2020-12-12 16:13

    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 #

    0 讨论(0)
  • 2020-12-12 16:21

    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.

    0 讨论(0)
提交回复
热议问题