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

10
votes
1answer
3k 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: ...
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
864 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
597 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
898 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
774 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
362 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
822 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
560 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
418 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
423 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 ...
8
votes
1answer
336 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
172 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
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 \\ ...
7
votes
1answer
967 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
12k 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
410 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
537 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 ...
19
votes
2answers
639 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
452 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
8k 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 ...
12
votes
3answers
427 views

Multiple letters without spacing in Math [duplicate]

Is there something I can add to the preamble of my document such that multiple letters without spacing in a Math environment (such as $NP$) do not have extra spacing between them and are not ...
11
votes
3answers
5k views

How can I fit my table of contents into a single page?

When I use \tableofcontents I get all my contents in a single page except for a line that goes on the other page, how can I make all in the same page?
11
votes
2answers
849 views

Spaces width between the words

What is the width of the spaces between the words (by default) that LaTeX uses for text formatting?
11
votes
5answers
2k views

Improve intercolumn spacing of this table

I'm trying to spruce up the appearance of this table: \begin{tabular}{rr@{\hspace{2em}}rr@{\hspace{2em}}rr@{\hspace{2em}}rr} \toprule \multicolumn{2}{c@{\hspace{2em}}}{\textbf{Word C}}& ...
10
votes
1answer
1k views

Easily change behavior of \DeclarePairedDelimiter

After seeing the answer to this question I realized that I preferred the way of working of Juan A. Navarro's answer: I.e., \DeclarePairedDelimiter{\parens}{\lparen}{\rparen} from mathtools is a ...
10
votes
3answers
3k views

How to change dot spacing in \dotfill?

I'm using the \dotfill command in a nomenclature to add units at the end of each line. Here is the code I'm using: \usepackage[refpage]{nomencl} \newcommand{\nomunit}[1]{% ...
9
votes
2answers
3k views

Prevent a paragraph break after a section heading

In my .cls file for my thesis, I have defined \subsection as follows: \newcommand{\subsection}[1]{% \pagebreak[2] \refstepcounter{subsection} \addcontentsline{toc}{subsection}{ ...
8
votes
1answer
1k views

Using infer from the proof package?

I am using the \infer command from the proof package. Few things that I am trying to do unsuccessfully: How can I have some space between the elements of the proof? such as space between x and y ...
7
votes
2answers
5k views

Spaces between rows and cols in a table - Better ways than mine?

I started using Latex recently and I put together 4 ways of changing the space in a table. Two general ways defining the general space between cols and rows as well as two ways of adding space between ...
7
votes
1answer
365 views

How does changing colour affect spacing?

In the following example, the space after the red equation is much larger than the space after the black one. \documentclass[12pt]{article} \usepackage{xcolor} \begin{document} \[ a = b \] The quick ...
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 ...
6
votes
1answer
89 views

Spacing around inline equations

What is the parameter determining spacing and stretchability around inline equations? I want to tweak spacing exactly but cannot find where the parameters are.
6
votes
3answers
162 views

Removing space in table with itemize environment

I have a table that has enumerate environment in it. The issue is that I have a blank line before the first item in the itemize environment. How can I remove it? \documentclass{article} ...
6
votes
1answer
1k views

Problems with the lstlisting environment (margin and white line)

Consider the following example: \documentclass{article} \usepackage{listings} \usepackage{color} \begin{document} \definecolor{light-gray}{gray}{0.95} \lstset{columns=fullflexible, ...
6
votes
1answer
256 views

Remove excess space at end

I realize that one should not have two consecutive display math equations as mentioned in Uneven vertical spacing displaymath. However, in my case, I have a macro that typesets two given macros in a ...