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

63
votes
6answers
57k views

Column and row padding in tables

How do you guys go about controlling column padding in tables? Update To clarify, I'm looking for a way to control both vertical and horizontal padding. So, if I had a simple table like in the ...
76
votes
5answers
6k views

Is there an easy way to have my whole document with a space between paragraphs rather than indentation?

I would like to have my whole document showing a blank line (or space) between paragraphs and no indentation. I know how to do it line by line, but is there a way to change that with just one or a few ...
65
votes
4answers
4k views

Spacing around \left and \right

Why does the addition of a \left and \right introduces an extra space around the formula? Specifically, why do $\cos(\theta)$ and $\cos\left(\theta\right)$ render differently? Is there a way to use ...
49
votes
2answers
2k views

Drawbacks of xspace

I'm certain I have read that xspace can cause more problems than it solves. But I cannot find anything to that effect either on this site or the web. Are there any drawbacks or risks associated with ...
25
votes
7answers
572 views

Writing a table with equally spaced columns, based on the widest column

Friends, I'm trying to generate a table in which I have all columns equally spaced (same width). In my case, the width for all columns would be the width of the widest column of the table: ...
19
votes
2answers
1k views

Print programs with its proper syntax

I have defined my own language whose syntax is very close to the one of Pascal. I would like to type the following program for instance. Many people use the packages algorithmicx or algorithm2e to ...
142
votes
3answers
22k views

Space after LaTeX commands

I have a definition \newcommand{\arnold}{Arnold Schwarzenegger} when I refer to it by \arnold is a it is rendered as Arnold Schwarzeneggeris a In order to have a space in front of "is" I ...
19
votes
5answers
2k views

No space following macro without argument

With a macro such as: \def\naive{na\"{\i}ve} I find that the space which I would hope to follow it, is absent. So, with the \naive approach I get the naïveapproach in the output. How do I ...
72
votes
4answers
18k views

Vertical space in lists

What is the best way to globally change the amount of vertical space between items in list environments?
87
votes
1answer
77k views

What commands are there for horizontal spacing?

I know that \: in LaTeX produces a space when rendered. Are there any alternatives, because my LaTeX renderer doesn't support \: (it renders it as text), and there is no help / FAQ that I can find.
28
votes
1answer
18k views

How to change the spacing between figures/tables and text?

I was wondering if there is any way to lessen the spaces between figures and text. In my paper I have a lot of figures (graphics) and it is inconvenient for me to have default (large) spaces between ...
40
votes
2answers
681 views

Why is there a \, space at the beginning of the “aligned” environment?

Near the beginning of the definition of the amsmath environments aligned and gathered (and also mathtools' multlined) there's an explicit thin space \,. This often has to be cancelled with \!, as ...
14
votes
3answers
8k views

Dynamic signature/date line

I'm trying to create a signature and date line in a document. I need the date line to always be in the same spot on the page no matter what name is under the signature line, such as: ...
34
votes
2answers
532 views

Viewer-independent copyable spaces at the beginning of a line?

I need to include a couple of Python code listings, where the indentation of the lines (using some number of spaces) is significant. I would like for the code listings to be copyable, so the spaces at ...
32
votes
3answers
3k views

Bad spacing of math letters within italic text

I use the standard AMS theorem style, which means that my theorems are set in italic. In combination with math variables, this sometimes gives horrible spacing: The input If $U$ or $V$ \dots yields ...
40
votes
3answers
21k views

Adding vertical space at the start of a page

I'd like to, first thing before writing anything on a page, add some vertical space. Minimal (non)working example: \documentclass{article} \begin{document} \vspace{250px} I want to be further down ...
34
votes
2answers
2k views

Macros for common abbreviations

Common abbreviations are surprisingly tricky to format correctly. I'd like some simple macros for them, to be used like so: You should eat more fruit, \eg apples, bananas, oranges, \etc. There are ...
40
votes
2answers
4k views

\newcommand and spacing

How can I define my own shorthand command, but making sure that the spacing afterwards is correct? \newcommand{\abc}{\textsc{abc}} produces 'ABC,' but has the problem 'ABCmoretexthere' (i.e. no space ...
7
votes
4answers
11k views

Space before chapters and contents

I am using LaTeX to write my dissertation, and I have realised that on the table of contents and on every chapter page, LaTeX leaves a lot of empty space. What I mean is that lets say in the page ...
36
votes
4answers
18k views

When one should use spacing line \quad or \,

In general, in most places, it is said that using TeX defaults is the best. However, TeX does provide things like \, and \quad etc. When one should use them? Both in general and in math mode in ...
28
votes
7answers
1k views

How to replace a large block of text by an empty block of the same size?

I know there exists the \phantom command, but does it work on large blocks of text (containing several paragraphs or even several pages)? What I want is to have some commands, call them \hide and ...
19
votes
2answers
2k views

How to change default for spacing around binary relations?

In TeX and LaTeX, the math binary relations (like =, \parallel, <, \le ...) have a default (rubber-length) spacing to either side, which is too large for my liking. How can reduce it?
14
votes
3answers
7k views

How to change the line spacing in my list of figures?

I am using the book documentclass and have a list of figures. After much trouble I noticed that there is a blank line to separate figures that are in different chapters, but not if they are within the ...
50
votes
16answers
14k views

Squeezing scientific paper to fit within page limits

I am submitting a paper to a conference that has a limit of 10 pages. I have edited and edited the text, but the paper still fills 11 pages, and I am reluctant to remove anything. What tricks can I ...
27
votes
4answers
4k views

Using display style fraction in a matrix environment

I'd like use the \dfrac command in a bmatrix environment as follows: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{bmatrix} \dfrac{\partial f}{\partial x} \\ ...
22
votes
1answer
3k views

How can I adjust the horizontal spacing between legend entries in PGFPlots?

I am using legend columns=-1 to make a horizontal legend. However, the distance between the individual legend entries is too small for my taste. Is there a straightforward way to increase the ...
6
votes
1answer
3k views

Space after float with [h]

this is my first time here, and I have this question: I'm writing my thesis, that includes many tables and figures in a float environment, with the caption at the end of it. I defined the space ...
11
votes
1answer
2k views

Enumerate/itemize without margins in table cell best practice

I want to use an itemize or enumerate list inside a table cell. For this there should be no margin around the list. My question is, what is best practice to do this? I found different solutions for ...
9
votes
4answers
211 views

Bump right-aligned text to next line iff no room

I a chat discussion it was suggested that \hspace*{\fill} (with a space before it to allow for a line break) was sufficient to always get the text following aligned to the right. And indeed, it is ...
7
votes
2answers
874 views

How to suppress vertical space between theorem heads and enumitem environments?

How can I suppress vertical space between a theorem head and an enumitem environment? I would like the output to look like version 3 below, but I hope there is an automatical solution without ~ and ...
7
votes
3answers
643 views

A \boxed alternative with minimal spacing?

The following code comes from this post. The problem is that I would like a way to automate the size of the box so as to be very small with a few of spacing, but the following solution doesn't work ...
81
votes
2answers
48k views

Lengths and when to use them

There are many lengths in LaTeX. For instance, \enskip, \enspace, \quad, \parskip, \smallskip, ... Some of them are mostly used for vertical spacing, some others are mostly used for horizontal ...
34
votes
11answers
6k views

Double space between sentences.

I've been reading a question on spaces between sentences on a sister site. The answers there seem to imply that the days of double spacing between sentences are over, and that this was a relic of the ...
33
votes
1answer
25k views

How to add extra spaces between rows in tabular environment?

I couldn't find any option that lets me expand the vertical space between rows in tabular environment. For example, \begin{tabular}{c c} $f^{(n)}(x)$ & $f^{(n)}(0)$ \\ ...
27
votes
1answer
2k views

What is glue stretching?

I had a question about dynamic vspaces (Dynamic vspace depending on text height) and there was a hint I should use a stretchable glue. Searching with Google didn't give me a helpful answer. I would ...
20
votes
2answers
1k views

Proper use of \mathchoice

I am trying to learn how to use \mathchoice. Before the solution was posted for Non-invasive replacement for \fbox?, I attempted to use mathchoice to adjust the size of the parameter before ...
14
votes
2answers
6k views

How to globally change the spacing around equations?

How could I go about setting the 'above' and 'below' vspaces around the equation environment? If the same could be done for the subequations or gather environments, this would be a bonus.
9
votes
2answers
5k views

Remove vertical space around align

I need to display math in my report, but is it possible to remove the vertical space around align*? A little example is the following (where I just want the align* to have the same vertical space as ...
6
votes
1answer
3k views

PGFplot to occupy full \linewidth, and aligned y=axis across tikzpicture

How do I get the tikzpicture to occupy the full \linewidth, and also have the left and right axis aligned? I suspect that some \phantom spacing applied to the tick labels will do the trick, but don't ...
20
votes
2answers
5k views

How to modify spacing around quotation environment?

I am almost there in my quest to reproduce the rather compact layout of the book I'm translating... one thing to go, though: I successfully used the enumitem package to modify the vertical and ...
14
votes
1answer
1k views

How to change the interword spacing?

I'm trying to enlarge the interword spacing, because with ITC Kabel's default spacing it's sometimes hard to decide where is the space between two words. I read the manual of the microtype package, ...
4
votes
6answers
3k 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, ...
47
votes
5answers
10k 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 ...
75
votes
2answers
40k 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 ...
47
votes
2answers
7k views

Is a period after an abbreviation the same as an end of sentence period?

Does latex do anything special with periods? If so, is there a way to differentiate end-of-sentence periods from periods indicating abbreviation?
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 (`\@') ...
27
votes
4answers
18k views

Shift title and author text up?

What is the best way to shift the title text 'up' in a LaTeX document compiled with pdftex? When I do this: \documentclass[12pt,letterpaper, onecolumn]{article} \setlength{\topmargin}{0in} ...
26
votes
2answers
14k 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 ...
21
votes
4answers
5k views

Is there a way to control whitespace around a TikZ picture?

When I draw a tikzpicture that includes paths, I get quite a bit of extra whitespace added around the elements of the picture. Depending on the elements the figure contains, this can work out in some ...
29
votes
2answers
733 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 ...