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 ...
sodd's user avatar
  • 5,565
61 votes

Using square bracket in text mode

You also could try this: {[2007]}
Qaswed's user avatar
  • 861
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 ...
jkrod's user avatar
  • 583
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 ...
ebosi's user avatar
  • 11.3k
23 votes

Using square bracket in text mode

If [ and ] are causing trouble, just switch them out for \lbrack and \rbrack.
daviewales's user avatar
  • 1,213
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 ...
Steven B. Segletes's user avatar
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 ...
Sandy G's user avatar
  • 36.4k
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 ...
Tim Hoffmann's user avatar
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: ...
egreg's user avatar
  • 1.1m
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 ...
Quaternion's user avatar
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\...
Troy's user avatar
  • 13.6k
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 +...
egreg's user avatar
  • 1.1m
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}{-\...
Werner's user avatar
  • 589k
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:...
Charles Clayton's user avatar
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 ...
Alessandro Cuttin's user avatar
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 } ...
egreg's user avatar
  • 1.1m
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}{...
egreg's user avatar
  • 1.1m
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} ...
campa's user avatar
  • 27.4k
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" ...
Mico's user avatar
  • 479k
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 ...
David Carlisle's user avatar
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{...
Bernard's user avatar
  • 269k
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 & \...
Mico's user avatar
  • 479k
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 \...
Mico's user avatar
  • 479k
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....
TeXnician's user avatar
  • 33.1k
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{...
Bernard's user avatar
  • 269k
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 ...
Bernard's user avatar
  • 269k
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 \...
egreg's user avatar
  • 1.1m
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 ...
moewe's user avatar
  • 171k
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\...
Steven B. Segletes's user avatar

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