4. Output formats
4.1. Markdown output
#' # Markdown ┐
#' │
#' This line is treated as markdown, since it starts with #' │
#' The leading #' (including the space) is removed ┘
#' Here is an example with some code ]
x = sin.(cos.([1, 2, 3])) ┐
y = x.^2 - x ┘By default, CodeChunks written to Documenter @example blocks. For example, the code above would result in the following markdown:
# Markdown
This line is treated as markdown, since it starts with #'
The leading #' (including the space) is removed
Here is an example with some code
```@example
x = sin.(cos.([1, 2, 3]))
y = x.^2 - x
```Examples.markdown — Function.Examples.markdown(inputfile, outputdir; kwargs...)Generate a markdown file from inputfile and write the result to the directoryoutputdir.
Keyword arguments:
name: name of the output file, excluding.md.nameis also used to name all the@exampleblocks. Defaults to the filename ofinputfile.preprocess,postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults toidentity.codefence: APairof opening and closing code fence. Defaults to"```@example $(name)" => "```"documenter: boolean that says if the output is intended to use with Documenter.jl. Defaults tofalse. See the the manual section on Interaction with Documenter.
4.2. Notebook output
Examples.notebook — Function.Examples.notebook(inputfile, outputdir; kwargs...)Generate a notebook from inputfile and write the result to outputdir.
Keyword arguments:
name: name of the output file, excluding.ipynb. Defaults to the filename ofinputfile.preprocess,postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults toidentity.execute: a boolean deciding if the generated notebook should also be executed or not. Defaults tofalse.documenter: boolean that says if the source contains Documenter.jl specific things to filter out during notebook generation. Defaults tofalse. See the the manual section on Interaction with Documenter.
4.3. Script output
Examples.script — Function.Examples.script(inputfile, outputdir; kwargs...)Generate a plain script file from inputfile and write the result to outputdir.
Keyword arguments:
name: name of the output file, excluding.jl. Defaults to the filename ofinputfile.preprocess,postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults toidentity.