0
I'm using LaTeX extensively and would like to be able to define an environment "examples" that combines the advantages of providing a complete "itemize" environment, while at the same time also prompting for an optional label, and prefixing "ex:", if a label is given:
\begin{examples}
\label{ex:given_label}
\item [cursor here]
\end{examples}
I have tried adding LaTeX-add-environments in my .emacs file, and it seems that I can either get the itemize environment or the prompting for the label:
(add-hook
'LaTeX-mode-hook
(lambda ()
(LaTeX-add-environments
'("examples" LaTeX-env-label))
(add-to-list 'LaTeX-label-alist '("exampples" . "ex:"))))
(add-hook
'LaTeX-mode-hook
(lambda ()
(LaTeX-add-environments
'("examples" LaTeX-env-item))))
But how can I combine both of these definitions? Any advice is greatly appreciated.
3
This question might get better results on TeX - LaTeX Stack Exchange. Don’t just re-post it there; wait a couple of days. If you don’t get a satisfactory response here, “flag” the question (click on the “flag” link) and ask to have it moved. It might be a good idea to register your account first.
– Scott – 2017-10-29T21:11:08.220The title of your question is “Mac OS 10.12, AucTeX 11.91.” That is not a title. – JakeGould – 2017-10-29T21:30:06.010