[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] A question with regexps
From: |
Arash Esbati |
Subject: |
Re: [AUCTeX-devel] A question with regexps |
Date: |
Sun, 27 Sep 2015 10:02:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 |
Hi Mosè,
Mosè Giordano <address@hidden> writes:
> 2015-09-26 23:37 GMT+02:00 Arash Esbati <address@hidden>:
>>
>> 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