Compare commits

..

No commits in common. "c943430f8ddb79389c08a9e21fb0d9c624dc3ebe" and "4092de976bd1cdedd4be41b40ce108b164b5894c" have entirely different histories.

View File

@ -2215,6 +2215,14 @@ configuration objectives:
#+caption: Set =latex= options.
#+name: lst:set-latex-options
#+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
(setopt LaTeX-electric-left-right-brace t
LaTeX-section-hook '(LaTeX-section-heading
@ -2871,9 +2879,7 @@ def __org_babel_python_format_value(result, result_file, result_params):
org-latex-pdf-process (list (concat "latexmk -f -pdf -%latex"
" -interaction=nonstopmode"
" -shell-escape -outdir=%o %f"))
org-latex-prefer-user-labels t)
(put 'org-latex-toc-command 'safe-local-variable 'stringp))
org-latex-prefer-user-labels t))
#+end_src
#+caption[Setup =org-latex-classes= for backwards compatibility]:
@ -3494,13 +3500,21 @@ environment and an unbreakable Code (floating) environment."
org-latex-engraved-preamble)
(user-error "`org-latex-engraved-preamble' defines no `Breakable' environment"))
(when (eq org-latex-src-block-backend 'engraved)
;; Transform only blocks matching at position 0. Therefore, do
;; not transform blocks that are listing environments.
(when (string-match "\\`\\\\begin{Code}\n" data)
(setq data (replace-match "\\begin{Breakable}\n" t 'literal data))
(if (string-match "^\\\\end{Code}\n" data)
(setq data (replace-match "\\end{Breakable}\n" t 'literal data))
(error "Match `^\\\\end{Code}' failure")))))
(let ((enter "^\\\\begin{Code}\n\\\\begin{Verbatim}")
(leave "^\\\\end{Verbatim}\n\\\\end{Code}"))
;; Transform only blocks matching the enter regexp at position 0.
;; Do not transform blocks that are listing environments.
(when (and (string-match enter data) (eql 0 (match-beginning 0)))
(setq data (replace-match
"\\begin{Breakable}\n\\begin{Verbatim}" t t data))
(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
#+caption[Smart LaTeX engraving of =org-src-mode= blocks]:
@ -3562,6 +3576,9 @@ environments and non-floating breakable LaTeX environments by means of
(make-local-variable 'org-export-filter-src-block-functions)
(add-to-list 'org-export-filter-src-block-functions
'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)
(smart-latex-engrave-org-source-blocks)))
#+end_src
@ -3685,9 +3702,7 @@ The listings below implement or reimplement three groups of =org-link= types:
#+name: lst:define-org-pdfview-link-type
#+begin_src emacs-lisp -n :results silent
(with-eval-after-load 'ol
(autoload 'pdf-view-goto-page
"Go to PAGE in PDF with optional WINDOW to go to PAGE in all windows."
nil t)
(autoload 'pdf-view-goto-page "pdf-view" nil t)
(org-link-set-parameters "pdfview"
:follow #'org-pdfview-open
:export #'org-pdfview-export