Add syntax highlighting to docs

pull/66/head
Matti Pastell 2016-12-12 21:40:05 +02:00
parent 985b3b1972
commit 7d556beb11
8 changed files with 19 additions and 16 deletions

View File

@ -3,10 +3,12 @@
[![Build Status](https://travis-ci.org/mpastell/Weave.jl.svg?branch=master)](https://travis-ci.org/mpastell/Weave.jl)[![Coverage Status](https://img.shields.io/coveralls/mpastell/Weave.jl.svg)](https://coveralls.io/r/mpastell/Weave.jl?branch=master)
Weave is a scientific report generator/literate programming tool
for Julia. It resembles [Pweave](http://mpastell.com/pweave) and, Knitr
for Julia. It resembles [Pweave](http://mpastell.com/pweave), Knitr, rmarkdown
and Sweave.
You can write your documentation and code in input document using Nowed or Markdown syntax and use `weave` function to execute to document to capture results and figures.
You can write your documentation and code in input document using Noweb,
Markdown, Script syntax and use `weave` function to execute to document to capture results
and figures.
**Current features**

View File

@ -5,10 +5,10 @@ repo_url: https://github.com/mpastell/Weave.jl
theme: material
extra:
palette:
primary: 'indigo'
accent: 'blue'
#extra:
# palette:
# primary: 'indigo'
# accent: 'blue'
extra_css:
- assets/Documenter.css
@ -21,6 +21,7 @@ markdown_extensions:
- extra
- tables
- fenced_code
- codehilite(css_class=code)
# - mdx_math
docs_dir: 'build'

View File

@ -46,7 +46,7 @@ You can set or alter the default chunk options for a document either before
running weave or inside the weaved document. You can e.g. use a hidden chunk
in the beginning of the source document to set the options:
```
```julia
<<echo = false>>=
import Weave
Weave.set_chunk_defaults(Dict{Symbol, Any}(

View File

@ -16,7 +16,7 @@ output in different formats:
You can Weave the files to your working directory using:
```
```julia
using Weave
#Markdown
weave(Pkg.dir("Weave","examples","gadfly_md_sample.jmd"), out_path = :pwd,

View File

@ -2,7 +2,7 @@
# Intro
This is the documentation of [Weave.jl](http://github.com/mpastell/weave.jl). Weave is a scientific report generator/literate programming tool
for Julia. It resembles [Pweave](http://mpastell.com/pweave) and, Knitr
for Julia. It resembles [Pweave](http://mpastell.com/pweave), Knitr, rmarkdown
and Sweave.

View File

@ -5,7 +5,7 @@
Weave supports using Jupyter notebooks as input format, this means you can weave notebooks to any supported formats. You can't use chunk options with notebooks.
```
```julia
weave("notebook.ipynb")
```
@ -19,13 +19,13 @@ function.
To convert from script to notebook:
```
```julia
convert_doc("examples/FIR_design.jl", "FIR_design.ipynb")
```
and from notebooks to markdown use:
```
```julia
convert_doc("FIR_design.ipynb", "FIR_design.jmd")
```

View File

@ -20,7 +20,7 @@ e.g. `#+ term=true`. See the example below for the markup.
[FIR_design.jl](examples/FIR_design.jl), [FIR_design.html](examples/FIR_design.html) , [FIR_design.pdf](examples/FIR_design.pdf).
```
```julia
weave("FIR_design.jl")
weave("FIR_design.jl", docformat = "md2pdf")
```
@ -30,6 +30,6 @@ weave("FIR_design.jl", docformat = "md2pdf")
You can also use any Weave supported format in the comments and set the output format
as you would for noweb and markdown inputs. e.g for LaTeX you can use:
```
```julia
weave("latex_doc.jl", docformat = "texminted")
```

View File

@ -59,7 +59,7 @@ return "pandoc"
You can get a list of supported output formats:
```
```julia
julia> list_out_formats()
pandoc: Pandoc markdown
rst: reStructuredText and Sphinx
@ -82,7 +82,7 @@ documentation chunks. You can also weave Jupyter notebooks. The format is detect
The rules for autodetection are:
```
```julia
ext == ".jl" && return "script"
ext == ".jmd" && return "markdown"
ext == ".ipynb" && return "notebook"