pandoc 1.9.3 → 1.9.4
raw patch · 39 files changed
+870/−286 lines, 39 filesdep ~highlighting-katePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: highlighting-kate
API changes (from Hackage documentation)
+ Text.Pandoc: SlideousSlides :: HTMLSlideVariant
+ Text.Pandoc.Highlighting: zenburn :: Style
+ Text.Pandoc.Shared: SlideousSlides :: HTMLSlideVariant
Files
- COPYRIGHT +16/−0
- INSTALL +1/−0
- README +33/−18
- changelog +55/−0
- man/man1/pandoc.1 +39/−22
- man/man5/pandoc_markdown.5 +4/−3
- pandoc.cabal +11/−7
- slideous/slideous.css +95/−0
- slideous/slideous.js +321/−0
- src/Text/Pandoc.hs +1/−0
- src/Text/Pandoc/Biblio.hs +43/−83
- src/Text/Pandoc/Highlighting.hs +1/−0
- src/Text/Pandoc/Readers/LaTeX.hs +1/−0
- src/Text/Pandoc/Readers/RST.hs +15/−0
- src/Text/Pandoc/Readers/Textile.hs +4/−11
- src/Text/Pandoc/Shared.hs +2/−1
- src/Text/Pandoc/Slides.hs +1/−1
- src/Text/Pandoc/Writers/ConTeXt.hs +2/−2
- src/Text/Pandoc/Writers/Docx.hs +7/−7
- src/Text/Pandoc/Writers/HTML.hs +1/−0
- src/Text/Pandoc/Writers/LaTeX.hs +21/−24
- src/Text/Pandoc/Writers/Markdown.hs +3/−3
- src/Text/Pandoc/Writers/Org.hs +3/−3
- src/pandoc.hs +6/−4
- src/test-pandoc.hs +2/−0
- templates/default.latex +12/−18
- templates/default.slideous +75/−0
- templates/default.slidy +1/−1
- tests/lhs-test.latex +13/−15
- tests/lhs-test.latex+lhs +13/−15
- tests/markdown-citations.chicago-author-date.txt +1/−1
- tests/markdown-citations.ieee.txt +1/−1
- tests/markdown-citations.mhra.txt +1/−1
- tests/markdown-citations.txt +1/−1
- tests/tables.latex +0/−1
- tests/textile-reader.native +4/−0
- tests/textile-reader.textile +11/−0
- tests/writer.latex +27/−21
- tests/writer.markdown +22/−22
COPYRIGHT view
@@ -85,6 +85,22 @@ Released under an explicit Public Domain License +----------------------------------------------------------------------+slidy/default+Slidy javascript and CSS+by Dave Raggett+http://www.w3.org/Talks/Tools/Slidy2++Released under W3C document and software licenses++----------------------------------------------------------------------+slideous/default+Slideous javascript and CSS+by Stefan Gössner+http://goessner.net/++Released under Creative Commons GNU LGPL License+ ------------------------------------------------------------------------ windows/modpath.iss Copyright (c) 2007 Jared Breland
INSTALL view
@@ -119,6 +119,7 @@ data/ s5/ slidy/+ slideous/ dzslides/ pcre-license.txt pcre3.dll
README view
@@ -18,8 +18,8 @@ slide shows), [ConTeXt], [RTF], [DocBook XML], [OpenDocument XML], [ODT], [Word docx], [GNU Texinfo], [MediaWiki markup], [EPUB], [Textile], [groff man] pages, [Emacs Org-Mode], [AsciiDoc], and [Slidy],-[DZSlides], or [S5] HTML slide shows. It can also produce [PDF] output-on systems where LaTeX is installed.+[Slideous], [DZSlides], or [S5] HTML slide shows. It can also produce+[PDF] output on systems where LaTeX is installed. Pandoc's enhanced version of markdown includes syntax for footnotes, tables, flexible ordered lists, definition lists, delimited code blocks,@@ -153,6 +153,7 @@ `docbook` (DocBook XML), `opendocument` (OpenDocument XML), `odt` (OpenOffice text document), `docx` (Word docx), `epub` (EPUB book), `asciidoc` (AsciiDoc), `slidy` (Slidy HTML and javascript slide show),+ `slideous` (Slideous HTML and javascript slide show), `dzslides` (HTML5 + javascript slide show), `s5` (S5 HTML and javascript slide show), or `rtf` (rich text format). Note that `odt` and `epub` output will not be directed to *stdout*; an output filename must@@ -178,8 +179,8 @@ C:\Documents And Settings\USERNAME\Application Data\pandoc in Windows. A `reference.odt`, `reference.docx`, `default.csl`,- `epub.css`, `templates`, `slidy`, or `s5` directory placed in this- directory will override pandoc's normal defaults.+ `epub.css`, `templates`, `slidy`, `slideous`, or `s5` directory+ placed in this directory will override pandoc's normal defaults. `-v`, `--version` : Print version.@@ -199,7 +200,8 @@ `-R`, `--parse-raw` : Parse untranslatable HTML codes and LaTeX environments as raw HTML or LaTeX, instead of ignoring them. Affects only HTML and LaTeX- input. Raw HTML can be printed in markdown, reStructuredText, HTML, Slidy,+ input. Raw HTML can be printed in markdown, reStructuredText, HTML,+ Slidy, Slideous, DZSlides, and S5 output; raw LaTeX can be printed in markdown, reStructuredText, LaTeX, and ConTeXt output. The default is for the readers to omit untranslatable HTML codes and LaTeX environments.@@ -280,7 +282,7 @@ : Include an automatically generated table of contents (or, in the case of `latex`, `context`, and `rst`, an instruction to create one) in the output document. This option has no effect on `man`,- `docbook`, `slidy`, or `s5` output.+ `docbook`, `slidy`, `slideous`, or `s5` output. `--no-highlight` : Disables syntax highlighting for code blocks and inlines, even when@@ -289,7 +291,7 @@ `--highlight-style`=*STYLE* : Specifies the coloring style to be used in highlighted source code. Options are `pygments` (the default), `kate`, `monochrome`,- `espresso`, `haddock`, and `tango`.+ `espresso`, `zenburn`, `haddock`, and `tango`. `-H` *FILE*, `--include-in-header=`*FILE* : Include contents of *FILE*, verbatim, at the end of the header.@@ -323,7 +325,8 @@ in the sense that it needs no external files and no net access to be displayed properly by a browser. This option works only with HTML output formats, including `html`, `html5`, `html+lhs`, `html5+lhs`, `s5`,- `slidy`, and `dzslides`. Scripts, images, and stylesheets at absolute URLs+ `slidy`, `slideous`,+ and `dzslides`. Scripts, images, and stylesheets at absolute URLs will be downloaded; those at relative URLs will be sought first relative to the working directory, then relative to the user data directory (see `--data-dir`), and finally relative to pandoc's default data directory.@@ -378,7 +381,7 @@ `--slide-level`=*NUMBER* : Specifies that headers with the specified level create- slides (for `beamer`, `s5`, `slidy`, `dzslides`). Headers+ slides (for `beamer`, `s5`, `slidy`, `slideous`, `dzslides`). Headers above this level in the hierarchy are used to divide the slide show into sections; headers below this level create subheads within a slide. The default is to set the slide level@@ -683,6 +686,8 @@ `slidy-url` : base URL for Slidy documents (defaults to `http://www.w3.org/Talks/Tools/Slidy2`)+`slideous-url`+: base URL for Slideous documents (defaults to `default`) `s5-url` : base URL for S5 documents (defaults to `ui/default`) `fontsize`@@ -1698,7 +1703,7 @@ Docx ~ It will be rendered using OMML math markup. -HTML, Slidy, DZSlides, S5, EPUB+HTML, Slidy, Slideous, DZSlides, S5, EPUB ~ The way math is rendered in HTML will depend on the command-line options selected: @@ -1749,7 +1754,8 @@ (except verbatim contexts, where `<`, `>`, and `&` are interpreted literally). -The raw HTML is passed through unchanged in HTML, S5, Slidy, DZSlides, EPUB,+The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous,+DZSlides, EPUB, Markdown, and Textile output, and suppressed in other formats. *Pandoc extension*.@@ -2070,9 +2076,9 @@ ================================= You can use Pandoc to produce an HTML + javascript slide presentation-that can be viewed via a web browser. There are three ways to do this,-using [S5], [DZSlides], or [Slidy]. You can also produce a PDF slide-show using LaTeX [beamer].+that can be viewed via a web browser. There are four ways to do this,+using [S5], [DZSlides], [Slidy], or [Slideous]. You can also produce a+PDF slide show using LaTeX [beamer]. Here's the markdown source for a simple slide show, `habits.txt`: @@ -2118,6 +2124,10 @@ for Slidy, + pandoc -t slideous -s habits.txt -o habits.html++for Slideous,+ pandoc -t dzslides -s habits.txt -o habits.html for DZSlides, or@@ -2164,11 +2174,14 @@ will be the slide level.) But you can also structure the slide show into sections, as in the example above. -For Slidy and S5, the file produced by pandoc with the `-s/--standalone`+For Slidy, Slideous and S5, the file produced by pandoc with the+`-s/--standalone` option embeds a link to javascripts and CSS files, which are assumed to-be available at the relative path `s5/default` (for S5) or at the Slidy+be available at the relative path `s5/default` (for S5) or `slideous`+(for Slideous), or at the Slidy website at `w3.org` (for Slidy). (These paths can be changed by setting-the `slidy-url` or `s5-url` variables; see `--variable`, above.) For DZSlides,+the `slidy-url`, `slideous-url` or `s5-url` variables; see `--variable`,+above.) For DZSlides, the (relatively short) javascript and css are included in the file by default. Incremental lists@@ -2190,7 +2203,8 @@ ------------------ You can change the style of HTML slides by putting customized CSS files-in `$DATADIR/s5/default` (for S5) or `$DATADIR/slidy` (for Slidy),+in `$DATADIR/s5/default` (for S5), `$DATADIR/slidy` (for Slidy),+or `$DATADIR/slideous` (for Slideous), where `$DATADIR` is the user data directory (see `--data-dir`, above). The originals may be found in pandoc's system data directory (generally `$CABALDIR/pandoc-VERSION/s5/default`). Pandoc will look there for any@@ -2267,6 +2281,7 @@ [reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html [S5]: http://meyerweb.com/eric/tools/s5/ [Slidy]: http://www.w3.org/Talks/Tools/Slidy/+[Slideous]: http://goessner.net/articles/slideous/ [HTML]: http://www.w3.org/TR/html40/ [HTML 5]: http://www.w3.org/TR/html5/ [XHTML]: http://www.w3.org/TR/xhtml1/
changelog view
@@ -1,3 +1,58 @@+pandoc (1.9.4)++ * Simplified `Text.Pandoc.Biblio` and fixed bugs with citations inside+ footnotes and captions. We now handle note citations by inserting+ footnotes during initial citation processing, and doing a separate+ pass later to remove notes inside notes.++ * Added 'zenburn' highlight style from highlighting-kate.++ * Added Slideous writer. Slideous is an HTML + javascript slide show+ format, similar to Slidy, but works with IE 7. (Jonas Smedegaard)++ * LaTeX writer:++ + Ensure we don't have extra blank lines at ends of cells.+ This can cause LaTeX errors, as they are interpreted as new paragraphs.+ + More consistent interblock spacing.+ + Require highlighting-kate >= 0.5.1, for proper highlighted inline+ code in LaTeX. Closes #527.+ + Ensure that a Verbatim at the end of a footnote is followed by+ a newline. (Fixes a regression in the previous version.)+ + In default template, use black for internal links and TOC.+ Added commented-out code to use footnotes for links, as would+ be suitable in print output.++ * Beamer writer: When `--incremental` is used, lists inside+ a block quote should appear all at once. (This makes Beamer+ output consistent with the HTML slide show formats.)++ * ConTeXt writer:++ + Escape `%` as `\letterpercent{}` not `\letterpercent `,+ to avoid gobbling spaces after the `%` sign.+ + Ensure space after `\stopformula`.++ * Markdown writer:++ + Use `:` form instead of `~` in definition lists, for better+ compatibility with other markdown implementations.+ + Don't wrap the term, because it breaks definition lists.+ + Use a nonzero space to prevent false recognition+ of list marker in ordered lists. Closes #516.++ * Org writer: Add space before language name. Closes #523.++ * Docx writer: Simplified bullet characters so they work properly+ with Word 2007. Closes #520.++ * LaTeX reader: Support `\centerline`.++ * RST reader: handle figures. Closes #522.++ * Textile reader: fix for `<notextile>` and `==`. Closes #517.+ (Paul Rivier)+ pandoc (1.9.3) * Fixed bug in `fromEntities`. The previous version would turn
man/man1/pandoc.1 view
@@ -13,7 +13,8 @@ reStructuredText, XHTML, HTML 5, LaTeX (including beamer slide shows), ConTeXt, RTF, DocBook XML, OpenDocument XML, ODT, Word docx, GNU Texinfo, MediaWiki markup, EPUB, Textile, groff man pages, Emacs-Org-Mode, AsciiDoc, and Slidy, DZSlides, or S5 HTML slide shows.+Org-Mode, AsciiDoc, and Slidy, Slideous, DZSlides, or S5 HTML slide+shows. It can also produce PDF output on systems where LaTeX is installed. .PP Pandoc\[aq]s enhanced version of markdown includes syntax for footnotes,@@ -186,9 +187,9 @@ \f[C]opendocument\f[] (OpenDocument XML), \f[C]odt\f[] (OpenOffice text document), \f[C]docx\f[] (Word docx), \f[C]epub\f[] (EPUB book), \f[C]asciidoc\f[] (AsciiDoc), \f[C]slidy\f[] (Slidy HTML and javascript-slide show), \f[C]dzslides\f[] (HTML5 + javascript slide show),-\f[C]s5\f[] (S5 HTML and javascript slide show), or \f[C]rtf\f[] (rich-text format).+slide show), \f[C]slideous\f[] (Slideous HTML and javascript slide+show), \f[C]dzslides\f[] (HTML5 + javascript slide show), \f[C]s5\f[]+(S5 HTML and javascript slide show), or \f[C]rtf\f[] (rich text format). Note that \f[C]odt\f[] and \f[C]epub\f[] output will not be directed to \f[I]stdout\f[]; an output filename must be specified using the \f[C]-o/--output\f[] option.@@ -229,9 +230,9 @@ .PP in Windows. A \f[C]reference.odt\f[], \f[C]reference.docx\f[], \f[C]default.csl\f[],-\f[C]epub.css\f[], \f[C]templates\f[], \f[C]slidy\f[], or \f[C]s5\f[]-directory placed in this directory will override pandoc\[aq]s normal-defaults.+\f[C]epub.css\f[], \f[C]templates\f[], \f[C]slidy\f[],+\f[C]slideous\f[], or \f[C]s5\f[] directory placed in this directory+will override pandoc\[aq]s normal defaults. .RE .TP .B \f[C]-v\f[], \f[C]--version\f[]@@ -258,7 +259,7 @@ LaTeX, instead of ignoring them. Affects only HTML and LaTeX input. Raw HTML can be printed in markdown, reStructuredText, HTML, Slidy,-DZSlides, and S5 output; raw LaTeX can be printed in markdown,+Slideous, DZSlides, and S5 output; raw LaTeX can be printed in markdown, reStructuredText, LaTeX, and ConTeXt output. The default is for the readers to omit untranslatable HTML codes and LaTeX environments.@@ -375,7 +376,7 @@ \f[C]latex\f[], \f[C]context\f[], and \f[C]rst\f[], an instruction to create one) in the output document. This option has no effect on \f[C]man\f[], \f[C]docbook\f[],-\f[C]slidy\f[], or \f[C]s5\f[] output.+\f[C]slidy\f[], \f[C]slideous\f[], or \f[C]s5\f[] output. .RS .RE .TP@@ -388,8 +389,8 @@ .B \f[C]--highlight-style\f[]=\f[I]STYLE\f[] Specifies the coloring style to be used in highlighted source code. Options are \f[C]pygments\f[] (the default), \f[C]kate\f[],-\f[C]monochrome\f[], \f[C]espresso\f[], \f[C]haddock\f[], and-\f[C]tango\f[].+\f[C]monochrome\f[], \f[C]espresso\f[], \f[C]zenburn\f[],+\f[C]haddock\f[], and \f[C]tango\f[]. .RS .RE .TP@@ -439,7 +440,7 @@ browser. This option works only with HTML output formats, including \f[C]html\f[], \f[C]html5\f[], \f[C]html+lhs\f[], \f[C]html5+lhs\f[],-\f[C]s5\f[], \f[C]slidy\f[], and \f[C]dzslides\f[].+\f[C]s5\f[], \f[C]slidy\f[], \f[C]slideous\f[], and \f[C]dzslides\f[]. Scripts, images, and stylesheets at absolute URLs will be downloaded; those at relative URLs will be sought first relative to the working directory, then relative to the user data directory (see@@ -525,7 +526,8 @@ .TP .B \f[C]--slide-level\f[]=\f[I]NUMBER\f[] Specifies that headers with the specified level create slides (for-\f[C]beamer\f[], \f[C]s5\f[], \f[C]slidy\f[], \f[C]dzslides\f[]).+\f[C]beamer\f[], \f[C]s5\f[], \f[C]slidy\f[], \f[C]slideous\f[],+\f[C]dzslides\f[]). Headers above this level in the hierarchy are used to divide the slide show into sections; headers below this level create subheads within a slide.@@ -959,6 +961,11 @@ .RS .RE .TP+.B \f[C]slideous-url\f[]+base URL for Slideous documents (defaults to \f[C]default\f[])+.RS+.RE+.TP .B \f[C]s5-url\f[] base URL for S5 documents (defaults to \f[C]ui/default\f[]) .RS@@ -1050,7 +1057,7 @@ .PP You can use Pandoc to produce an HTML + javascript slide presentation that can be viewed via a web browser.-There are three ways to do this, using S5, DZSlides, or Slidy.+There are four ways to do this, using S5, DZSlides, Slidy, or Slideous. You can also produce a PDF slide show using LaTeX beamer. .PP Here\[aq]s the markdown source for a simple slide show,@@ -1112,6 +1119,14 @@ .IP .nf \f[C]+pandoc\ -t\ slideous\ -s\ habits.txt\ -o\ habits.html+\f[]+.fi+.PP+for Slideous,+.IP+.nf+\f[C] pandoc\ -t\ dzslides\ -s\ habits.txt\ -o\ habits.html \f[] .fi@@ -1164,13 +1179,14 @@ But you can also structure the slide show into sections, as in the example above. .PP-For Slidy and S5, the file produced by pandoc with the+For Slidy, Slideous and S5, the file produced by pandoc with the \f[C]-s/--standalone\f[] option embeds a link to javascripts and CSS files, which are assumed to be available at the relative path-\f[C]s5/default\f[] (for S5) or at the Slidy website at \f[C]w3.org\f[]-(for Slidy).-(These paths can be changed by setting the \f[C]slidy-url\f[] or-\f[C]s5-url\f[] variables; see \f[C]--variable\f[], above.)+\f[C]s5/default\f[] (for S5) or \f[C]slideous\f[] (for Slideous), or at+the Slidy website at \f[C]w3.org\f[] (for Slidy).+(These paths can be changed by setting the \f[C]slidy-url\f[],+\f[C]slideous-url\f[] or \f[C]s5-url\f[] variables; see+\f[C]--variable\f[], above.) For DZSlides, the (relatively short) javascript and css are included in the file by default. .SS Incremental lists@@ -1194,9 +1210,10 @@ .SS Styling the slides .PP You can change the style of HTML slides by putting customized CSS files-in \f[C]$DATADIR/s5/default\f[] (for S5) or \f[C]$DATADIR/slidy\f[] (for-Slidy), where \f[C]$DATADIR\f[] is the user data directory (see-\f[C]--data-dir\f[], above).+in \f[C]$DATADIR/s5/default\f[] (for S5), \f[C]$DATADIR/slidy\f[] (for+Slidy), or \f[C]$DATADIR/slideous\f[] (for Slideous), where+\f[C]$DATADIR\f[] is the user data directory (see \f[C]--data-dir\f[],+above). The originals may be found in pandoc\[aq]s system data directory (generally \f[C]$CABALDIR/pandoc-VERSION/s5/default\f[]). Pandoc will look there for any files it does not find in the user data
man/man5/pandoc_markdown.5 view
@@ -1260,7 +1260,7 @@ .RS .RE .TP-.B HTML, Slidy, DZSlides, S5, EPUB+.B HTML, Slidy, Slideous, DZSlides, S5, EPUB The way math is rendered in HTML will depend on the command-line options selected: .RS@@ -1320,8 +1320,9 @@ document (except verbatim contexts, where \f[C]<\f[], \f[C]>\f[], and \f[C]&\f[] are interpreted literally). .PP-The raw HTML is passed through unchanged in HTML, S5, Slidy, DZSlides,-EPUB, Markdown, and Textile output, and suppressed in other formats.+The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous,+DZSlides, EPUB, Markdown, and Textile output, and suppressed in other+formats. .PP \f[I]Pandoc extension\f[]. .PP
pandoc.cabal view
@@ -1,5 +1,5 @@ Name: pandoc-Version: 1.9.3+Version: 1.9.4 Cabal-Version: >= 1.10 Build-Type: Custom License: GPL@@ -15,12 +15,12 @@ Synopsis: Conversion between markup formats Description: Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses- this library. It can read markdown and (subsets of)- reStructuredText, HTML, LaTeX and Textile, and it can write+ this library. It can read markdown and (subsets of) HTML,+ reStructuredText, LaTeX, DocBook, and Textile, and it can write markdown, reStructuredText, HTML, LaTeX, ConTeXt, Docbook, OpenDocument, ODT, Word docx, RTF, MediaWiki, Textile, groff man pages, plain text, Emacs Org-Mode, AsciiDoc, EPUB,- and S5 and Slidy HTML slide shows.+ and S5, Slidy and Slideous HTML slide shows. . Pandoc extends standard markdown syntax with footnotes, embedded LaTeX, definition lists, tables, and other@@ -45,6 +45,7 @@ templates/default.rst, templates/default.plain, templates/default.mediawiki, templates/default.rtf, templates/default.s5, templates/default.slidy,+ templates/default.slideous, templates/default.dzslides, templates/default.asciidoc, templates/default.textile, templates/default.org, templates/epub-titlepage.html, templates/epub-page.html,@@ -78,6 +79,9 @@ slidy/graphics/nofold-dim.gif, slidy/graphics/unfold-dim.gif, slidy/graphics/fold-dim.gif,+ -- data for slideous writer+ slideous/slideous.css,+ slideous/slideous.js, -- data for dzslides writer dzslides/template.html, -- data for citeproc@@ -216,7 +220,7 @@ tagsoup >= 0.12.5 && < 0.13, base64-bytestring >= 0.1 && < 0.2, zlib >= 0.5 && < 0.6,- highlighting-kate >= 0.5.0.2 && < 0.6,+ highlighting-kate >= 0.5.1 && < 0.6, temporary >= 1.1 && < 1.2 if flag(blaze_html_0_5) build-depends:@@ -321,7 +325,7 @@ tagsoup >= 0.12.5 && < 0.13, base64-bytestring >= 0.1 && < 0.2, zlib >= 0.5 && < 0.6,- highlighting-kate >= 0.5.0.2 && < 0.6,+ highlighting-kate >= 0.5.1 && < 0.6, temporary >= 1.1 && < 1.2 if flag(blaze_html_0_5) build-depends:@@ -385,7 +389,7 @@ tagsoup >= 0.12.5 && < 0.13, base64-bytestring >= 0.1 && < 0.2, zlib >= 0.5 && < 0.6,- highlighting-kate >= 0.5.0.2 && < 0.6,+ highlighting-kate >= 0.5.1 && < 0.6, temporary >= 1.1 && < 1.2 if flag(blaze_html_0_5) build-depends:
+ slideous/slideous.css view
@@ -0,0 +1,95 @@+/* This work is licensed under Creative Commons GNU LGPL License.++ License: http://creativecommons.org/licenses/LGPL/2.1/+ Version: 1.0++ Author: Stefan Goessner/2005+ Web: http://goessner.net/ +*/+@media screen, projection {+body {+ background-color: #e3eee7;+ padding: 0;+ margin: 0;+ color: #132; + border-color: #678; + font-size: 125%;+}+#statusbar {+ display: none;+ position: absolute; z-index: 10;+ top: auto; bottom: 0; left: 0; right: 0;+ height: 2em;+ background-color: #f0fff8;+ color: #132;+ font-size: 75%;+ padding: 0.5em 0.5em 0 2px;+ border-top: solid 1px #000;+}+#statusbar button, #tocbox {+ cursor: pointer; + color: #031;+ background-color: #e0eee7;+ margin: 1px;+ padding: 0 0.5em;+ border: inset 1px black;+}+#statusbar button:hover, #tocbox:hover {+ color: #031;+ background-color: #c0ccc6;+ border: outset 1px black;+}+#tocbox {+ width: 15em;+}+#eos {+ visibility: hidden;+ color: #021;+ background-color: #fffafa;+ border: inset 1px black;+ font-size: 120%;+}+div.slide {+ display: block;+ margin: 0 0 2em 0;+ padding: 0 150px;+}++div.slide h1 {+ background: #a0aaa4;+ color: #f0fff8;+ padding: 0 0.5em 0 0.5em;+ margin: 0 -150px;+ font-size: 120%;+ border-bottom: solid 1px black;+}++div.slide h1:before { content: "# "; }+div.handout { display: block; }+ +body>#statusbar { /* ie6 hack for fixing the statusbar - in quirks mode */+ position: fixed; /* thanks to Anne van Kesteren and Arthur Steiner */+} /* see http://limpid.nl/lab/css/fixed/footer */+* html body {+ overflow: hidden;+}+* html div.slide {+ height: 100%;+ padding-bottom: 2em;+ overflow: auto;+} /* end ie6-hack */++} /* @media screen, projection */++@media print {+body {+ color: black;+ font-family: sans-serif;+ font-size: 11pt;+}++#statusbar { display: none; }+div.slide { page-break-after: always; }+div.handout { display: block; }++} /* @media print */
+ slideous/slideous.js view
@@ -0,0 +1,321 @@+/* This work is licensed under Creative Commons GNU LGPL License.++ License: http://creativecommons.org/licenses/LGPL/2.1/++ Author: Stefan Goessner/2005-2006+ Web: http://goessner.net/ +*/+var Slideous = {+ version: 1.0,+ // == user customisable ===+ clickables: { a: true, button: true, img: true, input: true, object: true, textarea: true, select: true, option: true },+ incrementables: { blockquote: { filter: "self, parent" }, + dd: { filter: "self, parent" },+ dt: { filter: "self, parent" },+ h2: { filter: "self, parent" },+ h3: { filter: "self, parent" },+ h4: { filter: "self, parent" },+ h5: { filter: "self, parent" },+ h6: { filter: "self, parent" },+ li: { filter: "self, parent" },+ p: { filter: "self" }, + pre: { filter: "self" }, + img: { filter: "self, parent" }, + object: { filter: "self, parent" },+ table: { filter: "self, parent" },+ td: { filter: "self, parent" },+ th: { filter: "self, parent" },+ tr: { filter: "parent, grandparent" }+ },+ autoincrementables: { ol: true, ul: true, dl: true },+ autoincrement: false,+ statusbar: true,+ navbuttons: { incfontbutton: function(){Slideous.changefontsize(+Slideous.fontdelta);},+ decfontbutton: function(){Slideous.changefontsize(-Slideous.fontdelta);},+ contentbutton: function(){Slideous.gotoslide(Slideous.tocidx(), true, true);},+ homebutton: function(){Slideous.gotoslide(1, true, true);},+ prevslidebutton: function(){Slideous.previous(false);},+ previtembutton: function(){Slideous.previous(true);},+ nextitembutton: function(){Slideous.next(true);},+ nextslidebutton: function(){Slideous.next(false);},+ endbutton: function(){Slideous.gotoslide(Slideous.count,true,true);} },+ fontsize: 125, // in percent, corresponding to body.font-size in css file+ fontdelta: 5, // increase/decrease fontsize by this value+ mousesensitive: true,+ tocidx: 0,+ tocitems: { toc: "<li><a href=\"#s{\$slideidx}\">{\$slidetitle}</a></li>",+ tocbox: "<option value=\"#s{\$slideidx}\" title=\"{\$slidetitle}\">{\$slidetitle}</option>" },+ keydown: function(evt) {+ evt = evt || window.event;+ var key = evt.keyCode || evt.which;+ if (key && !evt.ctrlKey && !evt.altKey) {+ switch (key) {+ case 33: // page up ... previous slide+ Slideous.previous(false); evt.cancel = !Slideous.showall; break;+ case 37: // left arrow ... previous item+ Slideous.previous(true); evt.cancel = !Slideous.showall; break;+ case 32: // space bar+ case 39: // right arrow+ Slideous.next(true); evt.cancel = !Slideous.showall; break;+ case 13: // carriage return ... next slide+ case 34: // page down+ Slideous.next(false); evt.cancel = !Slideous.showall; break;+ case 35: // end ... last slide (not recognised by opera)+ Slideous.gotoslide(Slideous.count, true, true); evt.cancel = !Slideous.showall; break;+ case 36: // home ... first slide (not recognised by opera)+ Slideous.gotoslide(1, true, true); evt.cancel = !Slideous.showall; break;+ case 65: // A ... show All+ case 80: // P ... Print mode+ Slideous.toggleshowall(!Slideous.showall); evt.cancel = true; break;+ case 67: // C ... goto contents+ Slideous.gotoslide(Slideous.tocidx, true, true); evt.cancel = true; break;+ case 77: // M ... toggle mouse sensitivity+ Slideous.mousenavigation(Slideous.mousesensitive = !Slideous.mousesensitive); evt.cancel = true; break;+ case 83: // S ... toggle statusbar+ Slideous.togglestatusbar(); evt.cancel = true; break;+ case 61: // + ... increase fontsize+ case 107:+ Slideous.changefontsize(+Slideous.fontdelta); evt.cancel = true; break;+ case 109: // - ... decrease fontsize+ Slideous.changefontsize(-Slideous.fontdelta); evt.cancel = true; break;+ default: break;+ }+ if (evt.cancel) evt.returnValue = false;+ }+ return !evt.cancel;+ },++ // == program logic ===+ count: 0, // # of slides ..+ curidx: 0, // current slide index ..+ mousedownpos: null, // last mouse down position ..+ contentselected: false, // indicates content selection ..+ showall: true,+ init: function() {+ Slideous.curidx = 1;+ Slideous.importproperties();+ Slideous.registerslides();+ document.body.innerHTML = Slideous.injectproperties(document.body.innerHTML);+ Slideous.buildtocs();+ Slideous.registeranchors();+ Slideous.toggleshowall(false);+ Slideous.updatestatus();+ document.body.style.fontSize = Slideous.fontsize+"%";+ document.getElementById("s1").style.display = "block";+ document.onkeydown = Slideous.keydown;+ Slideous.mousenavigation(Slideous.mousesensitive);+ Slideous.registerbuttons();+ if (window.location.hash)+ Slideous.gotoslide(window.location.hash.substr(2), true, true);+ },+ registerslides: function() {+ var div = document.getElementsByTagName("div");+ Slideous.count = 0;+ for (var i in div)+ if (Slideous.hasclass(div[i], "slide"))+ div[i].setAttribute("id", "s"+(++Slideous.count));+ },+ registeranchors: function() {+ var a = document.getElementsByTagName("a"),+ loc = (window.location.hostname+window.location.pathname).replace(/\\/g, "/");+ for (var i in a) {+ if (a[i].href && a[i].href.indexOf(loc) >= 0 && a[i].href.lastIndexOf("#") >= 0) {+ a[i].href = "javascript:Slideous.gotoslide(" + a[i].href.substr(a[i].href.lastIndexOf("#")+2)+",true,true)";+ }+ }+ },+ registerbuttons: function() {+ var button;+ for (var b in Slideous.navbuttons)+ if (button = document.getElementById(b))+ button.onclick = Slideous.navbuttons[b];+ },+ importproperties: function() { // from html meta section ..+ var meta = document.getElementsByTagName("meta"), elem;+ for (var i in meta)+ if (meta[i].attributes && meta[i].attributes["name"] && meta[i].attributes["name"].value in Slideous)+ switch (typeof(Slideous[meta[i].attributes["name"].value])) {+ case "number": Slideous[meta[i].attributes["name"].value] = parseInt(meta[i].attributes["content"].value); break;+ case "boolean": Slideous[meta[i].attributes["name"].value] = meta[i].attributes["content"].value == "true" ? true : false; break;+ default: Slideous[meta[i].attributes["name"].value] = meta[i].attributes["content"].value; break;+ }+ },+ injectproperties: function(str) {+ var meta = document.getElementsByTagName("meta"), elem;+ for (var i in meta) {+ if (meta[i].attributes && meta[i].attributes["name"])+ str = str.replace(new RegExp("{\\$"+meta[i].attributes["name"].value+"}","g"), meta[i].attributes["content"].value);+ }+ return str = str.replace(/{\$generator}/g, "Slideous")+ .replace(/{\$version}/g, Slideous.version)+ .replace(/{\$title}/g, document.title)+ .replace(/{\$slidecount}/g, Slideous.count);+ },+ buildtocs: function() {+ var toc = document.getElementById("toc"), list = "",+ tocbox = document.getElementById("tocbox");+ if (toc) {+ for (var i=0; i<Slideous.count; i++)+ list += Slideous.tocitems.toc.replace(/{\$slideidx}/g, i+1).replace(/{\$slidetitle}/, document.getElementById("s"+(i+1)).getElementsByTagName("h1")[0].innerHTML);+ toc.innerHTML = list;+ while (toc && !Slideous.hasclass(toc, "slide")) toc = toc.parentNode;+ if (toc) Slideous.tocidx = toc.getAttribute("id").substr(1);+ }+ if (tocbox) {+ tocbox.innerHTML = "";+ for (var i=0; i<Slideous.count; i++)+ tocbox.options[tocbox.length] = new Option((i+1)+". "+document.getElementById("s"+(i+1)).getElementsByTagName("h1")[0].innerHTML, "#s"+(i+1));+ tocbox.onchange = function() { Slideous.gotoslide(this.selectedIndex+1, true, true); };+ }+ },+ next: function(deep) {+ if (!Slideous.showall) {+ var slide = document.getElementById("s"+Slideous.curidx),+ item = Slideous.firstitem(slide, Slideous.isitemhidden);+ if (deep) { // next item+ if (item)+ Slideous.displayitem(item, true);+ else+ Slideous.gotoslide(Slideous.curidx+1, false, false);+ }+ else if (item) // complete slide ..+ while (item = Slideous.firstitem(slide, Slideous.isitemhidden))+ Slideous.displayitem(item, true);+ else // next slide+ Slideous.gotoslide(Slideous.curidx+1, true, false);+ Slideous.updatestatus();+ }+ },+ previous: function(deep) {+ if (!Slideous.showall) {+ var slide = document.getElementById("s"+Slideous.curidx);+ if (deep) {+ var item = Slideous.lastitem(slide, Slideous.isitemvisible);+ if (item)+ Slideous.displayitem(item, false);+ else+ Slideous.gotoslide(Slideous.curidx-1, true, false);+ }+ else+ Slideous.gotoslide(Slideous.curidx-1, true, false);+ Slideous.updatestatus();+ }+ },+ gotoslide: function(i, showitems, updatestatus) {+ if (!Slideous.showall && i > 0 && i <= Slideous.count && i != Slideous.curidx) {+ document.getElementById("s"+Slideous.curidx).style.display = "none";+ var slide = document.getElementById("s"+(Slideous.curidx=i)), item;+ while (item = Slideous.firstitem(slide, showitems ? Slideous.isitemhidden : Slideous.isitemvisible))+ Slideous.displayitem(item, showitems);+ slide.style.display = "block";+ if (updatestatus)+ Slideous.updatestatus();+ }+ },+ firstitem: function(root, filter) {+ var found = filter(root);+ for (var node=root.firstChild; node!=null && !found; node = node.nextSibling)+ found = Slideous.firstitem(node, filter);+ return found;+ },+ lastitem: function(root, filter) {+ var found = null;+ for (var node=root.lastChild; node!=null && !found; node = node.previousSibling)+ found = Slideous.lastitem(node, filter);+ return found || filter(root);+ },+ isitem: function(node, visible) {+ var nodename;+ return node && node.nodeType == 1 // elements only ..+ && (nodename=node.nodeName.toLowerCase()) in Slideous.incrementables+ && ( Slideous.incrementables[nodename].filter.match("\\bself\\b") && (Slideous.hasclass(node, "incremental") || (Slideous.autoincrement && nodename in Slideous.autoincrementables))+ || Slideous.incrementables[nodename].filter.match("\\bparent\\b") && (Slideous.hasclass(node.parentNode, "incremental") || (Slideous.autoincrement && node.parentNode.nodeName.toLowerCase() in Slideous.autoincrementables))+ || Slideous.incrementables[nodename].filter.match("\\bgrandparent\\b") && (Slideous.hasclass(node.parentNode.parentNode, "incremental") || (Slideous.autoincrement && node.parentNode.parentNode.nodeName.toLowerCase() in Slideous.autoincrementables))+ )+ && (visible ? (node.style.visibility != "hidden")+ : (node.style.visibility == "hidden"))+ ? node : null;+ },+ isitemvisible: function(node) { return Slideous.isitem(node, true); },+ isitemhidden: function(node) { return Slideous.isitem(node, false); },+ displayitem: function(item, show) {+ if (item) item.style.visibility = (show ? "visible" : "hidden");+ },+ updatestatus: function() {+ if (Slideous.statusbar) {+ var eos = document.getElementById("eos"), + idx = document.getElementById("slideidx"),+ tocbox = document.getElementById("tocbox");+ if (eos) + eos.style.visibility = Slideous.firstitem(document.getElementById("s"+Slideous.curidx), Slideous.isitemhidden) != null+ ? "visible" : "hidden";+ if (idx) + idx.innerHTML = Slideous.curidx;+ if (tocbox)+ tocbox.selectedIndex = Slideous.curidx-1;+ }+ },+ changefontsize: function(delta) {+ document.body.style.fontSize = (Slideous.fontsize+=delta)+"%";+ },+ togglestatusbar: function() {+ document.getElementById("statusbar").style.display = (Slideous.statusbar = !Slideous.statusbar) ? "block" : "none";+ },+ toggleshowall: function(showall) {+ var slide, item;+ for (var i=0; i<Slideous.count; i++) {+ slide = document.getElementById("s"+(i+1));+ slide.style.display = showall ? "block" : "none";+ while (item = Slideous.firstitem(slide, showall ? Slideous.isitemhidden : Slideous.isitemvisible)) + Slideous.displayitem(item, showall);+ var divs = slide.getElementsByTagName("div");+ for (var j in divs)+ if (Slideous.hasclass(divs[j], "handout"))+ divs[j].style.display = showall ? "block" : "none";+ }+ if (!showall)+ document.getElementById("s"+Slideous.curidx).style.display = "block";+ if (Slideous.statusbar) + document.getElementById("statusbar").style.display = showall ? "none" : "block";+ Slideous.showall = showall;+ },+ hasclass: function(elem, classname) {+ var classattr = null;+ return (classattr=(elem.attributes && elem.attributes["class"])) + && classattr.nodeValue.match("\\b"+classname+"\\b");+ },+ selectedcontent: function() {+ return window.getSelection ? window.getSelection().toString() + : document.getSelection ? document.getSelection() + : document.selection ? document.selection.createRange().text+ : "";+ },+ mousenavigation: function(on) {+ if (on) {+ document.onmousedown = Slideous.mousedown;+ document.onmouseup = Slideous.mouseup;+ }+ else+ document.onmousedown = document.onmouseup = null;+ },+ mousepos: function(e) {+ return e.pageX ? {x: e.pageX, y: e.pageY} + : {x: e.x+document.body.scrollLeft, y: e.y+document.body.scrollTop};+ },+ mousedown: function(evt) {+ evt = evt||window.event;+ Slideous.mousedownpos = Slideous.mousepos(evt);+ Slideous.contentselected = !!Slideous.selectedcontent() || ((evt.target || evt.srcElement).nodeName.toLowerCase() in Slideous.clickables);+ return true;+ },+ mouseup: function(evt) {+ evt = evt||window.event;+ var pos = Slideous.mousepos(evt);+ if (pos.x == Slideous.mousedownpos.x && pos.y == Slideous.mousedownpos.y && !Slideous.contentselected) {+ Slideous.next(true);+ return evt.returnValue = !(evt.cancel = true);+ }+ return false;+ }+};+window.onload = Slideous.init;
src/Text/Pandoc.hs view
@@ -187,6 +187,7 @@ writerHtml5 = True }) ,("s5" , writeHtmlString) ,("slidy" , writeHtmlString)+ ,("slideous" , writeHtmlString) ,("dzslides" , writeHtmlString) ,("docbook" , writeDocbook) ,("opendocument" , writeOpenDocument)
src/Text/Pandoc/Biblio.hs view
@@ -53,43 +53,59 @@ Just f -> readJsonAbbrevFile f Nothing -> return [] p' <- bottomUpM setHash p- let (nts,grps) = if styleClass csl == "note"- then let cits = queryWith getCite p'- ncits = map (queryWith getCite) $ queryWith getNote p'- needNt = cits \\ concat ncits- in (,) needNt $ getNoteCitations needNt p'- else (,) [] $ queryWith getCitation p'+ let grps = queryWith getCitation p' style = csl { styleAbbrevs = abbrevs } result = citeproc procOpts style r (setNearNote style $ map (map toCslCite) grps) cits_map = M.fromList $ zip grps (citations result) biblioList = map (renderPandoc' style) (bibliography result)- Pandoc m b = bottomUp (procInlines $ processCite style cits_map) p'- return . generateNotes nts . Pandoc m $ b ++ biblioList+ Pandoc m b = bottomUp (processCite style cits_map) p'+ b' = bottomUp mvPunct $ deNote b+ return $ Pandoc m $ b' ++ biblioList -- | Substitute 'Cite' elements with formatted citations.-processCite :: Style -> M.Map [Citation] [FormattedOutput] -> [Inline] -> [Inline]-processCite s cs (Cite t _ : rest) =+processCite :: Style -> M.Map [Citation] [FormattedOutput] -> Inline -> Inline+processCite s cs (Cite t _) = case M.lookup t cs of- Just (x:xs) ->- if isTextualCitation t- then renderPandoc s [x] ++- if null xs- then processCite s cs rest- else [Space, Cite t (renderPandoc s xs)]- ++ processCite s cs rest- else Cite t (renderPandoc s (x:xs)) : processCite s cs rest- _ -> Str ("Error processing " ++ show t) : processCite s cs rest-processCite s cs (x:xs) = bottomUp (processCite s cs) x : processCite s cs xs-processCite _ _ [] = []+ Just (x:xs)+ | isTextualCitation t && not (null xs) ->+ let xs' = renderPandoc s xs+ in if styleClass s == "note"+ then Cite t (renderPandoc s [x] ++ [Note [Para xs']])+ else Cite t (renderPandoc s [x] ++ [Space | not (startWithPunct xs')] ++ xs')+ | otherwise -> if styleClass s == "note"+ then Cite t [Note [Para $ renderPandoc s (x:xs)]]+ else Cite t (renderPandoc s (x:xs))+ _ -> Strong [Str "???"] -- TODO raise error instead?+processCite _ _ x = x -procInlines :: ([Inline] -> [Inline]) -> Block -> Block-procInlines f b- | Plain inls <- b = Plain $ f inls- | Para inls <- b = Para $ f inls- | Header i inls <- b = Header i $ f inls- | otherwise = b+isNote :: Inline -> Bool+isNote (Note _) = True+isNote (Cite _ [Note _]) = True+isNote _ = False +mvPunct :: [Inline] -> [Inline]+mvPunct (Space : Space : xs) = Space : xs+mvPunct (Space : x : ys) | isNote x, startWithPunct ys =+ Str (headInline ys) : x : tailFirstInlineStr ys+mvPunct (Space : x : ys) | isNote x = x : ys+mvPunct xs = xs++sanitize :: [Inline] -> [Inline]+sanitize xs | endWithPunct xs = toCapital xs+ | otherwise = toCapital (xs ++ [Str "."])++deNote :: [Block] -> [Block]+deNote = topDown go+ where go (Note [Para xs]) = Note $ bottomUp go' [Para $ sanitize xs]+ go (Note xs) = Note $ bottomUp go' xs+ go x = x+ go' (Note [Para xs]:ys) =+ if startWithPunct ys && endWithPunct xs+ then initInline xs ++ ys+ else xs ++ ys+ go' xs = xs+ isTextualCitation :: [Citation] -> Bool isTextualCitation (c:_) = citationMode c == AuthorInText isTextualCitation _ = False@@ -100,65 +116,9 @@ getCitation i | Cite t _ <- i = [t] | otherwise = [] -getNote :: Inline -> [Inline]-getNote i | Note _ <- i = [i]- | otherwise = []--getCite :: Inline -> [Inline]-getCite i | Cite _ _ <- i = [i]- | otherwise = []--getNoteCitations :: [Inline] -> Pandoc -> [[Citation]]-getNoteCitations needNote- = let mvCite i = if i `elem` needNote then Note [Para [i]] else i- setNote = bottomUp mvCite- getCits = concat . flip (zipWith $ setCiteNoteNum) [1..] .- map (queryWith getCite) . queryWith getNote . setNote- in queryWith getCitation . getCits- setHash :: Citation -> IO Citation setHash (Citation i p s cm nn _) = hashUnique `fmap` newUnique >>= return . Citation i p s cm nn--generateNotes :: [Inline] -> Pandoc -> Pandoc-generateNotes needNote = bottomUp (mvCiteInNote needNote)--mvCiteInNote :: [Inline] -> Block -> Block-mvCiteInNote is = procInlines mvCite- where- mvCite :: [Inline] -> [Inline]- mvCite inls- | x:i:xs <- inls, startWithPunct xs- , x == Space, i `elem_` is = switch i xs ++ mvCite (tailFirstInlineStr xs)- | x:i:xs <- inls- , x == Space, i `elem_` is = mvInNote i : mvCite xs- | i:xs <- inls, i `elem_` is- , startWithPunct xs = switch i xs ++ mvCite (tailFirstInlineStr xs)- | i:xs <- inls, Note _ <- i = checkNt i : mvCite xs- | i:xs <- inls = i : mvCite xs- | otherwise = []- elem_ x xs = case x of Cite cs _ -> (Cite cs []) `elem` xs; _ -> False- switch i xs = Str (headInline xs) : mvInNote i : []- mvInNote i- | Cite t o <- i = Note [Para [Cite t $ sanitize o]]- | otherwise = Note [Para [i ]]- sanitize i- | endWithPunct i = toCapital i- | otherwise = toCapital (i ++ [Str "."])-- checkPt i- | Cite c o : xs <- i , endWithPunct o, startWithPunct xs- = Cite c (initInline o) : checkPt xs- | x:xs <- i = x : checkPt xs- | otherwise = []- checkNt = bottomUp $ procInlines checkPt--setCiteNoteNum :: [Inline] -> Int -> [Inline]-setCiteNoteNum ((Cite cs o):xs) n = Cite (setCitationNoteNum n cs) o : setCiteNoteNum xs n-setCiteNoteNum _ _ = []--setCitationNoteNum :: Int -> [Citation] -> [Citation]-setCitationNoteNum i = map $ \c -> c { citationNoteNum = i} toCslCite :: Citation -> CSL.Cite toCslCite c
src/Text/Pandoc/Highlighting.hs view
@@ -39,6 +39,7 @@ , styleToCss , pygments , espresso+ , zenburn , tango , kate , monochrome
src/Text/Pandoc/Readers/LaTeX.hs view
@@ -268,6 +268,7 @@ , ("end", mzero) , ("item", skipopts *> loose_item) , ("documentclass", skipopts *> braced *> preamble)+ , ("centerline", (para . trimInlines) <$> (skipopts *> tok)) ] ++ map ignoreBlocks -- these commands will be ignored unless --parse-raw is specified, -- in which case they will appear as raw latex blocks
src/Text/Pandoc/Readers/RST.hs view
@@ -127,6 +127,7 @@ , blockQuote , fieldList , imageBlock+ , figureBlock , customCodeBlock , mathBlock , defaultRoleBlock@@ -361,6 +362,20 @@ blanklines result <- indentedBlock return $ CodeBlock ("", ["sourceCode", language], []) $ stripTrailingNewlines result+++figureBlock :: GenParser Char ParserState Block+figureBlock = try $ do+ string ".. figure::"+ src <- removeLeadingTrailingSpace `fmap` manyTill anyChar newline+ body <- indentedBlock+ caption <- parseFromString extractCaption body+ return $ Para [Image caption (src,"")]++extractCaption :: GenParser Char ParserState [Inline]+extractCaption = try $ do+ manyTill anyLine blanklines+ many inline -- | The 'math' directive (from Sphinx) for display math. mathBlock :: GenParser Char st Block
src/Text/Pandoc/Readers/Textile.hs view
@@ -493,19 +493,12 @@ escapedInline = escapedEqs <|> escapedTag escapedEqs :: GenParser Char ParserState Inline-escapedEqs = Str <$> (try $ surrounded (string "==") anyChar)---- -- | literal text escaped between == ... ==--- escapedEqs :: GenParser Char ParserState Inline--- escapedEqs = try $ do--- string "=="--- contents <- manyTill anyChar (try $ string "==")--- return $ Str contents+escapedEqs = Str <$> (try $ string "==" *> manyTill anyChar (try $ string "==")) -- | literal text escaped btw <notextile> tags escapedTag :: GenParser Char ParserState Inline-escapedTag = try $ Str <$>- enclosed (string "<notextile>") (string "</notextile>") anyChar+escapedTag = Str <$>+ (try $ string "<notextile>" *> manyTill anyChar (try $ string "</notextile>")) -- | Any special symbol defined in wordBoundaries symbol :: GenParser Char ParserState Inline@@ -533,7 +526,7 @@ surrounded :: GenParser Char st t -- ^ surrounding parser -> GenParser Char st a -- ^ content parser (to be used repeatedly) -> GenParser Char st [a]-surrounded border = enclosed border border+surrounded border = enclosed border (try border) -- | Inlines are most of the time of the same form simpleInline :: GenParser Char ParserState t -- ^ surrounding parser
@@ -482,6 +482,7 @@ -- | Varieties of HTML slide shows. data HTMLSlideVariant = S5Slides | SlidySlides+ | SlideousSlides | DZSlides | NoSlides deriving (Show, Read, Eq)@@ -494,7 +495,7 @@ , writerEPUBMetadata :: String -- ^ Metadata to include in EPUB , writerTabStop :: Int -- ^ Tabstop for conversion btw spaces and tabs , writerTableOfContents :: Bool -- ^ Include table of contents- , writerSlideVariant :: HTMLSlideVariant -- ^ Are we writing S5 or Slidy?+ , writerSlideVariant :: HTMLSlideVariant -- ^ Are we writing S5, Slidy or Slideous? , writerIncremental :: Bool -- ^ True if lists should be incremental , writerXeTeX :: Bool -- ^ Create latex suitable for use by xetex , writerHTMLMathMethod :: HTMLMathMethod -- ^ How to print math in HTML
src/Text/Pandoc/Slides.hs view
@@ -26,7 +26,7 @@ Portability : portable Utility functions for splitting documents into slides for slide-show formats (dzslides, s5, slidy, beamer).+show formats (dzslides, s5, slidy, slideous, beamer). -} module Text.Pandoc.Slides ( getSlideLevel, prepSlides ) where import Text.Pandoc.Definition
src/Text/Pandoc/Writers/ConTeXt.hs view
@@ -96,7 +96,7 @@ '$' -> "\\$" '|' -> "\\letterbar{}" '^' -> "\\letterhat{}"- '%' -> "\\letterpercent "+ '%' -> "\\letterpercent{}" '~' -> "\\lettertilde{}" '&' -> "\\&" '#' -> "\\#"@@ -271,7 +271,7 @@ inlineToConTeXt (Math InlineMath str) = return $ char '$' <> text str <> char '$' inlineToConTeXt (Math DisplayMath str) =- return $ text "\\startformula " <> text str <> text " \\stopformula"+ return $ text "\\startformula " <> text str <> text " \\stopformula" <> space inlineToConTeXt (RawInline "context" str) = return $ text str inlineToConTeXt (RawInline "tex" str) = return $ text str inlineToConTeXt (RawInline _ _) = return empty
src/Text/Pandoc/Writers/Docx.hs view
@@ -262,13 +262,13 @@ ,show n) step = 720 hang = 480- bulletFor 0 = "\8226"- bulletFor 1 = "\9702"- bulletFor 2 = "\8227"- bulletFor 3 = "\8259"- bulletFor 4 = "\8226"- bulletFor 5 = "\9702"- bulletFor _ = "\8227"+ bulletFor 0 = "\x2022" -- filled circle+ bulletFor 1 = "\x2013" -- en dash+ bulletFor 2 = "\x2022" -- hyphen bullet+ bulletFor 3 = "\x2013"+ bulletFor 4 = "\x2022"+ bulletFor 5 = "\x2013"+ bulletFor _ = "\x2022" styleFor UpperAlpha _ = "upperLetter" styleFor LowerAlpha _ = "lowerLetter" styleFor UpperRoman _ = "upperRoman"
src/Text/Pandoc/Writers/HTML.hs view
@@ -199,6 +199,7 @@ , ("date", date') , ("idprefix", writerIdentifierPrefix opts) , ("slidy-url", "http://www.w3.org/Talks/Tools/Slidy2")+ , ("slideous-url", "slideous") , ("s5-url", "s5/default") ] ++ [ ("html5","true") | writerHtml5 opts ] ++ (case toc of
src/Text/Pandoc/Writers/LaTeX.hs view
@@ -117,7 +117,7 @@ else return blocks' body <- mapM (elementToLaTeX options) $ hierarchicalize blocks'' biblioTitle <- liftM (render colwidth) $ inlineListToLaTeX lastHeader- let main = render colwidth $ vcat body+ let main = render colwidth $ vsep body st <- get let biblioFiles = intercalate "," $ map dropExtension $ writerBiblioFiles options citecontext = case writerCiteMethod options of@@ -170,7 +170,7 @@ elementToLaTeX opts (Sec level _ id' title' elements) = do header' <- sectionHeader id' level title' innerContents <- mapM (elementToLaTeX opts) elements- return $ vcat (header' : innerContents)+ return $ vsep (header' : innerContents) -- escape things as needed for LaTeX stringToLaTeX :: Bool -> String -> State WriterState String@@ -265,23 +265,22 @@ capt <- inlineListToLaTeX txt img <- inlineToLaTeX (Image txt (src,tit)) return $ "\\begin{figure}[htbp]" $$ "\\centering" $$ img $$- ("\\caption{" <> capt <> char '}') $$ "\\end{figure}" $$ blankline+ ("\\caption{" <> capt <> char '}') $$ "\\end{figure}" blockToLaTeX (Para lst) = do result <- inlineListToLaTeX lst- return $ result <> blankline+ return result blockToLaTeX (BlockQuote lst) = do beamer <- writerBeamer `fmap` gets stOptions case lst of [b] | beamer && isListBlock b -> do oldIncremental <- gets stIncremental- modify $ \s -> s{ stIncremental = True }+ modify $ \s -> s{ stIncremental = not oldIncremental } result <- blockToLaTeX b modify $ \s -> s{ stIncremental = oldIncremental } return result _ -> do contents <- blockListToLaTeX lst- return $ "\\begin{quote}" $$ chomp contents $$ "\\end{quote}"- <> blankline+ return $ "\\begin{quote}" $$ contents $$ "\\end{quote}" blockToLaTeX (CodeBlock (_,classes,keyvalAttr) str) = do opts <- gets stOptions case () of@@ -300,11 +299,7 @@ return "Verbatim" else return "verbatim" return $ flush (text ("\\begin{" ++ env ++ "}") $$ text str $$- text ("\\end{" ++ env ++ "}")) <> text "\n" <> blankline- -- note: we use 'text "\n"' instead of cr to make this- -- resistant to the 'chomp' in footnotes; a footnote- -- ending with a Verbatim environment must have a- -- cr before the closing }+ text ("\\end{" ++ env ++ "}")) <> cr listingsCodeBlock = do st <- get let params = if writerListings (stOptions st)@@ -339,14 +334,14 @@ Nothing -> rawCodeBlock Just h -> modify (\st -> st{ stHighlighting = True }) >> return (flush $ text h)-blockToLaTeX (RawBlock "latex" x) = return $ text x <> blankline+blockToLaTeX (RawBlock "latex" x) = return $ text x blockToLaTeX (RawBlock _ _) = return empty blockToLaTeX (BulletList lst) = do incremental <- gets stIncremental let inc = if incremental then "[<+->]" else "" items <- mapM listItemToLaTeX lst- return $ text ("\\begin{itemize}" ++ inc) $$ chomp (vcat items) $$- "\\end{itemize}" <> blankline+ return $ text ("\\begin{itemize}" ++ inc) $$ vcat items $$+ "\\end{itemize}" blockToLaTeX (OrderedList (start, numstyle, numdelim) lst) = do st <- get let inc = if stIncremental st then "[<+->]" else ""@@ -367,15 +362,15 @@ "}{" ++ show (start - 1) ++ "}" else empty return $ text ("\\begin{enumerate}" ++ inc) <> exemplar $$ resetcounter $$- chomp (vcat items) $$ "\\end{enumerate}" <> blankline+ vcat items $$ "\\end{enumerate}" blockToLaTeX (DefinitionList lst) = do incremental <- gets stIncremental let inc = if incremental then "[<+->]" else "" items <- mapM defListItemToLaTeX lst- return $ text ("\\begin{description}" ++ inc) $$ chomp (vcat items) $$- "\\end{description}" <> blankline+ return $ text ("\\begin{description}" ++ inc) $$ vcat items $$+ "\\end{description}" blockToLaTeX HorizontalRule = return $- "\\begin{center}\\rule{3in}{0.4pt}\\end{center}" $$ blankline+ "\\begin{center}\\rule{3in}{0.4pt}\\end{center}" blockToLaTeX (Header level lst) = sectionHeader "" level lst blockToLaTeX (Table caption aligns widths heads rows) = do modify $ \s -> s{ stInTable = True, stTableNotes = [] }@@ -401,7 +396,7 @@ $$ braces (text "% rows" $$ "\\FL" $$ vcat (headers : rows'') $$ "\\LL" <> cr) modify $ \s -> s{ stTable = True, stInTable = False, stTableNotes = [] }- return $ tableBody $$ blankline+ return $ tableBody toColDescriptor :: Alignment -> String toColDescriptor align =@@ -412,7 +407,7 @@ AlignDefault -> "l" blockListToLaTeX :: [Block] -> State WriterState Doc-blockListToLaTeX lst = mapM blockToLaTeX lst >>= return . vcat+blockListToLaTeX lst = vsep `fmap` mapM blockToLaTeX lst tableRowToLaTeX :: Bool -> [Alignment]@@ -473,7 +468,6 @@ <> braces (lab <> text "\\label" <> braces (text ref)) else lab)- $$ blankline let headerWith x y = refLabel $ text x <> y return $ case level' of 0 -> if writerBeamer opts@@ -484,7 +478,7 @@ 3 -> headerWith "\\subsubsection" stuffing 4 -> headerWith "\\paragraph" stuffing 5 -> headerWith "\\subparagraph" stuffing- _ -> txt $$ blankline+ _ -> txt -- | Convert list of inline elements to LaTeX.@@ -594,13 +588,16 @@ contents' <- blockListToLaTeX contents modify (\s -> s {stInNote = False}) inTable <- liftM stInTable get+ let optnl = case reverse contents of+ (CodeBlock _ _ : _) -> cr+ _ -> empty if inTable then do curnotes <- liftM stTableNotes get let marker = cycle ['a'..'z'] !! length curnotes modify $ \s -> s{ stTableNotes = (marker, contents') : curnotes } return $ "\\tmark" <> brackets (char marker) <> space- else return $ "\\footnote" <> braces (chomp $ nest 2 contents')+ else return $ "\\footnote" <> braces (nest 2 contents' <> optnl) -- note: a \n before } needed when note ends with a Verbatim environment citationsToNatbib :: [Citation] -> State WriterState Doc
src/Text/Pandoc/Writers/Markdown.hs view
@@ -218,7 +218,7 @@ let esc = if (not (writerStrictMarkdown opts)) && not (stPlain st) && beginsWithOrderedListMarker (render Nothing contents)- then text "\\"+ then text "\x200B" -- zero-width space, a hack else empty return $ esc <> contents <> blankline blockToMarkdown _ (RawBlock f str)@@ -355,13 +355,13 @@ labelText <- inlineListToMarkdown opts label let tabStop = writerTabStop opts st <- get- let leader = if stPlain st then " " else " ~"+ let leader = if stPlain st then " " else ": " let sps = case writerTabStop opts - 3 of n | n > 0 -> text $ replicate n ' ' _ -> text " " defs' <- mapM (mapM (blockToMarkdown opts)) defs let contents = vcat $ map (\d -> hang tabStop (leader <> sps) $ vcat d <> cr) defs'- return $ labelText <> cr <> contents <> cr+ return $ nowrap labelText <> cr <> contents <> cr -- | Convert list of Pandoc block elements to markdown. blockListToMarkdown :: WriterOptions -- ^ Options
src/Text/Pandoc/Writers/Org.hs view
@@ -139,9 +139,9 @@ "ledger", "lisp", "matlab", "mscgen", "ocaml", "octave", "oz", "perl", "plantuml", "python", "R", "ruby", "sass", "scheme", "screen", "sh", "sql", "sqlite"]- let (beg, end) = if null at- then ("#+BEGIN_EXAMPLE", "#+END_EXAMPLE")- else ("#+BEGIN_SRC" ++ head at, "#+END_SRC")+ let (beg, end) = case at of+ [] -> ("#+BEGIN_EXAMPLE", "#+END_EXAMPLE")+ (x:_) -> ("#+BEGIN_SRC " ++ x, "#+END_SRC") return $ text beg $$ nest tabstop (text str) $$ text end $$ blankline blockToOrg (BlockQuote blocks) = do contents <- blockListToOrg blocks
src/pandoc.hs view
@@ -37,7 +37,7 @@ import Text.Pandoc.XML ( toEntities, fromEntities ) import Text.Pandoc.SelfContained ( makeSelfContained ) import Text.Pandoc.Highlighting ( languages, Style, tango, pygments,- espresso, kate, haddock, monochrome )+ espresso, zenburn, kate, haddock, monochrome ) import System.Environment ( getArgs, getProgName ) import System.Exit ( exitWith, ExitCode (..) ) import System.FilePath@@ -101,7 +101,7 @@ , optOutputFile :: String -- ^ Name of output file , optNumberSections :: Bool -- ^ Number sections in LaTeX , optSectionDivs :: Bool -- ^ Put sections in div tags in HTML- , optIncremental :: Bool -- ^ Use incremental lists in Slidy/S5+ , optIncremental :: Bool -- ^ Use incremental lists in Slidy/Slideous/S5 , optSelfContained :: Bool -- ^ Make HTML accessible offline , optSmart :: Bool -- ^ Use smart typography , optOldDashes :: Bool -- ^ Parse dashes like pandoc <=1.8.2.1@@ -349,6 +349,7 @@ "pygments" -> return pygments "tango" -> return tango "espresso" -> return espresso+ "zenburn" -> return zenburn "kate" -> return kate "monochrome" -> return monochrome "haddock" -> return haddock@@ -453,7 +454,7 @@ , Option "i" ["incremental"] (NoArg (\opt -> return opt { optIncremental = True }))- "" -- "Make list items display incrementally in Slidy/S5"+ "" -- "Make list items display incrementally in Slidy/Slideous/S5" , Option "" ["slide-level"] (ReqArg@@ -886,6 +887,7 @@ let slideVariant = case writerName' of "s5" -> S5Slides "slidy" -> SlidySlides+ "slideous" -> SlideousSlides "dzslides" -> DZSlides _ -> NoSlides @@ -1051,7 +1053,7 @@ where result = w writerOptions doc2 ++ ['\n' | not standalone'] htmlFormat = writerName' `elem` ["html","html+lhs","html5","html5+lhs",- "s5","slidy","dzslides"]+ "s5","slidy","slideous","dzslides"] selfcontain = if selfContained && htmlFormat then makeSelfContained datadir else return
src/test-pandoc.hs view
@@ -9,6 +9,7 @@ import qualified Tests.Readers.Markdown import qualified Tests.Readers.RST import qualified Tests.Writers.ConTeXt+import qualified Tests.Writers.LaTeX import qualified Tests.Writers.HTML import qualified Tests.Writers.Native import qualified Tests.Writers.Markdown@@ -20,6 +21,7 @@ , testGroup "Writers" [ testGroup "Native" Tests.Writers.Native.tests , testGroup "ConTeXt" Tests.Writers.ConTeXt.tests+ , testGroup "LaTeX" Tests.Writers.LaTeX.tests , testGroup "HTML" Tests.Writers.HTML.tests , testGroup "Markdown" Tests.Writers.Markdown.tests ]
templates/default.latex view
@@ -80,9 +80,6 @@ \usepackage{ctable} \usepackage{float} % provides the H option for float placement $endif$-$if(url)$-\usepackage{url}-$endif$ $if(graphics)$ \usepackage{graphicx} % We will generate all images so they have a width \maxwidth. This means@@ -98,23 +95,20 @@ \ifxetex \usepackage[setpagesize=false, % page size defined by xetex unicode=false, % unicode breaks when used with xetex- xetex,- bookmarks=true,- pdfauthor={$author-meta$},- pdftitle={$title-meta$},- colorlinks=true,- urlcolor=blue,- linkcolor=blue]{hyperref}+ xetex]{hyperref} \else- \usepackage[unicode=true,- bookmarks=true,- pdfauthor={$author-meta$},- pdftitle={$title-meta$},- colorlinks=true,- urlcolor=blue,- linkcolor=blue]{hyperref}+ \usepackage[unicode=true]{hyperref} \fi-\hypersetup{breaklinks=true, pdfborder={0 0 0}}+\hypersetup{breaklinks=true,+ bookmarks=true,+ pdfauthor={$author-meta$},+ pdftitle={$title-meta$},+ colorlinks=true,+ urlcolor=blue,+ linkcolor=black,+ pdfborder={0 0 0}}+% Uncomment next line if you want links as footnotes instead of hotlinks:+% \renewcommand{\href}[2]{#2\footnote{\url{#1}}} $if(strikeout)$ \usepackage[normalem]{ulem} % avoid problems with \sout in headers with hyperref:
+ templates/default.slideous view
@@ -0,0 +1,75 @@+<?xml version="1.0" encoding="utf-8"?>+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$>+<head>+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />+ <meta http-equiv="Content-Style-Type" content="text/css" />+ <meta name="generator" content="pandoc" />+$for(author-meta)$+ <meta name="author" content="$author-meta$" />+$endfor$+$if(date-meta)$+ <meta name="date" content="$date-meta$" />+$endif$+ <title>$if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$</title>+$if(highlighting-css)$+ <style type="text/css">+$highlighting-css$+ </style>+$endif$+ <link rel="stylesheet" type="text/css" media="screen, projection, print"+ href="$slideous-url$/slideous.css" />+$for(css)$+ <link rel="stylesheet" type="text/css" media="screen, projection, print"+ href="$css$" />+$endfor$+$if(math)$+ $math$+$endif$+$for(header-includes)$+ $header-includes$+$endfor$+ <script src="$slideous-url$/slideous.js"+ charset="utf-8" type="text/javascript"></script>+$if(duration)$+ <meta name="duration" content="$duration$" />+$endif$+</head>+<body>+$for(include-before)$+$include-before$+$endfor$+<div id="statusbar">+<span style="float:right;">+<span style="margin-right:4em;font-weight:bold;"><span id="slideidx"></span> of {$$slidecount}</span>+<button id="homebutton" title="first slide">1</button>+<button id="prevslidebutton" title="previous slide">«</button>+<button id="previtembutton" title="previous item">‹</button>+<button id="nextitembutton" title="next item">›</button>+<button id="nextslidebutton" title="next slide">»</button>+<button id="endbutton" title="last slide">{$$slidecount}</button>+<button id="incfontbutton" title="content">A+</button>+<button id="decfontbutton" title="first slide">A-</button>+<select id="tocbox" size="1"><option></option></select>+</span>+<span id="eos">½</span>+<span title="{$$location}, {$$date}">{$$title}, {$$author}</span>+</div>+$if(title)$+<div class="slide titlepage">+ <h1 class="title">$title$</h1>+ <p class="author">+$for(author)$$author$$sep$<br/>$endfor$+ </p>+$if(date)$+ <p class="date">$date$</p>+$endif$+</div>+$endif$+$body$+$for(include-after)$+$include-after$+$endfor$+</body>+</html>
templates/default.slidy view
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">+<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" />
tests/lhs-test.latex view
@@ -38,23 +38,20 @@ \ifxetex \usepackage[setpagesize=false, % page size defined by xetex unicode=false, % unicode breaks when used with xetex- xetex,- bookmarks=true,- pdfauthor={},- pdftitle={},- colorlinks=true,- urlcolor=blue,- linkcolor=blue]{hyperref}+ xetex]{hyperref} \else- \usepackage[unicode=true,- bookmarks=true,- pdfauthor={},- pdftitle={},- colorlinks=true,- urlcolor=blue,- linkcolor=blue]{hyperref}+ \usepackage[unicode=true]{hyperref} \fi-\hypersetup{breaklinks=true, pdfborder={0 0 0}}+\hypersetup{breaklinks=true,+ bookmarks=true,+ pdfauthor={},+ pdftitle={},+ colorlinks=true,+ urlcolor=blue,+ linkcolor=black,+ pdfborder={0 0 0}}+% Uncomment next line if you want links as footnotes instead of hotlinks:+% \renewcommand{\href}[2]{#2\footnote{\url{#1}}} \setlength{\parindent}{0pt} \setlength{\parskip}{6pt plus 2pt minus 1pt} \setlength{\emergencystretch}{3em} % prevent overfull lines@@ -75,6 +72,7 @@ \CommentTok{-- arr (\textbackslash{}op (x,y) -> x `op` y) } \end{Highlighting} \end{Shaded}+ \texttt{(***)} combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).
tests/lhs-test.latex+lhs view
@@ -20,23 +20,20 @@ \ifxetex \usepackage[setpagesize=false, % page size defined by xetex unicode=false, % unicode breaks when used with xetex- xetex,- bookmarks=true,- pdfauthor={},- pdftitle={},- colorlinks=true,- urlcolor=blue,- linkcolor=blue]{hyperref}+ xetex]{hyperref} \else- \usepackage[unicode=true,- bookmarks=true,- pdfauthor={},- pdftitle={},- colorlinks=true,- urlcolor=blue,- linkcolor=blue]{hyperref}+ \usepackage[unicode=true]{hyperref} \fi-\hypersetup{breaklinks=true, pdfborder={0 0 0}}+\hypersetup{breaklinks=true,+ bookmarks=true,+ pdfauthor={},+ pdftitle={},+ colorlinks=true,+ urlcolor=blue,+ linkcolor=black,+ pdfborder={0 0 0}}+% Uncomment next line if you want links as footnotes instead of hotlinks:+% \renewcommand{\href}[2]{#2\footnote{\url{#1}}} \setlength{\parindent}{0pt} \setlength{\parskip}{6pt plus 2pt minus 1pt} \setlength{\emergencystretch}{3em} % prevent overfull lines@@ -55,6 +52,7 @@ unsplit = arr . uncurry -- arr (\op (x,y) -> x `op` y) \end{code}+ \texttt{(***)} combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).
tests/markdown-citations.chicago-author-date.txt view
@@ -38,7 +38,7 @@ Doe, John, and Jenny Roe. 2007. “Why Water Is Wet.” In *Third Book*, ed. Sam Smith. Oxford: Oxford University Press. -[^1]: A citation without locators (Doe and Roe 2007).+[^1]: A citation without locators (Doe and Roe 2007), and inline: Doe and Roe (2007, 12). [^2]: Some citations (see Doe 2005, chap. 3; Doe and Roe 2007; Doe 2006).
tests/markdown-citations.ieee.txt view
@@ -38,7 +38,7 @@ [3] J. Doe and J. Roe, “Why Water Is Wet,” in *Third Book*, S. Smith, Ed. Oxford: Oxford University Press, 2007. -[^1]: A citation without locators [3].+[^1]: A citation without locators [3], and inline: Reference 3. [^2]: Some citations [1–3].
tests/markdown-citations.mhra.txt view
@@ -46,7 +46,7 @@ [^4]: *First Book*; ‘Article’, *Journal of Generic Studies*, 6 (2006), 33–34 (p. 30); see also John Doe and Jenny Roe, ‘Why Water Is Wet’, in *Third Book*, ed. by Sam Smith (Oxford: Oxford University Press, 2007). -[^5]: A citation without locators Doe and Roe.+[^5]: A citation without locators Doe and Roe, and inline: Doe and Roe, p. 12. [^6]: See Doe, *First Book*, chap. 3; also Doe and Roe, pp. 34–35.
tests/markdown-citations.txt view
@@ -32,7 +32,7 @@ References ========== -[^1]: A citation without locators [@пункт3].+[^1]: A citation without locators [@пункт3], and inline: @пункт3 [p. 12]. [^2]: Some citations [see @item1 chap. 3; @пункт3; @item2].
tests/tables.latex view
@@ -173,4 +173,3 @@ } \LL }-
tests/textile-reader.native view
@@ -27,6 +27,10 @@ ,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\n These should not be escaped: \\$ \\\\ \\> \\[ \\{" ,CodeBlock ("",[],[]) "Code block with .bc\n continued\n @</\\\n" ,Para [Str "Inline",Space,Str "code",Str ":",Space,Code ("",[],[]) "<tt>",Str ",",Space,Code ("",[],[]) "@",Str "."]+,Header 1 [Str "Notextile"]+,Para [Str "A",Space,Str "block",Space,Str "of",Space,Str "text",Space,Str "can",Space,Str "be",Space,Str "protected",Space,Str "with",Space,Str "notextile",Space,Str ":"]+,Para [Str "\nNo *bold* and\n* no bullet\n"]+,Para [Str "and",Space,Str "inlines",Space,Str "can",Space,Str "be",Space,Str "protected",Space,Str "with",Space,Str "double *equals (=)* markup",Str "."] ,Header 1 [Str "Lists"] ,Header 2 [Str "Unordered"] ,Para [Str "Asterisks",Space,Str "tight",Str ":"]
tests/textile-reader.textile view
@@ -70,6 +70,17 @@ Inline code: @<tt>@, <tt>@</tt>. +h1. Notextile++A block of text can be protected with notextile :++<notextile>+No *bold* and+* no bullet+</notextile>++and inlines can be protected with ==double *equals (=)* markup==.+ h1. Lists h2. Unordered
tests/writer.latex view
@@ -23,7 +23,6 @@ {\setlength{\labelwidth}{4em}} }\makeatother \usepackage{enumerate}-\usepackage{url} \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@@ -37,23 +36,20 @@ \ifxetex \usepackage[setpagesize=false, % page size defined by xetex unicode=false, % unicode breaks when used with xetex- xetex,- bookmarks=true,- pdfauthor={John MacFarlane; Anonymous},- pdftitle={Pandoc Test Suite},- colorlinks=true,- urlcolor=blue,- linkcolor=blue]{hyperref}+ xetex]{hyperref} \else- \usepackage[unicode=true,- bookmarks=true,- pdfauthor={John MacFarlane; Anonymous},- pdftitle={Pandoc Test Suite},- colorlinks=true,- urlcolor=blue,- linkcolor=blue]{hyperref}+ \usepackage[unicode=true]{hyperref} \fi-\hypersetup{breaklinks=true, pdfborder={0 0 0}}+\hypersetup{breaklinks=true,+ bookmarks=true,+ pdfauthor={John MacFarlane; Anonymous},+ pdftitle={Pandoc Test Suite},+ colorlinks=true,+ urlcolor=blue,+ linkcolor=black,+ pdfborder={0 0 0}}+% Uncomment next line if you want links as footnotes instead of hotlinks:+% \renewcommand{\href}[2]{#2\footnote{\url{#1}}} \usepackage[normalem]{ulem} % avoid problems with \sout in headers with hyperref: \pdfstringdefDisableCommands{\renewcommand{\sout}{}}@@ -314,9 +310,11 @@ \begin{itemize} \item Tab+ \begin{itemize} \item Tab+ \begin{itemize} \item Tab@@ -331,6 +329,7 @@ First \item Second:+ \begin{itemize} \item Fee@@ -396,6 +395,7 @@ sublist with roman numerals, starting with 4 \item more items+ \begin{enumerate}[(A)] \item a subsublist@@ -410,13 +410,16 @@ \begin{enumerate}[A.] \item Upper Alpha+ \begin{enumerate}[I.] \item Upper Roman.+ \begin{enumerate}[(1)] \setcounter{enumiii}{5} \item Decimal start with 6+ \begin{enumerate}[a)] \setcounter{enumiv}{2} \item@@ -433,6 +436,7 @@ Autonumber. \item More.+ \begin{enumerate} \item Nested.@@ -476,10 +480,8 @@ \begin{description} \item[apple] red fruit- \item[orange] orange fruit- \item[banana] yellow fruit \end{description}@@ -491,7 +493,6 @@ red fruit contains seeds, crisp, pleasant to taste- \item[\emph{orange}] orange fruit @@ -524,7 +525,6 @@ red fruit computer- \item[orange] orange fruit @@ -538,7 +538,6 @@ red fruit computer- \item[orange] orange fruit @@ -555,17 +554,23 @@ Simple block on one line: foo+ And nested without indentation: foo+ bar+ Interpreted markdown in a table: This is \emph{emphasized}+ And this is \textbf{strong}+ Here's a simple block: foo+ This should be a code block, though: \begin{verbatim}@@ -583,6 +588,7 @@ Now, nested: foo+ This should just be an HTML comment: Multiline:
tests/writer.markdown view
@@ -272,41 +272,41 @@ Tight using spaces: apple- ~ red fruit+: red fruit orange- ~ orange fruit+: orange fruit banana- ~ yellow fruit+: yellow fruit Tight using tabs: apple- ~ red fruit+: red fruit orange- ~ orange fruit+: orange fruit banana- ~ yellow fruit+: yellow fruit Loose: apple- ~ red fruit+: red fruit orange- ~ orange fruit+: orange fruit banana- ~ yellow fruit+: yellow fruit Multiple blocks with italics: *apple*- ~ red fruit+: red fruit contains seeds, crisp, pleasant to taste *orange*- ~ orange fruit+: orange fruit { orange code block } @@ -315,33 +315,33 @@ Multiple definitions, tight: apple- ~ red fruit- ~ computer+: red fruit+: computer orange- ~ orange fruit- ~ bank+: orange fruit+: bank Multiple definitions, loose: apple- ~ red fruit+: red fruit - ~ computer+: computer orange- ~ orange fruit+: orange fruit - ~ bank+: bank Blank line after term, indented marker, alternate markers: apple- ~ red fruit+: red fruit - ~ computer+: computer orange- ~ orange fruit+: orange fruit 1. sublist 2. sublist