Hi

I am in a state of advanced desperation. I have a couple of old latex
files which contain a lot of definitions (with arguments) of the sort 


\newcommand{\nv}[2]{\|#1\|_{H^{#2}}}

which are used in the document like this
$\nv{G^a}{s} \leq C_2$ and

so I just wanted to have a simple elisp function which replaces the \nv
calls by its definition.

I thought it should be something like this 
(query-replace-regexp 
"\\(\\\\nv{[a-z,A-Z,0-9]*\\^[a-z,A-Z,0-9]*}{[a-z,A-Z,0-9]*}\\)" 
"\\\\|\\1\\\\|_{H^{\\2}}")

but it failed, I tried something simpler
(query-replace-regexp "\\(\\\\nv{G\\^a}{s}\\)" "\\\\|\\1\\\\|_{H^{\\2}}")

no success neither. I admit regexps drive me crazy and would appreciate
any help.

thanks

Uwe Brauer 

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

_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to