{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)

15
votes
2answers
723 views

How to center a typewriter (ttfamily) '+'

I would like to draw a circular TikZ node with + in its center, but font=\ttfamily moves it up. Why? How to solve it? \documentclass[border=3mm]{standalone} \usepackage{tikz} \begin{document} ...
15
votes
2answers
5k 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}% ...
15
votes
1answer
2k 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}) ...
15
votes
2answers
7k 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?
15
votes
1answer
5k views

Adjusting vertical alignment of underbraces

Is there a way to align multiple underbraces so that they sit on the same horizontal line? For example, the following code \[ \biggl( \underbrace{0,1}_{A}, \underbrace{\frac{1}{2},\frac{1}{3}}_{B} ...
15
votes
2answers
559 views

How to align `tcolorbox` at the top?

I want to align Some text with Lead Programmer like this: But the leftrulebox (a tcolorbox) inside the description environment doesn't align properly. The following code gives this: The code: ...
15
votes
1answer
3k 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 ...
15
votes
3answers
21k 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} ...
15
votes
2answers
606 views

Optional ornament

For chapters that end with a mostly empty page, I'd like to insert some form of ornament. The ornament should not be inserted if there is not enough room in the page. Is there some way of testing ...
14
votes
6answers
1k views

How to stack boxes like a vertical version of \mbox?

I would like a vertical equivalent to \mbox{} that somehow takes a sequence of boxes and stacks them on top of each other. I'd like the resulting width to be the width of the widest box, and I'd like ...
14
votes
5answers
826 views

Alignment in inline math

I want to enclose a tabular environment with a bracket, inside an enumerate environment, and be aligned to top. In the following example: \documentclass[a4paper]{article} \begin{document} ...
14
votes
2answers
5k views

How to correctly shrink the bullets of itemize

How can I shrink the bullets of itemize without change its positioning and the centering versus the items? My code below show that behaviour in fact the two item underneath have a bullet shifted down ...
14
votes
5answers
7k 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 ...
14
votes
2answers
30k views

Vertical alignment in tabular cells with variable height

I have the code: \documentclass{article} \usepackage[a4paper]{geometry} \usepackage{tabularx} \usepackage{lipsum} \begin{document} \begin{tabularx}{\textwidth}{ | X | c | } \hline \lipsum[1] ...
14
votes
2answers
17k views

Table rowspan and colspan

I need to create similar table using LaTeX: I have tried to use \tabular and \multicolumn, but every time I get something wrong. I want: Fixed width columns and fixed height rows; Centered cells ...
14
votes
2answers
525 views

Depth of the \times symbol

I just noticed an annoying discrepancy involving the \times symbol's depth. Read the below code and then try to guess what it should look like: \documentclass{article} \begin{document} \fbox{$A$} ...
14
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 ...
14
votes
2answers
3k views

Aligning enumerate labels to top of image?

I asked a question a while ago about vertically aligning enumerate labels to the top of table. Now I am having the same problem, but with images. Since my problem was solved in my previous thread, I ...
14
votes
3answers
5k 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
4answers
4k 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 ...
13
votes
2answers
4k 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 ...
13
votes
4answers
731 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 ...
13
votes
4answers
3k 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 ...
13
votes
2answers
1k views

Custom pagebreak in align equation

I got the following problem: Right now I am checking my equations, which are usually written in align. This looks great in most of the cases, but sometimes the pagebreaks are weird, ie there is a lot ...
13
votes
2answers
409 views

Vertically aligning minipages, subfigures, and subtables (not with baseline)

The goal My goal is to align side-by-side figures, tables, and text in minipages according to the top, middle and bottom of the largest such minipage. This makes it different (I believe) from the ...
13
votes
1answer
2k 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
3answers
5k 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 ...
12
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 ...
12
votes
3answers
7k views

Problem with TikZ and vertical alignment of text inside nodes

I have a problem in TikZ with the vertical alignment of text inside nodes. With a very minimal example like this: \usetikzlibrary{arrows,positioning,shapes.geometric} \begin{tikzpicture}[% ->, ...
12
votes
2answers
13k views

How to move a paragraph to the bottom of the page (without vspace)

I am looking to move a text paragraph of a few lines (like a disclaimer) at the bottom of a 2 page document. Each time I do that, I need to adjust that specific paragraph with the \vspace function. ...
12
votes
4answers
12k views

Placing Subfigures vertically

I want to use subfigures to place three figures like this: The following is the code I used: \begin{figure} \begin{tabular}{|c|c|} \hline \multirow{2}{*}{ ...
12
votes
2answers
562 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
1answer
8k 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: ...
12
votes
2answers
503 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 ...
12
votes
2answers
5k views

Two figures side-by-side with inequal height and aligned captions

I have an addition to this question: Two figures side by side. Suppose we have two pictures, making them of uneven height. I am looking for a way to not use subfig and align two figures side-by-side, ...
12
votes
1answer
271 views

Why is the \underbrace off the line?

I have the following problem with \underbrace: As you can see, the third underbrace and its comment are not in the line with the first two. Here is my code: \documentclass[a4paper,12pt]{article} ...
12
votes
2answers
2k 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
1answer
4k views

Consistent vertical spacing with tabu

In the following table I get some vertical space after the rows whose content is short but not after the row having a cell with long content. The problem is that I want to generate the report from ...
12
votes
1answer
111 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}} ...
12
votes
2answers
15k views

Include centered full page figure with no margins

I have a big figure that takes up a full page. I'd like to include it in my latex document on a separate page, centered horizontally and vertically. I managed to put it on a separate page (or it is ...
12
votes
1answer
17k views

Vertical alignment in 'tabular'

I have a problem with vertically aligning content in a tabular environment: \documentclass{article} \begin{document} \begin{tabular}{ p{2em} p{2em} } test & \begin{tabular}{l} s s s \\ s s s ...
12
votes
2answers
13k 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 ...
12
votes
1answer
433 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
4answers
3k 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 ...
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
2answers
481 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). ...
11
votes
3answers
19k views

Tabular, parbox, vertical alignment

What i want to achieve is really simple: I want to be able to align cell content at the top (which is the default behavior of tabular) while being able to manually break lines (and anything you could ...
11
votes
1answer
350 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
2answers
460 views

Sideways text with rule as table label

I've been trying to achieve the following vertical sidebar effect in LaTeX for my resume, but turns out it's far more difficult than I thought (created easily in InDesign): I've tried everything ...
11
votes
2answers
1k views

Vertically misaligned margin note

I'm trying to use a \marginnote along with a specified \parskip. However, I'm having an alignment issue. With the code in the group with the \parskip the margin note is misaligned with the text on the ...