96
votes
Accepted
Using square bracket in text mode
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 ...
61
votes
25
votes
Accepted
How to remove box outlines around parenthesis/brackets in TexStudio?
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 ...
24
votes
Accepted
Bracket in math and text
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 ...
23
votes
Using square bracket in text mode
If [ and ] are causing trouble, just switch them out for \lbrack and \rbrack.
19
votes
Accepted
Universal Parentheses
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 ...
19
votes
Accepted
Square bracket indicating "A or B or C"
Here is a solution that allows any number of choices for the bracket:
The call for this output is \orbrace[.5]{A=0,B=0,C=0,D=0}
The command \orbrace takes 2 arguments, one optional. The optional .5 ...
18
votes
How to remove box outlines around parenthesis/brackets in TexStudio?
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 ...
18
votes
Accepted
Why should I “enclose the previous parenthesis with ‘{}’”?
Apparently, the developer of chktex advises to always do something like
{(a+b)}^2
which is not what's normally done. There's no need for it and the output is very disputable in typographic terms: ...
17
votes
Tall curly brace
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 ...
17
votes
Universal Parentheses
An easy solution would just be to use the qty command from the physics package. Here's a MWE:
\documentclass{article}
\usepackage{physics}
\begin{document}
With \texttt{qty}:
\[
\qty(m_{\frac\alpha\...
17
votes
Big Bracket for equations
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 +...
17
votes
Accepted
Why do \left( \frac{a}{b} \right) and \left( \frac{b}{a} \right) have different sizes?
To see why this is the case, consider looking at the bounding box associated with the resulting \frac (or the numerator/denominator):
\documentclass{article}
\begin{document}
\setlength{\fboxsep}{-\...
16
votes
Automatic left and right commands
To make auto-sized bracketing as painless and concise as possible, here's what I do:
\usepackage{mathtools}
\DeclarePairedDelimiter\autobracket{(}{)}
\newcommand{\br}[1]{\autobracket*{#1}}
Example:...
16
votes
How to write a function (piecewise) with bracket outside?
I think that in this case also the use of dcases can be recommended.
It can be found in the mathtools package.
Someone may prefer to have the arguments of the cases environment to be typeset in ...
16
votes
Accepted
Square brackets instead of curvy brackets
There are many expanding delimiters available in TeX/LaTeX; the main ones are (round) parentheses, (square) brackets and braces. The only problematic ones among them are the braces, because { and } ...
15
votes
Macros \dv and \pdv eat the subsequent parenthesis argument
The package physics abuses the possibilities afforded by xparse to define commands having very weird syntax.
For instance, if you want to typeset the standard \frac{dx}{dt}, you have to type
\dv{x}{...
15
votes
Accepted
Diagonal brace with nested parenthesis
Very easy with horizontal brace; somewhat less easy with rotated brace. I have no time right now to implement a general solution, so I'll go with a brute-force version for now.
\documentclass{article}
...
15
votes
Accepted
Curly braces with subscript and superscript
The subscript and the superscript should be below and [above] the ends of the right curly brace.
Something like this?
\documentclass{article}
\usepackage{amsmath} % for "\overunderset" ...
15
votes
Accepted
lbrack, rbrack vs [ and ]
LaTeX defines these via
\def\lbrack{[}
\def\rbrack{]}
so there is no difference in behaviour. However the command forms can be used on keyboard layouts that make [] inconvenient. They can also bee ...
14
votes
How to insert curly bracket in multirow table
The bigdelimpackage, which comes with multirow is designed for this sort of things. I added some improvements of the table with makecell and booktabs:
\documentclass[11pt]{report}
\usepackage{...
14
votes
Unstandardized brackets in matrix
I guess you're looking for \left\lceil and \right\rfloor.
\documentclass{article}
\usepackage{amsmath} % for 'matrix' environment
\begin{document}
\[
\left\lceil
\begin{matrix}
a_1 & a_2 & \...
13
votes
Accepted
Environment aligned doesn't output first part in bracket
Update Jan. 2021. The current version of the amsmath package, 2020/09/23 v2.17i, no longer generates the problem described in the OP's query. Hence, taking "precautions" such as inserting a \...
13
votes
Accepted
Omit round brackets around equation numbers with cleveref
Using \creflabelformat as follows
\creflabelformat{equation}{#2\textup{#1}#3}
helps.
\documentclass{scrreprt}
\usepackage{mathtools}
\usepackage{hyperref}
\usepackage{cleveref}
% see: https://tex....
13
votes
Equation caption format: Strange parenthesis?
Here it is, with the \newtagform command from mathtools:
\documentclass[12pt,a4paper]{article}
\usepackage{blindtext}
\usepackage{mathtools}
\renewcommand{\theequation}{\Alph{equation}}
\newtagform{...
13
votes
Accepted
Why is the "4" missing, even in the PDF?
I suppose you're trying to obtain that \underbracket doesn't add spacing in the multiplications, and you want some negative math kerning. Here's how to do it. You'll probably have to make some ...
13
votes
Accepted
Unstandardized brackets in matrix
It makes sense to define new environments for this task:
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand{\newmatrix}[3]{% #1 = prefix, #2/#3 = left/right delimiters
\...
13
votes
Accepted
Which fields have to be {braced} or "quoted" in .bib files (why does year NOT have to be)?
A great documentation for everything BibTeX is Nicolas Markey's Tame the BeaST. (The more official documentation at https://ctan.org/pkg/bibtex is a bit lacking for most because it assumes knowledge ...
12
votes
Accepted
Latex bracket on multiple lines
This works because stackengine can set equations with fixed baselineskip.
\documentclass{article}
\usepackage{tabstackengine,amsmath}
\TABstackMath
\stackMath
\begin{document}
\[
%\setstackgap{L}{1.1\...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
brackets × 965math-mode × 183
equations × 101
spacing × 57
matrices × 51
amsmath × 46
delimiters × 45
braces × 44
tables × 43
align × 36
biblatex × 35
tikz-pgf × 29
macros × 27
symbols × 23
citing × 22
arrays × 22
vertical-alignment × 21
superscripts × 20
formatting × 19
chemfig × 16
fractions × 15
mathtools × 15
size × 15
bibliographies × 14
line-breaking × 14