New answers tagged

4

You asked, Is it possible to use a multline or similar inside an ... align? You can't use a multline environment inside an align environment. However, it's alright to use aligned and multlined environments -- the latter requires loading the mathtools package -- inside align environments. A minimum working example (MWE): \documentclass{article} \...


2

With the standard article class, with no option, the text width is set to 345pt. On the other hand, your longest equations are 195.14384pt and 205.44582pt wide respectively. This makes for slightly more than 400pt, so there's no chance to set the two blocks side by side unless you increase the text width; in order to ensure space for the mid rule, along ...


1

Unless the text block of your document is considerably wider than the default for the article document class, you will need line-break the first fraction term. in both minipage environments. Note the use of \noindent before the first \begin{minipage} statement: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{amsmath} \begin{document} \...


1

Your equations hardly fit between the margins when loading geometry. Other than that, I propose to use a single align* environment, with three columns, the middle column being dedicated to the vertical line. \documentclass{article} \usepackage{amsmath} \usepackage[showframe]{geometry} \begin{document} \begin{align*} \frac{\mathrm{d} R1(t)}{\mathrm{...


7

With \intertext: \documentclass[10pt, a4paper]{article} \usepackage[english]{babel} \usepackage[english]{isodate} \usepackage[T1]{fontenc} \usepackage[hidelinks]{hyperref} \usepackage[utf8]{inputenc} \usepackage{mathtools} \usepackage{amsmath} \usepackage{amssymb} \begin{document} \section{Example} \subsection*{Degree 1} \begin{align*} ...


1

Put the size specification inside the \textit. \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{align} \hspace*{5mm}w_{c} = {\textit{\LARGE f}} _{w,c} * \frac{\log(|C|)}{\int _{w,C}} \end{align} \end{document}


3

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 }...


3

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} % ...


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}} %----------------------------------------------------------...


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^...


0

Just to add a little variant in which some equations are centered and others are aligned to the left, of course is not as elegant as @leandriis answer but it could be useful: \documentclass{article} \usepackage{amsmath} \usepackage{blindtext} \begin{document} \begin{align*} & (f,f)_{[x^3]_{1}} = (f,f)_{[x^3]_{1}}=0 \\ & (f,g)_{[x^3]_{1}} =...


1

The package nncmath provide environment fleqn which push equation to the left text border: \documentclass{article} \usepackage{nccmath} %---------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\ShowFrameColor{\color{red}} %---------------------------------------------...


1

Here is a possible suggestion including three different alignments (red lines indicate margins): \documentclass{article} \usepackage{amsmath} \begin{document} \begin{flalign*} (f,f)_{[x^3]_{1}} &= (f,f)_{[x^3]_{1}}=0 &&\\ (f,g)_{[x^3]_{1}} &=(f,g)_{[x^3]_{3}}=0 \\ (f,h)_{[xxy]_{1}}&=(f,h)_{[xxy]_{3}}=0 \\ (f,p)_{[xxy]_{1}}&...


0

Instead of setting your text in tabular environment, it is easy to set in itemize, the codes are given below: \documentclass{book} \begin{document} \begin{itemize} \item[Head 1:] .... \item[Head 2:] ... \end{itemize} \end{document} If you must set in tabular, then let me know... PS: I am using standard tags as you are not providing any MWE


3

With use of the nicematrix package: \documentclass{article} \usepackage{nicematrix} \usetikzlibrary{decorations.pathreplacing, calligraphy} \tikzset{ B/.style = {decorate, decoration={calligraphic brace, amplitude=3pt, raise=1pt, mirror},% for mirroring of brace thick}, } \begin{document} \[\...


2

Here is a way, more or less a hack with bigdelim, an array and mathtools: \documentclass[a4paper,12pt]{article} \usepackage{array} \usepackage{bigdelim} \usepackage{mathtools} \begin{document} \[ \begin{array}{r@{}r @{} >{\displaystyle{}}l@{}} \ldelim\{{13.7}{*}[$ DGE $ ]\ldelim\{{10.8}{*}[\enspace$ FEGE $ ]\ldelim\{{6.5}{*}[\enspace$ CGE $ ] \ldelim\{...


1

Here is is workaround, with \useshortskip from nccmath for the above spacing, and a simplle \vskip -2ex for the space below: \documentclass{article} \usepackage{blkarray} \usepackage{amsmath, nccmath} \setlength{\parindent}{0pt} \newcommand{\colVectorLabelled}[2]{ \ensuremath{\mathrm{#1} = \begin{blockarray}{*{1}{c} l} \begin{block}{*{1}{>{$\...


4

You can write this equation smaller by help of macro \medmath{...} from the package nccmath: (red lines indicate text borders) \documentclass{amsart} \usepackage{nccmath} \usepackage{lipsum} \begin{document} \lipsum[66] \begin{align*} \medmath{ \overline{r}_D(n_D) = \begin{cases} r_D(n_D) & \text{ if } r_D(n_D) < b_{\min} \\ \max\bigl\{...


6

You can move “otherwise” to another line, adding some vertical space for better clarity. \documentclass{article} \usepackage{amsmath} \usepackage{lipsum} % for mock text \begin{document} \lipsum*[1][1-3] \begin{equation*} \overline{r}_D(n_D) = \begin{cases} \begin{alignedat}{2} &r_D(n_D) && \text{if $r_D(n_D) < b_{\min}$} \\[2ex] &\!\...


6

I would suggest using a temporary variable \documentclass{amsart} \begin{document} Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text \begin{align} {r}_D(n_D) = \begin{cases} r_D(n_D), &...


1

This answer is due to @user121799; that user is retiring from the site and no longer providing full answers, so I am "rescuing" their correct answer. To add leading zeros to an equation number so that all equation numbers are the same length, redefine \theequation as follows: \renewcommand{\theequation{% \arabic{section}.% \ifnum\value{equation}<10 ...


0

I would reorganize equations such, that each line become a little bit shorter. In this I would use macro \MoveEqLeft from the package mathtools: \documentclass{article} \usepackage{tensor} \usepackage{mathtools} \usepackage{geometry} \usepackage{lipsum} \usepackage{scalerel}%scale things \geometry{ paper=a4paper, % Change to letterpaper for US letter ...


7

You should be aware that flalign stands for full length align and not for flush left align. As such, split doesn't really make sense inside it. You can emulate split using aligned. \documentclass{article} \usepackage{amsmath} \usepackage{lipsum} % for mock text \begin{document} \lipsum[1][1-3] \begin{flalign} \begin{aligned} a1 & = 3534534343 \\ a2 ...


4

It is not very clear what you like to achieve, but the following solution may help you: \documentclass{article} \usepackage{nccmath} \usepackage{lipsum} \begin{document} \lipsum[11] \begin{fleqn} % defined in nccmath \begin{equation} \begin{split} a1 & = 3534534343 \\ a2 & = 2342342 \\ a3 & = 4564564 \\ a4 & = 5845645645864596464 \\ a5 &...


2

To align the nodes under each other on the left, I placed them under the west anchor and anchored each one to the west: below=1.5cm of p1.west,anchor=west To hide the last placed nodes, I used the background library: \begin{scope}[on background layer] \node[FITout={(p1) (p5)}, label={[anchor=north]{Phase 1}}] (x1) {}; \node (p6) [right=1cm of x1, ...


4

Just use alignedat instead of split and keep track of the &'s \documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{alignedat}{2} &a_1 + b_1 \xi + c_1 \xi^2 + d_1 \xi^3 &&= a_2 + b_2 \xi + c_2 \xi^2 + d_2 \xi^3 \\ &b_1 + 2c_1 \xi + 3d_1 \xi^2 &&= b_2 + 2c_2 \xi + 3d_2 \xi^2 \\ ...


5

By the default the pagenumbers are right aligned in box of \@pnumwidth (default is 1.55em). This box is to small for the Roman numbers. Assuming there are only chapters with Roman page numbers: \RedeclareSectionCommand[ tocpagenumberbox=\mbox ]{chapter} or \RedeclareSectionCommand[ tocpagenumberbox={\makebox[3em][r]}% adjust the width to your needs ]...


0

Like this? \documentclass{article} \usepackage[margin=20mm]{geometry} \usepackage{tikz} \usetikzlibrary{chains, fit, positioning, } \makeatletter \tikzset{reset join/.code={\def\tikz@lib@on@chain{}}} \makeatother \begin{document} \begin{tikzpicture}[ node distance = 8mm and 6mm, start chain = going below, ...


3

Judging by the screenshot you posted, the reason for why the caption doesn't appear below the respective graphs is that the graphs are wider than 0.3\textwidth, the scale=0.3 option notwithstanding. Some suggestions: To fix the horizontal misalignment, replace all instances of \includegraphics[scale=0.3]{...} with \includegraphics[width=\textwidth]{...}; ...


1

Exploit symmetries: \documentclass{article} \usepackage{amsmath} \usepackage{newpxtext,newpxmath} \newcommand{\off}{{\mathrm{off}}} \newcommand{\on}{{\mathrm{on}}} \begin{document} \begin{alignat*}{2} &\frac{\mu_\off l_\on^{1/\alpha_\on}}{(\mu_\on+\mu_\off)^{1+1/\alpha_\on}} S_{\alpha_\on,\sigma,1}(t) &\qquad& \text{si} \quad \alpha_\on<...


0

You can also use the package witharrows specially written in this aim. \documentclass{article} \usepackage{amsthm,amssymb} \usepackage{witharrows} \begin{document} \begin{proof} Let $t,u \in \mathbb{R}$ where $t=xy$ and $u=zw$. So, \begin{DispWithArrows*} 4xyzw &= 2\cdot2tu \\ &\le 2\cdot(t^2+u^2) \Arrow[i]{substituting variables}\\ &...


3

If you don't need the equations to be aligned at the equal signs, then I believe the gather environment does what you want: \documentclass{article} \usepackage{amsmath} % From egreg: <https://tex.stackexchange.com/a/501075/73317> \newcommand{\diff}{\mathop{}\!\mathrm{d}} \begin{document} \begin{subequations} \begin{gather} \overline{F} = - \...


1

I wondered whether you might be interested by this different layout (unless I misunderstand what you're after): \documentclass{article} \usepackage{mathtools} \usepackage{eqparbox} \newcommand{\eqmathbox}[2][M]{\eqmakebox[#1]{$\displaystyle#2$}} \begin{document} \begin{align*} \varphi = {}&\eqmathbox{\{ ... \}} \\[-1ex] & \eqmathbox{\cup} \\[-1....


3

Use ={} and {}\cup{} in order to get the right spacing. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \begin{aligned} \varphi ={} & \{ ... \} \\ {}\cup{} & \{ ... \} \end{aligned} \end{equation*} \end{document} I used aligned which is conceptually better, but also a single align* could go (there are some ...


4

I'm using instead of systeme package (it was my first thought - the same thought of @Bernard 😊) spalign package that it works, if we use the correct syntax, the same. It is very important that the blank spaces into \spalignsys should not be removed otherwise there is no alignment of the variables. \documentclass[a4paper,12pt]{article} \usepackage{spalign} ...


5

It is already possible with the systeme package. Why reinvent the wheel? \documentclass{article} \usepackage{systeme} \begin{document} \[ \systeme{2x + y = 2, x-3y= 1} \] \end{document}


2

Here is an environment for linear systems. It's not exactly what you describe because, it is designed to align also the signs. It's more difficult to use (more &) but I think that the result is better. \documentclass{article} \usepackage{amsmath} \usepackage{xparse} \ExplSyntaxOn \makeatletter \cs_new_protected:Nn \__insideloop_system_cr: { ...


0

I propose this simple code, and a slightly different alignment, with empheq and alignedat: \documentclass{article} \usepackage{empheq} \DeclareMathOperator{\MinMax}{Min/Max} \begin{document} \begin{empheq}[right=\enspace\empheqrbrace]{equation} \begin{alignedat}{2} \MinMax f_m (x)&, &\enspace & m=1,2,...,M; \\[1ex] \text{Subject to}& &...


Top 50 recent answers are included