aboutsummaryrefslogtreecommitdiff
path: root/src/headers
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-15 02:56:34 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-15 02:56:34 +0000
commit465b2d791ef5c7b7a7ef9b53e2a4b8bb09a8c1f9 (patch)
tree468d1550e0b8fb018723ce1522ee5bed5f4062af /src/headers
parent78aeebc143b673db6a0a08be9fa4f5314c681ce8 (diff)
downloadpandoc-465b2d791ef5c7b7a7ef9b53e2a4b8bb09a8c1f9.tar.gz
Merged branches/context: addition of a ConTeXt writer
<http://www.pragma-ade.nl/>. + Text.Pandoc.Writers.ConTeXt added. + Text.Pandoc modified to export the basic ConTeXt writer. + Main.hs modified to recognize 'context' as a writer. + ConTeXtHeader added to headers + DefaultHeaders.hs template modified to include ConTeXt header + Tests added (writer.context, tables.context), and runtests.pl modified to run them + pandoc.cabal updated to include Text.Pandoc.Writers.ConTeXt. git-svn-id: https://pandoc.googlecode.com/svn/trunk@716 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/headers')
-rw-r--r--src/headers/ConTeXtHeader54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/headers/ConTeXtHeader b/src/headers/ConTeXtHeader
new file mode 100644
index 000000000..7a27b38d8
--- /dev/null
+++ b/src/headers/ConTeXtHeader
@@ -0,0 +1,54 @@
+\enableregime[utf] % use UTF-8
+
+\setupcolors[state=start]
+\setupinteraction[state=start, color=middlered] % needed for hyperlinks
+
+\setuppapersize[letter][letter] % use letter paper
+\setuplayout[width=6in, height=9.5in] % page layout
+\setuppagenumbering[location={footer,center}, style=bold] % 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]
+
+% define ltxitem (for bulleted lists)
+\defineitemgroup[ltxitem][levels=4]
+\setupitemgroup[ltxitem][1][1]
+\setupitemgroup[ltxitem][2][2]
+\setupitemgroup[ltxitem][3][3]
+\setupitemgroup[ltxitem][4][4,packed]
+
+% define ltxenum (for enumerated lists)
+\defineitemgroup[ltxenum][levels=4]
+\setupitemgroup[ltxenum][1][n]
+\setupitemgroup[ltxenum][2][a]
+\setupitemgroup[ltxenum][3][r]
+\setupitemgroup[ltxenum][4][A,packed]
+
+\setupthinrules[width=15em] % width of horizontal rules
+