[Top][All Lists]

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

Re: [O] [RFC] Alternative to sub/superscript regexp

From: Rasmus
Subject: Re: [O] [RFC] Alternative to sub/superscript regexp
Date: Mon, 25 Nov 2013 22:53:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> Hello,
> For the record `org-match-substring-regexp' is a variation on:
> "\\(\\S-\\)\\([_^]\\)\\(\\(?:\\*\\|address@hidden 
> \t\r\n,:\"?<>~;./{}=()]+\\)\\)\\)"
> I think it is a bit convoluted and therefore difficult to predict.

Luckily this can be made less convoluted:)

> "\\(\\S-\\)\\([_^]\\)\\(\\*\\|[+-]?\\(?:\\w\\|[0-9.,\\]\\)*\\(\\w\\|[0-9]\\)\\)"
> That is, without braces, either an asterisk or any combination of word,
> number, dot, comma and backslash characters, which may start with either
> a plus or a minus sign but cannot end with either a dot or a comma.

Should parentheses be recognized? e.g. A₍₁₎ (A_{(1)}) is sometimes
used to denote e.g. a submatrix of A corresponding to the removal of
column 1 in A.  Personally, I would mostly always wrap such stuff into
math anyway (entities being the exception), since I want it in
math-mode anyway.

> What do you think?

This proposal seems better.  Thanks!

Also, it reminded me of this comic:


reply via email to

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