Questions tagged [white-space]
The white-space tag has no usage guidance.
207
questions
3
votes
3
answers
48
views
handling whitespace in denominator of complex fraction
I have a paper where I need to format a series of ugly 'fraction expressions' -- ugly because the term in the numerator is (often) a complex sum or series, and in order to get it to `fit', I usually ...
1
vote
2
answers
41
views
Superfluous vertical spacing
When a new section starts, I am facing extra spacing.
\documentclass[10pt]{report}
\usepackage{mathptmx,amsmath,amssymb,bm}
\begin{document}
\begin{align*}
& \kappa(ru+m(1-r)v)\leq\,r\kappa(u)+m(1-...
0
votes
1
answer
39
views
Remove whitespace in chapter heading
I am using the memoir document class to write my dissertation. I would like to remove the white spacing that exists between the chapter number and name to have them on the same line (without ...
0
votes
0
answers
24
views
How do I remove the space between the list headings and the list items in latex?
\begin{rsection}{Project}
{ \bf Movie Recommender System}
\begin{itemize}[noitemsep]
\item Implemented the collaborative filtering algorithm
\item performed exploratory data analysis
\end{itemize}
\...
1
vote
0
answers
42
views
Good code style introduces whitespace in LaTeX [duplicate]
Suppose I have the following in a test1.tex file:
\documentclass{article}
\begin{document}
\section{A section with a very long title which goes beyond seventy-two columns in text editor}
\end{...
0
votes
1
answer
78
views
Text keeps compressing or expanding when splitting text with ```\\\\```
I highly doubt that this question hasn't been asked before, but I haven't managed to use the right search words to find it.
In case it matters I'm writing in Overleaf and use \documentclass{article}.
...
2
votes
1
answer
58
views
Is There a Proper Place to Put Indexing Syntax in the Code?
Consider the code:
\documentclass[openany]{book}
\usepackage{imakeidx}
\makeindex
\usepackage{idxlayout}
\begin{document}
\thispagestyle{empty}
\Large
This is a sentence. This is another \textbf{...
3
votes
2
answers
62
views
width of a control space in relation to a quad, thin, medium, and thick spaces
In the majority of fonts such as Computer Modern, NewTX Math, or TeX Gyre Termes Math, how wide is the control space \ (visibly: \␣) in relation to the other math-mode space commands
\quad,
\;,
\&...
0
votes
1
answer
33
views
todonotes with tikzexternalize - white space problem
For a larger document including many TikZ pictures I am using tikzexternalize and the todonotes package. Based on this question I (re-) defined a command that automatically excludes the todo notes ...
0
votes
0
answers
32
views
Whitespace rendering + selectable indentation spaces for python/yaml/etc code snippets
I have three related issues here and I wonder, which approaches/libraries/built-in utilities may help me achieve the following:
First
There are many programming languages and file formats which depend ...
0
votes
1
answer
38
views
Large space at break in tcolorbox
Consider this MWE:
\documentclass[varwidth=3in, multi={my}, crop, ignorerest=true]{standalone}
\usepackage{polyglossia, lipsum, forloop}
\usepackage[most, magazine]{tcolorbox}
\newtcolorbox{mybox}[2][...
1
vote
1
answer
36
views
Unwanted space before Polyglossia's \textlatin in a \begin{french} environment with XeLaTeX
Unwanted space appears before Latin language text inside an outer French environment when using Polyglossia. This does not happen when the outer environment language is English.
In my example, when ...
0
votes
1
answer
38
views
Reduce vertical whitespace with elsarticle
I am trying to reduce the amount of vertical whitespace in elsarticle. Specifically, I would like to move the entire abstract (summary) box up.
Simply adding \vspace{-3em} right after \begin{abstract} ...
1
vote
2
answers
113
views
Help adjusting padding in complex longtable
I'm working on a CV and decided to use a longtable to set everything so it can span multiple pages easily. Overall, I like the look of what I've arrived at, but there are a couple issues with padding ...
0
votes
1
answer
25
views
How to use gathered inside tabular without causing excess space in nearby columns? [closed]
I would like the circuit layout and the mathematical equations of a certain circuit to be side by side with relevant captions. I use a table for this, since I might also add some information in the ...
1
vote
1
answer
35
views
Making the next space fixed width
I'm using the IEEEtrans document class and sometimes the figure caption
Fig. n: label
looks like
Fig. n: label
where the space after the “Fig.” is stretched.
How do I make the next space after “Fig.” ...
0
votes
0
answers
16
views
a5paper option in documentclass produces strange white space/margins and hyperref fixes it [duplicate]
I observed a very strange behaviour of latex when it comes to the pagesize:
When I create a document in a5paper by just using \documentclass[a5paper]{book} then the output pdf seems to be in A4 but ...
1
vote
2
answers
92
views
Gobble the next char if it is whitespace or tilde
I want this macro to gobble the next character in the input stream only if it is whitespace (according to the char code) or it's the tilde character (i.e., a non-breaking space).
My current attempt to ...
-1
votes
1
answer
37
views
White space + margins + alignment problem
I'm using overleaf to write my thesis but I found two problems in the template as illustrated in the attached image.
1- Long white space at the beginning of main pages (abstract, declaration, ...
1
vote
1
answer
30
views
Problematic spacing with \begin{cases}
In my MWE I would like to adjust the spacing immediately before each instance of \begin{cases}. The large curly brace seems jammed into the previous line. How would I adjust this? My source code:
%...
0
votes
1
answer
88
views
Non-breaking space not working in Overleaf
I am trying to insert a non-breaking space because one of the lines in my text ends with an a, namely introduces the problem and proposes ~a (cont. in the next line). However, the tilde operator does ...
0
votes
1
answer
24
views
Removing whitespace of \draw plot command
I use the following command to generate a smooth curve inside a Tikz picture:
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[black] plot [smooth, ...
1
vote
1
answer
65
views
Preventing a line break at the end of a sentence
If I want to prevent a line break between two words, then I insert a ~ like this:
Lorem~impsum.
But what if I want to prevent a line break between the end of a sentence and the first word of the new ...
0
votes
1
answer
66
views
How to get rid of a long vertical gap coming above and below an equation coming at some places!
I am preparing part of a big latex report. At some places, I see unnecessary additional vertical space around equations. When I try it individually with short text, it works fine. Somehow, I suspect ...
0
votes
0
answers
32
views
Space before and after a non-breaking space are different
I want to use a non-breaking space within a pair of guillemets. But the space within these guillemets are not equal. If I remove the guillemets, the spaces are equal and this looks good to me. If I ...
0
votes
1
answer
75
views
Lettrine in lettre class make a too large left margin
Explanations
When I use a \lettrine command from lettrine package inside the letter environment with lettre class, so, the lettrine occur a big unwanted left margin.
MWE
\documentclass{lettre}
\...
1
vote
2
answers
53
views
Variable spacing between mathop and its argument
The MWE below defines and uses the *-suffixed form \card* of the math operator \card to create greater spacing after "card" when the following argument is something like "(" or &...
0
votes
1
answer
57
views
Unable to retain Whitespace in xkeyval
I am using the xkeyval package to set a key "name". This value is then used in the hyperref package. Please see the sample code below:
File: mysuperclass.cls
\ProvidesClass{mysuperclass}
\...
6
votes
4
answers
542
views
How can I write a space character in the console?
The following code writes in the console, but it doesn't print the space character. How can I force printing space characters?
\documentclass{article}
\begin{document}
\message{%
^^J
=================...
1
vote
1
answer
53
views
`aligned` inside `align`: what's causing the ugly whitespace?
I'm trying to use aligned inside align in order to split/align an equation inside a global align.
My code is:
\begin{align}
\vert A \vert &\leq \frac{1}{\theta^{3}} \int_{u=0}^t \left| \int_{...
6
votes
1
answer
83
views
\selectlanguage in the middle of text causes extra vertical space
Consider the following example:
\documentclass{article}
\usepackage[french]{babel}
\usepackage{amsthm}
\begin{document}
Some text
\begin{proof}
\end{proof}
\begin{proof}
\end{proof}
Some text
\...
1
vote
0
answers
21
views
Start new Section before big picture from previous Section [duplicate]
I would like to show a big diagram (full page, coded as figure with \includegraphics) at the end of a Section (Section 1).
Unfortunately, the text of Section 1 does not end at the bottom of a page ...
1
vote
2
answers
72
views
How to handle whitespaces from \hangindent?
There is the problem with \hangindent.
Here is the code which I've used:
\documentclass[12pt]{article}
\usepackage[cp1251]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{amsmath}
\...
2
votes
2
answers
49
views
How to remove consecutive vertical whitespace from commands
I would like to be able to write macros that approximate the behaviour of CSS's margin.
For example consider the following:
\newcommand{\marginspace}[1]{
% Defines some combinable margin
% This is ...
1
vote
1
answer
36
views
Unwanted space in tikzpicture
I get some obviously unwanted space here:
Does it have to do with invisible control points being used to draw the arcs?
Here's the offending code:
\begin{tabular}{|c|c|}
\hline
\begin{tikzpicture} [...
0
votes
2
answers
42
views
center and remove whitespace in tabularx with multirows
How can I center the cells from the columns Theory and Hypothesis and remove the excessive whitespace from the cell Financial constraint?
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{array}
...
0
votes
0
answers
62
views
I can´t write under my table and 2 white pages appear
I hope somebody can help me.
I have problems with my code. Im starting with latex but im getting crazy.
I created some tables but i have problems with them. I cant write under the last table, 2 new ...
5
votes
2
answers
316
views
How to force equal spaces around French quotation marks?
this is again a noob question, and I guess a very generic one.
In my French text, I use French quotation marks (the opening one is followed by a non-breaking space, the closing one is preceded by one)....
0
votes
1
answer
24
views
I am trying to suppress strange white-space before variable call
I have define a variable that changes with a counter as such:
% Abbreviate after first instance
\newcounter{whocount}
\setcounter{whocount}{0}%
\newcommand{\who}{
\stepcounter{whocount}
\ifnum\...
0
votes
1
answer
20
views
macro definition in document body with `newcommand` inserts spaces
Sometimes I create ad-hoc macros in the middle of my document for various reasons. However, the definitions sometimes cause extra space to be inserted. My questions are:
Why does this happen?
How can ...
0
votes
1
answer
52
views
\noindent creates extra space when inside custom environment
I wanted to create a newenvironment which included a minipage. However, I discovered that when inserting the \noindent command inside this minipage it creates extra space in the beginning of the line. ...
2
votes
0
answers
51
views
\phantom \begin{figure} does not work
Why doesn't this work?
\phantom{
\begin{figure}[H]
\includegraphics{fig.pdf}
\end{figure}
}
It outputs
Error: Something's wrong--perhaps a missing \item.
I'm trying to do ...
0
votes
0
answers
36
views
Having white space problem after adding new image
I'm trying to add a new image to my document but whenever I add an image and there is no enough space for this image I have a white space in the previous text. my code:
Exampel text bla bla bla
\begin{...
0
votes
2
answers
66
views
Triangle with text involving white spaces
I am drawing to draw a diagram in Latex exactly equivalent to this image:
I am having problems with the white spaces. For instance, between "practice" and "management".
How would ...
1
vote
1
answer
157
views
How to control space above and below frame
I am trying to lay out a book with fairly tight requirements on how and where everything needs to be placed, so I am trying to get the \figure to very precisely control the text around it, and to be ...
1
vote
1
answer
76
views
How to remove the whitespaces between Table and paragraph?
I am writing a report using latex on overleaf. After a paragraph I want to add a table:
\begin{table}[]
\centering
\caption{Two Object Detection Types}
\begin{tabular}{ll}
\hline
...
2
votes
1
answer
42
views
Figure positioning creates blank space at original position
I'm having problems with the autopositioning of my figures. While the positioning itself is fine, it seems the figures whitespace is created at the position in the latex code instead of around the ...
4
votes
1
answer
139
views
How to remove blank space in standalone with lualatex?
While writing an Amharic poem, I got the following
I don't want the extra space on the right. What can I do? Here is my code:
\documentclass[preview]{standalone}
\usepackage[english]{babel}
\...
0
votes
0
answers
34
views
Texmaker ignores whitespace "\:" in mathmode
I'm using TexMaker to compile a document. I need to display many physical quantities, i.e., numbers with whitespace and then some units. The way I try to do it is like this:
$13 \: \rm unit$.
I want ...
0
votes
0
answers
26
views
filename chunk with \includegraphic, graphicx and spaces in the filename
I'm making a document with xelatex and I have a problem.
I include a graphic with \includegraphic from the graphicx package. My filename illustration a1-2.png contain some spaces and when I build my ...