[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] Prompt for optional short caption parameter.
From: |
Mosè Giordano |
Subject: |
Re: [AUCTeX-devel] Prompt for optional short caption parameter. |
Date: |
Thu, 17 Mar 2016 10:53:57 +0100 |
Hi Matt,
2016-03-16 15:48 GMT+01:00 Matthew Leach <address@hidden>:
> Mosè Giordano <address@hidden> writes:
>
>> Hi Matt,
>
> Hi Mosè,
>
>> 2016-03-16 1:00 GMT+01:00 Matthew Leach <address@hidden>:
>>> Hi all,
>>>
>>> I quite frequently use the optional short-caption parameter that one can
>>> pass LaTeX's \caption macro. However, when defining a new figure, I'm
>>> not prompted for \caption's optional argument and usually have to add
>>> this in manually.
>>>
>>> This patch adds a new prompt when creating a new figure environment that
>>> will ask the user for \caption's optional parameter. However, to
>>> prevent this becoming an inconvenience, the optional parameter is only
>>> prompted for if the length of the caption parameter is >=
>>> `LaTeX-short-caption-prompt-length'. The default value of the new
>>> length parameter has a default value of 40 which I chose somewhat
>>> arbitrarily, so can be easily changed if people like or removed
>>> altogether.
>>>
>>> Feedback welcome :-).
>>
>> I like your idea and above all tying the prompt for an optional
>> argument to the length of the full caption: this is indeed the reason
>> why one should use a short caption.
>>
>> I have a couple of comments:
>>
>> - the caption command is inserted also in style/longtable.el and
>> style/psfig.el
>
> Ah, good spot - I missed those.
>
>> - when you add or change a customizable option (or any interesting
>> feature in general), please prove its description for the manual as
>> well. In addition, an entry for doc/changes.texi is warmly
>> recommended. If the option is there but users have to dig into the
>> code to discover it (or re-read the manual to find new feature,
>> instead of having a clear list of additions) it'll be useful just for
>> you ;-)
>
> Yep, all good points. Please see the attached V2 patch which should
> take care of these. :-).
Great, thanks!
Bye,
Mosè