[Tex/LaTex] Environment with handwritten font with math support

environmentsfontsmath-mode

Environment with handwritten font.

I would like to customize an environment called solution as follows.

  • that had the following characteristic proof environment: input "\solution[of Jhon]" output "Solution of Jhon." with the same source document.

  • who had a handwritten fonts such as those packages in The LaTeX Font Catalogue

  • that the source of the document and other environments remain unchanged.
  • As in the answer to question "Handwritten font with math support" I wish there was also support for the math mode.

The intention is to use sources well in solving Calculus for my students.

Thanks in advance.

Best Answer

that had the following characteristic proof environment: input \solution[of Jhon] output Solution of Jhon. with the same source document.

I'm not sure what you're asking here. You can use

\def\solution[#1]{Solution #1.}

to do that, but you use the word 'environment', so I think you might want (using LaTeX3)

\usepackage{xparse}
\NewDocumentEnvironment{solution}{o}{\textbf{Solution\IfValueTF{#1}{ #1}{}. }}{}

You can add further formatting commands to this as per the usual definition of an environment.

who had a handwritten fonts such as those packages in The LaTeX Font Catalogue

On each font page, there's a list of 'Style examples'; before each style there is a command which switches to that font. For example, to use the JD font, use \ECFJD. You can add this to the definition of the solution environment above.

As in the answer to question "Handwritten font with math support" I wish there was also support for the math mode.

None of these handwritten fonts has the symbols needed for typesetting mathematics; for mathematics, you're limited to

  • The maths fonts in the LaTeX Font Catalogue,
  • OpenType Maths Fonts, which you should load using the unicode-math package, which will require compiling with XeTeX, or
  • using a normal TrueType or OpenType handwritten font (there are hundreds on the internet), loading it using the fontspec package, and using it as the maths font with the mathspec package, which will also require compiling with XeTeX.