组织模式如何在导出时隐藏标签名称

org-mode how to hide tag name when exporting

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

    #+TITLE:     tag issue
    #+AUTHOR:    someone


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

导出文件:

借助 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 刷新设置)

您将获得:


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