From ee979cd8476b61b628a4d2859398f50cb30925a4 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 23 Feb 2012 13:52:14 -0500 Subject: [PATCH] Actually, just include the script itself. I don't know how to escape $ in the inline itex2MML wrapper script. --- posts/mdwn_itex.mdwn_itex | 10 ++-------- posts/mdwn_itex/itex2MML.sh | 5 +++++ 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100755 posts/mdwn_itex/itex2MML.sh diff --git a/posts/mdwn_itex.mdwn_itex b/posts/mdwn_itex.mdwn_itex index 50b54dc..2a26862 100644 --- a/posts/mdwn_itex.mdwn_itex +++ b/posts/mdwn_itex.mdwn_itex @@ -10,14 +10,8 @@ here in case other ikiwiki users find this useful. (`mdwn_itex.patch` against Jason's version). * Patch your ikiwiki [templates][] to use a `DOCTYPE` supporting MathML (`mdwn_itex-templates.patch`). -* Create a script wrapping `itex2MML` for escaping UTF-8 (which may - confuse the Markdown engine): - - #!/bin/sh - - # convert all output to numbered entities - /usr/bin/itex2MML "${@}" | perl -e 'use MathML::Entities; print name2numbered($_) while(<>);' | python -c 'import sys; sys.stdout.write(unicode(sys.stdin.read(), encoding="utf-8").encode("ascii", "xmlcharrefreplace"))' - +* Create a script wrapping `itex2MML` for escaping UTF-8 and named + entities (e.g. [[itex2MML.sh]]). * Add config options along the lines of: # plugins to add to the default configuration diff --git a/posts/mdwn_itex/itex2MML.sh b/posts/mdwn_itex/itex2MML.sh new file mode 100755 index 0000000..c4e4fcb --- /dev/null +++ b/posts/mdwn_itex/itex2MML.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# +# wrap itex2MML, converting named-enities and UTF-8 to numbered entities. + +/usr/bin/itex2MML "${@}" | perl -e 'use MathML::Entities; print name2numbered($_) while(<>);' | python -c 'import sys; sys.stdout.write(unicode(sys.stdin.read(), encoding="utf-8").encode("ascii", "xmlcharrefreplace"))' -- 2.26.2