unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Convert some Latex expressions in Emacs.
Date: Tue, 17 May 2022 02:02:23 +0200	[thread overview]
Message-ID: <87k0alvxf4.fsf@web.de> (raw)
In-Reply-To: CAGP6PO+NP3VKjiHOGTGSc0YB9QgD56fvKTYnDkvvGDJKJVresQ@mail.gmail.com

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.

Michael.




  parent reply	other threads:[~2022-05-17  0:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  3:25 Convert some Latex expressions in Emacs Hongyi Zhao
2022-05-16  4:49 ` Emanuel Berg
2022-05-17  0:02 ` Michael Heerdegen [this message]
2022-05-17  2:12   ` Hongyi Zhao
2022-05-17  2:22     ` Emanuel Berg
2022-05-17  3:23     ` Michael Heerdegen
2022-05-17  3:38       ` Michael Heerdegen
2022-05-17  3:44       ` Hongyi Zhao
2022-05-17  4:46         ` Emanuel Berg
2022-05-18  0:25           ` Hongyi Zhao
2022-05-17 23:45         ` Michael Heerdegen
2022-05-18  0:23           ` Hongyi Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k0alvxf4.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).