Questions tagged [spacing]
{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}.
8,292 questions
6
votes
3
answers
54
views
Phantom overline over visible expression
The following code:
\documentclass{article}
\begin{document}
\[ f(x',\overline{x'}) \]
\end{document}
produces the following output for me:
I'm a bit bothered that the heights of the primes are ...
1
vote
1
answer
58
views
+50
Keeping underlined text within the confines of the margins
How do I modify the \newcommand in the preamble in order for the underlined text to be properly contained by the margins? I got it here: underline omitting the descenders.
Also, my code will not ...
3
votes
1
answer
89
views
How to change vertical spacing above and below lists when using the parskip option of KOMA-Script and enumitem?
I use a template that utilizes the document class scrreprt and thus the KOMA-Script and 1.5x line spacing. Following given guidelines, paragraphs should be separated by vertical spacing and not by ...
13
votes
6
answers
568
views
Count spaces in LaTeX
I would like to create a fast/optimized fully expandable function that counts the number of spaces in an argument:
\documentclass{article}
\begin{document}
\countspaces{ A B } % Should return 3 (1 is ...
4
votes
2
answers
110
views
Need help writing this linear program! [closed]
I need help writing the previous linear program on Overleaf, I'm struggling to align the constraints and the objective function as well. Claude and ChatGPT are not good help.
1
vote
2
answers
67
views
font size reduction is only being applied to text being lowered in fractions
Since the following line:
is going too close to the right margin of the page, I changed the text size of the four larger-text fractions from normal to footnotesize:
$$\cos(\alpha) = \frac{\frac{1}{2\...
0
votes
1
answer
38
views
Adjusting space between the last paragraph and the footnote bar in the page [duplicate]
I wanted to increase the spacing after the last paragraph in the page where the footnote bar starts,
The above image shows the case. I'm using scrartcl as my document class.
7
votes
2
answers
127
views
Spacing and dot weight in bsmallmatrix (from mathtools)
MWE
\documentclass{article}
\usepackage{mathtools}
\begin{document}
Le signe $(-1)^{i+j}$ suit un motif en damier :
\(
\begin{bsmallmatrix}
+ & - & + & - & \cdots \\
- & + & - ...
1
vote
1
answer
44
views
I don't get how to make vertical space between a \paragraph{} and a simple line
this is my first LaTeX question and I'm really exited about it :D
Jokes apart I'm just asking how to make vertical space between a paragraph and a simple new line. I tried to use "\\", but ...
3
votes
1
answer
117
views
Baseline, sub- and superscripts and vertical centering in math-mode
See my edits below
Subscripts are meant to be typeset below the baseline. However in math-mode LaTeX simply ignores this by default and supposes that a symbol like X_i should be centered vertically as ...
0
votes
1
answer
37
views
Value of half a normal space *at given location*
I am trying to reproduce a manuscript as “photographically” as possible. Sometimes words have been added after a first draft, above a line, centered in between two words. To get this, I used a \...
5
votes
1
answer
59
views
Configure `keytheorems` so that it produces the same output as `ntheorem`
For a class of mine, I'm in the process to switch from ntheorem to keytheorems but, for compatibility reason, I would like to make the output of “theorems” as identical as possible. Unfortunately, it ...
4
votes
1
answer
137
views
How to make f\left(x\right) not add extra space after f?
I tried all answers in Spacing around \left and \right and none of them work.
I use code generate by computer CAS. And all the code generates \left(...\right). So not possible to do any manual ...
6
votes
7
answers
253
views
Left-aligning lines of text to left edge of right-aligned line?
What I’m trying to accomplish is best illustrated as follows:
The first line (“Monday, December 22, 2025, 16:00 EST”) is right-aligned to the text width (possibly by \hfill, but not a hard ...
5
votes
5
answers
365
views
Spacing with mathematical symbols in brakets
In the braket package I have noticed a spacing issue with mathematical operators; plus and minus symbols after | will be treated as binary operators, even if they represent an ordinary operator. For ...