The {cases} environment is provided by the {amsmath} package to typeset cases in math. The {mathtools} package introduces extensions, e.g. the cases* and dcases environments.

learn more… | top users | synonyms

1
vote
1answer
67 views

How to leave more room between two lines

I have this case formula which I need to make a little more readable by adding a little more space, vertically, between the two cases. \begin{cases} f = -\frac {w_1*m + w_2*\frac{-d}{d_M} + ...
1
vote
1answer
14 views

Vertical spaces between lines in cases environment [duplicate]

\documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} X_i = \begin{cases} \left[\begin{smallmatrix} 0 \\ 1 \\ 2 \end{smallmatrix}\right] & ...
2
votes
1answer
33 views

Aligning material of two or more cases environment

The following code \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} a=& \begin{cases} b,&\ \text{if}\ c\,;\\ d,&\ \text{if}\ e\,;\\ f,&\ ...
1
vote
2answers
30 views

How resize box when using subnumcase

I have the following problem. I have a system of two equations. I used the package subnumcases. Unfortunately the equations are too long and the equation number overlap the equation itself. I tried ...
3
votes
3answers
39 views

Difficulty with long multiline equation

I am typesetting a memoir for a member of the Royal Society, who has provided me with a hand-written copy. All was going well until a slightly too long multiline equation: \documentclass{article} ...
23
votes
5answers
39k views

How to write cases with LaTeX?

The code i used to write is this one $$ X(m,n)= \begin{cases} x(n),\\ x(n-1)\\ x(n-1) \end{cases} $$ But I don't know how to write this one I appreciate any help. Edited: I'm sorry to add ...
7
votes
3answers
148 views

Braces around both sides of cases (with text)

How can I add curly braces around both sides of a cases environment which contains text? \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} \begin{equation*} ...
5
votes
3answers
105 views

Align equal signs too much spacing in cases

I am trying to write two equations that will be aligned at the equal signs and also connected together at the left with a curly bracket (like a piecewise definition), but when I use the \begin{cases} ...
1
vote
1answer
31 views

“No suitable columns” error when putting cases in tabulary

This code runs fine: \documentclass{article} \usepackage{amsmath} \usepackage{tabulary} \begin{document} \begin{tabulary}{\linewidth}{L} $ M $\\ \end{tabulary} \end{document} But this code ...
2
votes
0answers
31 views

How can I remove the extra vertical space above the first equation in a cases environment?

This problem seems to be related to the AIAA class that I have to use to submit the paper that I am writing, as I cannot reproduce it with other classes. The latest Aiaa.cls class file can be ...
6
votes
1answer
45 views

Using cases in a node in a matrix

I am trying to put piece-wise functions into nodes in a Tikz diagram. Using cases works fine in a Tikz node that is separate within a tikzpicture environment. Putting the same node in a matrix breaks ...
0
votes
0answers
19 views

Lowercase everything until end of group [duplicate]

What'd be the most efficient way of lowercasing everything from the point of the command invocation until the end of the group, that is, how should one define a command that acts like, for example, ...
2
votes
2answers
62 views

How to align equations cases environment

The following code: \documentclass{article} \usepackage{amsmath} \begin{document} $\begin{cases} Af &=g \quad \text{if} \ c,\\ f&=0 \quad \text{if} \ d. \end{cases}$ \end{document} ...
1
vote
1answer
30 views

How to left align the \dcase to make a straight margin with text

I am using dcase to express my equation. However, the equation looks align in center of page. I want to move the equation in the left side of the page. Note that, my text has one space at the ...
1
vote
0answers
40 views

More space between the lines in cases

I'm using the cases environment in one of my formulas. Each case is a fraction so I'm using \displaystyle to let them appear bigger. However, the result looks quite ugly because there is no space ...
7
votes
2answers
100 views

Cases alignment and displaystyle for all environments

please consider following "minimal" code: \documentclass{article} \usepackage{amsmath}% http://ctan.org/pkg/amsmath \begin{document}\begin{align*} (p's_y)(z)&=(ps_xs_y)(z)=\\ ...
2
votes
2answers
38 views

Make cases come after each other in one row

I want to know how to make cases come after each other in one row, separated by a \Leftrightarrow instead of underneath each other. \begin{cases} S_{x}k + S_{y}t = q \\ S_{x}a + S_{b} = ...
1
vote
2answers
52 views

How to typeset a “compact” cases environment

What's the proper way to typeset a cases environment in a compact way? I tried the following: \begin{equation*} \setlength{\jot}{0pt} \lambda = \tiny \begin{cases} -8.30767 x^3+702.515 x^2-1905.35 ...
1
vote
0answers
29 views

Separate numbering of cases within align [duplicate]

I have one instance of cases within the align environment, as follows: \documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \begin{align} f(x) &=1x \\ g(x) &=\begin{cases} 2 ...
4
votes
1answer
94 views

Aligning chemical elements in a reaction equation

As pictures tell the issue better than I could I'm just gonna insert a screenshot of the problem right off the bat. My problem is concerning the undesired whitespace between the second column of ...
4
votes
1answer
33 views

Align equations which already have aligned answers (alignment-ception)

I'm trying to align equations with already aligned case by case answers in them What I am currently getting is: and what I need is to align all the equals signs throughout the function The ...
1
vote
1answer
46 views

How to expand \cases in Lyx when using \sum?

I need to write a case differentiation in LyX which contains sums but here is the problem. This A=\begin{cases} -\sum_{j\text{=1}}^{N}a_{j}^{(1)} & \text{}\\ -\sum_{j\text{=1}}^{N}a_{j}^{(2)} ...
4
votes
3answers
128 views

Need \qedhere to be flush with the right margin in cases environment

How can I do this? When I put \qedhere in cases environment, the square is between the margins somewhere. It is not where the square appears in the usual proof environment, at the right margin. ...
2
votes
1answer
75 views

Monospace font in cases environment

I have this code: \[ text \begin{cases} text, text \rightarrow text\\ text \rightarrow text, text, text, text text \end{cases} \] ... \[ text \begin{cases} text text \rightarrow text, text text, ...
23
votes
4answers
7k views

Separate labels in cases

As much as I have tried, it doesn't seem possible to use separate labels when using a casesconstruction (from the amsmath package). Ideally, I would like to be able to write something like ...
4
votes
1answer
62 views

Command “&” is not working

I am new to TeX and I am trying to write the following \begin{equation} N_{a,0}\begin{cases} R_{0,0} & a=0\\ N_{a-1,0}e^{-m} & 1\leq a\leq a_{max}-1\\ N_{a-1,0}e^{-m}/1-e^{-m} & ...
6
votes
1answer
55 views

rotate text in {align} formula, move {cases} to back, and wrap text

I'm writing some formulas where I would like to move the cases bracket to the back, rotate some text, and wrap some text, among other things. I've made a working example of how far a got and a ...
4
votes
1answer
86 views

Amsmath Cases syntax

The amsmath cases environment seems to require being placed within \[...\]. What is that syntax? Amsmath documentation does not include these square brackets, yet cases won't compile without them.
5
votes
2answers
104 views

Numbering cases within cases

I am stuck with a formatting problem: I have a system with cases within cases, and I would like each subcase to be numbered. Here is a MWE of what I got for the moment: \documentclass[12pt, ...
2
votes
1answer
41 views

Function multiple cases horizontal spaces

I have a multi cases function which almost exceeds the page bounds because of long definition of the second case. How would you suggest me doing this otherwise to make the document look more ...
2
votes
2answers
168 views

Remove space after cases environment

After I write a begin cases environment, usually there appears a big space which bothers me. I do not know how to remove it. $\Hom(V,U)=\begin{cases}\{i:V\rightarrow U\vert i(v)=v, \forall v\in V\}, ...
3
votes
2answers
1k views

Typesetting a function defined by case analysis

Can any one suggess me the code to write this equation in LaTeX.
0
votes
0answers
42 views

brackets in cases

How can I control the size of brackets so that there will be symmetrical in relation of my equations? My code is: \documentclass{article} \usepackage{xltxtra} \usepackage{xgreek} ...
2
votes
2answers
114 views

Instead of the left open brace, if I want an Arrow mark, how I can do it?

\begin{cases} First line\\ Second line\\ third line\\ \vdots \end{cases} is giving like, Instead of the left open brace, if I want an Arrow mark, how I can do it? One way is this, ...
0
votes
2answers
73 views

alignat with right curly bracket/cases spanning some but not all lines

Currently I am trying something that should be possible, but I cannot figure out how to make it work. I'm using alignat to make a 2-point align for the entries of five lines of math-code. I want to ...
2
votes
1answer
108 views

cases in align produces errors with Scientific Word-exported file

For some reason I have to edit a tex file exported from Scientific Word, which has the line \input{tcilatex} I downloaded tcilatex.tex from here. However, everything works fine until I try to use ...
4
votes
3answers
205 views

Left aligning and breaking equations in cases environment

I have a equation that needs to be left aligned within the cases environment. Here's my code so far, which does not work: \documentclass{article} \usepackage{amsmath} ...
1
vote
2answers
78 views

Page breaks within the cases environment

I am using the cases environment multiple times within the align environment, inputting fairly long equations. This creates a lot of white space, which I would like to get rid of. Any suggestions of ...
2
votes
1answer
26 views

wider space for case equations

I am trying to write lots of simultaneous equations. But as you can see from the image, inserting one space and two spaces both look ugly. This is the code I use to generate these two equations ...
2
votes
1answer
52 views

Case Sentence With xstring

I have a LaTeX document that gives me the following error: ! Argument of \@xs@IfStrEq@@ has an extra }. The document is as follows: \documentclass{article} %PAQUETES ...
4
votes
2answers
130 views

Tabbing alignment and over-length sentence auto line break

【Question】When using "tabbing" under math mode with cases, how can I achieved the following at the same time: (1) alignment in cases by "tabbing" (2) over length element such as a long sentence in ...
1
vote
1answer
38 views

Cases with brackets instead of curly brackets

How could I use cases with [] (both sides) instead of curly bracket as the attached picture shows? Thank you.
1
vote
1answer
56 views

overriding \everymath color: Is there an efficient way to apply color on every line for all arrays, and doing the same for cases as well?

TLDR; How does one efficiently apply color on every line of every array to override the color by \everymath? i.e from to (A compilable example of this is at the bottom) Is there a way to ...
5
votes
2answers
176 views

Two cases brackets in one line, aligned to a formula in a second line

I am trying to align two cases environments to a formula: schematically: A = B +C = {cases1 +{cases2 where B+cases1 and C+cases2 are aligned. I read about the \alignat{3} option, but I ...
11
votes
2answers
24k 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, ..., ...
3
votes
2answers
56 views

Vertical alignment with cases environment

I hope this question is not duplicate: How is it possible to align all of these equals signs? The main problem is the cases environment, because I don't know how to reference the &-Operator. ...
2
votes
1answer
54 views

rcases with parbox to fit residual space

I have the following construct (using package mathtools) \begin{drcases} Content.... \end{drcases} \parbox{.53\textwidth}{Long Multiline Text Blablabla} I am using cases to display some long ...
5
votes
2answers
123 views

Table containing multiple equations

Is there an elegant way to summarize multiple equations from different sources in a table? I need to use this in my thesis; the margins I specified match the geometry of my university's draft. I've ...
2
votes
2answers
75 views

Problem with rcases*

I want to put a right bracket because I need it, but it goes out of the page. \[ \begin{rcases*} \text{Si }f:\left[x_{1}, x_{2}\right]\longrightarrow\mathbb{R}\text{ es continua en } \left[x_{1}, ...
1
vote
1answer
215 views

Left brace in align environoment [duplicate]

I would like to have a left brace around equations in the align environment. How can I do this? (I would like to use this environment because I would like to number each individual equation to be ...