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
53 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
85 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,386
6 votes
3 answers
296 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
  • 535
3 votes
1 answer
59 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
31 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
0 votes
2 answers
42 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
  • 3
7 votes
2 answers
136 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
43 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
89 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
129 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
55 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
32 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
  • 719
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
67 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
  • 842
0 votes
0 answers
36 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
59 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
55 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
114 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
393 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
45 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
98 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
131 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,023
3 votes
1 answer
65 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
114 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
  • 1,759
0 votes
0 answers
73 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
112 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
73 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
104 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
85 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
324 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,299
0 votes
2 answers
84 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
140 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
82 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
58 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
58 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
45 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
46 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
143 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
375 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
8 votes
3 answers
384 views

Align the system of equations

Consider: \documentclass[a4paper]{article} \usepackage{amsmath,amssymb} \usepackage{amsfonts} \usepackage{mathtools} \begin{document} \[ \begin{array}{llr} \begin{rcases*} $\lim\limits_{x\to2^+}f(...
manh3's user avatar
  • 363
1 vote
1 answer
102 views

How to write long equations inside piecewise function with same equation number

I am facing trouble while writing the long equation inside the piecewise function with same equation number ,the latex code i am using is \usepackage[utf8]{inputenc} \usepackage[bitstream-charter]{...
TheStudent's user avatar
2 votes
3 answers
226 views

Aligning equations in cases environment

I'm trying to write While combining the equation and cases ambient gives me something close \begin{equation}\tag{PE}\label{PE} \begin{cases} -\Delta u&=f, \quad \text{em }\Omega \\ u&=0, \...
tulio's user avatar
  • 318
2 votes
2 answers
115 views

Set position of equation for cases

My equation has several cases and therefore I use the dcases environment that is embedded in an align and split environment. However the first line is right-justified. How can I left-justify the ...
Author's user avatar
  • 203
2 votes
1 answer
57 views

`\seq_item` doesn't work in `cases` environment

I'm trying to create a macro that can dynamically create a cases environment. Unfortunately, there's a problem I cannot quite comprehend. For some reason, the invocation of \seq_item does not produce ...
user1512263's user avatar
0 votes
0 answers
23 views

How do I put a bracket around a subset of equations in a cases environment? [duplicate]

So I have a set of aligned equations already in cases. However, I would like to put a subset of these equation in another set of cases (pointing towards the right) and label them using the text "...
Olórin's user avatar
  • 323
0 votes
1 answer
45 views

Cases error $ is added

I have read all the posts on this error that I can find. None of the solutions end up with the correct layout that this code does (left aligned, a=1 in rear). My issue is that it throws a $ added ...
Garth Fleming's user avatar
0 votes
1 answer
46 views

How can I align two cases (two automatically indexed equations)?

How can I align these cases? I also want to keep the equations indexed automatically. I saw some previous topics on this but I wonder if it can be done without changing too much the code (not rewrite ...
hana's user avatar
  • 759
2 votes
3 answers
350 views

Why aren't these two expressions in cases aligned?

Why aren't these two expressions aligned? They have exactly same size. Is it intended by default? How can I make them aligned? \documentclass[journal]{IEEEtran} \usepackage{amsmath,amsfonts} \...
hana's user avatar
  • 759
6 votes
2 answers
316 views

Close align brackets

I was trying to close this bracket: \frac{}{}\theta=2\pi k + \begin{cases}\arctan\left ( \frac{n}{x} \right ) & \text{ if } x> 0 \\ \frac{\pi }{2} & \text{ if } x=0 \\ \arctan\left ( \frac{...
Agente 156's user avatar
0 votes
2 answers
65 views

How to enable text wrapping or multi-lines when using \begin{cases}?

I am writing a \begin{cases} \end{cases} block, and I need to write something to the left of the case. However, since it is very long, I would like to use multiple lines or text wrapping. But I cannot ...
Sin Nombre's user avatar

1
2 3 4 5
11