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

2
votes
2answers
1k views

booktabs and tiny horizontal space

In a regular table, I'm trying to remove the small horizontal space before the first column and after the last one as achieved with package booktabs with the option @{}. How can I do that? Please ...
2
votes
2answers
2k views

Tune space around section headings

I am using \Huge centered section headings but the space generated around the heading is too big currently: I would like to reduce the space around the heading (The "Créé à son image" text) to make ...
1
vote
1answer
3k views

How to put subcaptions below subtables, and increase gap between subtables with 'subfigure'?

Using 'subfigure', how can I create subtables within a table, such that a) subcaptions are underneath each subtable, and b) there's a reasonable horizontal gap between the subtables? So far I've only ...
26
votes
2answers
1k views

What is the proper use of \@ (i.e., backslash-at)?

In this answer, \@ is used after a period and before an \xspace, presumably to indicate that the preceding period (in "etc.") was not sentence-final. In these tips, \@ is used before a period and ...
50
votes
4answers
1k views

Why does \vspace, after section heading, sometimes jump/snap in discrete steps?

Well, this is one question that I've had for a long time, and one that always gets me extremely irritated. However, this time I'm even somewhat happy - that I can ask the question at all; and that is ...
26
votes
4answers
2k views

How do I ask LaTeX to exactly fill up a page?

I understand that I can control interline spacing in LaTeX in a number of ways. The commands like \baselineskip, \baselinestretch, \linespread come in handy in controlling the interline spacing. Each ...
13
votes
1answer
914 views

Italic Correction for Linux Libertine Font

I was looking for a new font for the manuals of my LaTeX packages and found the Linux Libertine most pleasing. However it seems that it doesn't support italic correction (yet). I assume that a font ...
23
votes
1answer
3k views

How can I put more space between bibliography entries (biblatex)

My bibliography (made with biblatex) has all items close to each other. I would like to introduce some space between them, e.g. half a line. How can I do this?
11
votes
3answers
6k views

Define pretty sets in LaTeX; esp., how to do the condition-separator?

E.g., I have this set: \{ \alpha \in \Sigma^\omega | \exists^\omega n : \alpha [0,n] \notin \Sigma^* a_1 \Sigma^* a_2 \dotsb a_n \Sigma^* \} Here, I use | as the separator for the condition part. ...
20
votes
2answers
21k views

What is the difference between `\hspace*{\fill}` and `\hfill`?

In the memoir manual on page 183 ,this example is given: \begin{figure} \centering \hspace*{\fill} {ILLUSTRATION 1} \hfill {ILLUSTRATION 2} \hspace*{\fill} \caption{Example float with two ...
17
votes
1answer
277 views

Is there a method just write `---` to get an em-dash, putting thinspace both before and after it?

Is there a method just write --- to get an em-dash, putting a thinspace both before and after it? The situation about break is similar with the original ---.
13
votes
3answers
693 views

Changing ALL spacing in a TeX document

I'm taking an exam and I'm allowed a two side page with information on it. Naturally I want to put as much as possible on it so: What are all the spaces that I can change to fit as much information ...
13
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 ...
9
votes
2answers
10k views

Remove vertical space at start of latex document

I have this test file which is supposed to put Hello there. near the top of the page but it does not work in so far as there is still tons of vertical space at top. How can I fix this? ...
25
votes
3answers
3k views

What is the difference in citing/referencing with or without tilde?

I've seen examples referencing a table as follows: Table~\ref{table:overview} shows an overview of all the elements. What is the use of the tilde in front of \ref or \cite and when do you have to ...
22
votes
2answers
21k views

Change whitespace above and below a section heading

I want to change the spacing around a section heading so that there is less of a gap between it and the paragraph that follows. I found the following commands \usepackage[compact]{titlesec} ...
15
votes
1answer
656 views

How to fix the math-spacing when a lot of \phantom, \mathrlap, etc. are used?

This question led to a new package: underoverlap Introduction Based on this question and then this question, I'm trying to perfect the \overunderbrace macro. Right now, I'm trying to get the ...
12
votes
1answer
5k views

Condense the space between bibliographic entries

In order to save space, I would like to condense the bibliography, specifically, reduce the amount of vertical space between entries. Currently, it seems there is double-space between consecutive ...
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 ...
13
votes
1answer
2k views

How can I add a subtitle to a section title?

I'd like to do this for some of my sections but not all. I'd also like to maintain the current spacing; for example, if the vspacing is 1cm from section title to body text (at 100% zoom), then I'd ...
12
votes
2answers
309 views

Better automatic spacing of differential d?

This question was basically about whether the differential d should be upright or italicized, not about how to achieve that in tex. However, this useful answer did suggest something like the following ...
12
votes
3answers
7k views

Creating a new environment with one optional argument

I want to create a new environment with one optional argument in LaTeX. Here is what I used: \newenvironment{argument}[1][]{% \par \noindent \textbf{Argument#1:} \noindent} {} When there is no ...
12
votes
1answer
6k views

Too much space after sections when I change parskip

I changed the parident and parskip of my document. But now there is a huge empty space after the sections. How can I reduce the space after a section? \documentclass[12pt,a4paper]{scrartcl} ...
10
votes
2answers
3k views

Create empty box sized according to imaginary content

In LaTeX, is it possible to create an empty box that has exactly the dimensions of some content given? Example: \emptybox{abc} would insert an empty box of the size as if "abc" was printed there.
9
votes
1answer
532 views

What does 'missing \@ before…' error mean in vim?

I get this strange behavior when I have capitals before a period, like so 1 \documentclass{article} 2 \begin{document} >> 3 Another possible protein blah blah blah from GRIP/ABP. Blah ...
8
votes
1answer
862 views

Change text color in table, preserve ability

I'm having difficulty creating a new command for \rowstyle that allows me to color the text of different rows in a table and preserve my ability to space out the columns and not induce space between ...
8
votes
4answers
651 views

How to make 4 equal paddings (left, right, top, bottom) in a table cell?

I want each cell in a tabular to have 4 equal paddings of exactly 15pt each. How to make 4 equal paddings (left, right, top, bottom) in a table cell? \documentclass{article} ...
6
votes
2answers
7k views

How to remove/change the vertical spacing before and after an \algorithm environment?

I saw a question that tells me how to change the spacing in an algorithm environment, but I don't know how to do remove/change the space before and after an algorithm environment like: % remove the ...
5
votes
1answer
4k 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? ...
15
votes
3answers
1k 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⟩’. [...] ...
14
votes
4answers
2k views

Spacing between triple vertical lines

I would like to create a norm-like operator with 3 verticals bars instead of two. It has to look like $|||\cdot|||$. I would like to know how to decrease the spacing between the vertical bars such ...
12
votes
2answers
1k 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 ...
11
votes
2answers
3k views

How to add vertical space struts after hline?

I know the table trick of adding "struts" in the first line after and the last line before a \hline. I use it throughout my document, and it looks good that way. However, now I am working within a ...
10
votes
2answers
213 views

Math Spacing in the presence of a trailing/non-trailing comma

I thought I knew how to use a \hphantom{} but don't know of an easy way to handle this case due to the comma. I want to get the text aligned for the X row. I added the appropriate \hphantom{{}+1} ...
10
votes
1answer
315 views

Space between the two slashes in “http://” too big

I'm using a lot of links with http:// in my document, but the two slashes are too much separated, I'd like them to be more near each other. How do I do this, in a neat way? I'm using a sans-serif ...
9
votes
2answers
395 views

hyphenation next to a parenthesis

I have some very special hyphenation puzzles involving optional hyphens next to parentheses. (semi)group should be hyphenated as (semi-)/group di[rected ]graph should be hyphenated as di-/[rected ...
9
votes
1answer
2k views

Vertical spacing before and after equation environment: empty line or not?

The vertical spacing in front of and behind the amsmath equation environment is different whether I insert a blank line or not (im using KOMA-Script with parskip=half if this is important). I'd like ...
9
votes
2answers
3k views

how to reduce the distance between the picture caption and the picture?

I found that the distance between the picture caption and the picture is a little large, as we can see in the picture I use the code as follows, thus, how to reduce the distance between the caption ...
9
votes
3answers
4k views

Length between nested lists in beamer

How do I adjust the length between nested lists? For example, in the following, I would like to adjust the distance where it states "distance here" \begin{itemize} \item one %% distance here ...
8
votes
1answer
556 views

The line spacing in the list of algorithms

This is my code: \documentclass[12pt,a4paper]{book} \usepackage[T1]{fontenc} \usepackage[chapter]{algorithm} \renewcommand{\baselinestretch}{1.5} \begin{document} \begin{spacing}{1.2} ...
8
votes
1answer
206 views

What's the right space to right the alignment of a right aligned align environment?

As Hilbert would have put it, had he lived in the TeX-era: No one shall expel us from the Paradise that AMS has created. and one aspect of that paradise is release from the tyranny of eqnarray ...
8
votes
1answer
3k views

How do I write $\sim$ approximately with the correct spacing?

I would like to use the symbol $\sim$ as "approximately". e.g: \documentclass{minimal} \begin{document} There are $\sim 10^{80}$ atoms in the universe. \end{document} I think that I need to declare ...
8
votes
2answers
364 views

Custom ToC — Put vspace only below chapters that have sections in them

I’m using the titletoc package in the book class. Currently, my chapter entries are configured like this (I left out the unimportant parameters for simplicity): \titlecontents{chapter}[0pc] ...
7
votes
1answer
2k views

\parskip inserts extra space after floats (and listings)

This question seems to be a duplicate of How to remove the skip after a listing when "\parskip" is increased with "\baselineskip"? but the answer given there doesn’t work although ...
7
votes
5answers
6k views

Spacing around table and figure environments

I've got table and figure environments, some placed "here" with h and some arranged automatically. But all together I don't like the spacing above and below the figure and table environments. I ...
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 ...
7
votes
2answers
1k views

Grouping the list of listings by chapter

I am using the listings package. I want to print out a list of listings, which I can do. The thing is that in the other listings the typesetter "groups" figures/tables by chapter. Is it possible to ...
5
votes
1answer
2k views

How can I control the horizontal space between minipages?

I'm trying to place two mini pages next to each other, one with text, one with an image. But my code has them spaced really far apart. How can I bring them together horizontally. I've tried \hspace ...
5
votes
2answers
7k views

center and \centering both add space above; \centerline does not

The nag package suggests I use the center environment in LaTeX, rather than the TeX \centerline command. When I do that, however, I find that the former inserts a blank line above the line (in my ...
5
votes
2answers
841 views

Remove additional space around \underbrace{…}

How do I remove the additional space that is added when using \underbrace{...}, to get the same width in both lines: \documentclass{scrreprt} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} ...