Hot answers tagged

8

Never ignore errors, you have \documentclass{article} \begin{document} $ F(x)= \begin{cases} 0, & x\leq 0 \textbf{ or } y\leq 0 \\ \frac{x^2y+xy^3}{2}, & \textbf{ if} 0\leq x,y \leq 1 \\ \frac{x^2+x}{2}, & \textbf{ kad } 0\leq x \leq 1, \; y \geq 1 \\ \frac{y+y^3}{2}, & \textbf{ if} x>1, 0\leq y \leq 1 \\ 1,& \textbf{ if } ...


8

The code for cases in amsmath is just \renewenvironment{cases}{% \matrix@check\cases\env@cases }{% \endarray\right.% } \def\env@cases{% \let\@ifnextchar\new@ifnextchar \left\lbrace \def\arraystretch{1.2}% \array{@{}l@{\quad}l@{}}% } so it is array with a column specification of {@{}l@{\quad}l@{}} and arraystretch of 1.2


7

with \mfrac from nccmath and multlined from the mathtools package: \documentclass{article} \usepackage{mathtools, nccmath} %---------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\ShowFrameColor{\color{red}} %----------------------------------------------------------...


7

The reason the three equations are centered horizontally in your code is because you're using a matrix environment, which is programmed to center the contents of each entry, using inline math mode. Switching to a cases environment takes care of left-aligning the cell contents. However, the equations continue to be typeset in inline math mode and the ...


7

You can use \smash[t]. \documentclass{article} \usepackage{amsmath} \begin{document} \[\text{Productive forces}\begin{cases} \text{Means of production} \smash[t]{\begin{cases} \text{Instruments of production}\\ \text{Raw materials} \\ \text{Spaces} \end{cases}} \\ \text{Labour power} \end{cases} \] \end{document}


7

I will assume that you're trying to uses the cases* environment that's provided by the mathtools package. If this assumption is not correct, please let me know. The cases* environment, unlike the cases environment, assumes that the material in the second column, i.e., after the & character, is in text mode. Since there's is a \neq macro in the first ...


6

You can use the cases environment from amsmath. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{cases} u_{t}=\nabla\cdot D(u_{t})\nabla u_{t}+\mu_{1} \frac{c_1}{k_1+c_1}u_1+\mu_{2}\frac{c_2}{k_2+k_{12}c_1+c_2}u_1\\ c_{1,t}=\Delta c_1-\frac{\mu_{1}}{y_1}u_{1\infty} \frac{c_1}{k_1+c_1}u_{1}\\ c_{2,t}...


6

You can do that with the package witharrows. In the following example, I have used the option subequations in order to have a sub-numerotation of the equations. As the main goal of witharrows was, as its name says, to draw extra arrows, I have added an arrow in the example. \documentclass{article} \usepackage{amsmath} \usepackage{witharrows} \begin{...


5

Hack above hack. ;-) \documentclass{article} \usepackage{amssymb, amsthm, amsmath} \usepackage{mathtools, empheq,eqparbox} \newcommand{\eqmath}[3][l]{\eqmakebox[#2][#1]{$\displaystyle\if#1l{}\fi#3$}} \newcommand{\ftext}[2]{\makebox[#1][l]{\textup{#2}}} \begin{document} \begin{empheq}[ right=\empheqrbrace \ftext{10em}{Primal Feasibility} ]{align} \...


5

txfonts has a bug in its definition of the ogonek, it leaves an ungrouped \ooalign so any character with an ognoek messes up the spacing from then on. that could be fixed,but essentially the package has been superseded by newtxtext and newtxmath and replacing %\usepackage{txfonts} \usepackage{newtxtext,newtxmath} fixes the issue. I downloaded your test ...


5

I'm pretty sure it is a duplicate. But it is also easy to solve using aligned \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} V_{ijk}& = \begin{cases} \dfrac{y_u+y_l}2 - \dfrac{x_u+x_l}2,& \text{if }x_u < y_l \\[15pt] \begin{aligned}[b] &\dfrac1C \bigg[\dfrac{x_u^3-y_l^3}{6}+\dfrac{y_l^2+x_u^...


5

The main trick is using aligned; however, there are other improvements to your code: “div” is an operator and it's much better to define a macro for it; since \div is preempted, I used the name \divop; if an operator immediately follows & in align or aligned, it should be preceded by \! or a spurious thin space would be added; a little nuisance, but it'...


5

Within the scope of \ccases{...}, the & symbol performs the same function as it does inside the cases environment of the amsmath package, i.e., it creates a certain amount of horizontal separation (as well as vertical alignment). However, that's not what you want here, is it? To get the desired spacing around the = symbols, I recommend that you encase ...


5

Something like this? \documentclass[11pt,a4paper]{report} \usepackage{amsmath} \usepackage{cases} \newcommand{\mydots}{\dots\dots} \begin{document} \begin{numcases}{} \mydots\\ \begin{aligned} &\quad\mydots\\ &\qquad\mydots \end{aligned}\\ \quad\mydots\\ \begin{aligned} &\qquad\mydots\\ &\qquad\mydots \end{aligned}\\ \quad\mydots \end{...


5

A pretty manual approach using array: \documentclass[]{article} \usepackage[]{mathtools} \begin{document} \begin{equation*} \sigma_{ij} = \left\{ \begin{array}{@{}r@{{}={}}l@{}l} A & g^{r_4}\\ C & g^{\frac{1}{r_4 + H(m)}}\\ D & \{K^\alpha\}^{r_4}\cdot\{K^\beta\}^{r_4}\cdot\{K^\gamma\}^{r_4} \ldots\\ &...


5

Using nicematrix: \documentclass[conference]{IEEEtran} \IEEEoverridecommandlockouts \usepackage{nicematrix} % <--- \usetikzlibrary{decorations.pathreplacing, calligraphy} \tikzset{ B/.style = {decorate, % style for braces decoration={calligraphic brace, amplitude=4pt, raise=1pt, mirror},% for mirroring of brace ...


5

Use subnumcases: (See texdoc cases for full documentation) \documentclass{article} \usepackage{amsmath} \usepackage{cases} \begin{document} \begin{subnumcases}{ P(X_1=x_1,\dots,X_K=x_K)=\label{eq}} \frac{N!}{x_1!\dotsm x_k!}p_1^{x_1}p_2^{x_2}\dotsm p_k^{x_k},& when $\sum_{i=1}^kx_i=N$ \label{multinomial}\\ 0 & otherwise, \label{negative} \end{...


5

An alternative way to write your equations: \documentclass{article} \usepackage{mathtools} \begin{document} \[ u^*(t) = \begin{cases} \begin{rcases} -1 & t\in[t_0, t_f] \end{rcases} & c \geq 1 \\[1ex] \kern-\nulldelimiterspace \begin{rcases} \hphantom{-} 0 & t\in[t_0, t_1)\\ -1 &...


5

Very ad hoc, but it does the job. Not that I find that presentation very appealing. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \newcommand{\ph}{\hphantom{\bigg\lbrace}}% \newcommand{\cond}[3]{\makebox[3em][l]{$#1$}{#2}\makebox[6em][l]{$#3$}}% \newcommand{\sys}[1]{% \biggl\lbrace \begin{array}{@{}l@{}}#1\end{array}% }...


5

You should consider that there might be possible surrounding text. The following puts the structure in a 4-row tabular: \documentclass{article} \usepackage{amsmath} \begin{document} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque metus magna, placerat laoreet feugiat a, fermentum id elit. Pellentesque sodales mauris eget condimentum ...


5

The second column of the cases* environment is set up to contain text, so you'll need to enclose the math contents in that column in $…$. (See the documentation of the mathtools package, which is where cases* is defined.) The following works: \documentclass{article} \usepackage{amsmath,mathtools} \begin{document} \begin{equation*} G(z,w) = \begin{...


4

You are forcing an empty line, replace \Rightarrow a-c=b-d \\ by \Rightarrow a-c=b-d


4

The body of numcases is already in math mode, and the second part is alread in \text{}. So you are basically switching it off with the first $. I would use the following: \documentclass{article} \usepackage{amsmath, cases} \begin{document} \begin{numcases}{S_{k}=} 1 - \frac{I_{k}}{\psi_{k}} & for $I_{k} < \psi_{k}$, \\ 0 ...


4

My suggestion is not to use cases, because it increases the interline spaces also inside nested alignments. Using multlined for the long middle equation does the job. \documentclass{article} \usepackage{amsmath,mathtools} \begin{document} \begin{equation*} V_{ijk} = \left\{ \begin{aligned} & \dfrac{y_u+y_l}2 - \dfrac{x_u+x_l}2, && \text{if }...


4

Here's a solution that employs a dcases* environment instead of the cases environment. The d in dcases denotes "display style"; this means, among other things, that one can write \frac instead of \dfrac in order to get "large" fraction terms. Note that I've removed unnecessary \left and \right directives. \documentclass{article} \usepackage{mathtools} % ...


4

\documentclass[a4paper, 12pt]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \begin{document} \tableofcontents \section{$f(x) = \protect\begin{cases} 2 & \vert x \vert < 3 \\ -5 & \vert x \vert > 4 \protect\end{cases}$} \subsection{$f(x) = \protect\begin{cases} 1 & \vert x \vert < 1 \\ 0 & \vert x \vert > 1 \protect\...


4

Use \vdotswithin tag which comes along with the package mathtools, and the codes are follows: \documentclass{book} \usepackage{mathtools} \begin{document} \begin{equation} \begin{cases} u_{1,t}=\nabla\cdot D(u_{1})\nabla u_{1,t}+f_1(c_1, \dots, c_m, u_1, \dots, u_n)\\ \vdotswithin{u_{n,t}=\nabla\cdot D(u_{n})\nabla u_{n,t}+f_2(c_1, \dots, c_m, u_1, \dots, ...


4

With the cases* environment from mathtools: \documentclass{article} \usepackage{mathtools} \begin{document} \[ \theta_{\mathcal{P}}(w) = \begin{cases*} f(w) & if $w$ satisfies primal constraints \\ 0 & otherwise \end{cases*} \] \end{document}


4

Please note that questions like this is generally frowned upon here as it has the characteristics of a do this for me question. Generally you should show what you have do far. Any good latex instructions should tell you how to construction expressions like this. \theta_{\mathcal{P}}(w) = \begin{cases} f(w) & \text{if $w$ ... } \\ \...


Only top voted, non community-wiki answers of a minimum length are eligible