Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm building my resume in LaTeX and the template I'm using some ideas from defined an environment like such:

\newenvironment{body} {
    \vspace*{-16pt}
    \begin{changemargin}{-0.25in}{-0.5in}
  } 
    {\end{changemargin}
}

And whenever I start a portion of my resume (a section, that is) I start with \begin{body}. However, for spacing issues I always have \vspace{14pt} after every \begin{body} (and right before \end{body} which just seems asinine if I can make it part of the environment. So I changed it to:

\newenvironment{body} {
    \vspace*{-2pt}
    \begin{changemargin}{-0.25in}{-0.5in}
  } 
    {\end{changemargin}
    \vspace{14pt}
}

Is this correct in that it yields the same result?

Also, what does the \vspace* do as compared to \vspace?

share|improve this question
2  
For the second question, see tex.stackexchange.com/a/76106/21591. –  mafp Jan 17 '13 at 15:53
add comment

1 Answer

It is impossible to say given the amount of information posted.

You are missing some % at ends of lines

\newenvironment{body} {%%%%%%%%%%%%%%%
    \vspace*{-16pt}%%%%%%%%%%%%%%%%%%%%%
    \begin{changemargin}{-0.25in}{-0.5in}%%%%%%%%%%%%
  } 
    {\end{changemargin}%%%%%%%%%%%%%
}

But any negative space, -16pt or -2pt will in principle cause this environment to over-print the previous text. If it doesn't then something you haven't shown is adding space to prevent that.

Normally it is better to use \addvspace in such situations. Most LaTeX display environments use this: Two \addvspace one after the other just add the maximum of the two values rather than the sum, so it avoids getting too much space if one display environment follows another.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.