Just wondering if there is a way to replace the brackets - '(' and ')' within equations with '\left(' and '\right)' but not replace the brackets within general text.
For example, in the body of a latex document
This is normal text (these brackets should not be replaced).
On the other hand, this equation - $(\dfrac{x}{2})$ should have it's brackets replaced, such that it outputs $\left(\dfrac{x}{2}\right)$
I'm assuming I would have to use the \renewcommand to handle the bracket replacement. But not sure how (and if it's possible) to do this bracket replacement conditionally (to only occur within equations)
\renewcommandto redefine them. Would any of these solutions be an acceptable alternative for your needs? Automatic left and right commands – gz839918 Sep 14 '23 at 02:43\leftand\rightnext to each use of parentheses or brackets. Rather, there are good reasons for not doing it. – egreg Sep 14 '23 at 07:28\leftand\rightis to help enlarge the brackets so that they don't look awkwardly small, when housing a\dfrac{}{}– Joshua Then Sep 14 '23 at 07:47br{}) as I have quite a few documents that I need this implemented for, that already have brackets in place! - and don't have time to change them all – Joshua Then Sep 14 '23 at 07:48