[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48078: Verbatim environments with key-value arguments

From: Arash Esbati
Subject: bug#48078: Verbatim environments with key-value arguments
Date: Thu, 29 Apr 2021 23:39:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50

Hi Tassilo,

Tassilo Horn <tsdh@gnu.org> writes:

> Arash Esbati <arash@gnu.org> writes:
>> Thank you for the quick fix.  I also removed some unnecessary escaping
>> of characters in the regexp for the optional arguments.
> I had to check the docs to understand that. :-)

I have to check the docs every time I deal with regexp's :-)

>> While we're at, I think we should replace
>>     "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
>> with
>>     "\\(?:\\[[^][]*\\(?:{[^}{]*}[^}{]*\\)*\\]\\)?"
>> at some point.
> But your advertised new regex doesn't even match the normal nested
> bracket case, e.g., [foo=[1,2], bar={~}].

It has to match [foo={[1,2]}, bar={~}].  In your example above, LaTeX
scanner stops matching for the optional argument after ] and everything
after that would be part of the environment.

>> Rationale: One can have a single ] in an optional argument which is
>> hidden inside {}.
> Not everything that can be written should be written. ;-)

A slight delay might be acceptable, sometimes :-)

Best, Arash

reply via email to

[Prev in Thread] Current Thread [Next in Thread]