Hi Mosè,

Mosè Giordano <[email protected]> writes:

> 2015-09-26 23:37 GMT+02:00 Arash Esbati <[email protected]>:
>>
>> Thanks for your response and sorry for being unclear.  Let me rephrase
>> that: The idea is to pass the type of a new float-env to AUCTeX as a
>> TeX-comment enclosed in braces, e.g.
>>
>> --8<---------------cut here---------------start------------->8---
>> \usepackage{newfloat}
>>
>> \DeclareFloatingEnvironment[
>>   name=Code,
>>   listname={List of Codes},
>>   fileext=lol]{code}  %  {verbatim}
>> %                     ^^^^^^^^^^^^^ {verbatim|figure|table}
>> --8<---------------cut here---------------end--------------->8---
>
> Probably it's just my fault because I don't know the package and its
> syntax, but giving a (not very thorough) look at the documentation I
> can't find this.

It is rather a feature of `newfloat.el' than `newfloat.sty'.  The
comment is ignored by TeX.  I use it in `LaTeX-newfloat-auto-cleanup' to
setup the defined env in AUCTeX.

> Anyway, you can try using a shy group that may or may not be there:
>
>   \\(?:[ %]*{\\([^}]*\\)}\\)?
>
> The trick is "?" after the group.  Hope this helps.

Indeed, that did the trick.  Many thanks!

Best, Arash


_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to