# How can I change the default \\ spacing?

So, I have a definition which takes in data like this:

...{apple\\orange\\cat\\imperial green tea\\left-handed president}...


In the document I get the following after compilation:

apple

orange

cat

imperial green tea

left-handed president

However, the line spacing is too large for my taste. I'd like to adjust it to be a bit smaller. How can I do this?

Try the package setspace.

\documentclass{article}
\usepackage{setspace}

\begin{document}

text\\at\\normal\\spacing

\begin{spacing}{.8}
apple\\orange\\cat\\imperial green tea\\left-handed president
\end{spacing}

text\\at\\normal\\spacing

\end{document}


Changing the .8 to 1 gives single-spaced lines, 2 gives double-spaced lines, etc.

Depending on your particular use case, you might want to consider using a list type structure, which allows you to

1. Remove the vertical spacing:

2. Have some vertical spacing:

3. And also number the items if desired:

## Code:

\documentclass{article}
\usepackage{pgffor}
\usepackage{enumitem}
\usepackage{showframe}

\newcommand{\MyList}{apple, orange, cat, imperial green tea, left-handed president}

\begin{document}

You can have them listed:
\medskip
\begin{enumerate}[nosep, label={}, leftmargin=0pt]
\foreach \x in \MyList {\item \x}
\end{enumerate}

\bigskip
Or you can have them numbered, and adjust the vertical spacing:
\medskip
\begin{enumerate}[nosep, label={}, leftmargin=0pt, itemsep=5pt]
\foreach \x in \MyList {\item \x}
\end{enumerate}

\bigskip
Or you can have them numbered:
\medskip
\begin{enumerate}[nosep,itemsep=5pt]
\foreach \x in \MyList {\item \x}
\end{enumerate}

\end{document}