As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [align]

{align} is an environment provided by math packages that permits multiple related equations to be aligned at a common reference point, usually a sign of relation. For general questions about aligning document elements, use {horizontal-alignment} or {vertical-alignment} instead.

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

Why Aren't These Equations Centered in this Box Environment

I've defined this box environment from one of the posts in this website as follows % ------- Set up Main Idea box environment ------- \newcounter{mainideas} \setcounter{mainideas}{1} \newcommand{\...
1 vote
1 answer
27 views

Different alignments with alignat

\begin{equation}\label{eq:f_formulation} \left\{ \begin{alignedat}{3} \E(u,z) &= \int_I(u_N,z)_{L^2(\Gamma_N)}+ \int_I(u_V,z)&\\ &\text{for all } z \in W_{,0D} \text{ with } z(T)=0\\ \tr ...
0 votes
0 answers
26 views

How do you force an image to be place according to you? [duplicate]

So, I was working on a project, I noticed that the figures are after where I want to place, So how to force an image to be one page before the already placed figure.In this case I want to swap the ...
2 votes
2 answers
75 views

Line issue with table, how to center on multirow

I am trying to create a table, but some things are off. I am new to LaTeX, so even to get to this state was not easy. The following image shows the adjustments I would like to do. The lines marked ...
2 votes
1 answer
31 views

Nicematrix and aligned math

The following document \documentclass{article} \usepackage{nicematrix,mathtools} \begin{document} \begin{equation*} \begin{split} \alpha^{d+i}_i &=\begin{...
3 votes
1 answer
164 views

Align with three &

Consider \begin{align} \text{the} \quad & \text{quick} \\ \text{brown} \quad & \text{fox} \end{align} \begin{align} \text{jumps} \quad & \text{over} \quad & \text{the} \\ \...
0 votes
2 answers
64 views

can i use resize box in align

I have this equation that goes off page when complied. its so large that \tiny doesn't cut it. I need to use resize box but the equation is in an align environment. equation needs to be labelled as a ...
-2 votes
1 answer
132 views

Changing a Wide Matrix from Landscape to Portrait Orientation

\documentclass[a4paper,12pt,]{book} \usepackage{graphicx} \usepackage[inner=1.3cm, outer=1.3cm, top=2cm, bottom=2cm, bindingoffset=1cm]{geometry} \usepackage[utf8]{inputenc} \usepackage{amsmath} \...
0 votes
1 answer
24 views

Top align two tabular placed side by side

How can I top align these two tables, and possibly prevent them from overlapping each other? \documentclass[12pt]{article} \usepackage{booktabs} \usepackage{siunitx} \usepackage{subcaption} ...
1 vote
3 answers
59 views

Left align a single text line within a block of math equations

How can one left align a single text line ("and", in the following example) within a block of math. equations? \shortintertext{and} seems to generate larger interline spacing which is ...
2 votes
1 answer
46 views

Conflict between [table]{xcolor} and {align} inside table

I am trying to put some equations inside an align environment in a cell inside a table. However, when I activate the \usepackage[table]{xcolor} option, my code inmediately crashes. EDIT: I modified ...
5 votes
2 answers
467 views

Cleveref does not sort self defined tags

Because I have many equations in my document and most of them do not need to be referred to, I always use \begin{align*}...\end{align*}. For the times I do need an equation number I have written a ...
0 votes
0 answers
30 views

Aligning equations in article class

I am writing a paper in article class. It contains a few equations that I am trying to align. I want the alignment to look like this: I am having trouble centering the texts "eq.(1)" and &...
0 votes
2 answers
29 views

Fix tag indentation in 'align'

I have the following equations (see latex below): My problem is that tag (1) is between the 2 lines, whereas I would like it to be aligned with the 2nd line. Is there a way to fix this? Thanks in ...
3 votes
4 answers
354 views

Adding explanation next to the successive equations in latex

How can I add such descriptions next to the successive aligned equations using LaTeX?
0 votes
1 answer
29 views

How use flalign to align the equations on the left?

I am writing some algebra notes and unfortunately I have some problem with the alignment of some equation: exactly the equation appears aligned on the right whereas I would like they are aligned on ...
1 vote
3 answers
31 views

Is there a way to reduce the space between adjacent aligns in an align environment?

I want to create a series of equations on top of each other that have the same alignment. To do this I used three &'s at different points to align the symbols with each other. However, the space ...
0 votes
0 answers
22 views

Set interpretation with break line

I want to write the following set \begin{align*} \{ d \in \mathcal{D}^* | \begin{split} F(S_1,\ldots,S_k) \land \bigwedge_{i = 1}^k S_i = \set{ n \in \N ; \varphi_i(d(n)) } \land \\ \exists \overline{...
0 votes
0 answers
29 views

Aligning a linear system of differential equations

How do I align a system of linear differential equations in latex? I can use \begin{cases} x_1'(t) = x_1(t)-x_2(t)+2x_3(t)\\ x_2'(t) = -2x_1(t)+5x_2(t)+2x_3(t)\\ x_3'(t) = 8x_1(t)-5x_2(t)-2x_3(t)\\ \...
1 vote
0 answers
24 views

Fix tag placement in align environment when locally switching from reqno to leqno

I have been using the solution in Tag placing with amsmath to turn on the leqno option locally for part of a document. However, when using the align environment from amsmath, this leads to spacing ...
1 vote
0 answers
17 views

Force text on last line of page when there is a table on next page [closed]

I am writing a document in overleaf (latex). I have a 2-column paper. There is a table inserted on the next page. The problem is that the last line on the previous page before the table is a blank ...
1 vote
0 answers
26 views

How can I group different equations into a single label using the amsmath package?

Using the align environment provided by the amsmath package, I am running the following code with the intention to produce one single label for these three equations: \documentclass[12pt]{report} \...
5 votes
2 answers
199 views

Multi-line equations in 'aligned' environment with ampersand (&) inside \left-\right parenthesis

I know how to use the ampersand in align and aligned environments to write multi-line equations. In this case I need to use \left[ and \right] to contain an expression on the first line, and I want ...
1 vote
2 answers
37 views

Why aren't my equations centered?

The equations produced by this code are centered \documentclass{article} \usepackage{amsmath} \usepackage{mathtools} \usepackage{cleveref} \begin{document} \begin{align} & \mathclap{f: A \to B,...
7 votes
2 answers
219 views

Text not respecting \text within NewDocumentCommand within align*

Within an align* environment I have lines of the form \Rightarrow &<\texttt{Program Code}, [a \mapsto 1, b \mapsto 2]> &\text{Rule Name}\\ \Rightarrow &<\texttt{Program Code 2}, [...
0 votes
1 answer
48 views

How to use gather and aligned with multiple labels?

The code below gives me ?? when referencing the equations. How do i fix it ? How do I get (1a,1b) for the first equation if possible? MWE \documentclass{article} \usepackage{amsmath} \begin{document}...
1 vote
0 answers
20 views

How to place 2 equations in 1 line in an align environment? [duplicate]

How do I properly place 2 equations in 1 line in an align environment? In the example below, equations 1, 2, and 3 are not properly centered. I would like them to be like equations 4, 5, and 6 but ...
0 votes
0 answers
28 views

XyMTeX ChemEquation alignment

I am trying to figure out how / why structures are aligned in XyMTeX - it's doing my head in. Why does this code generate this? \documentclass{article} \usepackage{xymtexpdf} \usepackage{xcolor} \...
0 votes
1 answer
23 views

Make section title print under its number

I am writing my diploma and I touched with problem in first picture I need to fill this (red) empty space by text of my title like this: All of my configs about section styles are native.
1 vote
1 answer
24 views

Reducing vertical space in `align` environment locally

I wanted to reduce the vertical space between text and the first line in align* environment locally. But setting \setlength{\abovedisplayskip}{-28pt} allows it to work globally (I think) and that's ...
5 votes
4 answers
635 views

How to align equations like this?

So I want to align this equation such that dx/dt all align in the same line as the picture given for reference. \begin{equation} \left.\begin{matrix} \frac{dx}{dy}=a(y-x)+u\\ \frac{dy}{dt}=-xz+cy \\ \...
2 votes
1 answer
95 views

How to typeset this equation?

This equation from some math book, position 1 and position 2 is in the same column, I tried \begin{align} x_n&=\begin{aligned}[t] &\left(1 + \frac{1}{n}\right)^n = \binom{n}{0}\left(\...
0 votes
1 answer
28 views

How can I centralize vertically roots in an equation?

When I execute this code \documentclass[11pt]{article} \begin{document} $\sqrt[n]{a\cdot b}=\sqrt[n]{a}\cdot \sqrt[n]{b}$ \end{document} the individual equations on the right side are not ...
3 votes
1 answer
161 views

How can I format equations and mathematical expressions in Overleaf, and fix alignment and display issues?

I am currently working on a document in Overleaf, and I am having trouble formatting my equations and mathematical expressions. Specifically, I want to enumerate the steps of the solution with text ...
6 votes
2 answers
207 views

How can I align multiple times in the 'flalign' environment?

I am following the solution in How to additionally name equations in align environment? to name my own equations. I would now like to align them at the = sign and the text where, but I am not getting ...
0 votes
0 answers
36 views

Overlapping text and `equation*`

MWE: \documentclass[12pt] {article} \usepackage{epsf} \usepackage{amsmath} \usepackage{amssymb} \usepackage{ragged2e} \usepackage{draftcopy} \usepackage{wrapfig} \usepackage{physics} \usepackage{...
19 votes
1 answer
3k views

Correct usage of \ifmmode [duplicate]

Seems that there is some subtlety in using \ifmmode that I am not aware of. For some reason, using: \newcommand{\hlcodeA}[1]{\ifmmode\else\small\fi\texttt{\hilight{#1}}}% is not quite identical to: \...
0 votes
0 answers
34 views

Tikz diagrams in align and captions

I have two Tikz diagrams - let's denote their code by $D$ and $D'$. Now I want to display them in a row, so I put them in align. That is I write \documentclass{article} \usepackage{tikz} \begin{...
2 votes
2 answers
58 views

Chemfig Scheme: wrong alignement of a reaction

I'm trying to use chemfig to put a reaction in my document, but the diferent molecules are missaligned. How I coul fix it? This is my code: \documentclass{article} \usepackage{chemfig} \usepackage{...
2 votes
1 answer
51 views

Text at end of math-line in align environment [duplicate]

How to put text at the end of a line (outmost right) in an align* environment? I have a set of equations in align* and at the end of each line I want to write a little bit text which explains that ...
0 votes
1 answer
290 views

Align Chess Diagram and notation

I'm trying to combine both a notation below diagram, but I cannot align them properly. Here, I have asked the question, but I don't want the text be a part of diagram. How could I do (the command is /...
3 votes
2 answers
156 views

Not indent the same as the first rightarrow

\documentclass[12pt,a4paper]{article} \usepackage[vietnamese]{babel} \usepackage[textwidth=8cm]{geometry} \usepackage{amsmath} \begin{document} \begin{align*} C = C_1 + C_2 \Rightarrow f_C = \frac{f_{...
3 votes
1 answer
358 views

TeXshade package - ruler missing position when "-" in consensus

I am using the texshade package, and have run into a problem I was hoping someone may be able to help with. I am using the diverse shading mode to compare mutated antibody sequences to their ...
0 votes
2 answers
2k views

How to shift text left in align environment

I want to align the following text left. Latex command: \begin{align*} x1&=x~(\text{$1$ is multiplicative identity})\\ &=x+x~(\text{since}~\text{ a monosemiring with an identity is idempotent ...
2 votes
1 answer
103 views

How to use alignat with two alignment tabs containing one 'cases' environment equation and a really long equation?

I want the middle 5 equations to be aligned at the = and at the 'on'. I tried to use alignat environment for this, but unfortunately it won't work at all. The 'on...' parts keep going beyond the ...
2 votes
1 answer
101 views

Align section, subsection and paragraph number in left margin in left in report

I want to align section, subsection and paragraph number in left margin in left. This is my code: \documentclass[12pt]{report}\makeatletter .... \renewcommand\paragraph{ \@startsection {paragraph} ...
7 votes
4 answers
12k views

Aligning multiple lines of text in an align environment

I want to use the right side of an aligned environment to present the reason for the next line. If the explanation requires more than one line the alignment fails. This could be eye-balled by adding ...
4 votes
2 answers
131 views

How to write a system of equations surrounded by a vertical bar?

I have a small system of equations which should be displayed like the following: I tried to display this with \left. and \right\vert. But this didn't work as expected: \documentclass{article} \...
1 vote
1 answer
44 views

Resolving tikzcd/externalize/align incompatibilities

I've been trying to follow the insights from the following posts: Are the TikZ libraries cd and external incompatible with one another? How to avoid redefining ampersand & globally? Use & ...
0 votes
2 answers
43 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 ...

1
2 3 4 5
78