GNU bug report logs - #48078
Verbatim environments with key-value arguments

Previous Next

Package: auctex;

Reported by: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>

Date: Wed, 28 Apr 2021 09:12:01 UTC

Severity: normal

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tassilo Horn <tsdh <at> gnu.org>
To: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
Cc: 48078 <at> debbugs.gnu.org, 48078-done <at> debbugs.gnu.org
Subject: bug#48078: Verbatim environments with key-value arguments
Date: Wed, 28 Apr 2021 20:41:16 +0200
Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com> writes:

Hi Dario,

> \begin{tcblisting}{%
> listing only,%
> title={Example shell session},
> minted language=shell-session,%
> minted options={},%
> }
> $ echo 'Hello, World!'
> Hello, World!
> \end{tcblisting}
>
> Feel free to add "tcblisting" to `LaTeX-verbtaim-environments' and
> check out the example above: You will see that everything after
> title={Example shell session} is fontified as verbatim.
>
> I would be happy to try and improve the regex so that it handles
> key-value arguments,

To handle all situations correctly is impossible.  You can't properly
match nested constructs like balanced parens/braces using regular
expressions.  For that, you'd need an actual parser.

But you can at least allow a fixed number of balanced braces, and I've
just done that in order to allow one level of nested {...} in mandatory
arguments.  (We already allowed for one level of nested brackets in an
optional argument.)

I'll make a new ELPA release.

Thanks for the report and Bye,
Tassilo




This bug report was last modified 4 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.