I know there has been discussion about this topic, but I haven't seen a working solution.
Is it possible to define a macro within LaTeX, such that inside math mode, (
would produce \left(
and )
would produce \right)
?
I know it is possible to define a different macro, say \lparen
, but it has the disadvantage of not being as visually clear, and also not as simple, as (
. I would like to override the (
command only in math mode. This issue is pretty annoying when writing a lot of math.
\left(\sum_{\substack{i,j\\i<j}} ...\right)
, just look stupid. Thoughnath
is able to handle most of it.(\sum_{\substack{i,j\\i<j}} ...)
does not look good either.\Big
instead of\left
and\right
would perhaps be appropriate here, so you've got a point. Another example where replacing all(
with\left(
and all)
with\right)
completely fails is when you have a multi-line expression, split in for example in thearray
environment, and you want to fence the entire expression. If you try this with\left(
and\right)
you will generate an error, but using plain parenthesis or (e.g.)\Big(
and\Big)
works.