Chunk options

Chunk options

I've mostly followed Knitr's naming for chunk options, but not all options are implemented.

Options are separated using ";" and need to be valid Julia expressions. Example: markdown code chunk that saves and displays a 12 cm wide image and hides the source code:

julia; out_width="12cm"; echo=false

Weave currently supports the following chunk options with the following defaults:

Options for code

Options for figures

Set default chunk options

You can set the default chunk options (and weave arguments) for a document using the YAML header options field. e.g to set the default out_width of all figures you can use:

---
options:
      out_width : 50%
---

You can also set or change the default chunk options for a document either before weave using the set_chunk_defaults function.

set_chunk_defaults(opts)
get_chunk_defaults()
restore_chunk_defaults()