[Tex/LaTex] New Skipping Lines Command

macros

I use \vspace{2\baselineskip} a lot and would like to create a new command for skipping a certain number of lines. Something like \skip{2} for instance instead of using \vspace. I know about the \newcommand stuff in the preamble of my tex file, but how can I use variables in my newcommand so that instead of a 2 in the above example I could put any number of lines to skip?

Best Answer

At its simplest, one can introduce \skiplines{} to add blank multiples of \baselineskip.

\documentclass[oneside]{amsart}
\newcommand\skiplines[1]{\vspace{#1\baselineskip}}
\begin{document}
This is a paragraph.

This is the normal blank space between paragraphs (i.e., none).\skiplines{4}

Here, I have added 4 blank lines to allow the reader to make notes on the 
printed paper.
\end{document}

enter image description here

As David noted in comments, however, except in unusual circumstances, one should not be routinely adding blank space manually. If there is a recurring need, the appropriate amount of space should be added as part of the document format definition (in the preamble, or in the document class itself), rather than in the document text.

Here, in the following MWE, four lines of \vspace are embedded in each \question and may have the number of blank lines varied as the optional argument to \question.

\documentclass[oneside]{amsart}
\newcommand\skiplines[1]{\vspace{#1\baselineskip}}
\newcommand\question[2][4]{\item #2\skiplines{#1}}
\begin{document}
\begin{enumerate}
\question[2]{Who is buried in Grant's tomb?}

\question{What is the meaning of life, the universe, and everything?}

\question{How much wood does a woodchuck chuck, if a woodchuck could chuck wood?}
\end{enumerate}
Back to your regularly scheduled document.
\end{document}

enter image description here

Related Question