Skip to main content
added 230 characters in body
Source Link
mxnt
  • 706
  • 8

The recipe below hides the Outline Headings (as opposed to deleting those). Look at the XML style definition, and you can figure out what XML attributes come in to play for "hiding" and "page breaking" to take effect.

For the recipe below to work, you MUST be using The Authoritative fork of Org mode's ODT exporter .

For the recipe below to work, you MUST be using The Authoritative fork of Org mode's ODT exporter .

The recipe below hides the Outline Headings (as opposed to deleting those). Look at the XML style definition, and you can figure out what XML attributes come in to play for "hiding" and "page breaking" to take effect.

For the recipe below to work, you MUST be using The Authoritative fork of Org mode's ODT exporter .

Source Link
mxnt
  • 706
  • 8

For the recipe below to work, you MUST be using The Authoritative fork of Org mode's ODT exporter .

(Note that the above exporter is a much more advanced and featureful ODT exporter than what is available in Emacs or Org mode repos.)

see also Create a stylesheet for your OpenDocument files, and inline the XML definitions right in your Org file–Think HTML_HEAD, or HTML_HEAD_EXTRA but for ODT / DOCX files

If you want this

enter image description here

export this

* Non non deserunt consectetur amet, ullamco

Enim  non  voluptate  mollit  ea  laboris et  ex  nostrud  qui  labore
cupidatat. Do nisi ea quis et deserunt minim velit ut.

** Excepteur duis eiusmod reprehenderit et reprehenderit

Dolor elit, culpa aliqua enim culpa duis sit nostrud veniam, sint esse
sed id excepteur aute velit velit fugiat dolor.

* Sint eu magna aliqua enim

Occaecat  cupidatat  occaecat  excepteur  sed tempor  dolore  eu  quis
consectetur eu nulla labore proident, enim culpa.

** Fugiat fugiat consectetur fugiat fugiat

Irure  velit pariatur  nulla commodo  anim elit,  ea mollit  sit amet,
commodo et tempor ex commodo adipiscing id.

# Hide Headings but also insert Page Break


#+ATTR_ODT: :target "extra_styles" :backends (odt)
#+begin_src nxml
<style:style style:name="Heading"
             style:parent-style-name="Standard"
             style:next-style-name="Text_20_body"
             style:family="paragraph"
             style:class="text"
             style:master-page-name="">
  <style:paragraph-properties fo:break-before="page"
                              fo:keep-with-next="always"
                              fo:margin-bottom="0.212cm"
                              fo:margin-top="0.423cm"
                              style:page-number="auto">
    <style:tab-stops>
      <style:tab-stop style:position="17cm"
                      style:type="right" />
    </style:tab-stops>
  </style:paragraph-properties>
  <style:text-properties style:font-name="Arial"
             style:font-name-asian="SimSun"
             style:font-name-complex="Tahoma1"
             fo:font-family="Arial"
             fo:font-size="14pt"
             style:font-family-asian="SimSun"
             style:font-family-complex="Tahoma"
             style:font-family-generic="swiss"
             style:font-family-generic-asian="system"
             style:font-pitch="variable"
             style:font-pitch-asian="variable"
             style:font-pitch-complex="variable"
             style:font-size-asian="14pt"
             style:font-size-complex="14pt"
             text:display="none" />
</style:style>
#+end_src

# # Hide Headings

# #+ATTR_ODT: :target "extra_styles" :backends (odt)
# #+begin_src nxml
# <style:style style:name="Heading"
#              style:parent-style-name="Standard"
#              style:next-style-name="Text_20_body"
#              style:family="paragraph"
#              style:class="text">
#   <style:paragraph-properties fo:keep-with-next="always"
#                               fo:margin-bottom="0.212cm"
#                               fo:margin-top="0.423cm">
#     <style:tab-stops>
#       <style:tab-stop style:position="17cm"
#                       style:type="right" />
#     </style:tab-stops>
#   </style:paragraph-properties>
#   <style:text-properties style:font-name="Arial"
#            style:font-name-asian="SimSun"
#            style:font-name-complex="Tahoma1"
#            fo:font-family="Arial"
#            fo:font-size="14pt"
#            style:font-family-asian="SimSun"
#            style:font-family-complex="Tahoma"
#            style:font-family-generic="swiss"
#            style:font-family-generic-asian="system"
#            style:font-family-generic-complex="system"
#            style:font-pitch="variable"
#            style:font-pitch-asian="variable"
#            style:font-pitch-complex="variable"
#            style:font-size-asian="14pt"
#            style:font-size-complex="14pt"
#            text:display="none" />
# </style:style>
# #+end_src

# Hide entries of Heading entries in TOC

#+ATTR_ODT: :target "extra_styles" :backends (odt)
#+begin_src nxml
<style:style style:name="Index"
             style:parent-style-name="Standard"
             style:family="paragraph"
             style:class="index">
  <style:paragraph-properties text:line-number="0"
                              text:number-lines="false" />
  <style:text-properties style:font-name-complex="Tahoma"
             style:font-family-complex="Tahoma"
             text:display="none" />
</style:style>
#+end_src