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

6
votes
3answers
923 views

Vertically align the cell of a table with the baseline of surrounding text

I have a table like this: \begin{tabular}[b]{c} A \\ B \\ C \\ D \\ \end{tabular}E The code above places "D" and "E" on the same baseline, no matter what size any of the letters are. Without ...
10
votes
4answers
6k views

Aligning conditions in cases environment

I have a piecewise function with three "parts." I would like to have all three conditions aligned at the variable x. How do I achieve that? Here is the code I have so far: \[ f(x) = \begin{cases} ...
1
vote
1answer
220 views

xetexCV vertical alignment

I'm using Rob Oakes' xetexCV document class. Everything works fine except for the vertical alignment of the years. When there are two lines, the years are aligned to the bottom, I, however want them ...
3
votes
1answer
4k views

Vertical alignment problem with \arraystretch and m column definition

For some reason, in m{} columns, once \arraystretch pushes row height above the text height, the text ceases to be absolutely aligned. Instead, the first line is centered vertically and the rest fall ...
7
votes
1answer
8k views

Centering vertically in table cell

I'm new with LaTeX and I'm trying to make a table with the elements centered vertically and horizontally. I've searched for this question, it seems like most people were trying to do things a little ...
9
votes
1answer
4k views

vertically align different size images in a figure* environment

I have an figure* environment with the following \begin{figure*} \centerline { \subfloat[1]{...} \subfloat[2]{...} } \end{figure*} The images are different heights. How can I ...
4
votes
3answers
5k views

Centering cells of a tabular column using m{}

I want to use a tabular to list some headlines, that might be quite long or contain linebreaks. The first column is kind of an Index or Key for the second columns content, so i would like to (...
14
votes
1answer
478 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 ...
8
votes
2answers
5k views

Place four algorithms (algorithm2e) in a subfigure and arrange them in two rows and two columns

I want to arrange four algorithms set with the algorithm2e package in two rows and two columns, as shown in the figure below. I've tried the subfigure package and have also read several related ...
8
votes
1answer
29k views

Matrix equation (esp. row vectors)

I'd like to write the matrix equation A = (x y) B (x y)^T, where (x y)^T is written as a column vector and B is a 2x2 matrix written as such. I can (almost) do this by, for example, the following: A =...
4
votes
1answer
560 views

Aligning caption of subfigure with math environmenth to the bottom

I was trying to align the subcaption letter of a subfigure that contains a math environment using temporal boxes, to align it vertically to the biggest one. However, when I do it the subcaption letter ...
3
votes
1answer
1k views

Multiplying a length by a factor

I am trying to create a package that will use grid typesetting (in the humanities, so not much of a problem) but that should allow the user to freely set the \baselinestretch. I am using the memoir ...
17
votes
5answers
9k 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 ...
4
votes
1answer
298 views

How do I fix the vertical spacing in documents which go over one page?

When LaTeX is unable to fit content onto a page, it sometimes inserts a large amount of whitespace between the two elements that fit on the first page, rather than just leaving space at the bottom of ...
5
votes
3answers
460 views

Make different font sizes in a table align at top, not bottom

I have a situation similar as to this MWE: \documentclass{article} \usepackage{tabularx} \begin{document} \begin{table} \begin{tiny} \begin{tabularx}{\textwidth}{|>{\normalsize}X|X|X|} \hline Foo &...
4
votes
1answer
471 views

box aligned based on top border, but with dynamic width

I want to have a box, aligned based on top border. I can do this with minipage[t], but i would have to specify the width, which i do not want. What is thus the simplest way to have a top-aligned box, ...
6
votes
1answer
121 views

How to fix diferent position of the line (space between the line and a page number and paragraphs) in the header using \pagestyle{uheadings}

I have noticed that in the document I am working on the line in the header is changing position page to page. Basically there are two slightly (but notably) different vertical spaces between the line ...
15
votes
2answers
791 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} \begin{...
11
votes
2answers
5k views

How can I balance columns in the last page of a bibliography section?

I need to balance the heights of the last two columns of my ACM article that is typeset using sigplanconf.cls. This class file defines the following command: \newcommand{\balancecolumns}{% \vfill\...
5
votes
1answer
579 views

Spacing using minipage in theorem environment (ntheorem)

Consider the following example and notice the different vertical spacings between the theorem caption and the text. Is there a way to get the same spacing when using minipage as in the case of normal ...
8
votes
3answers
570 views

Clash between aligned environment and TikZ?

The following code mis-renders the multi-line label: \documentclass{article} \usepackage{tikz} \usepackage{amsmath} \begin{document} \begin{equation} \begin{aligned} \begin{tikzpicture} \node (A) at (...
6
votes
1answer
881 views

fancyhdr plus fontsize 12pt causes varying vertical alignment of sections

Looking at the example provided in Different headers for different chapters, I noticed something strange: The vertical alignment of sections is varying. I was able to strip the effect down to the ...
4
votes
1answer
1k views

Overfull vbox with scrbook and setspacing

The following MWE gives me a lot of badbox warnings Overfull \vbox (1.39674pt too high) has occurred while \output is active [] with always the same value of 1.39674pt. It seems to be related to the ...
13
votes
2answers
7k 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, ...
10
votes
5answers
8k views

When I use [shrink], I lose vertical centering. How do I get my stuff shrunk and centered?

I am creating a beamer slide with a table on it. This table is too big with the normal font size, so I am using the shrink command to try to make it smaller. shrink is working, however it is ...
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 ...
3
votes
1answer
2k views

Vertical alignment with nested tables

It's almost embarrassing to ask: How can I vertically align the contents of one column to the top beside a second column holding nested tables. Please have a look at the minimal working example: \...
1
vote
1answer
320 views

Conflict between the packages titlesec and marginnote

In the following code, the use of the package titlesec modifies dramatically the formatting based on the package marginnote. The package titlesec is needed so as to use this. Is there one possibility ...
8
votes
2answers
2k views

How to place two code snippets next to each other with minted?

The minted package for code highlighting comes with a float environment called listing. Now I would like to place two of this code listings next to each other, but I have no idea how to do this. I ...
10
votes
1answer
1k views

Vertically aligning a marginnote and a section title

In the following code, the marginnote is logically aligned to the lipsum text. I would like to align the marginnote to the title of the section. What's the trick to use ? % Source : http://tex....
27
votes
3answers
13k views

Aligning subplots in a pgfplots figure

I have the following figure (a very, very stripped down version of a figure I created using matlab2tikz) My problem is that the subplots are not aligned correctly due to the fact that the y axis ...
5
votes
1answer
506 views

Table/tabular problem: vertical centering of long text + increase the row height

I already checked this post in this site: Vertical centering of text within a table What I am asking is quite similar to that question: I want all the cells to be vertically centered. This can be ...
9
votes
2answers
877 views

How to get headings to be an integral number of lines high (using the memoir class)?

I use the memoir class and the \checkandfixthelayout command to calculate the \textheight so that an integral number of lines will fit. This works very well: But now I want to add a few section ...
8
votes
1answer
1k views

TikZ: vertically aligning text in nodeparts

I can't seem to vertically align text in different nodeparts of the same node. This MWE \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \begin{tikzpicture} \...
6
votes
1answer
767 views

How to calibrate memoir's \sloppybottom and \flushbottom behavior?

Memoir provides the command \sloppybottom which "lets TeX put an extra line at the bottom of a page to avoid a widow on the following page." [1] However it also seems to set \raggedbottom which is not ...
3
votes
2answers
1k views

Proper spacing using minipages, dealing with margins and succeding text

So I have this user defined function below. This gives me near optimal results. The code is supposed to make numbered subsections. Where the rest of the text is aligned below. Since these subsections ...
7
votes
1answer
1k views

How to omit vertical realignment when using cmidrule in different colors?

My question is similar to the one here How do I eliminate the vertical realignment when using arrayrulecolor with cmidrule? but can not be solved with the suggested answer (because the lines are ...
3
votes
2answers
365 views

Centering text in tables problems with colortabs

I am trying to produce a basic color table as shown below \documentclass{article} \usepackage{booktabs} \usepackage[dvipsnames*,svgnames]{xcolor} \usepackage{colortbl} \usepackage{array} \begin{...
18
votes
1answer
15k 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 ...
14
votes
6answers
2k 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 ...
1
vote
2answers
1k views

Question about tabular

I need some table in LaTeX. As you can see, my LaTeX code is following \setlength{\extrarowheight}{7.6pt} \begin{footnotesize} \begin{tabular}{l|m{7cm}} \hline \hline Workloads & Applications \\ ...
5
votes
2answers
572 views

how to typeset RTL document with two columns flush AND two-column footnotes

I'm working on a set of documents in Hebrew. My general workflow is I type reStructuredText, run it through rst2xetex and then typeset with XeLaTeX. What I can't figure out how to do is create a two-...
7
votes
2answers
287 views

Aligning the bottom of a picture and a chapter title

Consider the following example, where the chapter number is ginormous and put in a blue box: \documentclass[svgnames]{scrbook} \usepackage{titlesec} \usepackage{tocloft} \usepackage{tikz} \...
3
votes
1answer
588 views

Odd problem with spacing using memoir when switching from oneside to twoside

For reasons I won't bore anyone with, I being forced to change my document at the last minute from oneside to twoside using memoir. However, when I do, I suddenly get odd problems with spacing; the ...
4
votes
3answers
1k views

Vertically align text inside of a colorbox

I am quite new with TeX so I am not sure how to solve the following correctly and it would be more than great to get some hints. So I am trying to get a grey colorbox which spans over the whole page ...
8
votes
3answers
4k views

How to make a table with centered images?

On page 6 in this PDF is there a table with centred pictures in the right column. Does anyone know how to make such a table? I am using pdflatex.
4
votes
2answers
1k views

TikZ, multicolumn, and vertical spacing

My question is related to the vertical spacing of the objects in the page. I think that in my case TikZ can influence it. Here the MWE: \documentclass[12pt,letterpaper]{book} \usepackage{amsmath} \...
42
votes
3answers
21k views

Understanding minipages - aligning at top

I would like to be able to align two minipage at the top, without worrying about what is in the minipage. I am aware of the optional [t] parameter, but still have some confusion as to how this all ...
9
votes
1answer
3k views

How to prevent the paragraphs to spread out over the page?

I have a problem. I have several large equations within the text. And when LaTeX does not manage to put the equation on the same page and moves it to the next one, he spreads the paragraphs of the ...
5
votes
1answer
5k views

Easily aligning 'from' and 'to' address fields in LaTeX letters

When you write a letter in LaTeX, you can add your address with the \address block, while you have the possibility of adding the recipient address after the \begin{letter} statement as an extra ...