@ -10,7 +10,7 @@ is done by letting the user supply custom pre- and post-processing functions
@@ -10,7 +10,7 @@ is done by letting the user supply custom pre- and post-processing functions
that may do transformation of the content.
All of the generators ([`Literate.markdown`](@ref), [`Literate.notebook`](@ref)
and [`Literate.script`](@ref)) accepts`preprocess` and `postprocess` keyword
and [`Literate.script`](@ref)) accept `preprocess` and `postprocess` keyword
arguments. The default "transformation" is the `identity` function. The input
to the transformation functions is a `String`, and the output should be the
@ -12,7 +12,7 @@ The basic syntax is simple:
@@ -12,7 +12,7 @@ The basic syntax is simple:
- all other lines are treated as julia code.
Leading whitespace is allowed before `#`, but it will be removed when generating the
output. Since `#`-lines is treated as markdown we can not use that for regular julia
output. Since `#`-lines are treated as markdown we can not use that for regular julia
comments, for this you can instead use `## `, which will render as `# ` in the output.
Lets look at a simple example:
@ -113,7 +113,7 @@ is a case where we can prepend `#md` to those lines:
@@ -113,7 +113,7 @@ is a case where we can prepend `#md` to those lines:
#md # ```
````
The lines in the example above would be filtered out in the preprocessing step, unless we are
generating a markdown file. When generating a markdown file we would simple remove
generating a markdown file. When generating a markdown file we would simply remove
the leading `#md ` from the lines. Beware that the space after the tag is also removed.
The `#src` token can also be placed at the *end* of a line. This is to make it possible
@ -133,7 +133,7 @@ The following convenience "macros"/source placeholders are always expanded:
@@ -133,7 +133,7 @@ The following convenience "macros"/source placeholders are always expanded:
- `@__NAME__`:
expands to the `name` keyword argument to [`Literate.markdown`](@ref),
expands the `name` keyword argument to [`Literate.markdown`](@ref),
[`Literate.notebook`](@ref) and [`Literate.script`](@ref)
@ -29,8 +29,8 @@ Examples are (probably) the best way to showcase your awesome package, and examp
@@ -29,8 +29,8 @@ Examples are (probably) the best way to showcase your awesome package, and examp
are often the best way for a new user to learn how to use it. It is therefore important
that the documentation of your package contains examples for users to read and study.
However, people are different, and we all prefer different ways of trying out a new
package. Some people wants to RTFM, others want to explore the package interactively in,
for example, a notebook, and some people wants to study the source code. The aim of
package. Some people want to RTFM, others want to explore the package interactively in,
for example, a notebook, and some people want to study the source code. The aim of
Literate is to make it easy to give the user all of these options, while still