add missing default parameter also for the Org article html export and add a template and examples in the README

This commit is contained in:
2021-05-13 13:33:57 +02:00
parent f69f1433c6
commit b1da339a20
3 changed files with 248 additions and 42 deletions

View File

@@ -15,12 +15,63 @@
;; #+DESCRIPTION:
;; * Header :ignore:
;; article-latex is based on latex
;; article-html is based on tufte-html
;; internal
;; `translate-alist' defines Org export function with own function
;;; Code:
(require 'ob-latex)
(require 'ob-gnuplot)
(require 'ox-latex)
(require 'ox-tufte)
;; General
(defvar my-org-article-export-headline-levels)
(defvar my-org-article-export-with-sub-superscripts)
(defvar my-org-article-export-with-toc)
;;; User Configurable Variables
(defgroup my-org-export-article nil
"Options for exporting Org mode files."
:tag "Org Export"
:group 'org)
(defcustom my-org-article-export-headline-levels 5
"See `org-export-headline-levels'."
:group 'my-org-export-article
:type 'integer
:safe #'integerp)
(defcustom my-org-article-export-with-sub-superscripts {}
"See `org-export-with-sub-superscripts'."
:group 'my-org-export-article
:version "24.4"
:package-version '(Org . "8.0")
:type '(choice
(const :tag "Interpret them" t)
(const :tag "Curly brackets only" {})
(const :tag "Do not interpret them" nil))
:safe (lambda (x) (memq x '(t nil {}))))
(defcustom my-org-article-export-with-toc nil
"See `org-export-with-toc'."
:group 'my-org-export-article
:type '(choice
(const :tag "No Table of Contents" nil)
(const :tag "Full Table of Contents" t)
(integer :tag "TOC to level"))
:safe (lambda (x)
(or (booleanp x)
(integerp x))))
;; LaTeX
;;(setq org-babel-latex-htlatex "htlualatex")
;;(setq org-babel-latex-htlatex "htlatex")
;; (executable-find org-babel-latex-htlatex)
@@ -256,9 +307,6 @@
;; LaTeX
;;; Function Declarations
(defvar my-org-article-export-headline-levels)
(defvar my-org-article-export-with-sub-superscripts)
(defvar my-org-article-export-with-toc)
(defvar my-org-article-latex-default-packages-alist)
(defvar my-org-article-latex-packages-alist)
(defvar my-org-article-latex-compiler)
@@ -302,41 +350,6 @@
'((template . my-org-article-latex-template)))
;;; User Configurable Variables
(defgroup my-org-export-article nil
"Options for exporting Org mode files."
:tag "Org Export"
:group 'org)
(defcustom my-org-article-export-headline-levels 5
"See `org-export-headline-levels'."
:group 'my-org-export-article
:type 'integer
:safe #'integerp)
(defcustom my-org-article-export-with-sub-superscripts "{}"
"See `org-export-with-sub-superscripts'."
:group 'my-org-export-article
:version "24.4"
:package-version '(Org . "8.0")
:type '(choice
(const :tag "Interpret them" t)
(const :tag "Curly brackets only" {})
(const :tag "Do not interpret them" nil))
:safe (lambda (x) (memq x '(t nil {}))))
(defcustom my-org-article-export-with-toc nil
"See `org-export-with-toc'."
:group 'my-org-export-article
:type '(choice
(const :tag "No Table of Contents" nil)
(const :tag "Full Table of Contents" t)
(integer :tag "TOC to level"))
:safe (lambda (x)
(or (booleanp x)
(integerp x))))
;;;; Compilation
(defcustom my-org-article-latex-compiler "lualatex"
@@ -2306,7 +2319,10 @@ default."
(org-open-file (my-org-article-html-export-to-html nil s v b)))))))
:options-alist
'((:html-doctype "HTML_DOCTYPE" nil my-org-article-html-doctype)
'((:headline-levels nil "H" my-org-article-export-headline-levels)
(:with-sub-superscript nil "^" my-org-article-export-with-sub-superscripts)
(:with-toc nil "toc" my-org-article-export-with-toc)
(:html-doctype "HTML_DOCTYPE" nil my-org-article-html-doctype)
(:html-head "HTML_HEAD" nil my-org-article-html-head newline))
;;:translate-alist