{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.
74
votes
3answers
6k views
\pagebreak vs \newpage
What's the difference? I know that \pagebreak can take an optional argument that specifies how much a page break is desired, but is there any difference if the optional argument is not used?
42
votes
4answers
3k views
What is the difference between 'fil' and 'fill'?
TeX provides the commands \vfil and \vfill (and their corresponding horizontal versions \hfil and \hfill).
These commands are actually defined as:
\vskip 0cm plus 1fil
\vskip 0cm plus 1fill
where ...
29
votes
5answers
12k views
How to vertically center two images next to each other?
How can I vertically center two images next to one another? Here is some example code:
\begin{minipage}[h]{6in}
\centering
\vspace*{.3in}~\\
\includegraphics[height=1.25in]{fig1.pdf}
...
23
votes
3answers
21k views
How to vertically-center the text of the cells?
I have a simple table as follows:
\begin{table*}
\centering
\begin{tabular}{|l|c|c|c|c|p{2in}|}
...
...
\end{tabular}
\caption{The factors the camera solver depends on to ...
22
votes
2answers
269 views
Two rules directly under each other
I'm trying to make two rules of different length directly under each other, something like:
--------------------
====================
Where = is a fatter line than -. The vertical space inbetween ...
21
votes
1answer
9k views
Positioning content at the top of a beamer slide (by default)
When I create beamer frame, the content is centred in the slide. How do I make the content move to the top of the slide by default?
20
votes
5answers
415 views
“Q” and “A” in margin - out of alignment
I have defined a command for a letter in the margin as follows (using marginnote because marginpar did not work at all):
\newcommand{\sideletter}[1]{\marginnote{\Huge\bf\sffamily\color{orange} #1}}
...
20
votes
3answers
4k views
How to get only one vertically centered equation number in align environment with two equations
sorry if this has been answered before, I couldn't find anything through search. I'm sure its a common problem though.
What I have are two equations with align and I want one single equation number ...
19
votes
2answers
2k views
How to define a figure size so that it consumes the rest of a page?
Sometimes I don't need to have a specific picture size, but for layout reasons I would like to scale the image so that the rest of the page is filled. How can I achieve that?
19
votes
2answers
14k views
19
votes
3answers
20k views
tabular vertical alignment to top?
I'm trying to create a simple tabular with two cells of text and two images below them like so:
\begin{tabular}[h]{ c | c}
\emph{Normal} & \emph{Cone} \\
...
18
votes
1answer
201 views
Flushbottom columns when \parskip has no stretchable glue
In the following example, the columns on page 1 and 3 "sit" perfectly on the frame, while on page 2 (with the large float) the columns end a bit above the frame. Does anyone have an idea what I could ...
17
votes
3answers
2k views
Dot Derivative Discrepancy
I am trying to typeset some higher-order time derivatives using the dot notation, and I've noticed something strange. The expressions
$\dot y + y = \cos(\dot y)$
$\ddot y + y = \cos(\dot y)$
give ...
17
votes
3answers
3k 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 ...
17
votes
1answer
4k views
How to modify columns/column environments so they resize automatically to the largest column ?
This question was originally a duplicate of How can I add vertical space to a beamercolorbox to make it align with another one?. The response to that question was to add a vertical space according to ...
16
votes
4answers
844 views
Sharing alignment between equations in two different items
In the following minimal example, I have two equations inside an itemize environment, with an item per equations. Each equation is defined in its own equation environment.
\documentclass{article}
...
16
votes
1answer
509 views
Vertical position of punctuation following fractions in display-style equations
Assuming that one wants punctuation in equations, what is the best way to adjusting the vertical position of the punctuation if it follows a fraction? I am using Palatino and Euler here (which I ...
15
votes
2answers
9k views
Vertically center cells of a table?
What is the easiest way to center align each row of table? I have a table column that contains an image and other cells in the same row contain text. I would like to know how to vertically center ...
15
votes
3answers
3k 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 ...
15
votes
4answers
14k views
Stable vertical alignment of columns in Beamer
In Beamer, I often use a two-column slide layout, picture on the left and text on the right. Sometimes the same picture is used on multiple slides, with the text on the right changing. I use the ...
15
votes
2answers
372 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
3answers
336 views
How do I set annotations on a facing page?
It's common to set an old play (e.g. Shakespeare) with annotations on the left page and reference information on the right. I don't want to do this for a play, but I would like to set a document with ...
14
votes
2answers
2k views
What is \null and when do we need to use it?
Up to now I don't understand well what \null actually is and when we need it. I have only known that it can be used to create hypothetical anchors as follows.
\documentclass{article}
...
14
votes
2answers
10k views
How can I get text underneath an underbrace?
I am looking to do something of the following:
To get text underneath the underbrace. Is it involving \stackrel or some sort of similar command?
14
votes
3answers
8k views
Shift title and author text up?
What is the best way to shift the title text 'up' in a LaTeX document compiled with pdftex? When I do this:
\documentclass[12pt,letterpaper, onecolumn]{article}
\setlength{\topmargin}{0in}
...
14
votes
3answers
1k views
Vertically asymmetric size variation for parentheses
One of the difficulties I have with writing formulas in LaTeX is that the standard sizing tools for the variable-size operators (parentheses, etc.) do not account for "high" symbols and "low" symbols ...
14
votes
2answers
420 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$} ...
13
votes
6answers
633 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 ...
13
votes
3answers
2k views
How can I make vfill to work without adding any text before?
Using \vfill between two texts works:
\newpage
bla
\vfill
blabla
but it doesn't work if there is no text before it:
\newpage
\vfill
blabla
How can this be achieved?
13
votes
1answer
2k views
Aligned equations inside of TikZ node.
How can I create a tree node with an aligned math equations inside?
\begin{align}
\end{align}
doesn't work
\begin{minipage}{100}
\begin{align}
...
\end{align}
\end{minipage}
Gives a lot ...
13
votes
1answer
433 views
Underline at the same level
I want to underline alpha's and beta's, but at the same level. I mean, I don't want
but . Maybe there is already a command that make it but I couldn't find it. The second image was obtained with the ...
13
votes
2answers
674 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 ...
13
votes
2answers
7k views
Aligning image and text on top, with minipages
I have an image (on the left) and a block of text (on the right), and I would like both to be aligned on their top. I am trying to use minipages for that:
\documentclass{article}
\begin{document}
...
12
votes
3answers
3k views
How to balance last page of two-column layout?
I create a document in two-column-layout with LaTeX (and Koma-Script, if that is relevant). The two-column-layout is defined in documentclass. The last page of an chapter fills the left column first - ...
12
votes
2answers
799 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
874 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 ...
12
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 ...
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
2k views
Vertical alignment of inline images
Images appearing inline aren't always ideally placed relative to the baseline and risers of the text itself, so I frequently find myself doing manual adjustment, by eye, using \raisebox{}{} with a ...
12
votes
2answers
463 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 ...
11
votes
2answers
719 views
How do I force TeX to completely use the 1st column?
How do I force TeX to completely use the 1st column before writing to the second column?
Right now I dont have enough content to fill one whole page. So the left and right columns are equally filled, ...
11
votes
4answers
925 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
2k 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}%
...
11
votes
1answer
201 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
284 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
2answers
2k 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?
11
votes
1answer
980 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 ...
11
votes
1answer
6k 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 ...
10
votes
5answers
2k 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 ...
10
votes
5answers
2k views
Vertical alignment of align* in enumerate
Related (but not the same):
Align number from enumerate with equation
Displaying an equation in a list
Earlier today I asked a question about aligning equations in an enumerate environment ...
