62

The automatic sized braces are not always the sizes you would choose manually, but that's a matter of personal taste (and the sizes chosen by the automatic algorithm can be adjusted with the \delimitershortfall and \delimiterfactor parameters). More immediate problems are that \left( ... \right) differs from ( ... ) even if the standard small delimiter size ...


57

You don't escape square brackets in LaTeX if you want them typeset. \[ and \] are basically synonyms for \begin{displaymath} and \end{displaymath}, (or \begin{equation*} and \end{equation*} with amsmath loaded), and will make the enclosed content typeset in a unnumbered displayed math equation on a separate line, which is clearly not what you want. In ...


56

The package mathtools has implemented a general solution for that problem. It defines the command \DeclarePairedDelimiter that you can use as follows: \DeclarePairedDelimiter\parentheses{\lparen}{\rparen}. With this single declaration you have a new powerful command for several cases: \parentheses{x} just replaces $(x)$ \parentheses*{x} will do the right ...


49

Try \mathtools's \underbracket and \overbracket: \documentclass{article} \usepackage{mathtools}% http://ctan.org/pkg/mathtools \begin{document} \[ \overbrace{a+b+c}^{d} \quad \overbracket{a+b+c}^{d} \quad \underbrace{a+b+c}_{d} \quad \underbracket{a+b+c}_{d} \] \end{document} You can adjust the rule width and bracket height/depth via optional arguments....


39

You ask: For [mathematical typography], is it ever disadvantageous to use \left( and \right) in equations? Excerpting from pp. 148f. of the TeXbook (emphasis added): At this point you are probably wondering why you should bother learning about \bigl and \bigr and their relatives, when \left and \right are there to calculate sizes for you automatically....


33

The following may be close to what you're looking for: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{gather*} c \colon \{1, \dots, n\} \rightarrow \{1, \dots, n\} \text{ such that}\\ \begin{cases} c(a_i) = a_{i+1} & \text{for }1\le i<l\\ c(a_l) = a_1 \end{cases} \end{gather*} \end{document} Some comments: ...


33

You also could try this: {[2007]}


30

Here's an example: in the first display, \left and \right are used throughout, while in the second several manual adjustments have been made in order to properly typeset the formulas. \documentclass{article} \usepackage{amsmath} \begin{document} \[ \lim_{t\to\infty}\left(1+\frac{r}{t}\right)^{tn}= \lim_{t\to\infty}\left(\left(1+\frac{r}{t}\right)^{t}\right)^...


26

You have, at least two options allowing page breaks inside the framed text. You can use the tcolorbox package: \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{most} \usepackage{lipsum} \newtcolorbox{mybox}{ freelance, breakable, frame code={ \draw ([xshift=2cm]frame.north west) -- (frame.north west) -- (frame.south west) -- ...


25

The mtpro2 package (MathTime Professional II) provides extra-large (up to 10 cm tall) fence symbols -- round parentheses, square brackets, curly braces, angle brackets, etc. -- via its \LEFTRIGHT command. Note that the full mtpro2 package isn't free of charge; however, its "lite" subset, which is all that's needed to produce extra-large fence symbols, is ...


23

\left[\frac{x^3}{3}+x\right]_1^2


22

An almost direct modification of \bordermatrix: \documentclass{article} \makeatletter \def\bbordermatrix#1{\begingroup \m@th \@tempdima 4.75\p@ \setbox\z@\vbox{% \def\cr{\crcr\noalign{\kern2\p@\global\let\cr\endline}}% \ialign{$##$\hfil\kern2\p@\kern\@tempdima&\thinspace\hfil$##$\hfil &&\quad\hfil$##$\hfil\crcr \omit\...


22

LaTeX sees the [ (from the second row) as the beginning of the optional argument for \\ and expects a length to follow; since the following token is k, an error is triggered. To prevent this, you can use braces: \documentclass{article} \begin{document} \begin{tabular}{l l l l} {[k]}bbb & `def' & [h]bbb & `def' \\ {[k]}ccc & `def' & [h]...


22

In the standard fonts \langle has a fixed upper limit and doesn't grow above a certain size. (TeX extends characters by adding vertical extension glyphs and angle brackets don't have a vertical section that can be extended). However if you don't mind distorting the shape you can scale the bracket to fit: \documentclass{article} \usepackage{amsmath} \...


22

The purpose of LaTeX is to make a distinction between the content (here the writing of a pair) and the rendering (the font size, the shape (bold, italic, etc.), the indentation, etc.). You code the content, and you let the rendering be processed according to predefined typographic rules (or you can tell LaTeX which 'rule' to follow). Parentheses are part of ...


21

"As result of the newsgroup thread", which was mentioned in Mateus Araújo' answer, Heiko Oberdiek wrote the mleftright package. "It also adds some error checks (group nesting levels)." (both cited from Heiko's comment to Mateus Araújo' answer) \mleft and \mright from that package can be used instead of \left and \right and do not insert additional ...


21

A simpler solution: \documentclass{article} \usepackage{lipsum} \usepackage{schemata} \begin{document} \lipsum[1] \schema[close]{\lipsum[2]}{} \lipsum[3] \end{document}


20

Note: Without a MWE I will remove \end{tabular} from the definition of your macro and ignore the fact that you declare two argments (one optional, one mandatory) but use only #1. An optional argument behaves quite different from normal arguments and groups as it is catched by TeX with the help of the [/] delimiters. With a macro is defined with \...


19

I found the answer myself. These boxes are called placeholders. They can be removed by going to Options > Configure TexStudio. Then on the bottom left check Show Advanced Options. Go to the Completion tab on the left and in this tab uncheck Arguments as Placeholders on the top right. See the attached image.


19

Making ( active is not really a solution because it is used in so many other ways, but here is how it would be done. To help in this regard. I create \pactive to make ( active which, if used inside a group like an equation, can revert ( to its normal definition after the group is closed. \documentclass{article} \let\svlp( \catcode`(=\active % \def(#1){\...


18

You need to update the way the theorem header is set, since it includes ( ) by default (taken from amsclass.dtx): \def\thmhead@plain#1#2#3{% \thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}% \thmnote{ {\the\thm@notefont(#3)}}} \let\thmhead\thmhead@plain Note the use of (#3) above. So, we copy-and-paste the above definition with the adjustment: \...


17

If you wish to have have a scaleable bracket you should use the following: \[ % Enter math mode \left[ your_formula_goes_here\right] \] If you want to keep it only on one side, use: \[ % Enter math mode \left[ your_formula_goes_here\right. \] or \[ % Enter math mode \left. your_formula_goes_here\right] \] depending on the side. The important ...


17

I'm not sure you really want it, but here it is: \documentclass{article} \usepackage{amsmath} \newcommand{\icol}[1]{% inline column vector \left(\begin{smallmatrix}#1\end{smallmatrix}\right)% } \newcommand{\irow}[1]{% inline row vector \begin{smallmatrix}(#1)\end{smallmatrix}% } \begin{document} Text $\icol{a\\b}$ text $\irow{a&b}$ text \end{...


16

Using a counter in this way is actually very TeXish. I (like your commenters) don't know exactly what scheme will work for you, but here is how to implement something like what you want. Just change what \countlparen and \countrparen do in order to suit your own needs. I admit that as it stands it looks rather ugly. This is a very simple solution: it ...


16

The boxes are placeholders. You can navigate between them using Ctrl+Left/Right. They vanish, if you type over them e.g. if the cursor is before a closing bracket placeholder ), typing ) will move the cursor past and remove the placeholder. You can also use Idefix -> Remove Placeholder (Ctrl+Shift+K).


16

Add \left( and \right., but using equation and aligned: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \left( \begin{aligned} \frac{dS_d}{dt}&= A + \lambda_dR_d + \sigma_d(1-\gamma_d)E_d -\beta_dS_dI_d- (m_d+k_d+c_d)S_d \\[0.5ex] \frac{dE_d}{dt}&= \beta_dS_dI_d -(m_d+\sigma_d+c_d)E_d \\[0.5ex] \frac{dI_d}{dt}&= \...


15

Usually LaTeX is used with e-TeX that provides \middle: \documentclass{article} \begin{document} \[ \left. a \middle| b \right. \] \end{document} The extra spaces of \left. and \right. would probably would make sense, but they can be reduced by package mleftright: \documentclass{article} \usepackage{mleftright} \begin{document} \[ \mleft. a \...


14

Following Herbert Voss' excellent mathmode document, you can redefine the bordermatrix command to take an optional argument that determines the delimeters Note that Herbert also details that the amsmath package offers the same or better macros/environments \documentclass{article} \makeatletter \newif\if@borderstar \def\bordermatrix{\@ifnextchar*{% \@...


14

$d=\{3, 2, 2, 1, 1, 1\}$ should do the trick


14

Although the cases environment probably suits your needs best, I'd like to mention the more versatile and (probably) equivalent syntax \left\{ <blank> \right\}for future use, in case you haven't come across it.


Only top voted, non community-wiki answers of a minimum length are eligible