Weave.jl/v0.9.0/publish/index.html

10 lines
5.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Publishing to html and pdf · Weave.jl</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link href="../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>Weave.jl</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="../search/"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../">Weave.jl - Scientific Reports Using Julia</a></li><li><a class="toctext" href="../getting_started/">Getting started</a></li><li><a class="toctext" href="../usage/">Using Weave</a></li><li class="current"><a class="toctext" href>Publishing to html and pdf</a><ul class="internal"><li><a class="toctext" href="#Templates-1">Templates</a></li><li><a class="toctext" href="#Supported-Markdown-syntax-1">Supported Markdown syntax</a></li></ul></li><li><a class="toctext" href="../chunk_options/">Chunk options</a></li><li><a class="toctext" href="../notebooks/">Working with Jupyter notebooks</a></li><li><a class="toctext" href="../function_index/">Function index</a></li></ul></nav><article id="docs"><header><nav><ul><li><a href>Publishing to html and pdf</a></li></ul><a class="edit-page" href="https://github.com/mpastell/Weave.jl/blob/master/doc/src/publish.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>Publishing to html and pdf</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="Publishing-to-html-and-pdf-1" href="#Publishing-to-html-and-pdf-1">Publishing to html and pdf</a></h1><p>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 pdflatex installed and in your path.</p><p>You can use a YAML header in the beginning of the input document delimited with &quot;-&quot; to set the document title, author and date e.g.</p><pre><code class="language-none">---
title : Weave example
author : Matti Pastell
date: 15th December 2016
---</code></pre><p>Here is a a sample document and output:</p><p><a href="../examples/FIR_design_plots.jl">FIR<em>design</em>plots.jl</a>, <a href="../examples/FIR_design_plots.html">FIR<em>design</em>plots.html</a> , <a href="../examples/FIR_design_plots.pdf">FIR<em>design</em>plots.pdf</a>.</p><pre><code class="language-julia">weave(&quot;FIR_design_plots.jl&quot;)
weave(&quot;FIR_design_plots.jl&quot;, docformat = &quot;md2pdf&quot;)</code></pre><p><strong>Note:</strong> docformats <code>md2pdf</code> and <code>md2html</code> use Julia markdown and <code>pandoc2pdf</code> and <code>pandoc2html</code> use Pandoc.</p><h2><a class="nav-anchor" id="Templates-1" href="#Templates-1">Templates</a></h2><p>You can use a custom template with <code>md2pdf</code> and <code>md2html</code> formats with <code>template</code> argument (e.g) <code>weave(&quot;FIR_design_plots.jl&quot;, template = &quot;custom.tpl&quot;</code>). You can use the existing templates as starting point.</p><p>For HTML: <a href="https://github.com/mpastell/Weave.jl/blob/master/templates/julia_html.tpl">julia_html.tpl</a> and LaTex: <a href="https://github.com/mpastell/Weave.jl/blob/master/templates/julia_tex.tpl">julia_tex.tpl</a></p><p>Templates are rendered using <a href="https://github.com/jverzani/Mustache.jl">Mustache.jl</a>.</p><h2><a class="nav-anchor" id="Supported-Markdown-syntax-1" href="#Supported-Markdown-syntax-1">Supported Markdown syntax</a></h2><p>The markdown variant used by Weave is <a href="http://docs.julialang.org/en/latest/manual/documentation.html#Markdown-syntax-1">Julia markdown</a>. In addition Weave supports few additional Markdown features:</p><p><strong>Comments</strong></p><p>You can add comments using html syntax: <code>&lt;!-- --&gt;</code></p><p><strong>Multiline equations</strong></p><p>You can add multiline equations using:</p><pre><code class="language-none">$$
x^2 = x*x
$$</code></pre><footer><hr/><a class="previous" href="../usage/"><span class="direction">Previous</span><span class="title">Using Weave</span></a><a class="next" href="../chunk_options/"><span class="direction">Next</span><span class="title">Chunk options</span></a></footer></article></body></html>