diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2011-07-19 12:02:59 -0700 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2011-07-19 12:02:59 -0700 |
| commit | d095685bde2f938f6282692adc27bf59d0fb4803 (patch) | |
| tree | aaa70982e8c5ada610d5581fc283b75fd16590f5 | |
| download | pandoc-d095685bde2f938f6282692adc27bf59d0fb4803.tar.gz | |
Initial commit
| -rw-r--r-- | context.template | 84 | ||||
| -rw-r--r-- | docbook.template | 23 | ||||
| -rw-r--r-- | html.template | 66 | ||||
| -rw-r--r-- | latex.template | 130 | ||||
| -rw-r--r-- | man.template | 18 | ||||
| -rw-r--r-- | markdown.template | 23 | ||||
| -rw-r--r-- | mediawiki.template | 13 | ||||
| -rw-r--r-- | opendocument.template | 27 | ||||
| -rw-r--r-- | org.template | 24 | ||||
| -rw-r--r-- | plain.template | 23 | ||||
| -rw-r--r-- | rst.template | 39 | ||||
| -rw-r--r-- | rtf.template | 27 | ||||
| -rw-r--r-- | s5.template | 69 | ||||
| -rw-r--r-- | slidy.template | 70 | ||||
| -rw-r--r-- | texinfo.template | 64 | ||||
| -rw-r--r-- | textile.template | 9 |
16 files changed, 709 insertions, 0 deletions
diff --git a/context.template b/context.template new file mode 100644 index 000000000..4269d06a1 --- /dev/null +++ b/context.template @@ -0,0 +1,84 @@ +\enableregime[utf] % use UTF-8 + +\setupcolors[state=start] +\setupinteraction[state=start, color=middleblue] % needed for hyperlinks + +\setuppapersize[letter][letter] % use letter paper +\setuplayout[width=middle, backspace=1.5in, cutspace=1.5in, + height=middle, header=0.75in, footer=0.75in] % page layout +\setuppagenumbering[location={footer,center}] % number pages +\setupbodyfont[11pt] % 11pt font +\setupwhitespace[medium] % inter-paragraph spacing + +\setuphead[section][style=\tfc] +\setuphead[subsection][style=\tfb] +\setuphead[subsubsection][style=\bf] + +% define descr (for definition lists) +\definedescription[descr][ + headstyle=bold,style=normal,align=left,location=hanging, + width=broad,margin=1cm] + +% prevent orphaned list intros +\setupitemize[autointro] + +% define defaults for bulleted lists +\setupitemize[1][symbol=1][indentnext=no] +\setupitemize[2][symbol=2][indentnext=no] +\setupitemize[3][symbol=3][indentnext=no] +\setupitemize[4][symbol=4][indentnext=no] + +\setupthinrules[width=15em] % width of horizontal rules + +% for block quotations +\unprotect + +\startvariables all +blockquote: blockquote +\stopvariables + +\definedelimitedtext +[\v!blockquote][\v!quotation] + +\setupdelimitedtext +[\v!blockquote] +[\c!left=, +\c!right=, +before={\blank[medium]}, +after={\blank[medium]}, +] + +\protect +$for(header-includes)$ +$header-includes$ +$endfor$ + +\starttext +$if(title)$ +\startalignment[center] + \blank[2*big] + {\tfd $title$} +$if(author)$ + \blank[3*medium] + {\tfa $for(author)$$author$$sep$\crlf $endfor$} +$endif$ +$if(date)$ + \blank[2*medium] + {\tfa $date$} +$endif$ + \blank[3*medium] +\stopalignment +$endif$ +$for(include-before)$ +$include-before$ +$endfor$ +$if(toc)$ +\placecontent +$endif$ + +$body$ + +$for(include-after)$ +$include-after$ +$endfor$ +\stoptext diff --git a/docbook.template b/docbook.template new file mode 100644 index 000000000..66dfbef8d --- /dev/null +++ b/docbook.template @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" + "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> +<article> + <articleinfo> + <title>$title$</title> +$for(author)$ + <author> + $author$ + </author> +$endfor$ +$if(date)$ + <date>$date$</date> +$endif$ + </articleinfo> +$for(include-before)$ +$include-before$ +$endfor$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +</article> diff --git a/html.template b/html.template new file mode 100644 index 000000000..3f8b76fed --- /dev/null +++ b/html.template @@ -0,0 +1,66 @@ +$if(html5)$ +<!DOCTYPE html> +<html$if(lang)$ lang="$lang$"$endif$> +$else$ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$> +$endif$ +<head> +$if(html5)$ + <meta charset="utf-8" /> +$else$ + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +$endif$ + <meta name="generator" content="pandoc" /> +$for(author)$ + <meta name="author" content="$author$" /> +$endfor$ +$if(date)$ + <meta name="date" content="$date$" /> +$endif$ + <title>$if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$</title> +$if(html5)$ + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> +$endif$ +$if(highlighting-css)$ + <style type="text/css"> +$highlighting-css$ + </style> +$endif$ +$for(css)$ + <link rel="stylesheet" href="$css$" $if(html5)$$else$type="text/css" $endif$/> +$endfor$ +$if(math)$ +$if(html5)$ +$else$ + $math$ +$endif$ +$endif$ +$for(header-includes)$ + $header-includes$ +$endfor$ +</head> +<body> +$for(include-before)$ +$include-before$ +$endfor$ +$if(title)$ +$if(html5)$ +<header> +$endif$ +<h1 class="title">$title$</h1> +$if(html5)$ +</header> +$endif$ +$endif$ +$if(toc)$ +$toc$ +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +</body> +</html> diff --git a/latex.template b/latex.template new file mode 100644 index 000000000..8142fb986 --- /dev/null +++ b/latex.template @@ -0,0 +1,130 @@ +\documentclass$if(fontsize)$[$fontsize$]$endif${article} +\usepackage{amssymb,amsmath} +$if(xetex)$ +\usepackage{ifxetex} +\ifxetex + \usepackage{fontspec,xltxtra,xunicode} + \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} +\else + \usepackage[mathletters]{ucs} + \usepackage[utf8x]{inputenc} +\fi +$else$ +\usepackage[mathletters]{ucs} +\usepackage[utf8x]{inputenc} +$endif$ +$if(natbib)$ +\usepackage{natbib} +\bibliographystyle{plainnat} +$endif$ +$if(biblatex)$ +\usepackage{biblatex} +$if(biblio-files)$ +\bibliography{$biblio-files$} +$endif$ +$endif$ +$if(lhs)$ +\usepackage{listings} +\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} +$endif$ +$if(verbatim-in-note)$ +\usepackage{fancyvrb} +$endif$ +$if(fancy-enums)$ +% Redefine labelwidth for lists; otherwise, the enumerate package will cause +% markers to extend beyond the left margin. +\makeatletter\AtBeginDocument{% + \renewcommand{\@listi} + {\setlength{\labelwidth}{4em}} +}\makeatother +\usepackage{enumerate} +$endif$ +$if(tables)$ +\usepackage{ctable} +\usepackage{float} % provides the H option for float placement +$endif$ +$if(strikeout)$ +\usepackage[normalem]{ulem} +% avoid problems with \sout in headers with hyperref: +\pdfstringdefDisableCommands{\renewcommand{\sout}{}} +$endif$ +$if(subscript)$ +\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}} +$endif$ +$if(url)$ +\usepackage{url} +$endif$ +$if(graphics)$ +\usepackage{graphicx} +% We will generate all images so they have a width \maxwidth. This means +% that they will get their normal width if they fit onto the page, but +% are scaled down if they would overflow the margins. +\makeatletter +\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth +\else\Gin@nat@width\fi} +\makeatother +\let\Oldincludegraphics\includegraphics +\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}} +$endif$ +\usepackage[breaklinks=true,unicode=true,pdfborder={0 0 0}]{hyperref} +\setlength{\parindent}{0pt} +\setlength{\parskip}{6pt plus 2pt minus 1pt} +$if(listings)$ +\usepackage{listings} +$endif$ +$if(numbersections)$ +$else$ +\setcounter{secnumdepth}{0} +$endif$ +$if(verbatim-in-note)$ +\VerbatimFootnotes % allows verbatim text in footnotes +$endif$ +$for(header-includes)$ +$header-includes$ +$endfor$ + +$if(title)$ +\title{$title$} +$endif$ +$if(author)$ +\author{$for(author)$$author$$sep$\\$endfor$} +$endif$ +$if(date)$ +\date{$date$} +$endif$ + +\begin{document} +$if(title)$ +\maketitle +$endif$ + +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +\tableofcontents + +$endif$ +$body$ +$if(biblio-files)$ +$if(natbib)$ +$if(biblio-title)$ +$if(book-class)$ +\renewcommand\bibname{$biblio-title$} +$else$ +\renewcommand\refname{$biblio-title$} +$endif$ +$endif$ +\bibliography{$biblio-files$} +$endif$ +$endif$ +$if(biblatex)$ +\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ +$endif$ +$for(include-after)$ + +$include-after$ +$endfor$ + +\end{document} diff --git a/man.template b/man.template new file mode 100644 index 000000000..ff86c8ca6 --- /dev/null +++ b/man.template @@ -0,0 +1,18 @@ +$if(has-tables)$ +.\"t +$endif$ +.TH $title$ $section$ "$date$" $description$ +$for(header-includes)$ +$header-includes$ +$endfor$ +$for(include-before)$ +$include-before$ +$endfor$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +$if(author)$ +.SH AUTHORS +$for(author)$$author$$sep$; $endfor$. +$endif$ diff --git a/markdown.template b/markdown.template new file mode 100644 index 000000000..d500d3384 --- /dev/null +++ b/markdown.template @@ -0,0 +1,23 @@ +$if(titleblock)$ +% $title$ +% $for(author)$$author$$sep$; $endfor$ +% $date$ + +$endif$ +$for(header-includes)$ +$header-includes$ + +$endfor$ +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +$toc$ + +$endif$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/mediawiki.template b/mediawiki.template new file mode 100644 index 000000000..5d210fa7d --- /dev/null +++ b/mediawiki.template @@ -0,0 +1,13 @@ +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +__TOC__ + +$endif$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/opendocument.template b/opendocument.template new file mode 100644 index 000000000..ca49782f0 --- /dev/null +++ b/opendocument.template @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8" ?> +<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" office:version="1.0"> + $automatic-styles$ +$for(header-includes)$ + $header-includes$ +$endfor$ +<office:body> +<office:text> +$if(title)$ +<text:h text:style-name="Heading_20_1" text:outline-level="1">$title$</text:h> +$endif$ +$for(author)$ +<text:p text:style-name="Author">$author$</text:p> +$endfor$ +$if(date)$ +<text:p text:style-name="Date">$date$</text:p> +$endif$ +$for(include-before)$ +$include-before$ +$endfor$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +</office:text> +</office:body> +</office:document-content> diff --git a/org.template b/org.template new file mode 100644 index 000000000..eaaa17533 --- /dev/null +++ b/org.template @@ -0,0 +1,24 @@ +$if(title)$ +$title$ + +$endif$ +$if(author)$ +#+AUTHOR: $for(author)$$author$$sep$; $endfor$ +$endif$ +$if(date)$ +#+DATE: $date$ + +$endif$ +$for(header-includes)$ +$header-includes$ + +$endfor$ +$for(include-before)$ +$include-before$ + +$endfor$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/plain.template b/plain.template new file mode 100644 index 000000000..06ecbd3a6 --- /dev/null +++ b/plain.template @@ -0,0 +1,23 @@ +$if(titleblock)$ +$title$ +$for(author)$$author$$sep$; $endfor$ +$date$ + +$endif$ +$for(header-includes)$ +$header-includes$ + +$endfor$ +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +$toc$ + +$endif$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/rst.template b/rst.template new file mode 100644 index 000000000..f09bdd8b9 --- /dev/null +++ b/rst.template @@ -0,0 +1,39 @@ +$if(title)$ +$title$ + +$endif$ +$for(author)$ +:Author: $author$ +$endfor$ +$if(date)$ +:Date: $date$ +$endif$ +$if(author)$ + +$else$ +$if(date)$ + +$endif$ +$endif$ +$if(math)$ +.. role:: math(raw) + :format: html latex + +$endif$ +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +.. contents:: + +$endif$ +$for(header-includes)$ +$header-includes$ + +$endfor$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/rtf.template b/rtf.template new file mode 100644 index 000000000..833e19844 --- /dev/null +++ b/rtf.template @@ -0,0 +1,27 @@ +{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 Courier;}} +{\colortbl;\red255\green0\blue0;\red0\green0\blue255;} +\widowctrl\hyphauto +$for(header-includes)$ +$header-includes$ +$endfor$ + +$if(title)$ +{\pard \qc \f0 \sa180 \li0 \fi0 \b \fs36 $title$\par} +$endif$ +$for(author)$ +{\pard \qc \f0 \sa180 \li0 \fi0 $author$\par} +$endfor$ +$if(date)$ +{\pard \qc \f0 \sa180 \li0 \fi0 $date$\par} +$endif$ +$if(spacer)$ +{\pard \ql \f0 \sa180 \li0 \fi0 \par} +$endif$ +$for(include-before)$ +$include-before$ +$endfor$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +} diff --git a/s5.template b/s5.template new file mode 100644 index 000000000..c1f727f6e --- /dev/null +++ b/s5.template @@ -0,0 +1,69 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta name="generator" content="pandoc" /> +$for(author)$ + <meta name="author" content="$author$" /> +$endfor$ +$if(date)$ + <meta name="date" content="$date$" /> +$endif$ + <title>$if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$</title> + <!-- configuration parameters --> + <meta name="defaultView" content="slideshow" /> + <meta name="controlVis" content="hidden" /> +$if(highlighting-css)$ + <style type="text/css"> +$highlighting-css$ + </style> +$endif$ +$for(css)$ + <link rel="stylesheet" href="$css$" type="text/css" /> +$endfor$ +$if(s5includes)$ +$s5includes$ +$else$ + <!-- style sheet links --> + <link rel="stylesheet" href="ui/default/slides.css" type="text/css" media="projection" id="slideProj" /> + <link rel="stylesheet" href="ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" /> + <link rel="stylesheet" href="ui/default/print.css" type="text/css" media="print" id="slidePrint" /> + <link rel="stylesheet" href="ui/default/opera.css" type="text/css" media="projection" id="operaFix" /> + <!-- S5 JS --> + <script src="ui/default/slides.js" type="text/javascript"></script> +$endif$ +$if(math)$ + $math$ +$endif$ +$for(header-includes)$ + $header-includes$ +$endfor$ +</head> +<body> +$for(include-before)$ +$include-before$ +$endfor$ +<div class="layout"> +<div id="controls"></div> +<div id="currentSlide"></div> +<div id="header"></div> +<div id="footer"> + <h1>$date$</h1> + <h2>$title$</h2> +</div> +</div> +<div class="presentation"> +$if(title)$ +<div class="slide"> + <h1>$title$</h1> + <h3>$for(author)$$author$$sep$<br/>$endfor$</h3> + <h4>$date$</h4> +</div> +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +</div> +</body> +</html> diff --git a/slidy.template b/slidy.template new file mode 100644 index 000000000..8db862c9e --- /dev/null +++ b/slidy.template @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta name="generator" content="pandoc" /> +$for(author)$ + <meta name="author" content="$author$" /> +$endfor$ +$if(date)$ + <meta name="date" content="$date$" /> +$endif$ +$if(highlighting-css)$ + <title>$if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$</title> + <style type="text/css"> +$highlighting-css$ + </style> +$endif$ +$if(slidy-css)$ + <style type="text/css"> +$slidy-css$ + </style> +$else$ + <link rel="stylesheet" type="text/css" media="screen, projection, print" + href="http://www.w3.org/Talks/Tools/Slidy2/styles/slidy.css" /> +$endif$ +$for(css)$ + <link rel="stylesheet" type="text/css" media="screen, projection, print" + href="$css$" /> +$endfor$ +$if(math)$ + $math$ +$endif$ +$for(header-includes)$ + $header-includes$ +$endfor$ +$if(slidy-js)$ + <script type="text/javascript" charset="utf-8"> +$slidy-js$ + </script> +$else$ + <script src="http://www.w3.org/Talks/Tools/Slidy2/scripts/slidy.js.gz" + charset="utf-8" type="text/javascript"></script> +$endif$ +$if(duration)$ + <meta name="duration" content="$duration$" /> +$endif$ +</head> +<body> +$for(include-before)$ +$include-before$ +$endfor$ +$if(title)$ +<div class="slide titlepage"> + <h1 class="title">$title$</h1> + <p class="author"> +$for(author)$$author$$sep$<br/>$endfor$ + </p> +$if(date)$ + <p class="date">$date$</p> +$endif$ +</div> +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +</body> +</html> diff --git a/texinfo.template b/texinfo.template new file mode 100644 index 000000000..9c1d8e178 --- /dev/null +++ b/texinfo.template @@ -0,0 +1,64 @@ +\input texinfo +@documentencoding utf-8 +$for(header-includes)$ +$header-includes$ +$endfor$ + +$if(strikeout)$ +@macro textstrikeout{text} +~~\text\~~ +@end macro + +$endif$ +$if(subscript)$ +@macro textsubscript{text} +@iftex +@textsubscript{\text\} +@end iftex +@ifnottex +_@{\text\@} +@end ifnottex +@end macro + +$endif$ +$if(superscript)$ +@macro textsuperscript{text} +@iftex +@textsuperscript{\text\} +@end iftex +@ifnottex +^@{\text\@} +@end ifnottex +@end macro + +$endif$ +@ifnottex +@paragraphindent 0 +@end ifnottex +$if(titlepage)$ +@titlepage +@title $title$ +$for(author)$ +@author $author$ +$endfor$ +$if(date)$ +$date$ +$endif$ +@end titlepage + +$endif$ +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +@contents + +$endif$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ + +@bye diff --git a/textile.template b/textile.template new file mode 100644 index 000000000..69bd05b56 --- /dev/null +++ b/textile.template @@ -0,0 +1,9 @@ +$for(include-before)$ +$include-before$ + +$endfor$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ |
