GP.
GP.

Reputation: 487

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: enter image description here

Upvotes: 5

Views: 2836

Answers (1)

Picaud Vincent
Picaud Vincent

Reputation: 10982

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, e.g. "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 C-e C-c p o, do not forget to type C-c C-c over the line #+OPTIONS: ... to tell to emacs to refresh the setting)

You will get:

enter image description here


note: you can find other useful options here

Upvotes: 11

Related Questions