1
votes

I'm trying to use properties in org mode to set export settings. The the org manual makes it sound like export settings can be set at multiple levels, including properties regarding individual trees (as well as that more specific settings overwrite more general ones). Specifically i want to turn off breaks in some trees to not get my lists messed up in latex export. But no matter how I use properties ("\n:" being the shortcut for org-export-preserve-breaks), they have no effect (same goes for when using export settings, such as those regarding emphasis). Neither

#+options: \n:nil
* title
:PROPERTIES:
:\n:       t
:END:

 point 1
 point 2
 point 3

nor

#+options: \n:nil

* title
#+property: \n t

 point 1
 point 2
 point 3

results in

 \begin{document}

 \tableofcontents


 \section{title}

 point 1\\
 point 2\\
 point 3\\
 \end{document}

instead i get

 \begin{document}

 \tableofcontents


 \section{title}

 point 1
 point 2
 point 3
 \end{document}

Are export settings just not meant to be in properties or is there a way to set them on a tree level?

1

1 Answers

0
votes

I don't think you can do that. There are two problems:

  • subtree properties don't override the global properties when you export the whole document; they apply only when you export the subtree alone (C-c C-e C-s l l to export the subtree to latex e.g.).

  • only certain export options can be overridden through properties; they are the ones that contain a KEYWORD in the value list of the option inorg-export-options-alist (see the documentation for that variable: C-h v org-export-options-alist RET. preserve-breaks is not one of them: its KEYWORD value is nil in that list. BTW, the property name is obtained from the KEYWORD value by prepending EXPORT_ to it.

I actually modified the source in ox.el to add a PRESERVE_BREAKS keyword to the appropriate entry, and did some testing by setting the corresponding EXPORT_PRESERVE_BREAKS property in the subtree, to come up with the above description. But it may well be that I missed something: corrections are welcome.