Brackets for Math in LaTeX

Is there a convenient way to enter curly braces in Math in latex?

Especially when I already typed a lot of "(" and ")" instead of "\ left (" and "\ right)", how can I make a quick change? similar for "{" and "}" and "[" and "]"?

Is it important to make such a change? I am writing a dissertation.

Thank you and welcome!

BTW: I mainly edit the latex file in Texmaker, and I know how to use emacs. If there is another editor that can quickly perform such a change, let me know.


EDIT:

If there is nothing more than one line in the braces, is there a difference in their appearance between using \ left and \ right and not using? Do I need to use \ left and \ right?

+5
source share
2 answers

The syntax point \left( \right)is that the brackets automatically change according to their contents.

Finding / replacing is an easy way to adjust your brackets (for example, M-% ( RET \left( RETin emacs, which allows you to check every occurrence), or your editing environment can quickly type them.

+5
source

Assuming you don't want to replace (with \left(in the source files, you can try this hack:

\def\oparen{\left(} \def\cparen{\left)}
{\catcode`\(=\active \gdef({\oparen} \catcode`\)=\active \gdef){\cparen}}
\everymath={\catcode`\(=\active \catcode`\)=\active}

But this will probably break some macros using parentheses.

You can do the same with {/ }(use with extreme caution!) And [/ ].

+3
source

All Articles