1

So I am currently writing a document and the TeX is not doing what I want it to do. When I am writing I am using the format:

Blah
\vspace{.08in} 

\noindent Blah2 dasfogasngangsnklgs etc etc
\vspace{.08in}

\noindent blah3

Etc. The issue is that in the middle of the page, one of the spaces in the middle a ton larger than all the other breaks. Is there anything I can do to fix this?

If it helps, my preamble looks something like

\documentclass[11pt]{amsart}
\numberwithin{equation}{section} \setlength{\textwidth}{17cm}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}

\usepackage{graphicx,tabularx,array}
\thispagestyle{empty}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\usepackage{verbatim}
8
  • 2
    take a look at the answer to this question: Make \vspace appear below empty \subparagraph. Commented Sep 24, 2013 at 16:40
  • 1
    Try first adding a blank line before \vspace
    – egreg
    Commented Sep 24, 2013 at 16:48
  • 1
    @TylerKelly -- \leavevmode takes you out of vertical mode. what you need is to get into vertical mode. a blank line or \par will do that, as pointed out by egreg. Commented Sep 24, 2013 at 17:33
  • 1
    It looks like you are trying to make TeX typeset with no paragraph indentation and blank space between paragraphs. If this is the case you can make your document much simpler if you just set \parskip and \parindent properly.
    – Thruston
    Commented Sep 24, 2013 at 18:00
  • 3
    Please always post complete documents not just fragments. If your document body contains \vspace or \noindent something is wrong as that sort of thing is supposed to be set up by the document class. Commented Sep 24, 2013 at 19:04

1 Answer 1

4

You should never need to use \noindent or \vspace for the document text. With no real example provided have to make some guesses, however most likely the extra white space is exactly one baseline due to the fact that you have a white line of text (a horizontal box, not a vertical skip in tex structure).

If you do use \vspace Then you should never use it in horizontal mode

\noindent Blah2 dasfogasngangsnklgs etc etc
\vspace{.08in}

You should use it in vertical mode:

\noindent Blah2 dasfogasngangsnklgs etc etc

\vspace{.08in}

If you use \vspace in horizontal mode then it is saved (in a vadjust node) and inserted (after TeX has broken the paragraph into lines) after the line that had the vadjust node.

At the end of a paragraph, before breaking text into lines, TeX does an \unskip operation to remove the space that might be there but you can not unskip past the \vadjust so if you do

\noindent Blah2 dasfogasngangsnklgs etc etc
\vspace{.08in}

instead of

\noindent Blah2 dasfogasngangsnklgs etc etc%
\vspace{.08in}

Then the last character in to paragraph to be broken is a space. You can see this if you use \showoutput.

....\glue 3.33333 plus 1.66666 minus 1.11111
....\OT1/cmr/m/n/10 e
....\OT1/cmr/m/n/10 t
....\OT1/cmr/m/n/10 c
....\glue 3.33333 plus 1.66666 minus 1.11111
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0

If you are unlucky the line break will fall just before that final word space of \glue 3.33333 plus 1.66666 minus 1.11111 and so the final line of the paragraph will consist just of parfillskip and rightskip glue, and so look like vertical space.

But the markup should just be

Blah2 dasfogasngangsnklgs etc etc

with \parindent set to zero so paragraphs are not indented and \parskip set to something non zero so paragraphs are separated. See for example the parskip package.


To see a working example, see the spurious all-white line in the paragraph before blah4 due to the word space coming from the newline before \vspace.

enter image description here

\documentclass{article}

\setlength\textwidth{7cm}
\begin{document}


\noindent Blah\dotfill X
\vspace{.08in} 

\noindent Blah2 dasfogasngangsnklgs etc etc
\vspace{.08in}


\noindent Blah2 dasfogasngangsnklgs zzzzzzzzzzzzzetc etc
\vspace{.08in}

\noindent blah4

\noindent Blah2 dasfogasngangsnklgs zzzzzzzzzzzzzetc etc%
\vspace{.08in}

\noindent blah5

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .