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

14
votes
1answer
5k views

How do I robustly typeset a double-hat?

I'm trying to typeset a symbol with two hat accents (useful for denoting superoperators in quantum mechanics, for instance), but \hat{\hat{L}} produces too much space between the hats. I found one ...
7
votes
1answer
2k views

Including an itemized list within a tabular column using the paralist package

The paralist package offers the option of typesetting an itemized list with a \topsep length of zero, and this is especially useful in a tabular setting. However, the following minimal example does ...
12
votes
1answer
3k views

Blank lines in align environment

Is there a way to insert a blank line between two equations in align environment? From what I understand a blank line is interpreted as \par and \par is not allowed in align. Can I disable this ...
25
votes
3answers
3k views

biblatex: Putting thin spaces between initials

This question led to a new feature in a package: biblatex Robert Bringhurst, The Elements of Typographic Style, rule 2.1.5 states "Add little or no space within strings of initials." If ...
9
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
6k views

Right-aligned columns using the tabularx environment

I'm trying to typeset a matrix which has entries of differing widths. However, for aesthetic reasons, I would like each of the columns of the matrix to be the same width, and I'd furthermore like ...
2
votes
1answer
785 views

Prevent microtype tracking to add space between letters?

I use a latex template with small caps for chapter titles. These are spaced a bit using \textls from microtype package. Unfortunately, microtype does not properly increase the tracking but rather add ...
8
votes
2answers
774 views

To Avoid the white space before negative sign to be treated as mathord

Some time we write a=b\qquad -c=-d then the negative sign was treated as minus sign, you know what happened: the space arround the sign is incorrect. Although it can be done with {-}c=-d or ...
9
votes
1answer
2k views

Spacing around a character in math mode

I'd like to use a character that looks like $\sim$, but has spacing like $\neg$ (in particular, which doesn't leave a huge gap to its right). I know I could do this by defining a symbol which expands ...
30
votes
2answers
9k views

Why should I put a ~ before \ref or \cite?

My question is in the title of this post, but extends to other referencing commands like \eqref, \citep, \citet (and the like) as well.
4
votes
2answers
2k views

Starting an enumerate of an enumerate on next line?

What I'm trying to do is to make my enumerates look like this a) i) answer ii) answer b) answer Currently, I'm using \begin{enumerate} \item \hfill \\ \begin{enumerate}[a)] \item ...
0
votes
1answer
344 views

Query on the \pageref command

I am trying to use the \pageref command and although it seems to work appropriately and finds the correct page number, for some reason (unknown to me..) it causes big spaces before and after the page ...
2
votes
1answer
283 views

Are there any packages that I should not be using with ifthen package

I am new to TeX and I started adding package files to prepare my document without worrying about conflicts. I am asking this subjective question because I am not sure if I can post entire document ...
23
votes
4answers
11k 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 ...
12
votes
1answer
453 views

Simulate the % in a \newcommand

I want to automate quotation marks (not quotes) using a macro. Consider the following code: \newcommand{\mytext}[1]{``#1''} This one works fine: \mytext{This is a very long quote. Lorem ipsum ...
9
votes
2answers
4k views

Prevent a paragraph break after a section heading

In my .cls file for my thesis, I have defined \subsection as follows: \newcommand{\subsection}[1]{% \pagebreak[2] \refstepcounter{subsection} \addcontentsline{toc}{subsection}{ ...
2
votes
1answer
332 views

Program listing outputs text wider than usual

\documentclass[12pt]{article} \usepackage{listings} \lstset{basicstyle=\ttfamily} \begin{document} \texttt{int main(void)} is rendered tighter than in the listing. What lstlisting option would need ...
4
votes
2answers
2k views

Spacing/stretching marginnote

I want to do something like this \marginnote{ \hspace{\stretch{1}} \framebox{text} \hspace{\stretch{1}} } i.e., center the marginnote. The problem seems to be that the width is defined to be that of ...
0
votes
1answer
247 views

Without using `\fboxsep` method, how to make a cell has 4 equal paddings?

Scenario Plese see the screenshot below. The top table is produced using minipage-typed column and the bottom table is produced using m{}. WITHOUT using \fboxsep approach (that was already answered ...
8
votes
4answers
715 views

How to make 4 equal paddings (left, right, top, bottom) in a table cell?

I want each cell in a tabular to have 4 equal paddings of exactly 15pt each. How to make 4 equal paddings (left, right, top, bottom) in a table cell? \documentclass{article} ...
11
votes
2answers
696 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, ...
3
votes
2answers
424 views

Controlling vertical space after headline when using \parskip

When using a 0 length \parindent and an expandable length of \parskip it is my feeling that the space after section headlines becomes too big (see example). Is there another command I should use for ...
9
votes
2answers
998 views

Spacing before punctuation in displayed equations

What is the correct spacing before punctuation in a displayed equation? I have the habit of writing Let \begin{equation} y = f(x) \,, \end{equation} where \begin{equation} x = 3 \,. ...
3
votes
3answers
5k views

How to get new line after \subparagraph title?

Is there a default way to change the style of the \subparagraph title, namely to add a new line after the title? Is there a way to do it without \renewcommand (some style changes of something else) - ...
10
votes
3answers
4k views

Spacing around \text{} in mathmode

Inspired by this question, here's my mathmode spacing bugbear. I quite often have equations that look like this: \begin{equation} \text{If}\ B_1 \succeq B_2 \ \text{and}\ B_2 \succeq B_3 \ ...
8
votes
4answers
6k views

Avoiding placing `,\,` everywhere in mathmode

Whenever I write ", " (with a space after the comma) in mathmode, I really want a space there. usually, this is either something like the points, $a, b$, and $c$.... or in an explicit vector: ...
2
votes
2answers
1k views

Stretch space characters horizontally

I'm using XeTeX to mimic another document, but I only have a similar font which I stretch using the extend and letterspace options. My main problem is though, that my font's spaces (U+0020) are only ...
21
votes
3answers
3k views

When should we use a blank line?

I only know that we have to make at least one blank line between two adjacent paragraphs. My question is: What is the proper way to make use of a blank line ? For example: Is it recommended to ...
2
votes
1answer
527 views

Match spacing of align in array environment

To typeset some displayed equations, only the array environment was powerful enough. However, the spacing of the array environment doesn't match the spacing of the align environment. How do I set ...
3
votes
2answers
521 views

A fix for \vspace*, does it break other things?

Thanks to the answers to this question, I believe I have a fix for \vspace* that will make it work sanely at the top of a page. \def\@vspacer#1{% \ifvmode \dimen@\prevdepth ...
15
votes
1answer
3k views

Why does \vspace*{0pt} add vertical space?

I'm trying to format the title of the table of contents using the tocloft package. It inserts code that looks like the following. \par \vspace*{\cftbeforetoctitleskip}% % code to typeset ...
3
votes
1answer
601 views

Spacing of vdots in a0poster class

I'm having trouble with the spacing of the individual dots that are typeset by \vdots when using the a0poster class. In particular, the dots are much closer together than the dots typeset by either ...
6
votes
1answer
642 views

Paragraph spacing in other languages.

I am writing a document in French using LaTeX and I found a weird behavior with paragraph spacing. Here is a MWE (in English): \documentclass{article} %\usepackage[french]{babel} ...
5
votes
4answers
3k views

How to center the whole tabular, center the header line cells, and have some space after it?

I have a few questions about tables that are probably pretty basic. Here is the code for my table. \begin{table} \begin{tabular}{| r | l | l |} \hline \textbf{Species} & ...
6
votes
1answer
5k views

Eliminate space at end of list in a table

I have a tabular environment, created with array loaded and using m columns, the cells of which mostly contain lists. In cells with a list, there is about 1em of dead space at the end of the list ...
2
votes
1answer
139 views

How can I position some text on the same place on multiple pages with partly different content?

I am creating the first pages of a book and I want one page with just the title and the next page to have title plus the authors and some other stuff. However LaTeX places the title differently on the ...
10
votes
1answer
6k views

Relative padding of a minipage's paragraph

Background Created a custom command for rendering quotations (epigraphs). Problem The text in the following image has no space at the border: The word "and" is flush with the right margin. Code ...
3
votes
2answers
1k views

Extra large gap in article where figure code is, even though figure is at top of page

I writing an article using the amsart document class and whenever I use \begin{figure}...\end{figure} to put a figure into the article, it places the figure at the top of the page (which is fine), but ...
5
votes
1answer
855 views

biblatex, hyperref and punctuation issue

And a little bit more biblatex stuff: I've noticed that, when using hyperref, there is an issue in form of an ugly space between the citation and the punctuation (be it comma or period). Please, take ...
8
votes
2answers
1k views

What is the easiest way to decrease the linespread in a table of contents?

Using the scrartcl class for a report I am writing, I would like to have only the sections show up in the table of contents. Although I manage to do that, the linespread looks too big in my eyes, and ...
14
votes
1answer
3k views

Abbreviations and spacing

I'm sure this is a pretty standard questions that's been asked (and answered!) a hundered times before, so apologies for boring people. In LaTeX, I'd like to write a macro for abbreviations, such as, ...
5
votes
3answers
5k views

tabular* with rubber spacing and \cline

I'm using a tabular* with rubber spacing to fill the complete width of the page. This works fine, except that when I use \cline, the line is not complete. It seems that \cline does not cover the ...
13
votes
2answers
3k views

Ugly spacing around f in math mode

My paper contains many math expressions like $abcde$ or $abdefv$. Unfortunately, the latter looks very ugly, particularly in regards to the spacing around the f. In particular, there is a ...
3
votes
1answer
2k views

An environment to change the vertical space around a formula

Specially in beamer presentations, I use a custom environment to change the vertical space around a formula. The code is: \newenvironment{shrinkeq}[1] { \bgroup ...
3
votes
1answer
2k views

Latex ignoring vspace. How do I get these two images on the same page?

I have the following to insert two images into a latex document: \begin{center} \hspace*{-1in} \includegraphics[width=8.5in]{rmse.pdf} \vspace*{-2in} \hspace*{-1in} ...
7
votes
1answer
604 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
4k views

Vertical space before environments

How can I control the vertical space before an environment, e.g., taublar or minipage. Here is an example that reproduces my problem \documentclass{article} \begin{document} \noindent ...
2
votes
1answer
11k views

Two double spaces between paragraphs

How can I set two double spaces between all paragraphs in a report? I have already set double spaces between lines with this command: \usepackage{setspace} \doublespacing
3
votes
3answers
1k views

Protecting negative spacing in math mode

I am using \! to create negative spacings and put a dash over a symbol in math mode. (Here I am denoting missing transverse energy by defining a command \met where a dash is put across E_T, see code ...
10
votes
1answer
7k views

How to shorten the length of an arrow?

I use tkz-graph.sty from Altermundus. When I make an arrow from vertex A to vertex B, the arrow is too long: it goes from the center of A to the center of B. Can I shorten the arrow on both ends by a ...