[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Support for empheq
From: |
Arash Esbati |
Subject: |
Re: [AUCTeX] Support for empheq |
Date: |
Fri, 12 Aug 2016 12:09:55 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 |
Hi Mosè,
Mosè Giordano <address@hidden> writes:
> 2016-08-10 13:26 GMT+02:00 Arash Esbati <address@hidden>:
>> Writing 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.
> I 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.
> However, 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.
> A 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?
>> And 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
empheq.el
Description: application/emacs-lisp
- [AUCTeX] Support for empheq, Hong Xu, 2016/08/06
- Re: [AUCTeX] Support for empheq, Mosè Giordano, 2016/08/07
- Re: [AUCTeX] Support for empheq, Hong Xu, 2016/08/08
- Re: [AUCTeX] Support for empheq, Arash Esbati, 2016/08/10
- Re: [AUCTeX] Support for empheq, Hong Xu, 2016/08/10
- Re: [AUCTeX] Support for empheq, Mosè Giordano, 2016/08/11
- Re: [AUCTeX] Support for empheq,
Arash Esbati <=
- Re: [AUCTeX] Support for empheq, Mosè Giordano, 2016/08/13
- Re: [AUCTeX] Support for empheq, Arash Esbati, 2016/08/13