[Tex/LaTex] Handwriting drill sheets

fontspositioning

I am looking to create some handwriting drill sheets. Similar to what can be found here
http://www.handwritingworksheets.com/flash/cursive/paragraph/index.html

I also found this question:
Writing practice sheets – dotted letters
But I'd like to be able to simply write a paragraph of text with a known font and have the lines placed behind, perhaps like a watermark.

I have found a git repo with some nice lines in both portrait and landscape here
https://github.com/gkthiruvathukal/kindergarten

From the kindergarten example, I would like to overlay "phantom" text (probably a dotted cursive font) over the lines that are generated. Any thoughts?

\documentclass[10pt,letterpaper]{article}

\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=1cm,bmargin=1cm,lmargin=1cm,rmargin=1cm}
\pagestyle{empty}
\usepackage{dashrule}
\usepackage{forloop}
\makeatother

\setlength{\parindent}{0pt}

\begin{document}

\newcounter{ct}
\forloop{ct}{1}{\value{ct} < 13}
{
\vskip 10pt
\rule[1.75ex]{7.5in}{1pt}
\\
\hdashrule{7.75in}{1pt}{4mm}
\\
\rule[-1.75ex]{7.5in}{1pt}
\\
}

\vskip 1cm

\end{document}

*Edit: I also just found this source:
http://failuresandfixes.blogspot.com/2011/12/faking-baseline-grid-in-latex.html

So some combination of these makes sense to me, I'm just not clear on how…

*Edit: Okay, So I've gotten pretty far here. But it seems like several parameters need to be functions of each other some how. The line spacing, the font size, etc. Here is where I am:

\documentclass[10pt,letterpaper,english]{article}

\usepackage{babel} 
\usepackage{blindtext} 

\usepackage{setspace}

\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=1cm,bmargin=1cm,lmargin=1cm,rmargin=1cm}
\pagestyle{empty}
\usepackage{dashrule}
\usepackage{forloop}
\makeatother

\usepackage{xcolor}

\newcommand{\baselinegrid}{%
  \raisebox{0pt}[\height][0pt]{\makebox[0pt][l]{%
  \begin{minipage}[t]{\textwidth}%
    \begin{color}{red}%
    \newcounter{ct}
    \forloop{ct}{1}{\value{ct} < 11}
    {
    %\vskip 15pt
    \rule[0.5ex]{7.5in}{1pt}
    \\
    \hdashrule[0.75ex]{7.75in}{1pt}{4mm}
    \\
    \rule[1.2ex]{7.5in}{1pt}
    \\
    }
    \end{color}
  \end{minipage}%
}}}

\begin{document}

  \baselinegrid%

\begin{spacing}{2.5}

  \usefont{T1}{wela}{m}{n}
  \fontsize{30}{15}\selectfont
  \setlength{\parskip}{0pt}
  \setlength{\parindent}{0pt}

  DURING the whole of a dull, dark, and soundless day in the autumn of the year, when the clouds hung oppressively low in the heavens, I had been passing alone, on horseback, through a singularly dreary tract of country; and at length found myself, as the shades of the evening drew on, within view of the melancholy House of Usher.

\end{spacing}

\end{document}

Best Answer

Here is another solution, without the need of calculating the line number and the possibility to span text over several pages. I used the lineno to have “every line” hook and then I redefine the line numbers to be the grid instead of the actual number.

Zapfino grid

\documentclass[12pt]{article}

% necessary packages
\usepackage{tikz}

% set the font
%\usepackage{fontspec}
%\setmainfont{Zapfino}

% increase baseline skip
\usepackage{setspace}
\setstretch{1.5}

% define height of lowercase letters
\newcommand{\lowercaseheight}{1ex}
% define height of uppercase letters
\newcommand{\uppercaseheight}{2ex}
% define depth of descenders
\newcommand{\descenderdepth}{-0.5ex}
    % you may add more values here and then use them in the {tikzpicture}
    % to add more line to your grid


% package to have a "every line" hook
\usepackage{lineno}

\newenvironment{drillsheet}{%
    % let the "line numbers" start directly at the text
    \setlength\linenumbersep{0pt}%
    % let the "line numbers" be the grid
    \renewcommand{\thelinenumber}{%
        \begin{tikzpicture}[overlay]
                % baseline
                \draw ((0,0) -- ++(\textwidth,0);
                % lowercase height
                \draw [ultra thin] ((0,\lowercaseheight) -- ++(\textwidth,0);
                % uppercase height
                \draw (0,\uppercaseheight) -- ++(\textwidth,0);
                % descender depth
                \draw [ultra thin] (0,\descenderdepth) -- ++(\textwidth,0);
        \end{tikzpicture}%
    }%
    % the font and color of the numbers must be set explicitly
    \renewcommand\linenumberfont{\normalfont\color{black}}
    % start "line numbering", i.e. the grid
    \begin{linenumbers}%
        % set text color to gray
        \color{black!25}%
}{
    % end "numbering", i.e. the grid
    \end{linenumbers}%
}

\newenvironment{fakedisplaymath}{%
   \begin{center}%
   $\displaystyle
}{%
   $%
   \end{center}%
}

\begin{document}
\Large
\begin{drillsheet}
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed $a^2+b^2=c^2$
    incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
    nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
    \begin{fakedisplaymath}
       A=\int_0^2f(x)\,dx
    \end{fakedisplaymath}
    fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
    culpa qui officia deserunt mollit anim id est laborum.
\end{drillsheet}
\end{document}

Math
Inline math works as expected:
inline math

But displaystyle math is a little harder, since lineno ignores display math. I added the {fakedisplaymath} environment to add rudimentary support for equations.
display math
But I’d say it's hard to draw the drill line for math, how about fractions for instance …?