git.iko.soy/typeable/pandoc
on master help sign in
Removed web directory.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1927 788f1e2b-df1e-0410-8736-df70ead52e1b

commit8ed6865a8a36ff3a7347e4ac72d869c47281e966 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSat 20 Mar 2010, 20:21 (17 years ago) parent56f08b5
10 files changed−386
web/S5DEMO−19 web/code.text−45 web/config.xsl−9 web/demos−109 web/docbook.css−29 web/footer.html−4 web/html2x.txt−55 web/math.text−17 web/mkdemos.pl−32 web/mytemplate.tex−67
web/S5DEMOdeleted−19
@@ -1,19 +0,0 @@
1−% Eating Habits
2−% John Doe
3−% March 22, 2005
4−
5−# In the morning
6−
7−- Eat eggs
8−- Drink coffee
9−
10−# In the evening
11−
12−- Eat spaghetti
13−- Drink wine
14−
15−# Conclusion
16−
17−- And the answer is...
18−- $f(x)=\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n$
19−
web/code.textdeleted−45
@@ -1,45 +0,0 @@
1−% Code with syntax highlighting
2−
3−Here's what a delimited code block looks like:
4−
5− ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.haskell}
6− -- | Inefficient quicksort in haskell.
7− qsort :: (Enum a) => [a] -> [a]
8− qsort [] = []
9− qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
10− qsort (filter (>= x) xs)
11− ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12−
13−And here's how it looks after syntax highlighting:
14−
15−~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.haskell}
16−-- | Inefficient quicksort in haskell.
17−qsort :: (Enum a) => [a] -> [a]
18−qsort [] = []
19−qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
20− qsort (filter (>= x) xs)
21−~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22−
23−Here's some python, with numbered lines (specify `{.python .numberLines}`):
24−
25−~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.python .numberLines}
26−class FSM(object):
27−
28−"""This is a Finite State Machine (FSM).
29−"""
30−
31−def __init__(self, initial_state, memory=None):
32−
33− """This creates the FSM. You set the initial state here. The "memory"
34− attribute is any object that you want to pass along to the action
35− functions. It is not used by the FSM. For parsing you would typically
36− pass a list to be used as a stack. """
37−
38− # Map (input_symbol, current_state) --> (action, next_state).
39− self.state_transitions = {}
40− # Map (current_state) --> (action, next_state).
41− self.state_transitions_any = {}
42− self.default_transition = None
43− ...
44−~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45−
web/config.xsldeleted−9
@@ -1,9 +0,0 @@
1−<?xml version='1.0'?>
2−<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3− xmlns:fo="http://www.w3.org/1999/XSL/Format"
4− version="1.0">
5− <xsl:param name="use.id.as.filename" select="'1'"/>
6− <xsl:param name="admon.graphics" select="'1'"/>
7− <xsl:param name="admon.graphics.path"></xsl:param>
8− <xsl:param name="html.stylesheet" select="'../docbook.css'"/>
9−</xsl:stylesheet>
web/demosdeleted−109
@@ -1,109 +0,0 @@
1−% Pandoc examples
2−
3−To see the output created by each of the commands below,
4−click on the name of the output file:
5−
6−1. HTML fragment:
7−
8−@ pandoc @@README@@ -o @@example1.html@@
9−
10−2. Standalone HTML file:
11−
12−@ pandoc -s @@README@@ -o @@example2.html@@
13−
14−3. HTML with smart quotes, table of contents, CSS, and custom footer:
15−
16−@ pandoc -s -S --toc -c @@pandoc.css@@ -A @@footer.html@@ @@README@@ -o @@example3.html@@
17−
18−4. LaTeX:
19−
20−@ pandoc -s @@README@@ -o @@example4.tex@@
21−
22−5. From LaTeX to markdown:
23−
24−@ pandoc -s @@example4.tex@@ -o @@example5.text@@
25−
26−6. reStructuredText:
27−
28−@ pandoc -s -w rst --toc @@README@@ -o @@example6.text@@
29−
30−7. Rich text format (RTF):
31−
32−@ pandoc -s @@README@@ -o @@example7.rtf@@
33−
34−8. S5 HTML slide show (all in one file):
35−
36−@ pandoc -s -m -i -w s5 @@S5DEMO@@ -o @@example8.html@@
37−
38−9. DocBook XML:
39−
40−@ pandoc -s -S -w docbook @@README@@ -o @@example9.db@@
41−
42− Chunked XHTML via DocBook and [xmlto]:
43−
44−@ xmlto xhtml -m @@config.xsl@@ @@example9.db@@ -o @@example9/@@
45−
46−10. Man page:
47−
48−@ pandoc -s -w man @@pandoc.1.md@@ -o @@example10.1@@
49−
50−11. ConTeXt:
51−
52−@ pandoc -s -w context @@README@@ -o @@example11.tex@@
53−
54− PDF via pandoc and ConTeXt's `texexec`:
55−
56−@ texexec --pdf @@example11.tex@@ # produces @@example11.pdf@@
57−
58−12. Converting a web page to markdown:
59−
60−@ pandoc -s -r html @@http://www.gnu.org/software/make/@@ -o @@example12.text@@
61−
62−13. From markdown to PDF:
63−
64−@ markdown2pdf @@README@@ -o @@example13.pdf@@
65−
66−14. PDF with numbered sections and a custom LaTeX header:
67−
68−@ markdown2pdf -N --template=@@mytemplate.tex@@ --variable version=1.4 @@README@@ --xetex --toc -o @@example14.pdf@@
69−
70−[xmlto]: http://cyberelk.net/tim/xmlto/
71−
72−15. A wiki program using [Happstack](http://happstack.com) and pandoc:
73− [gitit](http://gitit.net)
74−
75−16. A web application that uses pandoc to convert web pages to any of eight different
76− formats: [html2x](html2x.html).
77−
78−17. TeX math in HTML:
79−
80−@ pandoc @@math.text@@ -s -o @@mathDefault.html@@
81−@ pandoc @@math.text@@ -s --mathml -o @@mathMathML.html@@
82−@ pandoc @@math.text@@ -s -m -o @@mathLaTeXMathML.html@@
83−@ pandoc @@math.text@@ -s --mimetex=/cgi-bin/mimetex.cgi -o @@mathMimetex.html@@
84−@ pandoc @@math.text@@ -s --gladtex -o mathGladtex.htex
85−@ gladtex @@mathGladtex.htex@@ # produces @@mathGladtex.html@@
86−
87−18. Syntax highlighting of delimited code blocks:
88−
89−@ pandoc @@code.text@@ -s -o @@example18.html@@
90−
91−19. GNU Texinfo, converted to info, HTML, and PDF formats:
92−
93−@ pandoc @@README@@ -s -o @@example19.texi@@
94−@ makeinfo @@example19.texi@@ -o @@example19.info@@
95−@ makeinfo @@example19.texi@@ --html -o @@example19@@
96−@ texi2pdf @@example19.texi@@ # produces @@example19.pdf@@
97−
98−20. OpenDocument XML:
99−
100−@ pandoc @@README@@ -s -w opendocument -o @@example20.xml@@
101−
102−21. ODT (OpenDocument Text, readable by OpenOffice):
103−
104−@ pandoc @@README@@ -o @@example21.odt@@
105−
106−22. MediaWiki markup:
107−
108−@ pandoc -s -S -w mediawiki --toc @@README@@ -o @@example22.wiki@@
109−
web/docbook.cssdeleted−29
@@ -1,29 +0,0 @@
1−body {
2− font-family: Verdana, sans-serif;
3−}
4−
5−.screen {
6− font-family: monospace;
7− font-size: 1em;
8− display: block;
9− padding: 10px;
10− border: 1px solid #bbb;
11− background-color: #eee;
12− color: #000;
13− overflow: auto;
14− border-radius: 2.5px;
15− -moz-border-radius: 2.5px;
16− margin: 0.5em 2em;
17−}
18−
19−a {
20− text-decoration: none;
21− border-bottom: 1px dotted #000;
22−}
23−
24−a:hover {
25− background-color: #777;
26− color: #fff;
27−}
28−
29−
web/footer.htmldeleted−4
@@ -1,4 +0,0 @@
1−<div id="footer">
2− &copy; 2006-2007 <a href="http://johnmacfarlane.net/">John MacFarlane</a>
3−</div>
4−
web/html2x.txtdeleted−55
@@ -1,55 +0,0 @@
1−% html2x
2−
3−<form action="/cgi-bin/html2x.pl" method="get">
4−<p>
5−<label for="url">URL:</label>
6−<input type="text" size="60" name="url" value="http://johnmacfarlane.net/pandoc" />
7−<input type="submit" value="Convert" />
8−</p>
9−<table>
10−<tr>
11−<th>Convert to:</th>
12−<th style="padding-left: 1em;">Bookmarklets<br/>(right-click, add bookmark)</th>
13−</tr>
14−<tr>
15−<td style="border-right: 1px solid gray; padding-right: 2em;">
16−<input type="radio" name="format" value="markdown" checked="checked" />Markdown<br/>
17−<input type="radio" name="format" value="markdown+" />Markdown with
18−<a href="/pandoc/README.html#pandocs-markdown-vs-standard-markdown">pandoc extensions</a><br/>
19−<input type="radio" name="format" value="rst" />reStructuredText<br/>
20−<input type="radio" name="format" value="docbook" />DocBook XML<br/>
21−<input type="radio" name="format" value="latex" />LaTeX<br/>
22−<input type="radio" name="format" value="context" />ConTeXt<br/>
23−<input type="radio" name="format" value="rtf" />Rich Text Format (RTF)<br/>
24−<input type="radio" name="format" value="man" />Groff man page
25−</td>
26−<td style="padding-left: 1em;">
27−- [2markdown]
28−- [2markdown+]
29−- [2rst]
30−- [2docbook]
31−- [2LaTeX]
32−- [2ConTeXt]
33−- [2RTF]
34−- [2man]
35−</td>
36−</table>
37−</form>
38−
39−<center>
40−Powered by [pandoc]. Inspired by [the Asciinator].
41−
42−</center>
43−
44−[2markdown]: javascript:location.href='http://johnmacfarlane.net/cgi-bin/html2x.pl?format=markdown&url='+document.location.href;
45−[2markdown+]: javascript:location.href='http://johnmacfarlane.net/cgi-bin/html2x.pl?format=markdown+&url='+document.location.href;
46−[2rst]: javascript:location.href='http://johnmacfarlane.net/cgi-bin/html2x.pl?format=rst&url='+document.location.href;
47−[2docbook]: javascript:location.href='http://johnmacfarlane.net/cgi-bin/html2x.pl?format=docbook&url='+document.location.href;
48−[2LaTeX]: javascript:location.href='http://johnmacfarlane.net/cgi-bin/html2x.pl?format=latex&url='+document.location.href;
49−[2ConTeXt]: javascript:location.href='http://johnmacfarlane.net/cgi-bin/html2x.pl?format=context&url='+document.location.href;
50−[2RTF]: javascript:location.href='http://johnmacfarlane.net/cgi-bin/html2x.pl?format=rtf&url='+document.location.href;
51−[2man]: javascript:location.href='http://johnmacfarlane.net/cgi-bin/html2x.pl?format=man&url='+document.location.href;
52−
53−[pandoc]: /pandoc/
54−[the Asciinator]: http://www.aaronsw.com/2002/html2text/
55−
web/math.textdeleted−17
@@ -1,17 +0,0 @@
1−% Pandoc math demos
2−
3−$a^2 + b^2 = c^2$
4−
5−$v(t) = v_0 + \frac{1}{2}at^2$
6−
7−$\gamma = \frac{1}{\sqrt{1 - v^2/c^2}}$
8−
9−$\exists x \forall y (Rxy \equiv Ryx)$
10−
11−$p \wedge q \models p$
12−
13−$\Box\diamond p\equiv\diamond p$
14−
15−$\int_{0}^{1} x dx = \left[ \frac{1}{2}x^2 \right]_{0}^{1} = \frac{1}{2}$
16−
17−$e^x = \sum_{n=0}^\infty \frac{x^n}{n!} = \lim_{n\rightarrow\infty} (1+x/n)^n$
web/mkdemos.pldeleted−32
@@ -1,32 +0,0 @@
1−#!/usr/bin/perl -w
2−# first argument is input filename - a demo template.
3−# second argument is output filename.
4−
5−my $infile=$ARGV[0];
6−my $outfile=$ARGV[1];
7−
8−open( IN, "< $infile" );
9−open( OUT, "> $outfile" );
10−
11−while (<IN>) {
12−
13− my $line = $_;
14− my $firstchar = substr ($line,0,1);
15− if ( $firstchar eq '@' ) {
16− my $command = substr ($line,4);
17− my $commandExec = $command;
18− $commandExec =~ s/[#].*$//g; # strip off comments
19− $commandExec =~ s/@@//g; # strip off hotlink markers
20− print STDERR "$commandExec";
21− system "$commandExec";
22− $line = $command;
23− $line =~ s/@@([^@]*)@@/<a href="$1">$1<\/a>/g;
24− $line =~ s/^(.*)$/ <pre><code>$1<\/code><\/pre>/g;
25− if ( $line =~ /(example\d+\.html)<\/a><\/code>/m ) {
26− $line .= "\n (View [`$1` as a web page]($1).)\n";
27− }
28− }
29− print OUT $line;
30−
31−}
32−
web/mytemplate.texdeleted−67
@@ -1,67 +0,0 @@
1−\documentclass[12pt]{article}
2−\usepackage{amsmath}
3−\usepackage{ifxetex}
4−\ifxetex
5− \usepackage{fontspec,xltxtra,xunicode}
6− \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
7− \setromanfont{Georgia}
8− \setsansfont{Arial}
9− \setmonofont{Bitstream Vera Sans Mono}
10−\else
11− \usepackage[mathletters]{ucs}
12− \usepackage[utf8x]{inputenc}
13−\fi
14−\usepackage{microtype}
15−\usepackage{fancyhdr}
16−\pagestyle{fancy}
17−\pagenumbering{arabic}
18−\lhead{\itshape Pandoc User's Guide}
19−\chead{}
20−\rhead{\itshape{\nouppercase{\leftmark}}}
21−\lfoot{v $version$}
22−\cfoot{}
23−\rfoot{\thepage}
24−\usepackage{listings}
25−\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
26−\setlength{\parindent}{0pt}
27−\setlength{\parskip}{6pt plus 2pt minus 1pt}
28−\usepackage{fancyvrb}
29−\usepackage{enumerate}
30−\usepackage{array}
31−% This is needed because raggedright in table elements redefines \\:
32−\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
33−\let\PBS=\PreserveBackslash
34−\usepackage[normalem]{ulem}
35−\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
36−\usepackage[breaklinks=true,linktocpage,pdftitle={$title$},pdfauthor={$for(author)$$author$$sep$; $endfor$},xetex,colorlinks]{hyperref}
37−\usepackage{url}
38−\usepackage{graphicx}
39−$if(numbersections)$
40−$else$
41−\setcounter{secnumdepth}{0}
42−$endif$
43−\VerbatimFootnotes % allows verbatim text in footnotes
44−$for(header-includes)$
45−$header-includes$
46−$endfor$
47−
48−$if(title)$
49−\title{$title$}
50−$endif$
51−\author{$for(author)$$author$$sep$\\$endfor$}
52−$if(date)$
53−\date{$date$}
54−$endif$
55−
56−\begin{document}
57−$if(title)$
58−\maketitle
59−$if(toc)$
60−\tableofcontents
61−\newpage
62−$endif$
63−$endif$
64−
65−$body$
66−
67−\end{document}