the cases environment is provided by the amsmath package- the mathtools package introduces extensions of it (dcases, etc)

learn more… | top users | synonyms

7
votes
1answer
371 views

Why does mathdesign result in a huge 'cases' environment brace in Tufte documents?

I'm getting strange results when I use the cases environment in Tufte-LaTeX documents with the mathdesign package. Instead of I get Is there something I can do to get rid of that huge brace? ...
10
votes
3answers
472 views

TeX capacity exceeded while parsing a date string

I'm trying to parse a date (say, a due date) in a DD-MMM-YYYY format, e.g., 06-May-2012 and create macros \dueday, \duemonth, and \dueyear. I use xstring's commands to extract the substrings. Then I ...
3
votes
1answer
143 views

uppercase and mhchem

How do I achieve a proper uppercase including chemical formulas typeset with mhchem, i.e. everything but chemical formulas are capital letters? MWE: \documentclass{minimal} ...
5
votes
1answer
805 views

Error using line break in 'cases' environment

I'm trying to display quite a simple 'cases' type equation in Texmakerx, but it appears to be ignoring the \\ and & uses. \documentclass[journal]{IEEEtran} \usepackage{graphicx} ...
20
votes
3answers
9k views

How to put a brace on the right, not left, to group cases?

How can I get a brace on the right, not the left, to group cases, using cases? (I know actual cases look better with the brace on the left, but the items I need to group are not literally cases. They ...
4
votes
3answers
362 views

How to right-side annotate a bracketed-together set of items in cases environment?

How to right-side annotate a bracketed-together set of items in the align environment, cases sub-environment? E.g. how to put an annotation such as "(Fermat)" where the following code would put a ...
6
votes
1answer
3k views

line break inside cases environment

I have an equation using a cases environment, with one case with a long description text: \begin{eqnarray*} \begin{cases} 1 \text{too long description of the first case, not ...
7
votes
4answers
4k views

Aligning conditions in cases environment

I have a piecewise function with three "parts." I would like to have all three conditions aligned at the variable x. How do I achieve that? Here is the code I have so far: \[ f(x) = \begin{cases} ...
5
votes
3answers
8k views

Clean-Looking Piecewise-Defined Functions

I want to write a clean-looking piecewise defined function. There's a similar post here: How to write a function (piecewise) with bracket outside?, but I have follow-up questions. The two options I ...
7
votes
2answers
604 views

list the cases in text

I would like to list some cases which are needed to be consider in text. I didn't find a standard way to do this. There is "case" for math mode, but that is not what I want. Look the following ...
2
votes
1answer
2k views

\numcases with \tag

I would like to label some cases with specific tags, and was hoping for something like \begin{numcases}{A = } \frac{r}{a} & r > a \tag{G} \\ \frac{a}{r} & r < a \tag{H} \end{numcases} ...
2
votes
1answer
170 views

Separate labels in cases 2

Is there a cases package that lets me label my cases as I want? The cases and subcases environments of the cases package either labels tags with consecutive numbers or not at all. I would like some ...
12
votes
4answers
5k views

Aligning plain `align` and `cases`?

The cases environment works very well for enumerating cases within a large left bracket. I'd like to be able to combine it with the align environment so that equals-signs and conditions also line up: ...
20
votes
4answers
3k views

Separate labels in cases

As much as I have tried, it doesn't seem possible to use separate labels when using a casesconstruction (from the amsmath package). Ideally, I would like to be able to write something like ...
5
votes
3answers
1k views

Is there a “cases” environment in text mode?

The title says it all: The "cases" environment works only in math mode. Is there an alternative in text mode?
5
votes
1answer
583 views

Right aligned first column in a cases environment

Is there a simple way to obtain a right aligned first column in the cases environment. As far as I can see, mathtools does not add such an option. (This question might be read as a request for ...
4
votes
3answers
134 views

2 left alignments under cases

I would like to align something under cases as follows: value1 if condition value2 line1ofvalue2... otherwise line2ofvalue2.. line3ofvalue2. First, there are ...
0
votes
2answers
456 views

How to denote a logical matrix (mask) as used in image processing?

Updated Below In my thesis, I am discussing an image processing mask, which is a matrix of the same size as some image but with ones where that image meets some criteria and zeroes elsewhere. I am ...
2
votes
3answers
9k views

how to insert multi line equation in the tabular environment?

How can insert multi line equation in the tabular environment? For example see the following code that can show my request. \begin{tabular}{rrr} &a &b\\ &u=\begin{cases} 0;& ...
1
vote
1answer
250 views

how to import multiple branch cases structure into LaTeX document.

Could I set up a structure for several cases so that I could get a TeX command branch say, behavior as below: if case A if case A1 \cmdAi{arg1} elseif case A2 \cmdAii{arg2} elseif case A3 ...
2
votes
1answer
252 views

what are the ways to align conditions in cases

For example, the following is not very nice: [f(x)]_N=\begin{cases} f(x) \text{ if } f(x) \le N, \\ \newline N \text{ if } f(x) \gt N. \end{cases} How can I make it nicer?
3
votes
1answer
164 views

How can I flush text left in the cases environment?

I have the following code: \documentclass{article} \usepackage{amsmath, amssymb, amsthm, graphicx, textcomp} \begin{document} d^2(A,B)=\begin{cases} (a_1-b_1)^2(1+m^2) &&\text{if $AB$ has ...
1
vote
0answers
617 views

Multipage “dcases” environment [closed]

I am using the "dcases" environment of the "mathtools" package with nested other environments inside it. The whole expression does not fit on a single page and so I am wondering if it is possible to ...
9
votes
3answers
2k views

Cases with square brackets

How can I subdivide in cases with square brackets? I mean I want to write: ⌈ 2_i if ... rank (q, l) = | 2_i + 1 if ... ⌊ .... with square brackets, not ...
14
votes
9answers
817 views

Looking for a more appropriate version of \cases

Often-times I find myself wanting to write something like, That is, a vertical brace followed by a table consisting of three columns, the first and the last are math, aligned where-ever I like, and ...
3
votes
1answer
1k views

Newline in a “cases” environment

I have the same issue as in this question: Split-like environment inside cases environment with one difference - I would like to get the same result with LyX, using as little LaTeX code as possible. ...
13
votes
2answers
4k views

Split-like environment inside cases environment

I'd like to have a cases environment with some cases that are too long to fit on one line. I tried this: \begin{cases} \begin{split} long expression \\ second line of long expression ...
9
votes
1answer
10k views

Aligning the right parts in multiple \begin{cases}

Is there an intelligent way to left-align the parts right of & of the two cases environments shown below (if x >= 0, otherwise, if y < 0, otherwise). I wonder if there is a better way than ...
6
votes
2answers
896 views

Proper punctuation after cases environment

I know that when writing a displayed equation, it's correct to write punctuation before the closing \] as follows: This proves \[ x^2 = 3, \] and it follows that \[ x = \pm\sqrt{3}. \] If I'm using ...