Le 30/05/22 à 15h30, Denis Bitouzé a écrit :
>> I was thinking about the missing definition for environments like
>> ltx-code and such. Also other macros like \package, \software, \file,
>> \letgutacro etc.
>
> Okay :)
Well, not that easy when you don't know anything to `elisp` :$
Looking at `tcolorbox.el` and `listings.el`, I tried the following for
the environments `ltx-code` and friends:
┌────
│ (defvar LaTeX-ltx-code-keyval-options
│ '(("title")
│ ("notitle")
│ ("adjusted title")))
│
│ (defun LaTeX-ltx-code-keyval-options ()
│ "Return an updated list of key=vals from letgut class."
│ (append
│ ;; Standard key=vals:
│ LaTeX-listings-key-val-options))
│
│ (LaTeX-add-environments
│ '("bookreview" LaTeX-env-args
│ (TeX-arg-key-val (("title")
│ ("reviewer")
│ ("bibkey")
│ ("frontcover")
│ ("price"))))
│ '("ltx-code" LaTeX-env-args
│ [TeX-arg-key-val (LaTeX-ltx-code-keyval-options)])
│ '("ltx-code-result" LaTeX-env-args
│ [TeX-arg-key-val (LaTeX-ltx-code-keyval-options)])
│ '("ltx-code-external-result" LaTeX-env-args
│ [TeX-arg-key-val (LaTeX-ltx-code-keyval-options)]
│ TeX-arg-file))
└────
but it doesn't work:
┌────
│ mapcar: Wrong type argument: listp, LaTeX-ltx-code-keyval-options
└────
--
Denis