Friends, I've been looking for a handwritten font with math support. In The LaTeX Font Catalogue ^{[1]}, there are great handwritten fonts available, but unfortunately I could not find one with proper math support.
I'm aware that the general rule is to use a proper math font instead, say mathpazo
. But in this very peculiar case - a beamer
template I'm writing for one keynote of mine - a handwritten font would perfectly fit.
I found some references in a
comp.text.tex
thread
^{[2]} and also in the
LaTeX Community Forum
^{[3]} - the latter with an interesting approach provided by
frabjous
^{[4]}.
Since both entries are dated January 2010, I'd like to know if there is any new light on this subject - a new font, a new technique, etc.
Or I could collect some detexify
samples and put all together in a math font. =P
(just kidding!)
Update: Since I have such great answers to my question, I'll add a bounty. My plan is to accept one answer while awarding the other one with a bounty.
You can try AMS Euler font (or the Neo Euler opentype). It is an upright font that was designed to resemble mathematics written on a blackboard.
I think that, for presentations, Euler combines well with GFS Artemisia, but the latter is not a handwriting font.
EDIT: If you do decide to use the Euler font, you can get the math support with
\usepackage{euscript}
^{[1]}. Then you can write, for example: $\EuScript{C}$
to get a nice round letter C.
euler
font really matches my presentation nicely. - Paulo Cereda
As Andrey mentioned in his comment there are 'calligraphic' fonts such as Zapf Chancery and Euler. As another example there are the non-free, chargeable, Math Script and Math Curly as part of the full mtpro2 family ^{[1]}. An trivial example using both of these and the normal mtpro2 font is:
\documentclass{article}
\usepackage[mtpccal,mtpscr]{mtpro2}
\newcommand\scrsin{s\kern-.17em i\kern-.12em n}
\begin{document}
\[ \mathscr{{d f(x)\over dx} = {d \scrsin(x) \over dx} = \cos(x)} \]
\[ \mathcal{{d f(x)\over dx} = {d \scrsin(x) \over dx} = \cos(x)} \]
\[{d f(x)\over dx} ={d \sin x \over dx} = \cos x \]
\end{document}
This also demonstrates some of the issues with simulated handwriting:
standard maths operators may not look handwritten; compare the quick replacement for \sin, \scrsin, compared with \cos above.
except for expert calligraphic writers, a handwritten text is not perfectly even (i.e. every occurence of a given letterform is the same).
the shapes of handwritten letters may vary depending on their neighbours. Some handwriting fonts do support alternate letterforms (e.g. 'r' and 'z' in mtpro2's Math Curly and Math Script) but not usually a full range to simulate handwriting.
except perhaps on lined paper, the baseline and rules for handwritten maths are not as straight in a handwritten version.
a handwriting font is not, in general, as legible as a good 'standard' font. For limited use (e.g. the usual maths use as a script or calligraphic variable) this is not usually critical but for wider use, especially when projected, then questions of readability at distance and legibility (including for those with less than perfect eyesight) when compared to the more usual fonts need to be considered. This may limit their use for projected material, except perhaps for novelty use or for unimportant content?
\mathcal
or \mathscr
? - alfC
You describe this as a "peculiar" circumstance. I have also been on the lookout for a handwritten math font. I've long admired the look of the Physics texts that belonged to my father, from the middle of the 1900's. I particularly like the inked illustrations and I'd love to merge the precision of today's computer-drawn illustrations with the elegance that I see in some of these. If someone has a suggestion in this direction I'd be glad to hear that (the handLaTeX is one I was unaware of). Here is an example from Morse's Vibration and Sound with more than the usual amount of text.
:-)
- Paulo Cereda
For completeness sake, I'm adding another suggestions to the handwritten font issue:
1st suggestion: load a "normal" handwritten font and set the math font to it.
That's frabjous ^{[1]}' original suggestion in the LaTeX Community Forum ^{[2]}. The idea is to use a proper engine to load a "normal" handwritten font and set the math font to it. This approach will only replace the numbers, not the operators set, but it might work for some simple cases.
2nd suggestion: DIY handwritten font.
It started as a joke, but one might really consider to come up with a DIY - do it yourself - handwritten font.
_{ (In fact, I'm actually planning this and once I have something significant to show, I'll edit this question and provide a link to the correct font repository - probably GitHub)}
My ideas:
Draw every single glyph known to mankind in your favorite editor (e.g.,
Inkscape
^{[3]}) or draw them in a paper, scan and then trace to vector with a proper converter (e.g.,
Potrace
^{[4]}).
Read Create a symbol font from SVG symbols ^{[5]} and follow the instructions of how to use FontForge ^{[6]} to generate your new font.
3rd suggestion: untested! use euler
font with some spice in it.
I found a project called handlatex ^{[7]} hosted on Google Code. It seems to have a package and a program. This is the new link that uses Python 3: https://github.com/DavideFauri/handlatex According to the manual:
The
hand
package is the LaTeX interface to the special-purposehandlatex
frontend. It provides a simple environment,\handpar
, that can be used to inject seemingly random variations in placement, interlining and orientation of paragraphs, as well as visual word shifting. Combined with appropriate fonts, it reasonably mimics the typical rendering of a sloppy handwritten text on delinated paper.
You can take a look on the sample .tex
file available
here
^{[8]}:
\documentclass{article}
% Sample demo document for handLatex using TeX Live' xelatex driver.
\usepackage[xetex,
bookmarks=false,
pdftitle={handLaTeX demo}]{hyperref}
\usepackage{fontspec}
\usepackage[driver=xelatex,
lowwordangle=-3,
highwordangle=3,
]{hand}
\usepackage{amssymb}
\begin{document}
\thispagestyle{empty}
\section*{\texttt{hand}\LaTeX\ Demo}
%\fontspec{Fountain Pen Frenzy} % If you have any good font, include it here.
\vfill
\begin{handpar}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ut libero et arcu
interdum varius. Nam bibendum, mi sed consequat malesuada, nunc diam condimentum
massa, sit amet egestas nibh ligula sit amet dui. Vestibulum eu urna. Etiam
vestibulum. Aenean nisi nulla, fringilla at, laoreet eu, iaculis id,
diam. Mauris aliquet vehicula lacus. Maecenas id nisl ac justo sodales
dictum. Phasellus eget eros. In hac habitasse platea dictumst. Nam ut tortor
vitae dui mollis egestas. Nullam sagittis libero quis nibh. Donec aliquam. Donec
tincidunt. Aliquam eget nisl. Suspendisse mollis pellentesque nunc.
\end{handpar}
...
The output:
I'd like to see what effects can be achieved with this package/frontend when using euler
. I'll experiment this later. By the way, I didn't find any references to math when reading the hand
manual, so I'm not sure how it behaves.
urwchancal
uses Zapf Chancery for math. But Zapf Chancery is a proper calligraphic font, not in the "casual handwriting" style. - Andrey Vihrov