Publishing to HTML and PDF

You can also publish any supported input format to HTML and PDF documents.

Note

Producing PDF output requires that you have XeLaTex installed and in your path.

You can use a YAML header in the beginning of the input document delimited with --- to set the document title, author and date, e.g.:

---
title : Weave example
author : Matti Pastell
date: 15th December 2016
---

Here are sample input and outputs:

They are generated as follows:

weave(Weave.SAMPLE_JL_DOC)) # default to md2html output format
weave(Weave.SAMPLE_JL_DOC; doctype = "md2pdf")
Tips

Weave.SAMPLE_JL_DOC is the path of FIR_design.jl.

Note

"md2html" and "md2pdf" assume Julia markdown format as an input, while pandoc2pdf and pandoc2html assume Noweb input format (i.e. Pandoc markdown).

Templates

You can use a custom template with md2html and md2pdf formats with template keyword option, e.g.: weave("FIR_design_plots.jl", template = "custom.tpl".

As starting point, you can use the existing templates:

Templates are rendered using Mustache.jl.

Supported Markdown syntax

The markdown variant used by Weave is Julia markdown. In addition Weave supports few additional Markdown features:

Comments

You can add comments using html syntax: <!-- -->

Multiline equations

You can add multiline equations using:

$$
x^2 = x*x
$$