{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
814 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
751 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 ...
15
votes
1answer
8k views

Confusion: \onehalfspacing vs. \spacing vs. Word vs. the world?

I have to write a paper with the requirement to use "1.5 line spacing" 12pt Times New Roman. Naturally I used \usepackage{setspace} \begin{document} \onehalfspacing Lorem ipsum… So far so good. But ...
14
votes
6answers
7k 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
88k 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. ...
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
453 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
393 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
18k 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
1answer
10k 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
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
796 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
883 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
457 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
239 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
65k views

Adding tabs or creating my own command

I have a problem adding tabs and I can't use a tabular environments (like tabular or tabbing) because I can't mix it with enumerate environments. Is there a way to add a simgle tab like in any text ...
14
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 ...
14
votes
3answers
463 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
906 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
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
235 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
150 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
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
730 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
637 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
718 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
348 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
129 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
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
547 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
195 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
191 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
326 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
95 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 ...