From b43873a9ea07afc698d15559717550f8b46e365c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 19 Jul 2011 16:24:35 -0700 Subject: Added templates as a git submodule. This should make it easier for people to track updates to their custom templates. --- .gitmodules | 3 + templates | 1 + templates/context.template | 84 -------------------------- templates/docbook.template | 23 ------- templates/html.template | 66 -------------------- templates/latex.template | 130 ---------------------------------------- templates/man.template | 18 ------ templates/markdown.template | 23 ------- templates/mediawiki.template | 13 ---- templates/opendocument.template | 27 --------- templates/org.template | 24 -------- templates/plain.template | 23 ------- templates/rst.template | 39 ------------ templates/rtf.template | 27 --------- templates/s5.template | 69 --------------------- templates/slidy.template | 70 ---------------------- templates/texinfo.template | 64 -------------------- templates/textile.template | 9 --- 18 files changed, 4 insertions(+), 709 deletions(-) create mode 100644 .gitmodules create mode 160000 templates delete mode 100644 templates/context.template delete mode 100644 templates/docbook.template delete mode 100644 templates/html.template delete mode 100644 templates/latex.template delete mode 100644 templates/man.template delete mode 100644 templates/markdown.template delete mode 100644 templates/mediawiki.template delete mode 100644 templates/opendocument.template delete mode 100644 templates/org.template delete mode 100644 templates/plain.template delete mode 100644 templates/rst.template delete mode 100644 templates/rtf.template delete mode 100644 templates/s5.template delete mode 100644 templates/slidy.template delete mode 100644 templates/texinfo.template delete mode 100644 templates/textile.template diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..38c0ad87c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "templates"] + path = templates + url = git@github.com:jgm/pandoc-templates.git diff --git a/templates b/templates new file mode 160000 index 000000000..dd34104f5 --- /dev/null +++ b/templates @@ -0,0 +1 @@ +Subproject commit dd34104f5a5c05da86e38adefdc66922a9e075cb diff --git a/templates/context.template b/templates/context.template deleted file mode 100644 index 4269d06a1..000000000 --- a/templates/context.template +++ /dev/null @@ -1,84 +0,0 @@ -\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/templates/docbook.template b/templates/docbook.template deleted file mode 100644 index 66dfbef8d..000000000 --- a/templates/docbook.template +++ /dev/null @@ -1,23 +0,0 @@ - - -
- - $title$ -$for(author)$ - - $author$ - -$endfor$ -$if(date)$ - $date$ -$endif$ - -$for(include-before)$ -$include-before$ -$endfor$ -$body$ -$for(include-after)$ -$include-after$ -$endfor$ -
diff --git a/templates/html.template b/templates/html.template deleted file mode 100644 index 3f8b76fed..000000000 --- a/templates/html.template +++ /dev/null @@ -1,66 +0,0 @@ -$if(html5)$ - - -$else$ - - -$endif$ - -$if(html5)$ - -$else$ - -$endif$ - -$for(author)$ - -$endfor$ -$if(date)$ - -$endif$ - $if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$ -$if(html5)$ - -$endif$ -$if(highlighting-css)$ - -$endif$ -$for(css)$ - -$endfor$ -$if(math)$ -$if(html5)$ -$else$ - $math$ -$endif$ -$endif$ -$for(header-includes)$ - $header-includes$ -$endfor$ - - -$for(include-before)$ -$include-before$ -$endfor$ -$if(title)$ -$if(html5)$ -
-$endif$ -

$title$

-$if(html5)$ -
-$endif$ -$endif$ -$if(toc)$ -$toc$ -$endif$ -$body$ -$for(include-after)$ -$include-after$ -$endfor$ - - diff --git a/templates/latex.template b/templates/latex.template deleted file mode 100644 index 8142fb986..000000000 --- a/templates/latex.template +++ /dev/null @@ -1,130 +0,0 @@ -\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/templates/man.template b/templates/man.template deleted file mode 100644 index ff86c8ca6..000000000 --- a/templates/man.template +++ /dev/null @@ -1,18 +0,0 @@ -$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/templates/markdown.template b/templates/markdown.template deleted file mode 100644 index d500d3384..000000000 --- a/templates/markdown.template +++ /dev/null @@ -1,23 +0,0 @@ -$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/templates/mediawiki.template b/templates/mediawiki.template deleted file mode 100644 index 5d210fa7d..000000000 --- a/templates/mediawiki.template +++ /dev/null @@ -1,13 +0,0 @@ -$for(include-before)$ -$include-before$ - -$endfor$ -$if(toc)$ -__TOC__ - -$endif$ -$body$ -$for(include-after)$ - -$include-after$ -$endfor$ diff --git a/templates/opendocument.template b/templates/opendocument.template deleted file mode 100644 index ca49782f0..000000000 --- a/templates/opendocument.template +++ /dev/null @@ -1,27 +0,0 @@ - - - $automatic-styles$ -$for(header-includes)$ - $header-includes$ -$endfor$ - - -$if(title)$ -$title$ -$endif$ -$for(author)$ -$author$ -$endfor$ -$if(date)$ -$date$ -$endif$ -$for(include-before)$ -$include-before$ -$endfor$ -$body$ -$for(include-after)$ -$include-after$ -$endfor$ - - - diff --git a/templates/org.template b/templates/org.template deleted file mode 100644 index eaaa17533..000000000 --- a/templates/org.template +++ /dev/null @@ -1,24 +0,0 @@ -$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/templates/plain.template b/templates/plain.template deleted file mode 100644 index 06ecbd3a6..000000000 --- a/templates/plain.template +++ /dev/null @@ -1,23 +0,0 @@ -$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/templates/rst.template b/templates/rst.template deleted file mode 100644 index f09bdd8b9..000000000 --- a/templates/rst.template +++ /dev/null @@ -1,39 +0,0 @@ -$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/templates/rtf.template b/templates/rtf.template deleted file mode 100644 index 833e19844..000000000 --- a/templates/rtf.template +++ /dev/null @@ -1,27 +0,0 @@ -{\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/templates/s5.template b/templates/s5.template deleted file mode 100644 index c1f727f6e..000000000 --- a/templates/s5.template +++ /dev/null @@ -1,69 +0,0 @@ - - - - - -$for(author)$ - -$endfor$ -$if(date)$ - -$endif$ - $if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$ - - - -$if(highlighting-css)$ - -$endif$ -$for(css)$ - -$endfor$ -$if(s5includes)$ -$s5includes$ -$else$ - - - - - - - -$endif$ -$if(math)$ - $math$ -$endif$ -$for(header-includes)$ - $header-includes$ -$endfor$ - - -$for(include-before)$ -$include-before$ -$endfor$ -
-
-
- - -
-
-$if(title)$ -
-

$title$

-

$for(author)$$author$$sep$
$endfor$

-

$date$

-
-$endif$ -$body$ -$for(include-after)$ -$include-after$ -$endfor$ -
- - diff --git a/templates/slidy.template b/templates/slidy.template deleted file mode 100644 index 8db862c9e..000000000 --- a/templates/slidy.template +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - -$for(author)$ - -$endfor$ -$if(date)$ - -$endif$ -$if(highlighting-css)$ - $if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$ - -$endif$ -$if(slidy-css)$ - -$else$ - -$endif$ -$for(css)$ - -$endfor$ -$if(math)$ - $math$ -$endif$ -$for(header-includes)$ - $header-includes$ -$endfor$ -$if(slidy-js)$ - -$else$ - -$endif$ -$if(duration)$ - -$endif$ - - -$for(include-before)$ -$include-before$ -$endfor$ -$if(title)$ -
-

$title$

-

-$for(author)$$author$$sep$
$endfor$ -

-$if(date)$ -

$date$

-$endif$ -
-$endif$ -$body$ -$for(include-after)$ -$include-after$ -$endfor$ - - diff --git a/templates/texinfo.template b/templates/texinfo.template deleted file mode 100644 index 9c1d8e178..000000000 --- a/templates/texinfo.template +++ /dev/null @@ -1,64 +0,0 @@ -\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/templates/textile.template b/templates/textile.template deleted file mode 100644 index 69bd05b56..000000000 --- a/templates/textile.template +++ /dev/null @@ -1,9 +0,0 @@ -$for(include-before)$ -$include-before$ - -$endfor$ -$body$ -$for(include-after)$ - -$include-after$ -$endfor$ -- cgit v1.2.3