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$ &...
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
56
votes
Vertically center text on a page
This did the job for me:
\pagebreak
\hspace{0pt}
\vfill
Centered text.
\vfill
\hspace{0pt}
\pagebreak
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
\...
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 ...
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 ...
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, ...
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} &
...
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{$\...
26
votes
Increase LaTeX table row height
Use \rule{0pt}{value} to change the single row height to value.
Source
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 ...
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 ...
Community wiki
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}
\...
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 \...
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 ...
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{...
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
...
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
...
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{...
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}...
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 ...
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 ...
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}
...
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
\...
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]{...
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{...
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 ...
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 \...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
vertical-alignment × 3665tables × 895
horizontal-alignment × 468
tikz-pgf × 293
spacing × 250
graphics × 210
align × 196
math-mode × 162
beamer × 157
minipage × 156
equations × 154
floats × 131
tabularx × 131
subfloats × 92
lists × 88
multirow × 88
amsmath × 83
longtable × 78
alignment × 76
boxes × 73
positioning × 70
enumerate × 68
itemize × 67
formatting × 65
multicol × 61