[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: |
Sat, 13 Aug 2016 20:19:54 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 |
Hi Mosè,
Mosè Giordano <address@hidden> writes:
> 2016-08-12 12:09 GMT+02:00 Arash Esbati <address@hidden>:
>>> 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'.
>
> Thank you so much, that's exactly what I was thinking!
Thank you for double checking!
>> One thing occured to me as I wrote it:
>> AUCTeX inserts an `\item' if one hits `M-RET' in an equation env:
>> [...]
>>
>> I added some code to `LaTeX-empheq-item-equation' to suppress this.
>> Should AUCTeX do something like this for standard equation? WDYT?
>
> I think this is fine in `empheq' environment, not sure it's valuable
> elsewhere. One shouldn't use it in environments that doesn't have an
> item-like style: I consider it an error of the user to try to issue
> C-c C-j in an `equation' environment.
Yes, I agree that pressing C-c C-j in such a case is an user error.
Then let keep it this way, I leave the code in empheq.el as is.
>>>> 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)
>
> Oh, yes, I think you're right, good catch.
I see that mathtools.el has also some other issues. I have to go
through the manual of mathtools since I've never used it (applies to
empheq as well ;-)
> I think you can install this empheq style file.
Thanks for the thumbs-up; I added some code to update the key-value when
new delimiters are defined with \Declare(Left|Right)Delimiter. I'll do
some final tests and install the file.
Best, Arash
- [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, 2016/08/12
- Re: [AUCTeX] Support for empheq, Mosè Giordano, 2016/08/13
- Re: [AUCTeX] Support for empheq,
Arash Esbati <=