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

Increase LaTeX table row height

Super Simple Solution I faced similar problem, & found a (not so conventional but) simple way to solve it. Wish, it will help others too. I had a table like this- \begin{tabular}{c|ccc} $x$ &...
Minhas Kamal's user avatar
  • 1,241
72 votes

Putting text at the bottom of the page

The following worked for me: (note: I'm simply reposting a comment above as an answer) Some random text in the page \vspace*{\fill} Text that will now be at the bottom of the page
Anton's user avatar
  • 821
56 votes

Vertically center text on a page

This did the job for me: \pagebreak \hspace{0pt} \vfill Centered text. \vfill \hspace{0pt} \pagebreak
Bora M. Alper's user avatar
55 votes

How to vertically center two images next to each other?

The graphbox package adds an "align" option to the \includegraphics command that makes this very easy: \usepackage{graphicx} \usepackage{graphbox} [...] \begin{minipage}{6in} \centering \...
Grodriguez's user avatar
  • 1,055
45 votes
Accepted

What does \smash do, and where is it documented?

As the name implies, \smash takes its contents and prints it as if its height and depth were zero. The definition in LaTeX is carried over from the one in plain TeX, with a slight difference; I'll ...
egreg's user avatar
  • 1.1m
33 votes

Vertical alignment of side-by-side minipages

The reason is that the [t] means align the minipage with the first (top) baseline. The baseline for the image is under the image, which is perfectly aligned with the first baseline of the text. I see ...
StefanH's user avatar
  • 13.6k
31 votes
Accepted

Subfloat vertical alignment in latex

Sub-float package assumes that it is important to vertically align the captions, and therefore typically relies on a baseline alignment of the sub-float content. Using adjustbox's valign=t option, ...
Werner's user avatar
  • 589k
27 votes

How to vertically-center the text of the cells?

Putting a tabular in the cell of a tabular centers the content of the cell horizontally and vertically. \begin{tabular}{|l|c|c|} \hline \begin{tabular}{l} text in cell 1 \end{tabular} & ...
Anthony Scemama's user avatar
27 votes

How to correctly shrink the bullets of itemize

The smaller symbol can be centered around the original math axis via \vcenter: \documentclass{book} \begin{document} \begin{itemize} \item One \item Two \end{itemize} \renewcommand\labelitemi{$\...
Heiko Oberdiek's user avatar
26 votes

Increase LaTeX table row height

Use \rule{0pt}{value} to change the single row height to value. Source
vstepaniuk's user avatar
19 votes
Accepted

vertical alignment of text in tikz node

text height and text depth specify the vertical dimensions of the text you give explicitly. As a result TikZ thinks the node's text has exactly that height and draws its box like that. You can use ...
Skillmon's user avatar
  • 54k
18 votes

Align text in minipage at same height

Just to highlight the jdods user remark in the comments to David Carlisle's solution: Although the solution given by user David Carlisle is fully functional for various cases, there are some cases ...
18 votes
Accepted

How to vertically AND left-align a cell with \makecell?

Just don't add a comma between the alignment: \documentclass[12pt]{article} \usepackage{makecell} \usepackage{tabu, booktabs} \begin{document} \begin{table} \begin{tabu} to \textwidth {lXX} \...
Bernard's user avatar
  • 269k
18 votes
Accepted

Spacing difference when using boxes

I think it would probably be useful to understand how TeX normally inserts vertical space between lines/boxes. This will make it clear why this spacing is different when you wrap your paragraphs in a \...
Circumscribe's user avatar
  • 10.6k
17 votes

How to vertically-center the text of the cells?

I will replicate @xport's answer with my new LaTeX3 package tabularray. It is much easier while the images are still exactly vertically centered using this method. Specifically, the values m or h are ...
L.J.R.'s user avatar
  • 9,956
17 votes

crosshair in the middle of a page

You can use eso-pic to place content in the ForeGround in the centre of every page: \documentclass{article} \usepackage{eso-pic,xcolor,lipsum} \AddToShipoutPictureFG{% \AtPageCenter{% \color{...
Werner's user avatar
  • 589k
17 votes

What does \smash do, and where is it documented?

\smash is a macro defined as \relax \ifmmode \def \next {\mathpalette \mathsm@sh }\else \let \next \makesm@sh \fi \next and \mathsm@sh is defined as: \setbox \z@ \hbox {$\m@th #1{#2}$}\finsm@sh ...
Alan Munn's user avatar
  • 210k
16 votes

Vertical alignment in tabular cells with variable height

Another way, using a minipage environment instead of a tabularx package: \documentclass{article} \usepackage{lipsum} \usepackage[a4paper]{geometry} \begin{document} \begin{tabular}{|l|c|} \hline ...
Mike T's user avatar
  • 503
16 votes
Accepted

Wrap figure vertical alignment of text

This is governed by the \intextsep length. You can set it to zero to avoid the empty space above and below the wrapfig environment: \documentclass[12pt]{article} \usepackage{graphicx} \usepackage{...
alpenwasser's user avatar
  • 2,415
16 votes

Vertical alignment of side-by-side minipages

You don't really need the minipage around the image \documentclass{article} \usepackage{lipsum} \usepackage[export]{adjustbox} \usepackage{graphicx} \begin{document} \begin{minipage}[t]{.6\linewidth}...
David Carlisle's user avatar
15 votes
Accepted

Top alignment in array environment

For each of the three inner array environments, you need to change \begin{array}{|l|l|l|} to \begin{array}[t]{|l|l|l|} Adding the [t] positioning specifier to the outer array doesn't hurt, but it ...
Mico's user avatar
  • 478k
15 votes
Accepted

KOMA-Script book too large bottom margin

What you should do really depends on what you want to do. The only thing that is somewhat universal is that a line of text should not be too long. This ensures that readers can jump from the end of a ...
schtandard's user avatar
  • 13.9k
14 votes

Two itemized lists side by side

One solution with multicol \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[french]{babel} \usepackage{multicol} \begin{document} \begin{multicols}{2} ...
rpapa's user avatar
  • 11.9k
14 votes
Accepted

Place a $\star$ over a letter as an accent

Some low level TeX is the easiest way: \documentclass{article} \makeatletter \newcommand{\generic}{\textsf{Gener\istar c}} \newcommand{\istar}{% \leavevmode \vbox{% \offinterlineskip \...
egreg's user avatar
  • 1.1m
14 votes
Accepted

Align figures to top using minipage environment

You have two ways: one with minipages, one without them. \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage[left=2cm,right=2cm,top=1.5cm,bottom=1.5cm]{...
egreg's user avatar
  • 1.1m
14 votes
Accepted

Vertically centering symbols and graphics inside math formulas

In math-mode, you can easily vertically center a picture using \vcenter{\hbox{..}}. \documentclass{article} \usepackage{mathtools} \usepackage{unicode-math} \usepackage{fontspec} %\setmainfont{...
AboAmmar's user avatar
  • 45.9k
13 votes
Accepted

Subcaption: Vertical alignment of two images of different vertical size

You can following the same type of precedures discussed in Subcaption vertical alignment and Vertically align different size images in a figure* environment. That is, capture the size of the larger ...
Werner's user avatar
  • 589k
13 votes
Accepted

Absolute value size! (\lvert doesn't scale)

You can scale then with \left\lvert and \right\rvert, just as with parentheses. f_{3,2} = \left(\sqrt{13} - 2 - \left\lvert \frac{\sqrt{13}}{6} + 2 - 2\sqrt{7}\left(1 + \delta V\right) \right\rvert \...
Arun Debray's user avatar
  • 7,066

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