When using Org-mode to create beamer presentation it is possible to set the property of a heading such that the exported heading is not shown but only its contents. For instance, the following
#+title: Test
#+options: toc:nil
#+latex_class: beamer
#+startup: beamer
#+BEAMER_FRAME_LEVEL: 2
* Ignored heading :B_ignoreheading:
:PROPERTIES:
:BEAMER_env: ignoreheading
:END:
Text
Result in a frame with “Text” only and no heading. Is this kind of functionality available for non-beamer documents? That is, is it possible to tell Org-mode to not export a heading but only its contents? For instance, would it be possible to make Org-mode export the following
#+title: Test
* Ignored heading
Text
without exporting the heading “Ignored heading” but only “Text”?
If I export
#+title: Test
*
Text
(note the space after *) to LaTeX I get the following (I only included the relevant part):
\section{}
Text
But this is not what I want. I want the heading to be completely ignored in the export so that I would get the following (again I only include the relevant part):
Text
There is no default support for what you are asking. However you can use
a preprocess hook to get a similar output. Here is an example for LaTeX export:
This is a snippet from my org-mode setup. You can see the original on
github.
The above code will ignore headings tagged with
ignoreheading, e.g.gets exported as:
Caveat: There is a known issue with this solution. It
does not work when you try this on the very first headline. I don’t
understand why that is the case, hopefully I’ll have time someday to
investigate.
Workaround to caveat: The above limitation can be
circumvented for LaTeX export by using a line like this after the org
file header:
The
preamble.texfile can include sections like an abstract oracknowledgements. However you should note this makes your org file very
closely tied to the export backend. It would become non-trivial to
export the same org file to HTML for example.
Note: For a similar setup with the new export framework (Org
8.0 or higher), use the following: