22

I would like to print a document with text on lined paper like a notebook like http://www.highschoolmathandchess.com/2013/05/25/latex-handwriting-on-notebook-paper/

However, I would like to be able to edit the line colours. I would like to put the header/title in the blank white space. Is there a way to do the document above without using the background jpg? The document is also multiple pages.

I have looked at this question too and would like to have lines only and not a grid. Is there a latex template that makes a page look like a math notepad?

Thanks!

2 Answers2

27

This is the first time I've ever succeeded in actually using the background package so caveat emptor...

This code is based on code originally posted at http://michaelgoerz.net/notes/printable-paper-with-latex-and-tikz.html. Basically, the site hosts a range of templates for creating all kinds of paper in TeX (both in US sizes and those used by everyone else). Squared, narrow-ruled, wide-ruled, Cornell, college, graph...

However, I've modified the code quite a bit for this answer so any errors are definitely mine! [In particular, any mess on account of the use of background is definitely mine as the original doesn't use that package in any way, shape or form.]

You could try something like this which combines a tikzpicture as background picture with the titling package:

\documentclass[letterpaper, 10pt]{article} % for letter size paper
% 215.9mm × 279.4mm
\usepackage{tikz, background, titling, kantlipsum, setspace}
\usepackage[left=1.5in,right=.25in,top=1.125in,bottom=.125in]{geometry}
\usetikzlibrary{calc}
\backgroundsetup{%
 position=current page.center,
 angle=0,
 scale=1,
 contents={%
  \begin{tikzpicture}%
    [
      normal lines/.style={gray, very thin},
      every node/.append style={black, align=center, opacity=1}
    ]
    \foreach \y in {0.71,1.41,...,25.56}
      \draw[normal lines] (0,\y) -- (8.5in,\y);
    \draw[normal lines] (1.25in,0) -- (1.25in,11in);
    \node (t) [font=\LARGE, anchor=south] at ($(0,25.56)!1/2!(8.5in,25.56)$) {\thetitle};
    \node (d) [font=\large, anchor=south west, xshift=1.5em] at (0,25.6) {\today};
    \node (p) [font=\large, anchor=south east, xshift=-1.5em] at (8.5in,25.56) {p.~\thepage};
  \end{tikzpicture}%
}}
\renewcommand{\rmdefault}{augie}

\title{My doc}
\author{Me}

\begin{document}
  \pagestyle{empty}
  \doublespacing
  \kant[1-6]

\end{document}

Lined paper for Kant?

cfr
  • 198,882
  • @MichaelGorez Thanks for updating the link! When I tried originally, I couldn't find the site so it is good to know it is still there. I hope that you did not object to my building on your work here ;). – cfr Aug 16 '15 at 18:53
24

One possibility using the background package and a \foreach loop to draw the horizontal rules:

\documentclass{article}
\usepackage[vmargin=3cm]{geometry}
\usepackage{tikzpagenodes}
\usepackage{lipsum}
\usepackage{background}

\definecolor{notepadrule}{RGB}{217,244,244}

\backgroundsetup{
contents={%   
  \begin{tikzpicture}
    \foreach \fila in {0,...,52}
    {
      \draw [line width=1pt,color=notepadrule] 
      (current page.west|-0,-\fila*12pt) -- ++(\paperwidth,0);
    }
    \draw[overlay,red!70!black,line width=1pt]
      ([xshift=-1pt]current page text area.west|-current page.north) --  
      ([xshift=-1pt]current page text area.west|-current page.south);
  \end{tikzpicture}%
},
scale=1,
angle=0,
opacity=1
}

\begin{document}

\lipsum[1-14]

\end{document}

enter image description here

Depending on the settings used for the actual document, you might need to do some adjustments, but the idea is the same.

Gonzalo Medina
  • 505,128
  • I actually managed to use background for this! And I did *not* see your answer before posting mine. I probably used it all wrong, though... – cfr Jul 06 '14 at 03:17
  • 1
    @cfr I'm glad to see that you managed to use background; and no, you didn't use it wrong. You can suppress the line position=current page.center since that is the default position. – Gonzalo Medina Jul 08 '14 at 03:19