Unfortunately, I have to convert code created by mathtype into real latex code. My converted creates hideous expressions like
\textstyleMTConvertedEquation{{\textbackslash}[\{X\_k\} {\textbackslash}equiv {\textbackslash}left(
\{\{X\_\{1,k\}\},...,\{X\_\{n,k\}\}\} {\textbackslash}right){\textbackslash}]}
I would like to globally convert expressions like these to latex code, by replacing the matched curly braces with $
's. Obviously, the %
character will match up the braces but I don't know how to incorporate this fact into a global command, i.e., I'd like to construct a command of this form, but don't know how to identify the matched brace.
:g/\\textstyleMTConvertedEquation{.*<matched brace>/s//\$\1\$/g
Thanks for any suggestions!