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

How can I write the next step exactly below the previous step in the equation without repeating the L.H.S. of the equation?

The following solution also employs an align* environment (cf @RaffaeleSantoro's solution), but also takes care of several typographical niceties such as using upright lettering for a "math ...
Mico's user avatar
  • 478k
10 votes
Accepted

How can I write the next step exactly below the previous step in the equation without repeating the L.H.S. of the equation?

Try this: \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amssymb} \usepackage{graphicx} \begin{document} \begin{align*} ...
Raffaele Santoro's user avatar
10 votes

How to align text under the brackets

You want to make the formulas to have the same height. Here I use \mathstrut, but in the optional argument you may use any \vphantom. \documentclass{article} \usepackage{amsmath} \newcommand{\...
egreg's user avatar
  • 1.1m
10 votes

How to align text under the brackets

The reason the middle of the three underbraces isn't aligned vertically with the other two is that the first argument of the associated \underbrace directive doesn't contain material that protrudes ...
Mico's user avatar
  • 478k
9 votes
Accepted

LuaLaTeX - tabularx - Why does this table not fit on the previous page?

LaTeX limits the size of floats on a page. In particular the parameter \textfraction specifies the minimal amount of the page that is reserved for text (and hence, cannot be used by floats). Default ...
Pieter van Oostrum's user avatar
8 votes

Align Equations Including `cases`

You could use the nicematrix package as shown in https://tex.stackexchange.com/a/583373/36296 \documentclass{article} \usepackage{nicematrix} \begin{document} \[ \begin{NiceArray}{r@{\;}l}[first-row] ...
samcarter_is_at_topanswers.xyz's user avatar
8 votes
Accepted

How can I stack these items on top of each others at the bottom of a vertical bar?

I would just use \substack: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} y &= y_0 + \sum_{n = 1}^{\infty} \frac{x^n}{n!} \, f_n(x, y) \bigg\vert_{\substack{x =...
Werner's user avatar
  • 589k
7 votes

How to change vertical alignment of a fraction within an equation

You might do it by using gathered around the fraction, but there are much better ways. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{bmatrix} \...
egreg's user avatar
  • 1.1m
7 votes
Accepted

Vertical alignment of \underset

(I've edited this answer to mention the \overunderset macro, which has the same issue as a nested combination of \overset and \underset.) It would appear that \rightleftarrows is programmed to think ...
Mico's user avatar
  • 478k
6 votes

Align top of images using subcaption

Newer solution For anyone who come across this issue with subcaption package >= v1.2, there is a built-in argument for that: \begin{subcaptionblock}[⟨outer-pos⟩][⟨height⟩][⟨inner-pos⟩]{⟨width⟩} ......
fhfuih's user avatar
  • 103
6 votes
Accepted

Compilation error when using &

This is a bug, fixed for the next release see https://github.com/latex3/latex2e/issues/901 There is a full patch there or simply guard the & with a \relax before the &.
David Carlisle's user avatar
6 votes

Please make my table perfect with long caption

Some suggestions, in no partiular order: (a) Use a threeparttable environment to encase both the \caption statement and the tabular environment. That way, the width of the caption will be limited to ...
Mico's user avatar
  • 478k
6 votes

equation vertical alignment in tabular, baseline is too low

An answer with easytable: \documentclass{article} \usepackage{amsmath} \usepackage[thinlines]{easytable} \begin{document} \begin{center} \begin{TAB}(r,1cm,2cm)[5pt]{|c|c|}{|c|c|}% (rows,min,max)[...
koleygr's user avatar
  • 19.9k
6 votes
Accepted

equation vertical alignment in tabular, baseline is too low

With tabularray: \documentclass{article} \usepackage{tabularray} \UseTblrLibrary{amsmath} \begin{document} \begin{center} \begin{tblr}{hlines, vlines, colspec = {Q[c, mode=math] ...
Zarko's user avatar
  • 283k
6 votes

equation vertical alignment in tabular, baseline is too low

A solution with the cellspace package, which allows to define a minimal vertical spacing at the top and bottom of cells in columns with specifier prefixed with the letter S (or Cif you load siunitx, ...
Bernard's user avatar
  • 269k
6 votes
Accepted

Vertical alignment between numbers and arrows

The tricky part is centering numbers with a sign. The value of \tabcolsep sets (now increases) the distance between columns. \documentclass{article} \usepackage{amsmath} \begin{document} \newlength\...
Przemysław Scherwentke's user avatar
6 votes

Align Equations Including `cases`

Adaptations insert a negative space before the cases environment: \hspace{-.73em} use relative size em, so it works ok (not perfectly, as there is a small difference for huge) also for other ...
dexteritas's user avatar
  • 7,716
6 votes
Accepted

tabularray - How to center both text and images

You need to move image baseline to its vertical center. For example by use of the adjustbox package: \documentclass[10pt,a4paper]{scrreprt} \usepackage{fullpage} \usepackage[export]{adjustbox} \...
Zarko's user avatar
  • 283k
6 votes

tabularray - How to center both text and images

Here's one possibility using graphbox, which provides the align option to \includegraphics. I also switched to the current syntax of tabularray. \documentclass[10pt,a4paper]{article} \usepackage{...
Miyase's user avatar
  • 2,390
6 votes
Accepted

How can I force 'description' to start on a new line when using 'enumerate'?

One way to get what you want is to simply add a small negative vertical space at the beginning of the embedded enumerate list. We can do this using the before key which can inject code before the list ...
Alan Munn's user avatar
  • 210k
6 votes
Accepted

Need help fixing height discrepancy in LaTeX tables

Something like this: Your MWE has several issues: Use of \resizebox. Never do this. Apparently the right table is a little bit wider than the left one, so it is shrunk more. Accordingly, the font ...
Zarko's user avatar
  • 283k
5 votes
Accepted

How can I make these numbers center aligned?

You want to remove the [t], but there's a much simpler way to do it with adjustbox. \documentclass[journal]{IEEEtran} \usepackage{amsmath,amsfonts} \usepackage{algorithmic} \usepackage{algorithm} \...
egreg's user avatar
  • 1.1m
5 votes

Please make my table perfect with long caption

Hm, it is still unclear to me what is `perfect table" for you :-(. This is very opinion dependent ... One possibilities, at least the code is much simpler than yours, is to use the tabularray ...
Zarko's user avatar
  • 283k
5 votes
Accepted

Please make my table perfect with long caption

I suggest giving some more air to the table by increasing the intercolumn space, otherwise the very short column headers make for too compact typesetting. Another improvement is avoiding vertical ...
egreg's user avatar
  • 1.1m
5 votes

equation vertical alignment in tabular, baseline is too low

arraystretch causes asymmetric stretching. This effect is more visible the higher is its factor. It's better to use struts to add vertical spacing in rows \documentclass{article} \usepackage{array,...
Celdor's user avatar
  • 7,568
5 votes

LuaLaTeX - tabularx - Why does this table not fit on the previous page?

Only a long comment about the philosophy of the solution: !h or b! is not an option, unfortunately, clear no-no from my tutor. The reason to float rules is avoid as far as possible bad document ...
Fran's user avatar
  • 77.4k
5 votes

vertical alignment of sum with substack

I suggest you replace the auto-sizing instructions \left and \right with \Bigl and \Bigr, respectively. Better yet, consider not using curly braces for the expression at hand. "Snugging up" ...
Mico's user avatar
  • 478k
5 votes
Accepted

Minipage environments are misaligned

I would use beamer columns: % !TeX TS-program = lualatex \documentclass[14pt]{beamer} % Presento style file \usepackage{config/presento} % custom command and packages \input{config/custom-command} ...
samcarter_is_at_topanswers.xyz's user avatar
5 votes

Minipage environments are misaligned

The image you show has the baseline of the first line of text on the left aligned with the basline of the image on the right. This means that both minipage are top aligned and have text and image as ...
David Carlisle's user avatar
5 votes

Minipage environments are misaligned

The reference point of the minipage on the right is the bottom of the picture. You can add \vspace*{...} to set a different reference point. In the first minipage it should be 0pt, in the second one ...
egreg's user avatar
  • 1.1m

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