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

14
votes
2answers
379 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
17k 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
209 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
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
3answers
772 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
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.
14
votes
4answers
862 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
445 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
225 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
3answers
434 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
845 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
941 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
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, ...
14
votes
1answer
229 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
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. ...
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
232 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
702 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
18k 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} ...
13
votes
3answers
81k views

How to add indentation

I am writing my Thesis report using LaTeX, I need to add indentation because every thing is right but only thing is every new paragraph is starting at initial stage but I need to add some indentation. ...
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
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 ...
13
votes
2answers
607 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
670 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
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
2answers
17k 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 ...
13
votes
1answer
337 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
8k views

How can the margins around a table set to 0pt?

I need to put a table inside another table, and would like to set the outside margins of the inner table to 0pt. How can I do this (in particular for tabularx, but hopefully this would be the same for ...
13
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 ...
13
votes
1answer
126 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
2answers
4k 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 ...
13
votes
1answer
279 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 ...
13
votes
4answers
516 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
189 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
185 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 ...
13
votes
1answer
324 views

mdframed is causing wrong alignment at the bottom of pages

If you would be so kind to compile this LaTeX document: \documentclass[a4paper,11pt]{book} \usepackage[paper=a4paper,twoside=true,lmargin=4cm, rmargin=4cm,bindingoffset=0cm]{geometry} ...
13
votes
1answer
2k views

Why does \vspace*{0pt} add vertical space?

I'm trying to format the title of the table of contents using the tocloft package. It inserts code that looks like the following. \par \vspace*{\cftbeforetoctitleskip}% % code to typeset ...
13
votes
1answer
94 views

Long command name for horizontal space ~

The short command \, has (more or less) the long command equivalent \thinspace. - What is the long command for the unbreakable space ~? Also, is there a long command for a space which is *just a ...
13
votes
1answer
2k views

How can I add a subtitle to a section title?

I'd like to do this for some of my sections but not all. I'd also like to maintain the current spacing; for example, if the vspacing is 1cm from section title to body text (at 100% zoom), then I'd ...
13
votes
3answers
408 views

Multi-column spacing of many equation-like environments

I suppose I have a pretty simple question. I want to write down a logic inference system. A good example can be found on page 9 in this document: What environment would you advise me to use to get ...
13
votes
2answers
175 views

How to get rid of unwanted spaces with \input?

For my project to bring scripting to (Xe)(La)TeX, I need to execute command lines with write18, redirect output to a temporary file, and then insert the produced text using \input. I've noticed some ...
13
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 ...
13
votes
1answer
140 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 ...
13
votes
1answer
1k views

\colon for maps in opposite direction

Using \colon gives correct spacing for a map $F\colon C\to D$ in one direction. But writing $L\colon C\rightleftarrows D\colon R$ for a couple of maps in both directions (e.g. for an adjunction) gives ...