I recently wanted to add a few empty lines to a document for taking handwritten notes on a printed copy. Somewhat similar to a package available for slides created with the document class beamer (see handoutWithNotes). However, I couldn’t find a package that allows me to do that. So I wrote a few lines of code which go into the preamble of the document. Since it’s not very handy to copy the code every time, I’m considering writing a package.
The code it simple, it defines a command notes
which has 3 arguments (1 is optional).
\notes[add. vertical space]{number lines}{width}
number lines
: the number of lines to be drawnwidth
: the vertical space occupied by these linesadd. vertical space
: adds more vertical space between the lines
Preamble code
\usepackage{pgffor, ifthen} \newcommand{\notes}[3][\empty]{% \noindent Notes\vspace{10pt}\\ \foreach \n in {1,...,#2}{% \ifthenelse{\equal{#1}{\empty}} {\rule{#3}{0.5pt}\\} {\rule{#3}{0.5pt}\vspace{#1}\\} } }
Example 1
\notes{5}{\textwidth}
Example 2
\notes[10pt]{3}{\textwidth}
Complete code example
\documentclass{article} \usepackage{pgffor, ifthen} \newcommand{\notes}[3][\empty]{% \noindent Notes\vspace{10pt}\\ \foreach \n in {1,...,#2}{% \ifthenelse{\equal{#1}{\empty}} {\rule{#3}{0.5pt}\\} {\rule{#3}{0.5pt}\vspace{#1}\\} } } \begin{document} \begin{minipage}{0.5\textwidth} \rule{5cm}{5cm} \end{minipage} \begin{minipage}{0.5\textwidth} \notes[10pt]{6}{\textwidth} \end{minipage} \end{document}
Feel free to propose enhancements.