New answers tagged

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 (...
clel's user avatar
  • 285
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-...
Mico's user avatar
  • 490k
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 \...
tropurchan's user avatar
2 votes

Too much horizontal spacing after double subscript

Your \hspace solution seems to work fine, but \! also provides a "negative space".
Nate's user avatar
  • 63
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{\...
F. Pantigny's user avatar
  • 36.7k
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/ ...
Zarko's user avatar
  • 290k
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 ...
Fantastic MsFox's user avatar
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 ...
egreg's user avatar
  • 1.1m
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 \...
Werner's user avatar
  • 595k
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, ...
MS-SPO's user avatar
  • 7,709
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}\...
Willie Wong's user avatar
  • 23.1k
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 ...
David Carlisle's user avatar
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 ...
David Carlisle's user avatar
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 ...
cfr's user avatar
  • 189k
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=...
egreg's user avatar
  • 1.1m
-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} ... \...
LDinCT's user avatar
  • 41
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 ...
Tony Roberts's user avatar
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 ...
Celdor's user avatar
  • 8,468
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% }{% ...
bradrn's user avatar
  • 212
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. ...
egreg's user avatar
  • 1.1m
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.
PDL's user avatar
  • 21
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. ...
John Kormylo's user avatar
  • 77.4k
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 &...
Simon Dispa's user avatar
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} \...
egreg's user avatar
  • 1.1m
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.
Nate's user avatar
  • 63
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
Alberto López's user avatar
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 = ...
F. Pantigny's user avatar
  • 36.7k
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}{...
egreg's user avatar
  • 1.1m
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 ...
Mico's user avatar
  • 490k
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 ...
akj's user avatar
  • 253
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}...
F. Pantigny's user avatar
  • 36.7k
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 \...
Mico's user avatar
  • 490k

Top 50 recent answers are included