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.

Filter by
Sorted by
Tagged with
0
votes
0answers
33 views

Align multiple split-equation along different axis

I have some derivatives that I would to align along two axis; the first can be considered as the left border of the page, the \partial/x..= should align with the cases. The second axis is on the ...
3
votes
1answer
70 views

Cases vs. Array environments

I would like to completely understand all the differences between using the amsmath environment cases and using the array environment to write functions with cases. Here is my current understanding ...
1
vote
2answers
26 views

Editing Cref for custom environments

I recently used Roelof's answer from list the cases in text and I would like to be able to use label Cref to call the different Cases. The environment is \newcounter{casenum} \newenvironment{caseof}...
0
votes
1answer
24 views

how to get limits UNDER argmax with substack, inside cases

When I use \substack together with \max, I get the limits UNDER the operator, which is what I want. However, when I use \substack with \operatorname{argmax}, the limits are subscripts, which is not ...
1
vote
2answers
44 views

Qed right justified at the end of the last line of cases in display style

I'm trying to get a qed symbol at the right end of the last line of a cases environment, but when I try e.g. \hfill$\displaystyle\begin{cases}a&b\\c&d\\e&f\end{cases}$ \qed the symbol is ...
0
votes
1answer
35 views

Not sure why case gives error?

I am trying to write a case: \begin{equation} D(i) = \begin{cases} False & \text{if } D(j_1) \land D(j_2) \and ... \forall j \in D(i).child \\ True \end{cases} \end{equation}...
1
vote
1answer
26 views

label equations in cases environment inside align environment

I want to label all equations, including those in cases environment, which is inside align environment. Here is my example: \begin{align} \delta_j \delta_i &= \delta_i \delta_{j-1} \text{\quad ...
0
votes
1answer
41 views

Is it possible to insert captions into a `numcases` structure?

I have a system of equations determined with numcases like so: \begin{numcases}{} \partial_t u_1 = \nabla \cdot D(u_1) \nabla u_1 + \mu_1 f(c, k_1) u_1 - \delta_1 u_1 \label{sender:eq} \\ \...
2
votes
5answers
424 views

How to align nested case

I tried aligning the "=" symbol in first two lines with rest of the lines but it is not aligning? Am I doing something wrong here? \documentclass[conference]{IEEEtran} \IEEEoverridecommandlockouts \...
0
votes
2answers
32 views

Large braces for specifying the condition for a mathematical result

I have a several condition for a mathematical results to be valid but I don't know how to put them in several lines with big braces after and then write some text. $\beta_{1}>\epsilon_{1}$ \\ $\...
1
vote
1answer
54 views

Nested numbered alignement

(disclaimer : yes I have already read : Nested cases, alignment and numbering, no it doesn't help) I am trying to get something like this : and : BUT with the numbering aligned. I got the above ...
4
votes
2answers
85 views

Problem with “numcases”

Please I need to create a formula with specific emplacements, something like I used \usepackage{cases} with the "numcases" environment: \documentclass{article} \begin{document} \usepackage{cases} \...
1
vote
3answers
126 views

When using a function cases, I only get the curly bracket for the first line, how to resolve the error?

I am using Overleaf to write a piecework function, and I know that in MathJax the function works, I write \begin{cases} \end{cases} and then separate the intervals with \\, but in Overleaf it gives me ...
2
votes
3answers
73 views

Align number irrespective of sign in the cases environment

I want to align numbers 1 and -1 in irrespective of sign in the environment cases \documentclass[a4paper, 12pt]{book} \usepackage{amsmath} \begin{document} \subsection{Decision function} $$ h_{w,b}(x)...
0
votes
1answer
50 views

in Lyx, how to reduce/increase the vertical distance within cases environment?

I read some related posts however, I still cannot control the vertical distance in cases environment. I am using Lyx. for example, I want to reduce the vertical distance between the two lines of the ...
1
vote
1answer
26 views

Redefine blank space in {cases}?

By default, the cases environment adds some blank space between the end of the first part of the line and what's followed by & (unlike, say, aligned environment). I'm wondering what is the default ...
0
votes
3answers
44 views

Inversion bracket with long text in Latex

How can you write following equation in Latex. Basically I have faced problem with long text I used \begin{equation} \max\limits_{x,\lambda,\nu} L_(x,\lambda,\nu=\left\{ \begin{array}{@{}ll@{}} ...
4
votes
1answer
52 views

Aligning multiple empheq environments with subnumbering

I'm trying to create a nice display of the KKT conditions, with sub-numbering for each condition. I have been able to do this using the \empheq package (MWE at the end of my question). However, ...
0
votes
1answer
45 views

cases inside caption gives error: ! Argument of \caption@ydblarg has an extra }

If I have cases inside my caption, the compilation always gives an error Argument of \caption@ydblarg has an extra }. I have the following simple code. I tried various solutions such ah as the ...
0
votes
0answers
32 views

Big { bracket for 2 cases of graphics

I want to add a big square bracket { before two graphics which unify them. I tried with align and cases but didn't work. I am using beamer environment and columns: \column{2in} \framebox{\...
2
votes
1answer
77 views

Cases bugged - lines overlapping [duplicate]

The following code overlaps equations: $$U(x) = \begin{cases} - \frac{1}{\lambda} e^{-\lambda x} & \text{gdy} \lambda \neq 1 \\ \ln x & \text{gdy} \lambda =1 \end{...
3
votes
2answers
35 views

combining cases, subequations and tags

I'm trying to write a set of equations in \begin{cases}. The i-th equation should have the tag P.i. I can use \tag{P} to number the entire set as P, or, I can use \begin{subequations} to number the i-...
3
votes
2answers
42 views

Alignment of individual rows in left-justified system of equations

I typeset a general system of equations, which involved some "vertical" dots. But I can't figure out how to make those dots appears in the center. Moreover, I actually want to make two streams of ...
0
votes
2answers
32 views

Problem with small brackets in `case` and `array` environment [closed]

When I write an equation for cases, the brackets do not adapt to size, they remain very small. Previously I solved a problem with the arrow drawings because I am using Spanish babel. I added \...
2
votes
1answer
28 views

Why there is an empty space below cases?

\documentclass[9pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} %\usepackage[usenames, dvipsnames]{color} \usepackage{amsmath} \usepackage{empheq} \begin{...
2
votes
1answer
37 views

Missing } Inserted numcases environment

I am trying to make a simple list of numbered cases for a particular equation using the numcases environment using the code below. However, whenever the code is run it throws a "Missing } inserted" ...
4
votes
2answers
271 views

How to justify left this system of equations?

It took me quite some time to come up with LaTeX code for the following system of equation: \begin{gather*} \left\{\begin{matrix} u_{t}=\nabla\cdot D(u_{t})\nabla u_{t}+\mu_{1} \frac{c_1}{k_1+c_1}u_1+...
2
votes
0answers
48 views

Curly bracket for subequation enviroment using the mtpro2 v. lite

Remembering the very nice answer given by the user @Mico, Curly braces using mtpro2[lite]: fix correct alignment, it has been used into an equation the enviroment \ccases{\begin{aligned}.....\end{...
2
votes
1answer
66 views

Curly braces using mtpro2[lite]: fix correct alignment

I am trying to find a solution, but actually I have failed, to use curly bracket (using \ccases) for the system symbol of three equations (or more), as for this example. If I adding the & I have ...
2
votes
2answers
75 views

Vertical centering of cases in an equation

Normally, a simple cases will get the result below. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} X=\begin{cases} 0, & \text{if $a=1$} \\ 1, &...
4
votes
4answers
474 views

Cases with long math equation

What would be the best formatting of the following align and cases where the middle case has a very long math equation? \begin{align*} V_{ijk}& = \begin{cases} \dfrac{y_u+y_l}2 - \...
5
votes
2answers
160 views

Case Condition for two lines

I am searching for a way to write the case condition $\text{in } \Omega$ in the middle of the first and second line. \documentclass{article} \usepackage[utf8]{inputenc}% \usepackage{mathtool} \begin{...
0
votes
1answer
89 views

How to put $f(x)=\begin{cases}1, &|x| \le 1,\\ 0, &|x|>1. \end{cases}$ into content?

\documentclass[18pt,a4paper]{article} ... \tableofcontents ... \subsection{$f(x)=\begin{cases}1, &|x| \le 1,\\ 0, &|x|>1. \end{cases}$} I compile it, TeXstudio gives me an error: "...
1
vote
1answer
477 views

Package amsmath Error: \begin{multline} allowed only in paragraph mode

I am getting an error message when I try to use the multline environment inside cases. This is my equation: \begin{equation} \label{eq:SMSKIN_TU2009} \begin{split} SM_{SKIN,Int} &= ...
2
votes
1answer
43 views

How can I label each equation in a row?

I use cases and I tend to label each equation in a row, for example in first case I want to label each equation (1) and (2), and second case I want to label (3) and (4). How can I do this ? Any help ...
2
votes
0answers
59 views

The middle row of matrix and cases does not align at baseline

When I wrote a row vector in a matrix or a 3-branch function in a cases, I noticed that the middle row does not align at the baseline of the content outside. As one must be conformed to university ...
1
vote
1answer
43 views

Embedding 2 Cases environments in one Align environment [closed]

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
124 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: \...
4
votes
2answers
99 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
54 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
248 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
124 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
95 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
81 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
97 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
78 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
86 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
59 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
136 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
87 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,...

1
2 3 4 5
8