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

8
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
6answers
4k views

How can I auto adjust a equation to appear in the entire page? (Scale to equations, is this exist?)

If I have a document like this: \documentclass[landscape, 12pt]{report} \usepackage[landscape]{geometry} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath, amssymb, ...
49
votes
5answers
11k views

Good practice on spacing

In various places, in passing, I've seen mention of various good practices regarding well-behaved spacing in LaTeX. For example, Dr. Who should really be written Dr.\ Who or Dr.~Who to get the right ...
83
votes
2answers
46k views

How do I create an invisible character?

I cannot remember how to create an invisible character in LaTeX, i.e. I want to put a space the that has the width of a particular character, say `M'. I know there is a command for this, and this is ...
54
votes
2answers
10k 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 ...
34
votes
1answer
2k views

When should I use intersentence spacing (`\@')?

I've got a sentence that ends on an acronym: blah blah WORD. Next sentence blah Running this through chktex, I'm informed that: Warning 13 in ./file.tex line 9: Intersentence spacing (`\@') ...
26
votes
2answers
16k views

How can I increase the line spacing in a matrix?

I'm trying to create a pmatrix whose components are rather complicated fractions (Christoffel symbols), and the line spacing is too small making the whole thing a bit cramped and hard to read. Is ...
29
votes
2answers
794 views

Ensure minimal length of last line

This question led to a new feature in a package: impnattypo One rule in French typography is that the last line of a paragraph should not be shorter than the double of the indentation of the ...
17
votes
4answers
9k 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
18
votes
3answers
617 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 ...
16
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 ...
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 ...
18
votes
1answer
1k 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, ...
10
votes
6answers
1k 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
5k 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
1answer
2k 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 ...
8
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
512 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?
71
votes
3answers
65k 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?
18
votes
3answers
3k 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 ...
20
votes
1answer
21k 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 ...
21
votes
2answers
27k 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): ...
15
votes
2answers
20k views

Remove space after figure and before text

I have a figure in my paper (I am using IEEEtran package). After this figure there exists a space between the figure and the text. How can I reduce the size of this white space. To be specific the ...
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.
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} ...
7
votes
3answers
356 views

Looking for an \ignorespacesandpars

Is there an analogue of \ignorespaces which will also ignore the following \pars?
19
votes
1answer
966 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 ...
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
392 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
877 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 ...
5
votes
1answer
735 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
219 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? ...
4
votes
1answer
240 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 ...
39
votes
2answers
14k 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) ?
29
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 ...
12
votes
2answers
12k 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? ...
26
votes
4answers
3k 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 ...
16
votes
3answers
25k 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} ...
14
votes
4answers
20k 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 ...
29
votes
1answer
10k 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
8k 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 ...
13
votes
3answers
7k 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. ...
7
votes
2answers
18k 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 ...
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
719 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 ...
16
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 ...