Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cases]

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.

0
votes
1answer
31 views

Embedding 2 Cases environments in one Align environment [on hold]

The problem has been solved: I would like to embed two cases environments in one align environment. Here is the desired output: Here is my MWE: \documentclass[11pt,fleqn]{book} \usepackage{...
4
votes
1answer
71 views

Missing $ error in equation > cases environment

I'm getting a missing $ in equation environment, but only when in cases environment. Of the two examples below only the equation that implements the cases environment is giving me troubles: \...
3
votes
2answers
77 views

How to align underlines in a cases environment

Please consider this MWE: \documentclass{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[a4paper,margin=1in,footskip=0.25in]{geometry} \...
0
votes
1answer
30 views

How to properly align math cases and make them less compact?

I have the following code that produces this result: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \begin{document} \[ F(X) = \left\{\begin{array}{lr} 0, & \text{...
2
votes
2answers
139 views

Subnumcases as a part of align

I am using the following code: \documentclass{article} \usepackage{cases} \usepackage{amsmath,amsfonts} \begin{document} \begin{align*} \underset{\tau \in \mathbb{R}}{\min} \ \tau \end{align*} \...
4
votes
1answer
93 views

Piecewise function turns into colored table

For a document that has both a bi-colored table as well as a separate piecewise function, the piecewise function instead gets recognized and turned into a table. \documentclass[fleqn]{article} \...
2
votes
4answers
70 views

Align across cases

I have the following equations: I'd like to align all of the equals signs, as well as the for-all statements and put an explanatory word centered vertically on the left-hand side of each bracket. My ...
2
votes
2answers
76 views

amsmath: getting an error while using math mode to define piecewise function

I have the following Latex code: \begin{center} $\beta(u)$ = \[ \begin{cases} 1 & $|u_{j}| \leq \frac{1}{2}$ \\ 0 & else \end{cases} \] \end{center} On the 3rd line, Latex ...
3
votes
2answers
48 views

Why does numcases uses a different bracket to cases?

\documentclass{article} \usepackage{amsmath} \usepackage{cases} \begin{document} Cases: \begin{equation} \begin{cases} N + N/4 \\ 6-W_{|N|} \end{cases} \end{equation} Numcases: \begin{...
0
votes
1answer
61 views

How can I change the default space between columns in case environment?

Building off of this question, I would like to change the default space between the two columns of the amsmath cases environment to be a \qquad rather than a quad. I tried just copying the code on ...
0
votes
2answers
45 views

Errors using piecewise function [closed]

I am currently attempting to write a homework assignment in LaTeX and I need to create a piecewise function in order to solve the problem; however, no matter what I try, I am given errors. I have ...
1
vote
2answers
42 views

Align text in a cases environment with text outside

If want to align the code such that all the `if ...' part are also aligned. But I can't make it happen, because two of the three equations are in a cases environment and the other one isn't. \begin{...
0
votes
0answers
52 views

The incompatibility between package colortbl and the \begin{cases}…\end{cases} environment

Here is the code I have problem with: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{colortbl} \begin{document} \begin{equation} f(x) = \begin{cases} 1, &\mbox{if $x=1$} \\ 2, ...
2
votes
1answer
73 views

Express mathematically that a vector has an element greater zero [closed]

This might not only be related to latex, but I'm struggling to find a way of expressing a condition which is if a vector contains at least one element that is greater than zero. Currently I have this,...
6
votes
3answers
292 views

How do I nest cases?

I am new to LaTeX. I know how to write basic equations in LaTeX. However, the following equation seems to be too difficult for me. Please help me with this. Thank you.
3
votes
3answers
309 views

How to left align the cases in Latex?

I am using WinEdt. And trying to run the following code. However, the second item is coming in the middle. Can we align it to appear on the extreme left like the point (i)? Kindly help. Thanks a lot ...
0
votes
2answers
41 views

How do you type allocation rule?

I am trying to type this allocation rule in to my latex document I can't figure out how would you type it.
0
votes
0answers
19 views

Using fraction in case makes small letters [duplicate]

I have wrote the following in LaTeX: \begin{align} & \tan(\Gamma_{4}) = \begin{cases} \frac{x_{T3} - x_{T2}}{y_{T3} - y_{T2}} & \text{if} \qquad x_{T3}>x_{T2} \\ \\ \frac{x_{T2}-x_{T3}}{...
6
votes
2answers
2k views

How to write cases in LaTeX?

I want to write following system of equation in my paper, but I don't know how: Here is a code that I've tried, but it does not work: R\geqslant R_t \equiv \begin{cases} \frac{r_{t+1} (1-W(k_t)}{f'(...
0
votes
2answers
55 views

Using numcases with cases

I have an equation like so: \[ \begin{cases} Eqn1 &= 0,\\ Eqn2 &= 0, \end{cases} \iff \begin{cases} Eqn3 &= 0,\\ Eqn4 &= 0,\\ ...
5
votes
1answer
70 views

`\startalign` and `\startcases` are not compatible

In ConTeXt, it seems that \startalign and \startcases are not compatible. If so, what should I do when I want to align an equation containing a case-statement and a following equation? \starttext \...
5
votes
4answers
91 views

How to get rid of & in cases environment but still get the same space in the surroundings

Recently I asked a question on chat but I was told that I have to ask it on the main site, so here I am. I am using cases environment to create multiple system of equations separated by a symbol e.g. ...
1
vote
1answer
43 views

Cross-referencing equations in subnumcases environment

When trying to cross-reference one of the multi-case equations in the subnumcases environment with cleveref, only the equation number is shown and not the letter. Example: \documentclass{article} \...
0
votes
1answer
37 views

How to handle cases environment with long text in condition statement

I have the following code \begin{align*} H_k(\mathbb{RP}^n \times \mathbb{RP}^m) &\cong \left(\bigoplus _{i+j = k}\begin{cases*} \mathbb{Z} & if $\mathcal{P}_1$ \\ \mathbb{Z}/2\mathbb{Z} &...
4
votes
1answer
86 views

How to decrease vertical spacing in cases environment?

I would like to use a cases environment, but with my baselinestretch at 2, its vertical spacing is way too excessive (whereas I noticed the vertical spacing using a baselinestretch at 1 looks perfect)....
0
votes
1answer
150 views

How to create a numbered and dependent case/subcase environment

can we make a numbered and dependent case/subcase environment. This is much different from what usually a case does in Latex. I do not want to use it to break the domain of definition while writing a ...
2
votes
1answer
46 views

Incorrect horizontal spacing in cases mode

Consider the following MWE: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} \begin{cases} \mathrm{L}^{3a}\mathrm{L}^{2b}\mathrm{L}^{c}&=\mathrm{L}^1 \\ ...
5
votes
1answer
86 views

cases environment with material to the left rotated to vertical

Say, I have this MWE: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \text{ three equations} \begin{cases} a &= b + c \\ d &= e + f + g \\ h &= i +...
2
votes
3answers
56 views

I want to write these cases of formula, but I don't know how

This is the formula that I want to write, but I don't know how to do it.
7
votes
2answers
229 views

Nested cases, alignment and numbering

I have tried all different sorts of solutions including align, aligned, cases and equation to have the result I get with this code except that I want numbering for the three lines in the aligned ...
2
votes
1answer
42 views

Braces and alignment

\begin{align} \begin{cases} 2x + y &= 5 \\ 2x - 3y &= 1 \end{cases} \\ \hline 0x + 4y &= 4 \end{align} Is there any way to keep all equal signs aligned both inside and outside the cases?
9
votes
1answer
204 views

Customize cases environment

I usually use the cases environment in the amsmath package - it is very good: \documentclass{article} \usepackage{amsmath} \begin{document} \[\begin{cases} x+y=2 \\ 2x+3y=4 \end{cases}\] \end{...
2
votes
1answer
69 views

How to align an equation with equations inside of a begin{case}

I have the following code \documentclass{article} \usepackage{amsmath} \usepackage{mathtools} \begin{document} \begin{align*} \Omega &= \begin{cases} X &= Y\\ W &= X \...
1
vote
1answer
95 views

Cases inside tabular environment with left aligned column

I want to have equations in a column of a table, using the amsmath cases option, but where the column is left aligned. The MWE below shows an example of the equations that I need in the column, with ...
4
votes
3answers
177 views

How to have two separate right curly bracket in align or equation environment?

I essentially want to get my equation to look like this, but can't quite get it. I've used drcases but then the alignment is difficult. I've also tried empheq, but still having issues. Any ideas?
1
vote
1answer
29 views

Add the curly bracket of the rcases environment in the enumerate environment

\documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage{mathtools} \begin{document} \begin{...
0
votes
1answer
49 views

cases in equation mode

I want to write this equation The curly brace I can't give. I tried this code \begin{equation} \begin{table} \begin{tabular}{ll} m_i^2 &=\lambda\phi^2_{cl}-\mu^2 \ \mathnormal{acting ...
1
vote
0answers
56 views

How to insert dcases environment in LyX?

I have the same problem as here. The proposed solution was to use dcases or dcases* environment. How to do that in LyX? Insert->Math menu has only "Cases Environment".
0
votes
1answer
35 views

Separate labels in dcases lines and then reference to them [duplicate]

I use of mathtools package and dcases environment. Ideally, I would like to be able to write something like below: ‎\documentclass[12pt,a4paper]{article}‎ ‎\usepackage{amsthm,amssymb,amsmath,mathrsfs}...
7
votes
1answer
171 views

How to fix the mismatch of font size of following?

I want to generate the cases in the picture. However, the Symbols T1, T2 on LHS and RHS are different in size. \documentclass[a4paper, 12pt]{report} \usepackage[utf8]{inputenc} \usepackage[...
0
votes
3answers
39 views

How to align an equation using amsmath

Can somebody explain to me how to put this in proper LaTeX-Code? I am really not sure... let's see: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} \sum_{(i,j)\el E} x_(...
5
votes
1answer
405 views

How can I type the following equations in Latex?

How can I type equations as the following format? \usepackage{amsmath} \usepackage{cases} \begin{document} % without labels for different case which I need \begin{align*} A & \Longrightarrow B ...
1
vote
1answer
21 views

Problem in aligning equations

I am using the code as shown below to write an equation. I have a problem with the alignment. How can I fix it?? Also on the left-hand side of the equation, there is a space between N and D i want the ...
1
vote
2answers
83 views

Alignment in cases with text outside the cases

How can we align text in nested cases within all cases? \documentclass[12pt,a4paper]{article} \usepackage[fleqn]{amsmath} \begin{document} \begin{align} \begin{cases} Equation 1 = 0 &\text{...
0
votes
1answer
148 views

Equation in Latex

I am new in the latex. I am trying to write an equation in the latex. I have searched a lot of question regarding equations and tried all possible solutions but I m not getting what I want. I also ...
1
vote
2answers
61 views

Bad math environment delimiters and misplaced alignment tab

I have this multiline equation and I have this error. I need to make it in a paper with two column \begin{equation} \label{Mult-PCC} \[ & Sim_{a_,_b}^{PCC} &= & \left \{ \begin{tabulary} ...
3
votes
2answers
72 views

Parenthesis vertically misaligned in “cases” environment

I'm writing a paper using the "aps" document class, and I'm struggling with the cases environment -- which usually works like a charm for me. In one of my sections I present two equations that I want ...
3
votes
2answers
55 views

matching braces from one case to another

How would you match the lines between two cases within the same equation environment? What I'm having is: \begin{equation} \begin{rcases} \sum_{I=1}^{NP} K_h (x - x_I; x) \Delta x_I &= 1 \\ \...
1
vote
1answer
61 views

Overwrite dcases* to work inside align (to use mtpro2 braces)

This is a direct follow-up question from my previous one: Overwrite matrix to work inside align (to use mtpro2 parentheses and braces). Although this question is self-contained, I encourage ...
5
votes
2answers
103 views

Overwrite matrix to work inside align (to use mtpro2 parentheses and braces)

To use large round parentheses and large curly braces provided by the MathTime Pro 2 font, I’m using the code from this answer by @BrunoLeFloch to redefine pmatrix, Bmatrix and cases. However, ...