# How does LaTeX determine its default line spacing/why is this newcommand's line spacing different depending where I use it?

I know how I can increase/decrease/alter line spacing in LaTeX but it feels like a hack to manually set \vspace{-5pt} every time I want two lines to be closer together and I think I could come up with a better solution if I understood why LaTeX does what it does in the first place.

For example, in building my resume I have the following newenvironments to define section headers, projects, and bullet points:

% A section:itemized is a main section with a header and some items within it
\newenvironment{section:itemized}[1]{
{\fontfamily{cmr}\selectfont\Large\scshape#1}
\begin{itemize}
}{
\end{itemize}
}

% Displays info about a job and holds list items describing what
% projects were completed there
\newenvironment{item:experience:itemized}[4]{
\item[]
\textbf{\scshape#1},  \hfill \textbf{#2} \\ % Show company and dates
\textit{\scshape#3}\hfill #4 % Show position and location
\begin{itemize}
}{
\end{itemize}
}

% This is a project heading and requires list items that can be bullet
% points describing the project
\newenvironment{item:project:itemized}[3]{
\itemprojectandtech{#1}{#2} \\
\textit{#3}
\begin{itemize}
}{
\end{itemize}
}

% An itembulleted is a simple list element
\newcommand{\itembulleted}[1]{
\item \begin{flushleft} #1 \end{flushleft}
}


In one place in my resume, I use a section:itemized to create an Experience section. Within it are item:experience:itemized items and they all contain item:project:itemized items which hold itembulleted details about the project. Elsewhere in my resume I use a section:itemized to create an Other Projects section that holds project:itemized items which hold itembulleted details.

Where this is done in the Other Projects section, there is a wider line space before and between each bulleted item than when this is done in the Experience section.

Here is a screenshot of the result:

Here is sample code:

\begin{section:itemized}{Experience}
\begin{item:experience:itemized}{Super Company}{September 2016 - present}{Head of Stuff}{Mytown, USA}

\begin{item:project:itemized}{Cool Project}{Technology, other technology}{Thing that's going away}
\itembulleted{Here are a bunch of words that describe this project.}
\itembulleted{And even more words because it was a really cool project and there are things to say.}
\end{item:project:itemized}
\end{item:experience:itemized}

\end{section:itemized}

%%%%%%%%%%%%%%%%%%%%%%%%
\begin{section:itemized}{Other Projects}

\begin{item:project:itemized}{Cool Project}{Technology, other technology}{Thing that's going away}
\itembulleted{Here are a bunch of words that describe this project.}
\itembulleted{And even more words because it was a really cool project and there are things to say.}
\end{item:project:itemized}

• You will probably get an answer here soon. But for future questions, please post a MWE - a minimal complete compilable example that illustrates your problem. – Ethan Bolker Apr 16 '17 at 17:37
• The list - related environments itemize, enumerate and description use level specific vertical spacings, so the spacings are different from one level deeper down to the inner levels... and you have nested environments here – user31729 Apr 16 '17 at 17:37
• it is rather hard to follow your fragments, please fix the question to have a single document that people can run to see the issue. – David Carlisle Apr 16 '17 at 17:37
• @ChristianHupfer, do you want to make that comment an answer? It's the information I was looking for. – Reagankm Apr 16 '17 at 17:46

The example of the O.P. shows nested itemize environments, which means that the \item commands appear on different levels.

The itemize environment has different spacing values for the individual elastical lengths that control the vertical distances of the \item - lines, those are

• \topsep
• \itemsep
• \parsep
• \partopsep

The \topsep together with \partopsep and \parskip controls the spacing between both the top of the environment and the first \item content and the bottom of the environment, i.e. the last line of the last \item and the beginning of the next non-environment content.

\itemsep+\parsep is responsible for the separation between the last line of an \item content and the next \item.

This small document shows the standard values for article.

\documentclass{article}

\newcommand{\niceintern}[1]{%
\texttt{#1}: \the\csname #1\endcsname
}
\newcommand{\niceoutput}{%
\niceintern{itemsep}

\niceintern{parsep}

\niceintern{partopsep}

\niceintern{topsep}
}

\begin{document}

\begin{itemize}

\item First level

\niceoutput
\begin{itemize}
\item Second level

\niceoutput
\begin{itemize}
\item Third level

\niceoutput

\begin{itemize}
\item Fourth level

\niceoutput

\end{itemize}
\end{itemize}
\end{itemize}
\end{itemize}

\end{document}


• Thank you again. This was very helpful, especially seeing it with the screenshot. – Reagankm Apr 18 '17 at 2:53
• @Reagankm: You're welcome. I hope you know how to adapt the spacings. You should use the enumitem package which allows a better control of the itemize related spacings – user31729 Apr 18 '17 at 19:14