Similar to Handwriting Drill Sheets question; however, I need it to work in math mode.
The problem is that my students don't seem to understand the location and spacing when writing their home work. Mostly because their language has a radically different spacinig.
For example:
$\log_2^{4^{2x}}$
Instead of
$\log_2 4^{2x}$
I would like to have some worksheets of various equations so they can practice the proper spacing and write neater, and to save my time grading their homework.
I have tried the examples listed, but the math mode spacing was way off. Also, none of the \setfont commands worked for me. all the fonts were not found.
\documentclass[12pt]{article}
% necessary packages
\usepackage{tikz}
% set the font
\usepackage{fontspec}
\setmainfont{Zapfino}% from http://www.fontsquirrel.com/
% help length to store width of text
\newlength{\lengthoftext}
% increase baseline skip
\usepackage{setspace}
\setstretch{4}
% define height of lowercase letters
\newcommand{\lowercaseheight}{1ex}
% define height of uppercase letters
\newcommand{\uppercaseheight}{2ex}
% define depth of descenders
\newcommand{\descenderdepth}{-2.2ex}
% you may add more values here and then us 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 [ultra thick] ((0,0) -- ++(\textwidth,0);
% lowercase height
\draw ((0,\lowercaseheight) -- ++(\textwidth,0);
% uppercase height
\draw [thick] (0,\uppercaseheight) -- ++(\textwidth,0);
% descender depth
\draw (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}%
}
\begin{document}
\Large
\begin{drillsheet}
$\log_2 2^{2x}$
$\int_{i+1}^{\infty} e^{2x}\,dx$
\end{drillsheet}
\end{document}
\documentclass{...}and ending with\end{document}. – jub0bs Nov 21 '13 at 14:05$\log{}_2 2^{2x}$seems to help. – Aug 12 '16 at 03:29