Hi Mosè,
Post by Mosè GiordanoPost by Arash EsbatiWriting a style file for empheq.sty was on my list for a long time. I
had a skeleton, but now I finished it. Could you test the attached file
and report back? I will install the file then for the next release.
Looks good, thank you!
Thank you for looking at the code.
Post by Mosè GiordanoI was wondering why you used `dolist'+`add-to-list' to add the options
of mathtools and amsmath to those of empheq, but I found the answer in
mathtools style file: avoid duplicate (or even triplicate) entries.
Right? I think you can drop a comment to explain it to other readers
;-)
You are right, I've added a comment.
Post by Mosè GiordanoHowever, mathtools already adds amsmath's options to its owns, do you
need to repeat it also in empheq style file?
Nice catch! My mistake while copy&pasting. Thnx.
Post by Mosè GiordanoA feature request: do you think you can make `TeX-insert-item' work in
`empheq' environment when one specifies `align', `gather', or
`alignat' ams-environments, just like it works in the parent
environments? This may not really easy to implement, tough.
Done, new version is attached, the function is called
`LaTeX-empheq-item-equation'. One thing occured to me as I wrote it:
AUCTeX inserts an `\item' if one hits `M-RET' in an equation env:
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage[overload]{empheq}
\begin{document}
\begin{equation}
\label{eq:1}
Hit `M-RET' here
\end{equation}
\begin{empheq}{equation}
\label{eq:2}
Hit `M-RET' here
\end{empheq}
\end{document}
--8<---------------cut here---------------end--------------->8---
I added some code to `LaTeX-empheq-item-equation' to suppress this.
Should AUCTeX do something like this for standard equation? WDYT?
Post by Mosè GiordanoPost by Arash EsbatiAnd while we're at it: Are you also using features from mathtools.sty?
I think AUCTeX's style file has a bug in \shoveleft and \shoveright.
What do you refer to?
Hit `C-c C-m shoveleft RET 4 RET 5 RET' in example above and AUCTeX asks
for a width and height resulting in \shoveleft(4,5){}. \shoveleft takes
an optional dimension argument, it should be \shoveleft[1cm]{} (see
mathtools doc page 17). The entries
'("shoveleft" [ TeX-arg-size ] 1)
'("shoveright" [ TeX-arg-size ] 1)
should be
'("shoveleft" [ TeX-arg-length ] 1)
'("shoveright" [ TeX-arg-length ] 1)
Best, Arash