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

3
votes
1answer
26 views

Some errors on “dcases” environment in “align”

Before start, I gave some newcommands below. \newcommand{\eqal}[1]{\begin{align}#1\end{align}} \newcommand{\case}[1]{\begin{dcases*}#1\end{dcases*}} The code below works very well. \begin{document}...
2
votes
2answers
34 views

How to manage indentation in math mode?

I have a problem, maybe with indentation but I don´t sure. This the code: \documentclass[12pt]{article} \usepackage[letterpaper]{geometry} \geometry{top=1.5cm, bottom=2.5cm, hmargin=3cm} \...
2
votes
3answers
112 views

How to do multiple columns of multiline braces in LaTeX?

Just like cases environment, with a 2-line (or more) big curly brace to the left of some short equations - but I want to have 3 or 4 columns of equations across the page, each with left-brace. So I ...
20
votes
3answers
318 views

How to get the cases brace to be a link

I copied the cases code form amsmath.sty and tried to wrap the \lbrace within a macro and added a \left. to get this to compile. This of course loses the size info so the brace is not the correct ...
2
votes
2answers
54 views

Aligning labels inside cases environment

I have the following code, where I have multiple cases and all need to be labelled. I tried using subnumcases, however I wanted some freedom in labelling (the $k^{th}$ case must be labelled C.k etc), ...
1
vote
1answer
29 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
34 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
41 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
43 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} \...
7
votes
3answers
162 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
122 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
44 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
34 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
56 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
64 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
34 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
53 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)=\\ &=\begin{...
2
votes
2answers
40 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
62 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
115 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
41 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
57 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
137 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
86 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, text\...
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} & a=a_{max}...
6
votes
1answer
59 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
98 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.
2
votes
1answer
47 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 ...
5
votes
2answers
127 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, a4paper]{...
2
votes
2answers
178 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\}, \...
0
votes
2answers
92 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
2answers
118 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, $\left\...
4
votes
3answers
247 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} \newcommand{\diff}{\mathop{}\!...
2
votes
1answer
33 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
54 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 %\usepackage[arial,utf8]{...
4
votes
2answers
184 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
40 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
73 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} + w_3*\frac{...
1
vote
1answer
61 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
193 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 ...
3
votes
2answers
2k views

Typesetting a function defined by case analysis

Can any one suggess me the code to write this equation in LaTeX.
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. ...
5
votes
2answers
132 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
78 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}, x_{...
1
vote
1answer
278 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 ...
3
votes
1answer
66 views

Multiple cases with automatic braces

I am writing a relation in which I need to describe the value of G(i, s, a): \documentclass{article} \usepackage {amsfonts} \usepackage {amsmath} \usepackage [margin=1in]{geometry} \usepackage {...
3
votes
3answers
85 views

Cases with long text at the end.

So I need an outlup like this: And this is the code i use: \documentclass[10pt,a4paper,5p,twocolumn,preprint,review,authoryear]{elsarticle} \usepackage[english]{babel} \usepackage[fleqn]{amsmath} \...