ox-latex: Use more robust engraved theme grouping

* lisp/ox-latex.el (org-latex-src--engrave-code): Use of curly brackets
for grouping has a few edge-cases which \begingroup-\endgroup should not
suffer from.
This commit is contained in:
TEC 2023-07-11 18:19:40 +08:00
parent 5efff6ebd4
commit 7f60422b2f
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 2 additions and 2 deletions

View File

@ -3858,12 +3858,12 @@ to the Verbatim environment or Verb command."
(concat "\\begin{Code}\n\\begin{Verbatim}" engraved-options "\n"
engraved-code "\n\\end{Verbatim}\n\\end{Code}"))))
(kill-buffer engraved-buffer)
(concat "{\\engravedtheme"
(if (and theme explicit-theme-p)
(concat "\\begingroup\\engravedtheme"
(replace-regexp-in-string "[^A-Za-z]" ""
(symbol-name theme))
engraved-wrapped
"}")
"\\endgroup")
engraved-wrapped))
(user-error "Cannot engrave code as `engrave-faces-latex' is unavailable.")))