Add more functions to the shortdoc init group
This commit is contained in:
parent
eeae503add
commit
b3f5952e66
39
README.org
39
README.org
@ -595,8 +595,18 @@ defined in this Org file.
|
|||||||
(set-default-face-height
|
(set-default-face-height
|
||||||
:no-manual t)
|
:no-manual t)
|
||||||
"Org"
|
"Org"
|
||||||
|
(org-babel-execute:latex-extra-header
|
||||||
|
:no-manual t)
|
||||||
|
(org-babel-execute:latex-header
|
||||||
|
:no-manual t)
|
||||||
(org-electric-dollar
|
(org-electric-dollar
|
||||||
:no-manual t)
|
:no-manual t)
|
||||||
|
(org-eval-emacs-lisp-setup-blocks
|
||||||
|
:no-manual t)
|
||||||
|
(org-eval-python-setup-blocks
|
||||||
|
:no-manual t)
|
||||||
|
(org-eval-infixed-blocks
|
||||||
|
:no-manual t)
|
||||||
(org-syntax-convert-keyword-case-to-lower
|
(org-syntax-convert-keyword-case-to-lower
|
||||||
:no-manual t))))
|
:no-manual t))))
|
||||||
#+end_src
|
#+end_src
|
||||||
@ -1889,36 +1899,35 @@ new [[info:org#Editing Source Code][<LANGUAGE>-modes]]: =latex-header= and =late
|
|||||||
#+caption: easily.
|
#+caption: easily.
|
||||||
#+name: lst:emacs-lisp-setup-latex-header
|
#+name: lst:emacs-lisp-setup-latex-header
|
||||||
#+begin_src emacs-lisp :exports code :silent
|
#+begin_src emacs-lisp :exports code :silent
|
||||||
(with-eval-after-load 'org-src
|
(with-eval-after-load 'emacs
|
||||||
(add-to-list 'org-src-lang-modes '("toml" . conf-toml))
|
|
||||||
|
|
||||||
(defun prefix-all-lines (prefix body)
|
(defun prefix-all-lines (prefix body)
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert body)
|
(insert body)
|
||||||
(string-insert-rectangle (point-min) (point-max) prefix)
|
(string-insert-rectangle (point-min) (point-max) prefix)
|
||||||
(buffer-string)))
|
(buffer-string)))
|
||||||
|
|
||||||
(add-to-list 'org-src-lang-modes '("latex-header" . latex))
|
(defun org-babel-execute:latex-extra-header (body _params)
|
||||||
|
"Execute a block of LaTeX extra header lines with org-babel.
|
||||||
(defvar org-babel-default-header-args:latex-header
|
This function is called by `org-babel-execute-src-block' and
|
||||||
'((:exports . "results") (:results . "raw")))
|
prefixes all lines with \"#+latex_extra_header: \"."
|
||||||
|
(prefix-all-lines "#+latex_extra_header: " body))
|
||||||
|
|
||||||
(defun org-babel-execute:latex-header (body _params)
|
(defun org-babel-execute:latex-header (body _params)
|
||||||
"Execute a block of LaTeX preamble lines with org-babel.
|
"Execute a block of LaTeX header lines with org-babel.
|
||||||
This function is called by `org-babel-execute-src-block' and
|
This function is called by `org-babel-execute-src-block' and
|
||||||
prefixes all lines with \"#+latex_header: \"."
|
prefixes all lines with \"#+latex_header: \"."
|
||||||
(prefix-all-lines "#+latex_header: " body))
|
(prefix-all-lines "#+latex_header: " body))
|
||||||
|
|
||||||
(add-to-list 'org-src-lang-modes '("latex-extra-header" . latex))
|
|
||||||
|
|
||||||
(defvar org-babel-default-header-args:latex-extra-header
|
(defvar org-babel-default-header-args:latex-extra-header
|
||||||
'((:exports . "results") (:results . "raw")))
|
'((:exports . "results") (:results . "raw")))
|
||||||
|
|
||||||
(defun org-babel-execute:latex-extra-header (body _params)
|
(defvar org-babel-default-header-args:latex-header
|
||||||
"Execute a block of LaTeX preamble lines with org-babel.
|
'((:exports . "results") (:results . "raw")))
|
||||||
This function is called by `org-babel-execute-src-block' and
|
|
||||||
prefixes all lines with \"#+latex_extra_header: \"."
|
(with-eval-after-load 'org-src
|
||||||
(prefix-all-lines "#+latex_extra_header: " body)))
|
(add-to-list 'org-src-lang-modes '("toml" . conf-toml))
|
||||||
|
(add-to-list 'org-src-lang-modes '("latex-header" . latex))
|
||||||
|
(add-to-list 'org-src-lang-modes '("latex-extra-header" . latex))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
The old way is to use a special export attribute as in the function
|
The old way is to use a special export attribute as in the function
|
||||||
|
Loading…
x
Reference in New Issue
Block a user