How do I escape backslashes, ampersand, etc

53 views
Skip to first unread message

Jason Moore

unread,
Aug 19, 2014, 2:34:01 PM8/19/14
to hyde...@googlegroups.com
I'm using restructuredtext in my hyde html source files and make use of the math directive and mathjax to render mathematics on my website. It all works pretty swell expect for a few odd characters here and there. For example if I create a bmatrix like so:

.. math::
   \begin{bmatrix}
     1 & 2 \\
     3 & 4
   \end{bmatrix}

both the ampersand and the double backslash do not escape properly somwhere in the hyde processing pipeline. The double backslash can be fixed with \\\\ but I can't figure out how to escape the ampersand properly. Ideally this wouldn't be an issue as it isn't one when running restructured text parsers on this alone. I feel like it is something in the jinja parsing.

Any suggestions on getting this to work correctly?

Jason Moore

unread,
Aug 19, 2014, 4:40:19 PM8/19/14
to hyde...@googlegroups.com
Removing the typogrify filter solved the problem.
Reply all
Reply to author
Forward
0 new messages