[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] change: documents with $$ to \begin{documents}
From: |
David Kastrup |
Subject: |
Re: [AUCTeX-devel] change: documents with $$ to \begin{documents} |
Date: |
Sun, 04 Jan 2015 16:04:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Uwe Brauer <address@hidden> writes:
>>> "David" == David Kastrup <address@hidden> writes:
>
> > Uwe Brauer <address@hidden> writes:
> >> Hi[1]
> >>
> >> Sometimes I receive documents with have basically only
> >> $$
> >> \int f =0
> >> $$
> >> constructions instead of say
> >> \begin{displaymath} or {equation*} etc.
> >>
> >> Anybody has a idea how to change the evil $$ to true latex constructs by
> >> using sophisticated regexp?
>
> > Not all that sophisticated.
>
> > M-% \$\$\(.*?\)\$\$ RET \\begin{equation*}\1\\end{equation*} RET
>
> Thanks, but
>
>
> M-% is bound in Xemacs 21.5.33 and GNU emacs 24.1 to
> query-replace but it
> this should be query-replace-regexp, right?
Yes, C-M-%, sorry for that.
> Your code works for constructions like
>
> $$ \int $$
>
> But not for
> $$
> \int
> $$
Well, yes. Instead of . you need \(.\|^J\) or \SS (that's a bad cheat:
any character with a syntax class other than S which does not exist as
far as I know).
--
David Kastrup
Re: [AUCTeX-devel] change: documents with $$ to \begin{documents}, Lars Madsen, 2015/01/05