Text FormattingBrackets and Parentheses macros

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Melaviryas
Posts: 1
Joined: Tue Jan 31, 2023 10:16 pm

Brackets and Parentheses macros

Post by Melaviryas »

Hello,
I am not skilled in LaTeX programming, so I ask for your helps.
So when I use the () parentheses or [] brackets, there are not auto adjusting its size.
For example, f(0) is fine, but for f(\frac{1}{2}), the output parentheses is small in one size.
So I need to use \left( \right) for its to be auto adjusting it size, in this case f\left(\frac{1}{2}\right).
After a while of writing like this, I'm seeking for some easy macros.
I want to re-define the ( as \left( and ) as \right), so that I can save some time.
I tried the \newcommand and \renewcommand, and it does work well.( I do have the required package)

From log, Missing control sequence inserted. \newcommand{ ( }{\left( }

Please help, if it is possible to do this.

Thank you very much!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Brackets and Parentheses macros

Post by Stefan Kottwitz »

Hi,

welcome to the forum!

Redefining parentheses would affect other places where LaTeX uses parentheses (such as in \makebox), in TikZ (coordinates), and using ( or ) in text. I would not do this.

Using \left and \right when you need it, gives you more control, even if it's more writing. Also, you may know, in multi-line equations such pairs of auto-sizing delimiters can be an issue.

Stefan
LaTeX.org admin
Post Reply