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

29
votes
7answers
1k views

How to replace a large block of text by an empty block of the same size?

I know there exists the \phantom command, but does it work on large blocks of text (containing several paragraphs or even several pages)? What I want is to have some commands, call them \hide and ...
22
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 ...
0
votes
1answer
139 views

Adjusting automatically the heigth of a single column table containing only text

I am new to Latex, trying to using it to prepare a first laboratory test report. I have found a way to mimic the layout of front page of the existing document using a series of stacked tables as shown ...
9
votes
4answers
682 views

Wrong space with \footnotemark

I am using \footnotemark, but the space after the mark is smaller than the space I obtain when I use regular \footnote. How can I obtain the usual space after \footnote? See example below. ...
17
votes
4answers
26k 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 ...
9
votes
1answer
1k views

Default spacing after periods

In LaTeX, what is the default space that is inserted after a period . inside a block of text? What if I press enter (to start a new line in my GUI) after the period? Is it any different in the ...
4
votes
1answer
5k views

Spacing lines in mathmode

I need to explain two different elements in two different lines of an equation in math mode. I'm using this piece of code: \begin{align*} h(z)=0 &\Leftrightarrow \sinh\frac{1}{z}=0 ...
6
votes
3answers
469 views

A way to mark things in math mode

I want to mark the weight function in an equation, using something similar to \underbrace. Using this piece of code: (x^2y')' + \lambda \underbrace{x^2}_{\text{Weight function}}y = 0 I get . I ...
6
votes
1answer
771 views

Overfull warning when using longtable

I am getting overfull warning (Overfull \hbox (17.10379pt too wide) in alignment) when using longtable enviroment (See MWE below) The warnings are on \begin{longtable} and \end* lines. The pdf ...
5
votes
1answer
1k views

Wrapfigure apparently creating dummy space on a following page

The example below is a newsletter with two news items. The first item has a wrapfigure to include a graphic. The second does not But the resulting PDF (made with PDFLaTeX) has a blank area close to ...
8
votes
3answers
443 views

How to put a non-breaking space in \cite

How do I put a non-breaking space inside a \cite macro with several citations? \cite{ref1,~ref2} causes an error. If I leave the space out, one is inserted and this is causing the citation to span two ...
9
votes
1answer
1k views

listings bug: space after literate replacement lost with spaceflexible/fullflexible columns

Problem with space being lost in listings immediately after a literate replacement when using columns=spaceflexible or columns=fullflexible (appears correctly with columns=flexible). A small example ...
3
votes
0answers
107 views

listings bug: space after quote collapsed when inlined with spaceflexible/fullflexible columns [duplicate]

Possible Duplicate: listings bug: space after literate replacement lost with spaceflexible/fullflexible columns I seem to have stumbled upon a minor bug in listings (version 1.4 as of ...
2
votes
1answer
2k views

Vertical spacing of captions in booktabs

Both \abovetopsep and \belowbottomsep are 0.0pt. But for some reason there's extra space between the bottom rule and "my second caption" in the table below. Q: What is that space? Where does it come ...
14
votes
2answers
10k views

How to get less spacing in math mode

LaTeX commands like this: Here again, four different simulations are run on networks of size $C^{G} = 25 \times\ 25 = 625$, $C^{G} = 50 \times\ 50 = 2500$, $C^{G} = 250 \times\ 250 = 62500$, and ...
3
votes
1answer
1k views

Image in table covers horizontal line above it

I have a table with images in one of the columns. My problem is that the image overlaps the horizontal line above it, making it look bad. I first tried putting a \\ after each \hline, but this causes ...
12
votes
2answers
1k views

Spacing in beamer seems to change when \pause is added

beamer seems to sometimes add vertical space when I add \pause commands; an example is below. Is there some way to avoid that? \documentclass{beamer} \begin{document} \begin{frame} Without pause: ...
99
votes
2answers
73k views

Lengths and when to use them

There are many lengths in LaTeX. For instance, \enskip, \enspace, \quad, \parskip, \smallskip, ... Some of them are mostly used for vertical spacing, some others are mostly used for horizontal ...
5
votes
1answer
1k views

Remove top and bottom margins around listings

When using the lstlisting environment, or similar ones from the listings package, there are paragraph-like margins above and below the actual text. This makes sense in a paper, but gets in the way if ...
5
votes
2answers
568 views

Writing vector * matrix * vector

I am using $\vec{s}^\intercal \vec{A} \vec{s}$ to represent s^T * s * S where s is a column vector and A is a square matrix. The problem with this representation is that there is little too much space ...
13
votes
2answers
585 views

Avoid just nearly filled last lines

Old school typesetters never allowed the last line of a paragraph to be just nearly filled. Either it would be clearly shorter than the other lines or it would be stretched to align with the right ...
32
votes
3answers
3k views

What is the difference in citing/referencing with or without tilde?

I've seen examples referencing a table as follows: Table~\ref{table:overview} shows an overview of all the elements. What is the use of the tilde in front of \ref or \cite and when do you have to ...
5
votes
1answer
1k views

Automatic spacing with feynmf/feynmp?

Background When labels are shown with feynmp, they extend beyond the box of the graph. One can use \fmfframe to allocate an invisible frame to accommodate these, but it seems like you need to ...
11
votes
2answers
332 views

How to check if a section title (or any heading) is the first line of a new page?

I would like to be able to use an \if command to check if a \section appears on the first line of a new page. If a section heading is the first line of a new page, I would like to then adjust some of ...
11
votes
1answer
23k views

underfull \hbox (badness 10000) in paragraph

Why do I get the message: Underfull \hbox (badness 10000) in paragraph at lines 107--108 I want a blank line between the problem name and the table, but if I use \\ or \newline along with a ...
11
votes
1answer
3k views

Unwanted space after figure environment

When the figure environment directly follows a \[ ... \] environment an unwanted space occurs in the output. It obviously seems to be an endlinechar which is changed into a space. ...
5
votes
2answers
1k views

Relation spacing error using =& in aligned equations

The middle equation in the following example seems to have wrong spacing around the = sign. The only difference is that I used =& for aligning around the = sign rather than &=. This worries ...
3
votes
1answer
284 views

Inserting a \bigskip between section and subsection using a macro?

I'm trying to conform to the IoP guidelines, which from the IoP latex files they provide do not seem to follow the IoP guidelines. Several colleagues of mine have altered the files so they do fit the ...
7
votes
1answer
2k views

\parskip inserts extra space after floats (and listings)

This question seems to be a duplicate of How to remove the skip after a listing when "\parskip" is increased with "\baselineskip"? but the answer given there doesn’t work although ...
3
votes
2answers
3k views

Equation: Using \left brackets inserts unwanted space [duplicate]

Possible Duplicate: Spacing around \left and \right I'm having some problems with writing down an equation in LaTeX. It's only a minor issue regarding appearance, but I'm kind of a ...
8
votes
3answers
2k views

Border around figure does not fit

I want to insert a bitmap image in my document. I would like to put a tight and thin border line around the image. Apparently, the way to do this is with \framebox. I want to have the border fit ...
13
votes
2answers
1k views

vspace before itemize in a Table cell, tabular vs longtable

In the following MWE, one sees the difference between tabular and longtable, with respect to the vertical space before an itemize, inside a cell : \documentclass[12pt]{article} ...
3
votes
1answer
431 views

Extra space before labeled theorem body with thmbox or thmtools+thmbox

Package thmbox seems to add an extra space at the beginning of the body of the labeled theorems. See example below. Package thmtools with the thmbox option does the same. Latex original, package ...
1
vote
1answer
3k views

How to put subcaptions below subtables, and increase gap between subtables with 'subfigure'?

Using 'subfigure', how can I create subtables within a table, such that a) subcaptions are underneath each subtable, and b) there's a reasonable horizontal gap between the subtables? So far I've only ...
3
votes
1answer
10k views

Vertical space before section title with titlesec

I was trying to eliminate the vertical space before and after the title of a section by using the titlesec package and the command \titlespacing*{\section}{0pt}{0pt}{0pt}, but it works only in ...
21
votes
1answer
30k 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 ...
8
votes
1answer
592 views

biblatex: different output for one, two, or three authors

I'm using/customizing the verbose style in biblatex. This is the desired output, depending on the number of authors (just focussing on the authors): Apple, Anthony. Title. [⇦ 1 author] Banana, ...
2
votes
1answer
1k views

Spacing in list of figures / tables for entries from appendices

Having made the changes Werner very helpfully suggested in the Separate table of appendices - pdf bookmarks & avoid previous chapter's format, my list is up and running but I have some spacing ...
4
votes
1answer
615 views

\addvspace{x}\noindent … \addvspace{x} doesn’t work

The combination of \addvspace{x}\addvspace{x} will cause the skip x but \addvspace{x}\noindent \addvspace{x} gives a 2x skip. \documentclass{scrartcl} \newenvironment{env}{% ...
8
votes
1answer
4k views

How do I increase the spacing between header text and the 'headrule' line with fancyhdr?

This is going to be something so obvious that I'm almost embarrassed to ask! I've been using fancyhdr to put some fancy headers and footers in my thesis template – in fact, doing what it says on the ...
6
votes
1answer
1k views

List of Figures: How do I get a vertical space between figures from my final chapter and my first appendix?

I'm using tocloft with the report document class. I have four chapters and some appendices. My List of Figures produces vertical spacing between figures from different chapters, but it does not add ...
4
votes
1answer
3k views

Change \abovecaptionskip for some floats only

I'd like to change the \abovecaptionskip (space between figure and caption) for the listing floats of the minted package only. How can I do that?
8
votes
2answers
2k views

How to reduce hspace between columns in align environment

With the following MWE, I have 2 columns: \documentclass[12pt, a4paper]{scrartcl} \usepackage{amsmath} \begin{document} \begin{align*} 4 &= 4 && \text{yes}\\ 0 &= 0 && ...
8
votes
1answer
1k views

Strange behaviour of titlesec, with colored titlerule

With the following MWE, i get the Section title underlined in black : \documentclass[12pt]{article} \usepackage[explicit]{titlesec} \usepackage[dvipsnames]{xcolor} \titleformat{\section}% ...
12
votes
4answers
17k views

Space before chapters and contents

I am using LaTeX to write my dissertation, and I have realised that on the table of contents and on every chapter page, LaTeX leaves a lot of empty space. What I mean is that lets say in the page ...
18
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 ...
15
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 ...
4
votes
1answer
563 views

Suppress top skip between own frame environment and itemize

I need to typset a book with a given definition of {itemize} and I added a {framed} environment by using mdframed. If the first line inside {framed} is normal text everything is fine but if it ...
3
votes
1answer
769 views

Spacing in multiple choice question

I tried to make multiple choice question using the following code... but the choices are not uniformly distributed in a single line... I used \hfill by replacing \penalty -50\hskip 2em plus ...
6
votes
1answer
5k views

Different spacing around equation and align

In my document, I use align and equation, depending on the length of the equation. They are spaced differently, as you can see on the picture below. I read that comments in the empty lines would ...