diff --git a/app/coffee/LatexRunner.coffee b/app/coffee/LatexRunner.coffee index 8f032cd..a35ae0b 100644 --- a/app/coffee/LatexRunner.coffee +++ b/app/coffee/LatexRunner.coffee @@ -12,9 +12,9 @@ module.exports = LatexRunner = logger.log directory: directory, compiler: compiler, timeout: timeout, mainFile: mainFile, "starting compile" - # We want to run latexmk on the tex file which we it will automatically - # generate from the Rtex file. - mainFile = mainFile.replace(/\.Rtex$/, ".tex") + # We want to run latexmk on the tex file which we will automatically + # generate from the Rtex/Rmd/md file. + mainFile = mainFile.replace(/\.(Rtex|md|Rmd)$/, ".tex") if compiler == "pdflatex" command = LatexRunner._pdflatexCommand mainFile diff --git a/test/acceptance/fixtures/examples/markdown-included/chapters/chapter1.md b/test/acceptance/fixtures/examples/markdown-included/chapters/chapter1.md new file mode 100644 index 0000000..920d9be --- /dev/null +++ b/test/acceptance/fixtures/examples/markdown-included/chapters/chapter1.md @@ -0,0 +1,17 @@ +Section Title +------------- + +* List item one +* List item two + +: Sample grid table. + ++---------------+---------------+--------------------+ +| Fruit | Price | Advantages | ++===============+===============+====================+ +| Bananas | $1.34 | - built-in wrapper | +| | | - bright color | ++---------------+---------------+--------------------+ +| Oranges | $2.10 | - cures scurvy | +| | | - tasty | ++---------------+---------------+--------------------+ diff --git a/test/acceptance/fixtures/examples/markdown-included/main.tex b/test/acceptance/fixtures/examples/markdown-included/main.tex new file mode 100644 index 0000000..bfda962 --- /dev/null +++ b/test/acceptance/fixtures/examples/markdown-included/main.tex @@ -0,0 +1,9 @@ +\documentclass{article} +\usepackage{longtable} +\usepackage{booktabs, multicol, multirow} + +\begin{document} + +\input{chapters/chapter1} + +\end{document} diff --git a/test/acceptance/fixtures/examples/markdown-included/output.pdf b/test/acceptance/fixtures/examples/markdown-included/output.pdf new file mode 100644 index 0000000..81a1136 Binary files /dev/null and b/test/acceptance/fixtures/examples/markdown-included/output.pdf differ diff --git a/test/acceptance/fixtures/examples/markdown-standalone/main.md b/test/acceptance/fixtures/examples/markdown-standalone/main.md new file mode 100644 index 0000000..036d971 --- /dev/null +++ b/test/acceptance/fixtures/examples/markdown-standalone/main.md @@ -0,0 +1,23 @@ +% Title +% Author +% Date + +Chapter title +============= + +Section Title +------------- + +Hello world. Have a nice table: + +: Sample grid table. + ++---------------+---------------+--------------------+ +| Fruit | Price | Advantages | ++===============+===============+====================+ +| Bananas | $1.34 | - built-in wrapper | +| | | - bright color | ++---------------+---------------+--------------------+ +| Oranges | $2.10 | - cures scurvy | +| | | - tasty | ++---------------+---------------+--------------------+ diff --git a/test/acceptance/fixtures/examples/markdown-standalone/output.pdf b/test/acceptance/fixtures/examples/markdown-standalone/output.pdf new file mode 100644 index 0000000..9991ab8 Binary files /dev/null and b/test/acceptance/fixtures/examples/markdown-standalone/output.pdf differ