Skip to main content
122 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,331
64 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,179
64 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
47 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
38 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.9k
37 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
  • 11.3k
30 votes

Increase LaTeX table row height

Use \rule{0pt}{value} to change the single row height to value. Source
vstepaniuk's user avatar
29 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
28 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 ...
28 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
22 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
  • 273k
21 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
  • 61.6k
19 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.9k
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
  • 607k
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
  • 220k
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,455
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
  • 515k
15 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
  • 46.7k
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
  • 15.4k
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
13 votes
Accepted

\raggedbottom in book. Is it right way?

The normal layout, from a typographical point of view, should be \flushbottom. This makes the last line of each page be at exactly the same place on the sheet of paper, and it is the default in LaTeX....
Bernard's user avatar
  • 273k
12 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⟩} ......
Accident2ly's user avatar
12 votes
Accepted

Vertical alignment of glyph

One can raise the ornaments using a \vcenter{\hbox{...}} approach. That way, the ornaments will be placed on the (implicit) math axis. A couple of style-related comments: (i) If you provide this type ...
Mico's user avatar
  • 515k
12 votes

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

This answer attempts to address @BenCrowell's desire for examples of how smash can affect the output. As comments have indicated, it is height and depth, not width, that is affected by \smash. What ...
Steven B. Segletes's user avatar
12 votes
Accepted

Tikzpicture with remember picture and overlay inserting vertical space

The problem The problem is, like in the questions you link to, that using TikZ switches TeX from vertical to horizontal mode. So if your document starts with a TikZ picture, this picture will be part ...
Circumscribe's user avatar
  • 10.9k
12 votes
Accepted

Relationship between strut and baselineskip

The height of the whole \strut is \baselineskip, however it is lowered by 0.3\baselineskip form the baseline. Its depth plus its height totals \baselineskip: \documentclass{article} \begin{document} \...
Phelype Oleinik's user avatar

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