Is there any convenient way to type in braces in Math in Latex?
Especially when I have already typed in a lot of "(" and ")" instead of "\left(" and "\right)", how can I do a quick replacement? similarly for "{" and "}" and "[" and "]"?
Is it important to make such changes? I am writing a thesis.
Thanks and regards!
BTW: I mainly edit latex file in Texmaker and I know how to use emacs. If there is other editor that can do such replacement in a quick way, please let me know.
EDIT:
If there is nothing taking more than one line height inside the braces, is there any difference in their appearances between using \left and \right and not using? Is it still necessary to use \left and \right ?
The point of the \left(
\right)
syntax is to have brackets automatically resize to fit their content.
A search/replace is a simple way to correct your brackets (M-% ( RET \left( RET
in emacs for example, which will let you check each occurrence), or your editing environment might have a quick way to type them.
Assuming that you don't want to replace (
's with \left(
's in your 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 of the macros using parentheses.
The same trick possible with {
/}
(use with extreme care!) and [
/]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With