3

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?

3

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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