the cases environment is provided by the amsmath package- the mathtools package introduces extensions of it (dcases, etc)

learn more… | top users | synonyms

20
votes
3answers
9k views

How to put a brace on the right, not left, to group cases?

How can I get a brace on the right, not the left, to group cases, using cases? (I know actual cases look better with the brace on the left, but the items I need to group are not literally cases. They ...
20
votes
4answers
3k 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 ...
16
votes
2answers
908 views

How to align nested cases?

Please consider the code bellow: \begin{align*} function = \begin{cases} case1 &\mbox{if } n = 0 \\ \begin{cases} case2 &\mbox{if } n = 1 \\ ...
14
votes
9answers
817 views

Looking for a more appropriate version of \cases

Often-times I find myself wanting to write something like, That is, a vertical brace followed by a table consisting of three columns, the first and the last are math, aligned where-ever I like, and ...
13
votes
2answers
4k views

Split-like environment inside cases environment

I'd like to have a cases environment with some cases that are too long to fit on one line. I tried this: \begin{cases} \begin{split} long expression \\ second line of long expression ...
13
votes
2answers
10k views

Using “cases” inside “equation” gives error[with “amsmath” loaded]

I'm trying to use the cases environment inside an equation environment. The sample code is quite simple: \begin{equation*} X(\omega) = \begin{cases} 1 \text{se $\omega ...
12
votes
4answers
5k views

Aligning plain `align` and `cases`?

The cases environment works very well for enumerating cases within a large left bracket. I'd like to be able to combine it with the align environment so that equals-signs and conditions also line up: ...
11
votes
7answers
314 views

Alignment in cases

I have this text in LaTeX: $$ sgn(x)= \begin{cases} -1 & \mbox{za podmínky } x>0\\ 0 & \mbox{za podmínky } x=0\\ 1 & \mbox{za podmínky } x>0 \end{cases} $$ But I ...
10
votes
3answers
472 views

TeX capacity exceeded while parsing a date string

I'm trying to parse a date (say, a due date) in a DD-MMM-YYYY format, e.g., 06-May-2012 and create macros \dueday, \duemonth, and \dueyear. I use xstring's commands to extract the substrings. Then I ...
10
votes
3answers
252 views

Aligning cases conditions from multiple nesting levels

\begin{dmath*} y_{ic}[n] = \begin{dcases} y_0 + x_0 - x_0 (1 - k_2)^n & k_1 = 0 \\ k_5 + \left( y_0 - k_5 \right) (1 - k_1)^n + \begin{dcases} ...
10
votes
3answers
185 views

How to provide more horizontal space between cases in a system?

I have the following ugly system: This is my LaTeX code: \newcommand{\Aaa}{\begin{bmatrix} 1 & 0 \\ 0 & -1\end{bmatrix}} \newcommand{\Ba}{\begin{bmatrix} 0 & 1 \\ -1 & ...
10
votes
4answers
239 views

Aligning numbering in a system of equation so it's centered

In the following code ... $\begin{cases} 2y+4x=9 & \text{(I)} \\ 3x-2x=10 & \text{(II)} \end{cases}$ ... I want the (I) to be centered above (II). Right now they are aligned above each ...
10
votes
1answer
214 views

How can I add circles and arrows in linear equation systems?

How can I write a linear equation system that uses circles and arrows to indicate what should be added on each line. This is what I have so far: $S = \begin{cases} x_1+2x_2 - 2x_3 = 1 \\ ...
9
votes
3answers
2k views

Cases with square brackets

How can I subdivide in cases with square brackets? I mean I want to write: ⌈ 2_i if ... rank (q, l) = | 2_i + 1 if ... ⌊ .... with square brackets, not ...
9
votes
3answers
108 views

Cases environment without the brace

I want to vertically align one equation against two, similar to the cases environment but without the brace: e.g. similar environment to: There must be another solution to the alignment solution ...
9
votes
1answer
9k views

Aligning the right parts in multiple \begin{cases}

Is there an intelligent way to left-align the parts right of & of the two cases environments shown below (if x >= 0, otherwise, if y < 0, otherwise). I wonder if there is a better way than ...
8
votes
3answers
456 views

How to force alignment of “cases” brackets in an enumerate environment?

I am using the enumitem and amsmath packages to give the recursive definition of the valuation function $\nu$ for classical first order logic. The way I have it set up, the brackets of the cases are ...
8
votes
4answers
281 views

How can I align at relation symbols within a cases environment?

I have used the following code in LaTeX - \documentclass{article} \usepackage{amssymb,amsmath} \begin{document} \begin{table}[H] \centering \begin{tabular}{c|c} \hline { $X=y+z$} & { ...
8
votes
1answer
4k views

Problem compiling cases environment [closed]

I am trying to compile a simple cases example, but I'm having trouble with the tabular separator &. Here's my code: \begin{equation} f(x) = \begin{cases} x + 1 & ...
8
votes
1answer
4k 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, ..., ...
8
votes
1answer
305 views

breqn and hyperref breaking subnumcases environment when used together

I have an issue when using cases, breqn and hyperref together. This is my MWE \documentclass[preview]{standalone} \usepackage{cases} \usepackage{breqn} % For line breaks in some really long equations ...
8
votes
1answer
94 views

Mismatching symbol size in cases environment with acronym package

I'm running into trouble using the acronym package when I set math formulas in the cases environment. Looking at the following MWE, you will notice that inside the arccot "gamma" and "p" are smaller ...
7
votes
2answers
527 views

cases environment inside an array

LyX is giving a lot of error messages for my Latex code which runs in other places. \[ \begin{array}{rl} p_{Y \mid H_1}(y \mid H_1) & = f_X(g^{-1}(y))\left| \dfrac{dg^{-1}(y)}{dy} \right| \\ \\ ...
7
votes
4answers
4k views

Aligning conditions in cases environment

I have a piecewise function with three "parts." I would like to have all three conditions aligned at the variable x. How do I achieve that? Here is the code I have so far: \[ f(x) = \begin{cases} ...
7
votes
2answers
604 views

list the cases in text

I would like to list some cases which are needed to be consider in text. I didn't find a standard way to do this. There is "case" for math mode, but that is not what I want. Look the following ...
7
votes
4answers
139 views

How to separate a case into lines in a cases environment

I need to divide both the condition and equation part of some cases into lines, as the cases would not fit to text width. I read some similar questions and could not see that solves my problem. A MWE ...
7
votes
2answers
325 views

How to typeset piecewise-defined functions? [duplicate]

I am attempting to write out the basic process for finding the absolute value of some number. In ASCII, this is what I am attempting to write. |X| = { x if x > 0 0 if x = 0 ...
7
votes
1answer
110 views

How to control the alignment of the brace in a dcases environment

The following code \begin{equation} \begin{dcases} u = \frac{\sqrt{2}}{2}(i+j)\\ v = k \end{dcases} \end{equation} results in the following display that I find ...
7
votes
1answer
370 views

Why does mathdesign result in a huge 'cases' environment brace in Tufte documents?

I'm getting strange results when I use the cases environment in Tufte-LaTeX documents with the mathdesign package. Instead of I get Is there something I can do to get rid of that huge brace? ...
6
votes
2answers
2k views

How can I align multiple cases environment simultaneously?

In one big align environment, I want to put some cases environments. I would like the alignment of the cases environments to be the same. For example, if I write: \begin{align} f(x) &= ...
6
votes
2answers
173 views

Alignment between material inside and outside a cases environment

In the code below, I'd like to make the i=0,\ldots,n. line up, in the output, with the cases in the first part of the definition. Ideally, the full-stop would align with the semicolons and comma. ...
6
votes
3answers
292 views

Horizontal spacing after cases bracket in equation

How can I add a little horizontal spacing after the cases bracket, at the depicted position, so that 1 and 0 move to the right (the given screenshot looks okayish, but I'm using a different font where ...
6
votes
2answers
2k views

Case equation without curly brace

I want to have a case equation without the left curly brace. I am using \documentclass[11pt,a4paper]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{amsthm} ...
6
votes
1answer
3k views

line break inside cases environment

I have an equation using a cases environment, with one case with a long description text: \begin{eqnarray*} \begin{cases} 1 \text{too long description of the first case, not ...
6
votes
2answers
895 views

Proper punctuation after cases environment

I know that when writing a displayed equation, it's correct to write punctuation before the closing \] as follows: This proves \[ x^2 = 3, \] and it follows that \[ x = \pm\sqrt{3}. \] If I'm using ...
6
votes
2answers
166 views

Cases environment compresses fractions?

what should I do to stop the cases environment compressing the first line of the following? \begin{equation} \alpha_{mn} = \begin{cases} \frac{16\mu^2}{mn\pi^2\left[\pi^2(m^2/a^2 + n^2/b^2) - ...
5
votes
2answers
221 views

Breaking equations in cases environment

Similar questions have been asked before, but my problem is a little different: \begin{equation} E_K \approx \begin{cases} - \sum\limits_{i = 1}^{N} K_1 \bri \left( \mathbf{m \bri} \cdot \unit{u} ...
5
votes
3answers
238 views

How can I do this without the cases?

How can I do this without the cases? $\begin{cases} \dfrac{\partial u(x,y)}{\partial x}=2x=\dfrac{\partial v(x,y)}{\partial y} \\ \dfrac{\partial u(x,y)}{\partial y}=-2y=- \dfrac{\partial ...
5
votes
3answers
8k views

Clean-Looking Piecewise-Defined Functions

I want to write a clean-looking piecewise defined function. There's a similar post here: How to write a function (piecewise) with bracket outside?, but I have follow-up questions. The two options I ...
5
votes
2answers
106 views

Nested begin-math symbols

I am facing a problem while displaying a mathematical expression. The code looks like this : \textit{$f_{1}$} $\succ$ \textit{$f_{2}$} if $\begin{cases} \textit{dz_{f_{1}}} \supseteq ...
5
votes
1answer
582 views

Right aligned first column in a cases environment

Is there a simple way to obtain a right aligned first column in the cases environment. As far as I can see, mathtools does not add such an option. (This question might be read as a request for ...
5
votes
3answers
108 views

Putting a header above the cases in an equation

This question is best illustrated by an example. Consider the following code Further we can show that \begin{equation*} P_{v}(T) = ...
5
votes
1answer
337 views

A piecewise function with fractions and without tiny text

I would like to create a piecewise function which includes fractions. But the solutions I have found so far squish the fractions in to tiny text that is nearly illegible. The cases environment ...
5
votes
1answer
804 views

Error using line break in 'cases' environment

I'm trying to display quite a simple 'cases' type equation in Texmakerx, but it appears to be ignoring the \\ and & uses. \documentclass[journal]{IEEEtran} \usepackage{graphicx} ...
5
votes
1answer
702 views

Nodes with cases with TikZ

I need to make something that should look like this (sorry for such low quality of picture) So I type this but it's doesn't work correctly: \begin{tikzpicture} \node (A) at (0,0) {$ \vec{\bf ...
5
votes
3answers
1k views

Is there a “cases” environment in text mode?

The title says it all: The "cases" environment works only in math mode. Is there an alternative in text mode?
5
votes
1answer
91 views

Changing the size of the braces from the cases environment

I have created the following picture using the cases environment. For this picture I have two questions. 1) I would like to limit the size of the braces created by the cases environment to ...
5
votes
1answer
151 views

How to insert a text between two cases in a multi valued function?

I want to do something similar to this but do not know how: I do know how to write multi-valued functions by using cases or align or whatever but do not know how to achieve a text that is to the ...
4
votes
2answers
282 views

How can I typeset determinants of Cramer's rule? [closed]

I want to typeset the determinants of the system $\begin{cases} a_1x+ b_1y = c_1,\\ a_2x+ b_2y = c_2. \end{cases}$ I tried $D=\left| \begin{matrix} {{a}_{1}} & {{b}_{1}} \\ {{a}_{2}} ...
4
votes
3answers
201 views

Math equation with cases and division signs

\begin{equation*} \theta({P,\bar{Cl}}) = \begin{cases} S(P,\widehat{Cl}) + (S(P,\widehat{Cl}) \times ((\bar{R}-\widehat{R})/\bar{R})) & \widehat{Cl} \textless \bar{Cl} \\ ...