auctex-devel
[Top][All Lists]
Advanced

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

[Some solutions] (was: a lisp function that replaces macros in LaTeX doc


From: Uwe Brauer
Subject: [Some solutions] (was: a lisp function that replaces macros in LaTeX document)
Date: Fri, 03 Nov 2023 17:54:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>>> "UB" == Uwe Brauer <oub@mat.ucm.es> writes:

> Hi all


> Almost all LaTeX source files I receive from colleagues have dozens or
> more definitions of the sort 

> \newcommand{\fluidenergy}[1]{\underline{E}_{\partial \Phi;#1}}
> \newcommand{\eq}[2]{
> \begin{equation}\label{E:#1}
> \begin{aligned}
>   #2
> \end{aligned}
> \end{equation}
> }
> \newcommand{\rrho}{\rho}


[Snip]...


Hi all

I have found a partial solution to my problem at:

https://tex.stackexchange.com/questions/67709/is-there-a-script-that-reads-a-tex-file-and-replaces-every-instance-of-a-newcom

where this issue is discussed.

1. The de-macro included in TeXlive did not work for me.

2. However, a Perl script that can be found on this page did work, but
   only for macros without arguments.

3. On the other hand, the page https://jsfiddle.net/zoho/ed84y/
   surprised me; it replaced most of the macros I have tried so far
   quite well, although it doesn't mean it's error-free.

Perhaps someone may find it useful.

Regards,

Uwe Brauer

-- 
I strongly condemn Hamas heinous atrocities on Israel, especially the 
despicable pogroms.
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the NATO membership of Ukraine.
I support the EU membership of Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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