[racket] Scribble and/or Latex?
Dave wrote:
> I'm an apprenticing high school math teacher looking for a
> documentation tool for use in preparing lesson plans and class
> presentations. I've been advised to use Latex. But as a former
> HtDP'er, I've been looking for an excuse to get back into Racket, and
> I thought learning Scribble might be a good route to take. I've
> poked through the docs a bit, and can't find any reference on math
> typesetting. Can that be done in Scribble? Or is Scribble not the
> right tool, and should I commit my learning efforts to Latex? Or
> both?
I have been typesetting lecture slides (PDF) and lecture summaries
(HTML) using Scribble and using math. Rendering to PDF goes through
LaTeX, so its math capabilities are theoretically accessible, but this
involves not only knowing how to write math in LaTeX but how to convince
the rendering engine to produce the right LaTeX macros. To display the
math equations in a browser, I use MathJax, which can handle LaTeX math.
Jens Axel Søgaard has gisted my code here (very short):
http://lists.racket-lang.org/users/archive/2012-July/052972.html
If you use this code, you still have to learn LaTeX math, which I would
advise anyway. You probably should learn first using a text editor and
invoking LaTeX on the command line, because if you make a mistake using
my code, you get a horrific amount of LaTeX error output in DrRacket's
Interactions window (this is the Scribble renderer's way of dealing with
backend problems). After a couple of decades of Emacs/LaTeX I am quite
enjoying writing things up in DrRacket using Scribble. If I could clone
myself, I'd set one of the clones to replacing the LaTeX backend, or at
least making the process more friendly.
I think there is scope here for using DrRacket to have students write up
math using Scribble. They can edit easily and you can view easily after
they submit their Scribble files to you. MathJax does not show a
horrific amount of error text; it just fails silently. So if they make
mistakes in their math, their formula simply won't show in the browser
when they hit the "Scribble HTML" button in DrRacket, and they will have
to figure out why by trial and error. But if they are already using
DrRacket, the only additional thing they need is a bit of Scribble
boilerplate. --PR