1+ using pandoc_jll
2+
3+
14function write_doc (docformat:: Pandoc2HTML , doc, rendered, out_path)
25 _, weave_source = splitdir (abspath (doc. source))
36 weave_version, weave_date = weave_info ()
@@ -20,21 +23,23 @@ function write_doc(docformat::Pandoc2HTML, doc, rendered, out_path)
2023 try
2124 out = basename (out_path)
2225 highlight_stylesheet = get_highlight_stylesheet (MIME (" text/html" ), docformat. highlight_theme)
23- cmd = ` pandoc -f markdown+raw_html -s --mathjax=""
24- $filt $citeproc $(docformat. pandoc_options)
25- --template $(docformat. template_path)
26- -H $(docformat. stylesheet_path)
27- $(self_contained)
28- -V highlight_stylesheet=$(highlight_stylesheet)
29- -V weave_version=$(weave_version)
30- -V weave_date=$(weave_date)
31- -V weave_source=$(weave_source)
32- -V headerscript=$(header_script)
33- -o $(out) `
34- proc = open (cmd, " r+" )
35- println (proc. in, rendered)
36- close (proc. in)
37- proc_output = read (proc. out, String)
26+ pandoc () do pandoc_exe
27+ cmd = ` $(pandoc_exe) -f markdown+raw_html -s --mathjax=""
28+ $filt $citeproc $(docformat. pandoc_options)
29+ --template $(docformat. template_path)
30+ -H $(docformat. stylesheet_path)
31+ $(self_contained)
32+ -V highlight_stylesheet=$(highlight_stylesheet)
33+ -V weave_version=$(weave_version)
34+ -V weave_date=$(weave_date)
35+ -V weave_source=$(weave_source)
36+ -V headerscript=$(header_script)
37+ -o $(out) `
38+ proc = open (cmd, " r+" )
39+ println (proc. in, rendered)
40+ close (proc. in)
41+ read (proc. out, String)
42+ end
3843 catch
3944 rethrow () # TODO : just show error content instead of rethrow the err
4045 finally
@@ -58,14 +63,16 @@ function write_doc(docformat::Pandoc2PDF, doc, rendered, out_path)
5863 cd (dirname (out_path))
5964 try
6065 out = basename (out_path)
61- cmd = ` pandoc -f markdown+raw_tex -s --pdf-engine=xelatex --highlight-style=tango
62- $filt $citeproc $(docformat. pandoc_options)
63- --include-in-header=$(docformat. header_template)
64- -V fontsize=12pt -o $(out) `
65- proc = open (cmd, " r+" )
66- println (proc. in, rendered)
67- close (proc. in)
68- proc_output = read (proc. out, String)
66+ pandoc () do pandoc_exe
67+ cmd = ` $(pandoc_exe) -f markdown+raw_tex -s --pdf-engine=xelatex --highlight-style=tango
68+ $filt $citeproc $(docformat. pandoc_options)
69+ --include-in-header=$(docformat. header_template)
70+ -V fontsize=12pt -o $(out) `
71+ proc = open (cmd, " r+" )
72+ println (proc. in, rendered)
73+ close (proc. in)
74+ read (proc. out, String)
75+ end
6976 catch
7077 rethrow ()
7178 finally
0 commit comments