【问题标题】:make Org ignore underscores when exporting to HTML让 Org 在导出到 HTML 时忽略下划线
【发布时间】:2011-12-06 03:34:47
【问题描述】:

我使用 Emacs Org-mode 编写一些文档,并描述了一些文件,例如“/path/to/file_blah.conf”。

在我点击c-c c-e h 将其中一个文件导出为 HTML 后,该文件中包含_ 的所有文件名都变成了小的下标词。

如何让 Org-mode 忽略下划线,以便在 HTML 页面上看到文件名?

【问题讨论】:

    标签: emacs formatting org-mode


    【解决方案1】:

    复制为Disabling underscore-to-subscript in Emacs Org-Mode export

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

    .emacs

    #+OPTIONS: ^:nil
    

    在组织文件中。

    【讨论】:

      【解决方案2】:

      在您的文件顶部放置以下行并保存。重新打开文件或在该行上按 C-c C-c

      #+OPTIONS: ^:nil
      

      顺便说一句:您的 org-emphasis-alist 中有什么。 C-h v org-emphasis-alist。您可能需要对其进行编辑以实现您喜欢的输出

      【讨论】:

      • 它有效,谢谢。 org-emphasis-alist 是在“org.el”中定义的变量。其值为 (("*" 粗体 "" "") ("/" 斜体 "" "") ("_" underline "" "") ("=" org-code "" "" 逐字) ("~" org-verbatim "" " " 逐字) ("+" (:strike-through t) "" ""))
      • 此功能的文档位于“Export options” in the Org-mode manual。正如该页面所解释的,#+OPTIONS: 允许您设置各种导出选项。 ^: 选项允许您在给定值 tnil 时“打开/关闭类似 TeX 的子和上标语法”。
      【解决方案3】:

      另一个解决方案应该是正确标记路径,所以:

      Open the file =/path/to/fileA= or ~c:/path/to/fileB~.
      

      【讨论】:

        猜你喜欢
        • 2010-10-16
        • 1970-01-01
        • 1970-01-01
        • 2012-10-05
        • 1970-01-01
        • 2011-07-26
        • 2013-09-26
        • 2022-10-13
        • 1970-01-01
        相关资源
        最近更新 更多