2022 Developer Survey is open! Take survey.

New answers tagged

5 votes

Line Spacing Between Aligned Equations

When working with align* and the multi-row math environments of the amsmath package, a useful paramater to know about is \jot: it governs the default amount of whitespace padding that's inserted ...
user avatar
  • 435k
6 votes

How do I access the integral symbol "\int" after renewcommanding "\int" to something else?

The safest way is to use \NewCommandCopy: \documentclass{article} \usepackage{amsmath} \NewCommandCopy{\INT}{\int} \renewcommand{\int}{\operatorname{int}} If you don't have a recent LaTeX, you can ...
user avatar
  • 986k
6 votes
Accepted

How do I access the integral symbol "\int" after renewcommanding "\int" to something else?

You can use \let. Since you want to redefine \int as an operator, you need to "unassign" it first using \let\int\relax. If you use \renewcommand, you don't have to do this, but if you use \...
user avatar
  • 20.3k
1 vote
Accepted

Change format of manual equation tags without changing format of automatic numbered tags or references

The following code defines a new tag format Cian named after you. It detects if the label has a letter in it and then applies corresponding style. This means, however, that for your equations in ...
user avatar
  • 5,109
2 votes
Accepted

How to remove Bold from math equation in abstract?

Short answer, put this in your preamble: \usepackage{etoolbox} \makeatletter \patchcmd{\@maketitle}{\artauthors}{{\artauthors}}{}{} \makeatother Explanation: In the class file sn-jnl.cls line: ...
user avatar
  • 1,893
0 votes

An elegant way to write long equations in LaTex?

Structure with \newcommmand Based on Zarko's answer, I introduced some \newcommand definitions to reduce the amount repeating markup to highlight the differences between the different terms: \...
user avatar
  • 1,960
5 votes

An elegant way to write long equations in LaTex?

Here's an answer that's similar to the one by @Zarko in that it uses 3 rather than 2 lines per equation. It differs in the use of \textcolor instead of \color, the replacement of the needlessly large ...
user avatar
  • 435k
8 votes
Accepted

An elegant way to write long equations in LaTex?

With align* and equations in three lines: \documentclass{article} \usepackage{xcolor} \usepackage{amsmath} \usepackage{enumitem} \begin{document} \begin{enumerate} \newpage \item \textbf{En $i$} \...
user avatar
  • 251k
5 votes

An elegant way to write long equations in LaTex?

Here is a possible solution, loading geometry to have more decent margins, and using the [wide=0pt] key from enumitem. For the second item, I also propose a solution with multline*. \...
user avatar
  • 260k
1 vote
Accepted

\substack in \tag error

with texlive 2022 you get ! TeX capacity exceeded, sorry [input stack size=10000]. \protect ->\noexpand \protect \noexpand l.9 \end{gather} ! ==&...
user avatar
1 vote
Accepted

How to continue writing an equation in the next line in the IEEE journal papers format?

It's possible to make {array} work, but it looks like you're trying for a piece-wise definition, which {cases} from amsmath is built for. Some other notes: As noted, \text is for when you want the ...
user avatar
  • 4,897
9 votes
Accepted

How to draw a commutative diagram like this one?

With a bit enlarged distance between nodes and the same text for better observing the behaviour: \usepackage{tikz} \begin{document} \begin{tikzpicture}[node distance=3cm, auto] \node (Lambda1) {$\...
user avatar
9 votes

How to draw a commutative diagram like this one?

Direct method with tikz-cd. \documentclass{article} \usepackage{tikz-cd} \begin{document} \[ \begin{tikzcd} \Lambda & {\Sigma_2} \\ \Lambda & {\Sigma_2} \arrow["S", ...
user avatar
  • 5,109
1 vote

vertical alignment when using \underbrace for Matrix

You need to force a width that makes XITS Math to choose the bigger brace. \documentclass{article} \usepackage{mathtools} %\usepackage[no-math]{fontspec} \usepackage{unicode-math} \setmathfont[...
user avatar
  • 986k
0 votes

Using \left( & \right) around amsmath's align delimiter ("&")

You can use an incredible useful workaround from the mathtools-manual, p.29, that even includes line-breaks: \usepackage{mathtools} \newcommand\MTkillspecial[1]{% helper macro \bgroup \catcode‘...
user avatar
  • 785
4 votes

split matrices over two lines using array

Something like this? (Note that I've gotten rid of all \left and \right sizing directives and all \, spacing directives.) \documentclass[a4paper,twoside,12pt,openany]{report} \usepackage{mathtools} \...
user avatar
  • 435k
1 vote
Accepted

Split doesn't work in align with multiple tab stops

I'd like to suggest that you employ an alignat environment if you need all equations numbered individually, and an equation/alignedat nested environment if you need just a single, vertically centered, ...
user avatar
  • 435k
1 vote

Split a huge matrix across lines to fit on page

I'm not sure this is a good idea, but it accomplishes what you want. You can use the trimclip package to literally cut your huge matrix into two pieces. Then use the multline environment to place the ...
user avatar
  • 20.3k
3 votes

Aligning equations inside separate \begin[split] functions

Never have a trailing \\ in amsmath alignment environments. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} y_{1}' &= -\mu x^{\lambda - 1}\sin(\mu \ln(x))+ x^{\...
user avatar
  • 986k
3 votes

Aligning equations inside separate \begin[split] functions

split always aligns with the outer alignment, but the spurious trailing \\ confused it \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} y_{1}' &= -\mu x^{\...
user avatar
1 vote

AMS align / Align multiple “=”, too much space

(Cross-posted from https://stackoverflow.com/a/53842127/5445670) What about using array with a custom separator? \begin{array}{r@{\ }c@{\ }l} A &= B &= C \\ D &= E &= F \end{array}
user avatar
6 votes

Aligning equations inside separate \begin[split] functions

There's no need to embed split environments inside the align environment. A single align environment, along with judiciously placed \notag and \quad instructions, is all that's required to get the ...
user avatar
  • 435k
2 votes

Split a huge matrix across lines to fit on page

Even if you render the (unnumbered) equation in landscape format -- say, with the help of the rotating package and its sidewaysfigure environment -- you'll still need to round the numbers from 4 to 3 ...
user avatar
  • 435k
4 votes
Accepted

What's the best way to create this formula with latex?

The coding of this matrix product is quite straightforward, just take the time to write the four matrices that make up the formula with indexed variables. \documentclass{article} \usepackage{amsmath} \...
user avatar
  • 1,591
1 vote

How to include the overbrace in the below matrix in LaTeX?

Welcome to TeX.SE! please always provide, if possible, a small but complete document (with your matrix), which we can compile as it is your problem is possible simple solve by use of the nicematrix ...
user avatar
  • 251k
1 vote
Accepted

Array function with implies arrow at center

With use of align and aligned environments: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} \left\{\begin{aligned} \varphi(\sigma) & =1\\ \varphi(\tau) & =0 ...
user avatar
  • 251k
0 votes
Accepted

How do I align mapsto arrows in latex

You can use aligned (not cases that's not the right tool). Or array if you don't like the output of aligned (but it's the best, in my opinion). In any case, don't use align* for single row displays. \...
user avatar
  • 986k
1 vote

How do I align mapsto arrows in latex

Welcome to TeX:SE! By use of the cases environment defined in amsmath package: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} \sigma = \begin{cases} \sqrt[8]{2} ...
user avatar
  • 251k
6 votes
Accepted

When to use which alignment environment?

amsmath is derived from AMSTeX (amstex.tex) which does not have * forms but otherwise has mostly similar naming, including the x- variants. The environments that start math displays are documented in ...
user avatar
6 votes
Accepted

Is it possible to align different lines according to a "waterfall" scheme

You can use alignat: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat}{2} F\colon \mathcal{A} \to \mathcal{B} \\ & f\colon C \to D \\ && c \mapsto f(c) = \...
user avatar
  • 986k
0 votes

Alignment ampersand within \underbrace

If you can use LuaLaTeX, then luamathalign is the best choice. Here's a fixed version, where instead of \underbrace I use the defined command \ubrace that avoids a shortcoming of \underbrace as ...
user avatar
  • 986k
1 vote
Accepted

Alignment ampersand within \underbrace

You can do this with tikzmark: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{tikzmark,decorations.pathreplacing,calligraphy} \begin{document} \begin{align*} \...
user avatar
  • 20.3k
1 vote

Alignment ampersand within \underbrace

If it's possible to use LuaTeX, then the luamathalign package can be used to solve this problem elegantly. It only requires replacing & with \AlignHere inside the \underbrace. \documentclass{...
user avatar
1 vote
Accepted

Theorems (AMS, Numbered by Type) Grayed Out in Lyx

"Theorems (AMS)" and "Theorems (AMS, Numbered by Type)" are substitutes. They can't be used together. So on the right pane of the dialog, select "Theorems (AMS)" and ...
user avatar
  • 12.4k

Top 50 recent answers are included