简体   繁体   中英

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 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, eg "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)

You will get:

在此输入图像描述


note: you can find other useful options here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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