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

17
votes
2answers
498 views

How do you create .+?

I would like to display a = b .+ 1 But it is displayed as a = b. + 1 (moves . next to b).
17
votes
2answers
3k views

How can I use something like \vspace{\baselineskip plus 10pt}

Is it possible to use \baselineskip with some extra glue inside of \vspace? \documentclass{scrartcl} \begin{document} Text \vspace{\baselineskip} Works \vspace{12pt plus 10pt minus 5pt} Works ...
17
votes
2answers
836 views

Entire document typed in monospace font

I want to put an entire document into monospace font for various reasons. This is nominally fairly easy; you can say \renewcommand{\familydefault}{\ttdefault}. However, there at least two problems ...
17
votes
2answers
2k views

How to preserve the same parskip in minipage

I have following structure: \begin{document} Paragraph1. Paragraph2. \begin{minipage} Some paragraph1. Some paragraph2. \end{minipage} \end{document} How can I make the same spacing between ...
17
votes
1answer
585 views

Is there a rule of thumb to set the space between columns?

I've never heard about a convention to adjust the space between columns in a writing, it seems it depends on aesthetic sense--even in scientific literature---doesn't it?
17
votes
1answer
26k views

Inserting a specific number of blank lines

I'm new to LaTeX and trying to format my Honors Thesis, which has very specific formatting rules to prepare the manuscript for publication. For instance, on the Abstract page, I am required to place 3 ...
17
votes
2answers
889 views

Improving typesetting of sums with long limits

This piece of code \documentclass{article} \usepackage{mathtools} \begin{document} ...
17
votes
1answer
287 views

What is the ConTeXt equivalent of LaTeX “\@.”

In English text, TeX follows the convention of putting extra space after a period by default, which I like. However, in the case of abbreviations it causes a problem. To suppress the extra space, ...
17
votes
1answer
278 views

Is there a method just write `---` to get an em-dash, putting thinspace both before and after it?

Is there a method just write --- to get an em-dash, putting a thinspace both before and after it? The situation about break is similar with the original ---.
17
votes
2answers
464 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 ...
17
votes
2answers
391 views

Issues with TeX sub-formula formatting

As generally acknowledged TeX offers superb formatting capabilities for math in an automated fashion. Nevertheless there are some areas with clear deficiencies that one either has to accept or ...
16
votes
4answers
532 views

Do starred commands eat up space after them?

Do starred commands eat up spaces after them, like unstarred ones do? That is, is \somecommand* nextword equivalent to \somecommand*nextword? And: Does it depend on the particular way a starred ...
16
votes
4answers
8k views

Removing spaces between “words” in math mode

I'd like to set $1024 \times 768$ without any space between the three items. Is this possible? If so, how? E.g., what I get is: 1024 x 768 and what I want is: 1024x768
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 ...
16
votes
3answers
16k views

Reduce spacing in bibliography using biblatex

How can you control (in my case reduce) the spacing of the bibliography in biblatex? I used to use \begin{spacing}{0.9} \bibliographystyle{plain} \bibliography{refs} \end{spacing} and ...
16
votes
2answers
406 views

Strike through text without affecting text box size

I want to strike through text with a simple line. Unfortunately, in the solution(s) I found, the text always has a larger distance to the next line (see example). How can I strike through text ...
16
votes
3answers
5k views

How can I make vfill to work without adding any text before?

Using \vfill between two texts works: \newpage bla \vfill blabla but it doesn't work if there is no text before it: \newpage \vfill blabla How can this be achieved?
16
votes
2answers
848 views

Usage of LaTeX macro \space (compared with \␣)

Occasionally I find that internal package code contains the macro \space (defined as \def\space{ } by LaTeX). The most-taught way to produce "explicit" spaces in paragraph text is to use \␣, and I ...
16
votes
2answers
181 views

Why is unskip not working here?

I'm trying to define a macro to be used as follows: \usepackage[normalem]{ulem} \newcommand{\thesis}[1]{\uline{\ignorespaces #1\unskip}} % underlining required by school - I know, I know % later... ...
16
votes
3answers
2k views

Making a LaTeX document appear as though it were typeset in MS Word

I am typesetting a document in LaTeX for which I have been given exact specifications that are intended for an MS Word-processed document (single-sided, single-spaced, 0.75 inch margins, no more than ...
16
votes
3answers
1k views

Fixed-width interword space

I would like to typeset post--World War II with what Adobe InDesign calls a "quarter space". The en-dash is there to be wider than a normal space, to clarify the constituent structure ([post-[[World ...
16
votes
2answers
7k 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.
16
votes
1answer
709 views

Adding a “minimum” vertical space

Is there a way to add vertical space, but only if that much vertical space has not already been added? In other words, to say "put a minimum of X points of space here, and if some other command has ...
16
votes
2answers
333 views

Defining \xthinspace: Thin space only if not followed by certain characters

Following this 2005 thread from the XeTeX list, I’ve defined a \spaceddash command and assigned it to the Unicode em-dash character U+2014 “—”: \documentclass{minimal} \usepackage[utf8]{inputenc} ...
16
votes
1answer
290 views

What does `\ ` exactly do?

In the The Not So Short Introduction to LATEX2e - Version 5.01, April 06, 2011 it is suggested that: A backslash in front of a space generates a space that will not be enlarged. (page 39) It ...
16
votes
1answer
21k views

How to use the parskip package? (space in between paragraphs)

Sorry, because I think it's a many times asked topic. But I don't find an example which help me to understand how to create a white space between paragraphs. I think parskip is the package I need to ...
16
votes
1answer
280 views

Semantics of negative glues

This question is about the semantics of glues like 0pt plus -1fill, where the coefficient in front of the fill is negative. The following minimal example shows my attempt to figure this out ...
15
votes
8answers
532 views

The trestle problem: how to avoid >=< in the output

TeX puts no space between \mathrel characters, so one can type := to make a definition. But careless authors often type stuff like < a, b > = < c, d > to indicate that two scalar ...
15
votes
5answers
252 views

Behavior of \\ inside center environment

While trying to compile a title page for my dissertation I realized that I do not understand the behavior of \\. Consider the following MWE \documentclass{memoir} \begin{document} \begin{center} ...
15
votes
3answers
21k 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} ...
15
votes
4answers
6k views

What is the right way to use the `\!` spacing command?

I have noticed that I hardly ever use the \negthinspace command \!. This is because I don't know how to use it properly (I do use other spacing commands quite a bit, because I can better understand ...
15
votes
2answers
300 views

Replace all spaces with hyphens

It is good practice for legal documents to have hyphens instead of spaces so nobody can add anything to a contract after signing it. E.g. ------------------------------------------ ...
15
votes
3answers
2k views

No space present after ensuremath

When I insert a short maths section in a sentence, it renders fine with a space each side as expected: ...returned $\mathcal{P}$ from... If I define a command to do the same thing, it also renders ...
15
votes
3answers
1k views

Difference between \mskip and \mkern

What are the differences between \mskip and \mkern? The TeXbook writes the following (ch. 18): You can insert math glue into any formula just by giving the command ‘\mskip⟨muglue⟩’. [...] ...
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 ...
15
votes
3answers
9k views

Dynamic signature/date line

I'm trying to create a signature and date line in a document. I need the date line to always be in the same spot on the page no matter what name is under the signature line, such as: ...
15
votes
2answers
353 views

How does TeX know how to space different typefaces?

My understanding of how TeX makes things look so nice is that it goes over each paragraph and spaces each letter/word to look 'right' based on how dark it is, how wide it is, and the characteristics ...
15
votes
2answers
18k 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 ...
15
votes
2answers
407 views

How to remove an unwanted white space at the last end of a horizontal curly brace?

You can see there is an unwanted white space at the last term below. \documentclass[border=12pt]{standalone} \usepackage{amsmath} \begin{document} $ ...
15
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 ...
15
votes
1answer
9k 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 ...
15
votes
3answers
1k views

en dash and em dash spacing

I've noticed that en dashes and em dashes run into certain numbers and letters, and I don't believe it's standard to use spaces with these. For example, if a 'b' comes before the dash or a '6' comes ...
15
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 ...
15
votes
2answers
66k 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 ...
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
171 views

Spurious Vertical Space Introduced by multicols (Additional Case)

This seems to be a duplicate of Spurious [?] vertical space introduced by multicols, but the solution from there does not seen to work for me. Basically I want the case of using multicols to not ...