[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Environment optional argument defect
From: |
Arash Esbati |
Subject: |
Re: Environment optional argument defect |
Date: |
Tue, 29 Nov 2022 10:53:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 |
Hi Keita,
Ikumi Keita <ikumi@ikumi.que.jp> writes:
> That is actually one of posssible arroaches. In that sense, we can even
> say that `TeX-insert-macro-default-style' is unnecessary. :-) That is,
> `TeX-insert-macro' can always skip optional argument queries.
But this was not what I meant :-) I was talking about: I missed an
argument by accident as I hit RET too eagerly, now how can I fix it?
> How can we activate input support for environment optional arguments
> if the user customizes `TeX-insert-macro-default-style' to
> `mandatory-args-only'?
I see 2 possibilities:
• Move the queries more into the style hooks and push them through
`TeX-parse-arguments'
• If one function asks for more arguments, use
`LaTeX-check-insert-macro-default-style' which is more tedious
As an example, try this small file and do 'C-c C-e align* RET' after
changing the value of `TeX-insert-macro-default-style':
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage[overload]{empheq}
\begin{document}
\begin{verbatim}
(setq TeX-insert-macro-default-style 'show-optional-args)
(setq TeX-insert-macro-default-style 'mandatory-args-only)
\end{verbatim}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
--8<---------------cut here---------------end--------------->8---
Best, Arash