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

20
votes
1answer
1k views

What does the tilde character (~) do in math mode?

What effect does the tilde character ~ have in math mode? Is it the same non-breaking space that it is in text mode? Is it bad style to use ~ in math mode? I've seen it used in some examples but ...
19
votes
2answers
22k views

How can I reduce padding after figure?

\documentclass{mwrep} \usepackage[draft]{graphicx} \usepackage{hyperref} \usepackage[all]{hypcap} \makeatletter \g@addto@macro\@floatboxreset\centering \makeatother I use figures with captions. ...
19
votes
6answers
3k views

How to increase row height while using booktabs?

I'm making a table using booktabs. One of the columns contains a series of fractions. \documentclass[12pt, letterpaper]{article} \usepackage{nag} \usepackage[margin=1.0in]{geometry} ...
19
votes
3answers
151k views

How to add indentation

I am writing my Thesis report using LaTeX, I need to add indentation because every thing is right but only thing is every new paragraph is starting at initial stage but I need to add some indentation. ...
19
votes
4answers
8k 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 ...
19
votes
2answers
567 views

Too much space before digit “1”

In many fonts, the digit 1 contains a lot of empty space on its left side. Maybe this is desirable inside a number like 512, but it looks wrong to me when the 1 appears at the beginning of a word, as ...
19
votes
3answers
3k views

Get the size that a figure is being rendered

Suppose I have a figure in my LaTeX document: \begin{figure} \includegraphics[scale=0.5]{some_graphic} \end{figure} My question is pretty simple: Is there a way to get the size that some_graphic ...
19
votes
3answers
6k views

Two consecutive spaces

When using some other editors, when you type two spaces with your space bar, two spaces are effectively displayed. This is not the case in LaTeX (btw, that's not the case on these websites ;) ). My ...
19
votes
2answers
119k views

Adding tabs or creating my own command

I have a problem adding tabs and I can't use a tabular environments (like tabular or tabbing) because I can't mix it with enumerate environments. Is there a way to add a simgle tab like in any text ...
19
votes
3answers
5k views

Phantom spaces in listings (pdf)

I have a problem with SQL code in a PDF document. For code representation I'm using the listings package. Everything works perfect until I copy-paste that code from the created PDF document. I get ...
19
votes
2answers
379 views

How do I define a new punctuation mark?

Here's is some code for a variant exclamation point despite its various short comings (such as non-scalability) \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{calc} ...
19
votes
1answer
1k views

Different vertical spacing (parskip) between concurrent section titles and paragraphs

I'm trying to remove the spacing between section headings, but maintain the paragraph to section heading spacing. Even though I set titlespacing before and after to *0, there is still spacing - quite ...
18
votes
3answers
38k views

Reducing spacing after headings

I've searched many sites but I couldn't get any answer. Here is this mystical question: How can i reduce the spacing after headings? Here is my code. \documentclass[12pt,a4paper]{article} ...
18
votes
4answers
12k views

Removing spaces between “words” in math mode

I'd like to set $1024 \times 768$ without any space between the three items. Is this possible? If so, how? E.g., what I get is: 1024 x 768 and what I want is: 1024x768
18
votes
6answers
12k views

How should imaginary numbers be typeset?

I've never had to typeset complex numbers before and I'm finding that I'm uncertain about what best-practices are. My question is really about typesetting just i. (Hence my title referring to ...
18
votes
2answers
830 views

What is the right way to use of non-breakable space before math expressions?

I have seen LaTeX code that puts a ~ between every math expression and the text preceding it, does not use ~ in this manner at all, and uses a ~ in this way if and only if the math expression ...
18
votes
3answers
14k views

Dynamic signature/date line

I'm trying to create a signature and date line in a document. I need the date line to always be in the same spot on the page no matter what name is under the signature line, such as: ...
18
votes
3answers
6k views

How can I make vfill to work without adding any text before?

Using \vfill between two texts works: \newpage bla \vfill blabla but it doesn't work if there is no text before it: \newpage \vfill blabla How can this be achieved?
18
votes
2answers
11k views

How can the margins around a table set to 0pt?

I need to put a table inside another table, and would like to set the outside margins of the inner table to 0pt. How can I do this (in particular for tabularx, but hopefully this would be the same for ...
18
votes
2answers
4k 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 ...
18
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 ...
18
votes
3answers
701 views

How to replace all pictures by white rectangles?

I have a long document (800 pages) with lots of pictures (300 pictures). I have to produce a version of this document without the pictures (for copyright reasons). The solution I have found so far is ...
18
votes
3answers
1k views

Typesetting a dictionary containing pictures

I am seeking advice (any ideas) how to typeset a bilingual dictionary that will contain many pictures. The picture below shows the dictionary. Problems: The lines in columns differ. The spaces ...
18
votes
1answer
5k views

Remove vertical space before table of contents title

I've been trying to figure out a way to easily reduce the space/gap from the top of the page to the table of contents title, as in to reduce the vertical space before the table of contents begins. ...
18
votes
1answer
1k views

Why is \parskip zero inside a minipage?

This question was originally entitled "inconsistent paragraph spacing with \parskip inside minipage" as the MWE below shows. But I found the answer at How to preserve the same parskip in minipage, ...
18
votes
1answer
1k views

Spacing around image

Knuth is on record that he incorporated approximately 100 typographical rules in TeX. I am struggling to discover the balance. Consider the figure below, What should be the amount of space around ...
18
votes
1answer
352 views

Drawbacks of redefining math accents with extra leading {}?

As I discovered through the non-bug latex/4253, TeX has a (mis)feature whereby it ignores braces around a \mathaccent construction: ${a_b}_c$ works, but ${\tilde a_b}_c$ fails with a "Double ...
17
votes
4answers
788 views

Which commands consisting of a non-letter eat spaces afterwards?

Command names consist of a sequence of letters (until and excluding the first non-letter) or of a single non-letter. Command names ending in a letter (including of course those consisting of a single ...
17
votes
3answers
12k views

Creating a new environment with one optional argument

I want to create a new environment with one optional argument in LaTeX. Here is what I used: \newenvironment{argument}[1][]{% \par \noindent \textbf{Argument#1:} \noindent} {} When there is no ...
17
votes
4answers
2k views

No space present after ensuremath

When I insert a short maths section in a sentence, it renders fine with a space each side as expected: ...returned $\mathcal{P}$ from... If I define a command to do the same thing, it also renders ...
17
votes
4answers
594 views

Microtype and quote environment leads to different indent of first line

When the microtype package is loaded a quote environment which starts with punctuation marks is inconsistent "indented". The first line in the following minimal example is unaffected, i.e. at the same ...
17
votes
2answers
2k views

When is it good practice to use \unskip

One sees in source2e the command \unskip used in various places. My understanding in general terms is that the macro is the equivalent of \ignorespacesbehind. Where would it be recommended to use ...
17
votes
2answers
502 views

How do you create .+?

I would like to display a = b .+ 1 But it is displayed as a = b. + 1 (moves . next to b).
17
votes
2answers
282 views

Why is unskip not working here?

I'm trying to define a macro to be used as follows: \usepackage[normalem]{ulem} \newcommand{\thesis}[1]{\uline{\ignorespaces #1\unskip}} % underlining required by school - I know, I know % later... ...
17
votes
2answers
1k views

Entire document typed in monospace font

I want to put an entire document into monospace font for various reasons. This is nominally fairly easy; you can say \renewcommand{\familydefault}{\ttdefault}. However, there at least two problems ...
17
votes
3answers
2k views

en dash and em dash spacing

I've noticed that en dashes and em dashes run into certain numbers and letters, and I don't believe it's standard to use spaces with these. For example, if a 'b' comes before the dash or a '6' comes ...
17
votes
2answers
12k views

How to globally change the spacing around equations?

How could I go about setting the 'above' and 'below' vspaces around the equation environment? If the same could be done for the subequations or gather environments, this would be a bonus.
17
votes
1answer
32k views

Inserting a specific number of blank lines

I'm new to LaTeX and trying to format my Honors Thesis, which has very specific formatting rules to prepare the manuscript for publication. For instance, on the Abstract page, I am required to place 3 ...
17
votes
1answer
805 views

Is there a rule of thumb to set the space between columns?

I've never heard about a convention to adjust the space between columns in a writing, it seems it depends on aesthetic sense--even in scientific literature---doesn't it?
17
votes
1answer
832 views

Adding a “minimum” vertical space

Is there a way to add vertical space, but only if that much vertical space has not already been added? In other words, to say "put a minimum of X points of space here, and if some other command has ...
17
votes
2answers
1k views

Improving typesetting of sums with long limits

This piece of code \documentclass{article} \usepackage{mathtools} \begin{document} ...
17
votes
2answers
9k views

When should you use \vskip (\hskip) rather than \vspace (\hspace) in a LaTeX document?

I assume that, to guard against strange errors, you should use \vspace rather than \vskip whenever possible in a LaTeX document. But are there any situations in which you must use \vskip? I'm ...
17
votes
1answer
310 views

Is there a method just write `---` to get an em-dash, putting thinspace both before and after it?

Is there a method just write --- to get an em-dash, putting a thinspace both before and after it? The situation about break is similar with the original ---.
17
votes
1answer
317 views

What is the ConTeXt equivalent of LaTeX “\@.”

In English text, TeX follows the convention of putting extra space after a period by default, which I like. However, in the case of abbreviations it causes a problem. To suppress the extra space, ...
17
votes
2answers
2k views

How to change the interword spacing?

I'm trying to enlarge the interword spacing, because with ITC Kabel's default spacing it's sometimes hard to decide where is the space between two words. I read the manual of the microtype package, ...
17
votes
2answers
538 views

Non-invasive replacement for \fbox?

I am trying to create a macro that improves on \fbox by working correctly in all cases and by being minimally invasive with respect to padding. What I've got so far works fairly well, but I'm having ...
17
votes
2answers
3k views

How much space between number and unit?

Javier Bezos (famous of titlsec, tensind, spanish ... packages; and now maintainer of babel) wrote a nice book on typography and scientific notation in spanish. He says (pag. 82) that the space ...
17
votes
5answers
5k views

Adjusting vertical space between TOC entries using Beamer

I have a rather lengthy table of contents for a presentation. Beamer is not compressing the vertical space between TOC entries, but instead running the last item off the bottom of the output! Is ...
17
votes
1answer
306 views

Spurious Vertical Space Introduced by multicols (Additional Case)

This seems to be a duplicate of Spurious [?] vertical space introduced by multicols, but the solution from there does not seen to work for me. Basically I want the case of using multicols to not ...
17
votes
2answers
418 views

Issues with TeX sub-formula formatting

As generally acknowledged TeX offers superb formatting capabilities for math in an automated fashion. Nevertheless there are some areas with clear deficiencies that one either has to accept or ...