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

4
votes
1answer
2k views

How to put two minipages side-by-side, which use 100 % of the text width?

In draft-mode a black marker indicates that the reserved space is too low. This also appears in the following example, but it shouldn't. How can I put two minipages exactly side-by-side? ...
4
votes
1answer
2k views

How can I change the spacing before theorems with amsthm?

I have a spacing problem. Whenever I include a theorem environment, \begin{theorem}\end{theorem}, the theorem appears very close to the previous line. The spacing is much less than the normal spacing ...
3
votes
2answers
986 views

Different \marginparsep for odd and even pages?

What is the most robust way of increase the effective \marginparsep on even pages only? I have been playing with outdented lists, section heads etc. which leads to an issue with margin notes: I need ...
22
votes
1answer
728 views

When to use a \mbox or a tilde for words that have to stay together

I am new to La Tex and wondering when to use a tilde, or a \mbox? A tilde prohibits a line break and so does \mbox, so when to use one or the other? For example, should I use: \mbox{words to kept ...
19
votes
2answers
545 views

Exhaustive list of use cases for the interword space \␣

The Guide to LaTeX (4e) states that \␣ is a "[n]ormal space between words after a command without arguments or after a period that is not the end of a sentence" (p. 467). For the former case ...
17
votes
2answers
433 views

Non-invasive replacement for \fbox?

I am trying to create a macro that improves on \fbox by working correctly in all cases and by being minimally invasive with respect to padding. What I've got so far works fairly well, but I'm having ...
15
votes
3answers
860 views

Difference between \mskip and \mkern

What are the differences between \mskip and \mkern? The TeXbook writes the following (ch. 18): You can insert math glue into any formula just by giving the command ‘\mskip⟨muglue⟩’. [...] ...
13
votes
1answer
7k views

difference between \vspace and \vspace* for negative arguments

Is there ever a difference between \vspace{...} and \vspace*{...} if a negative argument is supplied? Most importantly, does the choice of which macro to use have an influence on page breaking ...
13
votes
4answers
2k views

Hard whitespace

I am using plainTeX and would like to typeset some (python) code examples. Switching to \tt gets me partway there, but I (obviously) need the whitespace respected. Is there a trick for doing this? The ...
11
votes
1answer
6k views

How to remove the whitespace BEFORE itemize/enumerate?

I'm somewhat of a LaTeX noob, and this is driving me completely nuts. When I type \documentclass{article} \usepackage{enumitem} \begin{document} Some text \begin{itemize}[noitemsep] ...
11
votes
2answers
1k 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 ...
11
votes
2answers
783 views

Spaces width between the words

What is the width of the spaces between the words (by default) that LaTeX uses for text formatting?
10
votes
5answers
2k views

Improve intercolumn spacing of this table

I'm trying to spruce up the appearance of this table: \begin{tabular}{rr@{\hspace{2em}}rr@{\hspace{2em}}rr@{\hspace{2em}}rr} \toprule \multicolumn{2}{c@{\hspace{2em}}}{\textbf{Word C}}& ...
9
votes
3answers
4k views

How can I fit my table of contents into a single page?

When I use \tableofcontents I get all my contents in a single page except for a line that goes on the other page, how can I make all in the same page?
9
votes
2answers
3k views

Prevent a paragraph break after a section heading

In my .cls file for my thesis, I have defined \subsection as follows: \newcommand{\subsection}[1]{% \pagebreak[2] \refstepcounter{subsection} \addcontentsline{toc}{subsection}{ ...
8
votes
1answer
1k views

Using infer from the proof package?

I am using the \infer command from the proof package. Few things that I am trying to do unsuccessfully: How can I have some space between the elements of the proof? such as space between x and y ...
7
votes
1answer
323 views

How does changing colour affect spacing?

In the following example, the space after the red equation is much larger than the space after the black one. \documentclass[12pt]{article} \usepackage{xcolor} \begin{document} \[ a = b \] The quick ...
7
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 ...
6
votes
1answer
77 views

Spacing around inline equations

What is the parameter determining spacing and stretchability around inline equations? I want to tweak spacing exactly but cannot find where the parameters are.
6
votes
3answers
136 views

Removing space in table with itemize environment

I have a table that has enumerate environment in it. The issue is that I have a blank line before the first item in the itemize environment. How can I remove it? \documentclass{article} ...
6
votes
1answer
835 views

Problems with the lstlisting environment (margin and white line)

Consider the following example: \documentclass{article} \usepackage{listings} \usepackage{color} \begin{document} \definecolor{light-gray}{gray}{0.95} \lstset{columns=fullflexible, ...
6
votes
1answer
251 views

Remove excess space at end

I realize that one should not have two consecutive display math equations as mentioned in Uneven vertical spacing displaymath. However, in my case, I have a macro that typesets two given macros in a ...
5
votes
1answer
2k views

Table of Contents Spacing

How do I place vertical spacing between the chapter header and the first section entry (report document class). For example, I would like: Chapter 1 Title 1.1 Title 1.2 Title Chapter 2 ...
5
votes
1answer
888 views

Automatic spacing with feynmf/feynmp?

Background When labels are shown with feynmp, they extend beyond the box of the graph. One can use \fmfframe to allocate an invisible frame to accommodate these, but it seems like you need to ...
5
votes
4answers
3k views

Avoiding placing `,\,` everywhere in mathmode

Whenever I write ", " (with a space after the comma) in mathmode, I really want a space there. usually, this is either something like the points, $a, b$, and $c$.... or in an explicit vector: ...
3
votes
0answers
3k views

Optimised visualisation of top circles in beamer [closed]

I am making a presentation in Beamer. I am using smoothbars as an outer theme. However I am having a problem when a section has many frames, as indicated in the following image ...
2
votes
1answer
442 views

\fullcite without indent in biblatex

I'm using \fullcite to produce in-margin-note citations as per my older question. I've almost got the behavior I want, but biblatex's \fullcite command inserts a leading indent before the citation ...
17
votes
4answers
380 views

It doesn't hyphenate words ending with “—”

Note: Every — you see in the code is an em-dash. I'writing a paper, and XeLaTeX doesn't hyphenate words which end with – (traditional LaTeX ---). After reading the comments, I realized this is a ...
16
votes
1answer
270 views

What does `\ ` exactly do?

In the The Not So Short Introduction to LATEX2e - Version 5.01, April 06, 2011 it is suggested that: A backslash in front of a space generates a space that will not be enlarged. (page 39) It ...
15
votes
1answer
634 views

Remove spacing above section in titlesec

I'm writing a document optimized for mobile usage, and as such I want to conserve my space. The spacing that titlesec adds to sections, subsections, etc. is getting somewhat annoying. Is there a ...
15
votes
1answer
1k views

Difference between control space and non-breaking space

In my answer to How can I get following layout? I've used non-breaking spaces ~ (ties) to align monospaced text. Actually I rather meant control spaces \ , but they're less convenient to type (and ...
14
votes
1answer
216 views

Dedicated symbol for […] in quotations?

I would like to use [...] in quotations to indicate a part which was not included. Just entering [...] does not render it perfectly in my opinion. Is there a special way of inputing said symbol? ...
12
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 ...
11
votes
1answer
1k views

Correct way to typset esssup (essential supremum)

What is the correct way to typeset essential supremum, with the limits underneath the operator? My first try was \operatorname{ess}\sup\limits_{x\in[0, 1]}, but this puts the x\in[0, 1] under the sup ...
11
votes
2answers
2k views

How to use tilde or space in includepdf filename?

I'm trying to include a pdf in a document, using pdfpages package, but I'm having troubles when filename contains tilde or space. e.g. ...
11
votes
1answer
323 views

bracket with doubled delimiters

I want to typeset Hilbert-Schmidt-Products as the Liouville-Equivalent of the Hilbert Space Braket, with doubled delimiters, like this: \Lbraket{\rho|\rho} results in <<rho|rho>>. I was ...
11
votes
1answer
451 views

babel, frenchb and em dash

If I'm not wrong, in French the em-dashes, typeset with --- in LaTeX, are usually treated like the guillemets as far as non-breaking spaces go. An "opening" em-dash must be followed by a non-breaking ...
10
votes
3answers
290 views

Empty line (in code) before enumerate environment

I like my code to look like this: \documentclass{article} \begin{document} \begin{enumerate} \item test text \begin{enumerate} \item 1 \item 2 \item 3 \item 4 \item 5 ...
10
votes
1answer
840 views

Easily change behavior of \DeclarePairedDelimiter

After seeing the answer to this question I realized that I preferred the way of working of Juan A. Navarro's answer: I.e., \DeclarePairedDelimiter{\parens}{\lparen}{\rparen} from mathtools is a ...
10
votes
2answers
326 views

Where does whitespace between two consecutive lines come from?

I'm trying to get a "contact sheet" where identically sized boxes are laid out next to each other without any whitespace. As my goal is to use this in a generated document, and as the number of items ...
10
votes
5answers
6k views

How to input open intervals

I want to write open and half-open intervals using the following notation: ]a, b[ ]a, b] ]-∞, b] When writing them just like that in the LaTeX source, the spacing doesn't come out right. For ...
10
votes
3answers
726 views

Add asterisk after labels in enumerate

I would like to add an asterisk after certain labels in the enumerate environment. So for example \documentclass{article} \begin{document} \begin{enumerate} \item Kuttel \item* Daddeldu ...
9
votes
2answers
232 views

Compute remaining horizontal space in align environment

I use align* often and sometimes it is preferable to add text to the right hand side of an equation instead of using \intertext, or \shortintertext, which tends to interrupt the math flow. This is ...
9
votes
2answers
273 views

macro that defines a comment

The Wikibooks book on LaTeX mentions the following way of defining a macro for (possibly multi-line) comments: \newcommand{\comment}[2]{#2} with the argument that \newcommand{\comment}[1]{} can ...
9
votes
1answer
446 views

ConTeXt: Define word space dimensions

How would you define the length of a common word space? The word space length ConTeXt uses by itself is okay on the longer end, but way too short on the most compressed end. The wiki entry for ...
9
votes
2answers
207 views

Make the $ that opens a math environment replace preceding spaces with a single non-breakable?

I find myself spending effort in placing the tilde character before every inlined math I type, e.g., On 1899, G. Pick proved that the area of a simple polygon~$P$ whose vertices are located ...
9
votes
1answer
4k views

Customize spacing between section number and its caption?

is there any chance to customize the spacing between the (sub)section number and its title in every appearance in the document? That is, in any header or footer as well as in the table of contents and ...
8
votes
2answers
308 views

How can I remove extra space after `itemize` in moderncv?

In a moderncv document, using an itemize in a cvitem produces extra spacing after the itemized list. Here's a minimum working example: \documentclass{moderncv} \moderncvstyle{casual} ...
8
votes
1answer
281 views

How to vertically center the fraction line?

I feel a bit weird because this is a really simple issue that apparently nobody has brought up so far but I find that very simple fractions produce output that looks vertically unbalanced. The ...
8
votes
1answer
132 views

What does the font size documentclass option actually do?

When using e.g. the [12pt] option for a document class like \documentclass[12pt]{article} what does (Xe)LaTeX actually do/set? I noticed that for example a multicols environment behaves different ...