Questions tagged [brackets]

{brackets} is about different brackets, their usage and functionality in (La)TeX.

Filter by
Sorted by
Tagged with
169
votes
4answers
629k views

How to write a function (piecewise) with bracket outside?

How to write this Piecewise function using LaTeX? I tried $ \begin{array}{cc} \{ & \begin{array}{cc} 0 & x\leq 0 \\ \frac{100-x}{100} & 0\leq x\leq 100 \\ 0 & ...
160
votes
7answers
18k views

Spacing around \left and \right

Why does the addition of a \left and \right introduces an extra space around the formula? Specifically, why do $\cos(\theta)$ and $\cos\left(\theta\right)$ render differently? Is there a way to use ...
127
votes
4answers
228k views

“(” or “\left(” parentheses?

What is the difference between ( and \left( in LaTeX? Sometimes, when the content is small, it does not seem to matter which pair I use. What is the best practice when it comes to which parentheses ...
70
votes
7answers
49k views

Adding a large brace next to a body of text

I'm writing a short document listing some chronological events. I want to pick out a period with a big brace. Here's a quick mockup: What's the best way to do this? Can I set the size declaratively - ...
62
votes
8answers
16k views

Automatic left and right commands

Is it possible to automatically "add" \left and \right commands in front of all brackets? The source code should be left intact, but LaTeX should interpret every pair of brackets as if they were ...
60
votes
4answers
5k views

Is it ever bad to use \left and \right?

For mathematics, is it ever disadvantageous to use \left( and \right) in equations? I can't see any way that doing this would hinder the typesetting, so why isn't () just converted into \left( \...
54
votes
5answers
23k views

How to have overlapping under-braces and over-braces

I am trying to typeset an equation that has overlapping over and under braces as per the image below: I have managed to typeset it using a sort of a hack, by typing the equation twice, once using \...
53
votes
3answers
98k views

Using square bracket in text mode

I would like to include text like the following in a latex document [2007] EWCA Civ 1042. Unfortunately if I use \[2007\] EWCA Civ 1042 the number within the square brackets is typeset on a separate ...
51
votes
4answers
80k views

Enumerated list with square brackets

I want to make an enumerated list in the following format: [1] foo foo [2] foo foo ... How I can do that using enumerated lists? I have tried the following: \begin{enumerate}[\left[ 1 \right]] ...
51
votes
2answers
86k views

Square brackets in math mode without the bracket symbols

Is there a way to typeset a square bracket without using the symbols [ and ]? What I am looking for is like \vert instead of |. Motivation is a need for a workaround in using LaTeX formulas inside ...
51
votes
6answers
13k views

How can I get an underbrace and an overbrace to partially overlap in an equation?

Sometimes I want to describe portions of an equation using \underbrace and \overbrace in such a way that the portions are not completely distinct, for example: /-------\ x = A + B + C + D + E ...
51
votes
5answers
17k views

How do I label different rows or columns of a matrix using braces?

I have a matrix enclosed in brackets [ ] (or (), or {}, or |'s, or ||'s): - a b c d - | e f g h | | i j k l | - m n o p - which I want to label like so: R |---| -- - a b c d -...
50
votes
2answers
18k views

Difference between \big[ and \bigl[

What is the difference between \big[ (or equivalently \big() and \bigl[? Is it always necessary to mention l (left) and r (right)?
47
votes
4answers
136k views

big angle brackets

I know that \langle and \rangle creates left and right angle brackets. But they don't seem to adopt to the size of the expression inside. For example, if I have a big matrix, I would like to angle ...
45
votes
6answers
41k views

Biblatex, author-year, square brackets

I need to customize the author-year citation in biblatex for a template at work. Right now biblatex cites like this: Ruschmeyer u. a. 1995, S. 123 They way I was told it needs to cite is: [...
45
votes
3answers
77k views

\overbrace and \underbrace with square bracket

I'm trying to put a nice square bracket over a complex text, it should look like an \overline but with ending like \ulcorner and \urcorner. The presence of \overrightarrow and \overleftarrow makes me ...
27
votes
2answers
151k views

Tall curly brace

I would like to put a tall (long) left curly bracket on the left side of the following: \documentclass[12pt]{article} \begin{document} \noindent c: $\{$1, ..., n$\}$ $\rightarrow$ $\{$1, ..., n$\}$,...
27
votes
2answers
821 views

Deep Brackets Around a Text

What I'm trying to achieve is to get the following effect for a body of text: I've looked at many examples that use all sort of brackets, but none of them look like the ones above. So far, I've only ...
27
votes
2answers
11k views

Escaping square braces [closed]

I want to use some text as the optional parameter to some command. The text includes square braces ([ and ]), but since the optional parameter goes within square brackets, unexpected things happen. ...
26
votes
4answers
15k views

Align large vertical delimiters (brackets) to rows of a table?

I’m trying to typeset a table of data, with brackets (i.e. }) at the right-hand side to show a classification of the rows.  Something like: ----------------------- | Aardvark | Armenia | \ |--------...
25
votes
3answers
5k views

Vertically asymmetric size variation for parentheses

One of the difficulties I have with writing formulas in LaTeX is that the standard sizing tools for the variable-size operators (parentheses, etc.) do not account for "high" symbols and "low" symbols ...
25
votes
4answers
8k views

What is the correct way to do delimiters?

I've always used \left and \right with my delimiters, but Martin Heller's answer to another question indicates that this method gives incorrect spacing. The correction appears to be prepending \...
21
votes
1answer
65k views

Brackets in first column in table give “Missing number, treated as zero” error [duplicate]

Possible Duplicate: Error with table I'm writing a table with 4 columns and 1 row. The first column starts with a bracket. It compiles without issues: \documentclass{article} \begin{document} \...
20
votes
3answers
2k views

Curly brace to insert something into an equation? Like an inverted underbrace

I have a generic equation, into which I want to "insert" something so that the reader can see what I inserted into the equation and at which point. E.g. \documentclass{plain} \begin{document} \[ f =...
20
votes
2answers
26k views

\bordermatrix with brackets [ ] instead of parentheses ( )

I have the following code: \documentclass{article} \begin{document} $ M = \bordermatrix{~ & x & y \cr A & 1 & 0 \cr B & 0 & 1 \cr} $ \end{document} ...
19
votes
12answers
3k views

Universal Parentheses

I know it's a bit of an odd request but it is one to which the solution would save me a lot of time. I write a lot of documents in LaTex (especially maths - no surprise) and I prefer the look of $\...
19
votes
4answers
76k views

Lyx: Quick way to insert Dirac bra-ket

In LyX, what is a quick way to insert mismatched delimiters in math environment? I tried typing \left|\right>, but it is not interpreted automatically.
19
votes
1answer
1k views

Indicating matching brackets/parentheses in TeX output

I often have cause to typeset things like this in TeX: When reading expressions like the one above, it's very difficult to tell which brackets match each other. I'd like to be able to define variants ...
18
votes
2answers
6k views

How to remove box outlines around parenthesis/brackets in TexStudio?

As can be seen on the first image there are outlines around the brackets and parenthesis (blue and red colored), on the second picture is shown what happens to these outlines if I move away to another ...
18
votes
2answers
16k views

Angle brackets in non-math-mode text

Is there a way to directly input angle brackets into text without resorting to math-mode symbols? I'd like to correctly indicate orthography in a linguistics paper, and have been resorting to single ...
17
votes
2answers
119k views

Curly brackets don't show. [closed]

I'm typing in LaTeX on a Linux machine (Ubuntu) using Emacs (for typing and compiling). If I type (in mathematical environment) \left\{blah blah\right\} I don't see any brackets at all. If I type ...
17
votes
2answers
12k views

Easily change behavior of \DeclarePairedDelimiter [duplicate]

After seeing the answer to this question I realized that I preferred the way of working of Juan A. Navarro's answer: I.e., \DeclarePairedDelimiter{\parens}{\lparen}{\rparen} from mathtools is a great ...
16
votes
1answer
1k views

Which way of using parentheses looks better?

I feel like the parentheses look strange here: \begin{equation} uv=4\left(\frac{a}{2}\right)^2\left(\frac{b}{2}\right)^2= 4\left(\frac{s}{2}\right)^2\left(\frac{t}{2}\right)^2 \end{equation} Do ...
16
votes
1answer
4k views

How do I remove parentheses from theorem optional argument?

This is a MWE: \documentclass[12pt]{article} \usepackage{amsfonts, amsthm, amsmath, amssymb} \theoremstyle{definition} \newtheorem{Theorem}{Theorem}[section] \newtheorem*{Pythagorean theorem}{...
15
votes
2answers
1k views

How can one put a “[” after \item?

The following does not compile because of the [ after the \item. I presume it is because LaTeX expects a ] as per the \item[option] syntax. However, I just want to insert the [ character into the text ...
14
votes
4answers
904 views

How do I specify a round parenthesis below some text?

I need something similar to \underbrace but instead of curly brackets, I would like to have normal round horizontal paranthesis below my text. Similar to \textbottomtiebar but spanning the whole text. ...
14
votes
3answers
1k views

Angle brackets with an underset arrow

I am trying to make a pair of angle brackets of variable height enclosing a main box along with a box beneath each bracket and an arrow of variable length between these lower boxes. Since I'm sure ...
14
votes
3answers
7k views

Big brackets around Text

I want to create a big single curly bracket over a paragraph of text. I will be using this for many, many paragraphs. I want to make it left and/or right idented. This is for a conversational styled ...
14
votes
3answers
26k views

Inline row vectors with smallmatrix

I typeset inline column vectors with the smallmatrix environment from the amsmath package: $\left(\begin{smallmatrix}a\\b\end{smallmatrix}\right)$ Unfortunately, when I do the same with row vectors ...
13
votes
7answers
7k views

How do I get function argument parenthesis to position correctly?

I'm having trouble with the appearance of parentheses representing function arguments. They appear to far away from the function name. For example the code \left(1-f_{p}\left(l+1\right)\right)\...
13
votes
3answers
3k views

How can I define a command that uses round parentheses around its arguments?

I defined a command for probability distributions, for example: \usepackage{amsmath} \usepackage{xstring} \DeclarePairedDelimiterX{\RoundBrackets}[1]{(}{)}{#1} \newcommand{\p}[1]{\RoundBrackets{\...
13
votes
1answer
2k views

Bracket in math and text

When I write the pair (x,y) with Latex, which way is correct: ($x,y$) or $(x,y)$? Thanks in advance.
13
votes
1answer
6k views

How to escape “]” in a description's item tag?

In a description like \begin{description} \item[\texttt{DoSomething(items[])}:] ... \end{description} , how do I escape the "]" character?
13
votes
1answer
2k views

Import curly brackets from MathDesign (Utopia)

I am using Fourier maths fonts with Utopia text (\usepackage{fourier}) for a book project, but I'm not satisfied with the curly brackets \{ and \}. They are too slim, and barely distinguishable from ...
13
votes
2answers
696 views

Thickness of Brackets and Parentheses

I try to make all the brackets and parentheses to have the same thickness. Normally, the thickness of brackets and parentheses depends on how many lines of array and thing you will have inside them. ...
12
votes
3answers
420 views

Diagonal brace with nested parenthesis

I would to obtain a result similar to the image below. So far I only have \bigg( \Big( \big( a^q \big)^q \Big)^{\rotatebox{25}{$\cdots$}} \bigg)^q, without the brace. I tried to follow this question,...
12
votes
2answers
5k views

LaTeX: optional arguments with square brackets

LaTeX is trying to add a missing $ that I don't want to the following code. Minimal working example: \documentclass[letter,12pt]{article} \newcommand{\monkeyBeans}[2][]{ \parbox{4in}{#1} } \begin{...

1
2 3 4 5
16