more documentation for scalar example; added mathjax directives at multiple points