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

5
votes
2answers
2k views

Vertical spacing in tables with math

How can I force LaTeX to vertically center math in a table taking into account subscripts, superscripts, etc? It appears from the output below that LaTeX vertically centered the $JV$ and added the ...
5
votes
1answer
80 views

Removing whitespaces caused by separate source files

I have an article which consists of multiple files, a main file with following section includes: \include{Introduction} \include{ProposedProtocol} \include{Comparison} \include{FutureWork} ...
4
votes
1answer
140 views

Removing a half-blank line and precisely calculating a space

Consider the following MWE: Some text, Some text, Some text, Some text, Some text, Some text, Some text, Some text, Some text, Some text, Some text, Some text \begin{enumerate} \item This is a line ...
4
votes
1answer
211 views

Add \par only if last paragraph did not end with displayed math

Background: I have named "sections" (sections for rest of this question) which are conditionally displayed or suppressed based on parameters. To simplify the test case below, these are controlled by ...
4
votes
2answers
2k views

vspace has no effect in parcolumns

I have following template for my resume wherein I am trying to get rid of the space between two education fields (space between two university entries, this causes my resume to go to second page). The ...
4
votes
3answers
7k views

Writing a limit so that the subscript goes directly underneath

When I write $\lim_{x \rightarrow p} f(x) = q$, the subscript x \rightarrow p appears to the right of the limit, instead of directly underneath it. When I try $\displaystyle \lim_{x \rightarrow p} ...
4
votes
4answers
464 views

\frac{1-z^{n+1}}{1-z} doesn't look very good and how to leave space equal to the size of a given text

When we write it by hand we usually align the 1's in numerator and denominator. Should I change it manually, i.e. defining a command for typing the sum of the geometric progression or is there a ...
3
votes
1answer
117 views

How to measure the vertical space that was typeset without placing it into an environment?

I would like to achieve automatic clearing of a {floatingfigure} at the beginning of a new \section for texts automatically created by Pandoc. For this to work, I am in need of a way to measure the ...
3
votes
1answer
206 views

Citing in mla style using & adjusting authortitle-ticomp (and not biblatex-mla)

MLA without biblatex-mla I'd like to set a document conforming to the MLA style. As I was recommended elsewhere, I don't want to do this with biblatex-mla, but instead use the more robust styles that ...
3
votes
0answers
108 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 ...
3
votes
2answers
432 views

I want to fill all the space between paragraphs on a page with a grid(graphic)

I took an example from another answer to a similar question (How to define a figure size so that is consume the rest of a page?). On a page of an exam paper I want the following: Question ...
2
votes
3answers
551 views

Space after comma in units package

I have a problem with using the units package. In my thesis I used it sometimes in math environment, sometimes not. Now I realized that there is an addition space after the comma in math mode. I think ...
16
votes
4answers
653 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
2answers
369 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} ...
14
votes
1answer
332 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 ...
10
votes
2answers
163 views

putting spaces within text block

I have a block of text that I would like to automatically break in blocks of equal length. Something like what \num does with numbers. What I need is a definition for what I called \makeBlocks. The ...
10
votes
1answer
269 views

How to define commands that do not consume any space

I want to create an environment that generates special tables and graphs. Inside the environment the user should be able to execute predefined commands that either modify the behavior of the final ...
10
votes
1answer
2k views

Distance between footnote and the line above it

How can I edit the distance between footnote and the line above it?
10
votes
3answers
7k views

Reducing white space above date in Letter Class

How can I reduce the amount of whitespace at the top of the page in the letter class? I've added some text to serve as a letterhead, and everything is lined up... but starts way too low! Does anyone ...
10
votes
1answer
835 views

hyperlinks in biblatex

I'm making a biblatex style to solve an issue with the standard styles: if you have a reference with a doi field, it just prints the DOI number, with a clickable link if hyperref is enabled. But a ...
9
votes
1answer
717 views

Remove indent with \cite

I don't want to have a space between my bracket and the default square bracket generate by the package cite. When I write: (\cite{ref1,ref2}) the result is: ( [1], [2]) instead of ([1], ...
8
votes
3answers
521 views

“Fill in the missing words” needs line breaking before a \phantom{word}, and a list of removed words

Apologies for the very long title. I'm writing a "fill in the missing words" document. I have made a makro \fjern{} ("remove" in Norwegian) which underlines the argument and places it in a phantom ...
8
votes
1answer
639 views

Vertical spaces above and below longtabu

This is, in a way, a follow-up-question to New table-environment, spaces and enclosing { } in a new environment, which has already been answered conveniently by @egreg. Please compile this MWE to ...
8
votes
2answers
491 views

Aberrant vertical spacing with {align} and friends?

Consider documents with the following preamble: \documentclass[12pt]{article} \usepackage{amsmath} Question #1. Why do we get bad alignment with the following code? \noindent ...
8
votes
2answers
535 views

How to append code to a section?

In my scrartcl document I want to change the spacing between sections and the first paragraph. Since I am using the parskip package, the parskip is set to a non-zero value. The \section command uses ...
8
votes
1answer
2k views

Space above chapter with titlesec

The following code gives me some space above the chapter title, that I'd like to avoid: \documentclass{book} \usepackage[showframe]{geometry} \usepackage{titlesec} \titleformat{\chapter}[frame] {} ...
8
votes
1answer
169 views

merge consecutive skips like css

I have a series of figure-like paragraphs generated by a command of mine, and would like to have a minimum amount of vertical space above and below these figure-like paragraphs, but I don't want the ...
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}% ...
8
votes
2answers
938 views

\frenchspacing not setting the space factor codes correctly?

When I type \showthe\frenchspacing, I get the following output: > \frenchspacing=macro: ->\sfcode `\.1006\sfcode `\?1005\sfcode `\!1004\sfcode `\:1003\sfcode `\;1002\sfcode `\,1001 . Shouldn't all ...
8
votes
2answers
586 views

LaTeX sphack family of commands.

LaTeX offers a number of commands that can be used in macros that want to be invisible i.e., not leave any extra space when used in the middle of text. These macros include \@esphack, \@bsphack, ...
7
votes
1answer
196 views

Removing strange vertical space after first (customized) \item

I have a custom environment properties (that is almost ready for release to Github) that works like so: \begin{properties} \item[no max in reals] \forall a \in \Re, \exists b \in \Re : a < b ...
7
votes
1answer
531 views

What's causing extra white space to the left of my standalone TikZ image?

I have extra whitespace to the left of a TikZ image produced in a standalone environment: I don't know why this is occurring. I thought perhaps the left projector bounding box, but the right ...
7
votes
2answers
3k views

Increase space between listings env. and surrounding text

How can I set the space between a listing (lstlisting) and text that surrounds it? Is there a parameter I can set at the beginning of my document, that controls this? I tried framesep, but it just ...
7
votes
1answer
306 views

Spaces before biblatex-mla shorttitles

I'm using LuaLaTeX with the biblatex-mla style for \autocites* quotes in my text. But before shorttitles like "OED" the spaces are missing. How can they be inserted? Here is a minimal working example: ...
7
votes
2answers
2k views

Spacing between items containing a parbox

I would like to make a list, each entry of which has two pieces of information: a date range, and a description. If there are two separate date ranges that apply to an item, I would like to be able to ...
7
votes
2answers
960 views

Spaces behind \textgreater not working as expected

I have the following code: \textit{WMC \textgreater average} But the text looks like this: WMC >average It does not even change if I add even more spaces. So what am I doing wrong?
7
votes
1answer
564 views

Footnote being pushed to after a float page.

I have somewhat bizarre footnote placement in a document that I'm typing. Unfortunately, I'm also having trouble reducing it to a minimum not-working example as this behaviour seems to depend on many ...
6
votes
1answer
121 views

Why are there no spaces in Hangul-Words (XeLaTeX - xeCJK)

This is my minimal working example: \documentclass{article} \usepackage{xeCJK} \setCJKmainfont{Batang} \begin{document} 나는 남자를 이다 \end{document} As you see, there are spaces between the ...
6
votes
2answers
429 views

What are the differences between \par\vspace{2cm}\noindent and \\[2cm]?

I am designing a titlepage for my report and I am a bit confused in deciding to use either \par\vspace{2cm}\noindent or \\[2cm] (for example). Shortly speaking, what are the differences between ...
6
votes
2answers
226 views

Use of optional argument stretch in \parbox

I'm having some difficulty on how to use the "stretch" optional argument of \parbox. Is it supposed to equally interspace lines of text inside a box of determined size? If I code it like: ...
6
votes
1answer
237 views

Gauss package: gmatrix not equivalent to corresponding amsmath environment

The following quote is taken from the gauss package documentation: The package defines a new matrix environment gmatrix which behaves just like Latex's and AMS-Latex's matrix. But when using ...
6
votes
3answers
166 views

How do I stop a table where the margin falls, rather than using the textwidth command?

I've been having some problems with nesting tables in the tabularx environment. Basically, I would like each table to stop at the margin. Ordinarily, I would achieve this with \textwidth as the width ...
6
votes
1answer
5k views

TikZ: remove margin, padding, border around nodes containing images

I want to create a simple figure where images are connected with arrows. Here is what I did: \begin{tikzpicture} \node[](A) {\includegraphics[width=0.2\textwidth]{a}}; \node[right=1mm of A](B) ...
6
votes
1answer
417 views

Numbers too close to figure captions in List of Figures, can this be fixed without changing the class?

On my List of Figures page, my figures go up to 4 digits, such as Figure 13.14. This causes the figure list to be right up against the text, such as: 13.9 My figure 13.10My next figure I need to ...
6
votes
2answers
5k views

How can I hide the chapter headings number on LaTeX and change the spacing?

I'm writing my Thesis but I have run into some layout troubles, I'm using the standard book document class, which results in my Chapters headings in the form of: Chapter # Name of my chapter ...
6
votes
1answer
743 views

Troubleshooting extra spaces

My document has lots of extra whitespace appearing between various elements. The problems appear around one macro which appears multiple times. After every line in the macro, I've placed %'s, however, ...
6
votes
1answer
2k views

titlesec: Vertical space that I don't want

Again me, still trying to emulate a very specific layout... I used the titlesec package to define chapter and section titles, and am very pleased with the outcome... except of some ponts' worth of ...
6
votes
2answers
3k 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 ...
6
votes
2answers
2k views

Multiple authors don't fit on one line

I am working with the article class. I have four authors. Unfortunately, they are just a tiny bit too wide to fit on one line. (I'm talking less than a quarter inch from the margins I had set.) How ...
5
votes
1answer
149 views

Reduce horizontal width of miniframe in beamer

I have a beamer presentation with only three sections. Right now they are spaced at equal distances across the slide, but I would like to compress them so that they are spaced evenly in the left hand ...