# Automatically convert \left to \Bigl

I have a LaTeX file, which includes tons of other auto-generated LaTeX files containing TikZ figures. Suppose I want to make every \left( in the TikZ figure appear at the same, fixed size, say \Bigl(.

It's not impossible to change the auto-generator side, but I'd like to solve the problem on the side which includes the figures.

I tried

\def\includetikzfile{#1}{{\let\left\Bigl\input{#1.tikz}}}


but it quickly went to an infinite loop, exceeding the TeX capacity.

How can I do it?

-

It's easy to see where the loop comes from as \Bigr is defined in terms of \Big which is (by default)

\def\Big#1{{\hbox{$\left#1\vbox to11.5\p@{}\right.\n@space$}}}


so defined in terms of \left

It is probably safer just to do a replace/edit on the incoming file

If you wanted to do this in TeX you'd neeed

\let\oldleft\left
\let\oldright\right


and then redefine each of these

\def\big#1{{\hbox{$\left#1\vbox to8.5\p@{}\right.\n@space$}}}
\def\Big#1{{\hbox{$\left#1\vbox to11.5\p@{}\right.\n@space$}}}
\def\bigg#1{{\hbox{$\left#1\vbox to14.5\p@{}\right.\n@space$}}}
\def\Bigg#1{{\hbox{$\left#1\vbox to17.5\p@{}\right.\n@space$}}}


to use \oldleft and \oldright then you would be slightly safer to do

\let\left\Bigl
\let\right\Bigr


in your local redefinition, although there can still be cases that fail, notably as the \left and \right primitives do not scan for arguments the same way as macros like \Bigr so for example

$\left\delimiter"26A30C \frac{a}{b} \right.$


is OK but if you replace \left with \Bigr you get

$\Bigl\delimiter"26A30C \frac{a}{b} \Bigr.$


which produces

! Missing number, treated as zero.

as the argument to \Bigr is just the token \delimiter not the full delimiter specification.
Thanks for the ellaboration about drawbacks due to \left being primitive! –  yo' Nov 6 '12 at 21:54
Thanks! Is there a way to do the redefinition of \big etc automatically? I guess I should ask it as a separate question, as is customary in Stack Exchange... –  Yuji Nov 7 '12 at 8:02