0

For example, main.org:

* Heading
  * Common subheading
  * HTML subheading
  * ODT subheading

I want to set tags or properties in such a way, that allows to export into main.html HTML subheading but not ODT one:

* Heading
  * Common subheading
  * HTML subheading

And to export into main.odt ODT subheading but not HTML one:

* Heading
  * Common subheading
  * ODT subheading

There is an option EXCLUDE_TAGS, but it works on any export back-ends. Are there any ways to do this?

0

The one way I've found is to create settings file for each case:

html.org

#+EXCLUDE_TAGS: odt
#+INCLUDE: main.org

odt.org

#+EXCLUDE_TAGS: html
#+INCLUDE: main.org

And then export each file with its own back-end.

0

Insert the following stuff at the top of your orgfile. You can then use the tags :noexporthtml: and :noexportodt: on the headings throughout the rest of the document to exclude headings from html or odt export, respectively.

#+OPTIONS: tags:nil
* Noexport specifications                                          :noexport:
#+BEGIN_SRC emacs-lisp :exports results :eval t
(setq org-export-exclude-tags (list "noexport" (concat "noexport" (symbol-name org-export-current-backend))))
""
#+END_SRC

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.