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

15
votes
1answer
586 views

What does the tilde character (~) do in math mode?

What effect does the tilde character ~ have in math mode? Is it the same non-breaking space that it is in text mode? Is it bad style to use ~ in math mode? I've seen it used in some examples but ...
15
votes
1answer
2k views

Difference between control space and non-breaking space

In my answer to How can I get following layout? I've used non-breaking spaces ~ (ties) to align monospaced text. Actually I rather meant control spaces \ , but they're less convenient to type (and ...
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 ...
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 ...
15
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. ...
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 ...
15
votes
1answer
152 views

fontspec ruins Lilypond's note spacing

I use lilypond-book to include music examples in my TeX document, but it seems that fontspec breaks the horizontal spacing between the notes: without fontspec with fontspec This MWE shows the ...
15
votes
1answer
684 views

How to fix the math-spacing when a lot of \phantom, \mathrlap, etc. are used?

This question led to a new package: underoverlap Introduction Based on this question and then this question, I'm trying to perfect the \overunderbrace macro. Right now, I'm trying to get the ...
15
votes
1answer
825 views

Making a unary operator out of a binary operator or relation symbol

Often in physics, the symbol \sim is used as a unary operator to mean "approximately." For example, one might say "the energy of these processes is $\sim 4$ eV." However, this looks awkward because ...
15
votes
1answer
761 views

Remove spacing above section in titlesec

I'm writing a document optimized for mobile usage, and as such I want to conserve my space. The spacing that titlesec adds to sections, subsections, etc. is getting somewhat annoying. Is there a ...
14
votes
6answers
8k views

How should imaginary numbers be typeset?

I've never had to typeset complex numbers before and I'm finding that I'm uncertain about what best-practices are. My question is really about typesetting just i. (Hence my title referring to ...
14
votes
4answers
2k views

Spacing between triple vertical lines

I would like to create a norm-like operator with 3 verticals bars instead of two. It has to look like $|||\cdot|||$. I would like to know how to decrease the spacing between the vertical bars such ...
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 ...
14
votes
2answers
465 views

How does \\ suppress spurious spaces while \par\noindent doesn't

I'm trying to build a description-list-with-header-line by using a macro. In the non-MWE, the macro adds additional value like index entries and margin notes, but here I have the simplest case ...
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 ...
14
votes
2answers
394 views

Automatically adding space before punctuation in old-style English texts

I'm typesetting an English text in an 18th century style (based on a 1725 edition of Alexander Pope's "Dunciad"). Is there a LaTeX package I can use to automatically add the correct space before (and ...
14
votes
4answers
19k 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 ...
14
votes
2answers
213 views

Extra space behind month for \today with \usepackage[norsk]{babel} in December

When using \today and \usepackage[norsk]{babel} (babel <v3.8l>) in December there is an extra space behind the month name. How do I get around this? \documentclass{article} ...
14
votes
2answers
3k views

adding space before each item in itemize

I would like to add some space before each \item in begin{itemize} When i try doing something like this \begin{itemize} \item \hspace {5cm} Sweden \item \hspace {5cm} Germany \end{itemize} The ...
14
votes
3answers
802 views

How can I get Sperrsatz?

Sperrsatz is a special kind of emphasis often used in combination with blackletter fonts. A word in Sperrsatz has 0.125 em spaces between its characters, but some ligatures are preserved. For example: ...
14
votes
4answers
887 views

Todo note steals space

I'm writing a larger document and I use the todonotes package to add reminders. For some reason, when I add a note, the space after the note's insertion point is removed. Here's minimal example: ...
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 ...
14
votes
2answers
458 views

Is there way to put hard space after defined words?

In Polish typography, one should avoid putting prepositions at the end of the line. Example: Nie wiedziałem, że nie umieszcza się przyimków na końcu strony. - bad Nie wiedziałem, że nie umieszcza się ...
14
votes
1answer
244 views

Eating space before a command

If I have a \newcommand*{\foo}{foo} it will 'eat' space after it. Is there a way to tell it to eat space before, so that the result of e.g. bar \foo bar would be 'barfoobar'?
14
votes
2answers
5k views

When should you use \vskip (\hskip) rather than \vspace (\hspace) in a LaTeX document?

I assume that, to guard against strange errors, you should use \vspace rather than \vskip whenever possible in a LaTeX document. But are there any situations in which you must use \vskip? I'm ...
14
votes
3answers
472 views

How to insert a non-stretching but line-breaking thin space?

How do I insert a small space that looks like the space I get with \, but allows a line break like a normal space does? I.e., I'm looking for a non-stretching, non-non-breaking space whose width is ...
14
votes
2answers
2k views

How to indicate elision in a quotation?

How should one typeset an elided passage in a quote? An example: \begin{quotation} some text [...] then some more \end{quotation} Elision in a quote is usually indicated by an ellipsis ...
14
votes
1answer
282 views

Is there any opposite of newpage?

Is there any command which is the opposite of \newpage/\pagebreak/\clearpage, i.e. which goes back a page instead of going forward, similarly to the way you can use \vspace to move the current ...
14
votes
1answer
932 views

Math mode: Spacing after Superscripts

Math mode adds extra horizontal space after superscripts. I have listed various options for removing it in the MWE. I would like to know if there is any recommended way of doing this in amsmath. I ...
14
votes
1answer
1k views

adaptive \ldots with no (“…”) spacing

Due to the typographic traditions I'm used to, I prefer my \ldots to have no spacing in between, ideally exactly the same amount as in text. In math mode I would like to write things like \(1, 2, ...
14
votes
1answer
236 views

Dedicated symbol for […] in quotations?

I would like to use [...] in quotations to indicate a part which was not included. Just entering [...] does not render it perfectly in my opinion. Is there a special way of inputing said symbol? ...
14
votes
2answers
2k views

How much space between number and unit?

Javier Bezos (famous of titlsec, tensind, spanish ... packages; and now maintainer of babel) wrote a nice book on typography and scientific notation in spanish. He says (pag. 82) that the space ...
14
votes
1answer
153 views

Using babel and cleveref causes unnecessary horizontal space in header

Update This bug has been fixed with version 0.18.9 of cleveref, which is currently on ctan. Question Babel and cleveref do not seem to work flawlessy together when they share the same language ...
14
votes
1answer
2k views

Abbreviations and spacing

I'm sure this is a pretty standard questions that's been asked (and answered!) a hundered times before, so apologies for boring people. In LaTeX, I'd like to write a macro for abbreviations, such as, ...
14
votes
2answers
233 views

How do I get microtype's “outer spacing” to work with the xspace package?

Microtype adds extra space to the start and end of letterspaced text, configured via the \SetTracking command's "outer spacing" option. Unfortunately, xspace breaks this. For example, I define a few ...
14
votes
2answers
740 views

Is it possible to have a “real” \belowdisplayshortskip?

I think this is a tough one. Have you ever wondered why TeX sometimes produces vertical spacing around equations that is far from satisfactory? An example: \documentclass{article} ...
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 ...
13
votes
3answers
7k views

Creating a new environment with one optional argument

I want to create a new environment with one optional argument in LaTeX. Here is what I used: \newenvironment{argument}[1][]{% \par \noindent \textbf{Argument#1:} \noindent} {} When there is no ...
13
votes
3answers
7k views

LaTeX equivalent of &nbsp;&nbsp;&nbsp; in HTML?

In HTML, to get extra horizontal spacing all I would have to do is: This is textual phrase A&nbsp;&nbsp;&nbsp;This is textual phrase B to get the following output: This is textual ...
13
votes
2answers
2k views

How can I change the whitespace above and below math displays?

I'm looking to squeeze an article written in LaTeX with amsmath to a set number of pages. In the text, I have a number of numbered math displays which I refer to throughout. However, they take up ...
13
votes
2answers
4k 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 ...
13
votes
2answers
644 views

The revenge of the vboxes

Yes, they're back. With a vengeance. Those pesky little buggers we call \vboxes which I've fought against previously. (And Bruno, too.) \parskip=0pt \def\unquo{\unvbox0\smallskip} ...
13
votes
3answers
729 views

Changing ALL spacing in a TeX document

I'm taking an exam and I'm allowed a two side page with information on it. Naturally I want to put as much as possible on it so: What are all the spaces that I can change to fit as much information ...
13
votes
1answer
10k 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
1answer
351 views

Is there a way to make a “non-selectable” space in LaTeX?

Is there a way to create a horizontal space in LaTeX that is visible to the reader but invisible to the computer when selecting and copying text (using PDFLaTeX)? An example of the problem: When I ...
13
votes
1answer
130 views

How can we detect that we are right after display math mode? (for vertical spacing)

I need a "\smartmedskip" feature/macro in plain TeX which is in usual identical to \medskip, however, if we are right after display math mode, then it should be just "disabled", i.e. it should then ...
13
votes
4answers
557 views

Using commas in mathematical formulas

I need write some formula, but I don't know how to arrange the comma's place. $p,\ q\in N$, blabla $0<a,\ b<1$ blabla $i,\ j=1,\ 2,\ \dots,\ n$ or $p,\;q\in N$, blabla $0<a,\;b<1$ ...
13
votes
1answer
3k views

How do I robustly typeset a double-hat?

I'm trying to typeset a symbol with two hat accents (useful for denoting superoperators in quantum mechanics, for instance), but \hat{\hat{L}} produces too much space between the hats. I found one ...
13
votes
1answer
198 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? ...
13
votes
1answer
192 views

How to make \newcommand with one argument that does nothing.

I am writing a document with extra notes intended only for myself. \newcommand{\mycomment}[1]{\emph{Note: #1}} %\newcommand{\mycomment}[1]{} When I wish to remove the extra comments, I simply ...