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

16
votes
4answers
8k views

Removing spaces between “words” in math mode

I'd like to set $1024 \times 768$ without any space between the three items. Is this possible? If so, how? E.g., what I get is: 1024 x 768 and what I want is: 1024x768
17
votes
3answers
580 views

How to replace all pictures by white rectangles?

I have a long document (800 pages) with lots of pictures (300 pictures). I have to produce a version of this document without the pictures (for copyright reasons). The solution I have found so far is ...
13
votes
3answers
4k views

Phantom spaces in listings (pdf)

I have a problem with SQL code in a PDF document. For code representation I'm using the listings package. Everything works perfect until I copy-paste that code from the created PDF document. I get ...
16
votes
2answers
2k views

How to preserve the same parskip in minipage

I have following structure: \begin{document} Paragraph1. Paragraph2. \begin{minipage} Some paragraph1. Some paragraph2. \end{minipage} \end{document} How can I make the same spacing between ...
6
votes
1answer
1k views

Including an itemized list within a tabular column using the paralist package

The paralist package offers the option of typesetting an itemized list with a \topsep length of zero, and this is especially useful in a tabular setting. However, the following minimal example does ...
11
votes
4answers
4k views

abovedisplayskip vs abovedisplayshortskip

What is the difference between these two? http://en.wikibooks.org/wiki/TeX/abovedisplayskip http://en.wikibooks.org/wiki/TeX/abovedisplayshortskip I don't know why, but it seems to work unusually. ...
10
votes
6answers
934 views

A \boxed alternative with nicer spacing?

I like using \boxed to emphasize my answers in homework problem sets. However, whenever I use superscripts/exponents inside the box, the box becomes taller than it seems it should. This causes two ...
9
votes
1answer
4k views

Increasing paragraph indentation in KOMA script

The default parindent in KOMA scrartcl is too small for me. I remember reading somewhere that just changing \parindent directly is not wise, since it also affects other things (like itemize etc). And ...
9
votes
2answers
4k views

Why does latex stretch small sections across the whole page vertically?

I'm writing my bachelor-thesis and have a couple of small sub-sub-sections explaining conversions, like in the following \subsubsection*{Assignment} This document only explains non-compound ...
9
votes
1answer
1k views

Blank lines in align environment

Is there a way to insert a blank line between two equations in align environment? From what I understand a blank line is interpreted as \par and \par is not allowed in align. Can I disable this ...
15
votes
5answers
2k views

Proper way to detect empty/blank text

I am attempting to ignore a command if it is passed with empty/blank text. My use case is not as complicated as one Expand away empty macros within ifthenelse where @egreg provides what seems like a ...
7
votes
2answers
4k views

Extra space for numbered titles in table of contents

Background A manual with chapters, sections, subsections, and sub-subsections. Using KOMA Script v2. Problem The spacing between the heading title and its number is too close to the number in some ...
5
votes
1answer
413 views

Space length between the chapter number and the chapter title

How can I learn the horizontal distance between the chapter number and the chapter title both in ToC and the body text where I use \documentclass[12pt,reqno]{book}. Which keys hold these values?
66
votes
3answers
58k views

\vspace vs. \vskip

What is the difference between \vspace{-1em} and \vskip -1em, for example? I guess the first is LaTeX, and the latter is TeX. When is the proper time to use one and not the other, and why?
50
votes
2answers
9k views

Two letter variable names

In math mode, TeX assumes "hidden multiplication" (so that two variable names put nearby have invisible multiplication between), so that, AFAICT, expressions like $ABC$ are rendered with small ...
16
votes
3answers
2k views

Making a LaTeX document appear as though it were typeset in MS Word

I am typesetting a document in LaTeX for which I have been given exact specifications that are intended for an MS Word-processed document (single-sided, single-spaced, 0.75 inch margins, no more than ...
12
votes
1answer
1k views

How can I inject the proper amount of vertical space between captions and figures?

In my source document, I have an image and a code listing, separated by some text. When I generate PDF using pdflatex, the image is just above the listing, and it looks like the caption for the image ...
22
votes
2answers
5k views

Why should I put a ~ before \ref or \cite?

My question is in the title of this post, but extends to other referencing commands like \eqref, \citep, \citet (and the like) as well.
11
votes
3answers
3k views

Too much whitespace before lists when changing the \parskip length

I have the following in my preamble: \addtolength{\parskip}{\baselineskip} \setlength{\parindent}{0 pt} Now there is too much whitespace before an enumerate list environment, in the example I have ...
20
votes
2answers
22k views

Vertical spacing of a table cell

I want to tabulate formulas, but I find that the lines of the table cells are too close together, and this is aesthetically unsatisfactory. Example (formulae copied from wikipedia): ...
12
votes
2answers
2k views

Reduce white space around TikZ picture?

Is there a simple way to reduce the amount of white space around the TikZ in the MWE pasted below (in particular in the x direction)? \documentclass{article} \usepackage{xcolor} \usepackage{tikz} ...
6
votes
3answers
304 views

Looking for an \ignorespacesandpars

Is there an analogue of \ignorespaces which will also ignore the following \pars?
18
votes
1answer
801 views

Different vertical spacing (parskip) between concurrent section titles and paragraphs

I'm trying to remove the spacing between section headings, but maintain the paragraph to section heading spacing. Even though I set titlespacing before and after to *0, there is still spacing - quite ...
18
votes
3answers
2k views

Get the size that a figure is being rendered

Suppose I have a figure in my LaTeX document: \begin{figure} \includegraphics[scale=0.5]{some_graphic} \end{figure} My question is pretty simple: Is there a way to get the size that some_graphic ...
17
votes
1answer
968 views

Why is \parskip zero inside a minipage?

This question was originally entitled "inconsistent paragraph spacing with \parskip inside minipage" as the MWE below shows. But I found the answer at How to preserve the same parskip in minipage, ...
14
votes
2answers
1k views

\intextsep gives doubled space

If a float (black box) follows my {example} environment (gray left line) the skip between them is too big. I guess it’s twice \baselineskip but it should be only one \baselineskip plus some glue. It ...
5
votes
1answer
362 views

Color changes cell height in tabular

The following code shows that a \color{red} command increases the height of a tabular cell. I want to use a switch, not a command as \textcolor{red}{text}. \documentclass{article} ...
5
votes
3answers
796 views

Removing a backslash “\” when passing arguments to newcommand

Consider the following minimal example: \documentclass{article} \usepackage{glossaries} \makeglossaries \newcommand{\NewS}[4]{ % Q1: How can I use argument #1 without the backslash in the ...
8
votes
1answer
6k views

Vertical space before and after align environment

I am wondering if it is possible in LaTeX to generally adjust the spacing before and after math in the align environment from amsmath. From the Mathmode-guide (by Herbert Voss) I gather that ...
4
votes
1answer
673 views

How do I eliminate the vertical realignment when using arrayrulecolor with cmidrule?

I'm using consecutive \cmidrule commands in conjunction with \arrayrulecolor to alternately hide and unhide horizontal rules in a table. However, when \arrayrulecolor is used with \cmidrule, some odd ...
3
votes
2answers
3k views

Shortcut for “vertical space” in LyX

Has someone got an idea what the shortcut is/where I can create one for the \medskip{} command (or any other command, that generates a vertical space in my document)? I looked in ...
13
votes
1answer
189 views

Tabs vs spaces in listings: what's the difference and should I care?

This is a follow-up question to Problem with Listings package concerning line breaking and wrong alignment. Why do I experience problems when I copy and paste code inside the lstlisting environment? ...
7
votes
1answer
2k views

Spurious space above align environment at top of page/minipage

It seems that the align environment adds additional vertical space if it starts at the top of a page or minipage. Below are two pages, and two minipages (on Page 1), where the first page/minipage has ...
4
votes
1answer
188 views

unnecessary white space in tikz picture after using \tkzInterLC[R]

After adding the last line of code to my tikzpicture I have a large white space between the text and the picture. I don't know what causes the problem. I've already looked at similar questions, but ...
36
votes
2answers
11k views

Large negative spaces

I know about \! which creates a thin negative space but is there any native command for large negative spaces (like quad or qquad for positive spaces) ?
19
votes
1answer
15k views

\hspace vs. \hspace*

After trying both commands, I noticed that \hspace* opposite to \hspace will insert a space over the end of the line. So I was wondering if someone could explain how that works and also when to use ...
29
votes
1answer
8k views

What is the difference between \vskip and \vspace?

I found myself writing: \vspace 1 \baselineskip and then when not compiling changing without thinking to: \vskip 1 \baselineskip but what is the difference? Perhaps knowing this will make me ...
26
votes
1answer
7k views

Remove space around bullet points in itemized or enumerated list

How can I reduce the amount of space around items in an itemized or enumerated list? I would like to reduce the vertical space between items, the space to the left of the bullet, and the space ...
14
votes
4answers
17k views

Reduction of Space between two Sub-figures

I want to reduce the space between two subfigures and use that space to make those subfigures large. How to do that? My code is as follows: \begin{figure}[htp] \centering ...
13
votes
3answers
18k views

Reducing spacing after headings

I've searched many sites but I couldn't get any answer. Here is this mystical question: How can i reduce the spacing after headings? Here is my code. \documentclass[12pt,a4paper]{article} ...
20
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} ...
15
votes
4answers
6k 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 ...
17
votes
2answers
670 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 ...
10
votes
3answers
11k views

Global setting of spacing between items in itemize environment for beamer

I'd like to modify the spacing between items in the itemize environment. This post shows how to modify a specific itemize environment (\addtolength{\itemsep}{0.5\baselineskip}). However, I'd like to ...
4
votes
2answers
11k views

Spacing before and after section titles

I know this subject has been mentioned before, but I'm still having a problem in creating a space under a section title. I used the titlesec package and then tried using the command ...
23
votes
1answer
13k 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 ...
21
votes
2answers
372 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. ...
15
votes
3answers
9k 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 ...
24
votes
2answers
846 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 ...
18
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 ...