emacs - org-mode如何在导出时隐藏标签名称

标签 emacs org-mode

我有一个带有标签的组织文档。但是,导出时,标签名称也会被导出。有没有办法在导出的文档中隐藏标签名称?

    #+TITLE:     tag issue
    #+AUTHOR:    someone


    * First section
    ** sub
    bla bla bla
    ** second                                                                :incomplete:
    bla        

导出的文档: enter image description here

最佳答案

借助 org-export-with-tags 变量,您可以定义导出标签的方式:

org-export-with-tags is a variable defined in ‘ox.el’. Its value is t

This variable is safe as a file local variable if its value
satisfies the predicate which is a byte-compiled expression.

Documentation: If nil, do not export tags, just remove them from headlines.

If this is the symbol ‘not-in-toc’, tags will be removed from table of contents entries, but still be shown in the headlines of the document.

This option can also be set with the OPTIONS keyword, e.g. "tags:nil".

在您的情况下,如果您不想导出标签,只需使用以下选项:

#+OPTIONS: tags:nil

您的完整示例如下:

#+OPTIONS: tags:nil
#+TITLE:     tag issue
#+AUTHOR:    someone


* First section
** sub
   bla bla bla
** second                                                        :incomplete:
   bla     

(在使用 C-e C-c p o 导出之前,请不要忘记在 #+OPTIONS: ... 行上键入 C-c C-c 以告诉 emacs 刷新设置)

您将得到:

enter image description here

<小时/>

注意:您可以找到其他有用的选项 here

关于emacs - org-mode如何在导出时隐藏标签名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50531117/

相关文章:

emacs projectile - 在没有 git、hg 等存储库的情况下初始化项目缓存

org-mode - 在组织模式 html 导出中强制结束文本/图像 block

emacs - org-mode 不喜欢 c++-mode

emacs - 停止 org-mode 重新映射键绑定(bind)

emacs - 可以使 emacs org-mode 将以 % 开头的行视为注释吗?

emacs - 如何在 rspec 模式下运行 rspec?

windows - Flymake 在 Windows Emacs 上不适合我

emacs - 状态栏显示文件路径

python - ubuntu(virtualbox)上的emacs flymake错误

emacs - 使用 org-babel 捕获 "diff"的输出