{vertical-alignment} is about aligning document elements vertically, e.g. using \raggedbottom or \flushbottom or adjusting the vertical position of several equation or table components. If your question is generally about (vertical) white space, use {spacing} instead.

learn more… | top users | synonyms (2)

13
votes
3answers
6k views

Make two figures aligned at top

I am inserting two graphs (of different size) in the following way: \begin{figure}[H] \begin{center} \includegraphics[scale=0.5]{graph1.eps} \includegraphics[scale=0.3]{graph2.eps} ...
13
votes
2answers
4k views

How to make an exact vertically centered object in a page?

Note: the red lines have the same length. \documentclass{minimal} \usepackage[showframe,paperwidth=4cm,paperheight=4cm,margin=1cm]{geometry} \begin{document} % \vspace*{\fill}% \fbox{test}% ...
13
votes
3answers
12k views

beamer: Top-aligning columns within a top-aligned frame

According to section 3.10 of the beamer manual, the t option top-aligns either every frame (when used as a class option) or a single frame (when used as optional argument of a frame environment). ...
13
votes
2answers
5k views

Vertically center text and image in one line

I need to place an icon and text behind each other on one line. The icon is higher than a single text line, and would like to have the icon and text center aligned. How do I do that?
13
votes
3answers
4k views

Vertically align subfloats at the top while having subcaptions vertically aligned below the subfloats

I have a float with two subfloats: I want the circles to be vertically aligned from their top such as in the following figure. But I don't want the subcaptions to be placed above the subfloats but ...
13
votes
1answer
3k views

Inline TikZ - vertical centering

If I inline a bounded line segment like this: the distance \tikz{ \draw [|-|] (0,0) -- (5ex,0); } overarching the activities how can I make the line appear vertically centered on the line ...
13
votes
1answer
2k views

Why does \vspace*{0pt} add vertical space?

I'm trying to format the title of the table of contents using the tocloft package. It inserts code that looks like the following. \par \vspace*{\cftbeforetoctitleskip}% % code to typeset ...
13
votes
1answer
1k views

How can I set the vertical margin of my chapter headings?

I currently don't like the typesetting of a document. In my two sided document, I want that the chapter headings not have a vertical space before their appearance. The text on the second page should ...
13
votes
1answer
1k views

Align marginpar with beginning of paragraph

Is there a way to align a marginpar with the beginning of a paragraph, without cluttering the text of the paragraph? If I do the following, the marginpar lines up with the last line of the first ...
12
votes
2answers
482 views

Inconsistent behavior of boxes in amsmath's `gather`.

Recently I was working on a package (ytableau) and had a strange experience with the gather environment in amsmath. Namely, it screws with \vtop and, seemingly, with boxes that I reserve before ...
12
votes
4answers
1k views

Vertical double asterisk that aligns well with the double dagger

The LaTeX text footnote symbol sequence begins with ∗ † ‡ § ¶ ∥. I'd like to define a vertical double asterisk ⁑ (\textastdbl) so that I can insert it into the sequence: * ⁑ † ‡ § ¶ ∥ (note: actual ...
12
votes
2answers
1k views

\addvspace can't replace \vspace

I want to replace \vspace with \addvspace in a command. When so doing, I get obtuse "something's wrong--perhaps a missing \item." errors. I'd appreciate an explanation of why this happens and how ...
12
votes
4answers
2k views

In beamer class, how do I remove the additional vertical space before an itemize environment?

On a beamer slide, I want to produce something like I use the following LaTeX code, which works well in LaTeX with the article class. \begin{minipage}[t]{1.4cm} Questions: \end{minipage}\nobreak ...
12
votes
1answer
72 views

Tight connection of \vbox es

I don't understand why TeX put a thin whitespace between my two vertical boxes: \documentclass{article} \begin{document} \vbox to 1cm {\rule{1cm}{1cm}} \vbox to 1cm {\rule{1cm}{1cm}} ...
11
votes
5answers
5k views

How to make a tikz node, top-aligned with the rest of the text?

If I write before-text \begin{minipage}[t]{5cm} line1\\line2\\line3\\ \end{minipage} after-text I get a box, whose top is aligned to the top of "before text". I would like to have the same, when ...
11
votes
4answers
1k views

How to vertically center a content spanning multiple rows without using nested tables?

I don't want to use nested tables. My current code produces the following result. And I want to get the following output. And the minimal working example: \documentclass{article} ...
11
votes
4answers
3k views

Spread bullet points across block in slide using beamer

I'm using beamer to create some slides for a presentation. I've got a block containing a bulleted list. The list only has three items, and all three items are bunched up in a small block at the top of ...
11
votes
2answers
7k views

\flushbottom vs \raggedbottom

I use \documentclass{book}. If I use \flushbottom, I get messages of the sort Underfull \vbox (badness 10000) has occurred while \output is active []. See question. These messages disappear when I ...
11
votes
4answers
2k views

Aligning an enumeration item to the top of a tikzpicture

I've drawn a tree using pgf/tikz and am trying to place it in an enumerated list. A snippet of my complete code is as follows: \subsection*{Problem 2} \begin{enumerate}[1)] \item Max heap \item ...
11
votes
1answer
299 views

Consistent cover design regardless of inner pages

This is a series of books, the margins, page sizes are all identical. Depends on the content, the design of inner pages are slightly different, i.e. different type sizes, leading, etc. The question ...
11
votes
1answer
6k views

p,m and b columns in tables

I wonder why p columns are aligned at the bottom and b columns aligned at the top? created with this code: \begin{tabular}{|p{0.3\linewidth}|m{0.3\linewidth}|b{0.3\linewidth}|} \hline \centering ...
11
votes
2answers
407 views

Center and yet align figures on opposite pages

This is an extension of the question "How to ensure that 2 couples of figures are on 2 facing pages?". I not only want to ensure that the figures are on facing pages but also that the one with the ...
11
votes
1answer
207 views

Alignment rules

I find myself quite frequently in the need to check whether some elements on my page are aligned exactly as intended. As a result, I usually end up magnifying the output 400% and using a rule over my ...
11
votes
1answer
10k views

Align minipage to baseline of first or last line inside minipage?

The minipage environment has options for making the top, bottom, or center of the minipage box line up with the baseline of the surrounding text. Is there a way to make it line up to the baseline of ...
11
votes
1answer
379 views

Use of \@texttop and \@textbottom for vertical positioning

There are two macros defined in the LaTeX kernel named \@texttop and its opposite \@textbottom. The first is a bit of a mystery command in that in the source it is let to \relax. There is a note that ...
11
votes
3answers
14k views

Problem with Table Vertical Alignment

I want a table whose first column is aligned top, second column is aligned middle, and third column is aligned bottom; like this: I wrote the following code: \documentclass{article} ...
11
votes
1answer
7k views

How to center vertically content of the table?

I have this table: \usepackage{array} \newcolumntype{x}[1]{>{\centering\arraybackslash\hspace{0pt}}p{#1}} \begin{table}[ht]\footnotesize \centering \begin{tabular*}{0.95\textwidth ...
11
votes
3answers
4k views

How to vertically align headers/footers in fancyhdr package?

I'm using fancyhdrpackage for headings and footers. I have defined left-header as a big image, and I want to vertically align (to the top or to the center, the default is to the bottom) the text from ...
11
votes
1answer
433 views

Two-column layout with thick vertical rule in ConTeXt

Background I would like to add a thick rule centered between two columns. Example Code A minimum working example that illustrates the issue: \setupcolors[state=start] ...
11
votes
3answers
3k views

Line up captions on side by side figures

I want to place two (or more) figures with side by side. The figures are independent, so need separate captions, with no overall caption for the two. I know how to do this with minipages within a ...
10
votes
4answers
2k views

Vertically centered horizontal rule filling the rest of a line?

I'd like to have a horizontal line extending from the end of the text on a line to the right margin. So far I've found \hrulefill and \leaders\hrule\hfill, but these draw a line that's flush with the ...
10
votes
3answers
214 views

Aligning cases conditions from multiple nesting levels

\begin{dmath*} y_{ic}[n] = \begin{dcases} y_0 + x_0 - x_0 (1 - k_2)^n & k_1 = 0 \\ k_5 + \left( y_0 - k_5 \right) (1 - k_1)^n + \begin{dcases} ...
10
votes
4answers
187 views

putting two indices and exponents side to side

I did not find the answer to my following question on the web. I apologize in advance if this question has already been answered somewhere. I would like to write a matrix with the two subscripts and ...
10
votes
3answers
278 views

Move tabular entry to bottom of row

How do I get the last column text to be at the bottom of the row? That is I want the XXX to be aligned with the line containing the arrow. I tried playing around with \multirow{3}{-3ex}{XXX}, but ...
10
votes
2answers
262 views

\pagebreak[number] only breaks with number = 4

I wanted to try out encouraging of pagebreak using \pagebreak[number]. As far for now it only breaks the page when I define \pagebreak[4] and only then (it won't work on any other circumstances). ...
10
votes
4answers
178 views

Vertical alignment of degree unit and other elements in table

I am trying to improve the appearance of the below table such that: The set union symbols \cup align vertically with the commas from the 2nd and last rows The middle column angle values are still ...
10
votes
3answers
821 views

Vertical alignment of fonts of different sizes on same line

In XeTeX, if I have a line with two font sizes, how can I arrange to have the smaller font aligned to either the center or top of the line? e.g. ...
10
votes
2answers
1k views

Uneven text distribution with two-column layout

I am comfortable with creating basic LaTeX documents and making minor modifications to templates I can find online, but not much more. The Oxford Bioinformatics journal has an awesome template here ...
10
votes
1answer
6k views

Beamer background image centered

I'm trying to use an image as a background for Beamer presentation according to this post. However, I do not want the image spanning the entire background. Thus, I'm doing something like: ...
10
votes
3answers
156 views

How to correctly pad and align a displaystyle inline equation in a table

I've got the following code in a document and am at a loss trying to figure out how I can correctly pad the cells and/or align the equations correctly. \begin{table}[h] ...
10
votes
3answers
162 views

How to align the conditions in a hierarchical structure?

I know how to align the conditions on the left side of the conditions with either aligned, cases, or array if there is only one level. However, I can't figure out how to do so in a hierarchical ...
10
votes
2answers
476 views

Position margin notes relative to left margin in plain TeX

I want to add margin notes in the Tufte style to my Plain TeX document. (I'm using eplain, if that matters.) I know that if I were using LaTeX I could just use tufte-latex, but as a thorough ...
10
votes
2answers
325 views

Why is picture and matrix not drawn at the same height

I'm trying to put a adjacency matrix beneath a graph using subfloat. The graph is drawn with tikz. No matter what I do, the matrix is put below the graph as shown here: The code is here: ...
10
votes
1answer
939 views

Equations inside enumerate aligned on item's number

If I type \begin{enumerate} \item \begin{align*} eqn 1 eqn 2 \end{align*} \end{enumerate} the label will appear on the first lines and the equations will ...
10
votes
2answers
2k views

How to put table and PNG next to each other in the same figure?

How can I put a table and a PNG (using \includegraphics) next to each other in the same figure, in the following way? +----+ +-----+ |png | |table| |png | |table| |png | ...
10
votes
2answers
260 views

How do you align equations parts vertically?

I have read many other solutions but this situation seems unique. \documentclass{exam} \usepackage{multicol} \usepackage{amsmath} \begin{document} \begin{questions} \question Simplify the following: ...
10
votes
1answer
597 views

How to vertically align underbraces

I am trying to balance underbraces in the equation below, how can I ensure that both underbraces at the same depth? \begin{equation} y = \underbrace{ \left [ x^2 + r^2 (a^2+\frac{a^{0.3}}{b}) ...
10
votes
4answers
190 views

A line of text with proper positioning but consuming no space?

Welcome to part 4 in a series of questions about me trying to improve my crazy layout! I'm using tabu to create a table with a central heading, and two small blocks of text on the left and right ...
10
votes
2answers
4k views

How can I vertically align a beamercolorbox?

I am trying to customize a beamer theme. In the footline, information such as author, title, date ... are in several beamercolorboxes. \hbox{% ...
10
votes
2answers
9k views

tikzpicture alignment and centering

I have several very similar images except some have some extra graphics that enlarge them slightly. This causes some pictures to be offset and not aligned visually when it's clear they should be. How ...