Weave.jl/doc/src/publish.md

27 lines
927 B
Markdown
Raw Normal View History

2016-12-15 20:08:49 +01:00
# Publishing to html and pdf
2016-04-22 14:04:15 +02:00
2016-12-15 20:08:49 +01:00
You can also publish any supported input format using markdown for doc chunks to html and pdf documents. Producing pdf output requires that you have XeLatex installed and in your path. *The markdown variant is [Julia markdown](http://docs.julialang.org/en/latest/manual/documentation.html#Markdown-syntax-1)*.
2016-04-22 14:04:15 +02:00
2016-12-15 20:08:49 +01:00
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.
2016-04-22 14:04:15 +02:00
2016-12-15 20:08:49 +01:00
```
---
title : Weave example
author : Matti Pastell
date: 15th December 2016
---
```
2016-04-22 14:04:15 +02:00
2016-12-15 20:08:49 +01:00
Here is a a sample document and output:
2016-04-22 14:04:15 +02:00
[FIR_design.jl](examples/FIR_design.jl), [FIR_design.html](examples/FIR_design.html) , [FIR_design.pdf](examples/FIR_design.pdf).
2016-12-12 20:40:05 +01:00
```julia
2016-04-22 14:04:15 +02:00
weave("FIR_design.jl")
weave("FIR_design.jl", docformat = "md2pdf")
```
2016-12-15 20:08:49 +01:00
**Note:** docformats `md2pdf` and `md2html` use Julia markdown and `pandoc2pdf` and `pandoc2html`
use Pandoc.