简体   繁体   English

org-mode导出时如何隐藏标记名称

[英]org-mode how to hide tag name when exporting

I have an org document with tags. 我有一个带标签的组织文件。 However, when exporting it, the tag name is also exported. 但是,在导出时,还会导出标记名称。 Is there a way to hide the tag name in the exported document? 有没有办法在导出的文档中隐藏标记名称?

    #+TITLE:     tag issue
    #+AUTHOR:    someone


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

Exported document: 导出文件: 在此输入图像描述

You can define how you want to export tags thanks to the org-export-with-tags variable: 您可以通过org-export-with-tags变量定义导出标签的方式:

org-export-with-tags is a variable defined in 'ox.el'. org-export-with-tags是'ox.el'中定义的变量。 Its value is t 它的价值是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. 文档:如果为nil,请不要导出标记,只需将其从标题中删除即可。

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. 如果这是符号'not-in-toc',标签将从目录条目中删除,但仍会显示在文档的标题中。

This option can also be set with the OPTIONS keyword, eg "tags:nil". 此选项也可以使用OPTIONS关键字设置,例如“tags:nil”。

In your case if you do not want to export tags, simply use the option: 在您的情况下,如果您不想导出标签,只需使用选项:

#+OPTIONS: tags:nil

Your complete example is thus: 你的完整例子如下:

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


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

(before exporting with Ce Cc po , do not forget to type Cc Cc over the line #+OPTIONS: ... to tell to emacs to refresh the setting) (在使用Ce Cc po导出之前,不要忘记在行上键入Cc Cc #+OPTIONS: ...告诉emacs刷新设置)

You will get: 你会得到:

在此输入图像描述


note: you can find other useful options here 注意:您可以在此处找到其他有用的选项

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM