[OS X TeX] Place holder in TeXShop's Find

Michael Sharpe msharpe at ucsd.edu
Fri Jun 9 07:56:20 CEST 2017

> On Jun 8, 2017, at 12:33 PM, Alain Schremmer <schremmer.alain at gmail.com> wrote:
>
> I would like to replace all commands of the form \colorbox{Color} by the command \hlc[Color] with TeXShop's Find.
>
> I assume that I should use the option Regular Expressions with some place holder:
>
> 	Find: \colorbox{PlaceHolder}
>
> 	Replace: \hlc[PlaceHolder]
>
> but I have no idea what PlaceHolder ought to be.
>
> The reason is that \hlc, a modification of soul's \hl, is breakable so I would much appreciate help in the matter.
> --schremmer

Find: \\colorbox\{([A-z]*)\}

Replace: \\hlc\[\1\]

Be sure to check the Regular Expressions box on the OgreKit Find window. The above assumes that the color names are purely alphabetic, with no spaces or other characters like hyphens or periods.

Michael

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://www.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex