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
1 answer
14 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 ...
user avatar
0 votes
1 answer
27 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 ...
user avatar
  • 323
2 votes
3 answers
332 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} \...
user avatar
  • 323
6 votes
2 answers
256 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{...
user avatar
0 votes
2 answers
23 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 ...
user avatar
2 votes
1 answer
24 views

Array function with implies arrow at center

I want to display multiple functions in an array with an implies arrow next to it in the center. \begin{equation*} \setlength{\arraycolsep}{0pt} \left\{ \begin{array}{ c c } \varphi \left(\...
user avatar
2 votes
1 answer
40 views

How to use \cases in iopart document class

The iopart document class defines the following in the iopart.cls file \def\cases#1{% \left\{\,\vcenter{\def\\{\cr}\normalbaselines\openup1\jot\m@th% \ialign{\strut$\displaystyle{##}\hfil$&...
user avatar
  • 268
0 votes
3 answers
39 views

Alignment in align with cases

I am trying to make some alignment with cases inside an align environment. \documentclass[preview]{standalone} \usepackage{amsmath} \begin{document} \begin{align*} &F(x) = xy &\quad hello ...
user avatar
  • 139
3 votes
2 answers
121 views

Fit equation with \cases in page width using \resizebox

I'm trying to fit an equation with several cases into my page width. The pain is that one case is awfully long. I used the \resizebox{} approach (see solution here), which would work, if there would ...
user avatar
  • 33
4 votes
5 answers
263 views

Compress cases environment horizontally

I currently have the following cases environment: \documentclass[a4paper]{article} \usepackage{amsmath} \usepackage{lipsum} \begin{document} \lipsum[66] \[ G(x,u) = \begin{cases} -\dfrac{\cosh (\pi -...
user avatar
0 votes
0 answers
26 views

How to decrease the vertical spacing in cases environment?

I have a few lines of code. I want them to align at the equals sign, and also shrink the brace for phi using cases environment. The curly brace sticks out at the top and bottom, which is a little ...
user avatar
0 votes
2 answers
47 views

Text on multiple line before big curly brackets

Is there any way to write a multiple line equations like this one?
user avatar
  • 1
0 votes
0 answers
24 views

\hfill in cases in longtable

I have a large table with figures, text and math spanning over several pages. I am using the longtable environment to be able to break the table. In a cases environment I am trying to apply the \...
user avatar
  • 55
2 votes
2 answers
64 views

How to typeset curly brackets in equations

Please, how can I typeset the equation in the attached picture.
user avatar
  • 37
1 vote
1 answer
44 views

A custom single-lined representation of a piecewise definition

I would like to have a macro that realizes the following representation of a piecewise definition: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \exists g \in ...
user avatar
  • 413
0 votes
2 answers
30 views

Align a multi-line equation in cases environment

I have an equation: generated by the following code snippet: Secondly, instead of simultaneously minimizing the mean and standard deviation of the objective(s), another type of formulation of robust ...
user avatar
  • 305
2 votes
2 answers
55 views

Alignment in the cases environment

I have the following equation: produced by: \begin{equation} \text{Type I:} \begin{cases} \text{find } &\vect{x} \\ \text{minimizing} &\mu\left\{f_{i}(\vect{x}, \...
user avatar
  • 305
0 votes
3 answers
42 views

How does one write an equation with cases properly?

Why doesn't this display properly: \begin{equation} steps(x^{(i)}) = \begin{cases} 1 & \mbox{ if } x^{(i)}.g = leaf \\ 1 + \...
user avatar
0 votes
2 answers
38 views

Spacing and triple alignment within cases

I am struggling regarding the alignment and spacing of the numbers within the cases. For alignment I usually use arrays but those don't seem to work within cases. The questions and answers I found ...
user avatar
0 votes
0 answers
73 views

Case changing and detecting with expl3 that works for all engines

As noted in interface3.pdf, commands such as \str_case_e:nn are engine-related. Thus \str_case_e:nnF {\text_titlecase:n {a}} { {A} {true} } {false} will result in true for all engines, while \...
user avatar
  • 6,080
0 votes
1 answer
152 views

Misplaced alignment tab character & (for \cases)

I'm using the \cases format to create the following equation: by using: \begin{equation} \phi(x,y)=\begin{cases} <0, & \text{for}\ \Omega_1 \text{(Phase 1)} \\ 0, & \...
user avatar
  • 3
3 votes
4 answers
128 views

Multiple align in formulae

I'm trying to write down a system of equations with variable alignment: 1 x + 2 y + 3 z = 4 5 x + 6 z = 7 8 x + 9 y = 10 but if you try using align and &&, then unwanted indents ...
user avatar
4 votes
2 answers
164 views

"Lazy" cases with expl3?

Problem: i would like to have a command, which takes one mandatory and one optional argument. If the optional argument exist, select the corresponding case, otherwise return all case opportunities. ...
user avatar
2 votes
1 answer
73 views

How to center cases

Consider the following system \begin{align} \begin{cases} S_0&=\{1,2,3,4\}\\ S_1&=\{1,2,3,4,5,6,7,8 \}\\ S_2&=\{1,2,3,4,5,6,7,8,9,10,11,12\}\\ &\vdots \end{cases} \end{align} which ...
user avatar
  • 145
4 votes
2 answers
58 views

How to place brace on the right of a subset of aligned equations?

This question is essentially an extension of this question about how to place right braces around cases. I want to have three equations, all aligned, but I want only the latter two of the equations to ...
user avatar
  • 155
2 votes
1 answer
36 views

how to put parent counter of numcases before equation and child counter after equation

I want to make a subnumcases-like environment, named mynumcases, like this I will explain what I want and what I have tried. what I want: equations in mynumcases have a parent counter which is same ...
user avatar
  • 1,121
0 votes
1 answer
25 views

How to use gathered inside tabular without causing excess space in nearby columns? [closed]

I would like the circuit layout and the mathematical equations of a certain circuit to be side by side with relevant captions. I use a table for this, since I might also add some information in the ...
user avatar
3 votes
2 answers
63 views

Alignment and spacing with tabularx + cases

I am trying to make a table with line breaks, centered vertical alignment and a piecewise function definition: \documentclass[15pt]{extarticle} \usepackage{tabularx} \usepackage{gensymb} \usepackage{...
user avatar
1 vote
1 answer
66 views

LaTeX equation not numbered correctly with cases

I'm trying to write a simple case equation with the following code: \begin{align} \begin{equation} S_{new}= \begin{cases} max(S_{new}) &\text{if $S_{CTA} > 70 \parallel S_{DCE-CT} < \...
user avatar
  • 13
-1 votes
2 answers
111 views

Fixing Ugly Spacing in Cases Environment

Consider the following code, which makes use of the cases environment in an equation: \documentclass[a4paper]{article} \usepackage[margin=2.5cm]{geometry} \usepackage{microtype} \usepackage{amsmath} \...
user avatar
  • 748
0 votes
4 answers
69 views

How to make the cases bracket in an equation more elegant?

I am writing an equation containing cases using the following codes: \begin{equation} \Delta A = \begin{cases} \frac{\pi \left( 1-\mu \right) d_i^2}{42GW_c} & \text{if } a = 0\\ 0 ...
user avatar
1 vote
1 answer
31 views

Problematic spacing with \begin{cases}

In my MWE I would like to adjust the spacing immediately before each instance of \begin{cases}. The large curly brace seems jammed into the previous line. How would I adjust this? My source code: %...
user avatar
  • 1,483
6 votes
3 answers
181 views

Nested right cases

I was reading a script for maths and came across this "picture" and was wondering how he typeset it in LaTeX, so I wanted to try myself. First I thought of cases, but that did not work as ...
user avatar
0 votes
1 answer
34 views

Contracting a line inside theorem box on latex

\documentclass[8pts]{beamer} \usepackage{amsmath,amsrefs,amsthm} \usepackage{amssymb} \usepackage{graphics,graphicx} \usetheme{Frankfurt} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing} \...
user avatar
  • 13
2 votes
2 answers
110 views

Multiple curly brackets aligned one part to the right and the other to the left

How to draw such a diagram to show how the singularities are classified? Incorrect demonstration:
user avatar
  • 385
-1 votes
1 answer
114 views

How do I use curly braces to typeset the definition of Graham Number?

This is the definition of Graham's Number. How do I subdivide the text in the bracket, as shown?
user avatar
2 votes
2 answers
42 views

How to align equation number to come at bottom when equation contains cases/rcases?

How to align equation number to come at the bottom when the equation contains cases/rcases? \documentclass{article} \usepackage[french,USenglish]{babel} \usepackage[mmddyyyy]{datetime} \usepackage{...
user avatar
  • 517
1 vote
2 answers
27 views

How to align the left parts in 2-nd and 4th lines?

I need to aling the 2nd and 4th lines in the case: I have tried to use the & sign in different places of the code: \begin{equation} f(t) = \begin{cases} ...
user avatar
  • 383
5 votes
2 answers
186 views

How can you get a \right\}-like effect for consecutive parts of an array?

I want to reference cumulative rows of an array using large braces, such as appear in cases or with \right\}, combining the table below with the repeated brackets from the lower example made using ...
user avatar
  • 53
3 votes
3 answers
153 views

Any tips on making this long piece-wise function look better/more space in cases?

I managed to make it work, but ideally I would like to input all the constants I've denoted as letters with their values (makes it more like an actual function), unfortunately, I already don't have ...
user avatar
  • 47
0 votes
1 answer
61 views

Equation with cases and numbering and including text

I am trying to create cases in the equation with numbering to individual cases and trying to push the text which is in \mbox{...} to the right. But I wasn't able to succeed. I request your kind help ...
user avatar
1 vote
2 answers
190 views

Using numcases environment in align environment

I am using multiple cases environments, and to align them I use align environment. Everything looks as it should. \documentclass{article} \usepackage{amsmath} \usepackage{cases} \begin{document} \...
user avatar
0 votes
0 answers
112 views

Writing multiline equation inside algorithmic pseudocode environment

I have the following code which produces the algorithm in the image. \documentclass{article} \usepackage{algorithm} \usepackage{algorithmicx} \usepackage{algpseudocode} \begin{document} \begin{...
user avatar
0 votes
1 answer
44 views

VerbTex cases problem

I wrote this in VerbTex, and idk why it only puts the first case in curly brackets ( first time learning LaTeX, only two days since is started ) $|f(x)| = \begin{cases} f(x), f(x)\leq 0 \\ -f(x), ...
user avatar
0 votes
1 answer
28 views

Unwanted space when using align and cases

What I want, with manual alignment: \begin{equation*} \begin{cases} \ang{\varphi} \rightarrow \Omega_n\\ \varphi^k \hspace{4.4pt}\mapsto \xi_n^k \end{cases} \end{equation*} With align I get ...
user avatar
  • 283
1 vote
0 answers
32 views

Cases in Farsi text

I want to use case in Farsi text.Something like this: Thank you
user avatar
4 votes
3 answers
428 views

How to write conditional expression in LaTeX with text and math [duplicate]

Being new in LaTeX I don't know where to look for the proper resources. I know this is probably documented for easily somewhere out there, but I'm struggling with knowing where to look - any help ...
user avatar
1 vote
3 answers
106 views

Customize equation numbering for Cases environment? [duplicate]

I want to use equation numbering like this I tried like this but doesn't work \begin{equation} \begin{cases} \varlimsup_{r \to \infty} \dfrac{\log ^{+} n\left\{U_{k=1}^{N} \Omega\left(\theta_{k}+\...
user avatar
2 votes
3 answers
53 views

Writing left side of the CASES brackets

I want to write something on the left side of the cases brackets like shown in the picture. The code I am using: \begin{equation} \begin{split} & E(T,\alpha) = \\ & \begin{cases} 1 &...
user avatar
  • 21
2 votes
1 answer
63 views

How to make a new line associated to the same equation inside subnumcases?

I would like to write a new line associated to the same equation inside a subnumcases environment, as the whole equation is too big to fit into a single line. For that purpose, I tried to use the \\ ...
user avatar

1
2 3 4 5
10