New answers tagged

2 votes
Accepted

Align* in mhchem that also has some $math$ content in it?

align typesets its contents in math mode, so the $ characters are wrong. Perhaps you also want a further alignment point. \documentclass{article} \usepackage[version=4]{mhchem} \usepackage{amsmath} \...
egreg's user avatar
  • 1.1m
2 votes

having each line numbered in an align environment with brackets

I don't really like this but I can't come up with anything better \documentclass[twocolumn]{article}% twocolumn for smaller snapshot \usepackage{empheq} \begin{document} \begin{align} \text{Minimize} ...
campa's user avatar
  • 29.9k
2 votes

Split inside Align raises overfull hbox - need a local solution

(too long for a comment, hence posted as an answer) I experience no problems if I replace the align and split environments with equation and aligned environments. \documentclass{article} \usepackage{...
Mico's user avatar
  • 495k
3 votes

Align equation left

This answer addresses some possible misconceptions. Note that there are two ways to interpret the questions -- if you use the wrong solution, you'll probably find that nothing works. Summary: The two ...
user202729's user avatar
  • 6,364
3 votes
Accepted

How to use enumerate environment for a equation

I'd avoid juggling with enumerate: it's just four items that you can safely number by hand. My idea is to set a tabular and the bottom row parts enclosed in varwidth so the maximum width is only used. ...
egreg's user avatar
  • 1.1m
4 votes

How to use enumerate environment for a equation

Employing the machinery of the multicols package seems like overkill for the material at hand. Here's a solution that employs side-by-side minipage environments, each containing a two-item enumerate ...
Mico's user avatar
  • 495k
1 vote

Does this alignment of the equations look weird?

You shouldn't use \text, but \mathrm. Why? Try \begin{theorem} Here $\text{e}^2$ will be in italics \end{theorem} (this assumes you have such a \newtheorem defined). Of course I'd never use \mathrm{e}...
egreg's user avatar
  • 1.1m
3 votes
Accepted

Package amsmath Error: Multiple \label's: label 'eq:natural_frequency' will be lost

What do you expect will happen when you tell LaTeX to both label an equation, and not number an equation ? If you are going to \label an \begin{align}, the line that \label is on should not also ...
Willie Wong's user avatar
  • 23.8k
4 votes
Accepted

How to have local alignment groups within the same 'align' environment?

You can remove \belowdisplayskip and \abovedisplayskip, but also take care that the interline spacing in displays is enlarged by \jot. \documentclass[twocolumn]{article} \usepackage{mathtools, nccmath}...
egreg's user avatar
  • 1.1m
2 votes

How to have local alignment groups within the same 'align' environment?

This solution (which is inspired by code from appendix D of The TeXbook) follows each alignat group with a statement that works its way recursively up the vertical list and re-inserts only the \hboxes ...
Heiko Theißen's user avatar
0 votes

how to unalign some equations and center them

I would like to recommend that you apply a radical visual simplification and go for a single-column, left-aligned "look". \documentclass{article} \usepackage{amsmath,amssymb,geometry} \...
Mico's user avatar
  • 495k
1 vote
Accepted

how to unalign some equations and center them

Create a third column and use \mathclap (or \mathmakebox[2in][c]), from the mathtools package \begin{align} D_x &= \mathbb{R}, &&&D_y &= \mathbb{R} \symbol{92} \{0\} \notag\\ ...
Dhawal Patil's user avatar
0 votes

how to unalign some equations and center them

Ugly hack: \documentclass{article} \usepackage{mathtools} \usepackage{amsfonts} \begin{document} \begin{align} D_x &= \mathbb{R}, &D_y &= \mathbb{R} \symbol{92} \{0\} \notag\\ \...
cabohah's user avatar
  • 9,237
3 votes

Align multiple subequations with each other

Alternatively to @egreg's answer, you could make size of both equations the same \documentclass{report} \usepackage{mathtools} \usepackage{kantlipsum} \counterwithin{equation}{chapter} \begin{...
Celdor's user avatar
  • 8,818
5 votes
Accepted

Align multiple subequations with each other

Here's a command \stepsubequation that should do what you want. I added also hyperref to show it also works in this case, but is not necessary for the job. \documentclass{article} \usepackage{amsmath} ...
egreg's user avatar
  • 1.1m
3 votes
Accepted

how to avoid going out of the page when using minipage and flalign environments

The lines is indented, so you want \noindent at the start, or place in \begin{center}...\end{center} or similar
David Carlisle's user avatar
0 votes

How to align caption left in algorithm2e?

\usepackage{caption} \DeclareCaptionType{algo} \captionsetup[algo]{ name=Algorithm, singlelinecheck=off } and \begin{algorithm} captionof{algo}{your caption} \end{algorithm}
Junee's user avatar
  • 11
4 votes
Accepted

How to tune the multiline equation with the self-defined indentation?

I don't think you really want flalign. \documentclass[12pt,a4paper]{article} \usepackage{amsmath,mathtools} \usepackage[algosection, ruled, lined]{algorithm2e} \newenvironment{shiftedflalign*}[1][0pt]...
egreg's user avatar
  • 1.1m
0 votes

Tikz diagrams in align and captions

Your question is not clear about how you like to present your figures. With captions or without it? As subfigures in figure or as two independent figures Or figure with two images? Hence MWE (Minimal ...
Zarko's user avatar
  • 293k
3 votes

Multiple columns alignment

Clearly, “Average ESG Disagreement” is too wide. Split such long subheaders into two lines. You get equal size with siunitx. Note also how I define \splitcell so as to ease input. \documentclass{...
egreg's user avatar
  • 1.1m
0 votes

Tikz diagrams in align and captions

Here's a way to do it, adopting the comments, mainly from Ignasi: Kindly check the package documentation from subfigure at ctan for details. \documentclass[10pt,a4paper]{article} \usepackage{tikz} ...
MS-SPO's user avatar
  • 9,181
3 votes

Multiple columns alignment

Two suggestions: Align the numbers in the eight data columns on their implicit decimal markers, and get rid of the bold-facing in the header row and the left-hand column. \documentclass{article} % or ...
Mico's user avatar
  • 495k
4 votes

Multiple columns alignment

It seems that you generate table code with some table generation tool, hence table code is full of \multicolumn clutter. With use of the tabularray package table code become much more concise and ...
Zarko's user avatar
  • 293k
4 votes

Multiple columns alignment

I'd suggest to make use of the booktabs package that provides a way for shortened lines with \cmidrule. This way, you don't need to add the useless additional column: \documentclass{article} \...
Jasper Habicht's user avatar
2 votes

Formatting long equations

Some suggestions, in no particular order: use \intertext instructions to insert lines of text between rows; snug up subscript terms to \nabla symbol via \! (negative thinspace) directives; use a ...
Mico's user avatar
  • 495k
4 votes

Formatting long equations

(a) increase spacing between each equation \\ has an optional argument, e.g. \\[2cm], which you can use to add extra space (b) insert one line of text between the equations you can use \intertext{.....
samcarter_is_at_topanswers.xyz's user avatar
2 votes
Accepted

Help with `alignat` with 3 columns where some lines don't need alignment at third column

Here are two possibilities: Use an interior aligned environment. Use an alignat*{3} environment, and use \mathrlap directives (provided by the mathtools package, a superset of the amsmath package) ...
Mico's user avatar
  • 495k
3 votes
Accepted

Alignment of text left and center

Probably you want something along these lines: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} 1\,\text{stg} = 0.5 \qquad \begin{alignedat}[t]{2} P(A \mid A) &...
egreg's user avatar
  • 1.1m
0 votes

Aligning table-entries at \pm

Similar to @samcarter_is_at_topanswers.xyz solution ... Differences are: written are all tolerances, also 0.00 two version of siunitx settings (MSE consider only first six columns of table) for ...
Zarko's user avatar
  • 293k
4 votes
Accepted

Aligning table-entries at \pm

your uncertainties have two digits after the decimal separator, this means that you need to use (2.2) instead of (2) in the table-format to allocate enough space us \pm or +- to denote the ...
samcarter_is_at_topanswers.xyz's user avatar

Top 50 recent answers are included