# Tag Info

131

For the question as it was originally posed, we can still use cases very easily. We simply employ the technique of using \left. at the start and then we can put \right\} at the end: $X(m, n) = \left. \begin{cases} x(n), & \text{for } 0 \leq n \leq 1 \\ x(n - 1), & \text{for } 0 \leq n \leq 1 \\ x(n - 1), & \text{for } 0 \leq n \... 120 \documentclass{article} \usepackage{amsmath} \begin{document} \[ X(m,n) = \left\{\begin{array}{lr} x(n), & \text{for } 0\leq n\leq 1\\ x(n-1), & \text{for } 0\leq n\leq 1\\ x(n-1), & \text{for } 0\leq n\leq 1 \end{array}\right\} = xy$ \end{document} If you want two conditions on different lines, can use ...

39

\documentclass{article} \usepackage{mathtools} %loads amsmath as well \DeclarePairedDelimiter\Floor\lfloor\rfloor \DeclarePairedDelimiter\Ceil\lceil\rceil \begin{document} T(n) = \begin{cases} 0 & \text{if n=1} \\ 1 & \text{if n=2} \\ T(\Floor{n/2}) + T(\Ceil{... 37 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: ... 27 The package mathtools (that also loads amsmath) provides dcases and dcases*: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{equation} \alpha_{mn} = \begin{dcases*} \frac{16\mu^2}{mn\pi^2[\pi^2(m^2/a^2 + n^2/b^2) - \mu^2]} & for m and n odd;\\ 0\vphantom{\frac{0}{0}} & for m or n even; \end{dcases*} \end{equation} \... 25 You can make use of mathtools and its cases* environment. The environments cases* and dcases* handles the second column as text, so you wont have to manually "escape" mathmode to typeset the text correctly. The dcases* variant use displaystyle math in the first column, which will make no difference in your situation. See section 3.4.3 in the package ... 21 Referencing my chat message from 2013-04-05, here is the definition of the cases environment that accepts one optional argument, the column specification of the left column. Thus writing \begin{cases}[r] the left column is set right-aligned. This way you actually could even use siunitx’ table typsetting with the S column. Code \documentclass{article} \... 20 Use the optional argument to \\ to add additional space between the lines, e.g.\\[10pt]. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} X_i = \begin{cases} \left[\begin{smallmatrix} 0 \\ 1 \\ 2 \end{smallmatrix}\right] & \text{if i is even;} \\[10pt] \left[\begin{smallmatrix} 2 \... 19 Essentially the same answer as Ignasi, but with the use of \text for the word for. (And with the \leqslant symbol of amssymb which I find much more elegant.) \documentclass{article} \usepackage{amsmath, amssymb} \newcommand{\for}{\text{for }} \begin{document} \[ X(m,n)= \left\{ \begin{array}{lr} x(n),& \for 0\leqslant n \leqslant 1 \\... 17 Simplest is probably to use \phantom{-}1 17 For example: \documentclass{article} \usepackage{amsmath} \begin{document} \[ L = \begin{cases} (0 + 1)* & \text{if P = \mathit{NP}} \\ \emptyset & \text{otherwise} \end{cases} \end{document}

16

You can combine the preceding solution with the subequations environment if you refer to the equations as a group. If you want to refer to the group, you have to introduce a \label just before entering the align environment. Here it is in action: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{fourier} \usepackage{...

16

This has already been addressed, but I can't remember where nor when. So here is a simple solution with the empheq package, which loads mathtools, hence amsmath: \documentclass{article} \usepackage{amssymb} \usepackage[overload]{empheq} \newcommand{\for}{\text{for }} \begin{document} \begin{equation*}[right=\empheqrbrace{=xy.}] X(m,n)= \begin{...

15

The dcases environment is implemented by the mathtools package, so you need to load it in the preamble: \usepackage{mathtools}

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.

14

Environment cases of package amsmath internally uses environment array with columns of type l. The column specification is @{}l@{\quad}l@{}. Thus \multicolumn will work: \multicolumn{1}{@{}c@{\quad}}{1} Also an easier way is possible. The justification code of array/tabular just adds an \hfil at the right side of a column of type l. This moves the cell ...

14

One option using TikZ: New version: \documentclass{article} \usepackage{amsmath} \usepackage{systeme} \usepackage{tikz} \newcounter{tmp} \newcommand\tikzmark{% \tikz[remember picture,baseline=-0.65ex] \node[inner sep=0,outer sep=0] (#1){};% } \newcommand\mess[25pt]{% \stepcounter{tmp}% \begin{tikzpicture}[remember picture,overlay,>=latex,xshift=...

13

You can redefine the way amsmath defines the cases specification by updating \env@cases. Below I removed the zero-width column padding that was stripped from the array column specification: \documentclass{scrbook} \usepackage{amsmath} \makeatletter \def\env@cases{% \let\@ifnextchar\new@ifnextchar \left\lbrace \def\arraystretch{1.2}% \array{l@{\quad}...

13

I would load the mathtools package, which is a superset of the amsmath package, and employ that package's dcases* environment. \documentclass{article} \usepackage{mathtools} % for 'dcases*' env. \begin{document} R\ge R_t \equiv \begin{dcases*} \frac{r_{t+1}}{f'(k_{t+1})}\frac{1-W(k_t)}{\lambda} & if k_t < K(\lambda)\,, \\[1ex] \frac{r_{t+1}}... 12 Here's a solution which (a) uses the align* environment instead of the array environment and (b) inverts the order of the arguments inside the cases environment (as I believe that this may be closer to general usage of this environment). It also defines a macro called \abs to simplify typesetting in the body of the example. \documentclass{article} \... 12 If you want a result really good-looking, adopt this way: \documentclass{article} \usepackage{amsmath} \usepackage{calc} \newlength{\maxmin} \setlength{\maxmin}{\widthof{\max}-\widthof{\min}} \begin{document} \begin{equation} S_{i,t}= \begin{cases} \begin{cases} [x_{i,t}=X^*, r_{i,t}=1] & \text{if \max\{X_{i,t}\}=X^*} \\ [x_{... 12 I do not see a problem, except that the source can be simplified: Many pairs of curly braces can be removed, e.g.: {a} is equivalent to \mathord{a} and a that is already an ordinary atom. Package amsmath also provides environment vmatrix. Example file: \documentclass{article} \usepackage{amsmath} \begin{document} \[ D = \begin{vmatrix} a_{1} &... 12 A solution that uses an array environment; note that using a cases environment seems like overkill for the case (pun intended) at hand. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \left\{ \begin{array}{@{} r @{{}={}} r} \zeta_A & -10.1234567\cdots,\\ \zeta_B & 1{,}001.2345678\cdots.\\ \end{array} \right. \end{... 11 Use \\[3ex] for adding vertical space. But, in this case, you can even do better: if you notice, the matrices are not perfectly aligned to each other. So I propose a slightly different solution: \documentclass{article} \usepackage{amsmath,amssymb} \newcommand{\C}{\mathbb{C}} \newcommand{\Aaa}{% \begin{bmatrix}1&0\\0&-1\end{bmatrix}% } \newcommand{\... 11 There's no need to create a special environment; a simple array environment will do the job. \documentclass{article} \begin{document} \[ y = mx_{ij}\ \begin{array}{l} i = 1,2,\dots,n\\ j = 1,2,\dots,n \end{array} \end{document} To make this a numbered equation environment, simply replace $and$ with \begin{equation} and \end{equation}, respectively....

11

I can't see how acronyms relate to your question, but a new key for \newglossaryentry can be added using \glsaddkey where you specify the new key, a default value if the key hasn't been assigned, and various commands that can be used to later access the information provided by that key. (These commands are analogous to commands like \glsentrytext, \...

11

Building upon the answer from Au101, what about nesting the cases environments?: \[ X(m, n) = \left. \begin{cases} x(n), & \begin{cases} \text{for } 0 \leq n \leq 1 \\ \text{or } 0 \leq n \leq 1 \end{cases} \\ x(n - 1), & \text{for } 0 \leq n \leq 1 \\ x(n - 1), & \text{for }...

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