From 31af8a4a35683f3441d54709eba758f6a12c229c Mon Sep 17 00:00:00 2001 From: Ryan Greenup Date: Mon, 14 Sep 2020 21:42:13 +1000 Subject: [PATCH] Fixed Broken Math in HTML Export --- bin/cadmus | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cadmus b/bin/cadmus index bd75e2c..7e412a7 100755 --- a/bin/cadmus +++ b/bin/cadmus @@ -492,7 +492,7 @@ CadmusExport () { ;; html) shift; pandocExport html --mathml --self-contained -c "${script_dir}"'/resources/pandoc.css' && exit 0 ;; - html-dir) shift; pandocExport html --katex -c "${script_dir}"'/resources/pandoc.css' && exit 0 + html-dir) shift; pandocExport html --mathjax -c "${script_dir}"'/resources/pandoc.css' && exit 0 ;; page-import) shift; CLIP_OUT | xargs curl | pandoc -f html -t markdown_github+tex_math_dollars --atx-headers | CLIP_IN && exit 0 ;; @@ -533,7 +533,7 @@ pandocExport () { # $1 is extension; $2+ are options for pandoc pandoc -s "${FILE}" ${@:-} --extract-media="${OUTDIR}/media" -o "${OUTDIR}"/"${FILEOUT}" || exit 7 cd "${OUTDIR}" ## Run it a second time so extracted media is relative not absolute - pandoc -s "${FILEOUT}" ${@:-} --extract-media="media" -o "${FILEOUT}" || echo "" # This might fail for PDF's, don't exit + pandoc -f html+tex_math_single_backslash -s --mathjax "${FILEOUT}" ${@:-} --extract-media="media" -o "${FILEOUT}" || echo "" # This might fail for PDF's, don't exit xdg-open "${OUTDIR}"/"${FILEOUT}" cd - }