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

10
votes
2answers
244 views

Math Spacing in the presence of a trailing/non-trailing comma

I thought I knew how to use a \hphantom{} but don't know of an easy way to handle this case due to the comma. I want to get the text aligned for the X row. I added the appropriate \hphantom{{}+1} ...
10
votes
1answer
342 views

Space between the two slashes in “http://” too big

I'm using a lot of links with http:// in my document, but the two slashes are too much separated, I'd like them to be more near each other. How do I do this, in a neat way? I'm using a sans-serif ...
10
votes
2answers
3k views

how to reduce the distance between the picture caption and the picture?

I found that the distance between the picture caption and the picture is a little large, as we can see in the picture I use the code as follows, thus, how to reduce the distance between the caption ...
9
votes
1answer
3k views

Vertical spacing before and after equation environment: empty line or not?

The vertical spacing in front of and behind the amsmath equation environment is different whether I insert a blank line or not (im using KOMA-Script with parskip=half if this is important). I'd like ...
9
votes
1answer
451 views

How does changing colour affect spacing?

In the following example, the space after the red equation is much larger than the space after the black one. \documentclass[12pt]{article} \usepackage{xcolor} \begin{document} \[ a = b \] The quick ...
9
votes
5answers
7k views

Spacing around table and figure environments

I've got table and figure environments, some placed "here" with h and some arranged automatically. But all together I don't like the spacing above and below the figure and table environments. I ...
9
votes
3answers
4k views

Length between nested lists in beamer

How do I adjust the length between nested lists? For example, in the following, I would like to adjust the distance where it states "distance here" \begin{itemize} \item one %% distance here ...
8
votes
1answer
609 views

The line spacing in the list of algorithms

This is my code: \documentclass[12pt,a4paper]{book} \usepackage[T1]{fontenc} \usepackage[chapter]{algorithm} \renewcommand{\baselinestretch}{1.5} \begin{document} \begin{spacing}{1.2} ...
8
votes
1answer
225 views

What's the right space to right the alignment of a right aligned align environment?

As Hilbert would have put it, had he lived in the TeX-era: No one shall expel us from the Paradise that AMS has created. and one aspect of that paradise is release from the tyranny of eqnarray ...
8
votes
2answers
379 views

Custom ToC — Put vspace only below chapters that have sections in them

I’m using the titletoc package in the book class. Currently, my chapter entries are configured like this (I left out the unimportant parameters for simplicity): \titlecontents{chapter}[0pc] ...
8
votes
2answers
765 views

Apply \intextsep at top of page

In trying to provide an answer to this question: Two column trouble - positioning of figures and text, I realized that I need to shift the wrapfigure up to account for the extra spacing that the ...
7
votes
1answer
4k views

Vertical spacing between numerator and division symbol in \dfrac

How can I fix the vertical spacing between the numerator and the division symbol when entering fractions. Eg. in the following code, the spacing between a and the division symbol is greater than one ...
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 ...
7
votes
2answers
1k views

Grouping the list of listings by chapter

I am using the listings package. I want to print out a list of listings, which I can do. The thing is that in the other listings the typesetter "groups" figures/tables by chapter. Is it possible to ...
5
votes
1answer
3k views

How can I control the horizontal space between minipages?

I'm trying to place two mini pages next to each other, one with text, one with an image. But my code has them spaced really far apart. How can I bring them together horizontally. I've tried \hspace ...
5
votes
2answers
5k views

Too much space around wrap figure

I am using the wrapfig package to have my text around the figure but there is too much space around it as you can see below. Here is the code that I am using, I looked at the wikibook on LaTeX for ...
5
votes
2answers
9k views

center and \centering both add space above; \centerline does not

The nag package suggests I use the center environment in LaTeX, rather than the TeX \centerline command. When I do that, however, I find that the former inserts a blank line above the line (in my ...
5
votes
2answers
907 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} ...
4
votes
2answers
974 views

Indentation in list environment

How can I specify explicitly both the indentation of the label and the actual item's text from the left margin in a list environment. I would like to achieve the following:
0
votes
1answer
525 views

Vertical space between headlines, tables, images and the following text too large

Is there a way to globally set a value (or minimum and maximum value) for the vertical space between, for instance, headlines, tables, images and the like and the following text. Right now I have ...
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 ...
13
votes
1answer
2k views

How to remove top and bottom whitespace of longtable?

I am using longtable instead of tabular environment and noticed that it puts some additional whitespace at the top and at the bottom of the table. Is there some way to remove it (something less hacky ...
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 ...
10
votes
1answer
4k views

Size of TikZ ellipse node

When I set the minimum size of an ellipse in a tikzpicture environment, it expands into a circle if the inner content does not grow as large as the ellipse shape itself. Is there any way around it? ...
10
votes
2answers
269 views

Compute remaining horizontal space in align environment

I use align* often and sometimes it is preferable to add text to the right hand side of an equation instead of using \intertext, or \shortintertext, which tends to interrupt the math flow. This is ...
10
votes
5answers
1k views

parenthesis around underbrace too big

I have the problem that I want to have an equation with underbrace but the surrounding parenthesis shall not include the underbrace, i.e. should have the size as if the underbrace wasn't there. Here ...
10
votes
2answers
2k views

Best practices for spacing regarding fractions and roots?

My problem is that I am about to write a longer mathematical text, and it will be filled with integrals. Integrals tend to be filled with pesky fractions, square roots and what not. Personally I feel ...
10
votes
3answers
742 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? ...
9
votes
2answers
2k views

Extra page at beginning of appendix containing big figures

I have an appendix that contains two full-page figures. The first page of the appendix is always blank except for the title -- I suspect this is a common problem with appendices of full page figures. ...
9
votes
2answers
274 views

Patching commands to remove surrounding whitespace

I'm using the todonotes package to add little margin notes to my text, however writing Hello\todo{test} World! removes the interword space as is already pointed out in this question. So I tried ...
9
votes
1answer
309 views

Spacing issue for newenvironment wrapper of equation environment

If I create a custom environment based on the equation environment, I get a spacing issue: the next line of text after my environment closes doesn't start on the left margin. Example code: ...
8
votes
1answer
119 views

Change spacing around binary operators

I'd like to change spacing around binary operators and this issue is discussed there: How to change default for spacing around binary relations? Is there way how to change spacing in math and ...
8
votes
3answers
509 views

How to extend the text under summation symbol without making extra space

I want to get the following: I tried the following \[ a(i,k) \leftarrow \min\Big\{0, r(k,k) + \sum_{i^{'} | i^{'}\notin \{i,k\}}\max\{0, r(i{'},k)\}\Big\} \] and got How can I make the ...
8
votes
2answers
3k views

Extra vertical space after \hline causes a gap in the right border of an array

I wanted to put a bit of space after an \hline in an array; the main suggestion floating round the Internet seems to be to use \hline \\ [-1.5ex] Unfortunately, this causes a gap in the line on the ...
8
votes
2answers
4k views

How do I write something at the end of the slide in beamer? [duplicate]

I have an image, I want to write its source in a very small font size on the last possible line of the slide, ignoring the available space after image \section{SCS} \subsection{SCS} \begin{frame} ...
8
votes
1answer
3k views

control vertical space before and after verbatim environment?

How do I control how much vertical space appears before and after a verbatim environment? With the following source (run through pdflatex): \documentclass[varwidth]{standalone} \begin{document} text ...
8
votes
2answers
938 views

Horizontal Spacing: double \hspace removal?

\addvspace can be used to create commands which can be stacked together without creating unnecessary padding. This is useful for creating commands which start and end with \addvspace so that they can ...
7
votes
1answer
1k views

Different space between \align and \equation

Why produce the align and the equation environment different space between the text. And what can I do, that it have the same? \documentclass{article} \usepackage{amsmath} \begin{document} Long ...
7
votes
2answers
389 views

A macro for optimization problems

This question is an extension of Using an array environment inside an xparse command. I was advised to make a separate question for the extension. I would like to thank egreg very much for his help. I ...
7
votes
1answer
7k views

Tabular: Underfull \hbox (badness 10000) in paragraph at lines

I read all the questions regarding the error message Underfull \hbox (badness 10000) in paragraph at lines but I am still not sure if my code is correct. The problem is with the tabular of a table. ...
7
votes
2answers
615 views

Excess vertical space in mdframed ending with display math environment

When the mdframed environment ends with an align there is excess vertical spacing at the bottom. I would like to adjust the MyBoxedEnvironment environment such that the vertical space at the bottom ...
6
votes
4answers
346 views

How to repeat text

I get interesting errors with the following macro. Mostly it works, but I get extra spaces after \noindent (but not after \newline). I tried using \loop or \whiledo (from ifthen) but get stack ...
6
votes
1answer
95 views

Moving an enumerate up

I am trying to emulate a table with nested enumerate lists. From my reading, using a table is impossible - lets assume that is true. I am generating the latex from javascript. What I am trying to do ...
6
votes
3answers
567 views

Putting a coloured background behind text without adding whitespace

Consider this: I want to be able to highlight text like this without adding space around it -- so each word in the first line should line up with the corresponding word in the second line. (I know ...
6
votes
2answers
476 views

Keeping the distance between mathematical symbols consistent?

In order to make text flushed both left and right, latex adjusts the distance between words, and to a lesser extent, the distance between characters within a word. This is good, however it also ...
6
votes
1answer
779 views

How to avoid \parskip being applied to \listoffigures etc.?

Follow-up question of Why are \listof{}{} and \listoffigures styled differently?... With the issue mentioned above I finally managed to design my \listof{}{} and \listoffigures as desired but one ...
6
votes
2answers
710 views

latex tabular issue

I am creating a tabular in LaTeX. I want one column to be as small as possible, with no inter column spacing, so that it's just enough to fit the text. I know the answer to this question: I need to ...
6
votes
2answers
5k views

How to reduce the space between the author block and paper text? sig-alternate.cls

I am using the template sig-alternate.cls, but I find that the space between the author block and the paper text is too large, how can I reduce this space? Edit: I want to reduce the space between ...
6
votes
2answers
771 views

Spacing between figures and texts

I'm having some issues dealing with figures. It happens that when I have a page with some text and then it comes a figure, with H property, who doesn't fits into the same page as the text, the text ...
5
votes
1answer
608 views

How to affect the vertical gap between the glossary's name and its body

I'm using the glossaries package for producing of nomenclature/symbols/acronyms lists, but I don't know how to influence the vertical gap between the glossary title and the first glossary entry. ...