emacsorphanage / ox-pandoc

Another org-mode exporter via pandoc.
GNU General Public License v2.0
48 stars 13 forks source link

org-export-headline-levels seems not supported #14

Open lld2001 opened 2 years ago

lld2001 commented 2 years ago

Globally set the variable org-export-headline-levels to 9, the default export level is still 3.

a-fent commented 2 years ago

Hello - see this note in the README.org:

Pandoc should understand and follow these directives. HOWEVER pandoc only operates on the file it is given and does not know about settings from Emacs such as customisations. If, for example, you wish not to have a Table of Contents, there must be a line #+OPTIONS: toc:nil in the file itself; any global setting of org-export-with-toc will not be respected.

So you should set the desired setting for headline levels in the file you are exporting (#+OPTIONS: H:9, I think).

Given the number of possible global options (https://orgmode.org/manual/Export-Settings.html) I don't currently plan to support passing global options to pandoc.

lld2001 commented 2 years ago

Thank you.

Given the number of possible global options (https://orgmode.org/manual/Export-Settings.html) I don't currently plan to support passing global options to pandoc.

Wish this feature could be enhanced.

a-fent commented 2 years ago

Noted as a possible enhancement, thanks.

It might be possible by having the exporter look through all possible global options in org-export-options-alist (defined in org-mode's ox.el). Where the global setting is non-default and no file setting is present, add an #+OPTION tag to the intermediate org file that pandoc actually processes.

lld2001 commented 2 years ago

This is a good solution, sencerely waiting.