Skip to content

Commit

Permalink
Initial commit, 2.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Dec 27, 2017
1 parent e7d5d89 commit ac3dc50
Show file tree
Hide file tree
Showing 35 changed files with 2,647 additions and 2 deletions.
51 changes: 49 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,49 @@
# pandoc-templates
Templates for pandoc, tagged to release
The [pandoc-templates] repository contains default templates for [pandoc].

If you use custom templates, we recommend forking this
repository, so that you can integrate changes to the default
templates in future pandoc releases.

This repository is a subtree of [pandoc]; it will be updated
each time there is a new pandoc release. However, changes to
templates are made first in [pandoc]; thus, issues and pull
requests should be made [pandoc]'s issue tracker rather than
here.

[pandoc]: https://github.com/jgm/pandoc
[pandoc-templates]: https://github.com/jgm/pandoc-templates

All of the templates in this repository are dual licensed, under both
the GPL (v2 or higher, same as pandoc) and the BSD 3-clause license
(included below).

Copyright (c) 2014--2017, John MacFarlane

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

* Neither the name of John MacFarlane nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 changes: 35 additions & 0 deletions default.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
$if(titleblock)$
$title$
$if(author)$
$for(author)$$author$$sep$; $endfor$
$endif$
$if(date)$
$date$
$endif$
$if(keywords)$
:keywords: $for(keywords)$$keywords$$sep$, $endfor$
$endif$
$if(toc)$
:toc:
$endif$

$endif$
$if(abstract)$
[abstract]
== Abstract
$abstract$

$endif$
$for(header-includes)$
$header-includes$

$endfor$
$for(include-before)$
$include-before$

$endfor$
$body$
$for(include-after)$

$include-after$
$endfor$
21 changes: 21 additions & 0 deletions default.commonmark
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$if(titleblock)$
$titleblock$

$endif$
$for(header-includes)$
$header-includes$

$endfor$
$for(include-before)$
$include-before$

$endfor$
$if(toc)$
$table-of-contents$

$endif$
$body$
$for(include-after)$

$include-after$
$endfor$
143 changes: 143 additions & 0 deletions default.context
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
$if(context-lang)$
\mainlanguage[$context-lang$]
$endif$
$if(context-dir)$
\setupalign[$context-dir$]
\setupdirections[bidi=on,method=two]
$endif$
% Enable hyperlinks
\setupinteraction
[state=start,
$if(title)$
title={$title$},
$endif$
$if(subtitle)$
subtitle={$subtitle$},
$endif$
$if(author)$
author={$for(author)$$author$$sep$; $endfor$},
$endif$
$if(keywords)$
keyword={$for(keywords)$$keywords$$sep$; $endfor$},
$endif$
style=$linkstyle$,
color=$linkcolor$,
contrastcolor=$linkcontrastcolor$]

% make chapter, section bookmarks visible when opening document
\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section]
\setupinteractionscreen[option=bookmark]
\setuptagging[state=start]

$if(papersize)$
\setuppapersize[$for(papersize)$$papersize$$sep$,$endfor$]
$endif$
$if(layout)$
\setuplayout[$for(layout)$$layout$$sep$,$endfor$]
$endif$
$if(pagenumbering)$
\setuppagenumbering[$for(pagenumbering)$$pagenumbering$$sep$,$endfor$]
$endif$

% use microtypography
\definefontfeature[default][default][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes]
\definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes]
\setupalign[hz,hanging]
\setupitaliccorrection[global, always]

\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted

\definefallbackfamily[mainface][rm][DejaVu Serif][preset=range:greek, force=yes]
\definefontfamily[mainface][rm][$if(mainfont)$$mainfont$$else$Latin Modern Roman$endif$]
\definefontfamily[mainface][mm][$if(mathfont)$$mathfont$$else$Latin Modern Math$endif$]
\definefontfamily[mainface][ss][$if(sansfont)$$sansfont$$else$Latin Modern Sans$endif$]
\definefontfamily[mainface][tt][$if(monofont)$$monofont$$else$Latin Modern Typewriter$endif$][features=none]
\setupbodyfont[mainface$if(fontsize)$,$fontsize$$endif$]

\setupwhitespace[$if(whitespace)$$whitespace$$else$medium$endif$]
$if(indenting)$
\setupindenting[$for(indenting)$$indenting$$sep$,$endfor$]
$endif$
$if(interlinespace)$
\setupinterlinespace[$for(interlinespace)$$interlinespace$$sep$,$endfor$]
$endif$

\setuphead[chapter] [style=\tfd,header=empty]
\setuphead[section] [style=\tfc]
\setuphead[subsection] [style=\tfb]
\setuphead[subsubsection] [style=\bf]
\setuphead[subsubsubsection] [style=\sc]
\setuphead[subsubsubsubsection][style=\it]

$if(headertext)$
\setupheadertexts$for(headertext)$[$headertext$]$endfor$
$endif$
$if(footertext)$
\setupfootertexts$for(footertext)$[$footertext$]$endfor$
$endif$
$if(number-sections)$
$else$
\setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no]
$endif$

\definedescription
[description]
[headstyle=bold, style=normal, location=hanging, width=broad, margin=1cm, alternative=hanging]

\setupitemize[autointro] % prevent orphan list intro
\setupitemize[indentnext=no]

\setupfloat[figure][default={here,nonumber}]
\setupfloat[table][default={here,nonumber}]

\setupthinrules[width=15em] % width of horizontal rules

$for(header-includes)$
$header-includes$
$endfor$

\starttext
$if(title)$
\startalignment[middle]
{\tfd $title$}
$if(subtitle)$
\smallskip
{\tfa $subtitle$}
$endif$
$if(author)$
\smallskip
{\tfa $for(author)$$author$$sep$\crlf $endfor$}
$endif$
$if(date)$
\smallskip
{\tfa $date$}
$endif$
\bigskip
\stopalignment
$endif$
$if(abstract)$
\midaligned{\it Abstract}
\startnarrower[2*middle]
$abstract$
\stopnarrower
\blank[big]
$endif$
$for(include-before)$
$include-before$
$endfor$
$if(toc)$
\completecontent
$endif$
$if(lot)$
\completelistoftables
$endif$
$if(lof)$
\completelistoffigures
$endif$

$body$

$for(include-after)$
$include-after$
$endfor$
\stoptext
32 changes: 32 additions & 0 deletions default.docbook4
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
$if(mathml)$
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook EBNF Module V1.1CR1//EN"
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
$else$
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
$endif$
<article>
<articleinfo>
<title>$title$</title>
$if(author)$
<authorgroup>
$for(author)$
<author>
$author$
</author>
$endfor$
</authorgroup>
$endif$
$if(date)$
<date>$date$</date>
$endif$
</articleinfo>
$for(include-before)$
$include-before$
$endfor$
$body$
$for(include-after)$
$include-after$
$endfor$
</article>
37 changes: 37 additions & 0 deletions default.docbook5
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE article>
<article
$if(lang)$
xml:lang="$lang$"
$endif$
xmlns="http://docbook.org/ns/docbook" version="5.0"
$if(mathml)$
xmlns:mml="http://www.w3.org/1998/Math/MathML"
$endif$
xmlns:xlink="http://www.w3.org/1999/xlink" >
<info>
<title>$title$</title>
$if(subtitle)$
<subtitle>$subtitle$</subtitle>
$endif$
$if(author)$
<authorgroup>
$for(author)$
<author>
$author$
</author>
$endfor$
</authorgroup>
$endif$
$if(date)$
<date>$date$</date>
$endif$
</info>
$for(include-before)$
$include-before$
$endfor$
$body$
$for(include-after)$
$include-after$
$endfor$
</article>
13 changes: 13 additions & 0 deletions default.dokuwiki
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$for(include-before)$
$include-before$

$endfor$
$if(toc)$
__TOC__

$endif$
$body$
$for(include-after)$

$include-after$
$endfor$
Loading

0 comments on commit ac3dc50

Please sign in to comment.