Questions tagged [white-space]
278 questions
4
votes
1 answer
Swallow space before command
Is there a way to swallow one space (or more spaces) before a command?
E.g.:
xxx \mycommand{}yyy
which results in
xxxyyy
NVaughan
- 8,175
4
votes
1 answer
Excessive lstlisting whitespace when using escape
I am trying to remove the excessive whitespace between the bullet points and the second…
Matthew Deyell
- 43
- 4
4
votes
1 answer
\@ifnextchar considering whitespace
Somewhat related to Understanding \@ifnextchar question...
Is there any variant of \@ifnextchar which does not skip whitespace, i.e. which takes whitespace into account? For example, one would like to test whether a is immediately followed by b.
ivankokan
- 1,046
4
votes
1 answer
Why so much whitespace on left side of standalone document?
I'm getting whitespace on the left of a standalone document when rendering equations in the mode in which they are surrounded by [ and ] (I think that's the mode in which they are supposed to be on their own line. Any ideas how to prevent…
composerMike
- 283
3
votes
1 answer
Is there any difference between a space and a newline for compilation?
We handle arbitrary user input and attempt to programmatically generate LaTeX for compilation.
One issue we sometimes run into is users writing very long lines (paragraphs) of text, resulting in an error:
! Unable to read an entire line
The…
Alec
- 367
- 1
- 7
3
votes
4 answers
Whitespace characters
I am defining a command that uses an subscript somewhere. I want the subscript to dissappear when I leave its corresponding command-input open, but then LaTeX will trow an error since no character was put in the subscript. Now I want to type a dummy…
Niels Korpel
- 123
2
votes
1 answer
How to remove the white space of the first displayed equation only?
I want to remove the white space of the first displayed equation only without interfering other equations that follow.
If I activate \abovedisplayskip=0pt\relax then the remaining displayed equations after \intertext also get affected.
I also tried…
Display Name
- 46,933
1
vote
1 answer
How to prevent wrapping on a space character?
I am creating a list of special characters used for delimitation in my work.
"-","_"," " are delimiters
But the latex code is wrapping on " "
"-","_","
" are delimiters
How do I treat " " as a word that shouldn't be wrapped?
Sven Voigt
- 43
- 4
1
vote
0 answers
large Spaces in documents
please I'm new in latex. I have a problem with my paper which is the existing of a lot of white spaces between paragraphs, table and its comments and so on. I don't know how to fix it. I tried to use the following code but
the same…
1
vote
1 answer
1
vote
1 answer
How to remove excess whitespace on the first page?
The following MWE closely reproduces a LaTeX file I created. I'm using @egreg's solution to my question about programatically creating dummy text.
The issue is that the quoted section on the second page is pushed to
the second page. I suppose this…
Faheem Mitha
- 7,778
0
votes
1 answer
I want to remove white space between first \resumeitem and second \resumeSubheadingas highlighted with black arrow
\resumeSubheading
{Lahore University of Management Sciences (LUMS)}{}
{Undergraduate Teaching Assistant $\mid$ \textnormal{Probability}}{\textnormal{Sept. 2022 -- Dec. 2022}}
\resumeItemListStart
\resumeItem{Crafted comprehensive problem…
ark
- 1
0
votes
0 answers
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 remove the non-breaking space, it looks good…
Michael Baudin
- 214
- 2
- 9
0
votes
1 answer
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\value{whocount}=1%\ifnum\c@whocount=1%<<
Jake Ireland
- 239
0
votes
1 answer
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 I prevent this from happening?
Here is an…
MyComputer
- 161