mirror of https://github.com/mpastell/Weave.jl
Add example beamer document
parent
3488af5534
commit
6f83f1abf5
|
@ -0,0 +1,46 @@
|
|||
\documentclass{beamer}
|
||||
|
||||
\usepackage{lmodern}
|
||||
\usepackage{amssymb,amsmath}
|
||||
\usepackage{bm}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{microtype}
|
||||
\usepackage{hyperref}
|
||||
\setlength{\parindent}{0pt}
|
||||
\setlength{\parskip}{1.2ex}
|
||||
|
||||
\hypersetup
|
||||
{ pdfauthor = { {{{:author}}} },
|
||||
pdftitle={ {{{:title}}} },
|
||||
colorlinks=TRUE,
|
||||
linkcolor=black,
|
||||
citecolor=blue,
|
||||
urlcolor=blue
|
||||
}
|
||||
|
||||
|
||||
{{#:title}}
|
||||
\title{ {{{ :title }}} }
|
||||
{{/:title}}
|
||||
|
||||
{{#:author}}
|
||||
\author{ {{{ :author }}} }
|
||||
{{/:author}}
|
||||
|
||||
{{#:date}}
|
||||
\date{ {{{ :date }}} }
|
||||
{{/:date}}
|
||||
|
||||
{{ :highlight }}
|
||||
|
||||
\begin{document}
|
||||
|
||||
{{{#:title}}}
|
||||
\begin{frame}
|
||||
\titlepage
|
||||
\end{frame}
|
||||
{{{/:title}}}
|
||||
|
||||
{{{ :body }}}
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
title : A minimal beamer example using Weave markdown
|
||||
author : Matti Pastell
|
||||
options :
|
||||
doctype : md2pdf
|
||||
out_path : pdf
|
||||
template : beamer.tpl
|
||||
---
|
||||
|
||||
```julia; echo=false
|
||||
struct Begin
|
||||
text
|
||||
title
|
||||
end
|
||||
|
||||
struct End
|
||||
text
|
||||
end
|
||||
Base.show(io::IO, m::MIME"text/latex", b::Begin) = write(io, "\\begin{$(b.text)}[fragile]\n\\frametitle{$(b.title)}\n")
|
||||
Base.show(io::IO, m::MIME"text/latex", e::End) = write(io, "\\end{$(e.text)}")
|
||||
```
|
||||
|
||||
! Begin("frame", "Random plot")
|
||||
|
||||
```julia; out_width="0.5\\textwidth"
|
||||
using Plots
|
||||
scatter(randn(1000), randn(1000))
|
||||
```
|
||||
! End("frame")
|
|
@ -171,7 +171,7 @@ function format_chunk(chunk::DocChunk, formatdict, docformat::JMarkdown2HTML)
|
|||
ioformat!(io, out, fun)
|
||||
write(out, addspace(inline.rich_output, inline))
|
||||
elseif !isempty(inline.figures)
|
||||
write(io, inline.figures[end]))
|
||||
write(io, inline.figures[end])
|
||||
elseif !isempty(inline.output)
|
||||
write(io, addspace(inline.output, inline))
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue