[OS X TeX] Replace \f{x} by \g{x}\h{x}
Andrew Miller
ajmiller at engr.psu.edu
Fri May 1 09:54:32 EDT 2015
If you want to replace \f{stuff} with \g{stuff}\h{stuff} and \f{other stuff} with \g{other stuff}\h{other stuff} you could use find and replace in BBEdit or TextWrangler with Grep where the search string is a regex pattern:
\\f\{([^\}]*)\}
and the replacement is
\\g{\1}\\h{\1}
The pattern ([^\}]*) captures the content inside the curly braces and the \1 pastes it in your \g and \h commands.
Grep needs to be checked in the Find dialog for this to work.
> On May 1, 2015, at 12:44 AM, Victor Ivrii <vivrii at gmail.com> wrote:
>
>
>
> On Fri, May 1, 2015 at 12:03 AM, Alain Schremmer <schremmer.alain at gmail.com> wrote:
> I know it's off topic but I looked and google insists on seeing mathematical functions no matter what.
>
> Where should I look to learn how to search for \f{x} and replace it by \g{x}\h{x} where \f, \g, \h are commands.
>
> Depends on your editor. It could be literal, or \\f{x} to \\g{x}\\h{x}, or \\f\{x\} to \\g\{x\}\\h\{x\}
>
>
>
>
>
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
More information about the MacOSX-TeX
mailing list