help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Convert some Latex expressions in Emacs.


From: Hongyi Zhao
Subject: Re: Convert some Latex expressions in Emacs.
Date: Tue, 17 May 2022 10:12:39 +0800

On Tue, May 17, 2022 at 8:02 AM Michael Heerdegen
<michael_heerdegen@web.de> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>
> > 1. Remove the following stuff: `\begin{array}{l}', `\end{array}'.
> > 2. For each word, remove '{' and '}', spaces, and add * between two
> > characters of it, i.e., `P^{5} Q^{2} R' should be changed to
> > `P^5*Q^2*R'.
> > [...]
>
> If you have some time you might have a look at peg.el (from Gnu Elpa).
> PEGs (Parsing Expression Grammars) are a bit more expressive than
> regular expressions.  Takes a bit of time to get used to the concept but
> if you have to solve such tasks more often it may pay off.

I roughly browse the relevant introduction here [1]. It seems that all
Emacs Lisp based regex patterns are more complicated and tedious than
other languages, e.g., python, wolfram, and so on.

[1] https://elpa.gnu.org/packages/peg.html

> Michael.
>
Regards,
Hongsheng



reply via email to

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