{spacing} is about both horizontal and vertical white space, e.g. space between letters or words, or space between paragraphs. For adjusting the space between the lines of a document, use {line-spacing} or -- if your question is specifically about the package of the same name -- {setspace}.

learn more… | top users | synonyms (2)

24
votes
1answer
14k views

How can I modify vertical space between figure and caption?

\documentclass{article} \usepackage[draft]{graphicx} \begin{document} \begin{figure} \centering \setlength\fboxsep{124pt} \setlength\fboxrule{1pt} \fbox{\includegraphics{dummy}} \caption{Dummy ...
24
votes
2answers
4k views

Why does vfill not work inside a beamer column?

I recently tried to set up a quartered page layout in beamer (separate question might follow) and \vfill failed in a column environment. Minimal example: \documentclass{beamer} \begin{document} ...
18
votes
2answers
730 views

What is the right way to use of non-breakable space before math expressions?

I have seen LaTeX code that puts a ~ between every math expression and the text preceding it, does not use ~ in this manner at all, and uses a ~ in this way if and only if the math expression ...
17
votes
4answers
7k views

What is the right way to use the `\!` spacing command?

I have noticed that I hardly ever use the \negthinspace command \!. This is because I don't know how to use it properly (I do use other spacing commands quite a bit, because I can better understand ...
25
votes
2answers
1k views

Two rules directly under each other

I'm trying to make two rules of different length (fatness) directly under each other, something like: -------------------- ==================== Where = is a fatter line than -. The vertical space ...
21
votes
2answers
391 views

When to use \, { } or ~ to prohibit gobbling of a space following a macro

There are various ways to ensure that a space after a macro is not gobbled and wondering how to decide which one to use. Are there cases where it matters which solution is used. ...
21
votes
3answers
2k views

biblatex: Putting thin spaces between initials

This question led to a new feature in a package: biblatex Robert Bringhurst, The Elements of Typographic Style, rule 2.1.5 states "Add little or no space within strings of initials." If ...
15
votes
3answers
10k views

Distance between chapter title and text

In my scrreprt I've changed distance between paragraphs with \setlength{\parskip}{9pt}. But \parskip changes also distance between chapter title and the paragraph. How can I change distance between ...
13
votes
2answers
9k views

How to get less spacing in math mode

LaTeX commands like this: Here again, four different simulations are run on networks of size $C^{G} = 25 \times\ 25 = 625$, $C^{G} = 50 \times\ 50 = 2500$, $C^{G} = 250 \times\ 250 = 62500$, and ...
13
votes
2answers
6k views

Too much space at the top of a beamer block when using multilined math environment

I would like to place two math lines in a beamer block, as two separately centered lines. I know that I could do this using two distinct equation environments, but it would be nicer to use a single ...
8
votes
2answers
1k views

\mathrel conflict with \left,\right,\middle

I refer to this question and particularly to this answer. I defined \set by \usepackage{mathtools} ... \DeclarePairedDelimiterX\set[2]{\{}{\}}{#1 \mathrel{\delimsize|} #2} where ...
19
votes
3answers
18k views

Reduce spacing in bibliography using biblatex

How can you control (in my case reduce) the spacing of the bibliography in biblatex? I used to use \begin{spacing}{0.9} \bibliographystyle{plain} \bibliography{refs} \end{spacing} and ...
18
votes
1answer
24k views

How to use the parskip package? (space in between paragraphs)

Sorry, because I think it's a many times asked topic. But I don't find an example which help me to understand how to create a white space between paragraphs. I think parskip is the package I need to ...
17
votes
4answers
578 views

Microtype and quote environment leads to different indent of first line

When the microtype package is loaded a quote environment which starts with punctuation marks is inconsistent "indented". The first line in the following minimal example is unaffected, i.e. at the same ...
10
votes
2answers
5k views

Proper way of vertical spacing before/after environments

I am trying to typeset my thesis. I have to put predefined vertical space before and after some specific environments like equation and table. Since there are many instances of these environments I do ...
7
votes
1answer
2k views

List of figures: numbers overlap image caption

I have many images in a part of my document, now the list of figures numbers collide with its respective image caption as seen below. There would be enough space to move the text a bit more to the ...
7
votes
1answer
3k views

Punctuation in equations

My document will contain a lot of equations, and as usual in that case I would like to use "punctuation" in the equations, like commas, colons, periods/full stops, semicolons, etc. Is there a special ...
4
votes
2answers
506 views

Reduce the space between a quotation and a title

When I use the quotation environment at the start of a section I get too much space between the title and the start of the quotation. How to modify spacing around quotation environment? has ways to ...
16
votes
3answers
2k views

Fixed-width interword space

I would like to typeset post--World War II with what Adobe InDesign calls a "quarter space". The en-dash is there to be wider than a normal space, to clarify the constituent structure ([post-[[World ...
14
votes
1answer
2k views

Abbreviations and spacing

I'm sure this is a pretty standard questions that's been asked (and answered!) a hundered times before, so apologies for boring people. In LaTeX, I'd like to write a macro for abbreviations, such as, ...
13
votes
2answers
1k views

vspace before itemize in a Table cell, tabular vs longtable

In the following MWE, one sees the difference between tabular and longtable, with respect to the vertical space before an itemize, inside a cell : \documentclass[12pt]{article} ...
12
votes
5answers
2k views

Best practice for typesetting quantifiers?

When I work with quantifiers I noted that are very close to the other symbols and the result does not look good, for example $\exists a\in\mathbb{R}\exists b\in\mathbb{R}\forall c\in\mathbb{R}\forall ...
12
votes
1answer
2k views

How to type specifically on this part of the page?

I want to type my name in block capitals and in italics in the space highlighted in the blackbox, but I can't seem to be able to. Everything else is fine with the cover letter, I just need to type my ...
12
votes
3answers
7k views

How to increase the spacing between equations in “gather”?

Is there a way to consistently increase the vertical spacing between equation lines in a gather (or gather*) environment from amsmath? Specifically, I want to produce something like \begin{gather*} ...
11
votes
2answers
2k views

Oversized \underbrace's label causes unwanted spacing

Consider this: \left( x-1 \right) \underbrace{ \left( ? \right) }_{ \text{what is this?} } The label is longer than the braced portion, which causes unwanted space between the parentheses. Is ...
10
votes
3answers
420 views

Adjust environments's behaviour when nested

I would like to define an environment which behaves differently when it is nested. This environment should ignore spaces at the begin and end of the environment. I have this working as I desire when ...
8
votes
2answers
433 views

How can I use color in a mathematical expression without losing horizontal spacing?

How can I use color in a mathematical expression without losing horizontal spacing? \documentclass{article} \usepackage{xcolor} \definecolor{red}{HTML}{dd0000} \begin{document} \[3+(-5)-2+3\] ...
8
votes
4answers
1k views

Brace and text in side margin

Within a text, I would like to emphasize one or two paragraphs by placing a curly brace in the left side margin, and next to it some short text vertically centred around the brace's centre. The ...
7
votes
1answer
176 views

How to remove the unwanted space on the left side of the following gather*?

\documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath} \begin{document} \abovedisplayskip=0pt\relax \begin{gather*} 6x^2-30x+36=0\\ 6(x^2-5x+6)=0\\ 6(x-2)(x-3)=0\\ x-2=0 \quad ...
7
votes
1answer
198 views

How to automatically add \! in subscripts?

This code \documentclass{article} \usepackage{fouriernc} \begin{document} $a_1$ $a_{\!1}$ \end{document} produces this output: I like the spacing on the lower one much more. Is there a way to ...
7
votes
1answer
3k views

Problem copying text from pdf - spaces being stripped

I have the following minimal working example: \documentclass{book} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \begin{document} é canção \end{document} I need to use the utf8 argument ...
6
votes
1answer
235 views

How to circumvent a late \pagetotal reset to 0pt?

Below example demonstrates at the beginning of each paragraph how \pagetotal is not always reset to 0pt at the beginning of the page. This appears to interfere with my attempt to automatically clear a ...
3
votes
1answer
141 views

Mark portions of text without affecting spacing

I would like to mark portions of my text that requires special attention during the review process. This marking won't be in the final document, so would like to be able to add these marks without ...
2
votes
1answer
195 views

How to define different spaces below float and non float listing?

I am using listings from the listings-package. I'm having a problem with spaces below the listings. I use both, float- with h and non-float listings. The problem now is, that the spaces below the ...
20
votes
4answers
581 views

It doesn't hyphenate words ending with “—”

UPDATE Well. After a while, I decided to see again about this “problem”, and just discovered that in pdfLaTeX, using \usepackage[utf8]{inputenc} and the — (the unicode —, not the ligature ---) it ...
14
votes
1answer
8k views

How to decrease spacing before chapter title?

I want to decrease the vertical space between the top of the page and the chapter heading. I have tried to follow the instructions for titlesec but I am not successful. I have tried the following two ...
14
votes
2answers
1k views

Tikzpicture with overlay takes up space

Consider this MWE: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[remember picture,overlay] \node [circle, fill=red!90!black, minimum width=15em] at (current ...
14
votes
2answers
779 views

Is it possible to have a “real” \belowdisplayshortskip?

I think this is a tough one. Have you ever wondered why TeX sometimes produces vertical spacing around equations that is far from satisfactory? An example: \documentclass{article} ...
12
votes
1answer
5k views

Question about spacing \hspace and \vspace

I have been using \hspace and \vspace in my latex documents lately. I was surprised when \hspace{1em} didn't work and found out that I needed to use \hspace*{1em} to force latex to put the space ...
12
votes
3answers
762 views

Why don't I get any space after \thepage?

The code \thepage of yields the output 3of. I can fix it by writing \thepage~of, but what causes this in the first place? I can't imagine when it would be useful.
11
votes
1answer
4k views

displaystyle, dfrac, dcases

Am I correct in saying that the dcases environment replaces \frac with \dfrac? The replacement only occurs at the outer-most level of \frac, so if I have \documentclass{article} ...
11
votes
1answer
22k views

underfull \hbox (badness 10000) in paragraph

Why do I get the message: Underfull \hbox (badness 10000) in paragraph at lines 107--108 I want a blank line between the problem name and the table, but if I use \\ or \newline along with a ...
11
votes
4answers
2k views

Displaying pinyin over Chinese characters, without impacting word spacing

I want to display pinyin (romanized form) over Chinese characters. However, the two methods I know (using stackrel or tabular both change the spacing between characters. This demonstrates the problem: ...
10
votes
2answers
1k views

Exchange meaning of : and \colon

I usually use the colon symbol : to denote maps. For set syntax there is the braket package. So as the spacing of : is not appropriate, I want it to behave like \colon. I tried ...
9
votes
4answers
165 views

Configurable spacing after \dots

LaTeX adds some space after the ellipsis \textellipsis. This is enhanced by ellipsis package, which only adds space before certain characters (and also gives the option to configure “easily” the ...
8
votes
2answers
844 views

Remove spacing between per-chapter figures in LoF

When I'm generating a List of Figures in my project, all figures are grouped by chapter. I would like to have the whole list without any additional new lines between different chapters. How it looks ...
8
votes
1answer
925 views

listings bug: space after literate replacement lost with spaceflexible/fullflexible columns

Problem with space being lost in listings immediately after a literate replacement when using columns=spaceflexible or columns=fullflexible (appears correctly with columns=flexible). A small example ...
6
votes
1answer
621 views

Nested enumerate (enumitem) interferes with suppressing vertical space after theorem heads.

In the post How to suppress vertical space between theorem heads and enumitem environments? David Carlisle suggested a piece of code that helps suppressing vertical space between theorem heads and an ...
5
votes
1answer
1k views

`\hfill`-like spacing in math mode without using `align`

In question 83509, a way of getting \hfill-like behaviour in the align environment is described, but for my purposes, I need one that works in the equation environment. (I want to display some ...
5
votes
1answer
376 views

Same distance between chapter head and text / toc

With the following example, I get a different vertical distance between "Contents" and "1 bar 5" and "foo" and "Lorem". How do I get the first entry of the TOC to the same height as "Lorem ipsum", ...