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

6
votes
2answers
2k views

Reduce Spacing In $<a>$

In math, one often needs to put a letter inside the symbols <>, e.g. to denote a cyclic group <x> generated by some element x. However, plain text displays the symbols < and > as an ...
23
votes
3answers
3k views

Canonical way to typeset spacing in abbreviations

In a comment to When one should use spacing line \quad or \, Herbert claims that e.\,g. is the canonical way to typeset spacing in abbreviations (this is not about spacing before or after ...
7
votes
2answers
8k views

How to remove/change the vertical spacing before and after an \algorithm environment?

I saw a question that tells me how to change the spacing in an algorithm environment, but I don't know how to do remove/change the space before and after an algorithm environment like: % remove the ...
21
votes
5answers
2k views

No space following macro without argument

With a macro such as: \def\naive{na\"{\i}ve} I find that the space which I would hope to follow it, is absent. So, with the \naive approach I get the naïveapproach in the output. How do I ...
38
votes
4answers
22k views

When one should use spacing line \quad or \,

In general, in most places, it is said that using TeX defaults is the best. However, TeX does provide things like \, and \quad etc. When one should use them? Both in general and in math mode in ...
8
votes
2answers
6k views

Avoiding vertical spaces between bibitems while using IEEEtran

I'm using IEEEtran class and bibliography style and I see that the references section that it generates leaves empty lines between bibitems when the compsocconf option is used. Is there a way to avoid ...
13
votes
1answer
1k views

“etc.” abbreviation macro gives error when used in caption

I've been using the abbreviation macros for i.e., e.g., and etc. that are provided in this post. However, I just discovered that the etc. macro, and a similar one I made for et al. both cause errors ...
3
votes
2answers
2k views

Vertical space between chapter title and top in book document class

Does anyone know how to change the distance between a chapter title (or table of contents title, or...) and the top of the page, when using the book document class? I'm satisfied with the rest of the ...
21
votes
2answers
2k views

Print programs with its proper syntax

I have defined my own language whose syntax is very close to the one of Pascal. I would like to type the following program for instance. Many people use the packages algorithmicx or algorithm2e to ...
5
votes
3answers
244 views

Whitespace macro

I would like to have a macro which produces N white spaces if called like this \mulspc{3} % Produces exactly 3 spaces \newcommand{\mulspc}[1]{ \newcounter{ctra} \setcounter{ctra}{0} ...
8
votes
2answers
1k views

\mathrel conflict with \left,\right,\middle

I refer to this question and particularly to this answer. I defined \set by \usepackage{mathtools} ... \DeclarePairedDelimiterX\set[2]{\{}{\}}{#1 \mathrel{\delimsize|} #2} where ...
5
votes
1answer
149 views

Double spaces caused by biblatex \volcite

I encountered some double (i.e. too wide) spaces in front of my BibLaTeX references today, and it turns out these only crop up with \volcite when using a postnote. Consider the following example: ...
10
votes
3answers
762 views

Space on the right hand side of a unary math operator

I know that \mathop{...} is used to give some space on the both sides of the binary operator. Could anyone tell what to use to give some space only on the right hand side of an unary math operator? ...
1
vote
1answer
410 views

Custom (or any) environment inside tabular adds unwanted vspace

I wanted to define my own version of a verbatim-like environment, that has some less line spacing and uses alltt instead of verbatim, so what I can use \(\cdots\) inside. What I tried was: ...
5
votes
2answers
901 views

Different spacing between section and content

I have a strange problem with spacing between section and content header. Take a look at the picture below. You can see that spacing between headers are different. I couldn't reproduce this error ...
5
votes
2answers
962 views

Remove additional space around \underbrace{…}

How do I remove the additional space that is added when using \underbrace{...}, to get the same width in both lines: \documentclass{scrreprt} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} ...
6
votes
1answer
4k views

PGFplot to occupy full \linewidth, and aligned y=axis across tikzpicture

How do I get the tikzpicture to occupy the full \linewidth, and also have the left and right axis aligned? I suspect that some \phantom spacing applied to the tick labels will do the trick, but don't ...
6
votes
1answer
536 views

Using a \phantom{} in \ul from the soul package

In responding to how to typeset a Long underscore in LaTeX, I attempted to use a \phantom with \ul, but end up Argument of \makeph@nt has an extra }. So, what is the proper way to use a \phantom ...
6
votes
2answers
281 views

Spacing of hline after text depends on letters extending past baseline

In the following code, the hrules are different distances from the baselines. The first hrule is at the baseline of the text and the second is at the bottom of the y. How can I make them the same ...
1
vote
2answers
699 views

How to squeeze white spaces between sections and figures?

I am using a multicolumns article template for some kind of CV profile. I have all working as intended except of 1 small problem. In my first column, I have quite some high amount of white space ...
0
votes
1answer
190 views

Control start point of nested list

After stretching the list horizontally according to Horizontal space in lists, I've encountered a problem where the nested list items start too deep inside. How can I pull it back to the left where ...
2
votes
2answers
2k views

Horizontal space in lists

What is the best way to change the amount of horizontal space in list environments? Examples: 1.############################ % Near the enumerated item - compacted horizontal space ...
3
votes
1answer
7k views

Control top and bottom margins of an image?

Using includegraphics seems to set default margins that gives a nice spacing between text and image. But I'd like to layout the text as close as possible to the image. How do I control the margins of ...
1
vote
1answer
257 views

Margins from the column separator

If the text in both columns end and begin too close from the column separator, how do I increase the margin from it? Change from: | #Text#######|#Text####### | % (Bad, too close to column separator) ...
3
votes
2answers
508 views

How to remove trailing spaces at the end of each line in a block of code?

NOTE: I have to adapt this question to reflect Martin's answer (that actually not 100% solves the original problem) so I can accept it. :-) If I work without standalone document class, I usually put ...
2
votes
2answers
574 views

Indent as much as the width of a word

Here is my basic problem: I want to write on a line Thesis: "something really long that should continue here like this" How can I do that? (without tabular) Edit: I am using this ...
23
votes
1answer
11k views

Setting the column gap in a twocolumn (or multicol) document

I have a document that uses twocolumn with scrbook. How can I set the width of the space between the two columns?
4
votes
3answers
2k views

\citenum with square brackets

I am using the superscript citation style and sometimes in the text I need to print the citation number is square brackets like [6]. I read I could use \citenum but [\citenum{myref}] leaves some big ...
3
votes
2answers
262 views

Remove space at the end of a macro

For a particular work, I need old style footnotes, that are typeset before the word they refer to. So I call \footnote before the word and it works fine, but it adds a space after the footnote mark. ...
6
votes
1answer
4k views

Space after float with [h]

this is my first time here, and I have this question: I'm writing my thesis, that includes many tables and figures in a float environment, with the caption at the end of it. I defined the space ...
4
votes
1answer
791 views

Vertical spacing problem related to the mdframed environment

I use the mdframed package with option style=1, which means that TikZ is responsible for drawing frames: \documentclass{article} \usepackage[style=1]{mdframed} \begin{document} \noindent Text ...
3
votes
2answers
1k views

Automatically add vertical space /only/ between two sequential paragraphs

I am using KOMA-script scrreprt class. I know I can use \usepackage{parskip} or \setlength{\parskip}{12pt}, but both of these also affect headings. Adding \vspace{12pt} manually between all two ...
2
votes
3answers
1k views

overfull vbox with beamercolorbox

In a latex-beamer document, I am using a custom headline template. It produces a headline only when in a section. Here is a stripped down version: \documentclass{beamer} \usepackage{times} % gets rid ...
2
votes
1answer
119 views

Superpose a subscript and the rest of a formula

I have a formula in the equation environment that goes like Foo = \bigcup_{x \in veryveryveryverylongdescription} Bar(x) Because the state space's description is long, the Bar(x) is rejected far ...
2
votes
1answer
133 views

Alignment of material across pages

How would you make two corresponding lists on two different pages so that the corresponding items in the two lists would be at the same absolute height on the two pages? I guess the best way to ...
7
votes
1answer
497 views

Weird font/spacing issue with LuaTeX & Asana Math

Trying to use LuaTeX font support in some big document, everything went fine except a little glitch with Asana Math font. Here is the issue: \documentclass{standalone} \usepackage{unicode-math} ...
9
votes
4answers
4k views

Add extra space only between two specific columns of a tabular without adding extra columns

I am trying to move two columns of a tabular apart and running into difficulty. I tried adding \hspace between the columns with the @{...} syntax, but multicolumn seems to ignore that this spacing is ...
2
votes
2answers
349 views

Problem with macro definition spaces of index and superscript

I have defined a command FZ for defining mathematical symbols: \newcommand{\FZ}[1]{\textcolor{blue}{\ensuremath{#1}}\xspace} I want to define a Symbol CV first and then create some variants with ...
3
votes
1answer
144 views

Mark portions of text without affecting spacing

I would like to mark portions of my text that requires special attention during the review process. This marking won't be in the final document, so would like to be able to add these marks without ...
4
votes
1answer
521 views

Listings, literate, and space at the start of the line.

I am trying to use the literate option to replace the prompt (>>>) and continuations (...) in python input with symbols that "hang" in the margin. I can almost do this with something like ...
4
votes
1answer
771 views

Vertical Spacing of twocolumn option

I was wondering how can one place vertical spacing on both the left and right columns while using the [twocolumn] option. I used the \vspace{} command above the section of code where the columns ...
13
votes
3answers
8k 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 ...
14
votes
4answers
12k 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 ...
1
vote
1answer
258 views

Preventing whitespaces between sections after using \linespread{2}

I'm working on my thesis and there is something rather strange going on in terms of whitespacing. All is well if I do not use the linespread command. However, as soon as I do use it, sections seem ...
8
votes
3answers
3k views

Word spacing in LaTeX

How to implement word spacing in LaTeX? For websites this is done with CSS: word-spacing: 0.5em; This is for reference about other tags paper: custom layout: layoutoffset:(h,v)=(0.0pt,0.0pt) ...
2
votes
1answer
348 views

Oddly wide spaces in subsection title

I have a problem, this is what it looks like: And this is the code: \subsection{Bakterienst\"amme und Anzuchtbedingungen} Where does the huge whitespace come from?
2
votes
1answer
300 views

Increasing spacing between the rows of a table containing both equations and words

Below is some code I am working with. \begin{tabular}{l|m{4.75in}} Equation 1 & $y^{10} + x^{6} + 7x^{3} + 6y^{11}$\\\hline Equation 2 & $\begin{alignedat}{1}(n + 1)^{2}u_{n + 3} &+ ...
11
votes
5answers
9k views

How to input open intervals

I want to write open and half-open intervals using the following notation: ]a, b[ ]a, b] ]-∞, b] When writing them just like that in the LaTeX source, the spacing doesn't come out right. For ...
2
votes
1answer
118 views

3 pdf graphs on 1 page with text below

I am new to latex. I have to prepare a one-page document (so float is not important). I want to have 3 pdf graphs at the top of the page with 2 graphs centered on the first line and 1 graph centered ...
3
votes
2answers
1k views

Single Spacing Long Subsection Header in Table of Contents

I'm assembling my master's thesis in latex, using my university's provided latex style file. They mandate that if you have a long entry in the table of contents / list of figures et cetera, that the ...