Compare commits
5 Commits
4092de976b
...
c943430f8d
Author | SHA1 | Date | |
---|---|---|---|
c943430f8d | |||
e7c4bbbe6d | |||
4302a21252 | |||
a7185b37f7 | |||
a9905a2b16 |
41
README.org
41
README.org
@ -2215,14 +2215,6 @@ configuration objectives:
|
|||||||
#+caption: Set =latex= options.
|
#+caption: Set =latex= options.
|
||||||
#+name: lst:set-latex-options
|
#+name: lst:set-latex-options
|
||||||
#+begin_src emacs-lisp -n :results silent
|
#+begin_src emacs-lisp -n :results silent
|
||||||
(autoload 'LaTeX-mode "latex"
|
|
||||||
"Major mode in AUCTeX for editing LaTeX files.
|
|
||||||
See info under AUCTeX for full documentation.
|
|
||||||
|
|
||||||
Entering LaTeX mode calls the value of `text-mode-hook',
|
|
||||||
then the value of `TeX-mode-hook', and then the value
|
|
||||||
of `LaTeX-mode-hook'." 'interactive)
|
|
||||||
|
|
||||||
(with-eval-after-load 'latex
|
(with-eval-after-load 'latex
|
||||||
(setopt LaTeX-electric-left-right-brace t
|
(setopt LaTeX-electric-left-right-brace t
|
||||||
LaTeX-section-hook '(LaTeX-section-heading
|
LaTeX-section-hook '(LaTeX-section-heading
|
||||||
@ -2879,7 +2871,9 @@ def __org_babel_python_format_value(result, result_file, result_params):
|
|||||||
org-latex-pdf-process (list (concat "latexmk -f -pdf -%latex"
|
org-latex-pdf-process (list (concat "latexmk -f -pdf -%latex"
|
||||||
" -interaction=nonstopmode"
|
" -interaction=nonstopmode"
|
||||||
" -shell-escape -outdir=%o %f"))
|
" -shell-escape -outdir=%o %f"))
|
||||||
org-latex-prefer-user-labels t))
|
org-latex-prefer-user-labels t)
|
||||||
|
|
||||||
|
(put 'org-latex-toc-command 'safe-local-variable 'stringp))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+caption[Setup =org-latex-classes= for backwards compatibility]:
|
#+caption[Setup =org-latex-classes= for backwards compatibility]:
|
||||||
@ -3500,21 +3494,13 @@ environment and an unbreakable Code (floating) environment."
|
|||||||
org-latex-engraved-preamble)
|
org-latex-engraved-preamble)
|
||||||
(user-error "`org-latex-engraved-preamble' defines no `Breakable' environment"))
|
(user-error "`org-latex-engraved-preamble' defines no `Breakable' environment"))
|
||||||
(when (eq org-latex-src-block-backend 'engraved)
|
(when (eq org-latex-src-block-backend 'engraved)
|
||||||
(let ((enter "^\\\\begin{Code}\n\\\\begin{Verbatim}")
|
;; Transform only blocks matching at position 0. Therefore, do
|
||||||
(leave "^\\\\end{Verbatim}\n\\\\end{Code}"))
|
;; not transform blocks that are listing environments.
|
||||||
;; Transform only blocks matching the enter regexp at position 0.
|
(when (string-match "\\`\\\\begin{Code}\n" data)
|
||||||
;; Do not transform blocks that are listing environments.
|
(setq data (replace-match "\\begin{Breakable}\n" t 'literal data))
|
||||||
(when (and (string-match enter data) (eql 0 (match-beginning 0)))
|
(if (string-match "^\\\\end{Code}\n" data)
|
||||||
(setq data (replace-match
|
(setq data (replace-match "\\end{Breakable}\n" t 'literal data))
|
||||||
"\\begin{Breakable}\n\\begin{Verbatim}" t t data))
|
(error "Match `^\\\\end{Code}' failure")))))
|
||||||
(when (string-match leave data (match-end 0))
|
|
||||||
(setq data (replace-match
|
|
||||||
"\\end{Verbatim}\n\\end{Breakable}" t t data))
|
|
||||||
(when (string-match enter data)
|
|
||||||
(user-error "The `enter' regexp `%s' should not match" enter))
|
|
||||||
(when (string-match leave data)
|
|
||||||
(user-error "The `leave' regexp `%s' should not match" leave))
|
|
||||||
data)))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+caption[Smart LaTeX engraving of =org-src-mode= blocks]:
|
#+caption[Smart LaTeX engraving of =org-src-mode= blocks]:
|
||||||
@ -3576,9 +3562,6 @@ environments and non-floating breakable LaTeX environments by means of
|
|||||||
(make-local-variable 'org-export-filter-src-block-functions)
|
(make-local-variable 'org-export-filter-src-block-functions)
|
||||||
(add-to-list 'org-export-filter-src-block-functions
|
(add-to-list 'org-export-filter-src-block-functions
|
||||||
'org-latex-engraved-source-block-filter)
|
'org-latex-engraved-source-block-filter)
|
||||||
(make-variable-buffer-local 'org-latex-compiler-file-string)
|
|
||||||
(setq org-latex-compiler-file-string
|
|
||||||
"%% -*- mode: LaTeX; -*-\n%% Intended LaTeX compiler: %s\n")
|
|
||||||
(when (fboundp 'smart-latex-engrave-org-source-blocks)
|
(when (fboundp 'smart-latex-engrave-org-source-blocks)
|
||||||
(smart-latex-engrave-org-source-blocks)))
|
(smart-latex-engrave-org-source-blocks)))
|
||||||
#+end_src
|
#+end_src
|
||||||
@ -3702,7 +3685,9 @@ The listings below implement or reimplement three groups of =org-link= types:
|
|||||||
#+name: lst:define-org-pdfview-link-type
|
#+name: lst:define-org-pdfview-link-type
|
||||||
#+begin_src emacs-lisp -n :results silent
|
#+begin_src emacs-lisp -n :results silent
|
||||||
(with-eval-after-load 'ol
|
(with-eval-after-load 'ol
|
||||||
(autoload 'pdf-view-goto-page "pdf-view" nil t)
|
(autoload 'pdf-view-goto-page
|
||||||
|
"Go to PAGE in PDF with optional WINDOW to go to PAGE in all windows."
|
||||||
|
nil t)
|
||||||
(org-link-set-parameters "pdfview"
|
(org-link-set-parameters "pdfview"
|
||||||
:follow #'org-pdfview-open
|
:follow #'org-pdfview-open
|
||||||
:export #'org-pdfview-export
|
:export #'org-pdfview-export
|
||||||
|
Loading…
Reference in New Issue
Block a user