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

Michael Sharpe msharpe at ucsd.edu
Fri Jun 9 01:56:20 EDT 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





More information about the MacOSX-TeX mailing list