Skip to main content

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
1 vote
0 answers
18 views

Using "cases" inside of cryptocode pseudocodeblock [duplicate]

I'm trying to use "cases" (from the amsmath package) inside of a "pseudocodeblock" (from the cryptocode package). However, this causes errors, apparently because of a clash between ...
Huck Bennett's user avatar
1 vote
2 answers
45 views

Horizontal Alignment Spacing in Cases Environment

I want to typeset some piecewise equations in MathJax and align the inequality symbols in the piecewise conditions. Using the cases environment and adding more ampersands does somewhat align the parts ...
Lawton's user avatar
  • 135
3 votes
1 answer
42 views

How to remove colored boxes from cases environment in beamer

When used in beamer, the following code draws these awful looking boxes over the cases. How can I remove these so it looks normal? \documentclass[10pt,xcolor={table,dvipsnames},t]{beamer} \usetheme{...
SescoMath's user avatar
  • 207
0 votes
1 answer
32 views

Cases inside a corollary

I do not like that the cases (items 1 and 2) are not no the same vertical axis. I would like to move the 1 to the axis where 2 is on. \begin{corollary}[Измеримость и мера декартово произведения ...
Maroon Racoon's user avatar
1 vote
1 answer
62 views

Space for the cases/matrix environment and use of \dfrac into \[...\]

I have this MWE: \documentclass[a4paper,12pt]{article} \usepackage{mathtools,amssymb} \begin{document} \[ \begin{cases} \frac{\partial f}{\partial x} =& 2x(1 - y)=0 \iff x = 0 \quad \text{o} \...
Sebastiano's user avatar
  • 56.7k
1 vote
2 answers
34 views

Problem when using cases environment in pgfplots legend

I noticed that if I use cases from package amsmath in a pgfplots legend, the legend box does not contain the whole text. See the MWE. \documentclass{standalone} \usepackage{amsmath} \usepackage{...
Manuel Du 's user avatar
1 vote
2 answers
26 views

Centrally Aligned Equation on left part of cases

I'm trying to get the following in my file but the best I can do is by using cases but that doesn't work that well S_{\sigma}(v,c) = \begin{cases} w \in V \mid &\text{there exists a path an ...
total dependent random choice's user avatar
4 votes
2 answers
58 views

Align both equations and condition statements between case environments

I have two cases environments below one another, which I would like to align around the = sign (which I could do), but also that the conditional statements be aligned across systems. More specifically,...
orpr0's user avatar
  • 43
3 votes
1 answer
118 views

How do I use subnumcases correctly?

I have been trying to use subnumcases to get numbers for each line of a picewise defined expression, and using labels to be able to easly refer to them later with links but I keep getting the ...
Felipe Dilho's user avatar
2 votes
2 answers
97 views

Central alignment of equation with numcases [closed]

I have the latex code for an equation with numcases \begin{numcases} {a =} bbbbbbbbbbb, \\ ccccccccccc, \end{numcases} which gives the result how to get the whole equation aligned centrally, ...
Nigel1's user avatar
  • 189
0 votes
0 answers
40 views

how to write the following equations [duplicate]

I am currently working on including the following equation in my writing: I attempted to express it as follows, but my attempt produced a very different result $y = f(x) = \{\dfrac{-\dfrac{\pi}{4} (-\...
Jihyun's user avatar
  • 103
1 vote
0 answers
78 views

Bracket with multiple lines [closed]

The errors of my codes with feedback: Missing $ inserted \documentclass{article} \usepackage{amsmath} \begin{document} $[x_0: x_1: x_2]\mapsto$ \begin{cases} $[x_0: x_1]$ & \text{ ...
Un petit mensonges's user avatar
2 votes
2 answers
110 views

Consistent vertical spacing in cases environment with multirow cases

I'm having trouble figuring out how to achieve some sort of consistency when I work with vertical spacing in cases environments where the cases themselves have multiple rows. In the second version of ...
Fredrik P's user avatar
  • 1,418
6 votes
3 answers
348 views

Big right brace in enumerate environment

I'm trying to do a cases environment with a brace on the right using the classic trick \left. \begin{aligned} ... \end{aligned} \right\} but the particularity is that I'm in an enumerate environment ...
IsaKEKW's user avatar
  • 547
3 votes
1 answer
73 views

Custom alignment with long equation and cases

\documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} x &= 1 & y &= 233 & z &= 3 \\ a &= 4 & c &= 5 & d &= 6 \\ &...
Simon's user avatar
  • 517
0 votes
0 answers
33 views

How to use \begin{cases} inside table? [duplicate]

When I am using \begin{cases}, the content under the 1st column of this table is very long and it can not be broken into two lines using linebreak. And this table becomes very big, so it does not fit ...
TanmayeePatra's user avatar
1 vote
2 answers
100 views

QED-Symbol in last line of a cases-environment

I know there are several topics about this, but for any reason, no one answered my exact problem. So, I end a proof with a cases-environment and I want to set the QED-Square at the end of the last ...
Lereu's user avatar
  • 471
7 votes
2 answers
148 views

How do I align the parts of a brace diagram?

I am trying to reproduce the following somewhat complex brace diagram: I am having trouble getting the alignment exactly the way I want. Ideally, Category A would be centered in the space delimited ...
AthanasiusOfAlex's user avatar
1 vote
1 answer
48 views

How can I align on nested braces (NEWBIE)

In texStudio basically the following code returns the expected result: \documentclass{article} \usepackage{mathtools} \usepackage[japanese]{babel} \begin{document} \[ \begin{rcases} \...
Ben Engbers's user avatar
2 votes
1 answer
103 views

Numbering individual cases

I have the following equation: \documentclass{article} \usepackage{amsmath} \usepackage{cases} \begin{document} \begin{numcases}{x = } \label{eq:case1} x+1\\ \label{...
E-O's user avatar
  • 45
2 votes
1 answer
159 views

large curly braces with long vertical condtional line

I am trying to write a math equation with multiple cases in the condition : here is the code I have : \begin{equation*} \begin{aligned} q(\mathcal A | \mathcal C ) = \begin{cases} (t, CI_{1-\...
Cav's user avatar
  • 45
1 vote
1 answer
58 views

Avoid literal `\geq`, `\\`, and `\empty` in output when using `filecontentsdef` and `expl3`

Based on this answer, I am trying to define a newcases environment that automatically expands "if" into ", \quad & \text{if }" and expands "otherwise" into ", \...
Paul Wintz's user avatar
1 vote
1 answer
37 views

Is it possible to renumber the cases in different claims?

In my theorem, there are several claims, such as Claim 1 and Claim 2. They each have one or more cases. However, the case numbering does not take into account the occurrence of claims and is labeled ...
licheng's user avatar
  • 795
2 votes
0 answers
25 views

Missing $ inserted \begin{cases} [duplicate]

Following code renders completely fine but I still get the infuriating "missing $ inserted" error at line 6 and 12. I've got no idea where the problem lies. Here's the code: \documentclass[]{...
Blues's user avatar
  • 21
1 vote
0 answers
134 views

Inconsistent spacing in cases environment

I'm working with the document below and noticed a bizarre inconsistency in vertical spacing in the cases environment. Ideally, I'd like the red and blue boxes to be the same height no matter what the ...
wrb98's user avatar
  • 896
0 votes
0 answers
53 views

Nested systems of equations with left brace and referenceable sub-equations

I am trying to make a system of equations that contains a sub-system of equations. The equations should be numbered with arabic numbers (e.g. 1, 2, ...) and the sub-equations with a combination of ...
Neil Lamas's user avatar
3 votes
1 answer
71 views

cleveref does not show the correct equation tag with subnumcases

The tag typsets as intends but its cross referencing does not. \documentclass{elsarticle} \usepackage{amsmath} \usepackage{cases} \usepackage[nameinlink]{cleveref} \begin{document} \begin{...
Al-Motasem Aldaoudeyeh's user avatar
0 votes
1 answer
65 views

Dotfill in cases environment

I'm trying to use \dotfill in a cases environment within an equation. I've adopted the solution here: Alignment and dotfill in cases However, I'd like to be able to write something to the left of the ...
DavidH's user avatar
  • 79
3 votes
2 answers
166 views

Multiple equation alignments within cases environment in math mode

In the following example, I was wondering how to align the equation cases at the equal/in signs, in addition to the current alignment at "for". None of the solutions here seems to work. ...
AEW's user avatar
  • 819
3 votes
2 answers
473 views

how to bold text in cases

I am trying to write a Dirac delta function. I almost have it but would like to bold my "x =x'" text. Here is my code: \begin{equation} \delta(\mathbf{x-x^{'}})=\begin{cases} 1, &...
Dick's user avatar
  • 31
0 votes
2 answers
55 views

Square root in cases environment causes letters to be cut off

I'm writing an equation in the cases environment that looks like: \begin{align} B = \begin{cases} 2\sqrt{\mu_0 T_0 n_0}\dfrac{x}{a}, & \text{if $x < a$} \\ 2\sqrt{\mu_0 T_0 ...
mgmf46's user avatar
  • 23
3 votes
2 answers
127 views

How to combine two lines into one line using closing brackets in a case environment with 3 lines?

For example, in LaTeX, I have three conditions in one "cases" environment. Then I could get a new condition from the combination of the first and the second conditions, so I want to use a ...
Hao Ren's user avatar
  • 33
1 vote
3 answers
171 views

Why does this alignment not work with this "cases" environment?

I'm trying to align a short equation and a long one. Could you explain why the highlighted parts are not properly aligned? \documentclass{article} \usepackage{amsmath} \begin{document} \[ \left\{ \...
Akira's user avatar
  • 1,441
3 votes
1 answer
90 views

Is there an alternative of \arraycolsep for cases environment?

I have this problem: I can control the space in array environment with \arraycolsep, but it doesn't work in cases environment. Is there an alternative of \arraycolsep for cases environment? \...
Robertas Vilkas's user avatar
3 votes
2 answers
122 views

Removing extra vertical space when using cases in a table environment

I have a table which has cases in one of the columns as suggested here. The issue I am facing is that the first column has some text, and using cases leaves a blank space inline with text from first ...
Damitr's user avatar
  • 2,025
0 votes
0 answers
86 views

Setting different vertical spacing in text and math mode

I'd like to vertically stretch the spaces between lines in the text parts of my documents a bit more, while keeping the math mode parts as close as usual, avoiding excessively high cases environments, ...
5kywAlker43's user avatar
2 votes
1 answer
136 views

Solving systems by reduction

In LaTeX, when I solve systems by reduction, I like to put the numbers by which I multiply the equations in front of the key of the system, how would this be done? I'm able to create the system ...
Guillemus Callelus's user avatar
5 votes
2 answers
75 views

Align rows inside cases with rows in next column inside table

I'm trying to create a table with equations as below \documentclass{article} \usepackage{mathtools} \begin{document} \begin{center} \begin{tabular}{ |c|c| } \hline cell1 & cell2 \\ \hline \text{...
Mia's user avatar
  • 53
3 votes
1 answer
115 views

LaTex cases Howto?

beginner here (downloaded LaTex today) so please be kind. I am trying to get 'cases' to work, but it doesn't seem to understand "&" to separate the equation from the description, nor &...
Pep's user avatar
  • 31
2 votes
1 answer
132 views

alignment of subnumcases in the page

I want to label each case in cases so I used subnumcases environment. However, it seems like what is centered is the first letter, not the entire chunk. I made a MWE with the packages I need for my ...
Sam Bach's user avatar
5 votes
5 answers
328 views

Align Equations Including `cases`

I want a series of aligned equations, the last of which has two cases. See the figure for an example. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} a &= b \\ &...
Sam OT's user avatar
  • 1,338
0 votes
2 answers
93 views

Need to write an equation exactly in the same way as in the picture [closed]

I have written my research paper in Ms word, but now I need it written in Latex, I am writing an equation of brier score which is as in the attached picture, that is, the bracket I want to be bigger ...
Basheer's user avatar
  • 11
6 votes
1 answer
155 views

Creating a cases environment

I'm using the tabularray package to create a cases-like environment, with some changes: I want the 'if' automatically placed. I need two versions: with and without a star. The first one must change ...
Juan Castaño's user avatar
3 votes
3 answers
83 views

Aligned inside cases not behaving as expected

I wish to format a system of equations. I use: \documentclass{article} \usepackage{amsmath} \begin{document} $$\begin{cases} \begin{aligned} q_1 S_1^1 &+ q_2 S_2^1 &+ ... &+ q_n S_n^1 &...
Jasper Rou's user avatar
2 votes
1 answer
99 views

Align `case`'s coditions inside `subnumcases`

I have a PDE with an initial contition: I think it would be more beautiful if all conditions (the orange with the yellows) were aligned. I wrote this: \documentclass{article} \usepackage{amsmath,...
Kώστας Κούδας's user avatar
1 vote
2 answers
66 views

What's diffrence between these cases? / cases formatting centering

I want my pdf cases to look like that When I try to do it myself, I have this effect: Here is my latex code: \begin{equation*} g(x)= \begin{cases} \frac{x}{x-1} & \textrm{dla}\quad x<-1, \\ 2\...
DScounterGO's user avatar
2 votes
2 answers
49 views

Why is there extra space prefixing the first case

I don't understand why there is extra space before the mod in this formula. How can I force the m and the 0 to be aligned vertically? Here is the LaTeX code I'm using. \documentclass{article} \...
Jim Newton's user avatar
0 votes
1 answer
49 views

Align equations with equations inside align environment

A have some equations that I would like to align. Some of these equations are very similar and are grouped together in a cases environment. Now, I can't manage to align all these equations to have ...
debsim's user avatar
  • 139
3 votes
3 answers
151 views

Align equal sign inside case with equal sign outside

I want to align the equal sign inside the case with the equal sign outside. How to do that? I have read answers to these questions 1 2 3, but I'm still very clueless. Could anyone please help? Thanks! ...
user2165's user avatar
  • 131
0 votes
1 answer
451 views

Springer Journal Class sn-jnl and cases environment

I am using sn-jnl.cls provided by the Springer to submit a paper to a springer journal. However the cases environment gives rise to error ! Missing $ inserted. $ l.8 x^n, & \...
Dr. Dinesh J. Karia's user avatar

1
2 3 4 5
11