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

26
votes
3answers
1k views

Mathematical description of TeX's infinite numbers?

TeX has things like infinitely stretchable spaces and infinitely bad penalties. Since Knuth is Knuth, I assume these are a carefully thought-out implementation of some well defined non-Archimedean ...
29
votes
1answer
3k views

What, if anything, is the advantage of \bigskip and friends over \vspace?

What are the advantages to using \bigskip, \medskip, and \smallskip instead of just using \vspace{somelength}?
11
votes
1answer
5k views

Tilde and slash in LaTeX

I am getting strange errors in LaTeX: perhaps you should insert a `~' before "\ref" missing `\ ' after "i.e." missing `\ ' after "i.e." I understand that the first expects me to put a tilde before ...
24
votes
4answers
9k views

Prevent line breaking in inline math, but allow flexible spacing

How can I easily tell Latex to prevent line-breaks inside a part of an inline formula, without affecting inter-word spacing? Writing something like $ab(c+d)$ in Latex is bad: Latex might put a line ...
16
votes
2answers
2k views

When is it good practice to use \unskip

One sees in source2e the command \unskip used in various places. My understanding in general terms is that the macro is the equivalent of \ignorespacesbehind. Where would it be recommended to use ...
12
votes
3answers
261 views

non-invasive kerning/spacing modification: what options are there?

Once in a while, you may want to (1) adjust or create a kerning pair (or, better yet, kerning class) in a font, or (2) adjust a particular glyph's sidebearings. examples of scenario (1) would include ...
4
votes
1answer
2k views

Beamer: Full width image, aligned to top with a frame title

I would like to include a full width image, aligned to the top of a frame with a frame title. The problem is, I cannot get rid of a line of white space between the orange frame title header and the ...
22
votes
3answers
2k views

Canonical way to typeset spacing in abbreviations

In a comment to When one should use spacing line \quad or \, Herbert claims that e.\,g. is the canonical way to typeset spacing in abbreviations (this is not about spacing before or after ...
15
votes
2answers
348 views

How to reduce the space between two slashes when using \url?

This is a follow-up question to Space between two slashes. Bianca Lobo's answer (defining a \twobar command with proper kerning) is nice; however, it doesn't work in the argument of the \url command ...
11
votes
1answer
3k views

Adjust vertical space before enumerated list in Beamer

In Beamer, I can easily set the desired vertical space between items in an enumerated list with itemsep. But how do I set the vertical space between the line that introduces the enumerated list and ...
11
votes
1answer
4k views

Problem with \newcommand, no space after calling new command in the compiled text [duplicate]

Possible Duplicate: \newcommand and spacing In my latex document I have defined a new command to force a consistency in naming of a product I talk in my document: ...
10
votes
1answer
1k views

right description list LaTeX beamer

How to do right align a description list using beamer? Name | Joel Spolsky Address | Some address Using the enumitem package as suggested in Description list with right alignment of ...
10
votes
3answers
934 views

How to get a better spacing in nested multicols environments?

The following code produces an output that has badly-spaced contents. My objective is to write an exercise with multiple choice questions. Each option may have a figure. The red arrows indicate the ...
9
votes
2answers
8k views

Random unwanted space between paragraphs

I generate LaTeX code from XML for a book I'm writing, using pdflatex (Version 3.1415926-1.40.10 (Web2C 2009)) and memoir. Very infrequently, there appears to be an extra blank line between two ...
8
votes
3answers
4k views

Table padding in LyX

I'm creating in LyX a table wich has a single character for every cell. Problem is, a lot of space is wasted, because each cell has some padding points which I'd like to reduce. A cell is now big ...
6
votes
2answers
2k views

Copy-pasting leading whitespace and blank lines in listings package (pdf) [duplicate]

I'm trying to use the listings package to typeset some code in a PDF document, in a way that allows me to copy-paste the resulting code. This mostly works well, if ...
6
votes
1answer
883 views

Math mode accents and spacing

I'm using accents to produce a variant of the \in operator but when I place an accent on it, as in \tilde{\in}, I get spacing that is different from \in, see the example and the image below. My ...
5
votes
3answers
3k views

An equation skip problem — amsmath package and \above/belowdisplayskip

I have been puzzled by a problem about math equation skip for days. I set the \lineskiplimit, \lineskip, \abovedisplayskip and others length macros before and after equations all to zero, but there ...
24
votes
1answer
677 views

How do I ask beamer to exactly fill up a slide?

Inspired by a recent question with a very similar sounding title, I would actually love to implement auto-magic vertical stretch for beamer slides (where, maybe unlike full documents, I think makes a ...
23
votes
1answer
961 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 ...
20
votes
2answers
793 views

Why does \xspace behave differently for parenthesis vs. braces/brackets?

Consider: \documentclass{article} \usepackage{xspace} \begin{document} (something\xspace) [something\xspace] \{something\xspace\} \end{document} Or more to the point: \documentclass{article} ...
19
votes
2answers
364 views

How do I define a new punctuation mark?

Here's is some code for a variant exclamation point despite its various short comings (such as non-scalability) \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{calc} ...
18
votes
1answer
1k views

Spacing around image

Knuth is on record that he incorporated approximately 100 typographical rules in TeX. I am struggling to discover the balance. Consider the figure below, What should be the amount of space around ...
17
votes
2answers
862 views

Improving typesetting of sums with long limits

This piece of code \documentclass{article} \usepackage{mathtools} \begin{document} ...
15
votes
5answers
4k views

Adjusting vertical space between TOC entries using Beamer

I have a rather lengthy table of contents for a presentation. Beamer is not compressing the vertical space between TOC entries, but instead running the last item off the bottom of the output! Is ...
14
votes
1answer
9k 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 ...
14
votes
4answers
10k views

How to shorten/shrink spaces between words?

My objective is to fit more words within one line. In order to show what I mean, I will exaggerate the word spacing here: Pretend this is a normal line in the document: Lorem ipsum dolor sit ...
13
votes
2answers
3k views

Reduce linespread between \item globally

Because of a page limit for a report, I would like to decrease the linespread between individual \items. I know this is generally not a good idea, but I really need the space. How can I achieve this ...
12
votes
2answers
606 views

What is the typographically correct way to typeset name initials?

Sometimes I found that writing just "J. Doe" may lead, in a justified line with few words, to a big space between the initial and the surname. Using J.\,Doe looks ok but I would like to know if there ...
12
votes
2answers
429 views

Avoid just nearly filled last lines

Old school typesetters never allowed the last line of a paragraph to be just nearly filled. Either it would be clearly shorter than the other lines or it would be stretched to align with the right ...
11
votes
1answer
5k views

Obtaining the default section spacing into the \titlespacing* parameters

I'm using the book class. I want to modify the spacing before and after my sections using the \titlespacing* command. However, before I do that, I want to let its parameters be such that they ...
11
votes
1answer
430 views

Simulate the % in a \newcommand

I want to automate quotation marks (not quotes) using a macro. Consider the following code: \newcommand{\mytext}[1]{``#1''} This one works fine: \mytext{This is a very long quote. Lorem ipsum ...
9
votes
1answer
8k views

The space between the table and its caption is very small

I have a table written like this: \begin{table} \centering \begin{tabular}{|l||c|c|} \hline&Column 1&Column 2\\ \hline\hline cell1 & cell2 & cell3 \\ ...
9
votes
3answers
2k views

Why doesn't lineno number a paragraph when it is followed by an “align” equation environment without a space?

lineno skips the line numbering in this case: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{lineno} \linenumbers \begin{document} Lorem ipsum dolor sit amet, consectetur adipiscing ...
8
votes
1answer
343 views

Kerning for arabic digits?

In most fonts, arabic digits have nonproportional width, meaning that 1 and 8 have exactly the same width even if the former has a smaller natural width. This is good for typesetting tables, but in ...
7
votes
1answer
175 views

How to remove space surrounding a colored theorem box?

This is a follow-up question of Combining spacebelow with shaded parameter in thmtools package. Bug?. How can I get rid of the space above the theorem box? If I comment out the mdframed=... line it ...
7
votes
1answer
1k views

How to remove space between back address and address in scrlttr2?

There is a blank line between the back address and the address? How can I remove it? \documentclass{scrlttr2} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{ngerman, ae} ...
7
votes
1answer
1k views

Vertical space before and after custom environment

I've created custom environment with these commands: \usepackage{relsize} \newcounter{annotation} \def\theannotation{\arabic{annotation}} \newenvironment{annotation} ...
7
votes
2answers
13k views

How can I reduce table row height?

I use the following code to render a table in LaTeX. But the problem is that the default row height is too big for me. I want to be able to specify the row height. How can i do it? ...
6
votes
1answer
441 views

Code improvement and suggestions in template

Consider the following MWE: \documentclass[12pt,twoside,letterpaper]{report} \usepackage[text={4.95in,7.5in},centering,bottom=1.5in,showframe]{geometry} \usepackage[dvipsnames]{xcolor} ...
6
votes
1answer
563 views

Unequal letter spacing in 'listings'

I am wondering why in the pdf of the example below the letters of the word "function" and the word "sum" seem to have different spacing. This somehow looks ugly. Apart from that, I am wondering if ...
5
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
1k 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 ...
1
vote
1answer
9k views

Two double spaces between paragraphs

How can I set two double spaces between all paragraphs in a report? I have already set double spaces between lines with this command: \usepackage{setspace} \doublespacing
0
votes
1answer
5k views

Underful hbox badness 10000

A while back I ran across a web page that explained how to avoid this error by not using \\ but hfill or hspace. I can't remember which one or find anything else about it. It was a very simple ...
19
votes
2answers
671 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
455 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 ...
14
votes
1answer
3k views

Remove vertical space before table of contents title

I've been trying to figure out a way to easily reduce the space/gap from the top of the page to the table of contents title, as in to reduce the vertical space before the table of contents begins. ...
13
votes
1answer
9k 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] ...
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 ...