From 1a166987dfc049d03f034b920e4ae679402aa2f5 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Thu, 31 Dec 2009 01:12:25 +0000 Subject: Added rough templates for all writers. These need much fine tuning. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1698 788f1e2b-df1e-0410-8736-df70ead52e1b --- templates/context.template | 113 ++++++++++++- templates/docbook.template | 76 ++++++++- templates/html.template | 75 +++++++-- templates/man.template | 76 ++++++++- templates/mediawiki.template | 76 ++++++++- templates/opendocument.template | 76 ++++++++- templates/rst.template | 45 +++++- templates/rtf.template | 25 ++- templates/s5.template | 351 +++++++++++++++++++++++++++++++++++++++- templates/texinfo.template | 54 ++++++- 10 files changed, 948 insertions(+), 19 deletions(-) (limited to 'templates') diff --git a/templates/context.template b/templates/context.template index 1333ed77b..abd56a0c7 100644 --- a/templates/context.template +++ b/templates/context.template @@ -1 +1,112 @@ -TODO +\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 title block commands +\unprotect +\def\doctitle#1{\gdef\@title{#1}} +\def\author#1{\gdef\@author{#1}} +\def\date#1{\gdef\@date{#1}} +\date{\currentdate} % Default to today unless specified otherwise. +\def\maketitle{% + \startalignment[center] + \blank[2*big] + {\tfd \@title} + \blank[3*medium] + {\tfa \@author} + \blank[2*medium] + {\tfa \@date} + \blank[3*medium] + \stopalignment} +\protect + +% 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 + +$header-includes$ + +\doctitle{$title$} +\author{\$authors\$} +\date{\$date\$} +\starttext +\maketitle + +\placecontent + +$before$ + +\subject{section oen} + +\startitemize[n][stopper=.] +\item + one + \startitemize[a][stopper=.] + \item + two + \startitemize[r][start=3,stopper=.,width=2.5em] + \item + three + \stopitemize + \stopitemize +\stopitemize + +\starttyping +hi +\stoptyping + +footnote +\footnote{with code + +\starttyping +code +\stoptyping +} +$after$ + +\stoptext + diff --git a/templates/docbook.template b/templates/docbook.template index 1333ed77b..4e5f464f3 100644 --- a/templates/docbook.template +++ b/templates/docbook.template @@ -1 +1,75 @@ -TODO + +title$header-includes$ +$before$ +

title

section oen

  1. one
    1. two
      1. three
hi
+

footnote1


  1. with code

    code
    +
$after$ + + diff --git a/templates/html.template b/templates/html.template index d8f6d5a2c..4e5f464f3 100644 --- a/templates/html.template +++ b/templates/html.template @@ -2,19 +2,74 @@ $if(title-prefix)$$title-prefix$ - $endif$$title$title$header-includes$ +

$title$

-$body$ - $before$ +

title

section oen

  1. one
    1. two
      1. three
hi
+

footnote1


  1. with code

    code
    +
$after$ + diff --git a/templates/man.template b/templates/man.template index 1333ed77b..4e5f464f3 100644 --- a/templates/man.template +++ b/templates/man.template @@ -1 +1,75 @@ -TODO + +title$header-includes$ +$before$ +

title

section oen

  1. one
    1. two
      1. three
hi
+

footnote1


  1. with code

    code
    +
$after$ + + diff --git a/templates/mediawiki.template b/templates/mediawiki.template index 1333ed77b..4e5f464f3 100644 --- a/templates/mediawiki.template +++ b/templates/mediawiki.template @@ -1 +1,75 @@ -TODO + +title$header-includes$ +$before$ +

title

section oen

  1. one
    1. two
      1. three
hi
+

footnote1


  1. with code

    code
    +
$after$ + + diff --git a/templates/opendocument.template b/templates/opendocument.template index 1333ed77b..4e5f464f3 100644 --- a/templates/opendocument.template +++ b/templates/opendocument.template @@ -1 +1,75 @@ -TODO + +title$header-includes$ +$before$ +

title

section oen

  1. one
    1. two
      1. three
hi
+

footnote1


  1. with code

    code
    +
$after$ + + diff --git a/templates/rst.template b/templates/rst.template index 1333ed77b..6c4bfd0d4 100644 --- a/templates/rst.template +++ b/templates/rst.template @@ -1 +1,44 @@ -TODO +=============== +:math:`$title$` +=============== + +:Author: $authors$ +:Date: $date$ + +.. contents:: + +$header-includes$ + +$before$ + +.. role:: math(raw) + :format: html latex + +section oen +=========== + + +1. one + + a. two + + iii. three + + + +:: + + hi + +footnote [1]_ + +.. [1] + with code + + :: + + code + + +$after$ + diff --git a/templates/rtf.template b/templates/rtf.template index 1333ed77b..8f4322783 100644 --- a/templates/rtf.template +++ b/templates/rtf.template @@ -1 +1,24 @@ -TODO +{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 Courier;}} +{\colortbl;\red255\green0\blue0;\red0\green0\blue255;} +\widowctrl\hyphauto + +$header-includes$ +{\pard \qc \f0 \sa180 \li0 \fi0 \b \fs36 {\i title}\par} +{\pard \qc \f0 \sa180 \li0 \fi0 $authors$\par} +{\pard \qc \f0 \sa180 \li0 \fi0 $date$\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Contents\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab section oen\sa180\par} +$before$ +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 section oen\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab one\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 a.\tx360\tab two\par} +{\pard \ql \f0 \sa0 \li1080 \fi-360 iii.\tx360\tab three\sa180\sa180\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \f1 hi\par} +{\pard \ql \f0 \sa180 \li0 \fi0 footnote{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 with code\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \f1 code\par} +}\par} +$after$ + +} + diff --git a/templates/s5.template b/templates/s5.template index 1333ed77b..e33cf912b 100644 --- a/templates/s5.template +++ b/templates/s5.template @@ -1 +1,350 @@ -TODO + +title + + + + + + + +$header-includes$ +$before$ +
+
+
+ + +
+
+ +
+

title

$authors$

$date$

+
+

section oen

  1. one
    1. two
      1. three
hi
+

footnote1

+
+

  1. with code

    code
    +
$after$ + + diff --git a/templates/texinfo.template b/templates/texinfo.template index 1333ed77b..968b43340 100644 --- a/templates/texinfo.template +++ b/templates/texinfo.template @@ -1 +1,53 @@ -TODO +\input texinfo +@documentencoding utf-8 +$header-includes$ + + +@ifnottex +@paragraphindent 0 +@end ifnottex +@titlepage +@title @math{title} +@author $authors$ +$date$ +@end titlepage +@contents +$before$ + +@node Top +@top @math{title} + +@menu +* section oen:: +@end menu + +@node section oen +@chapter section oen +@enumerate +@item +one +@enumerate a +@item +two +@enumerate 3 +@item +three +@end enumerate + +@end enumerate + +@end enumerate + +@verbatim +hi +@end verbatim + +footnote@footnote{with code +@verbatim +code +@end verbatim +} + +$after$ + +@bye -- cgit v1.2.3