New answers tagged spacing
0
votes
Accepted
How do I add vertical margins to a paragraph (selectively, so not applying to all paragraphs)?
Building from the comments, I came up with:
\usepackage{xparse}
\NewDocumentEnvironment{verticalmargins}{mm}{\vspace{#1}}{\vspace{#2}}
This allows to specify margins separately for top and bottom (...
2
votes
Remove space after math environment
I do not follow your claim that
The[re is] unnecesary space ... between $$1+1$$ and \section.
First off, let's posit that you should never use $$ in a LaTeX document to initiate and terminate single-...
1
vote
How to set de spacing between the text and the image caption to `\baselineskip`?
Disclaimer: This is only a partial answer, as some spacing is still wrong. Putting this as an answer because it's a bit long and I can't comment.
First, the block you draw is larger than a \...
2
votes
Too much horizontal spacing after double subscript
Your \hspace solution seems to work fine, but \! also provides a "negative space".
0
votes
vertical align and color in table with multirow
With {NiceTabular} of nicematrix.
\documentclass[a4paper]{report}
\usepackage{booktabs}
\usepackage{xcolor}
\usepackage{nicematrix}
\begin{document}
\begin{table}[htbp]
\centering
\renewcommand{\...
0
votes
Accepted
Longtable itemize environment adds unwated topspace above first item
Before longtable insert the following:
\setlist[itemize]{nosep,
leftmargin=*,
label=\textbullet,
before={\begin{minipage}[t]{\hsize}},%https://tex.stackexchange.com/questions/531952/
...
0
votes
Longtable itemize environment adds unwated topspace above first item
Tried to find an answer again and found this:
Itemize inside longtable
using P column type (\newcolumntype{P}[1]{>{\endgraf\vspace*{-\baselineskip}}p{#1}}) worked even when not all entries in the ...
2
votes
Space dashes such that they ignore the contents beneath underbraces
You want to measure the parts (top and bottom) and print the dash in between items with an offset that depends on the widths of the items at the left and the right. Here I use a zero-width box, so it ...
1
vote
Accepted
Space dashes such that they ignore the contents beneath underbraces
If you're willing to do some measurements, you can set the dashes (\textminus below) between the elements without problem. \tmpbox is used to store the entire construction without the dashes, while \...
1
vote
Accepted
Text wrapping in CurVe rubric entry name
As a hint, it's always good trying to understand the documentclass one is going to use, before doing fancy things ... or just copying them.
The answer to your wrapping question is in the curve manual, ...
7
votes
Accepted
Add a space after itemize only if no text follows
Would this do?
\documentclass{article}
\usepackage{enumitem}
\setlength{\parskip}{10ex}
\setlength{\parindent}{0pt}
\newenvironment{enumerateD}{\begin{enumerate}[topsep=-\parskip]}
{\end{enumerate}\...
5
votes
Vertical spacing around plain display math vs `amsmath` environments such as `gather`
The space above a math display is either \abovedisplayskip or \abovedisplayshortskip depending on whether the last line of the previous paragraph overlaps the equation.
However AMS alignments are ...
2
votes
Accepted
Do the \parindent and \noindent cancel each other out?
\noindent just acts at that spot suppressing an indentation if at start of a paragraph, and doing nothing elsewhere.
\parindent 1em sets the indentation for all paragraphs in the current scope.
So ...
1
vote
Savetrees and extra space when changing to monospace font
This is not a solution, but an explanation with one not-very-satisfactory workaround and a second hideous one.
The basic problem is not in savetrees but microtype. Initially, I assumed it must have to ...
2
votes
Reducing item separation with easylist
Since easylist sets up its own lists, specifying options for enumitem is useless.
\documentclass{article}
\usepackage[at]{easylist}
\begin{document}
\begin{easylist}[itemize]
\ListProperties(Space=...
-1
votes
Help to remove vertical space between text and table
I suspect the table environment is messing with the spacing. Without seeing all the code, I would suggest removing the \begin{table} \centering. I would then put the remaining \begin{tabular} ... \...
0
votes
Adjusting space between paragraphs
But remember in all of these answers, vertical space should be phrased in terms of ex (the height of the letter "x" in the current font), whereas horizontal space should be phrased in terms ...
9
votes
Accepted
How to correctly separate paragraphs with a blank line
LaTeX separates paragraphs every time you add at least one empty line between texts. Then, how paragraphs are formatted depends on you. Here's a good helpful website: How to change paragraph spacing ...
1
vote
Moving paragraph start to avoid clash with header
Based on @JohnKormylo’s suggestion, this seems to mostly work:
\newsavebox{\overlongtestbox}
\newcommand{\IfOverlongWord}[4]{%
\IfStrEq{#2}{}{% empty string, base case, use false arg
#4%
}{%
...
5
votes
Accepted
Cant get rid of vspaces after align environment
Don't use \center, but \centering, and make the spaces before and after displays to be zero. Since you follow this with align, \noindent is necessary. Don't leave blank lines after a \cheattitle line.
...
1
vote
Cant get rid of vspaces after align environment
You could use
\newcommand{\cheattitle}[1]{%
{\sf \slshape \center \vspace{-5mm} \hspace{\fill}#1\hspace{\fill}}%
}
to get tighter spacing. Play with the value, but -5 mm seems about the max.
1
vote
Moving paragraph start to avoid clash with header
It seems LaTeX never hyphenates, or generates \hbox overfull warnings, for the first word of a sentence. (It does complain about \ifstr.) I figured out how to fix that, but now it hypenates instead.
...
0
votes
Vertical rule of column runs into text above it when using paracol
You can add some space below the "small title".
\NewDocumentCommand{\smalltitle}{m}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering #1\bigskip\par}% changed &...
2
votes
how to remove small amount of space between two images
The \lineskip jumps in, because the second paragraph has a very big height.
For your application you may want to remove altogether the baseline business altogether.
\documentclass[twocolumn]{article}
\...
1
vote
how to remove small amount of space between two images
Never mind, I fixed it. I had to keep a line blank below the \vspace{-1pt}, which is not the case when text comes afterward.
0
votes
Adjust spacing between main text and footnote in beamer slides
In Beamer, this distance is adjusted by \skip\@mpfootins, for example:
\makeatletter
\skip\@mpfootins0pt
\makeatother
1
vote
How to Rectify Weird Spacing in a Matrix Written as an Array
With {pNiceArray} of nicematrix.
\documentclass{article}
\usepackage{nicematrix}
\NiceMatrixOptions{nullify-dots,xdots/shorten=6pt}
\begin{document}
\[ \renewcommand{\arraystretch}{1.3}
A =
...
1
vote
Accepted
Adjust default spacing of elements in math mode
Assuming you really want to do this, it is a job for \RenewDocumentCommand and its embellishment argument type.
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\RenewDocumentCommand{\int}{...
2
votes
Adjust default spacing of elements in math mode
You need to employ the Plain-TeX \def directive instead of the LaTeX \renewcommand directive. That said, I would define the new version of \int to take two arguments rather than three, as the version ...
0
votes
How to fix the caption spacing in tblr and talltblr environments from the tabularray package?
I'd like to propose a little bit more advanced solution including both caption spacing adjustment and caption format customization.
To be short, goals are:
identical spacing between caption, table ...
1
vote
Lack of vertical whitespace between math material and horizontal lines in a tabular environment
The package nicematrix provides the key cell-space-limits to deal with that kind of problem (of course, you must use {NiceTabular} instead of {tabular}).
\documentclass{article}
\usepackage{nicematrix}...
2
votes
Accepted
Lack of vertical whitespace between math material and horizontal lines in a tabular environment
I can think of two distinct solutions:
Don't use \hline and \cline and, instead, switch to the rule-drawing directives of the booktabs package.
Insert typographic struts where needed. E.g., use \...
Top 50 recent answers are included
Related Tags
spacing × 7821math-mode × 688
tables × 666
equations × 324
sectioning × 321
horizontal-alignment × 289
lists × 283
table-of-contents × 271
macros × 262
vertical-alignment × 253
floats × 243
paragraphs × 233
formatting × 231
line-spacing × 231
amsmath × 210
tikz-pgf × 204
beamer × 191
align × 186
line-breaking × 173
itemize × 149
graphics × 148
environments × 141
captions × 140
titlesec × 132
indentation × 131