0

In org-mode, is there a way to use :noexport: on a single item such as a figure, so that it is displayed in Emacs but not in exported files (such as docx)?

Below is an example code of a figure I'd like to hide during exports:

#+ATTR_ORG: :width 200
#+CAPTION: an example figure.
#+LABEL: fig-mine
[[file:./fig-mine.png]]

I understand that :noexport can be used to hide an entire section in an org file. But I need more fine-grained control to hide just one image from exports. I thought about putting the image in a section. But since sections have no ending marks, hiding the image section with :noexport: would hide everything after it until the end of the parent section.

Is there a way to use :noexport: on a single item without affecting other texts?

(as of org-mode 9.4.6 in Emacs 27)

1
  • You can wrap it in #+BEGIN_EXPORT foo ... #+END_EXPORT: it will only be included if there is such an export engine and you are exporting to it.
    – NickD
    Dec 26 '21 at 1:22

Your Answer

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

Browse other questions tagged or ask your own question.