Hot answers tagged

161 votes

Space after LaTeX commands

*This is a summary answer, highlighting the benefits and drawbacks for the different techniques available to preserve spaces following a control word. Conceptually, this is intended for LaTeX ...
user avatar
  • 5,935
124 votes
Accepted

\topsep, \itemsep, \partopsep, \parsep - what do they each mean (and what about the bottom)?

The book by Leslie Lamport, LaTeX: a document preparation system (1994) has a figure like the one you asked for on page 113, which explains, among other things, that the vertical space at the bottom ...
user avatar
  • 20.8k
101 votes

Column and row padding in tables

This is an old question, but I've run into the same problem, and all these solutions seemed too complex for my needs, namely in respect to horizontal padding. Looking for a rapid solution similar to ...
user avatar
  • 1,111
100 votes
Accepted

Using the \tab Command

The command \tab exists, but it produces quite a large space. It also requires the use of the package tabto. Alternative options are \quad and \qquad; the space produced is probably more what you ...
user avatar
77 votes

Vertical Spacing within align environment accounting for fractions

A much simpler method: Instead of using \\ for ending a line, use \\[0.5ex]. The optional argument in the brackets requests additional whitespace. The unit ex corresponds to the height of the ...
user avatar
68 votes
Accepted

Bizarre spacing with 4 $\star$s

Math symbols have different classifications and \star like - is a classed as binary operator. TeX assigns different space between symbols of each type, but also binary operators if not appearing in "...
user avatar
65 votes

How do I create an invisible character?

Ok, this has already been answered so I just want to contribute with the usage of the \phantom command. \begin{document} This text will be visible. \\ \phantom{This text will be invisible} \\ ...
user avatar
56 votes

How can I modify vertical space between figure and caption?

\vspace*{-10mm} placed before \caption command does the trick. Just pick the number that works for you the best.
user avatar
52 votes

Writing a limit so that the subscript goes directly underneath

I have used the following which puts x -> y under the limit. \lim\limits_{x \to y}
user avatar
  • 621
50 votes
Accepted

how to typeset empty inner product

I think that there are two most sensible options: increase the first space and make it symmetric: $\langle\,,\rangle$ put \cdots in place of the arguments: $\langle\cdot,\cdot\rangle$ (this is what I ...
user avatar
  • 49.1k
50 votes
Accepted

avoid space after commas used as thousands separator in math mode

There are different classes of mathematical symbols in LaTeX, as discussed in this question: What is the difference between \mathbin vs. \mathrel? Depending on the class of a math symbol, surrounding ...
user avatar
47 votes

\topsep, \itemsep, \partopsep, \parsep - what do they each mean (and what about the bottom)?

Ok since you've asked the question with a picture, I'll answer with one (more or less). Summary \itemsep = vertical space added after each item in the list. \parsep = vertical space added after each ...
user avatar
  • 202k
44 votes
Accepted

Adjusting spacing around section/subsection titles with koma-script

Update KOMA-Script version 3.26 introduces two new keys to \RedeclareSectionCommand and \RedeclareSectionCommands: runin and afterindent. Possible values for both keys are bysign, true and false. ...
user avatar
  • 81.7k
42 votes

How do I add additional horizontal spacing between two figures in latex?

Use \hspace{amount} or \hfill if you want the right subfigure get shifted to the right margin between the two subfigures: \begin{figure} \centering \begin{subfigure}[b]{0.35\textwidth} \...
user avatar
  • 53.5k
40 votes

The space between the table and its caption is very small

My attention was drawn to this question by another one that had been posted on TeX-LaTeX Meta. In spite of having been asked almost six years ago, not only—IMHO, of course!—is this question still ...
user avatar
  • 20.8k
37 votes

\vspace vs. \vskip

The difference by example : \documentclass[preview, border=7mm]{standalone} \usepackage{xcolor} \usepackage{blindtext} \begin{document} \textcolor{red}{Line with \texttt{vspace} :} \vspace{1cm}...
user avatar
  • 22.3k
37 votes

How to add indentation

To forcibly insert a space that is the same length as an indentation you can use the following: \hspace{\parindent} This can be useful if you start a new section with a framed theorem, etc., and ...
user avatar
37 votes

How to add an empty line between paragraphs?

You can use bigbreak: alfa bravo \bigbreak charlie delta Background (from @egreg answer in a more general question) \bigbreak isn't listed in the LaTeX manual. It removes a preceding vertical space ...
user avatar
  • 1,515
36 votes

Adjusting separation between matrix entries

The \pmatrix command you're using is foreign to LaTeX and it's directly imported from plain TeX, so it doesn't use the general framework of LaTeX arrays. You should load the amsmath that provides the ...
user avatar
  • 993k
34 votes
Accepted

How to properly typeset math intervals

In the TeXbook, Knuth refers to people using “]a,b[” notation for open intervals as “perverse mathematicians” (page 171, exercise 18.14). I don't fully agree with the adjective, but I find the ...
user avatar
  • 993k
34 votes
Accepted

Some definitions: parskip, baselineskip, topskip

\parskip adds some "glue" between each paragraph. As I understand it, "glue" in LaTeX means, that it is not something fixed but it can adapt a bit according to what fills the space on a page best. ...
user avatar
  • 1,496
34 votes
Accepted

Why is the 'mod' function in LaTeX so wide? (extra space on the left of it)

See section 5.2 of the amsmath manual for the details of \mod and related commands (\mod, \pmod, \bmod, \pod) but the short version is that if you want parens around it, you should use \pmod: \...
user avatar
33 votes

How to indicate elision in a quotation?

Old question, but it was the first to come up on my google search. If anyone is still looking, the \textelp{} command from the csquotes package provides exactly the functionality requested: \...
user avatar
32 votes
Accepted

How to make a command completely empty / invisible / non-existent?

The classical way is using \@bsphack and \@esphack. They are used by \label or \index, both supposed to be invisible/empty regarding spacing. These commands remember, if there is a space before the ...
user avatar
32 votes

Reducing column separation between specific columns

The column specification allows for the insertion of @{<stuff>} between columns. If <stuff> is empty (as in @{}), no column gap is inserted, while the "default" is @{\hspace{\tabcolsep}} ...
user avatar
  • 567k
31 votes
Accepted

Underline just words, not the space between them

Let's make soul work less: \documentclass{article} \usepackage{xparse,soul} \ExplSyntaxOn \NewDocumentCommand{\ulns}{m} { \seq_set_split:Nnn \l_tmpa_seq { ~ } { #1 } \seq_map_inline:Nn \...
user avatar
  • 993k
30 votes
Accepted

LaTeX Beamer: Define \itemsep globally

Yout code won't work because the itemize/enumerate \beameritemnestingprefix body begin template is used before the \list internally used by itemize. You can patch \itemize (original definition in ...
user avatar
30 votes

How to write matrices with dimensions in latex?

At its simplest, this might be the easiest way. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \underset{n\times 1}{\mathrm{Y}} = \underset{n\times p}{X} \times \...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible