1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-22 07:09:47 +00:00

ox-latex: Introduce LATEX_HEADER_EXTRA keyword

* lisp/ox-latex.el (latex): Introduce new buffer keyword.
(org-latex-template): Use new keyword.
* lisp/ox-beamer.el (org-beamer-template): Use new keyword.
* lisp/org.el (org-create-formula--latex-header): Use new keyword.
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template): Use new
  keyword.

Previewing of LaTeX snippets takes account of LATEX_HEADER keywords.
LATEX_HEADER_EXTRA keyword allows to specify some header lines that
will not be used for building snippets.
This commit is contained in:
Nicolas Goaziou 2013-03-07 08:59:23 +01:00
parent 9c754e2f51
commit ee9372653f
4 changed files with 13 additions and 8 deletions

View File

@ -194,7 +194,8 @@ holding export options."
document-class-string
org-latex-default-packages-alist ; defined in org.el
org-latex-packages-alist nil ; defined in org.el
(plist-get info :latex-header-extra)))
(concat (plist-get info :latex-header)
(plist-get info :latex-header-extra))))
info)))))
;; Define "From" data.
(format "\\setkomavar{fromname}{%s}\n"

View File

@ -18159,7 +18159,7 @@ share a good deal of logic."
(org-combine-plists
(org-export--get-global-options 'latex)
(org-export--get-inbuffer-options 'latex))
:latex-header-extra))))
:latex-header))))
;; This function borrows from Ganesh Swami's latex2png.el
(defun org-create-formula-image-with-dvipng (string tofile options buffer)

View File

@ -860,7 +860,8 @@ holding export options."
document-class-string
org-latex-default-packages-alist
org-latex-packages-alist nil
(concat (plist-get info :latex-header-extra)
(concat (plist-get info :latex-header)
(plist-get info :latex-header-extra)
(plist-get info :beamer-header-extra))))
info)))))
;; 3. Insert themes.

View File

@ -29,9 +29,10 @@
;; functions are available: `org-latex-publish-to-latex' and
;; `org-latex-publish-to-pdf'.
;;
;; The library introduces three new buffer keywords: "LATEX_CLASS",
;; "LATEX_CLASS_OPTIONS" and "LATEX_HEADER", and a new OPTIONS item:
;; "textht".
;; The library introduces four new buffer keywords: "LATEX_CLASS",
;; "LATEX_CLASS_OPTIONS", "LATEX_HEADER" and "LATEX_HEADER_EXTRA" (the
;; latter will not be used to build LaTeX snippets). It also
;; introduces a new OPTIONS item: "textht".
;;
;; Table export can be controlled with a number of attributes (through
;; ATTR_LATEX keyword).
@ -177,7 +178,8 @@
(:date-format nil nil org-latex-date-timestamp-format)
(:latex-class "LATEX_CLASS" nil org-latex-default-class t)
(:latex-class-options "LATEX_CLASS_OPTIONS" nil nil t)
(:latex-header-extra "LATEX_HEADER" nil nil newline)
(:latex-header "LATEX_HEADER" nil nil newline)
(:latex-header-extra "LATEX_HEADER_EXTRA" nil nil newline)
(:latex-hyperref-p nil "texht" org-latex-with-hyperref t)))
@ -1149,7 +1151,8 @@ holding export options."
document-class-string
org-latex-default-packages-alist
org-latex-packages-alist nil
(plist-get info :latex-header-extra)))
(concat (plist-get info :latex-header)
(plist-get info :latex-header-extra))))
info)))))
;; Possibly limit depth for headline numbering.
(let ((sec-num (plist-get info :section-numbers)))