packages feed

pandoc 1.8.1.1 → 1.8.1.2

raw patch · 41 files changed

+834/−508 lines, 41 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

README view
@@ -379,6 +379,10 @@     user data directory (see `--data-dir`, below).  If it is not     found there, sensible defaults will be used. +`--epub-cover-image=`*FILE*+:   Use the specified image as the EPUB cover.  It is recommended+    that the image be less than 1000px in width and height.+ `--epub-metadata=`*FILE* :   Look in the specified XML file for metadata for the EPUB.     The file should contain a series of Dublin Core elements,@@ -431,6 +435,12 @@     user data directory (see `--data-dir`), or, if that is     not present, the Chicago author-date style. +`--natbib`+:   Use natbib for citations in LaTeX output.++`--biblatex`+:   Use biblatex for citations in LaTeX output.+ `--data-dir=`*DIRECTORY* :   Specify the user data directory to search for pandoc data files.     If this option is not specified, the default user data directory@@ -1981,7 +1991,7 @@ [groff man]: http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man7/groff_man.7.html [Haskell]:  http://www.haskell.org/ [GNU Texinfo]: http://www.gnu.org/software/texinfo/-[Emacs Org-Mode]: http://org-mode.org+[Emacs Org-Mode]: http://orgmode.org [EPUB]: http://www.idpf.org/ [GPL]: http://www.gnu.org/copyleft/gpl.html "GNU General Public License" 
changelog view
@@ -1,3 +1,104 @@+pandoc (1.8.1.2)++  * Added `--epub-cover-image` option.++  * Documented `--biblatex` and `--natbib` options.++  * Allow `--section-divs` with slidy output.  Resolves Issue #296.++  * Disallow notes within notes in reST and markdown.+    These previously caused infinite looping and stack overflows.+    For example:++        [^1]++        [^1]: See [^1]++    Note references are allowed in reST notes, so this isn't a full+    implementation of reST. That can come later. For now we need to+    prevent the stack overflows.  Partially resolves Issue #297.++  * EPUB writer: Allow non-plain math methods.++  * Forbid ()s in citation item keys.  Resolves Issue #304: problems with+    `(@item1; @item2)` because the final paren was being parsed as part of+    the item key.++  * Changed URI parser so it doesn't include trailing punctuation.+    So, in RST, `http://google.com.` should be parsed as a link followed by a+    period. The parser is smart enough to recognize balanced parentheses, as+    often occur in wikipedia links: `http://foo.bar/baz_(bam)`.++  * Markdown+lhs reader: Require space after inverse bird tracks, so that+    HTML tags can be used freely at the left margin of a markdown+lhs document.+    Thanks to Conal Elliot for the suggestion.++  * Markdown reader: Fixed bug in footnote order (reported by CircleCode).++  * RST reader:+      + Fixed bug in in field lists with multi-line items at the+        end of the list.+      + Added parentheses to RST `specialChars`, so+        `(http://google.com)` will be parsed as a link in parens.+        Resolves Issue #291.+      + Allow `|` followed by newline in RST line block.++  * LaTeX reader:+      + Support `\dots`.+      + Gobble option & space after linebreak `\\[10pt]`.++  * Textile reader:+      + Make it possible to have colons after links.  (qerub)+      + Make it possible to have colons after links.  (Christoffer Sawicki)++  * HTML reader:+      + Skip spaces after `<b>`, `<emph>`, etc.+      + Handle tbody, thead in simple tables.  Closes #274.+      + Implicit `Para`s instead of `Plains` in some contexts.++  * OpenDocument writer:  Use special `First paragraph` style for+    first paragraph after most non-paragraph blocks. This allows users to+    specify e.g. that only paragraphs after the first paragraph of a block are+    to be indented. Thanks to Andrea Rossato for the patch. Closes #20.++  * LaTeX writer:  use `deVerb` on table and picture captions.+    Otherwise LaTeX complains about `\verb` inside command argument.+    Thanks to bbanier for reporting the bug.++  * Markdown writer: Insert HTML comment btw list and indented code block.+    This prevents the code block from being interpreted as part of the list.++  * EPUB writer: Add a meta element specify the cover.+    Some EPUB e-readers, such as the Nook, require a meta element inside the+    OPF metadata block to ensure the cover image is properly displayed.+    (Kelsey Hightower)++  * HTML writer: Use embed tag for images with non-image extensions.+    (e.g.  PDFs).  Closes #264.++  * LaTeX writer: Improved tables.++      + More space between lines, top-align cells.+      + Use ctable package, which allows footnotes and+        provides additional options.+      + Made cell alignments work in multiline tables.+      + Closes #271, #272.++  * Un-URI-escape image filenames in LaTeX, ConTeXt, RTF, Texinfo.+    Also do this when copying image files into EPUBs and ODTs.+    Closes #263.++  * Changed to github issue tracker.++  * Added failing emph/strong markdown test case due to Perry Wagle.++  * Slidy improvements:+      + Updated to use Slidy2.+      + Fixed bug, unclosed div tag.+      + Added `duration` variable in template.+        Setting this activates the timer.+      + Use 'titlepage' instead of 'cover' for title div.+ pandoc (1.8.1.1)    * `markdown2pdf`:  Removed some debugging lines accidentally included
man/man1/pandoc.1 view
@@ -475,6 +475,13 @@ .RS .RE .TP+.B \f[C]--epub-cover-image=\f[]\f[I]FILE\f[]+Use the specified image as the EPUB cover.+It is recommended that the image be less than 1000px in width and+height.+.RS+.RE+.TP .B \f[C]--epub-metadata=\f[]\f[I]FILE\f[] Look in the specified XML file for metadata for the EPUB. The file should contain a series of Dublin Core elements, as documented@@ -549,6 +556,16 @@ style: either \f[C]default.csl\f[] in the user data directory (see \f[C]--data-dir\f[]), or, if that is not present, the Chicago author-date style.+.RE+.TP+.B \f[C]--natbib\f[]+Use natbib for citations in LaTeX output.+.RS+.RE+.TP+.B \f[C]--biblatex\f[]+Use biblatex for citations in LaTeX output.+.RS .RE .TP .B \f[C]--data-dir=\f[]\f[I]DIRECTORY\f[]
pandoc.cabal view
@@ -1,5 +1,5 @@ Name:            pandoc-Version:         1.8.1.1+Version:         1.8.1.2 Cabal-Version:   >= 1.6 Build-Type:      Custom License:         GPL@@ -7,7 +7,7 @@ Copyright:       (c) 2006-2011 John MacFarlane Author:          John MacFarlane <jgm@berkeley.edu> Maintainer:      John MacFarlane <jgm@berkeley.edu>-Bug-Reports:     http://code.google.com/p/pandoc/issues/list+Bug-Reports:     https://github.com/jgm/pandoc/issues Stability:       alpha Homepage:        http://johnmacfarlane.net/pandoc Category:        Text
reference.odt view

binary file changed (9572 → 9720 bytes)

slidy/slidy.min.css view
@@ -1,1 +1,1 @@-body{margin:0;padding:0;width:100%;height:100%;color:black;background-color:white;font-family:"Gill Sans MT","Gill Sans",GillSans,sans-serif;font-size:14pt;}.hidden{display:none;visibility:hidden;}div.toolbar{position:fixed;z-index:200;top:auto;bottom:0;left:0;right:0;height:1.2em;text-align:right;padding-left:1em;padding-right:1em;font-size:60%;color:red;background:#f0f0f0;}div.background{display:none;}div.handout{margin-left:20px;margin-right:20px;}div.slide.titlepage{text-align:center;}div.slide.titlepage.h1{padding-top:40%;}div.slide{z-index:20;margin:0;padding-top:0;padding-bottom:0;padding-left:20px;padding-right:20px;border-width:0;clear:both;top:0;bottom:0;left:0;right:0;line-height:120%;background-color:transparent;}div.slide+div[class].slide{page-break-before:always;}div.slide h1{padding-left:0;padding-right:20pt;padding-top:4pt;padding-bottom:4pt;margin-top:0;margin-left:0;margin-right:60pt;margin-bottom:.5em;display:block;font-size:160%;line-height:1.2em;background:transparent;}div.toc{position:absolute;top:auto;bottom:4em;left:4em;right:auto;width:60%;max-width:30em;height:30em;border:solid thin black;padding:1em;background:#f0f0f0;color:black;z-index:300;overflow:auto;display:block;visibility:visible;}div.toc-heading{width:100%;border-bottom:solid 1px #b4b4b4;margin-bottom:1em;text-align:center;}pre{font-size:80%;font-weight:bold;line-height:120%;padding-top:.2em;padding-bottom:.2em;padding-left:1em;padding-right:1em;border-style:solid;border-left-width:1em;border-top-width:thin;border-right-width:thin;border-bottom-width:thin;border-color:#95ABD0;color:#00428C;background-color:#E4E5E7;}li pre{margin-left:0;}@media print{div.slide{display:block;visibility:visible;position:relative;border-top-style:solid;border-top-width:thin;border-top-color:black;}div.slide pre{font-size:60%;padding-left:.5em;}div.handout{display:block;visibility:visible;}}blockquote{font-style:italic;}img{background-color:transparent;}p.copyright{font-size:smaller;}.center{text-align:center;}.footnote{font-size:smaller;margin-left:2em;}a img{border-width:0;border-style:none;}a:visited{color:navy;}a:link{color:navy;}a:hover{color:red;text-decoration:underline;}a:active{color:red;text-decoration:underline;}a{text-decoration:none;}.navbar a:link{color:white;}.navbar a:visited{color:yellow;}.navbar a:active{color:red;}.navbar a:hover{color:red;}ul{list-style-type:square;}ul ul{list-style-type:disc;}ul ul ul{list-style-type:circle;}ul ul ul ul{list-style-type:disc;}li{margin-left:.5em;margin-top:.5em;}li li{font-size:85%;font-style:italic;}li li li{font-size:85%;font-style:normal;}div dt{margin-left:0;margin-top:1em;margin-bottom:.5em;font-weight:bold;}div dd{margin-left:2em;margin-bottom:.5em;}p,pre,ul,ol,blockquote,h2,h3,h4,h5,h6,dl,table{margin-left:1em;margin-right:1em;}p.subhead{font-weight:bold;margin-top:2em;}.smaller{font-size:smaller;}.bigger{font-size:130%;}td,th{padding:.2em;}ul{margin:.5em 1.5em .5em 1.5em;padding:0;}ol{margin:.5em 1.5em .5em 1.5em;padding:0;}ul{list-style-type:square;}ul ul{list-style-type:disc;}ul ul ul{list-style-type:circle;}ul ul ul ul{list-style-type:disc;}ul li{list-style:square;margin:.1em 0 .6em 0;padding:0;line-height:140%;}ol li{margin:.1em 0 .6em 1.5em;padding:0;line-height:140%;list-style-type:decimal;}li ul li{font-size:85%;font-style:italic;list-style-type:disc;background:transparent;padding:0;}li li ul li{font-size:85%;font-style:normal;list-style-type:circle;background:transparent;padding:0;}li li li ul li{list-style-type:disc;background:transparent;padding:0;}li ol li{list-style-type:decimal;}li li ol li{list-style-type:decimal;}ol.outline li:hover{cursor:pointer;}ol.outline li.nofold:hover{cursor:default;}ul.outline li:hover{cursor:pointer;}ul.outline li.nofold:hover{cursor:default;}ol.outline{list-style:decimal;}ol.outline ol{list-style-type:lower-alpha;}ol.outline li.nofold{padding:0 0 0 20px;background:transparent url(nofold-dim.gif) no-repeat 0 .5em;}ol.outline li.unfolded{padding:0 0 0 20px;background:transparent url(fold-dim.gif) no-repeat 0 .5em;}ol.outline li.folded{padding:0 0 0 20px;background:transparent url(unfold-dim.gif) no-repeat 0 .5em;}ol.outline li.unfolded:hover{padding:0 0 0 20px;background:transparent url(fold.gif) no-repeat 0 .5em;}ol.outline li.folded:hover{padding:0 0 0 20px;background:transparent url(unfold.gif) no-repeat 0 .5em;}ul.outline li.nofold{padding:0 0 0 20px;background:transparent url(nofold-dim.gif) no-repeat 0 .5em;}ul.outline li.unfolded{padding:0 0 0 20px;background:transparent url(fold-dim.gif) no-repeat 0 .5em;}ul.outline li.folded{padding:0 0 0 20px;background:transparent url(unfold-dim.gif) no-repeat 0 .5em;}ul.outline li.unfolded:hover{padding:0 0 0 20px;background:transparent url(fold.gif) no-repeat 0 .5em;}ul.outline li.folded:hover{padding:0 0 0 20px;background:transparent url(unfold.gif) no-repeat 0 .5em;}a.titleslide{font-weight:bold;font-style:italic;}+body{margin:0;padding:0;width:100%;height:100%;color:black;background-color:white;font-family:"Gill Sans MT","Gill Sans",GillSans,sans-serif;font-size:14pt}div.toolbar{position:fixed;z-index:200;top:auto;bottom:0;left:0;right:0;height:1.2em;text-align:right;padding-left:1em;padding-right:1em;font-size:60%;color:red;background-color:#f0f0f0;border-top:solid 1px #b4b4b4}div.toolbar span.copyright{color:black;margin-left:.5em}div.initial_prompt{position:absolute;z-index:1000;bottom:1.2em;width:100%;background-color:#c8c8c8;opacity:.35;background-color:rgb(200,200,200,0.35);cursor:pointer}div.initial_prompt p.help{text-align:center}div.initial_prompt p.close{text-align:right;font-style:italic}div.slidy_toc{position:absolute;z-index:300;width:60%;max-width:30em;height:30em;overflow:auto;top:auto;right:auto;left:4em;bottom:4em;padding:1em;background:#f0f0f0;border-style:solid;border-width:2px;font-size:60%}div.slidy_toc .toc_heading{text-align:center;width:100%;margin:0;margin-bottom:1em;border-bottom-style:solid;border-bottom-color:#b4b4b4;border-bottom-width:1px}div.slide{z-index:20;margin:0;padding-top:0;padding-bottom:0;padding-left:20px;padding-right:20px;border-width:0;clear:both;top:0;bottom:0;left:0;right:0;line-height:120%;background-color:transparent}div.background{display:none}div.handout{margin-left:20px;margin-right:20px}div.slide.titlepage{text-align:center}div.slide.titlepage.h1{padding-top:10%}div.slide h1{padding-left:0;padding-right:20pt;padding-top:4pt;padding-bottom:4pt;margin-top:0;margin-left:0;margin-right:60pt;margin-bottom:.5em;display:block;font-size:160%;line-height:1.2em;background:transparent}div.toc{position:absolute;top:auto;bottom:4em;left:4em;right:auto;width:60%;max-width:30em;height:30em;border:solid thin black;padding:1em;background:#f0f0f0;color:black;z-index:300;overflow:auto;display:block;visibility:visible}div.toc-heading{width:100%;border-bottom:solid 1px #b4b4b4;margin-bottom:1em;text-align:center}pre{font-size:80%;font-weight:bold;line-height:120%;padding-top:.2em;padding-bottom:.2em;padding-left:1em;padding-right:1em;border-style:solid;border-left-width:1em;border-top-width:thin;border-right-width:thin;border-bottom-width:thin;border-color:#95abd0;color:#00428c;background-color:#e4e5e7}li pre{margin-left:0}blockquote{font-style:italic}img{background-color:transparent}p.copyright{font-size:smaller}.center{text-align:center}.footnote{font-size:smaller;margin-left:2em}a img{border-width:0;border-style:none}a:visited{color:navy}a:link{color:navy}a:hover{color:red;text-decoration:underline}a:active{color:red;text-decoration:underline}a{text-decoration:none}.navbar a:link{color:white}.navbar a:visited{color:yellow}.navbar a:active{color:red}.navbar a:hover{color:red}ul{list-style-type:square}ul ul{list-style-type:disc}ul ul ul{list-style-type:circle}ul ul ul ul{list-style-type:disc}li{margin-left:.5em;margin-top:.5em}li li{font-size:85%;font-style:italic}li li li{font-size:85%;font-style:normal}div dt{margin-left:0;margin-top:1em;margin-bottom:.5em;font-weight:bold}div dd{margin-left:2em;margin-bottom:.5em}p,pre,ul,ol,blockquote,h2,h3,h4,h5,h6,dl,table{margin-left:1em;margin-right:1em}p.subhead{font-weight:bold;margin-top:2em}.smaller{font-size:smaller}.bigger{font-size:130%}td,th{padding:.2em}ul{margin:.5em 1.5em .5em 1.5em;padding:0}ol{margin:.5em 1.5em .5em 1.5em;padding:0}ul{list-style-type:square}ul ul{list-style-type:disc}ul ul ul{list-style-type:circle}ul ul ul ul{list-style-type:disc}ul li{list-style:square;margin:.1em 0 .6em 0;padding:0;line-height:140%}ol li{margin:.1em 0 .6em 1.5em;padding:0;line-height:140%;list-style-type:decimal}li ul li{font-size:85%;font-style:italic;list-style-type:disc;background:transparent;padding:0}li li ul li{font-size:85%;font-style:normal;list-style-type:circle;background:transparent;padding:0}li li li ul li{list-style-type:disc;background:transparent;padding:0}li ol li{list-style-type:decimal}li li ol li{list-style-type:decimal}ol.outline li:hover{cursor:pointer}ol.outline li.nofold:hover{cursor:default}ul.outline li:hover{cursor:pointer}ul.outline li.nofold:hover{cursor:default}ol.outline{list-style:decimal}ol.outline ol{list-style-type:lower-alpha}ol.outline li.nofold{padding:0 0 0 20px;background:transparent url(../graphics/nofold-dim.gif) no-repeat 0 .5em}ol.outline li.unfolded{padding:0 0 0 20px;background:transparent url(../graphics/fold-dim.gif) no-repeat 0 .5em}ol.outline li.folded{padding:0 0 0 20px;background:transparent url(../graphics/unfold-dim.gif) no-repeat 0 .5em}ol.outline li.unfolded:hover{padding:0 0 0 20px;background:transparent url(../graphics/fold.gif) no-repeat 0 .5em}ol.outline li.folded:hover{padding:0 0 0 20px;background:transparent url(../graphics/unfold.gif) no-repeat 0 .5em}ul.outline li.nofold{padding:0 0 0 20px;background:transparent url(../graphics/nofold-dim.gif) no-repeat 0 .5em}ul.outline li.unfolded{padding:0 0 0 20px;background:transparent url(../graphics/fold-dim.gif) no-repeat 0 .5em}ul.outline li.folded{padding:0 0 0 20px;background:transparent url(../graphics/unfold-dim.gif) no-repeat 0 .5em}ul.outline li.unfolded:hover{padding:0 0 0 20px;background:transparent url(../graphics/fold.gif) no-repeat 0 .5em}ul.outline li.folded:hover{padding:0 0 0 20px;background:transparent url(../graphics/unfold.gif) no-repeat 0 .5em}a.titleslide{font-weight:bold;font-style:italic}img.hidden{display:none;visibility:hidden}div.initial_prompt{display:none;visibility:hidden}div.slide{visibility:visible;position:inherit}div.handout{border-top-style:solid;border-top-width:thin;border-top-color:black}@media screen{.hidden{display:none;visibility:visible}div.slide.hidden{display:block;visibility:visible}div.handout.hidden{display:block;visibility:visible}div.background{display:none;visibility:hidden}body.single_slide div.initial_prompt{display:block;visibility:visible}body.single_slide div.background{display:block;visibility:visible}body.single_slide div.background.hidden{display:none;visibility:hidden}body.single_slide .invisible{visibility:hidden}body.single_slide .hidden{display:none;visibility:hidden}body.single_slide div.slide{position:absolute}body.single_slide div.handout{display:none;visibility:hidden}}@media print{.hidden{display:block;visibility:visible}div.slide pre{font-size:60%;padding-left:.5em}div.toolbar{display:none;visibility:hidden}div.slidy_toc{display:none;visibility:hidden}div.background{display:none;visibility:hidden}div.slide{page-break-before:always}div.slide.first-slide{page-break-before:avoid}}
slidy/slidy.min.js view
@@ -1,1 +1,1 @@-var ns_pos=(typeof window.pageYOffset!="undefined");var khtml=((navigator.userAgent).indexOf("KHTML")>=0?true:false);var opera=((navigator.userAgent).indexOf("Opera")>=0?true:false);var ie=(typeof document.all!="undefined"&&!opera);var ie7=(!ns_pos&&navigator.userAgent.indexOf("MSIE 7")!=-1);var ie8=(!ns_pos&&navigator.userAgent.indexOf("MSIE 8")!=-1);var slidy_started=false;if(ie&&!ie8){document.write("<iframe id='historyFrame' src='javascript:\"<html></html>\"' height='1' width='1' style='position:absolute;left:-800px'></iframe>")}if(typeof beforePrint!="undefined"){window.onbeforeprint=beforePrint;window.onafterprint=afterPrint}if(ie){setTimeout(ieSlidyInit,100)}else{if(document.addEventListener){document.addEventListener("DOMContentLoaded",startup,false)}}function ieSlidyInit(){if(document.readyState=="complete"||document.readyState=="loaded"){startup()}else{setTimeout(ieSlidyInit,100)}}setTimeout(hideSlides,50);function hideSlides(){if(document.body){document.body.style.visibility="hidden"}else{setTimeout(hideSlides,50)}}var slidenum=0;var slides;var slideNumElement;var notes;var backgrounds;var toolbar;var title;var lastShown=null;var eos=null;var toc=null;var outline=null;var selectedTextLen;var viewAll=0;var wantToolbar=1;var mouseClickEnabled=true;var scrollhack=0;var key_wanted=false;var helpAnchor;var helpPage="http://www.w3.org/Talks/Tools/Slidy/help.html";var helpText="Navigate with mouse click, space bar, Cursor Left/Right, or Pg Up and Pg Dn. Use S and B to change font size.";var sizeIndex=0;var sizeAdjustment=0;var sizes=new Array("10pt","12pt","14pt","16pt","18pt","20pt","22pt","24pt","26pt","28pt","30pt","32pt");var okayForIncremental=incrementalElementList();var lastWidth=0;var lastHeight=0;var objects;var lang="en";var strings_es={slide:"pág.","help?":"Ayuda","contents?":"Índice","table of contents":"tabla de contenidos","Table of Contents":"Tabla de Contenidos","restart presentation":"Reiniciar presentación","restart?":"Inicio"};strings_es[helpText]="Utilice el ratón, barra espaciadora, teclas Izda/Dcha, o Re pág y Av pág. Use S y B para cambiar el tamaño de fuente.";var strings_ca={slide:"pàg..","help?":"Ajuda","contents?":"Índex","table of contents":"taula de continguts","Table of Contents":"Taula de Continguts","restart presentation":"Reiniciar presentació","restart?":"Inici"};strings_ca[helpText]="Utilitzi el ratolí, barra espaiadora, tecles Esq./Dta. o Re pàg y Av pàg. Usi S i B per canviar grandària de font.";var strings_nl={slide:"pagina","help?":"Help?","contents?":"Inhoud?","table of contents":"inhoudsopgave","Table of Contents":"Inhoudsopgave","restart presentation":"herstart presentatie","restart?":"Herstart?"};strings_nl[helpText]="Navigeer d.m.v. het muis, spatiebar, Links/Rechts toetsen, of PgUp en PgDn. Gebruik S en B om de karaktergrootte te veranderen.";var strings_de={slide:"Seite","help?":"Hilfe","contents?":"Übersicht","table of contents":"Inhaltsverzeichnis","Table of Contents":"Inhaltsverzeichnis","restart presentation":"Präsentation neu starten","restart?":"Neustart"};strings_de[helpText]="Benutzen Sie die Maus, Leerschlag, die Cursortasten links/rechts oder Page up/Page Down zum Wechseln der Seiten und S und B für die Schriftgrösse.";var strings_pl={slide:"slajd","help?":"pomoc?","contents?":"spis treści?","table of contents":"spis treści","Table of Contents":"Spis Treści","restart presentation":"Restartuj prezentację","restart?":"restart?"};strings_pl[helpText]="Zmieniaj slajdy klikając myszą, naciskając spację, strzałki lewo/prawolub PgUp / PgDn. Użyj klawiszy S i B, aby zmienić rozmiar czczionki.";var strings_fr={slide:"page","help?":"Aide","contents?":"Index","table of contents":"table des matières","Table of Contents":"Table des matières","restart presentation":"Recommencer l'exposé","restart?":"Début"};strings_fr[helpText]="Naviguez avec la souris, la barre d'espace, les flèches gauche/droite ou les touches Pg Up, Pg Dn. Utilisez les touches S et B pour modifier la taille de la police.";var strings_hu={slide:"oldal","help?":"segítség","contents?":"tartalom","table of contents":"tartalomjegyzék","Table of Contents":"Tartalomjegyzék","restart presentation":"bemutató újraindítása","restart?":"újraindítás"};strings_hu[helpText]="Az oldalak közti lépkedéshez kattintson az egérrel, vagy használja a szóköz, a bal, vagy a jobb nyíl, illetve a Page Down, Page Up billentyűket. Az S és a B billentyűkkel változtathatja a szöveg méretét.";var strings_it={slide:"pag.","help?":"Aiuto","contents?":"Indice","table of contents":"indice","Table of Contents":"Indice","restart presentation":"Ricominciare la presentazione","restart?":"Inizio"};strings_it[helpText]="Navigare con mouse, barra spazio, frecce sinistra/destra o PgUp e PgDn. Usare S e B per cambiare la dimensione dei caratteri.";var strings_el={slide:"σελίδα","help?":"βοήθεια;","contents?":"περιεχόμενα;","table of contents":"πίνακας περιεχομένων","Table of Contents":"Πίνακας Περιεχομένων","restart presentation":"επανεκκίνηση παρουσίασης","restart?":"επανεκκίνηση;"};strings_el[helpText]="Πλοηγηθείτε με το κλίκ του ποντικιού, το space, τα βέλη αριστερά/δεξιά, ή Page Up και Page Down. Χρησιμοποιήστε τα πλήκτρα S και B για να αλλάξετε το μέγεθος της γραμματοσειράς.";var strings_ja={slide:"スライド","help?":"ヘルプ","contents?":"目次","table of contents":"目次を表示","Table of Contents":"目次","restart presentation":"最初から再生","restart?":"最初から"};strings_ja[helpText]="マウス左クリック ・ スペース ・ 左右キー または Page Up ・ Page Downで操作, S ・ Bでフォントサイズ変更";var strings_zh={slide:"幻灯片","help?":"帮助?","contents?":"内容?","table of contents":"目录","Table of Contents":"目录","restart presentation":"重新启动展示","restart?":"重新启动?"};strings_zh[helpText]="用鼠标点击, 空格条, 左右箭头, Pg Up 和 Pg Dn 导航. 用 S, B 改变字体大小.";var strings_ru={slide:"слайд","help?":"помощь?","contents?":"содержание?","table of contents":"оглавление","Table of Contents":"Оглавление","restart presentation":"перезапустить презентацию","restart?":"перезапуск?"};strings_ru[helpText]="Перемещайтесь кликая мышкой, используя клавишу пробел, стрелкивлево/вправо или Pg Up и Pg Dn. Клавиши S и B меняют размер шрифта.";var strings_sv={slide:"sida","help?":"hjälp","contents?":"innehåll","table of contents":"innehållsförteckning","Table of Contents":"Innehållsförteckning","restart presentation":"visa presentationen från början","restart?":"börja om"};strings_sv[helpText]="Bläddra med ett klick med vänstra musknappen, mellanslagstangenten, vänster- och högerpiltangenterna eller tangenterna Pg Up, Pg Dn. Använd tangenterna S och B för att ändra textens storlek.";var localize={es:strings_es,ca:strings_ca,nl:strings_nl,de:strings_de,pl:strings_pl,fr:strings_fr,hu:strings_hu,it:strings_it,el:strings_el,jp:strings_ja,zh:strings_zh,ru:strings_ru,sv:strings_sv};function startup(){if(slidy_started){alert("already started");return}slidy_started=true;lang=document.body.parentNode.getAttribute("lang");if(!lang){lang=document.body.parentNode.getAttribute("xml:lang")}if(!lang){lang="en"}document.body.style.visibility="visible";title=document.title;toolbar=addToolbar();wrapImplicitSlides();slides=collectSlides();notes=collectNotes();objects=document.body.getElementsByTagName("object");backgrounds=collectBackgrounds();patchAnchors();slidenum=findSlideNumber(location.href);window.offscreenbuffering=true;sizeAdjustment=findSizeAdjust();hideImageToolbar();initOutliner();if(slides.length>0){var slide=slides[slidenum];slide.style.position="absolute";if(slidenum>0){setVisibilityAllIncremental("visible");lastShown=previousIncrementalItem(null);setEosStatus(true)}else{lastShown=null;setVisibilityAllIncremental("hidden");setEosStatus(!nextIncrementalItem(lastShown))}setLocation()}toc=tableOfContents();hideTableOfContents();document.onclick=mouseButtonClick;document.onmouseup=mouseButtonUp;document.onkeydown=keyDown;if(opera){document.onkeypress=keyPress}window.onresize=resized;window.onscroll=scrolled;window.onunload=unloaded;singleSlideView();setLocation();resized();if(ie7){setTimeout("ieHack()",100)}showToolbar();setInterval("checkLocation()",200)}String.prototype.localize=function(){if(this==""){return this}var s,lookup=localize[lang];if(lookup){s=lookup[this];if(s){return s}}var lg=lang.split("-");if(lg.length>1){lookup=localize[lg[0]];if(lookup){s=lookup[this];if(s){return s}}}return this};function hideImageToolbar(){if(!ns_pos){var images=document.getElementsByTagName("IMG");for(var i=0;i<images.length;++i){images[i].setAttribute("galleryimg","no")}}}function ieHack(){window.resizeBy(0,-1);window.resizeBy(0,1)}function unloaded(e){}function reload(e){if(!e){var e=window.event}hideBackgrounds();setTimeout("document.reload();",100);stopPropagation(e);e.cancel=true;e.returnValue=false;return false}function isKHTML(){var agent=navigator.userAgent;return(agent.indexOf("KHTML")>=0?true:false)}function resized(){var width=0;if(typeof(window.innerWidth)=="number"){width=window.innerWidth}else{if(document.documentElement&&document.documentElement.clientWidth){width=document.documentElement.clientWidth}else{if(document.body&&document.body.clientWidth){width=document.body.clientWidth}}}var height=0;if(typeof(window.innerHeight)=="number"){height=window.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){height=document.documentElement.clientHeight}else{if(document.body&&document.body.clientHeight){height=document.body.clientHeight}}}if(height&&(width/height>1.05*1024/768)){width=height*1024/768}if(width!=lastWidth||height!=lastHeight){if(width>=1100){sizeIndex=5}else{if(width>=1000){sizeIndex=4}else{if(width>=800){sizeIndex=3}else{if(width>=600){sizeIndex=2}else{if(width){sizeIndex=0}}}}}if(0<=sizeIndex+sizeAdjustment&&sizeIndex+sizeAdjustment<sizes.length){sizeIndex=sizeIndex+sizeAdjustment}adjustObjectDimensions(width,height);document.body.style.fontSize=sizes[sizeIndex];lastWidth=width;lastHeight=height;var slide=slides[slidenum];hideSlide(slide);showSlide(slide);refreshToolbar(200)}}function scrolled(){if(toolbar&&!ns_pos&&!ie7){hackoffset=scrollXOffset();toolbar.style.display="none";if(scrollhack==0&&!viewAll){setTimeout(showToolbar,1000);scrollhack=1}}}function refreshToolbar(interval){if(!ns_pos&&!ie7){hideToolbar();setTimeout(showToolbar,interval)}}function showToolbar(){if(wantToolbar){if(!ns_pos){var xoffset=scrollXOffset();toolbar.style.left=xoffset;toolbar.style.right=xoffset;toolbar.style.bottom=0}toolbar.style.display="block";toolbar.style.visibility="visible"}scrollhack=0;try{if(!opera){helpAnchor.focus()}}catch(e){}}function hideToolbar(){toolbar.style.display="none";toolbar.style.visibility="hidden";window.focus()}function toggleToolbar(){if(!viewAll){if(toolbar.style.display=="none"){toolbar.style.display="block";toolbar.style.visibility="visible";wantToolbar=1}else{toolbar.style.display="none";toolbar.style.visibility="hidden";wantToolbar=0}}}function scrollXOffset(){if(window.pageXOffset){return self.pageXOffset}if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft}if(document.body){return document.body.scrollLeft}return 0}function scrollYOffset(){if(window.pageYOffset){return self.pageYOffset}if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop}if(document.body){return document.body.scrollTop}return 0}function optimizeFontSize(){var slide=slides[slidenum];var dh=slide.scrollHeight;var wh=getWindowHeight();var u=100*dh/wh;alert("window utilization = "+u+"% (doc "+dh+" win "+wh+")")}function getDocHeight(doc){if(!doc){doc=document}if(doc&&doc.body&&doc.body.offsetHeight){return doc.body.offsetHeight}if(doc&&doc.body&&doc.body.scrollHeight){return doc.body.scrollHeight}alert("couldn't determine document height")}function getWindowHeight(){if(typeof(window.innerHeight)=="number"){return window.innerHeight}if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight}if(document.body&&document.body.clientHeight){return document.body.clientHeight}}function documentHeight(){var sh,oh;sh=document.body.scrollHeight;oh=document.body.offsetHeight;if(sh&&oh){return(sh>oh?sh:oh)}return 0}function smaller(){if(sizeIndex>0){--sizeIndex}toolbar.style.display="none";document.body.style.fontSize=sizes[sizeIndex];var slide=slides[slidenum];hideSlide(slide);showSlide(slide);setTimeout(showToolbar,300)}function bigger(){if(sizeIndex<sizes.length-1){++sizeIndex}toolbar.style.display="none";document.body.style.fontSize=sizes[sizeIndex];var slide=slides[slidenum];hideSlide(slide);showSlide(slide);setTimeout(showToolbar,300)}function adjustObjectDimensions(width,height){for(var i=0;i<objects.length;i++){var obj=objects[i];var mimeType=obj.getAttribute("type");if(mimeType=="image/svg+xml"||mimeType=="application/x-shockwave-flash"){if(!obj.initialWidth){obj.initialWidth=obj.getAttribute("width")}if(!obj.initialHeight){obj.initialHeight=obj.getAttribute("height")}if(obj.initialWidth&&obj.initialWidth.charAt(obj.initialWidth.length-1)=="%"){var w=parseInt(obj.initialWidth.slice(0,obj.initialWidth.length-1));var newW=width*(w/100);obj.setAttribute("width",newW)}if(obj.initialHeight&&obj.initialHeight.charAt(obj.initialHeight.length-1)=="%"){var h=parseInt(obj.initialHeight.slice(0,obj.initialHeight.length-1));var newH=height*(h/100);obj.setAttribute("height",newH)}}}}function cancel(event){if(event){event.cancel=true;event.returnValue=false;if(event.preventDefault){event.preventDefault()}}return false}function keyDown(event){var key;if(!event){var event=window.event}key_wanted=false;if(window.event){key=window.event.keyCode}else{if(event.which){key=event.which}else{return true}}if(!key){return true}if(event.ctrlKey||event.altKey||event.metaKey){return true}if(isShownToc()&&key!=9&&key!=16&&key!=38&&key!=40){hideTableOfContents();if(key==27||key==84||key==67){return cancel(event)}}key_wanted=true;if(key==34){if(viewAll){return true}nextSlide(false);return cancel(event)}else{if(key==33){if(viewAll){return true}previousSlide(false);return cancel(event)}else{if(key==32){nextSlide(true);return cancel(event)}else{if(key==37){previousSlide(!event.shiftKey);return cancel(event)}else{if(key==36){firstSlide();return cancel(event)}else{if(key==35){lastSlide();return cancel(event)}else{if(key==39){nextSlide(!event.shiftKey);return cancel(event)}else{if(key==13){if(outline){if(outline.visible){fold(outline)}else{unfold(outline)}return cancel(event)}}else{if(key==188){smaller();return cancel(event)}else{if(key==190){bigger();return cancel(event)}else{if(key==189||key==109){smaller();return cancel(event)}else{if(key==187||key==191||key==107){bigger();return cancel(event)}else{if(key==83){smaller();return cancel(event)}else{if(key==66){bigger();return cancel(event)}else{if(key==90){lastSlide();return cancel(event)}else{if(key==70){toggleToolbar();return cancel(event)}else{if(key==65){toggleView();return cancel(event)}else{if(key==75){mouseClickEnabled=!mouseClickEnabled;alert((mouseClickEnabled?"enabled":"disabled")+" mouse click advance");return cancel(event)}else{if(key==84||key==67){if(toc){showTableOfContents()}return cancel(event)}else{if(key==72){window.location=helpPage;return cancel(event)}}}}}}}}}}}}}}}}}}}}key_wanted=false;return true}function keyPress(event){if(!event){event=window.event}return key_wanted?cancel(event):true}function mouseButtonUp(e){selectedTextLen=getSelectedText().length}function mouseButtonClick(e){var rightclick=false;var leftclick=false;var middleclick=false;var target;if(!e){var e=window.event}if(e.target){target=e.target}else{if(e.srcElement){target=e.srcElement}}if(target.nodeType==3){target=target.parentNode}if(e.which){leftclick=(e.which==1);middleclick=(e.which==2);rightclick=(e.which==3)}else{if(e.button){if(e.button==4){middleclick=true}rightclick=(e.button==2)}else{leftclick=true}}if(selectedTextLen>0){stopPropagation(e);e.cancel=true;e.returnValue=false;return false}hideTableOfContents();if(mouseClickEnabled&&leftclick&&target.nodeName!="EMBED"&&target.nodeName!="OBJECT"&&target.nodeName!="VIDEO"&&target.nodeName!="INPUT"&&target.nodeName!="TEXTAREA"&&target.nodeName!="SELECT"&&target.nodeName!="OPTION"){nextSlide(true);stopPropagation(e);e.cancel=true;e.returnValue=false}}function previousSlide(incremental){if(!viewAll){var slide;if((incremental||slidenum==0)&&lastShown!=null){lastShown=hidePreviousItem(lastShown);setEosStatus(false)}else{if(slidenum>0){slide=slides[slidenum];hideSlide(slide);slidenum=slidenum-1;slide=slides[slidenum];setVisibilityAllIncremental("visible");lastShown=previousIncrementalItem(null);setEosStatus(true);showSlide(slide)}}setLocation();if(!ns_pos){refreshToolbar(200)}}}function nextSlide(incremental){if(!viewAll){var slide,last=lastShown;if(incremental||slidenum==slides.length-1){lastShown=revealNextItem(lastShown)}if((!incremental||lastShown==null)&&slidenum<slides.length-1){slide=slides[slidenum];hideSlide(slide);slidenum=slidenum+1;slide=slides[slidenum];lastShown=null;setVisibilityAllIncremental("hidden");showSlide(slide)}else{if(!lastShown){if(last&&incremental){lastShown=last}}}setLocation();setEosStatus(!nextIncrementalItem(lastShown));if(!ns_pos){refreshToolbar(200)}}}function firstSlide(){if(!viewAll){var slide;if(slidenum!=0){slide=slides[slidenum];hideSlide(slide);slidenum=0;slide=slides[slidenum];lastShown=null;setVisibilityAllIncremental("hidden");showSlide(slide)}setEosStatus(!nextIncrementalItem(lastShown));setLocation()}}function lastSlide(){if(!viewAll){var slide;lastShown=null;if(lastShown==null&&slidenum<slides.length-1){slide=slides[slidenum];hideSlide(slide);slidenum=slides.length-1;slide=slides[slidenum];setVisibilityAllIncremental("visible");lastShown=previousIncrementalItem(null);showSlide(slide)}else{setVisibilityAllIncremental("visible");lastShown=previousIncrementalItem(null)}setEosStatus(true);setLocation()}}function gotoSlide(num){var slide=slides[slidenum];hideSlide(slide);slidenum=num;slide=slides[slidenum];lastShown=null;setVisibilityAllIncremental("hidden");setEosStatus(!nextIncrementalItem(lastShown));document.title=title+" ("+(slidenum+1)+")";showSlide(slide);showSlideNumber()}function setEosStatus(state){if(eos){eos.style.color=(state?"rgb(240,240,240)":"red")}}function showSlide(slide){syncBackground(slide);window.scrollTo(0,0);slide.style.visibility="visible";slide.style.display="block"}function hideSlide(slide){slide.style.visibility="hidden";slide.style.display="none"}function beforePrint(){showAllSlides();hideToolbar()}function afterPrint(){if(!viewAll){singleSlideView();showToolbar()}}function printSlides(){beforePrint();window.print();afterPrint()}function toggleView(){if(viewAll){singleSlideView();showToolbar();viewAll=0}else{showAllSlides();hideToolbar();viewAll=1}}function showAllSlides(){var slide;for(var i=0;i<slides.length;++i){slide=slides[i];slide.style.position="relative";slide.style.borderTopStyle="solid";slide.style.borderTopWidth="thin";slide.style.borderTopColor="black";try{if(i==0){slide.style.pageBreakBefore="avoid"}else{slide.style.pageBreakBefore="always"}}catch(e){}setVisibilityAllIncremental("visible");showSlide(slide)}var note;for(var i=0;i<notes.length;++i){showSlide(notes[i])}hideBackgrounds()}function singleSlideView(){var slide;for(var i=0;i<slides.length;++i){slide=slides[i];slide.style.position="absolute";if(i==slidenum){slide.style.borderStyle="none";showSlide(slide)}else{slide.style.borderStyle="none";hideSlide(slide)}}setVisibilityAllIncremental("visible");lastShown=previousIncrementalItem(null);var note;for(var i=0;i<notes.length;++i){hideSlide(notes[i])}}function hasToken(str,token){if(str){var pattern=/\w+/g;var result=str.match(pattern);for(var i=0;i<result.length;i++){if(result[i]==token){return true}}}return false}function getClassList(element){if(typeof element.className!="undefined"){return element.className}var clsname=(ns_pos||ie8)?"class":"className";return element.getAttribute(clsname)}function hasClass(element,name){var regexp=new RegExp("(^| )"+name+"W*");if(typeof element.className!="undefined"){return regexp.test(element.className)}var clsname=(ns_pos||ie8)?"class":"className";return regexp.test(element.getAttribute(clsname))}function removeClass(element,name){var regexp=new RegExp("(^| )"+name+"W*");var clsval="";if(typeof element.className!="undefined"){clsval=element.className;if(clsval){clsval=clsval.replace(regexp,"");element.className=clsval}}else{var clsname=(ns_pos||ie8)?"class":"className";clsval=element.getAttribute(clsname);if(clsval){clsval=clsval.replace(regexp,"");element.setAttribute(clsname,clsval)}}}function addClass(element,name){if(!hasClass(element,name)){if(typeof element.className!="undefined"){element.className+=" "+name}else{var clsname=(ns_pos||ie8)?"class":"className";var clsval=element.getAttribute(clsname);clsval=clsval?clsval+" "+name:name;element.setAttribute(clsname,clsval)}}}function wrapImplicitSlides(){var i,heading,node,next,div;var headings=document.getElementsByTagName("h1");if(!headings){return}for(i=0;i<headings.length;++i){heading=headings[i];if(heading.parentNode!=document.body){continue}node=heading.nextSibling;div=document.createElement("div");addClass(div,"slide");document.body.replaceChild(div,heading);div.appendChild(heading);while(node){if(node.nodeType==1&&(node.nodeName=="H1"||node.nodeName=="h1"||node.nodeName=="DIV"||node.nodeName=="div")){break}next=node.nextSibling;node=document.body.removeChild(node);div.appendChild(node);node=next}}}function collectSlides(){var slides=new Array();var divs=document.body.getElementsByTagName("div");for(var i=0;i<divs.length;++i){div=divs.item(i);if(hasClass(div,"slide")){slides[slides.length]=div;div.style.display="none";div.style.visibility="hidden";var node1=document.createElement("br");div.appendChild(node1);var node2=document.createElement("br");div.appendChild(node2)}else{if(hasClass(div,"background")){div.style.display="block"}}}return slides}function collectNotes(){var notes=new Array();var divs=document.body.getElementsByTagName("div");for(var i=0;i<divs.length;++i){div=divs.item(i);if(hasClass(div,"handout")){notes[notes.length]=div;div.style.display="none";div.style.visibility="hidden"}}return notes}function collectBackgrounds(){var backgrounds=new Array();var divs=document.body.getElementsByTagName("div");for(var i=0;i<divs.length;++i){div=divs.item(i);if(hasClass(div,"background")){backgrounds[backgrounds.length]=div;if(getClassList(div)!="background"){div.style.display="none";div.style.visibility="hidden"}}}return backgrounds}function syncBackground(slide){var background;var bgColor;if(slide.currentStyle){bgColor=slide.currentStyle.backgroundColor}else{if(document.defaultView){var styles=document.defaultView.getComputedStyle(slide,null);if(styles){bgColor=styles.getPropertyValue("background-color")}else{bgColor="transparent"}}else{bgColor=="transparent"}}if(bgColor=="transparent"){var slideClass=getClassList(slide);for(var i=0;i<backgrounds.length;i++){background=backgrounds[i];var bgClass=getClassList(background);if(matchingBackground(slideClass,bgClass)){background.style.display="block";background.style.visibility="visible"}else{background.style.display="none";background.style.visibility="hidden"}}}else{hideBackgrounds()}}function hideBackgrounds(){for(var i=0;i<backgrounds.length;i++){background=backgrounds[i];background.style.display="none";background.style.visibility="hidden"}}function matchingBackground(slideClass,bgClass){if(bgClass=="background"){return true}var pattern=/\w+/g;var result=slideClass.match(pattern);for(var i=0;i<result.length;i++){if(hasToken(bgClass,result[i])){return true}}return false}function nextNode(root,node){if(node==null){return root.firstChild}if(node.firstChild){return node.firstChild}if(node.nextSibling){return node.nextSibling}for(;;){node=node.parentNode;if(!node||node==root){break}if(node&&node.nextSibling){return node.nextSibling}}return null}function previousNode(root,node){if(node==null){node=root.lastChild;if(node){while(node.lastChild){node=node.lastChild}}return node}if(node.previousSibling){node=node.previousSibling;while(node.lastChild){node=node.lastChild}return node}if(node.parentNode!=root){return node.parentNode}return null}function incrementalElementList(){var inclist=new Array();inclist.P=true;inclist.PRE=true;inclist.LI=true;inclist.BLOCKQUOTE=true;inclist.DT=true;inclist.DD=true;inclist.H2=true;inclist.H3=true;inclist.H4=true;inclist.H5=true;inclist.H6=true;inclist.SPAN=true;inclist.ADDRESS=true;inclist.TABLE=true;inclist.TR=true;inclist.TH=true;inclist.TD=true;inclist.IMG=true;inclist.OBJECT=true;return inclist}function nextIncrementalItem(node){var slide=slides[slidenum];for(;;){node=nextNode(slide,node);if(node==null||node.parentNode==null){break}if(node.nodeType==1){if(node.nodeName=="BR"){continue}if(hasClass(node,"incremental")&&okayForIncremental[node.nodeName]){return node}if(hasClass(node.parentNode,"incremental")&&!hasClass(node,"non-incremental")){return node}}}return node}function previousIncrementalItem(node){var slide=slides[slidenum];for(;;){node=previousNode(slide,node);if(node==null||node.parentNode==null){break}if(node.nodeType==1){if(node.nodeName=="BR"){continue}if(hasClass(node,"incremental")&&okayForIncremental[node.nodeName]){return node}if(hasClass(node.parentNode,"incremental")&&!hasClass(node,"non-incremental")){return node}}}return node}function setVisibilityAllIncremental(value){var node=nextIncrementalItem(null);while(node){node.style.visibility=value;node=nextIncrementalItem(node)}}function revealNextItem(node){node=nextIncrementalItem(node);if(node&&node.nodeType==1){node.style.visibility="visible"}return node}function hidePreviousItem(node){if(node&&node.nodeType==1){node.style.visibility="hidden"}return previousIncrementalItem(node)}function patchAnchors(){var anchors=document.body.getElementsByTagName("a");for(var i=0;i<anchors.length;++i){anchors[i].onclick=clickedAnchor}}function clickedAnchor(e){if(!e){var e=window.event}if(pageAddress(this.href)==pageAddress(location.href)){var newslidenum=findSlideNumber(this.href);if(newslidenum!=slidenum){slide=slides[slidenum];hideSlide(slide);slidenum=newslidenum;slide=slides[slidenum];showSlide(slide);setLocation()}}else{if(this.target==null){location.href=this.href}}this.blur();stopPropagation(e)}function pageAddress(uri){var i=uri.indexOf("#");if(i<0){i=uri.indexOf("%23")}if(i<0){return uri}return uri.substr(0,i)}function showSlideNumber(){slideNumElement.innerHTML="slide".localize()+" "+(slidenum+1)+"/"+slides.length}function checkLocation(){var hash=location.hash;if(slidenum>0&&(hash==""||hash=="#")){gotoSlide(0)}else{if(hash.length>2&&hash!="#("+(slidenum+1)+")"){var num=parseInt(location.hash.substr(2));if(!isNaN(num)){gotoSlide(num-1)}}}}function setLocation(){var uri=pageAddress(location.href);var hash="#("+(slidenum+1)+")";if(slidenum>=0){uri=uri+hash}if(ie&&!ie8){pushHash(hash)}if(uri!=location.href){location.href=uri}if(khtml){hash="("+(slidenum+1)+")"}if(!ie&&location.hash!=hash&&location.hash!=""){location.hash=hash}document.title=title+" ("+(slidenum+1)+")";showSlideNumber()}function onFrameLoaded(hash){location.hash=hash;var uri=pageAddress(location.href);location.href=uri+hash}function pushHash(hash){if(hash==""){hash="#(1)"}window.location.hash=hash;var doc=document.getElementById("historyFrame").contentWindow.document;doc.open("javascript:'<html></html>'");doc.write('<html><head><script type="text/javascript">parent.onFrameLoaded(\''+(hash)+"');<\/script></head><body>hello mum</body></html>");doc.close()}function findSlideNumber(uri){var i=uri.indexOf("#");if(i<0){return 0}var anchor=unescape(uri.substr(i+1));var target=document.getElementById(anchor);if(!target){var re=/\((\d)+\)/;if(anchor.match(re)){var num=parseInt(anchor.substring(1,anchor.length-1));if(num>slides.length){num=1}if(--num<0){num=0}return num}re=/\[(\d)+\]/;if(anchor.match(re)){var num=parseInt(anchor.substring(1,anchor.length-1));if(num>slides.length){num=1}if(--num<0){num=0}return num}return 0}while(true){if(target.nodeName.toLowerCase()=="div"&&hasClass(target,"slide")){break}target=target.parentNode;if(!target){return 0}}for(i=0;i<slides.length;++i){if(slides[i]==target){return i}}return 0}function slideName(index){var name=null;var slide=slides[index];var heading=findHeading(slide);if(heading){name=extractText(heading)}if(!name){name=title+"("+(index+1)+")"}name.replace(/\&/g,"&amp;");name.replace(/\</g,"&lt;");name.replace(/\>/g,"&gt;");return name}function findHeading(node){if(!node||node.nodeType!=1){return null}if(node.nodeName=="H1"||node.nodeName=="h1"){return node}var child=node.firstChild;while(child){node=findHeading(child);if(node){return node}child=child.nextSibling}return null}function extractText(node){if(!node){return""}if(node.nodeType==3){return node.nodeValue}if(node.nodeType==1){node=node.firstChild;var text="";while(node){text=text+extractText(node);node=node.nextSibling}return text}return""}function findCopyright(){var name,content;var meta=document.getElementsByTagName("meta");for(var i=0;i<meta.length;++i){name=meta[i].getAttribute("name");content=meta[i].getAttribute("content");if(name=="copyright"){return content}}return null}function findSizeAdjust(){var name,content,offset;var meta=document.getElementsByTagName("meta");for(var i=0;i<meta.length;++i){name=meta[i].getAttribute("name");content=meta[i].getAttribute("content");if(name=="font-size-adjustment"){return 1*content}}return 1}function addToolbar(){var slideCounter,page;var toolbar=createElement("div");toolbar.setAttribute("class","toolbar");if(ns_pos){var right=document.createElement("div");right.setAttribute("style","float: right; text-align: right");slideCounter=document.createElement("div");slideCounter.innerHTML="slide".localize()+" n/m";right.appendChild(slideCounter);toolbar.appendChild(right);var left=document.createElement("div");left.setAttribute("style","text-align: left");eos=document.createElement("span");eos.innerHTML="* ";left.appendChild(eos);var help=document.createElement("a");help.setAttribute("href",helpPage);help.setAttribute("title",helpText.localize());help.innerHTML="help?".localize();left.appendChild(help);helpAnchor=help;var gap1=document.createTextNode(" ");left.appendChild(gap1);var contents=document.createElement("a");contents.setAttribute("href","javascript:toggleTableOfContents()");contents.setAttribute("title","table of contents".localize());contents.innerHTML="contents?".localize();left.appendChild(contents);var gap2=document.createTextNode(" ");left.appendChild(gap2);var start=document.createElement("a");start.setAttribute("href","javascript:firstSlide()");start.setAttribute("title","restart presentation".localize());start.innerHTML="restart?".localize();left.appendChild(start);var copyright=findCopyright();if(copyright){var span=document.createElement("span");span.innerHTML=copyright;span.style.color="black";span.style.marginLeft="4em";left.appendChild(span)}toolbar.appendChild(left)}else{toolbar.style.position=(ie7?"fixed":"absolute");toolbar.style.zIndex="200";toolbar.style.width="99.9%";toolbar.style.height="1.2em";toolbar.style.top="auto";toolbar.style.bottom="0";toolbar.style.left="0";toolbar.style.right="0";toolbar.style.textAlign="left";toolbar.style.fontSize="60%";toolbar.style.color="red";toolbar.borderWidth=0;toolbar.className="toolbar";toolbar.style.background="rgb(240,240,240)";var sp=document.createElement("span");sp.innerHTML="&nbsp;&nbsp;*&nbsp;";toolbar.appendChild(sp);eos=sp;var help=document.createElement("a");help.setAttribute("href",helpPage);help.setAttribute("title",helpText.localize());help.innerHTML="help?".localize();toolbar.appendChild(help);helpAnchor=help;var gap1=document.createTextNode(" ");toolbar.appendChild(gap1);var contents=document.createElement("a");contents.setAttribute("href","javascript:toggleTableOfContents()");contents.setAttribute("title","table of contents".localize());contents.innerHTML="contents?".localize();toolbar.appendChild(contents);var gap2=document.createTextNode(" ");toolbar.appendChild(gap2);var start=document.createElement("a");start.setAttribute("href","javascript:firstSlide()");start.setAttribute("title","restart presentation".localize());start.innerHTML="restart?".localize();toolbar.appendChild(start);var copyright=findCopyright();if(copyright){var span=document.createElement("span");span.innerHTML=copyright;span.style.color="black";span.style.marginLeft="2em";toolbar.appendChild(span)}slideCounter=document.createElement("div");slideCounter.style.position="absolute";slideCounter.style.width="auto";slideCounter.style.height="1.2em";slideCounter.style.top="auto";slideCounter.style.bottom=0;slideCounter.style.right="0";slideCounter.style.textAlign="right";slideCounter.style.color="red";slideCounter.style.background="rgb(240,240,240)";slideCounter.innerHTML="slide".localize()+" n/m";toolbar.appendChild(slideCounter)}toolbar.onclick=stopPropagation;document.body.appendChild(toolbar);slideNumElement=slideCounter;setEosStatus(false);return toolbar}function isShownToc(){if(toc&&toc.style.visible=="visible"){return true}return false}function showTableOfContents(){if(toc){if(toc.style.visibility!="visible"){toc.style.visibility="visible";toc.style.display="block";toc.focus();if(ie7&&slidenum==0){setTimeout("ieHack()",100)}}else{hideTableOfContents()}}}function hideTableOfContents(){if(toc&&toc.style.visibility!="hidden"){toc.style.visibility="hidden";toc.style.display="none";try{if(!opera){helpAnchor.focus()}}catch(e){}}}function toggleTableOfContents(){if(toc){if(toc.style.visible!="visible"){showTableOfContents()}else{hideTableOfContents()}}}function gotoEntry(e){var target;if(!e){var e=window.event}if(e.target){target=e.target}else{if(e.srcElement){target=e.srcElement}}if(target.nodeType==3){target=target.parentNode}if(target&&target.nodeType==1){var uri=target.getAttribute("href");if(uri){var slide=slides[slidenum];hideSlide(slide);slidenum=findSlideNumber(uri);slide=slides[slidenum];lastShown=null;setLocation();setVisibilityAllIncremental("hidden");setEosStatus(!nextIncrementalItem(lastShown));showSlide(slide);try{if(!opera){helpAnchor.focus()}}catch(e){}}}hideTableOfContents(e);if(ie7){ieHack()}stopPropagation(e);return cancel(e)}function gotoTocEntry(event){var key;if(!event){var event=window.event}if(window.event){key=window.event.keyCode}else{if(event.which){key=event.which}else{return true}}if(!key){return true}if(event.ctrlKey||event.altKey){return true}if(key==13){var uri=this.getAttribute("href");if(uri){var slide=slides[slidenum];hideSlide(slide);slidenum=findSlideNumber(uri);slide=slides[slidenum];lastShown=null;setLocation();setVisibilityAllIncremental("hidden");setEosStatus(!nextIncrementalItem(lastShown));showSlide(slide);try{if(!opera){helpAnchor.focus()}}catch(e){}}hideTableOfContents();if(ie7){ieHack()}return cancel(event)}if(key==40&&this.next){this.next.focus();return cancel(event)}if(key==38&&this.previous){this.previous.focus();return cancel(event)}return true}function isTitleSlide(slide){return hasClass(slide,"title")}function tableOfContents(){var toc=document.createElement("div");addClass(toc,"toc");var heading=document.createElement("div");addClass(heading,"toc-heading");heading.innerHTML="Table of Contents".localize();heading.style.textAlign="center";heading.style.width="100%";heading.style.margin="0";heading.style.marginBottom="1em";heading.style.borderBottomStyle="solid";heading.style.borderBottomColor="rgb(180,180,180)";heading.style.borderBottomWidth="1px";toc.appendChild(heading);var previous=null;for(var i=0;i<slides.length;++i){var title=hasClass(slides[i],"title");var num=document.createTextNode((i+1)+". ");toc.appendChild(num);var a=document.createElement("a");a.setAttribute("href","#("+(i+1)+")");if(title){addClass(a,"titleslide")}var name=document.createTextNode(slideName(i));a.appendChild(name);a.onclick=gotoEntry;a.onkeydown=gotoTocEntry;a.previous=previous;if(previous){previous.next=a}toc.appendChild(a);if(i==0){toc.first=a}if(i<slides.length-1){var br=document.createElement("br");toc.appendChild(br)}previous=a}toc.focus=function(){if(this.first){this.first.focus()}};toc.onmouseup=mouseButtonUp;toc.onclick=function(e){e||(e=window.event);if(selectedTextLen<=0){hideTableOfContents()}stopPropagation(e);if(e.cancel!=undefined){e.cancel=true}if(e.returnValue!=undefined){e.returnValue=false}return false};toc.style.position="absolute";toc.style.zIndex="300";toc.style.width="60%";toc.style.maxWidth="30em";toc.style.height="30em";toc.style.overflow="auto";toc.style.top="auto";toc.style.right="auto";toc.style.left="4em";toc.style.bottom="4em";toc.style.padding="1em";toc.style.background="rgb(240,240,240)";toc.style.borderStyle="solid";toc.style.borderWidth="2px";toc.style.fontSize="60%";document.body.insertBefore(toc,document.body.firstChild);return toc}function replaceByNonBreakingSpace(str){for(var i=0;i<str.length;++i){str[i]=160}}function initOutliner(){var items=document.getElementsByTagName("LI");for(var i=0;i<items.length;++i){var target=items[i];if(!hasClass(target.parentNode,"outline")){continue}target.onclick=outlineClick;if(!ns_pos){target.onmouseover=hoverOutline;target.onmouseout=unhoverOutline}if(foldable(target)){target.foldable=true;target.onfocus=function(){outline=this};target.onblur=function(){outline=null};if(!target.getAttribute("tabindex")){target.setAttribute("tabindex","0")}if(hasClass(target,"expand")){unfold(target)}else{fold(target)}}else{addClass(target,"nofold");target.visible=true;target.foldable=false}}}function foldable(item){if(!item||item.nodeType!=1){return false}var node=item.firstChild;while(node){if(node.nodeType==1&&isBlock(node)){return true}node=node.nextSibling}return false}function fold(item){if(item){removeClass(item,"unfolded");addClass(item,"folded")}var node=item?item.firstChild:null;while(node){if(node.nodeType==1&&isBlock(node)){node.display=getElementStyle(node,"display","display");node.style.display="none";node.style.visibility="hidden"}node=node.nextSibling}item.visible=false}function unfold(item){if(item){addClass(item,"unfolded");removeClass(item,"folded")}var node=item?item.firstChild:null;while(node){if(node.nodeType==1&&isBlock(node)){node.style.display=(node.display?node.display:"block");node.style.visibility="visible"}node=node.nextSibling}item.visible=true}function outlineClick(e){var rightclick=false;var target;if(!e){var e=window.event}if(e.target){target=e.target}else{if(e.srcElement){target=e.srcElement}}if(target.nodeType==3){target=target.parentNode}while(target&&target.visible==undefined){target=target.parentNode}if(!target){return true}if(e.which){rightclick=(e.which==3)}else{if(e.button){rightclick=(e.button==2)}}if(!rightclick&&target.visible!=undefined){if(target.foldable){if(target.visible){fold(target)}else{unfold(target)}}stopPropagation(e);e.cancel=true;e.returnValue=false}return false}function hoverOutline(e){var target;if(!e){var e=window.event}if(e.target){target=e.target}else{if(e.srcElement){target=e.srcElement}}if(target.nodeType==3){target=target.parentNode}while(target&&target.visible==undefined){target=target.parentNode}if(target&&target.foldable){target.style.cursor="pointer"}return true}function unhoverOutline(e){var target;if(!e){var e=window.event}if(e.target){target=e.target}else{if(e.srcElement){target=e.srcElement}}if(target.nodeType==3){target=target.parentNode}while(target&&target.visible==undefined){target=target.parentNode}if(target){target.style.cursor="default"}return true}function stopPropagation(e){if(window.event){window.event.cancelBubble=true}else{if(e){e.cancelBubble=true;e.stopPropagation()}}}function isBlock(elem){var tag=elem.nodeName;return tag=="OL"||tag=="UL"||tag=="P"||tag=="LI"||tag=="TABLE"||tag=="PRE"||tag=="H1"||tag=="H2"||tag=="H3"||tag=="H4"||tag=="H5"||tag=="H6"||tag=="BLOCKQUOTE"||tag=="ADDRESS"}function getElementStyle(elem,IEStyleProp,CSSStyleProp){if(elem.currentStyle){return elem.currentStyle[IEStyleProp]}else{if(window.getComputedStyle){var compStyle=window.getComputedStyle(elem,"");return compStyle.getPropertyValue(CSSStyleProp)}}return""}function createElement(element){if(typeof document.createElementNS!="undefined"){return document.createElementNS("http://www.w3.org/1999/xhtml",element)}if(typeof document.createElement!="undefined"){return document.createElement(element)}return false}function getElementsByTagName(name){if(typeof document.getElementsByTagNameNS!="undefined"){return document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml",name)}if(typeof document.getElementsByTagName!="undefined"){return document.getElementsByTagName(name)}return null}function getSelectedText(){try{if(window.getSelection){return window.getSelection().toString()}if(document.getSelection){return document.getSelection().toString()}if(document.selection){return document.selection.createRange().text}}catch(e){return""}return""};+var w3c_slidy={ns_pos:(typeof window.pageYOffset!="undefined"),khtml:((navigator.userAgent).indexOf("KHTML")>=0?true:false),opera:((navigator.userAgent).indexOf("Opera")>=0?true:false),ipad:((navigator.userAgent).indexOf("iPad")>=0?true:false),iphone:((navigator.userAgent).indexOf("iPhone")>=0?true:false),ie:(typeof document.all!="undefined"&&!this.opera),ie6:(!this.ns_pos&&navigator.userAgent.indexOf("MSIE 6")!=-1),ie7:(!this.ns_pos&&navigator.userAgent.indexOf("MSIE 7")!=-1),ie8:(!this.ns_pos&&navigator.userAgent.indexOf("MSIE 8")!=-1),ie9:(!this.ns_pos&&navigator.userAgent.indexOf("MSIE 9")!=-1),keyboardless:(this.ipad||this.iphone),is_xhtml:/xml/.test(document.contentType),slide_number:0,slide_number_element:null,slides:[],notes:[],backgrounds:[],toolbar:null,title:null,last_shown:null,eos:null,toc:null,outline:null,selected_text_len:0,view_all:0,want_toolbar:true,mouse_click_enabled:true,scroll_hack:0,disable_slide_click:false,lang:"en",help_anchor:null,help_page:"http://www.w3.org/Talks/Tools/Slidy2/help/help.html",help_text:"Navigate with mouse click, space bar, Cursor Left/Right, or Pg Up and Pg Dn. Use S and B to change font size.",size_index:0,size_adjustment:0,sizes:new Array("10pt","12pt","14pt","16pt","18pt","20pt","22pt","24pt","26pt","28pt","30pt","32pt"),last_width:0,last_height:0,objects:[],set_up:function(){var a=function(){w3c_slidy.init()};if(typeof window.addEventListener!="undefined"){window.addEventListener("load",a,false)}else{window.attachEvent("onload",a)}},hide_slides:function(){if(document.body&&!w3c_slidy.initialized){document.body.style.visibility="hidden"}else{setTimeout(w3c_slidy.hide_slides,50)}},ie_hack:function(){window.resizeBy(0,-1);window.resizeBy(0,1)},init:function(){document.body.style.visibility="visible";this.init_localization();this.add_toolbar();this.wrap_implicit_slides();this.collect_slides();this.collect_notes();this.collect_backgrounds();this.objects=document.body.getElementsByTagName("object");this.patch_anchors();this.slide_number=this.find_slide_number(location.href);window.offscreenbuffering=true;this.size_adjustment=this.find_size_adjust();this.time_left=this.find_duration();this.hide_image_toolbar();this.init_outliner();this.title=document.title;this.is_xhtml=(document.body.tagName=="BODY"?false:true);if(this.slides.length>0){var a=this.slides[this.slide_number];if(this.slide_number>0){this.set_visibility_all_incremental("visible");this.last_shown=this.previous_incremental_item(null);this.set_eos_status(true)}else{this.last_shown=null;this.set_visibility_all_incremental("hidden");this.set_eos_status(!this.next_incremental_item(this.last_shown))}this.set_location();this.add_class(this.slides[0],"first-slide");w3c_slidy.show_slide(a)}this.toc=this.table_of_contents();this.add_initial_prompt();if(!this.keyboardless){this.add_listener(document.body,"click",this.mouse_button_click)}this.add_listener(document,"keydown",this.key_down);this.add_listener(document,"keypress",this.key_press);this.add_listener(window,"resize",this.resized);this.add_listener(window,"scroll",this.scrolled);this.add_listener(window,"unload",this.unloaded);this.single_slide_view();this.resized();if(this.ie7){setTimeout(w3c_slidy.ie_hack,100)}this.show_toolbar();setInterval(function(){w3c_slidy.check_location()},200);w3c_slidy.initialized=true},table_of_contents:function(){var c=this.create_element("div");this.add_class(c,"slidy_toc hidden");var k=this.create_element("div");this.add_class(k,"toc-heading");k.innerHTML=this.localize("Table of Contents");c.appendChild(k);var f=null;for(var d=0;d<this.slides.length;++d){var g=this.has_class(this.slides[d],"title");var e=document.createTextNode((d+1)+". ");c.appendChild(e);var h=this.create_element("a");h.setAttribute("href","#("+(d+1)+")");if(g){this.add_class(h,"titleslide")}var b=document.createTextNode(this.slide_name(d));h.appendChild(b);h.onclick=w3c_slidy.toc_click;h.onkeydown=w3c_slidy.toc_key_down;h.previous=f;if(f){f.next=h}c.appendChild(h);if(d==0){c.first=h}if(d<this.slides.length-1){var j=this.create_element("br");c.appendChild(j)}f=h}c.focus=function(){if(this.first){this.first.focus()}};c.onmouseup=w3c_slidy.mouse_button_up;c.onclick=function(a){a||(a=window.event);if(w3c_slidy.selected_text_len<=0){w3c_slidy.hide_table_of_contents(true)}w3c_slidy.stop_propagation(a);if(a.cancel!=undefined){a.cancel=true}if(a.returnValue!=undefined){a.returnValue=false}return false};document.body.insertBefore(c,document.body.firstChild);return c},is_shown_toc:function(){return !w3c_slidy.has_class(w3c_slidy.toc,"hidden")},show_table_of_contents:function(){w3c_slidy.remove_class(w3c_slidy.toc,"hidden");var a=w3c_slidy.toc;a.focus();if(w3c_slidy.ie7&&w3c_slidy.slide_number==0){setTimeout(w3c_slidy.ie_hack,100)}},hide_table_of_contents:function(a){w3c_slidy.add_class(w3c_slidy.toc,"hidden");if(a&&!w3c_slidy.opera){w3c_slidy.help_anchor.focus()}},toggle_table_of_contents:function(){if(w3c_slidy.is_shown_toc()){w3c_slidy.hide_table_of_contents(true)}else{w3c_slidy.show_table_of_contents()}},toc_click:function(d){if(!d){d=window.event}var c=w3c_slidy.get_target(d);if(c&&c.nodeType==1){var b=c.getAttribute("href");if(b){var a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.hide_slide(a);w3c_slidy.slide_number=w3c_slidy.find_slide_number(b);a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.last_shown=null;w3c_slidy.set_location();w3c_slidy.set_visibility_all_incremental("hidden");w3c_slidy.set_eos_status(!w3c_slidy.next_incremental_item(w3c_slidy.last_shown));w3c_slidy.show_slide(a);try{if(!w3c_slidy.opera){w3c_slidy.help_anchor.focus()}}catch(d){}}}w3c_slidy.hide_table_of_contents(true);if(w3c_slidy.ie7){w3c_slidy.ie_hack()}w3c_slidy.stop_propagation(d);return w3c_slidy.cancel(d)},toc_key_down:function(d){var b;if(!d){var d=window.event}if(window.event){b=window.event.keyCode}else{if(d.which){b=d.which}else{return true}}if(!b){return true}if(d.ctrlKey||d.altKey){return true}if(b==13){var c=this.getAttribute("href");if(c){var a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.hide_slide(a);w3c_slidy.slide_number=w3c_slidy.find_slide_number(c);a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.last_shown=null;w3c_slidy.set_location();w3c_slidy.set_visibility_all_incremental("hidden");w3c_slidy.set_eos_status(!w3c_slidy.next_incremental_item(w3c_slidy.last_shown));w3c_slidy.show_slide(a);try{if(!w3c_slidy.opera){w3c_slidy.help_anchor.focus()}}catch(f){}}w3c_slidy.hide_table_of_contents(true);if(self.ie7){w3c_slidy.ie_hack()}return w3c_slidy.cancel(d)}if(b==40&&this.next){this.next.focus();return w3c_slidy.cancel(d)}if(b==38&&this.previous){this.previous.focus();return w3c_slidy.cancel(d)}return true},before_print:function(){this.show_all_slides();this.hide_toolbar();alert("before print")},after_print:function(){if(!this.view_all){this.single_slide_view();this.show_toolbar()}alert("after print")},print_slides:function(){this.before_print();window.print();this.after_print()},toggle_view:function(){if(this.view_all){this.single_slide_view();this.show_toolbar();this.view_all=0}else{this.show_all_slides();this.hide_toolbar();this.view_all=1}},show_all_slides:function(){this.remove_class(document.body,"single_slide");this.set_visibility_all_incremental("visible")},single_slide_view:function(){this.add_class(document.body,"single_slide");this.set_visibility_all_incremental("visible");this.last_shown=this.previous_incremental_item(null)},hide_image_toolbar:function(){if(!this.ns_pos){var a=document.getElementsByTagName("IMG");for(var b=0;b<a.length;++b){a[b].setAttribute("galleryimg","no")}}},unloaded:function(a){},is_KHTML:function(){var a=navigator.userAgent;return(a.indexOf("KHTML")>=0?true:false)},slide_name:function(c){var b=null;var a=this.slides[c];var d=this.find_heading(a);if(d){b=this.extract_text(d)}if(!b){b=this.title+"("+(c+1)+")"}b.replace(/\&/g,"&amp;");b.replace(/\</g,"&lt;");b.replace(/\>/g,"&gt;");return b},find_heading:function(a){if(!a||a.nodeType!=1){return null}if(a.nodeName=="H1"||a.nodeName=="h1"){return a}var b=a.firstChild;while(b){a=this.find_heading(b);if(a){return a}b=b.nextSibling}return null},extract_text:function(a){if(!a){return""}if(a.nodeType==3){return a.nodeValue}if(a.nodeType==1){a=a.firstChild;var b="";while(a){b=b+this.extract_text(a);a=a.nextSibling}return b}return""},find_copyright:function(){var a,c;var d=document.getElementsByTagName("meta");for(var b=0;b<d.length;++b){a=d[b].getAttribute("name");c=d[b].getAttribute("content");if(a=="copyright"){return c}}return null},find_size_adjust:function(){var a,c,e;var d=document.getElementsByTagName("meta");for(var b=0;b<d.length;++b){a=d[b].getAttribute("name");c=d[b].getAttribute("content");if(a=="font-size-adjustment"){return 1*c}}return 1},find_duration:function(){var a,c,e;var d=document.getElementsByTagName("meta");for(var b=0;b<d.length;++b){a=d[b].getAttribute("name");c=d[b].getAttribute("content");if(a=="duration"){return 60000*c}}return null},replace_by_non_breaking_space:function(b){for(var a=0;a<b.length;++a){b[a]=160}},init_outliner:function(){var a=document.getElementsByTagName("li");for(var b=0;b<a.length;++b){var c=a[b];if(!this.has_class(c.parentNode,"outline")){continue}c.onclick=this.outline_click;if(this.foldable(c)){c.foldable=true;c.onfocus=function(){w3c_slidy.outline=this};c.onblur=function(){w3c_slidy.outline=null};if(!c.getAttribute("tabindex")){c.setAttribute("tabindex","0")}if(this.has_class(c,"expand")){this.unfold(c)}else{this.fold(c)}}else{this.add_class(c,"nofold");c.visible=true;c.foldable=false}}},foldable:function(b){if(!b||b.nodeType!=1){return false}var a=b.firstChild;while(a){if(a.nodeType==1&&this.is_block(a)){return true}a=a.nextSibling}return false},fold:function(b){if(b){this.remove_class(b,"unfolded");this.add_class(b,"folded")}var a=b?b.firstChild:null;while(a){if(a.nodeType==1&&this.is_block(a)){w3c_slidy.add_class(a,"hidden")}a=a.nextSibling}b.visible=false},unfold:function(b){if(b){this.add_class(b,"unfolded");this.remove_class(b,"folded")}var a=b?b.firstChild:null;while(a){if(a.nodeType==1&&this.is_block(a)){w3c_slidy.remove_class(a,"hidden")}a=a.nextSibling}b.visible=true},outline_click:function(c){if(!c){c=window.event}var a=false;var b=w3c_slidy.get_target(c);while(b&&b.visible==undefined){b=b.parentNode}if(!b){return true}if(c.which){a=(c.which==3)}else{if(c.button){a=(c.button==2)}}if(!a&&b.visible!=undefined){if(b.foldable){if(b.visible){w3c_slidy.fold(b)}else{w3c_slidy.unfold(b)}}w3c_slidy.stop_propagation(c);c.cancel=true;c.returnValue=false}return false},add_initial_prompt:function(){var a=this.create_element("div");a.setAttribute("class","initial_prompt");var b=this.create_element("p");a.appendChild(b);b.setAttribute("class","help");if(this.keyboardless){b.innerHTML="Tap footer to move to next slide"}else{b.innerHTML="Space or Right Arrow to move to next slide, click help below for more details"}this.add_listener(a,"click",function(c){document.body.removeChild(a);w3c_slidy.stop_propagation(c);if(c.cancel!=undefined){c.cancel=true}if(c.returnValue!=undefined){c.returnValue=false}return false});document.body.appendChild(a);this.initial_prompt=a;setTimeout(function(){document.body.removeChild(a)},5000)},add_toolbar:function(){var a,i;this.toolbar=this.create_element("div");this.toolbar.setAttribute("class","toolbar");if(this.ns_pos||!this.ie6){var k=this.create_element("div");k.setAttribute("style","float: right; text-align: right");a=this.create_element("span");a.innerHTML=this.localize("slide")+" n/m";k.appendChild(a);this.toolbar.appendChild(k);var e=this.create_element("div");e.setAttribute("style","text-align: left");this.eos=this.create_element("span");this.eos.innerHTML="* ";e.appendChild(this.eos);var g=this.create_element("a");g.setAttribute("href",this.help_page);g.setAttribute("title",this.localize(this.help_text));g.innerHTML=this.localize("help?");e.appendChild(g);this.help_anchor=g;var d=document.createTextNode(" ");e.appendChild(d);var f=this.create_element("a");f.setAttribute("href","javascript:w3c_slidy.toggle_table_of_contents()");f.setAttribute("title",this.localize("table of contents"));f.innerHTML=this.localize("contents?");e.appendChild(f);var b=document.createTextNode(" ");e.appendChild(b);var h=this.find_copyright();if(h){var j=this.create_element("span");j.className="copyright";j.innerHTML=h;e.appendChild(j)}this.toolbar.setAttribute("tabindex","0");this.toolbar.appendChild(e)}else{this.toolbar.style.position=(this.ie7?"fixed":"absolute");this.toolbar.style.zIndex="200";this.toolbar.style.width="99.9%";this.toolbar.style.height="1.2em";this.toolbar.style.top="auto";this.toolbar.style.bottom="0";this.toolbar.style.left="0";this.toolbar.style.right="0";this.toolbar.style.textAlign="left";this.toolbar.style.fontSize="60%";this.toolbar.style.color="red";this.toolbar.borderWidth=0;this.toolbar.className="toolbar";this.toolbar.style.background="rgb(240,240,240)";var c=this.create_element("span");c.innerHTML="&nbsp;&nbsp;*&nbsp;";this.toolbar.appendChild(c);this.eos=c;var g=this.create_element("a");g.setAttribute("href",this.help_page);g.setAttribute("title",this.localize(this.help_text));g.innerHTML=this.localize("help?");this.toolbar.appendChild(g);this.help_anchor=g;var d=document.createTextNode(" ");this.toolbar.appendChild(d);var f=this.create_element("a");f.setAttribute("href","javascript:toggleTableOfContents()");f.setAttribute("title",this.localize("table of contents".localize));f.innerHTML=this.localize("contents?");this.toolbar.appendChild(f);var b=document.createTextNode(" ");this.toolbar.appendChild(b);var h=this.find_copyright();if(h){var j=this.create_element("span");j.innerHTML=h;j.style.color="black";j.style.marginLeft="0.5em";this.toolbar.appendChild(j)}a=this.create_element("div");a.style.position="absolute";a.style.width="auto";a.style.height="1.2em";a.style.top="auto";a.style.bottom=0;a.style.right="0";a.style.textAlign="right";a.style.color="red";a.style.background="rgb(240,240,240)";a.innerHTML=this.localize("slide")+" n/m";this.toolbar.appendChild(a)}this.toolbar.onclick=function(m){if(!m){m=window.event}var l=m.target;if(!l&&m.srcElement){l=m.srcElement}if(l&&l.nodeType==3){l=l.parentNode}w3c_slidy.stop_propagation(m);if(l&&l.nodeName.toLowerCase()!="a"){w3c_slidy.mouse_button_click(m)}};this.slide_number_element=a;this.set_eos_status(false);document.body.appendChild(this.toolbar)},wrap_implicit_slides:function(){var a,d,c,b,f;var e=document.getElementsByTagName("h1");if(!e){return}for(a=0;a<e.length;++a){d=e[a];if(d.parentNode!=document.body){continue}c=d.nextSibling;f=document.createElement("div");this.add_class(f,"slide");document.body.replaceChild(f,d);f.appendChild(d);while(c){if(c.nodeType==1&&(c.nodeName=="H1"||c.nodeName=="h1"||c.nodeName=="DIV"||c.nodeName=="div")){break}b=c.nextSibling;c=document.body.removeChild(c);f.appendChild(c);c=b}}},collect_slides:function(){var e=new Array();var d=document.body.getElementsByTagName("div");for(var c=0;c<d.length;++c){div=d.item(c);if(this.has_class(div,"slide")){e[e.length]=div;this.add_class(div,"hidden");var b=document.createElement("br");div.appendChild(b);var a=document.createElement("br");div.appendChild(a)}else{if(this.has_class(div,"background")){div.style.display="block"}}}this.slides=e},collect_notes:function(){var b=new Array();var c=document.body.getElementsByTagName("div");for(var a=0;a<c.length;++a){div=c.item(a);if(this.has_class(div,"handout")){b[b.length]=div;this.add_class(div,"hidden")}}this.notes=b},collect_backgrounds:function(){var c=new Array();var b=document.body.getElementsByTagName("div");for(var a=0;a<b.length;++a){div=b.item(a);if(this.has_class(div,"background")){c[c.length]=div;this.add_class(div,"hidden")}}this.backgrounds=c},patch_anchors:function(){var a=w3c_slidy;var c=function(g){if(a.page_address(this.href)==a.page_address(location.href)){var f=a.find_slide_number(this.href);if(f!=a.slide_number){var e=a.slides[a.slide_number];a.hide_slide(e);a.slide_number=f;e=a.slides[a.slide_number];a.show_slide(e);a.set_location()}}else{w3c_slidy.stop_propagation(g)}this.blur();a.disable_slide_click=true};var d=document.body.getElementsByTagName("a");for(var b=0;b<d.length;++b){if(window.addEventListener){d[b].addEventListener("click",c,false)}else{d[b].attachEvent("onclick",c)}}},show_slide_number:function(){var a=w3c_slidy.get_timer();w3c_slidy.slide_number_element.innerHTML=a+w3c_slidy.localize("slide")+" "+(w3c_slidy.slide_number+1)+"/"+w3c_slidy.slides.length},check_location:function(){var b=location.hash;if(w3c_slidy.slide_number>0&&(b==""||b=="#")){w3c_slidy.goto_slide(0)}else{if(b.length>2&&b!="#("+(w3c_slidy.slide_number+1)+")"){var a=parseInt(location.hash.substr(2));if(!isNaN(a)){w3c_slidy.goto_slide(a-1)}}}if(w3c_slidy.time_left&&w3c_slidy.slide_number>0){w3c_slidy.show_slide_number();if(w3c_slidy.time_left>0){w3c_slidy.time_left-=200}}},get_timer:function(){var c="";if(w3c_slidy.time_left){var b,a;a=Math.floor(w3c_slidy.time_left/1000);b=Math.floor(a/60);a=a%60;c=(b?b+"m":"")+a+"s "}return c},set_location:function(){var a=w3c_slidy.page_address(location.href);var b="#("+(w3c_slidy.slide_number+1)+")";if(w3c_slidy.slide_number>=0){a=a+b}if(w3c_slidy.ie&&(w3c_slidy.ie6||w3c_slidy.ie7)){w3c_slidy.push_hash(b)}if(a!=location.href){location.href=a}if(this.khtml){b="("+(w3c_slidy.slide_number+1)+")"}if(!this.ie&&location.hash!=b&&location.hash!=""){location.hash=b}document.title=w3c_slidy.title+" ("+(w3c_slidy.slide_number+1)+")";w3c_slidy.show_slide_number()},page_address:function(b){var a=b.indexOf("#");if(a<0){a=b.indexOf("%23")}if(a<0){return b}return b.substr(0,a)},on_frame_loaded:function(b){location.hash=b;var a=w3c_slidy.page_address(location.href);location.href=a+b},push_hash:function(b){if(b==""){b="#(1)"}window.location.hash=b;var a=document.getElementById("historyFrame").contentWindow.document;a.open("javascript:'<html></html>'");a.write('<html><head><script type="text/javascript">window.parent.w3c_slidy.on_frame_loaded(\''+(b)+"');\74/script></head><body>hello mum</body></html>");a.close()},find_slide_number:function(e){var c=e.indexOf("#");if(c<0){return 0}var b=unescape(e.substr(c+1));var f=document.getElementById(b);if(!f){var d=/\((\d)+\)/;if(b.match(d)){var a=parseInt(b.substring(1,b.length-1));if(a>this.slides.length){a=1}if(--a<0){a=0}return a}d=/\[(\d)+\]/;if(b.match(d)){var a=parseInt(b.substring(1,b.length-1));if(a>this.slides.length){a=1}if(--a<0){a=0}return a}return 0}while(true){if(f.nodeName.toLowerCase()=="div"&&this.has_class(f,"slide")){break}f=f.parentNode;if(!f){return 0}}for(c=0;c<slides.length;++c){if(slides[c]==f){return c}}return 0},previous_slide:function(b){if(!w3c_slidy.view_all){var a;if((b||w3c_slidy.slide_number==0)&&w3c_slidy.last_shown!=null){w3c_slidy.last_shown=w3c_slidy.hide_previous_item(w3c_slidy.last_shown);w3c_slidy.set_eos_status(false)}else{if(w3c_slidy.slide_number>0){a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.hide_slide(a);w3c_slidy.slide_number=w3c_slidy.slide_number-1;a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.set_visibility_all_incremental("visible");w3c_slidy.last_shown=w3c_slidy.previous_incremental_item(null);w3c_slidy.set_eos_status(true);w3c_slidy.show_slide(a)}}w3c_slidy.set_location();if(!w3c_slidy.ns_pos){w3c_slidy.refresh_toolbar(200)}}},next_slide:function(c){if(!w3c_slidy.view_all){var a,b=w3c_slidy.last_shown;if(c||w3c_slidy.slide_number==w3c_slidy.slides.length-1){w3c_slidy.last_shown=w3c_slidy.reveal_next_item(w3c_slidy.last_shown)}if((!c||w3c_slidy.last_shown==null)&&w3c_slidy.slide_number<w3c_slidy.slides.length-1){a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.hide_slide(a);w3c_slidy.slide_number=w3c_slidy.slide_number+1;a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.last_shown=null;w3c_slidy.set_visibility_all_incremental("hidden");w3c_slidy.show_slide(a)}else{if(!w3c_slidy.last_shown){if(b&&c){w3c_slidy.last_shown=b}}}w3c_slidy.set_location();w3c_slidy.set_eos_status(!w3c_slidy.next_incremental_item(w3c_slidy.last_shown));if(!w3c_slidy.ns_pos){w3c_slidy.refresh_toolbar(200)}}},first_slide:function(){if(!w3c_slidy.view_all){var a;if(w3c_slidy.slide_number!=0){a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.hide_slide(a);w3c_slidy.slide_number=0;a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.last_shown=null;w3c_slidy.set_visibility_all_incremental("hidden");w3c_slidy.show_slide(a)}w3c_slidy.set_eos_status(!w3c_slidy.next_incremental_item(w3c_slidy.last_shown));w3c_slidy.set_location()}},last_slide:function(){if(!w3c_slidy.view_all){var a;w3c_slidy.last_shown=null;if(w3c_slidy.last_shown==null&&w3c_slidy.slide_number<w3c_slidy.slides.length-1){a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.hide_slide(a);w3c_slidy.slide_number=w3c_slidy.slides.length-1;a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.set_visibility_all_incremental("visible");w3c_slidy.last_shown=w3c_slidy.previous_incremental_item(null);w3c_slidy.show_slide(a)}else{w3c_slidy.set_visibility_all_incremental("visible");w3c_slidy.last_shown=w3c_slidy.previous_incremental_item(null)}w3c_slidy.set_eos_status(true);w3c_slidy.set_location()}},set_eos_status:function(a){if(this.eos){this.eos.style.color=(a?"rgb(240,240,240)":"red")}},goto_slide:function(b){var a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.hide_slide(a);w3c_slidy.slide_number=b;a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.last_shown=null;w3c_slidy.set_visibility_all_incremental("hidden");w3c_slidy.set_eos_status(!w3c_slidy.next_incremental_item(w3c_slidy.last_shown));document.title=w3c_slidy.title+" ("+(w3c_slidy.slide_number+1)+")";w3c_slidy.show_slide(a);w3c_slidy.show_slide_number()},show_slide:function(a){this.sync_background(a);window.scrollTo(0,0);this.remove_class(a,"hidden")},hide_slide:function(a){this.add_class(a,"hidden")},sync_background:function(a){var e;var g;if(a.currentStyle){g=a.currentStyle.backgroundColor}else{if(document.defaultView){var f=document.defaultView.getComputedStyle(a,null);if(f){g=f.getPropertyValue("background-color")}else{g="transparent"}}else{g=="transparent"}}if(g=="transparent"||g.indexOf("rgba")>=0||g.indexOf("opacity")>=0){var c=this.get_class_list(a);for(var d=0;d<this.backgrounds.length;d++){e=this.backgrounds[d];var b=this.get_class_list(e);if(this.matching_background(c,b)){this.remove_class(e,"hidden")}else{this.add_class(e,"hidden")}}}else{this.hide_backgrounds()}},hide_backgrounds:function(){for(var a=0;a<this.backgrounds.length;a++){background=this.backgrounds[a];this.add_class(background,"hidden")}},matching_background:function(c,b){var d,e,f,a;f=/\w+/g;a=b.match(f);for(d=e=0;d<a.length;d++){if(a[d]=="hidden"){continue}if(a[d]=="background"){continue}++e}if(e==0){return true}a=c.match(f);for(d=e=0;d<a.length;d++){if(a[d]=="hidden"){continue}if(this.has_token(b,a[d])){return true}}return false},resized:function(){var c=0;if(typeof(window.innerWidth)=="number"){c=window.innerWidth}else{if(document.documentElement&&document.documentElement.clientWidth){c=document.documentElement.clientWidth}else{if(document.body&&document.body.clientWidth){c=document.body.clientWidth}}}var b=0;if(typeof(window.innerHeight)=="number"){b=window.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientHeight}else{if(document.body&&document.body.clientHeight){b=document.body.clientHeight}}}if(b&&(c/b>1.05*1024/768)){c=b*1024/768}if(c!=w3c_slidy.last_width||b!=w3c_slidy.last_height){if(c>=1100){w3c_slidy.size_index=5}else{if(c>=1000){w3c_slidy.size_index=4}else{if(c>=800){w3c_slidy.size_index=3}else{if(c>=600){w3c_slidy.size_index=2}else{if(c){w3c_slidy.size_index=0}}}}}if(0<=w3c_slidy.size_index+w3c_slidy.size_adjustment&&w3c_slidy.size_index+w3c_slidy.size_adjustment<w3c_slidy.sizes.length){w3c_slidy.size_index=w3c_slidy.size_index+w3c_slidy.size_adjustment}w3c_slidy.adjust_object_dimensions(c,b);if(document.body.style.fontSize!=w3c_slidy.sizes[w3c_slidy.size_index]){document.body.style.fontSize=w3c_slidy.sizes[w3c_slidy.size_index]}w3c_slidy.last_width=c;w3c_slidy.last_height=b;if(w3c_slidy.ns_pos){var a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.hide_slide(a);w3c_slidy.show_slide(a)}w3c_slidy.refresh_toolbar(200)}},scrolled:function(){if(w3c_slidy.toolbar&&!w3c_slidy.ns_pos&&!w3c_slidy.ie7){w3c_slidy.hack_offset=w3c_slidy.scroll_x_offset();w3c_slidy.toolbar.style.display="none";if(w3c_slidy.scrollhack==0&&!w3c_slidy.view_all){setTimeout(function(){w3c_slidy.show_toolbar()},1000);w3c_slidy.scrollhack=1}}},hide_toolbar:function(){w3c_slidy.add_class(w3c_slidy.toolbar,"hidden");window.focus()},refresh_toolbar:function(a){if(!w3c_slidy.ns_pos&&!w3c_slidy.ie7){w3c_slidy.hide_toolbar();setTimeout(function(){w3c_slidy.show_toolbar()},a)}},show_toolbar:function(){if(w3c_slidy.want_toolbar){w3c_slidy.toolbar.style.display="block";if(!w3c_slidy.ns_pos){var b=w3c_slidy.scroll_x_offset();w3c_slidy.toolbar.style.left=b;w3c_slidy.toolbar.style.right=b;w3c_slidy.toolbar.style.bottom=0}w3c_slidy.remove_class(w3c_slidy.toolbar,"hidden")}w3c_slidy.scrollhack=0;try{if(!w3c_slidy.opera){w3c_slidy.help_anchor.focus()}}catch(a){}},toggle_toolbar:function(){if(!w3c_slidy.view_all){if(w3c_slidy.has_class(w3c_slidy.toolbar,"hidden")){w3c_slidy.remove_class(w3c_slidy.toolbar,"hidden");w3c_slidy.want_toolbar=1}else{w3c_slidy.add_class(w3c_slidy.toolbar,"hidden");w3c_slidy.want_toolbar=0}}},scroll_x_offset:function(){if(window.pageXOffset){return self.pageXOffset}if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft}if(document.body){return document.body.scrollLeft}return 0},scroll_y_offset:function(){if(window.pageYOffset){return self.pageYOffset}if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop}if(document.body){return document.body.scrollTop}return 0},optimize_font_size:function(){var a=w3c_slidy.slides[w3c_slidy.slide_number];var d=a.scrollHeight;var b=getWindowHeight();var c=100*d/b;alert("window utilization = "+c+"% (doc "+d+" win "+b+")")},get_doc_height:function(a){if(!a){a=document}if(a&&a.body&&a.body.offsetHeight){return a.body.offsetHeight}if(a&&a.body&&a.body.scrollHeight){return a.body.scrollHeight}alert("couldn't determine document height")},get_window_height:function(){if(typeof(window.innerHeight)=="number"){return window.innerHeight}if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight}if(document.body&&document.body.clientHeight){return document.body.clientHeight}},document_height:function(){var a,b;a=document.body.scrollHeight;b=document.body.offsetHeight;if(a&&b){return(a>b?a:b)}return 0},smaller:function(){if(w3c_slidy.size_index>0){--w3c_slidy.size_index}w3c_slidy.toolbar.style.display="none";document.body.style.fontSize=w3c_slidy.sizes[w3c_slidy.size_index];var a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.hide_slide(a);w3c_slidy.show_slide(a);setTimeout(function(){w3c_slidy.show_toolbar()},50)},bigger:function(){if(w3c_slidy.size_index<w3c_slidy.sizes.length-1){++w3c_slidy.size_index}w3c_slidy.toolbar.style.display="none";document.body.style.fontSize=w3c_slidy.sizes[w3c_slidy.size_index];var a=w3c_slidy.slides[w3c_slidy.slide_number];w3c_slidy.hide_slide(a);w3c_slidy.show_slide(a);setTimeout(function(){w3c_slidy.show_toolbar()},50)},adjust_object_dimensions:function(c,k){for(var e=0;e<w3c_slidy.objects.length;e++){var d=this.objects[e];var b=d.getAttribute("type");if(b=="image/svg+xml"||b=="application/x-shockwave-flash"){if(!d.initialWidth){d.initialWidth=d.getAttribute("width")}if(!d.initialHeight){d.initialHeight=d.getAttribute("height")}if(d.initialWidth&&d.initialWidth.charAt(d.initialWidth.length-1)=="%"){var j=parseInt(d.initialWidth.slice(0,d.initialWidth.length-1));var a=c*(j/100);d.setAttribute("width",a)}if(d.initialHeight&&d.initialHeight.charAt(d.initialHeight.length-1)=="%"){var f=parseInt(d.initialHeight.slice(0,d.initialHeight.length-1));var g=k*(f/100);d.setAttribute("height",g)}}}},key_press:function(a){if(!a){a=window.event}if(!w3c_slidy.key_wanted){return w3c_slidy.cancel(a)}return true},key_down:function(d){var c,e,a;w3c_slidy.key_wanted=true;if(!d){d=window.event}if(window.event){c=window.event.keyCode;e=window.event.srcElement}else{if(d.which){c=d.which;e=d.target}else{return true}}if(!c){return true}if(!w3c_slidy.slidy_chrome(e)&&w3c_slidy.special_element(e)){return true}if(d.ctrlKey||d.altKey||d.metaKey){return true}if(w3c_slidy.is_shown_toc()&&c!=9&&c!=16&&c!=38&&c!=40){w3c_slidy.hide_table_of_contents(true);if(c==27||c==84||c==67){return w3c_slidy.cancel(d)}}if(c==34){if(w3c_slidy.view_all){return true}w3c_slidy.next_slide(false);return w3c_slidy.cancel(d)}else{if(c==33){if(w3c_slidy.view_all){return true}w3c_slidy.previous_slide(false);return w3c_slidy.cancel(d)}else{if(c==32){w3c_slidy.next_slide(true);return w3c_slidy.cancel(d)}else{if(c==37){w3c_slidy.previous_slide(!d.shiftKey);return w3c_slidy.cancel(d)}else{if(c==36){w3c_slidy.first_slide();return w3c_slidy.cancel(d)}else{if(c==35){w3c_slidy.last_slide();return w3c_slidy.cancel(d)}else{if(c==39){w3c_slidy.next_slide(!d.shiftKey);return w3c_slidy.cancel(d)}else{if(c==13){if(w3c_slidy.outline){if(w3c_slidy.outline.visible){w3c_slidy.fold(w3c_slidy.outline)}else{w3c_slidy.unfold(w3c_slidy.outline)}return w3c_slidy.cancel(d)}}else{if(c==188){w3c_slidy.smaller();return w3c_slidy.cancel(d)}else{if(c==190){w3c_slidy.bigger();return w3c_slidy.cancel(d)}else{if(c==189||c==109){w3c_slidy.smaller();return w3c_slidy.cancel(d)}else{if(c==187||c==191||c==107){w3c_slidy.bigger();return w3c_slidy.cancel(d)}else{if(c==83){w3c_slidy.smaller();return w3c_slidy.cancel(d)}else{if(c==66){w3c_slidy.bigger();return w3c_slidy.cancel(d)}else{if(c==90){w3c_slidy.last_slide();return w3c_slidy.cancel(d)}else{if(c==70){w3c_slidy.toggle_toolbar();return w3c_slidy.cancel(d)}else{if(c==65){w3c_slidy.toggle_view();return w3c_slidy.cancel(d)}else{if(c==75){w3c_slidy.mouse_click_enabled=!w3c_slidy.mouse_click_enabled;var b=(w3c_slidy.mouse_click_enabled?"enabled":"disabled")+" mouse click advance";alert(w3c_slidy.localize(b));return w3c_slidy.cancel(d)}else{if(c==84||c==67){if(w3c_slidy.toc){w3c_slidy.toggle_table_of_contents()}return w3c_slidy.cancel(d)}else{if(c==72){window.location=w3c_slidy.help_page;return w3c_slidy.cancel(d)}}}}}}}}}}}}}}}}}}}}return true},create_element:function(a){if(this.xhtml&&(typeof document.createElementNS!="undefined")){return document.createElementNS("http://www.w3.org/1999/xhtml",a)}return document.createElement(a)},get_element_style:function(d,b,c){if(d.currentStyle){return d.currentStyle[b]}else{if(window.getComputedStyle){var a=window.getComputedStyle(d,"");return a.getPropertyValue(c)}}return""},has_token:function(e,c){if(e){var d=/\w+/g;var a=e.match(d);for(var b=0;b<a.length;b++){if(a[b]==c){return true}}}return false},get_class_list:function(a){if(typeof a.className!="undefined"){return a.className}return a.getAttribute("class")},has_class:function(b,a){if(b.nodeType!=1){return false}var c=new RegExp("(^| )"+a+"W*");if(typeof b.className!="undefined"){return c.test(b.className)}return c.test(b.getAttribute("class"))},remove_class:function(b,a){var d=new RegExp("(^| )"+a+"W*");var c="";if(typeof b.className!="undefined"){c=b.className;if(c){c=c.replace(d,"");b.className=c}}else{c=b.getAttribute("class");if(c){c=c.replace(d,"");b.setAttribute("class",c)}}},add_class:function(b,a){if(!this.has_class(b,a)){if(typeof b.className!="undefined"){b.className+=" "+a}else{var c=b.getAttribute("class");c=c?c+" "+a:a;b.setAttribute("class",c)}}},incremental_elements:null,okay_for_incremental:function(a){if(!this.incremental_elements){var b=new Array();b.p=true;b.pre=true;b.li=true;b.blockquote=true;b.dt=true;b.dd=true;b.h2=true;b.h3=true;b.h4=true;b.h5=true;b.h6=true;b.span=true;b.address=true;b.table=true;b.tr=true;b.th=true;b.td=true;b.img=true;b.object=true;this.incremental_elements=b}return this.incremental_elements[a.toLowerCase()]},next_incremental_item:function(c){var b=this.is_xhtml?"br":"BR";var a=w3c_slidy.slides[w3c_slidy.slide_number];for(;;){c=w3c_slidy.next_node(a,c);if(c==null||c.parentNode==null){break}if(c.nodeType==1){if(c.nodeName==b){continue}if(w3c_slidy.has_class(c,"incremental")&&w3c_slidy.okay_for_incremental(c.nodeName)){return c}if(w3c_slidy.has_class(c.parentNode,"incremental")&&!w3c_slidy.has_class(c,"non-incremental")){return c}}}return c},previous_incremental_item:function(c){var b=this.is_xhtml?"br":"BR";var a=w3c_slidy.slides[w3c_slidy.slide_number];for(;;){c=w3c_slidy.previous_node(a,c);if(c==null||c.parentNode==null){break}if(c.nodeType==1){if(c.nodeName==b){continue}if(w3c_slidy.has_class(c,"incremental")&&w3c_slidy.okay_for_incremental(c.nodeName)){return c}if(w3c_slidy.has_class(c.parentNode,"incremental")&&!w3c_slidy.has_class(c,"non-incremental")){return c}}}return c},set_visibility_all_incremental:function(b){var a=this.next_incremental_item(null);if(b=="hidden"){while(a){w3c_slidy.add_class(a,"invisible");a=w3c_slidy.next_incremental_item(a)}}else{while(a){w3c_slidy.remove_class(a,"invisible");a=w3c_slidy.next_incremental_item(a)}}},reveal_next_item:function(a){a=w3c_slidy.next_incremental_item(a);if(a&&a.nodeType==1){w3c_slidy.remove_class(a,"invisible")}return a},hide_previous_item:function(a){if(a&&a.nodeType==1){w3c_slidy.add_class(a,"invisible")}return this.previous_incremental_item(a)},next_node:function(a,b){if(b==null){return a.firstChild}if(b.firstChild){return b.firstChild}if(b.nextSibling){return b.nextSibling}for(;;){b=b.parentNode;if(!b||b==a){break}if(b&&b.nextSibling){return b.nextSibling}}return null},previous_node:function(a,b){if(b==null){b=a.lastChild;if(b){while(b.lastChild){b=b.lastChild}}return b}if(b.previousSibling){b=b.previousSibling;while(b.lastChild){b=b.lastChild}return b}if(b.parentNode!=a){return b.parentNode}return null},previous_sibling_element:function(a){a=a.previousSibling;while(a&&a.nodeType!=1){a=a.previousSibling}return a},next_sibling_element:function(a){a=a.nextSibling;while(a&&a.nodeType!=1){a=a.nextSibling}return a},first_child_element:function(a){var b;for(b=a.firstChild;b;b=b.nextSibling){if(b.nodeType==1){break}}return b},first_tag:function(b,a){var c;if(!this.is_xhtml){a=a.toUpperCase()}for(c=b.firstChild;c;c=c.nextSibling){if(c.nodeType==1&&c.nodeName==a){break}}return c},hide_selection:function(){if(window.getSelection){var b=window.getSelection();if(b.rangeCount>0){var a=b.getRangeAt(0);a.collapse(false)}}else{var c=document.selection.createRange();c.collapse(false)}},get_selected_text:function(){try{if(window.getSelection){return window.getSelection().toString()}if(document.getSelection){return document.getSelection().toString()}if(document.selection){return document.selection.createRange().text}}catch(a){}return""},mouse_button_up:function(a){w3c_slidy.selected_text_len=w3c_slidy.get_selected_text().length},mouse_button_click:function(g){var c=false;var b=false;var d=false;var f;if(!g){var g=window.event}if(g.target){f=g.target}else{if(g.srcElement){f=g.srcElement}}if(f.nodeType==3){f=f.parentNode}if(g.which){b=(g.which==1);d=(g.which==2);c=(g.which==3)}else{if(g.button){if(g.button==4){d=true}c=(g.button==2)}else{b=true}}if(w3c_slidy.selected_text_len>0){w3c_slidy.stop_propagation(g);g.cancel=true;g.returnValue=false;return false}w3c_slidy.hide_table_of_contents(false);var a=f.nodeName.toLowerCase();if(w3c_slidy.mouse_click_enabled&&b&&!w3c_slidy.special_element(f)&&!f.onclick){w3c_slidy.next_slide(true);w3c_slidy.stop_propagation(g);g.cancel=true;g.returnValue=false;return false}return true},special_element:function(b){var a=b.nodeName.toLowerCase();return b.onkeydown||b.onclick||a=="a"||a=="embed"||a=="object"||a=="video"||a=="audio"||a=="input"||a=="textarea"||a=="select"||a=="option"},slidy_chrome:function(a){while(a){if(a==w3c_slidy.toc||a==w3c_slidy.toolbar||w3c_slidy.has_class(a,"outline")){return true}a=a.parentNode}return false},get_key:function(b){var a;if(typeof window.event!="undefined"){a=window.event.keyCode}else{if(b.which){a=b.which}}return a},get_target:function(b){var a;if(!b){b=window.event}if(b.target){a=b.target}else{if(b.srcElement){a=b.srcElement}}if(a.nodeType!=1){a=a.parentNode}return a},is_block:function(b){var a=b.nodeName.toLowerCase();return a=="ol"||a=="ul"||a=="p"||a=="li"||a=="table"||a=="pre"||a=="h1"||a=="h2"||a=="h3"||a=="h4"||a=="h5"||a=="h6"||a=="blockquote"||a=="address"},add_listener:function(a,c,b){if(window.addEventListener){a.addEventListener(c,b,false)}else{a.attachEvent("on"+c,b)}},stop_propagation:function(a){a=a?a:window.event;a.cancelBubble=true;if(a.stopPropagation){a.stopPropagation()}return true},cancel:function(a){if(a){a.cancel=true;a.returnValue=false;if(a.preventDefault){a.preventDefault()}}w3c_slidy.key_wanted=false;return false},strings_es:{slide:"pág.","help?":"Ayuda","contents?":"Índice","table of contents":"tabla de contenidos","Table of Contents":"Tabla de Contenidos","restart presentation":"Reiniciar presentación","restart?":"Inicio"},help_es:"Utilice el ratón, barra espaciadora, teclas Izda/Dcha, o Re pág y Av pág. Use S y B para cambiar el tamaño de fuente.",strings_ca:{slide:"pàg..","help?":"Ajuda","contents?":"Índex","table of contents":"taula de continguts","Table of Contents":"Taula de Continguts","restart presentation":"Reiniciar presentació","restart?":"Inici"},help_ca:"Utilitzi el ratolí, barra espaiadora, tecles Esq./Dta. o Re pàg y Av pàg. Usi S i B per canviar grandària de font.",strings_cs:{slide:"snímek","help?":"nápověda","contents?":"obsah","table of contents":"obsah prezentace","Table of Contents":"Obsah prezentace","restart presentation":"znovu spustit prezentaci","restart?":"restart"},help_cs:"Prezentaci můžete procházet pomocí kliknutí myši, mezerníku, šipek vlevo a vpravo nebo kláves PageUp a PageDown. Písmo se dá zvětšit a zmenšit pomocí kláves B a S.",strings_nl:{slide:"pagina","help?":"Help?","contents?":"Inhoud?","table of contents":"inhoudsopgave","Table of Contents":"Inhoudsopgave","restart presentation":"herstart presentatie","restart?":"Herstart?"},help_nl:"Navigeer d.m.v. het muis, spatiebar, Links/Rechts toetsen, of PgUp en PgDn. Gebruik S en B om de karaktergrootte te veranderen.",strings_de:{slide:"Seite","help?":"Hilfe","contents?":"Übersicht","table of contents":"Inhaltsverzeichnis","Table of Contents":"Inhaltsverzeichnis","restart presentation":"Präsentation neu starten","restart?":"Neustart"},help_de:"Benutzen Sie die Maus, Leerschlag, die Cursortasten links/rechts oder Page up/Page Down zum Wechseln der Seiten und S und B für die Schriftgrösse.",strings_pl:{slide:"slajd","help?":"pomoc?","contents?":"spis treści?","table of contents":"spis treści","Table of Contents":"Spis Treści","restart presentation":"Restartuj prezentację","restart?":"restart?"},help_pl:"Zmieniaj slajdy klikając myszą, naciskając spację, strzałki lewo/prawolub PgUp / PgDn. Użyj klawiszy S i B, aby zmienić rozmiar czczionki.",strings_fr:{slide:"page","help?":"Aide","contents?":"Index","table of contents":"table des matières","Table of Contents":"Table des matières","restart presentation":"Recommencer l'exposé","restart?":"Début"},help_fr:"Naviguez avec la souris, la barre d'espace, les flèches gauche/droite ou les touches Pg Up, Pg Dn. Utilisez les touches S et B pour modifier la taille de la police.",strings_hu:{slide:"oldal","help?":"segítség","contents?":"tartalom","table of contents":"tartalomjegyzék","Table of Contents":"Tartalomjegyzék","restart presentation":"bemutató újraindítása","restart?":"újraindítás"},help_hu:"Az oldalak közti lépkedéshez kattintson az egérrel, vagy használja a szóköz, a bal, vagy a jobb nyíl, illetve a Page Down, Page Up billentyűket. Az S és a B billentyűkkel változtathatja a szöveg méretét.",strings_it:{slide:"pag.","help?":"Aiuto","contents?":"Indice","table of contents":"indice","Table of Contents":"Indice","restart presentation":"Ricominciare la presentazione","restart?":"Inizio"},help_it:"Navigare con mouse, barra spazio, frecce sinistra/destra o PgUp e PgDn. Usare S e B per cambiare la dimensione dei caratteri.",strings_el:{slide:"σελίδα","help?":"βοήθεια;","contents?":"περιεχόμενα;","table of contents":"πίνακας περιεχομένων","Table of Contents":"Πίνακας Περιεχομένων","restart presentation":"επανεκκίνηση παρουσίασης","restart?":"επανεκκίνηση;"},help_el:"Πλοηγηθείτε με το κλίκ του ποντικιού, το space, τα βέλη αριστερά/δεξιά, ή Page Up και Page Down. Χρησιμοποιήστε τα πλήκτρα S και B για να αλλάξετε το μέγεθος της γραμματοσειράς.",strings_ja:{slide:"スライド","help?":"ヘルプ","contents?":"目次","table of contents":"目次を表示","Table of Contents":"目次","restart presentation":"最初から再生","restart?":"最初から"},help_ja:"マウス左クリック ・ スペース ・ 左右キー または Page Up ・ Page Downで操作, S ・ Bでフォントサイズ変更",strings_zh:{slide:"幻灯片","help?":"帮助?","contents?":"内容?","table of contents":"目录","Table of Contents":"目录","restart presentation":"重新启动展示","restart?":"重新启动?"},help_zh:"用鼠标点击, 空格条, 左右箭头, Pg Up 和 Pg Dn 导航. 用 S, B 改变字体大小.",strings_ru:{slide:"слайд","help?":"помощь?","contents?":"содержание?","table of contents":"оглавление","Table of Contents":"Оглавление","restart presentation":"перезапустить презентацию","restart?":"перезапуск?"},help_ru:"Перемещайтесь кликая мышкой, используя клавишу пробел, стрелкивлево/вправо или Pg Up и Pg Dn. Клавиши S и B меняют размер шрифта.",strings_sv:{slide:"sida","help?":"hjälp","contents?":"innehåll","table of contents":"innehållsförteckning","Table of Contents":"Innehållsförteckning","restart presentation":"visa presentationen från början","restart?":"börja om"},help_sv:"Bläddra med ett klick med vänstra musknappen, mellanslagstangenten, vänster- och högerpiltangenterna eller tangenterna Pg Up, Pg Dn. Använd tangenterna S och B för att ändra textens storlek.",strings:{},localize:function(d){if(d==""){return d}var b,c=w3c_slidy.strings[w3c_slidy.lang];if(c){b=c[d];if(b){return b}}var a=w3c_slidy.lang.split("-");if(a.length>1){c=w3c_slidy.strings[a[0]];if(c){b=c[d];if(b){return b}}}return d},init_localization:function(){var b=w3c_slidy;var a=w3c_slidy.help_text;this.strings={es:this.strings_es,ca:this.strings_ca,cs:this.strings_cs,nl:this.strings_nl,de:this.strings_de,pl:this.strings_pl,fr:this.strings_fr,hu:this.strings_hu,it:this.strings_it,el:this.strings_el,jp:this.strings_ja,zh:this.strings_zh,ru:this.strings_ru,sv:this.strings_sv},b.strings_es[a]=b.help_es;b.strings_ca[a]=b.help_ca;b.strings_cs[a]=b.help_cs;b.strings_nl[a]=b.help_nl;b.strings_de[a]=b.help_de;b.strings_pl[a]=b.help_pl;b.strings_fr[a]=b.help_fr;b.strings_hu[a]=b.help_hu;b.strings_it[a]=b.help_it;b.strings_el[a]=b.help_el;b.strings_ja[a]=b.help_ja;b.strings_zh[a]=b.help_zh;b.strings_ru[a]=b.help_ru;b.strings_sv[a]=b.help_sv;w3c_slidy.lang=document.body.parentNode.getAttribute("lang");if(!w3c_slidy.lang){w3c_slidy.lang=document.body.parentNode.getAttribute("xml:lang")}if(!w3c_slidy.lang){w3c_slidy.lang="en"}}};if(w3c_slidy.ie6||w3c_slidy.ie7){document.write("<iframe id='historyFrame' src='javascript:\"<html></html>\"' height='1' width='1' style='position:absolute;left:-800px'></iframe>")}w3c_slidy.set_up();setTimeout(w3c_slidy.hide_slides,50);
src/Tests/Readers/Markdown.hs view
@@ -40,6 +40,17 @@             "`*` {.haskell .special x=\"7\"}"             =?> para (codeWith ("",["haskell","special"],[("x","7")]) "*")           ]+        , testGroup "mixed emphasis and strong"+          [ "emph and strong emph alternating" =:+            "*xxx* ***xxx*** xxx\n*xxx* ***xxx*** xxx"+            =?> para (emph "xxx" +++ space +++ strong (emph "xxx") ++++                      space +++ "xxx" +++ space ++++                      emph "xxx" +++ space +++ strong (emph "xxx") ++++                      space +++ "xxx")+          , "emph with spaced strong" =:+            "*x **xx** x*"+            =?> para (emph ("x" +++ space +++ strong "xx" +++ space +++ "x"))+          ]         , testGroup "footnotes"           [ "indent followed by newline and flush-left text" =:             "[^1]\n\n[^1]: my note\n\n     \nnot in note\n"@@ -47,6 +58,19 @@           , "indent followed by newline and indented text" =:             "[^1]\n\n[^1]: my note\n     \n    in note\n"             =?> para (note (para "my note" +++ para "in note"))+          , "recursive note" =:+            "[^1]\n\n[^1]: See [^1]\n"+            =?> para (note (para "See [^1]"))+          ]+        , testGroup "lhs"+          [ test (readMarkdown defaultParserState{stateLiterateHaskell = True})+              "inverse bird tracks and html" $+              "> a\n\n< b\n\n<div>\n"+              =?> codeBlockWith ("",["sourceCode","literate","haskell"],[]) "a"+                  ++++                  codeBlockWith ("",["sourceCode","haskell"],[]) "b"+                  ++++                  rawBlock "html" "<div>\n\n"           ] -- the round-trip properties frequently fail --        , testGroup "round trip"
src/Tests/Readers/RST.hs view
@@ -17,7 +17,10 @@ (=:) = test rst  tests :: [Test]-tests = [ "field list" =:+tests = [ "line block with blank line" =:+          "| a\n|\n|  b" =?> para (str "a" +++ linebreak ++++                                   linebreak +++ str " " +++ str "b")+        , "field list" =:           [_LIT| :Hostname: media08 :IP address: 10.0.0.19@@ -32,6 +35,8 @@    with the first line, but they must be indented relative to the    field name marker, and they must line up with each other. :Parameter i: integer+:Final: item+  on two lines |]         =?> ( setAuthors ["Me","Myself","I"]                $ setDate "2001-08-16"                $ doc@@ -41,6 +46,15 @@                                 , (str "Version", [para "1"])                                 , (str "Indentation", [para "Since the field marker may be quite long, the second and subsequent lines of the field body do not have to line up with the first line, but they must be indented relative to the field name marker, and they must line up with each other."])                                 , (str "Parameter i", [para "integer"])+                                , (str "Final", [para "item on two lines"])                               ])+        , "URLs with following punctuation" =:+          ("http://google.com, http://yahoo.com; http://foo.bar.baz.\n" +++           "http://foo.bar/baz_(bam) (http://foo.bar)") =?>+          para (link "http://google.com" "" "http://google.com" +++ ", " ++++                link "http://yahoo.com" "" "http://yahoo.com" +++ "; " ++++                link "http://foo.bar.baz" "" "http://foo.bar.baz" +++ ". " ++++                link "http://foo.bar/baz_(bam)" "" "http://foo.bar/baz_(bam)"+                +++ " (" +++ link "http://foo.bar" "" "http://foo.bar" +++ ")")         ] 
src/Text/Pandoc/Parsing.hs view
@@ -78,7 +78,7 @@ import qualified Text.Pandoc.UTF8 as UTF8 (putStrLn) import Text.ParserCombinators.Parsec import Text.Pandoc.CharacterReferences ( characterReference )-import Data.Char ( toLower, toUpper, ord, isAscii, isAlphaNum, isDigit )+import Data.Char ( toLower, toUpper, ord, isAscii, isAlphaNum, isDigit, isPunctuation ) import Data.List ( intercalate, transpose ) import Network.URI ( parseURI, URI (..), isAllowedInURI ) import Control.Monad ( join, liftM, guard )@@ -264,8 +264,24 @@   let protocols = [ "http:", "https:", "ftp:", "file:", "mailto:",                     "news:", "telnet:" ]   lookAhead $ oneOfStrings protocols-  -- scan non-ascii characters and ascii characters allowed in a URI-  str <- many1 $ satisfy (\c -> not (isAscii c) || isAllowedInURI c)+  -- Scan non-ascii characters and ascii characters allowed in a URI.+  -- We allow punctuation except when followed by a space, since+  -- we don't want the trailing '.' in 'http://google.com.'+  let innerPunct = try $ satisfy isPunctuation >>~+                         notFollowedBy (newline <|> spaceChar)+  let uriChar = innerPunct <|>+                satisfy (\c -> not (isPunctuation c) &&+                            (not (isAscii c) || isAllowedInURI c))+  -- We want to allow+  -- http://en.wikipedia.org/wiki/State_of_emergency_(disambiguation)+  -- as a URL, while NOT picking up the closing paren in+  -- (http://wikipedia.org)+  -- So we include balanced parens in the URL.+  let inParens = try $ do char '('+                          res <- many uriChar+                          char ')'+                          return $ '(' : res ++ ")"+  str <- liftM concat $ many1 $ inParens <|> count 1 (innerPunct <|> uriChar)   -- now see if they amount to an absolute URI   case parseURI (escapeURI str) of        Just uri' -> if uriScheme uri' `elem` protocols
src/Text/Pandoc/Readers/HTML.hs view
@@ -47,7 +47,7 @@ import Data.Maybe ( fromMaybe, isJust ) import Data.List ( intercalate ) import Data.Char ( isSpace, isDigit )-import Control.Monad ( liftM, guard )+import Control.Monad ( liftM, guard, when )  -- | Convert HTML-formatted string to 'Pandoc' document. readHtml :: ParserState   -- ^ Parser state@@ -75,7 +75,7 @@                                                 t ~== TagOpen "body" []) tags  parseBody :: TagParser [Block]-parseBody = liftM concat $ manyTill block eof+parseBody = liftM (fixPlains False . concat) $ manyTill block eof  block :: TagParser [Block] block = choice@@ -107,7 +107,7 @@   -- treat it as a list item, though it's not valid xhtml...   skipMany nonItem   items <- manyTill (pInTags "li" block >>~ skipMany nonItem) (pCloses "ul")-  return [BulletList items]+  return [BulletList $ map (fixPlains True) items]  pOrderedList :: TagParser [Block] pOrderedList = try $ do@@ -138,7 +138,7 @@   -- treat it as a list item, though it's not valid xhtml...   skipMany nonItem   items <- manyTill (pInTags "li" block >>~ skipMany nonItem) (pCloses "ol")-  return [OrderedList (start, style, DefaultDelim) items]+  return [OrderedList (start, style, DefaultDelim) $ map (fixPlains True) items]  pDefinitionList :: TagParser [Block] pDefinitionList = try $ do@@ -154,8 +154,23 @@   defs  <- many1 (try $ skipMany nonItem >> pInTags "dd" block)   skipMany nonItem   let term = intercalate [LineBreak] terms-  return (term, defs)+  return (term, map (fixPlains True) defs) +fixPlains :: Bool -> [Block] -> [Block]+fixPlains inList bs = if any isParaish bs+                         then map plainToPara bs+                         else bs+  where isParaish (Para _) = True+        isParaish (CodeBlock _ _) = True+        isParaish (Header _ _) = True+        isParaish (BlockQuote _) = True+        isParaish (BulletList _) = not inList+        isParaish (OrderedList _ _) = not inList+        isParaish (DefinitionList _) = not inList+        isParaish _        = False+        plainToPara (Plain xs) = Para xs+        plainToPara x = x+ pRawTag :: TagParser String pRawTag = do   tag <- pAnyTag@@ -199,9 +214,9 @@ pSimpleTable = try $ do   TagOpen _ _ <- pSatisfy (~== TagOpen "table" [])   skipMany pBlank-  head' <- option [] $ pInTags "th" pTd-  rows <- many1 $ try $-           skipMany pBlank >> pInTags "tr" pTd+  head' <- option [] $ pOptInTag "thead" $ pInTags "tr" (pCell "th")+  rows <- pOptInTag "tbody"+          $ many1 $ try $ skipMany pBlank >> pInTags "tr" (pCell "td")   skipMany pBlank   TagClose _ <- pSatisfy (~== TagClose "table")    let cols = maximum $ map length rows@@ -209,17 +224,17 @@   let widths = replicate cols 0   return [Table [] aligns widths head' rows] -pTd :: TagParser [TableCell]-pTd = try $ do+pCell :: String -> TagParser [TableCell]+pCell celltype = try $ do   skipMany pBlank-  res <- pInTags "td" pPlain+  res <- pInTags celltype pPlain   skipMany pBlank   return [res]  pBlockQuote :: TagParser [Block] pBlockQuote = do   contents <- pInTags "blockquote" block-  return [BlockQuote contents]+  return [BlockQuote $ fixPlains False contents]  pPlain :: TagParser [Block] pPlain = do@@ -358,13 +373,23 @@                -> TagParser [Inline] pInlinesInTags tagtype f = do   contents <- pInTags tagtype inline-  return [f contents]+  return [f $ normalizeSpaces contents]  pInTags :: String -> TagParser [a]         -> TagParser [a] pInTags tagtype parser = try $ do   pSatisfy (~== TagOpen tagtype [])   liftM concat $ manyTill parser (pCloses tagtype <|> eof)++pOptInTag :: String -> TagParser a+          -> TagParser a+pOptInTag tagtype parser = try $ do+  open <- option False (pSatisfy (~== TagOpen tagtype []) >> return True)+  skipMany pBlank+  x <- parser+  skipMany pBlank+  when open $ pCloses tagtype+  return x  pCloses :: String -> TagParser () pCloses tagtype = try $ do
src/Text/Pandoc/Readers/LaTeX.hs view
@@ -777,8 +777,12 @@ doubleQuoteEnd = try $ string "''"  ellipses :: GenParser Char st Inline-ellipses = try $ string "\\ldots" >> optional (try $ string "{}") >>-                 return Ellipses+ellipses = try $ do+  char '\\'+  optional $ char 'l'+  string "dots"+  optional $ try $ string "{}"+  return Ellipses  enDash :: GenParser Char st Inline enDash = try (string "--") >> return EnDash@@ -801,7 +805,11 @@  -- hard line break linebreak :: GenParser Char st Inline-linebreak = try (string "\\\\") >> return LineBreak+linebreak = try $ do+  string "\\\\"+  optional $ bracketedText '[' ']'  -- e.g. \\[10pt]+  spaces+  return LineBreak  str :: GenParser Char st Inline str = many1 (noneOf specialChars) >>= return . Str
src/Text/Pandoc/Readers/Markdown.hs view
@@ -471,8 +471,10 @@   return $ intercalate "\n" lns'  birdTrackLine :: Char -> GenParser Char st [Char]-birdTrackLine c = do+birdTrackLine c = try $ do   char c+  -- allow html tags on left margin:+  when (c == '<') $ notFollowedBy letter   manyTill anyChar newline  @@ -1185,7 +1187,14 @@   let notes = stateNotes state   case lookup ref notes of     Nothing   -> fail "note not found"-    Just raw  -> liftM Note $ parseFromString parseBlocks raw+    Just raw  -> do+       -- We temporarily empty the note list while parsing the note,+       -- so that we don't get infinite loops with notes inside notes...+       -- Note references inside other notes do not work.+       updateState $ \st -> st{ stateNotes = [] }+       contents <- parseFromString parseBlocks raw+       updateState $ \st -> st{ stateNotes = notes }+       return $ Note contents  inlineNote :: GenParser Char ParserState Inline inlineNote = try $ do@@ -1281,7 +1290,7 @@   suppress_author <- option False (char '-' >> return True)   char '@'   first <- letter-  rest <- many $ (noneOf ",;]@ \t\n")+  rest <- many $ (noneOf ",;!?[]()@ \t\n")   let key = first:rest   st <- getState   guard $ key `elem` stateCitations st
src/Text/Pandoc/Readers/RST.hs view
@@ -58,7 +58,7 @@  -- treat these as potentially non-text when parsing inline: specialChars :: [Char]-specialChars = "\\`|*_<>$:[-.\"'\8216\8217\8220\8221"+specialChars = "\\`|*_<>$:[]()-.\"'\8216\8217\8220\8221"  -- -- parsing documents@@ -162,6 +162,7 @@   (name, raw) <- rawFieldListItem indent   let term = [Str name]   contents <- parseFromString (many block) raw+  optional blanklines   case (name, contents) of        ("Author", x) -> do            updateState $ \st ->@@ -187,7 +188,6 @@ fieldList = try $ do   indent <- lookAhead $ many spaceChar   items <- many1 $ fieldListItem indent-  blanklines   if null items      then return Null      else return $ DefinitionList $ catMaybes items@@ -198,11 +198,14 @@  lineBlockLine :: GenParser Char ParserState [Inline] lineBlockLine = try $ do-  string "| "+  char '|'+  char ' ' <|> lookAhead (char '\n')   white <- many spaceChar   line <- many $ (notFollowedBy newline >> inline) <|> (try $ endline >>~ char ' ')   optional endline-  return $ normalizeSpaces $ (if null white then [] else [Str white]) ++ line+  return $ if null white+              then normalizeSpaces line+              else Str white : normalizeSpaces line  lineBlock :: GenParser Char ParserState Block lineBlock = try $ do@@ -330,15 +333,14 @@   string indents   manyTill anyChar newline --- two or more indented lines, possibly separated by blank lines.+-- one or more indented lines, possibly separated by blank lines. -- any amount of indentation will work. indentedBlock :: GenParser Char st [Char]-indentedBlock = try $ do +indentedBlock = try $ do   indents <- lookAhead $ many1 spaceChar-  lns <- many $ choice $ [ indentedLine indents,-                           try $ do b <- blanklines-                                    l <- indentedLine indents-                                    return (b ++ l) ]+  lns <- many1 $ try $ do b <- option "" blanklines+                          l <- indentedLine indents+                          return (b ++ l)   optional blanklines   return $ unlines lns @@ -864,10 +866,16 @@   case lookup ref notes of     Nothing   -> fail "note not found"     Just raw  -> do+      -- We temporarily empty the note list while parsing the note,+      -- so that we don't get infinite loops with notes inside notes...+      -- Note references inside other notes are allowed in reST, but+      -- not yet in this implementation.+      updateState $ \st -> st{ stateNotes = [] }       contents <- parseFromString parseBlocks raw-      when (ref == "*" || ref == "#") $ do -- auto-numbered-        -- delete the note so the next auto-numbered note-        -- doesn't get the same contents:-        let newnotes = deleteFirstsBy (==) notes [(ref,raw)]-        updateState $ \st -> st{ stateNotes = newnotes }+      let newnotes = if (ref == "*" || ref == "#") -- auto-numbered+                        -- delete the note so the next auto-numbered note+                        -- doesn't get the same contents:+                        then deleteFirstsBy (==) notes [(ref,raw)]+                        else notes+      updateState $ \st -> st{ stateNotes = newnotes }       return $ Note contents
src/Text/Pandoc/Readers/Textile.hs view
@@ -465,7 +465,7 @@ link = try $ do   name <- surrounded (char '"') inline   char ':'-  url <- manyTill (anyChar) (lookAhead $ (space <|> try (oneOf ".;," >> (space <|> newline))))+  url <- manyTill (anyChar) (lookAhead $ (space <|> try (oneOf ".;,:" >> (space <|> newline))))   return $ Link name (url, "")  -- | Detect plain links to http or email.
src/Text/Pandoc/Templates.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TypeSynonymInstances #-}+{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} {- Copyright (C) 2009-2010 John MacFarlane <jgm@berkeley.edu> 
src/Text/Pandoc/Writers/ConTeXt.hs view
@@ -36,6 +36,7 @@ import Control.Monad.State import Text.Pandoc.Pretty import Text.Pandoc.Templates ( renderTemplate )+import Network.URI ( isAbsoluteURI, unEscapeString )  data WriterState =    WriterState { stNextRef          :: Int  -- number of next URL reference@@ -282,7 +283,10 @@            brackets empty <> brackets label <>            "\\from" <> brackets (text ref) inlineToConTeXt (Image _ (src, _)) = do-  return $ braces $ "\\externalfigure" <> brackets (text src)+  let src' = if isAbsoluteURI src+                then src+                else unEscapeString src+  return $ braces $ "\\externalfigure" <> brackets (text src') inlineToConTeXt (Note contents) = do   contents' <- blockListToConTeXt contents   return $ text "\\footnote{" <>
src/Text/Pandoc/Writers/EPUB.hs view
@@ -46,6 +46,8 @@ import Text.Pandoc.Writers.HTML import Text.Pandoc.Writers.Markdown ( writePlain ) import Data.Char ( toLower )+import System.Directory ( copyFile )+import Network.URI ( unEscapeString )  -- | Produce an EPUB file from a Pandoc document. writeEPUB :: Maybe String   -- ^ EPUB stylesheet specified at command line@@ -59,9 +61,26 @@                   , writerStandalone = True                   , writerWrapText = False }   let sourceDir = writerSourceDirectory opts'+  let vars = writerVariables opts'+  let mbCoverImage = lookup "epub-cover-image" vars +  -- cover page+  (cpgEntry, cpicEntry) <-+                case mbCoverImage of+                     Nothing   -> return ([],[])+                     Just img  -> do+                       let coverImage = "cover-image" ++ takeExtension img+                       copyFile img coverImage+                       let cpContent = fromString $ writeHtmlString+                             opts'{writerTemplate = pageTemplate+                                  ,writerVariables =+                                    ("coverimage",coverImage):vars}+                               (Pandoc meta [])+                       imgContent <- B.readFile img+                       return ( [mkEntry "cover.xhtml" cpContent]+                              , [mkEntry coverImage imgContent] )+   -- title page-  let vars = writerVariables opts'   let tpContent = fromString $ writeHtmlString                      opts'{writerTemplate = pageTemplate                           ,writerVariables = ("titlepage","yes"):vars}@@ -84,8 +103,7 @@   let chunks = splitByIndices h1Indices blocks   let titleize (Header 1 xs : ys) = Pandoc meta{docTitle = xs} ys       titleize xs                 = Pandoc meta xs-  let chapToHtml = writeHtmlString opts'{ writerTemplate = pageTemplate-                                        , writerHTMLMathMethod = PlainMath }+  let chapToHtml = writeHtmlString opts'{ writerTemplate = pageTemplate }   let chapters = map titleize chunks   let chapterToEntry :: Int -> Pandoc -> Entry       chapterToEntry num chap = mkEntry ("ch" ++ show num ++ ".xhtml") $@@ -117,17 +135,21 @@                           ,("xmlns","http://www.idpf.org/2007/opf")                           ,("unique-identifier","BookId")] $           [ metadataElement (writerEPUBMetadata opts')-              uuid lang plainTitle plainAuthors+              uuid lang plainTitle plainAuthors mbCoverImage           , unode "manifest" $              [ unode "item" ! [("id","ncx"), ("href","toc.ncx")                               ,("media-type","application/x-dtbncx+xml")] $ ()              , unode "item" ! [("id","style"), ("href","stylesheet.css")                               ,("media-type","text/css")] $ ()              ] ++-             map chapterNode (tpEntry : chapterEntries) ++-             map pictureNode picEntries+             map chapterNode (cpgEntry ++ (tpEntry : chapterEntries)) +++             map pictureNode (cpicEntry ++ picEntries)           , unode "spine" ! [("toc","ncx")] $-              map chapterRefNode (tpEntry : chapterEntries)+              case mbCoverImage of+                    Nothing -> []+                    Just _ -> [ unode "itemref" !+                                [("idref", "cover"),("linear","no")] $ () ]+              ++ map chapterRefNode (tpEntry : chapterEntries)           ]   let contentsEntry = mkEntry "content.opf" contentsData @@ -142,7 +164,7 @@   let tocData = fromString $ ppTopElement $         unode "ncx" ! [("version","2005-1")                        ,("xmlns","http://www.daisy.org/z3986/2005/ncx/")] $-          [ unode "head"+          [ unode "head" $              [ unode "meta" ! [("name","dtb:uid")                               ,("content", show uuid)] $ ()              , unode "meta" ! [("name","dtb:depth")@@ -151,7 +173,10 @@                               ,("content", "0")] $ ()              , unode "meta" ! [("name","dtb:maxPageNumber")                               ,("content", "0")] $ ()-             ] +             ] ++ case mbCoverImage of+                        Nothing  -> []+                        Just _   -> [unode "meta" ! [("name","cover"),+                                            ("content","cover-image")] $ ()]           , unode "docTitle" $ unode "text" $ plainTitle           , unode "navMap" $ zipWith3 navPointNode (tpEntry : chapterEntries)                                 [1..(length chapterEntries + 1)]@@ -181,11 +206,12 @@   -- construct archive   let archive = foldr addEntryToArchive emptyArchive                  (mimetypeEntry : containerEntry : stylesheetEntry : tpEntry :-                  contentsEntry : tocEntry : (picEntries ++ chapterEntries) )+                  contentsEntry : tocEntry :+                  (picEntries ++ cpicEntry ++ cpgEntry ++ chapterEntries) )   return $ fromArchive archive -metadataElement :: String -> UUID -> String -> String -> [String] -> Element-metadataElement metadataXML uuid lang title authors =+metadataElement :: String -> UUID -> String -> String -> [String] -> Maybe a -> Element+metadataElement metadataXML uuid lang title authors mbCoverImage =   let userNodes = parseXML metadataXML       elt = unode "metadata" ! [("xmlns:dc","http://purl.org/dc/elements/1.1/")                                ,("xmlns:opf","http://www.idpf.org/2007/opf")] $@@ -200,7 +226,9 @@            [ unode "dc:language" lang | not (elt `contains` "language") ] ++            [ unode "dc:identifier" ! [("id","BookId")] $ show uuid |                not (elt `contains` "identifier") ] ++-           [ unode "dc:creator" ! [("opf:role","aut")] $ a | a <- authors ]+           [ unode "dc:creator" ! [("opf:role","aut")] $ a | a <- authors ] +++           [ unode "meta" ! [("name","cover"), ("content","cover-image")] $ () |+               not (isNothing mbCoverImage) ]   in  elt{ elContent = elContent elt ++ map Elem newNodes }  transformInlines :: HTMLMathMethod@@ -211,9 +239,10 @@ transformInlines _ _ _ (Image lab (src,_) : xs) | isNothing (imageTypeOf src) =   return $ Emph lab : xs transformInlines _ sourceDir picsRef (Image lab (src,tit) : xs) = do+  let src' = unEscapeString src   pics <- readIORef picsRef-  let oldsrc = sourceDir </> src-  let ext = takeExtension src+  let oldsrc = sourceDir </> src'+  let ext = takeExtension src'   newsrc <- case lookup oldsrc pics of                   Just n  -> return n                   Nothing -> do@@ -266,9 +295,17 @@  , "<html xmlns=\"http://www.w3.org/1999/xhtml\">"  , "<head>"  , "<title>$title$</title>"+ , "$if(coverimage)$"+ , "<style type=\"text/css\">img{ max-width: 100%; }</style>"+ , "$endif$"  , "<link href=\"stylesheet.css\" type=\"text/css\" rel=\"stylesheet\" />"  , "</head>"  , "<body>"+ , "$if(coverimage)$"+ , "<div id=\"cover-image\">"+ , "<img src=\"$coverimage$\" alt=\"$title$\" />"+ , "</div>"+ , "$else$"  , "$if(titlepage)$"  , "<h1 class=\"title\">$title$</h1>"  , "$for(author)$"@@ -278,6 +315,7 @@  , "<h1>$title$</h1>"  , "$if(toc)$"  , "$toc$"+ , "$endif$"  , "$endif$"  , "$body$"  , "$endif$"
src/Text/Pandoc/Writers/HTML.hs view
@@ -18,9 +18,9 @@ -}  {- |-   Module      : Text.Pandoc.Writers.HTML +   Module      : Text.Pandoc.Writers.HTML    Copyright   : Copyright (C) 2006-2010 John MacFarlane-   License     : GNU GPL, version 2 or above +   License     : GNU GPL, version 2 or above     Maintainer  : John MacFarlane <jgm@berkeley.edu>    Stability   : alpha@@ -46,6 +46,7 @@ import qualified Text.XHtml.Transitional as XHtml import Text.TeXMath import Text.XML.Light.Output+import System.FilePath (takeExtension)  data WriterState = WriterState     { stNotes            :: [Html]  -- ^ List of notes@@ -101,42 +102,37 @@             else return noHtml   auths <- if standalone               then mapM (inlineListToHtml opts) authors'-              else return [] +              else return []   date <- if standalone              then inlineListToHtml opts date'-             else return noHtml -  let sects = hierarchicalize blocks-  toc <- if writerTableOfContents opts +             else return noHtml+  let sects = hierarchicalize $+              if writerSlideVariant opts == NoSlides+                 then blocks+                 else case blocks of+                           (Header 1 _ : _) -> blocks+                           _                ->+                                let isL1 (Header 1 _) = True+                                    isL1 _            = False+                                    (preBlocks, rest) = break isL1 blocks+                                in  (RawBlock "html" "<div class=\"slide\">" :+                                    preBlocks) ++ (RawBlock "html" "</div>" :+                                    rest)+  toc <- if writerTableOfContents opts             then tableOfContents opts sects             else return Nothing-  let startSlide = RawBlock "html" "<div class=\"slide\">\n"-      endSlide   = RawBlock "html" "</div>\n"-  let cutUp (HorizontalRule : Header 1 ys : xs) = cutUp (Header 1 ys : xs)-      cutUp (HorizontalRule : xs) = [endSlide, startSlide] ++ cutUp xs-      cutUp (Header 1 ys : xs)    = [endSlide, startSlide] ++-                                    (Header 1 ys : cutUp xs)-      cutUp (x:xs)                = x : cutUp xs-      cutUp []                    = [] -  let slides = case blocks of-                (HorizontalRule : xs) -> [startSlide] ++ cutUp xs ++ [endSlide]-                (Header 1 ys : xs)    -> [startSlide, Header 1 ys] ++-                                           cutUp xs ++ [endSlide]-                _                     -> [startSlide] ++ cutUp blocks ++-                                           [endSlide]   blocks' <- liftM (toHtmlFromList . intersperse (nl opts)) $-              if writerSlideVariant opts `elem` [SlidySlides, S5Slides]-                 then mapM (blockToHtml opts) slides-                 else mapM (elementToHtml opts) sects+                 mapM (elementToHtml opts) sects   st <- get   let notes = reverse (stNotes st)   let thebody = blocks' +++ footnoteSection opts notes   let  math = if stMath st                 then case writerHTMLMathMethod opts of                            LaTeXMathML (Just url) ->-                              script ! +                              script !                               [src url, thetype "text/javascript"] $ noHtml                            MathML (Just url) ->-                              script ! +                              script !                               [src url, thetype "text/javascript"] $ noHtml                            MathJax url ->                               script ! [src url, thetype "text/javascript"] $ noHtml@@ -144,7 +140,7 @@                               script !                               [src url, thetype "text/javascript"] $ noHtml                            _ -> case lookup "mathml-script" (writerVariables opts) of-                                      Just s -> +                                      Just s ->                                         script ! [thetype "text/javascript"] <<                                            primHtml s                                       Nothing -> noHtml@@ -233,33 +229,35 @@  -- | Convert an Element to Html. elementToHtml :: WriterOptions -> Element -> State WriterState Html-elementToHtml opts (Blk block) = blockToHtml opts block +elementToHtml opts (Blk HorizontalRule) | writerSlideVariant opts /= NoSlides =+  return $ primHtml "</div>" +++ nl opts +++ primHtml "<div class=\"slide\">"+elementToHtml opts (Blk block) = blockToHtml opts block elementToHtml opts (Sec level num id' title' elements) = do-  innerContents <- mapM (elementToHtml opts) elements   modify $ \st -> st{stSecNum = num}  -- update section number   header' <- blockToHtml opts (Header level title')-  let slides = writerSlideVariant opts `elem` [SlidySlides, S5Slides]+  innerContents <- mapM (elementToHtml opts) elements   let header'' = header' !  [prefixedId opts id' |                              not (writerStrictMarkdown opts ||-                                  writerSectionDivs opts || slides)]+                                  writerSectionDivs opts ||+                                  writerSlideVariant opts == S5Slides)]   let stuff = header'' : innerContents-  return $ if slides   -- S5 gets confused by the extra divs around sections-              then toHtmlFromList $ intersperse (nl opts) stuff-              else if writerSectionDivs opts-                      then if writerHtml5 opts-                              then tag "section" ! [prefixedId opts id']-                                     << (nl opts : (intersperse (nl opts) stuff-                                                    ++ [nl opts]))-                              else thediv ! [prefixedId opts id'] <<-                                      (nl opts : (intersperse (nl opts) stuff-                                                  ++ [nl opts]))-                      else toHtmlFromList $ intersperse (nl opts) stuff+  let slide = writerSlideVariant opts /= NoSlides && level == 1+  let stuff' =  if slide+                   then [thediv ! [theclass "slide"] <<+                          (nl opts : intersperse (nl opts) stuff ++ [nl opts])]+                   else intersperse (nl opts) stuff+  let inNl x = nl opts : x ++ [nl opts]+  return $ if writerSectionDivs opts+              then if writerHtml5 opts+                      then tag "section" ! [prefixedId opts id'] << inNl stuff'+                      else thediv ! [prefixedId opts id'] << inNl stuff'+              else toHtmlFromList stuff'  -- | Convert list of Note blocks to a footnote <div>. -- Assumes notes are sorted. footnoteSection :: WriterOptions -> [Html] -> Html footnoteSection opts notes =-  if null notes +  if null notes      then noHtml      else nl opts +++ (thediv ! [theclass "footnotes"]           $ nl opts +++ hr +++ nl opts +++@@ -272,7 +270,7 @@   let (name', rest) = span (/='@') addr       domain = drop 1 rest   in  Just (name', domain)-parseMailto _ = Nothing +parseMailto _ = Nothing  -- | Obfuscate a "mailto:" link. obfuscateLink :: WriterOptions -> String -> String -> Html@@ -280,15 +278,15 @@   anchor ! [href s] << txt obfuscateLink opts txt s =   let meth = writerEmailObfuscation opts-      s' = map toLower s +      s' = map toLower s   in  case parseMailto s' of         (Just (name', domain)) ->           let domain'  = substitute "." " dot " domain               at'      = obfuscateChar '@'-              (linkText, altText) = +              (linkText, altText) =                  if txt == drop 7 s' -- autolink                     then ("'<code>'+e+'</code>'", name' ++ " at " ++ domain')-                    else ("'" ++ txt ++ "'", txt ++ " (" ++ name' ++ " at " ++ +                    else ("'" ++ txt ++ "'", txt ++ " (" ++ name' ++ " at " ++                           domain' ++ ")")           in  case meth of                 ReferenceObfuscation ->@@ -297,18 +295,18 @@                      ++ "\">" ++ (obfuscateString txt) ++ "</a>"                 JavascriptObfuscation ->                      (script ! [thetype "text/javascript"] $-                     primHtml ("\n<!--\nh='" ++ -                     obfuscateString domain ++ "';a='" ++ at' ++ "';n='" ++ +                     primHtml ("\n<!--\nh='" +++                     obfuscateString domain ++ "';a='" ++ at' ++ "';n='" ++                      obfuscateString name' ++ "';e=n+a+h;\n" ++-                     "document.write('<a h'+'ref'+'=\"ma'+'ilto'+':'+e+'\">'+" ++ -                     linkText  ++ "+'<\\/'+'a'+'>');\n// -->\n")) +++  +                     "document.write('<a h'+'ref'+'=\"ma'+'ilto'+':'+e+'\">'+" +++                     linkText  ++ "+'<\\/'+'a'+'>');\n// -->\n")) +++                      noscript (primHtml $ obfuscateString altText)                 _ -> error $ "Unknown obfuscation method: " ++ show meth         _ -> anchor ! [href s] $ stringToHtml opts txt  -- malformed email  -- | Obfuscate character as entity. obfuscateChar :: Char -> String-obfuscateChar char = +obfuscateChar char =   let num    = ord char       numstr = if even num then show num else "x" ++ showHex num ""   in  "&#" ++ numstr ++ ";"@@ -323,6 +321,17 @@   [prefixedId opts id' | not (null id')] ++   map (\(x,y) -> strAttr x y) keyvals +imageExts :: [String]+imageExts = [ "art", "bmp", "cdr", "cdt", "cpt", "cr2", "crw", "djvu", "erf",+              "gif", "ico", "ief", "jng", "jpg", "jpeg", "nef", "orf", "pat", "pbm",+              "pcx", "pgm", "png", "pnm", "ppm", "psd", "ras", "rgb", "svg", "tiff",+              "wbmp", "xbm", "xpm", "xwd" ]++treatAsImage :: FilePath -> Bool+treatAsImage fp =+  let ext = map toLower $ drop 1 $ takeExtension fp+  in  null ext || ext `elem` imageExts+ -- | Convert Pandoc block element to HTML. blockToHtml :: WriterOptions -> Block -> State WriterState Html blockToHtml _ Null = return noHtml@@ -361,14 +370,14 @@                     return h blockToHtml opts (BlockQuote blocks) =   -- in S5, treat list in blockquote specially-  -- if default is incremental, make it nonincremental; +  -- if default is incremental, make it nonincremental;   -- otherwise incremental   if writerSlideVariant opts /= NoSlides      then let inc = not (writerIncremental opts) in-          case blocks of +          case blocks of              [BulletList lst]  -> blockToHtml (opts {writerIncremental = inc})                                   (BulletList lst)-             [OrderedList attribs lst] -> +             [OrderedList attribs lst] ->                                   blockToHtml (opts {writerIncremental = inc})                                   (OrderedList attribs lst)              _                 -> do contents <- blockListToHtml opts blocks@@ -377,7 +386,7 @@      else do        contents <- blockListToHtml opts blocks        return $ blockquote (nl opts +++ contents +++ nl opts)-blockToHtml opts (Header level lst) = do +blockToHtml opts (Header level lst) = do   contents <- inlineListToHtml opts lst   secnum <- liftM stSecNum get   let contents' = if writerNumberSections opts@@ -470,8 +479,8 @@                       0                  -> "header"                       x | x `rem` 2 == 1 -> "odd"                       _                  -> "even"-  cols'' <- sequence $ zipWith -            (\alignment item -> tableItemToHtml opts mkcell alignment item) +  cols'' <- sequence $ zipWith+            (\alignment item -> tableItemToHtml opts mkcell alignment item)             aligns cols'   return $ (tr ! [theclass rowclass] $ nl opts +++ toHtmlFromList cols'')           +++ nl opts@@ -508,13 +517,13 @@  -- | Convert list of Pandoc inline elements to HTML. inlineListToHtml :: WriterOptions -> [Inline] -> State WriterState Html-inlineListToHtml opts lst = +inlineListToHtml opts lst =   mapM (inlineToHtml opts) lst >>= return . toHtmlFromList  -- | Convert Pandoc inline element to HTML. inlineToHtml :: WriterOptions -> Inline -> State WriterState Html inlineToHtml opts inline =-  case inline of  +  case inline of     (Str str)        -> return $ stringToHtml opts str     (Space)          -> return $ stringToHtml opts " "     (LineBreak)      -> return br@@ -543,9 +552,9 @@                                               stringToHtml opts "”")                         in  do contents <- inlineListToHtml opts lst                                return $ leftQuote +++ contents +++ rightQuote-    (Math t str) ->     modify (\st -> st {stMath = True}) >> +    (Math t str) ->     modify (\st -> st {stMath = True}) >>                         (case writerHTMLMathMethod opts of-                               LaTeXMathML _ -> +                               LaTeXMathML _ ->                                   -- putting LaTeXMathML in container with class "LaTeX" prevents                                   -- non-math elements on the page from being treated as math by                                   -- the javascript@@ -594,37 +603,44 @@                                LaTeXMathML _ -> do modify (\st -> st {stMath = True})                                                    return $ primHtml str                                _             -> return noHtml-    (RawInline "html" str) -> return $ primHtml str +    (RawInline "html" str) -> return $ primHtml str     (RawInline _ _) -> return noHtml     (Link [Code _ str] (s,_)) | "mailto:" `isPrefixOf` s ->                         return $ obfuscateLink opts str s     (Link txt (s,_)) | "mailto:" `isPrefixOf` s -> do-                        linkText <- inlineListToHtml opts txt  +                        linkText <- inlineListToHtml opts txt                         return $ obfuscateLink opts (show linkText) s     (Link txt (s,tit)) -> do                         linkText <- inlineListToHtml opts txt-                        return $ anchor ! ([href s] ++ -                                 if null tit then [] else [title tit]) $ +                        return $ anchor ! ([href s] +++                                 if null tit then [] else [title tit]) $                                  linkText-    (Image txt (s,tit)) -> do+    (Image txt (s,tit)) | treatAsImage s -> do                         let alternate' = stringify txt                         let attributes = [src s] ++-                                         (if null tit -                                            then [] -                                            else [title tit]) ++ -                                         if null txt -                                            then [] +                                         (if null tit+                                            then []+                                            else [title tit]) +++                                         if null txt+                                            then []                                             else [alt alternate']-                        return $ image ! attributes -                        -- note:  null title included, as in Markdown.pl -    (Note contents)          -> do +                        return $ image ! attributes+                        -- note:  null title included, as in Markdown.pl+    (Image _ (s,tit)) -> do+                        let attributes = [src s] +++                                         (if null tit+                                            then []+                                            else [title tit])+                        return $ itag "embed" ! attributes+                        -- note:  null title included, as in Markdown.pl+    (Note contents)          -> do                         st <- get                         let notes = stNotes st                         let number = (length notes) + 1                         let ref = show number-                        htmlContents <- blockListToNote opts ref contents +                        htmlContents <- blockListToNote opts ref contents                         -- push contents onto front of notes-                        put $ st {stNotes = (htmlContents:notes)} +                        put $ st {stNotes = (htmlContents:notes)}                         return $ sup <<                                  anchor ! [href ("#" ++ writerIdentifierPrefix opts ++ "fn" ++ ref),                                            theclass "footnoteRef",@@ -635,7 +651,7 @@ blockListToNote opts ref blocks =   -- If last block is Para or Plain, include the backlink at the end of   -- that block. Otherwise, insert a new Plain block with the backlink.-  let backlink = [RawInline "html" $ " <a href=\"#" ++ writerIdentifierPrefix opts ++ "fnref" ++ ref ++ +  let backlink = [RawInline "html" $ " <a href=\"#" ++ writerIdentifierPrefix opts ++ "fnref" ++ ref ++                  "\" class=\"footnoteBackLink\"" ++                  " title=\"Jump back to footnote " ++ ref ++ "\">" ++                  (if writerAscii opts then "&#8617;" else "↩") ++ "</a>"]@@ -652,4 +668,3 @@                                                  Plain backlink]   in  do contents <- blockListToHtml opts blocks'          return $ nl opts +++ (li ! [prefixedId opts ("fn" ++ ref)]) contents-
src/Text/Pandoc/Writers/LaTeX.hs view
@@ -34,6 +34,7 @@ import Text.Pandoc.Shared import Text.Pandoc.Templates import Text.Printf ( printf )+import Network.URI ( isAbsoluteURI, unEscapeString ) import Data.List ( (\\), isSuffixOf, isPrefixOf, intercalate, intersperse ) import Data.Char ( toLower, isPunctuation ) import Control.Monad.State@@ -42,6 +43,9 @@  data WriterState =    WriterState { stInNote     :: Bool          -- @True@ if we're in a note+              , stInTable    :: Bool          -- @True@ if we're in a table+              , stTableNotes :: [(Char, Doc)] -- List of markers, notes+                                              -- in current table               , stOLLevel    :: Int           -- level of ordered list nesting               , stOptions    :: WriterOptions -- writer options, so they don't have to be parameter                , stVerbInNote :: Bool          -- true if document has verbatim text in note@@ -59,7 +63,8 @@ writeLaTeX :: WriterOptions -> Pandoc -> String writeLaTeX options document =    evalState (pandocToLaTeX options document) $ -  WriterState { stInNote = False, stOLLevel = 1, stOptions = options,+  WriterState { stInNote = False, stInTable = False,+                stTableNotes = [], stOLLevel = 1, stOptions = options,                 stVerbInNote = False, stEnumerate = False,                 stTable = False, stStrikeout = False, stSubscript = False,                 stUrl = False, stGraphics = False,@@ -161,7 +166,7 @@ blockToLaTeX Null = return empty blockToLaTeX (Plain lst) = inlineListToLaTeX lst blockToLaTeX (Para [Image txt (src,tit)]) = do-  capt <- inlineListToLaTeX txt+  capt <- inlineListToLaTeX $ deVerb txt   img <- inlineToLaTeX (Image txt (src,tit))   return $ "\\begin{figure}[htbp]" $$ "\\centering" $$ img $$            ("\\caption{" <> capt <> char '}') $$ "\\end{figure}" $$ blankline@@ -269,47 +274,61 @@                 5  -> headerWith "\\subparagraph" stuffing                 _            -> txt $$ blankline blockToLaTeX (Table caption aligns widths heads rows) = do+  modify $ \s -> s{ stInTable = True, stTableNotes = [] }   headers <- if all null heads                 then return empty-                else liftM ($$ "\\hline") $ (tableRowToLaTeX widths) heads-  captionText <- inlineListToLaTeX caption-  rows' <- mapM (tableRowToLaTeX widths) rows-  let colDescriptors = concat $ zipWith toColDescriptor widths aligns-  let tableBody = text ("\\begin{tabular}{" ++ colDescriptors ++ "}") $$-                  headers $$ vcat rows' $$ "\\end{tabular}"-  let centered txt = "\\begin{center}" $$ txt $$ "\\end{center}"-  modify $ \s -> s{ stTable = True }-  return $ if isEmpty captionText-              then centered tableBody $$ blankline-              else "\\begin{table}[h]" $$ centered tableBody $$-                   inCmd "caption" captionText $$ "\\end{table}" $$ blankline+                else liftM ($$ "\\ML")+                     $ (tableRowToLaTeX True aligns widths) heads+  captionText <- inlineListToLaTeX $ deVerb caption+  let capt = if isEmpty captionText+                then empty+                else text "caption = " <> captionText <> "," <> space+  rows' <- mapM (tableRowToLaTeX False aligns widths) rows+  let rows'' = intersperse ("\\\\\\noalign{\\medskip}") rows'+  tableNotes <- liftM (reverse . stTableNotes) get+  let toNote (marker, x) = "\\tnote" <> brackets (char marker) <>+                            braces (nest 2 x)+  let notes = vcat $ map toNote tableNotes+  let colDescriptors = text $ concat $ map toColDescriptor aligns+  let tableBody =+         ("\\ctable" <> brackets (capt <> text "pos = H, center, botcap"))+         <> braces colDescriptors+         $$ braces ("% notes" <> cr <> notes <> cr)+         $$ braces (text "% rows" $$ "\\FL" $$+                     vcat (headers : rows'') $$ "\\LL" <> cr)+  modify $ \s -> s{ stTable = True, stInTable = False, stTableNotes = [] }+  return $ tableBody $$ blankline -toColDescriptor :: Double -> Alignment -> String-toColDescriptor 0 align =+toColDescriptor :: Alignment -> String+toColDescriptor align =   case align of          AlignLeft    -> "l"          AlignRight   -> "r"          AlignCenter  -> "c"          AlignDefault -> "l"-toColDescriptor width align = ">{\\PBS" ++-  (case align of-         AlignLeft -> "\\raggedright"-         AlignRight -> "\\raggedleft"-         AlignCenter -> "\\centering"-         AlignDefault -> "\\raggedright") ++-  "\\hspace{0pt}}p{" ++ printf "%.2f" width ++ "\\columnwidth}"  blockListToLaTeX :: [Block] -> State WriterState Doc blockListToLaTeX lst = mapM blockToLaTeX lst >>= return . vcat -tableRowToLaTeX :: [Double] -> [[Block]] -> State WriterState Doc-tableRowToLaTeX widths cols = do+tableRowToLaTeX :: Bool+                -> [Alignment]+                -> [Double]+                -> [[Block]]+                -> State WriterState Doc+tableRowToLaTeX header aligns widths cols = do   renderedCells <- mapM blockListToLaTeX cols-  let toCell 0 c = c-      toCell w c = "\\parbox{" <> text (printf "%.2f" w) <>-                   "\\columnwidth}{" <> c <> cr <> "}"-  let cells = zipWith toCell widths renderedCells-  return $ (hcat $ intersperse (" & ") cells) <> "\\\\"+  let valign = text $ if header then "[b]" else "[t]"+  let halign x = case x of+                  AlignLeft    -> "\\raggedright"+                  AlignRight   -> "\\raggedleft"+                  AlignCenter  -> "\\centering"+                  AlignDefault -> "\\raggedright"+  let toCell 0 _ c = c+      toCell w a c = "\\parbox" <> valign <>+                     braces (text (printf "%.2f\\columnwidth" w)) <>+                     braces (halign a <> cr <> c <> cr)+  let cells = zipWith3 toCell widths aligns renderedCells+  return $ hcat $ intersperse (" & ") cells  listItemToLaTeX :: [Block] -> State WriterState Doc listItemToLaTeX lst = blockListToLaTeX lst >>= return .  (text "\\item" $$) .@@ -407,14 +426,23 @@                          contents <> char '}' inlineToLaTeX (Image _ (source, _)) = do   modify $ \s -> s{ stGraphics = True }-  return $ "\\includegraphics" <> braces (text source)+  let source' = if isAbsoluteURI source+                   then source+                   else unEscapeString source+  return $ "\\includegraphics" <> braces (text source') inlineToLaTeX (Note contents) = do   modify (\s -> s{stInNote = True})   contents' <- blockListToLaTeX contents   modify (\s -> s {stInNote = False})-  -- note: a \n before } is needed when note ends with a Verbatim environment-  return $ "\\footnote" <> braces (nest 2 contents')-+  inTable <- liftM stInTable get+  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 (nest 2 contents')+     -- note: a \n before } needed when note ends with a Verbatim environment  citationsToNatbib :: [Citation] -> State WriterState Doc citationsToNatbib (one:[])
src/Text/Pandoc/Writers/Markdown.hs view
@@ -366,7 +366,19 @@                     -> [Block]       -- ^ List of block elements                     -> State WriterState Doc  blockListToMarkdown opts blocks =-  mapM (blockToMarkdown opts) blocks >>= return . cat+  mapM (blockToMarkdown opts) (fixBlocks blocks) >>= return . cat+    -- insert comment between list and indented code block, or the+    -- code block will be treated as a list continuation paragraph+    where fixBlocks (b : CodeBlock attr x : rest)+            | (writerStrictMarkdown opts || attr == nullAttr) && isListBlock b =+               b : RawBlock "html" "<!-- -->\n" : CodeBlock attr x :+                  fixBlocks rest+          fixBlocks (x : xs)             = x : fixBlocks xs+          fixBlocks []                   = []+          isListBlock (BulletList _)     = True+          isListBlock (OrderedList _ _)  = True+          isListBlock (DefinitionList _) = True+          isListBlock _                  = False  -- | Get reference for target; if none exists, create unique one and return. --   Prefer label if possible; otherwise, generate a unique key.
src/Text/Pandoc/Writers/ODT.hs view
@@ -41,6 +41,7 @@ import Text.Pandoc.Writers.OpenDocument ( writeOpenDocument ) import System.Directory import Control.Monad (liftM)+import Network.URI ( unEscapeString )  -- | Produce an ODT file from a Pandoc document. writeODT :: Maybe FilePath -- ^ Path specified by --reference-odt@@ -74,9 +75,10 @@  transformPic :: FilePath -> IORef [Entry] -> Inline -> IO Inline transformPic sourceDir entriesRef (Image lab (src,tit)) = do+  let src' = unEscapeString src   entries <- readIORef entriesRef-  let newsrc = "Pictures/" ++ show (length entries) ++ takeExtension src-  catch (readEntry [] (sourceDir </> src) >>= \entry ->+  let newsrc = "Pictures/" ++ show (length entries) ++ takeExtension src'+  catch (readEntry [] (sourceDir </> src') >>= \entry ->            modifyIORef entriesRef (entry{ eRelativePath = newsrc } :) >>            return (Image lab (newsrc, tit)))         (\_ -> return (Emph lab))
src/Text/Pandoc/Writers/OpenDocument.hs view
@@ -62,6 +62,7 @@                 , stIndentPara    :: Int                 , stInDefinition  :: Bool                 , stTight         :: Bool+                , stFirstPara     :: Bool                 }  defaultWriterState :: WriterState@@ -75,6 +76,7 @@                 , stIndentPara    = 0                 , stInDefinition  = False                 , stTight         = False+                , stFirstPara     = False                 }  when :: Bool -> Doc -> Doc@@ -111,11 +113,19 @@ setInDefinitionList :: Bool -> State WriterState () setInDefinitionList b = modify $  \s -> s { stInDefinition = b } -inParagraphTags :: Doc -> Doc-inParagraphTags d | isEmpty d = empty-inParagraphTags d =-  inTags False "text:p" [("text:style-name", "Text_20_body")] d+setFirstPara :: State WriterState ()+setFirstPara =  modify $  \s -> s { stFirstPara = True } +inParagraphTags :: Doc -> State WriterState Doc+inParagraphTags d | isEmpty d = return empty+inParagraphTags d = do+  b <- gets stFirstPara+  a <- if b+       then do modify $ \st -> st { stFirstPara = False }+               return $ [("text:style-name", "First_20_paragraph")]+       else    return   [("text:style-name", "Text_20_body")]+  return $ inTags False "text:p" a d+ inParagraphTagsWithStyle :: String -> Doc -> Doc inParagraphTagsWithStyle sty = inTags False "text:p" [("text:style-name", sty)] @@ -138,9 +148,10 @@                     $ selfClosingTag "style:text-properties" (concatMap snd $ Map.toList at)        return $ inTags False "text:span" [("text:style-name","T" ++ show tn)] d -inHeaderTags :: Int -> Doc -> Doc-inHeaderTags i = inTags False "text:h" [ ("text:style-name", "Heading_20_" ++ show i)-                                       , ("text:outline-level", show i)]+inHeaderTags :: Int -> Doc -> State WriterState Doc+inHeaderTags i d =+  return $ inTags False "text:h" [ ("text:style-name", "Heading_20_" ++ show i)+                                 , ("text:outline-level", show i)] d  inQuotes :: QuoteType -> Doc -> Doc inQuotes SingleQuote s = text "&#8216;" <> s <> text "&#8217;"@@ -164,7 +175,7 @@ writeOpenDocument opts (Pandoc (Meta title authors date) blocks) =   let ((doc, title', authors', date'),s) = flip runState         defaultWriterState $ do-           title'' <- inlinesToOpenDocument opts title +           title'' <- inlinesToOpenDocument opts title            authors'' <- mapM (inlinesToOpenDocument opts) authors            date'' <- inlinesToOpenDocument opts date            doc'' <- blocksToOpenDocument opts blocks@@ -274,18 +285,20 @@ -- | Convert a Pandoc block element to OpenDocument. blockToOpenDocument :: WriterOptions -> Block -> State WriterState Doc blockToOpenDocument o bs-    | Plain          b <- bs = inParagraphTags <$> inlinesToOpenDocument o b-    | Para           b <- bs = inParagraphTags <$> inlinesToOpenDocument o b-    | Header       i b <- bs = inHeaderTags  i <$> inlinesToOpenDocument o b-    | BlockQuote     b <- bs = mkBlockQuote b-    | CodeBlock    _ s <- bs = preformatted s+    | Plain          b <- bs = inParagraphTags =<< inlinesToOpenDocument o b+    | Para           b <- bs = inParagraphTags =<< inlinesToOpenDocument o b+    | Header       i b <- bs = setFirstPara >>+                               (inHeaderTags  i =<< inlinesToOpenDocument o b)+    | BlockQuote     b <- bs = setFirstPara >> mkBlockQuote b+    | DefinitionList b <- bs = setFirstPara >> defList b+    | BulletList     b <- bs = setFirstPara >> bulletListToOpenDocument o b+    | OrderedList  a b <- bs = setFirstPara >> orderedList a b+    | CodeBlock    _ s <- bs = setFirstPara >> preformatted s+    | Table  c a w h r <- bs = setFirstPara >> table c a w h r+    | HorizontalRule   <- bs = setFirstPara >> return (selfClosingTag "text:p"+                                [ ("text:style-name", "Horizontal_20_Line") ])     | RawBlock _     _ <- bs = return empty-    | DefinitionList b <- bs = defList b-    | BulletList     b <- bs = bulletListToOpenDocument o b-    | OrderedList  a b <- bs = orderedList a b-    | Table  c a w h r <- bs = table c a w h r     | Null             <- bs = return empty-    | HorizontalRule   <- bs = return $ selfClosingTag "text:p" [ ("text:style-name", "Horizontal_20_Line") ]     | otherwise              = return empty     where       defList       b = do setInDefinitionList True@@ -381,14 +394,14 @@       mkImg  s     = inTags False "draw:frame" [] $                      selfClosingTag "draw:image" [ ("xlink:href"   , s       )                                                  , ("xlink:type"   , "simple")-                                                 , (" xlink:show"  , "embed" )+                                                 , ("xlink:show"   , "embed" )                                                  , ("xlink:actuate", "onLoad")]       mkNote     l = do         n <- length <$> gets stNotes         let footNote t = inTags False "text:note"                          [ ("text:id"        , "ftn" ++ show n)                          , ("text:note-class", "footnote"     )] $-                         inTagsSimple "text:note-citation" (text . show $ n + 1) <> +                         inTagsSimple "text:note-citation" (text . show $ n + 1) <>                          inTagsSimple "text:note-body" t         nn <- footNote <$> withParagraphStyle o "Footnote" l         addNote nn
src/Text/Pandoc/Writers/RTF.hs view
@@ -37,23 +37,28 @@ import System.FilePath ( takeExtension ) import qualified Data.ByteString as B import Text.Printf ( printf )+import Network.URI ( isAbsoluteURI, unEscapeString )  -- | Convert Image inlines into a raw RTF embedded image, read from a file. -- If file not found or filetype not jpeg or png, leave the inline unchanged. rtfEmbedImage :: Inline -> IO Inline-rtfEmbedImage x@(Image _ (src,_))-  | map toLower (takeExtension src) `elem` [".jpg",".jpeg",".png"] = do-  imgdata <- catch (B.readFile src) (\_ -> return B.empty)-  let bytes = map (printf "%02x") $ B.unpack imgdata-  let filetype = case map toLower (takeExtension src) of-                      ".jpg" -> "\\jpegblip"-                      ".jpeg" -> "\\jpegblip"-                      ".png"  -> "\\pngblip"-                      _      -> error "Unknown file type"-  let raw = "{\\pict" ++ filetype ++ " " ++ concat bytes ++ "}"-  return $ if B.null imgdata-              then x-              else RawInline "rtf" raw+rtfEmbedImage x@(Image _ (src,_)) = do+  let ext = map toLower (takeExtension src)+  if ext `elem` [".jpg",".jpeg",".png"] && not (isAbsoluteURI src)+     then do+       let src' = unEscapeString src+       imgdata <- catch (B.readFile src') (\_ -> return B.empty)+       let bytes = map (printf "%02x") $ B.unpack imgdata+       let filetype = case ext of+                           ".jpg" -> "\\jpegblip"+                           ".jpeg" -> "\\jpegblip"+                           ".png"  -> "\\pngblip"+                           _      -> error "Unknown file type"+       let raw = "{\\pict" ++ filetype ++ " " ++ concat bytes ++ "}"+       return $ if B.null imgdata+                   then x+                   else RawInline "rtf" raw+     else return x rtfEmbedImage x = return x  -- | Convert Pandoc to a string in rich text format.
src/Text/Pandoc/Writers/Texinfo.hs view
@@ -37,6 +37,8 @@ import Data.Char ( chr, ord ) import Control.Monad.State import Text.Pandoc.Pretty+import Network.URI ( isAbsoluteURI, unEscapeString )+import System.FilePath  data WriterState =    WriterState { stStrikeout   :: Bool  -- document contains strikeout@@ -412,11 +414,11 @@   return $ text ("@image{" ++ base ++ ",,,") <> content <> text "," <>            text (ext ++ "}")   where-    (revext, revbase) = break (=='.') (reverse source)-    ext  = reverse revext-    base = case revbase of-            ('.' : rest) -> reverse rest-            _            -> reverse revbase+    ext     = drop 1 $ takeExtension source'+    base    = takeBaseName source'+    source' = if isAbsoluteURI source+                 then source+                 else unEscapeString source  inlineToTexinfo (Note contents) = do   contents' <- blockListToTexinfo contents
src/pandoc.hs view
@@ -490,6 +490,14 @@                   "FILENAME")                  "" -- "Path of epub.css" +    , Option "" ["epub-cover-image"]+                 (ReqArg+                  (\arg opt ->+                     return opt { optVariables =+                                 ("epub-cover-image", arg) : optVariables opt })+                  "FILENAME")+                 "" -- "Path of epub cover image"+     , Option "" ["epub-metadata"]                  (ReqArg                   (\arg opt -> do
src/test-pandoc.hs view
@@ -11,6 +11,7 @@ import qualified Tests.Writers.ConTeXt import qualified Tests.Writers.HTML import qualified Tests.Writers.Native+import qualified Tests.Writers.Markdown import qualified Tests.Shared  tests :: [Test]@@ -20,6 +21,7 @@           [ testGroup "Native" Tests.Writers.Native.tests           , testGroup "ConTeXt" Tests.Writers.ConTeXt.tests           , testGroup "HTML" Tests.Writers.HTML.tests+          , testGroup "Markdown" Tests.Writers.Markdown.tests           ]         , testGroup "Readers"           [ testGroup "LaTeX" Tests.Readers.LaTeX.tests
templates/latex.template view
@@ -40,10 +40,8 @@ \usepackage{enumerate} $endif$ $if(tables)$-\usepackage{array}-% This is needed because raggedright in table elements redefines \\:-\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}-\let\PBS=\PreserveBackslash+\usepackage{ctable}+\usepackage{float} % provides the H option for float placement $endif$ $if(strikeout)$ \usepackage[normalem]{ulem}
templates/slidy.template 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" lang="en" xml:lang="en"> <head>   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   <meta name="generator" content="pandoc" />@@ -17,17 +17,18 @@ $highlighting-css$   </style> $endif$-$for(css)$-  <link rel="stylesheet" href="$css$" type="text/css" />-$endfor$ $if(slidy-css)$   <style type="text/css"> $slidy-css$   </style> $else$-  <link rel="stylesheet" type="text/css" media="screen, projection, print" -    href="http://www.w3.org/Talks/Tools/Slidy/slidy.css" /> +  <link rel="stylesheet" type="text/css" media="screen, projection, print"+    href="http://www.w3.org/Talks/Tools/Slidy2/styles/slidy.css" /> $endif$+$for(css)$+  <link rel="stylesheet" type="text/css" media="screen, projection, print"+   href="$css$" />+$endfor$ $if(math)$   $math$ $endif$@@ -39,22 +40,25 @@ $slidy-js$   </script> $else$-  <script src="http://www.w3.org/Talks/Tools/Slidy/slidy.js.gz"+  <script src="http://www.w3.org/Talks/Tools/Slidy2/scripts/slidy.js.gz"     charset="utf-8" type="text/javascript"></script> $endif$+$if(duration)$+  <meta name="duration" content="$duration$" />+$endif$ </head> <body> $for(include-before)$ $include-before$ $endfor$ $if(title)$-<div class="slide cover 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> +  <p class="date">$date$</p> $endif$ </div> $endif$
tests/html-reader.html view
@@ -298,40 +298,6 @@   <dd>Low-voiced stringed instrument.</dd> </dl> <hr />-<h1>HTML Blocks</h1>-<p>Simple block on one line:</p>-foo<p>And nested without indentation:</p>-foobar<p>Interpreted markdown in a table:</p>-This is <em>emphasized</em>. And this is <strong>strong</strong><p>Here's a simple block:</p>-foo<p>This should be a code block, though:</p>-<pre><code>&lt;div>-    foo-&lt;/div>-</code></pre>-<p>As should this:</p>-<pre><code>&lt;div>foo&lt;/div>-</code></pre>-<p>Now, nested:</p>-foo<p>This should just be an HTML comment:</p>-<p>Multiline:</p>-<p>Code block:</p>-<pre><code>&lt;!-- Comment -->-</code></pre>-<p>Just plain comment, with trailing spaces on the line:</p>-<p>Code:</p>-<pre><code>&lt;hr />-</code></pre>-<p>Hr's:</p>-<hr />-<hr />-<hr />-<hr />-<hr />-<hr />-<hr />-<hr />-<hr />-<hr /> <h1>Inline Markup</h1> <p>This is <em>emphasized</em>, and so <em>is this</em>.</p> <p>This is <strong>strong</strong>, and so <strong>is this</strong>.</p>
tests/html-reader.native view
@@ -183,39 +183,6 @@  ,([Str "Cello",LineBreak,Str "Violoncello"],    [[Plain [Str "Low",Str "-",Str "voiced",Space,Str "stringed",Space,Str "instrument",Str "."]]])] ,HorizontalRule-,Header 1 [Str "HTML",Space,Str "Blocks"]-,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"]-,Plain [Str "foo"]-,Para [Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"]-,Plain [Str "foobar"]-,Para [Str "Interpreted",Space,Str "markdown",Space,Str "in",Space,Str "a",Space,Str "table:"]-,Plain [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ".",Space,Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"]]-,Para [Str "Here",Str "'",Str "s",Space,Str "a",Space,Str "simple",Space,Str "block:"]-,Plain [Str "foo"]-,Para [Str "This",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "code",Space,Str "block,",Space,Str "though:"]-,CodeBlock ("",[],[]) "<div>\n    foo\n</div>"-,Para [Str "As",Space,Str "should",Space,Str "this:"]-,CodeBlock ("",[],[]) "<div>foo</div>"-,Para [Str "Now,",Space,Str "nested:"]-,Plain [Str "foo"]-,Para [Str "This",Space,Str "should",Space,Str "just",Space,Str "be",Space,Str "an",Space,Str "HTML",Space,Str "comment:"]-,Para [Str "Multiline:"]-,Para [Str "Code",Space,Str "block:"]-,CodeBlock ("",[],[]) "<!-- Comment -->"-,Para [Str "Just",Space,Str "plain",Space,Str "comment,",Space,Str "with",Space,Str "trailing",Space,Str "spaces",Space,Str "on",Space,Str "the",Space,Str "line:"]-,Para [Str "Code:"]-,CodeBlock ("",[],[]) "<hr />"-,Para [Str "Hr",Str "'",Str "s:"]-,HorizontalRule-,HorizontalRule-,HorizontalRule-,HorizontalRule-,HorizontalRule-,HorizontalRule-,HorizontalRule-,HorizontalRule-,HorizontalRule-,HorizontalRule ,Header 1 [Str "Inline",Space,Str "Markup"] ,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."] ,Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."]@@ -293,7 +260,7 @@ ,Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by a tab"),Str "."] ,Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with \"quotes\" in it")] ,Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")]-,Plain [Str "Email",Space,Str "link",Space,Str "(nobody",Space,Str "[at]",Space,Str "nowhere",Str ".",Str "net)"]+,Para [Str "Email",Space,Str "link",Space,Str "(nobody",Space,Str "[at]",Space,Str "nowhere",Str ".",Str "net)"] ,Para [Link [Str "Empty"] ("",""),Str "."] ,Header 2 [Str "Reference"] ,Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]@@ -319,7 +286,7 @@  [[Plain [Str "In",Space,Str "a",Space,Str "list?"]]  ,[Plain [Link [Str "http://example",Str ".",Str "com/"] ("http://example.com/","")]]  ,[Plain [Str "It",Space,Str "should",Str "."]]]-,Plain [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address:",Space,Str "nobody",Space,Str "[at]",Space,Str "nowhere",Str ".",Str "net"]+,Para [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address:",Space,Str "nobody",Space,Str "[at]",Space,Str "nowhere",Str ".",Str "net"] ,BlockQuote  [Para [Str "Blockquoted:",Space,Link [Str "http://example",Str ".",Str "com/"] ("http://example.com/","")]] ,Para [Str "Auto",Str "-",Str "links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"]
tests/lhs-test.nohl.html view
@@ -4,30 +4,14 @@   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   <meta name="generator" content="pandoc" />   <title></title>-  <style type="text/css">-table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode, table.sourceCode pre -   { margin: 0; padding: 0; border: 0; vertical-align: baseline; border: none; }-td.lineNumbers { border-right: 1px solid #AAAAAA; text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px; }-td.sourceCode { padding-left: 5px; }-code.sourceCode span.kw { color: #007020; font-weight: bold; } -code.sourceCode span.dt { color: #902000; }-code.sourceCode span.dv { color: #40a070; }-code.sourceCode span.bn { color: #40a070; }-code.sourceCode span.fl { color: #40a070; }-code.sourceCode span.ch { color: #4070a0; }-code.sourceCode span.st { color: #4070a0; }-code.sourceCode span.co { color: #60a0b0; font-style: italic; }-code.sourceCode span.ot { color: #007020; }-code.sourceCode span.al { color: red; font-weight: bold; }-code.sourceCode span.fu { color: #06287e; }-code.sourceCode span.re { }-code.sourceCode span.er { color: red; font-weight: bold; }-  </style> </head> <body> <h1 id="lhs-test">lhs test</h1> <p><code>unsplit</code> is an arrow that takes a pair of values and combines them to return a single value:</p>-<pre class="sourceCode"><code class="sourceCode haskell"><span class="ot">unsplit </span><span class="ot">::</span> (<span class="dt">Arrow</span> a) <span class="ot">=&gt;</span> (b <span class="ot">-&gt;</span> c <span class="ot">-&gt;</span> d) <span class="ot">-&gt;</span> a (b, c) d<br />unsplit <span class="fu">=</span> arr <span class="fu">.</span> <span class="fu">uncurry</span>       <br />          <span class="co">-- arr (\op (x,y) -&gt; x `op` y) </span></code></pre>+<pre class="sourceCode haskell"><code>unsplit :: (Arrow a) =&gt; (b -&gt; c -&gt; d) -&gt; a (b, c) d+unsplit = arr . uncurry       +          -- arr (\op (x,y) -&gt; x `op` y) +</code></pre> <p><code>(***)</code> 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).</p> <pre><code>f *** g = first f &gt;&gt;&gt; second g </code></pre>
tests/lhs-test.nohl.html+lhs view
@@ -4,30 +4,14 @@   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   <meta name="generator" content="pandoc" />   <title></title>-  <style type="text/css">-table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode, table.sourceCode pre -   { margin: 0; padding: 0; border: 0; vertical-align: baseline; border: none; }-td.lineNumbers { border-right: 1px solid #AAAAAA; text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px; }-td.sourceCode { padding-left: 5px; }-code.sourceCode span.kw { color: #007020; font-weight: bold; } -code.sourceCode span.dt { color: #902000; }-code.sourceCode span.dv { color: #40a070; }-code.sourceCode span.bn { color: #40a070; }-code.sourceCode span.fl { color: #40a070; }-code.sourceCode span.ch { color: #4070a0; }-code.sourceCode span.st { color: #4070a0; }-code.sourceCode span.co { color: #60a0b0; font-style: italic; }-code.sourceCode span.ot { color: #007020; }-code.sourceCode span.al { color: red; font-weight: bold; }-code.sourceCode span.fu { color: #06287e; }-code.sourceCode span.re { }-code.sourceCode span.er { color: red; font-weight: bold; }-  </style> </head> <body> <h1 id="lhs-test">lhs test</h1> <p><code>unsplit</code> is an arrow that takes a pair of values and combines them to return a single value:</p>-<pre class="sourceCode"><code class="sourceCode haskell">&gt; <span class="ot">unsplit </span><span class="ot">::</span> (<span class="dt">Arrow</span> a) <span class="ot">=&gt;</span> (b <span class="ot">-&gt;</span> c <span class="ot">-&gt;</span> d) <span class="ot">-&gt;</span> a (b, c) d<br />&gt; unsplit <span class="fu">=</span> arr <span class="fu">.</span> <span class="fu">uncurry</span>       <br />&gt;           <span class="co">-- arr (\op (x,y) -&gt; x `op` y) </span></code></pre>+<pre class="sourceCode literate haskell"><code>&gt; unsplit :: (Arrow a) =&gt; (b -&gt; c -&gt; d) -&gt; a (b, c) d+&gt; unsplit = arr . uncurry       +&gt;           -- arr (\op (x,y) -&gt; x `op` y) +</code></pre> <p><code>(***)</code> 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).</p> <pre><code>f *** g = first f &gt;&gt;&gt; second g </code></pre>
tests/rst-reader.native view
@@ -222,7 +222,7 @@ ,Para [Str "But",Space,Str "not",Space,Str "here",Str ":"] ,CodeBlock ("",[],[]) "http://example.com/" ,Header 1 [Str "Images"]-,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902)",Str ":"]+,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(",Str "1902",Str ")",Str ":"] ,Plain [Image [Str "image"] ("lalune.jpg","")] ,Plain [Image [Str "Voyage dans la Lune"] ("lalune.jpg","")] ,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon",Str "."]
tests/s5.basic.html view
@@ -35,16 +35,13 @@   <h4>July 15, 2006</h4> </div> <div class="slide">- <h1>First slide</h1> <ul> <li>first bullet</li> <li>second bullet</li> </ul> </div>- <div class="slide">- <h1>Math</h1> <ul> <li><span class="math">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span></li>
tests/s5.fancy.html view
@@ -234,16 +234,13 @@   <h4>July 15, 2006</h4> </div> <div class="slide">- <h1>First slide</h1> <ul class="incremental"> <li>first bullet</li> <li>second bullet</li> </ul> </div>- <div class="slide">- <h1>Math</h1> <ul class="incremental"> <li><span class="LaTeX">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span></li>
tests/tables.latex view
@@ -1,121 +1,176 @@ Simple table with caption: -\begin{table}[h]-\begin{center}-\begin{tabular}{rlcl}-Right & Left & Center & Default\\-\hline-12 & 12 & 12 & 12\\-123 & 123 & 123 & 123\\-1 & 1 & 1 & 1\\-\end{tabular}-\end{center}-\caption{Demonstration of simple table syntax.}-\end{table}+\ctable[caption = Demonstration of simple table syntax.,+pos = H, center, botcap]{rlcl}+{% notes+}+{% rows+\FL+Right & Left & Center & Default+\ML+12 & 12 & 12 & 12+\\\noalign{\medskip}+123 & 123 & 123 & 123+\\\noalign{\medskip}+1 & 1 & 1 & 1+\LL+}  Simple table without caption: -\begin{center}-\begin{tabular}{rlcl}-Right & Left & Center & Default\\-\hline-12 & 12 & 12 & 12\\-123 & 123 & 123 & 123\\-1 & 1 & 1 & 1\\-\end{tabular}-\end{center}+\ctable[pos = H, center, botcap]{rlcl}+{% notes+}+{% rows+\FL+Right & Left & Center & Default+\ML+12 & 12 & 12 & 12+\\\noalign{\medskip}+123 & 123 & 123 & 123+\\\noalign{\medskip}+1 & 1 & 1 & 1+\LL+}  Simple table indented two spaces: -\begin{table}[h]-\begin{center}-\begin{tabular}{rlcl}-Right & Left & Center & Default\\-\hline-12 & 12 & 12 & 12\\-123 & 123 & 123 & 123\\-1 & 1 & 1 & 1\\-\end{tabular}-\end{center}-\caption{Demonstration of simple table syntax.}-\end{table}+\ctable[caption = Demonstration of simple table syntax.,+pos = H, center, botcap]{rlcl}+{% notes+}+{% rows+\FL+Right & Left & Center & Default+\ML+12 & 12 & 12 & 12+\\\noalign{\medskip}+123 & 123 & 123 & 123+\\\noalign{\medskip}+1 & 1 & 1 & 1+\LL+}  Multiline table with caption: -\begin{table}[h]-\begin{center}-\begin{tabular}{>{\PBS\centering\hspace{0pt}}p{0.15\columnwidth}>{\PBS\raggedright\hspace{0pt}}p{0.14\columnwidth}>{\PBS\raggedleft\hspace{0pt}}p{0.16\columnwidth}>{\PBS\raggedright\hspace{0pt}}p{0.34\columnwidth}}-\parbox{0.15\columnwidth}{Centered Header-} & \parbox{0.14\columnwidth}{Left Aligned-} & \parbox{0.16\columnwidth}{Right Aligned-} & \parbox{0.34\columnwidth}{Default aligned-}\\-\hline-\parbox{0.15\columnwidth}{First-} & \parbox{0.14\columnwidth}{row-} & \parbox{0.16\columnwidth}{12.0-} & \parbox{0.34\columnwidth}{Example of a row that spans multiple lines.-}\\-\parbox{0.15\columnwidth}{Second-} & \parbox{0.14\columnwidth}{row-} & \parbox{0.16\columnwidth}{5.0-} & \parbox{0.34\columnwidth}{Here's another one. Note the blank line between-rows.-}\\-\end{tabular}-\end{center}-\caption{Here's the caption. It may span multiple lines.}-\end{table}+\ctable[caption = Here's the caption. It may span multiple lines.,+pos = H, center, botcap]{clrl}+{% notes+}+{% rows+\FL+\parbox[b]{0.15\columnwidth}{\centering+Centered Header+} & \parbox[b]{0.14\columnwidth}{\raggedright+Left Aligned+} & \parbox[b]{0.16\columnwidth}{\raggedleft+Right Aligned+} & \parbox[b]{0.34\columnwidth}{\raggedright+Default aligned+}+\ML+\parbox[t]{0.15\columnwidth}{\centering+First+} & \parbox[t]{0.14\columnwidth}{\raggedright+row+} & \parbox[t]{0.16\columnwidth}{\raggedleft+12.0+} & \parbox[t]{0.34\columnwidth}{\raggedright+Example of a row that spans multiple lines.+}+\\\noalign{\medskip}+\parbox[t]{0.15\columnwidth}{\centering+Second+} & \parbox[t]{0.14\columnwidth}{\raggedright+row+} & \parbox[t]{0.16\columnwidth}{\raggedleft+5.0+} & \parbox[t]{0.34\columnwidth}{\raggedright+Here's another one. Note the blank line between rows.+}+\LL+}  Multiline table without caption: -\begin{center}-\begin{tabular}{>{\PBS\centering\hspace{0pt}}p{0.15\columnwidth}>{\PBS\raggedright\hspace{0pt}}p{0.14\columnwidth}>{\PBS\raggedleft\hspace{0pt}}p{0.16\columnwidth}>{\PBS\raggedright\hspace{0pt}}p{0.34\columnwidth}}-\parbox{0.15\columnwidth}{Centered Header-} & \parbox{0.14\columnwidth}{Left Aligned-} & \parbox{0.16\columnwidth}{Right Aligned-} & \parbox{0.34\columnwidth}{Default aligned-}\\-\hline-\parbox{0.15\columnwidth}{First-} & \parbox{0.14\columnwidth}{row-} & \parbox{0.16\columnwidth}{12.0-} & \parbox{0.34\columnwidth}{Example of a row that spans multiple lines.-}\\-\parbox{0.15\columnwidth}{Second-} & \parbox{0.14\columnwidth}{row-} & \parbox{0.16\columnwidth}{5.0-} & \parbox{0.34\columnwidth}{Here's another one. Note the blank line between-rows.-}\\-\end{tabular}-\end{center}+\ctable[pos = H, center, botcap]{clrl}+{% notes+}+{% rows+\FL+\parbox[b]{0.15\columnwidth}{\centering+Centered Header+} & \parbox[b]{0.14\columnwidth}{\raggedright+Left Aligned+} & \parbox[b]{0.16\columnwidth}{\raggedleft+Right Aligned+} & \parbox[b]{0.34\columnwidth}{\raggedright+Default aligned+}+\ML+\parbox[t]{0.15\columnwidth}{\centering+First+} & \parbox[t]{0.14\columnwidth}{\raggedright+row+} & \parbox[t]{0.16\columnwidth}{\raggedleft+12.0+} & \parbox[t]{0.34\columnwidth}{\raggedright+Example of a row that spans multiple lines.+}+\\\noalign{\medskip}+\parbox[t]{0.15\columnwidth}{\centering+Second+} & \parbox[t]{0.14\columnwidth}{\raggedright+row+} & \parbox[t]{0.16\columnwidth}{\raggedleft+5.0+} & \parbox[t]{0.34\columnwidth}{\raggedright+Here's another one. Note the blank line between rows.+}+\LL+}  Table without column headers: -\begin{center}-\begin{tabular}{rlcr}-12 & 12 & 12 & 12\\-123 & 123 & 123 & 123\\-1 & 1 & 1 & 1\\-\end{tabular}-\end{center}+\ctable[pos = H, center, botcap]{rlcr}+{% notes+}+{% rows+\FL+12 & 12 & 12 & 12+\\\noalign{\medskip}+123 & 123 & 123 & 123+\\\noalign{\medskip}+1 & 1 & 1 & 1+\LL+}  Multiline table without column headers: -\begin{center}-\begin{tabular}{>{\PBS\centering\hspace{0pt}}p{0.15\columnwidth}>{\PBS\raggedright\hspace{0pt}}p{0.14\columnwidth}>{\PBS\raggedleft\hspace{0pt}}p{0.16\columnwidth}>{\PBS\raggedright\hspace{0pt}}p{0.34\columnwidth}}-\parbox{0.15\columnwidth}{First-} & \parbox{0.14\columnwidth}{row-} & \parbox{0.16\columnwidth}{12.0-} & \parbox{0.34\columnwidth}{Example of a row that spans multiple lines.-}\\-\parbox{0.15\columnwidth}{Second-} & \parbox{0.14\columnwidth}{row-} & \parbox{0.16\columnwidth}{5.0-} & \parbox{0.34\columnwidth}{Here's another one. Note the blank line between-rows.-}\\-\end{tabular}-\end{center}+\ctable[pos = H, center, botcap]{clrl}+{% notes+}+{% rows+\FL+\parbox[t]{0.15\columnwidth}{\centering+First+} & \parbox[t]{0.14\columnwidth}{\raggedright+row+} & \parbox[t]{0.16\columnwidth}{\raggedleft+12.0+} & \parbox[t]{0.34\columnwidth}{\raggedright+Example of a row that spans multiple lines.+}+\\\noalign{\medskip}+\parbox[t]{0.15\columnwidth}{\centering+Second+} & \parbox[t]{0.14\columnwidth}{\raggedright+row+} & \parbox[t]{0.16\columnwidth}{\raggedleft+5.0+} & \parbox[t]{0.34\columnwidth}{\raggedright+Here's another one. Note the blank line between rows.+}+\LL+} 
tests/tables.opendocument view
@@ -65,7 +65,8 @@ </table:table> <text:p text:style-name="Caption">Demonstration of simple table syntax.</text:p>-<text:p text:style-name="Text_20_body">Simple table without caption:</text:p>+<text:p text:style-name="First_20_paragraph">Simple table without+caption:</text:p> <table:table table:name="Table2" table:style-name="Table2">   <table:table-column table:style-name="Table2.A" />   <table:table-column table:style-name="Table2.B" />@@ -130,7 +131,7 @@     </table:table-cell>   </table:table-row> </table:table>-<text:p text:style-name="Text_20_body">Simple table indented two+<text:p text:style-name="First_20_paragraph">Simple table indented two spaces:</text:p> <table:table table:name="Table3" table:style-name="Table3">   <table:table-column table:style-name="Table3.A" />@@ -198,7 +199,8 @@ </table:table> <text:p text:style-name="Caption">Demonstration of simple table syntax.</text:p>-<text:p text:style-name="Text_20_body">Multiline table with caption:</text:p>+<text:p text:style-name="First_20_paragraph">Multiline table with+caption:</text:p> <table:table table:name="Table4" table:style-name="Table4">   <table:table-column table:style-name="Table4.A" />   <table:table-column table:style-name="Table4.B" />@@ -253,7 +255,7 @@ </table:table> <text:p text:style-name="Caption">Here's the caption. It may span multiple lines.</text:p>-<text:p text:style-name="Text_20_body">Multiline table without+<text:p text:style-name="First_20_paragraph">Multiline table without caption:</text:p> <table:table table:name="Table5" table:style-name="Table5">   <table:table-column table:style-name="Table5.A" />@@ -307,7 +309,8 @@     </table:table-cell>   </table:table-row> </table:table>-<text:p text:style-name="Text_20_body">Table without column headers:</text:p>+<text:p text:style-name="First_20_paragraph">Table without column+headers:</text:p> <table:table table:name="Table6" table:style-name="Table6">   <table:table-column table:style-name="Table6.A" />   <table:table-column table:style-name="Table6.B" />@@ -356,7 +359,7 @@     </table:table-cell>   </table:table-row> </table:table>-<text:p text:style-name="Text_20_body">Multiline table without column+<text:p text:style-name="First_20_paragraph">Multiline table without column headers:</text:p> <table:table table:name="Table7" table:style-name="Table7">   <table:table-column table:style-name="Table7.A" />
tests/textile-reader.native view
@@ -78,6 +78,7 @@ ,Para [Str "Just",Space,Str "a",Space,Link [Str "url"] ("http://www.url.com","")] ,Para [Link [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")] ,Para [Str "Automatic",Space,Str "linking",Space,Str "to",Space,Link [Str "http://www.example.com"] ("http://www.example.com",""),Space,Str "and",Space,Link [Str "foobar@example.com"] ("mailto:foobar@example.com",""),Str "."]+,Para [Link [Str "Example"] ("http://www.example.com/",""),Str ":",Space,Str "Example",Space,Str "of",Space,Str "a",Space,Str "link",Space,Str "followed",Space,Str "by",Space,Str "a",Space,Str "colon",Str "."] ,Header 1 [Str "Tables"] ,Para [Str "Textile",Space,Str "allows",Space,Str "tables",Space,Str "with",Space,Str "and",Space,Str "without",Space,Str "headers",Space,Str ":"] ,Header 2 [Str "Without",Space,Str "headers"]
tests/textile-reader.textile view
@@ -141,6 +141,8 @@  Automatic linking to http://www.example.com and foobar@example.com. +"Example":http://www.example.com/: Example of a link followed by a colon.+ h1. Tables  Textile allows tables with and without headers :
tests/writer.opendocument view
@@ -874,12 +874,12 @@ <text:h text:style-name="Heading_20_2" text:outline-level="2">Level 2 with <text:span text:style-name="T2">emphasis</text:span></text:h> <text:h text:style-name="Heading_20_3" text:outline-level="3">Level 3</text:h>-<text:p text:style-name="Text_20_body">with no blank line</text:p>+<text:p text:style-name="First_20_paragraph">with no blank line</text:p> <text:h text:style-name="Heading_20_2" text:outline-level="2">Level 2</text:h>-<text:p text:style-name="Text_20_body">with no blank line</text:p>+<text:p text:style-name="First_20_paragraph">with no blank line</text:p> <text:p text:style-name="Horizontal_20_Line" /> <text:h text:style-name="Heading_20_1" text:outline-level="1">Paragraphs</text:h>-<text:p text:style-name="Text_20_body">Here&#8217;s a regular+<text:p text:style-name="First_20_paragraph">Here&#8217;s a regular paragraph.</text:p> <text:p text:style-name="Text_20_body">In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle@@ -891,7 +891,7 @@ <text:p text:style-name="Horizontal_20_Line" /> <text:h text:style-name="Heading_20_1" text:outline-level="1">Block Quotes</text:h>-<text:p text:style-name="Text_20_body">E-mail style:</text:p>+<text:p text:style-name="First_20_paragraph">E-mail style:</text:p> <text:p text:style-name="P1">This is a block quote. It is pretty short.</text:p> <text:p text:style-name="P2">Code in a block quote:</text:p>@@ -910,13 +910,13 @@ <text:p text:style-name="P2">Nested block quotes:</text:p> <text:p text:style-name="P7">nested</text:p> <text:p text:style-name="P8">nested</text:p>-<text:p text:style-name="Text_20_body">This should not be a block quote: 2-&gt; 1.</text:p>+<text:p text:style-name="First_20_paragraph">This should not be a block quote:+2 &gt; 1.</text:p> <text:p text:style-name="Text_20_body">And a following paragraph.</text:p> <text:p text:style-name="Horizontal_20_Line" /> <text:h text:style-name="Heading_20_1" text:outline-level="1">Code Blocks</text:h>-<text:p text:style-name="Text_20_body">Code:</text:p>+<text:p text:style-name="First_20_paragraph">Code:</text:p> <text:p text:style-name="P9">---- (should be four hyphens)</text:p> <text:p text:style-name="P10"></text:p> <text:p text:style-name="P11">sub status {</text:p>@@ -924,14 +924,14 @@ <text:p text:style-name="P13">}</text:p> <text:p text:style-name="P14"></text:p> <text:p text:style-name="P15">this code block is indented by one tab</text:p>-<text:p text:style-name="Text_20_body">And:</text:p>+<text:p text:style-name="First_20_paragraph">And:</text:p> <text:p text:style-name="P16"><text:s text:c="4" />this code block is indented by two tabs</text:p> <text:p text:style-name="P17"></text:p> <text:p text:style-name="P18">These should not be escaped: <text:s text:c="1" />\$ \\ \&gt; \[ \{</text:p> <text:p text:style-name="Horizontal_20_Line" /> <text:h text:style-name="Heading_20_1" text:outline-level="1">Lists</text:h> <text:h text:style-name="Heading_20_2" text:outline-level="2">Unordered</text:h>-<text:p text:style-name="Text_20_body">Asterisks tight:</text:p>+<text:p text:style-name="First_20_paragraph">Asterisks tight:</text:p> <text:list text:style-name="L2">   <text:list-item>     <text:p text:style-name="P19">asterisk 1</text:p>@@ -943,7 +943,7 @@     <text:p text:style-name="P19">asterisk 3</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">Asterisks loose:</text:p>+<text:p text:style-name="First_20_paragraph">Asterisks loose:</text:p> <text:list text:style-name="L3">   <text:list-item>     <text:p text:style-name="P20">asterisk 1</text:p>@@ -955,7 +955,7 @@     <text:p text:style-name="P20">asterisk 3</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">Pluses tight:</text:p>+<text:p text:style-name="First_20_paragraph">Pluses tight:</text:p> <text:list text:style-name="L4">   <text:list-item>     <text:p text:style-name="P21">Plus 1</text:p>@@ -967,7 +967,7 @@     <text:p text:style-name="P21">Plus 3</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">Pluses loose:</text:p>+<text:p text:style-name="First_20_paragraph">Pluses loose:</text:p> <text:list text:style-name="L5">   <text:list-item>     <text:p text:style-name="P22">Plus 1</text:p>@@ -979,7 +979,7 @@     <text:p text:style-name="P22">Plus 3</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">Minuses tight:</text:p>+<text:p text:style-name="First_20_paragraph">Minuses tight:</text:p> <text:list text:style-name="L6">   <text:list-item>     <text:p text:style-name="P23">Minus 1</text:p>@@ -991,7 +991,7 @@     <text:p text:style-name="P23">Minus 3</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">Minuses loose:</text:p>+<text:p text:style-name="First_20_paragraph">Minuses loose:</text:p> <text:list text:style-name="L7">   <text:list-item>     <text:p text:style-name="P24">Minus 1</text:p>@@ -1004,7 +1004,7 @@   </text:list-item> </text:list> <text:h text:style-name="Heading_20_2" text:outline-level="2">Ordered</text:h>-<text:p text:style-name="Text_20_body">Tight:</text:p>+<text:p text:style-name="First_20_paragraph">Tight:</text:p> <text:list text:style-name="L8">   <text:list-item>     <text:p text:style-name="P25">First</text:p>@@ -1016,7 +1016,7 @@     <text:p text:style-name="P25">Third</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">and:</text:p>+<text:p text:style-name="First_20_paragraph">and:</text:p> <text:list text:style-name="L9">   <text:list-item>     <text:p text:style-name="P26">One</text:p>@@ -1028,7 +1028,7 @@     <text:p text:style-name="P26">Three</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">Loose using tabs:</text:p>+<text:p text:style-name="First_20_paragraph">Loose using tabs:</text:p> <text:list text:style-name="L10">   <text:list-item>     <text:p text:style-name="P27">First</text:p>@@ -1040,7 +1040,7 @@     <text:p text:style-name="P27">Third</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">and using spaces:</text:p>+<text:p text:style-name="First_20_paragraph">and using spaces:</text:p> <text:list text:style-name="L11">   <text:list-item>     <text:p text:style-name="P28">One</text:p>@@ -1052,7 +1052,7 @@     <text:p text:style-name="P28">Three</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">Multiple paragraphs:</text:p>+<text:p text:style-name="First_20_paragraph">Multiple paragraphs:</text:p> <text:list text:style-name="L12">   <text:list-item>     <text:p text:style-name="P29">Item 1, graf one.</text:p>@@ -1080,7 +1080,7 @@     </text:list>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">Here&#8217;s another:</text:p>+<text:p text:style-name="First_20_paragraph">Here&#8217;s another:</text:p> <text:list text:style-name="L16">   <text:list-item>     <text:p text:style-name="P33">First</text:p>@@ -1103,7 +1103,7 @@     <text:p text:style-name="P33">Third</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">Same thing but with+<text:p text:style-name="First_20_paragraph">Same thing but with paragraphs:</text:p> <text:list text:style-name="L18">   <text:list-item>@@ -1176,7 +1176,7 @@     </text:list>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">Nesting:</text:p>+<text:p text:style-name="First_20_paragraph">Nesting:</text:p> <text:list text:style-name="L23">   <text:list-item>     <text:p text:style-name="P40">Upper Alpha</text:p>@@ -1197,7 +1197,7 @@     </text:list>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">Autonumbering:</text:p>+<text:p text:style-name="First_20_paragraph">Autonumbering:</text:p> <text:list text:style-name="L24">   <text:list-item>     <text:p text:style-name="P41">Autonumber.</text:p>@@ -1211,13 +1211,14 @@     </text:list>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">Should not be a list item:</text:p>+<text:p text:style-name="First_20_paragraph">Should not be a list+item:</text:p> <text:p text:style-name="Text_20_body">M.A. 2007</text:p> <text:p text:style-name="Text_20_body">B. Williams</text:p> <text:p text:style-name="Horizontal_20_Line" /> <text:h text:style-name="Heading_20_1" text:outline-level="1">Definition Lists</text:h>-<text:p text:style-name="Text_20_body">Tight using spaces:</text:p>+<text:p text:style-name="First_20_paragraph">Tight using spaces:</text:p> <text:p text:style-name="Definition_20_Term_20_Tight">apple</text:p> <text:p text:style-name="Definition_20_Definition_20_Tight">red fruit</text:p> <text:p text:style-name="Definition_20_Term_20_Tight">orange</text:p>@@ -1226,7 +1227,7 @@ <text:p text:style-name="Definition_20_Term_20_Tight">banana</text:p> <text:p text:style-name="Definition_20_Definition_20_Tight">yellow fruit</text:p>-<text:p text:style-name="Text_20_body">Tight using tabs:</text:p>+<text:p text:style-name="First_20_paragraph">Tight using tabs:</text:p> <text:p text:style-name="Definition_20_Term_20_Tight">apple</text:p> <text:p text:style-name="Definition_20_Definition_20_Tight">red fruit</text:p> <text:p text:style-name="Definition_20_Term_20_Tight">orange</text:p>@@ -1235,14 +1236,15 @@ <text:p text:style-name="Definition_20_Term_20_Tight">banana</text:p> <text:p text:style-name="Definition_20_Definition_20_Tight">yellow fruit</text:p>-<text:p text:style-name="Text_20_body">Loose:</text:p>+<text:p text:style-name="First_20_paragraph">Loose:</text:p> <text:p text:style-name="Definition_20_Term">apple</text:p> <text:p text:style-name="Definition_20_Definition">red fruit</text:p> <text:p text:style-name="Definition_20_Term">orange</text:p> <text:p text:style-name="Definition_20_Definition">orange fruit</text:p> <text:p text:style-name="Definition_20_Term">banana</text:p> <text:p text:style-name="Definition_20_Definition">yellow fruit</text:p>-<text:p text:style-name="Text_20_body">Multiple blocks with italics:</text:p>+<text:p text:style-name="First_20_paragraph">Multiple blocks with+italics:</text:p> <text:p text:style-name="Definition_20_Term"><text:span text:style-name="T3">apple</text:span></text:p> <text:p text:style-name="Definition_20_Definition">red fruit</text:p><text:p text:style-name="Definition_20_Definition">contains@@ -1250,7 +1252,8 @@ <text:p text:style-name="Definition_20_Term"><text:span text:style-name="T4">orange</text:span></text:p> <text:p text:style-name="Definition_20_Definition">orange fruit</text:p><text:p text:style-name="P42">{ orange code block }</text:p><text:p text:style-name="P43">orange block quote</text:p>-<text:p text:style-name="Text_20_body">Multiple definitions, tight:</text:p>+<text:p text:style-name="First_20_paragraph">Multiple definitions,+tight:</text:p> <text:p text:style-name="Definition_20_Term_20_Tight">apple</text:p> <text:p text:style-name="Definition_20_Definition_20_Tight">red fruit</text:p> <text:p text:style-name="Definition_20_Definition_20_Tight">computer</text:p>@@ -1258,15 +1261,16 @@ <text:p text:style-name="Definition_20_Definition_20_Tight">orange fruit</text:p> <text:p text:style-name="Definition_20_Definition_20_Tight">bank</text:p>-<text:p text:style-name="Text_20_body">Multiple definitions, loose:</text:p>+<text:p text:style-name="First_20_paragraph">Multiple definitions,+loose:</text:p> <text:p text:style-name="Definition_20_Term">apple</text:p> <text:p text:style-name="Definition_20_Definition">red fruit</text:p> <text:p text:style-name="Definition_20_Definition">computer</text:p> <text:p text:style-name="Definition_20_Term">orange</text:p> <text:p text:style-name="Definition_20_Definition">orange fruit</text:p> <text:p text:style-name="Definition_20_Definition">bank</text:p>-<text:p text:style-name="Text_20_body">Blank line after term, indented marker,-alternate markers:</text:p>+<text:p text:style-name="First_20_paragraph">Blank line after term, indented+marker, alternate markers:</text:p> <text:p text:style-name="Definition_20_Term">apple</text:p> <text:p text:style-name="Definition_20_Definition">red fruit</text:p> <text:p text:style-name="Definition_20_Definition">computer</text:p>@@ -1282,7 +1286,8 @@ </text:list> <text:h text:style-name="Heading_20_1" text:outline-level="1">HTML Blocks</text:h>-<text:p text:style-name="Text_20_body">Simple block on one line:</text:p>+<text:p text:style-name="First_20_paragraph">Simple block on one+line:</text:p> <text:p text:style-name="Text_20_body">foo</text:p> <text:p text:style-name="Text_20_body">And nested without indentation:</text:p>@@ -1301,24 +1306,24 @@ <text:p text:style-name="P45">&lt;div&gt;</text:p> <text:p text:style-name="P46"><text:s text:c="4" />foo</text:p> <text:p text:style-name="P47">&lt;/div&gt;</text:p>-<text:p text:style-name="Text_20_body">As should this:</text:p>+<text:p text:style-name="First_20_paragraph">As should this:</text:p> <text:p text:style-name="P48">&lt;div&gt;foo&lt;/div&gt;</text:p>-<text:p text:style-name="Text_20_body">Now, nested:</text:p>+<text:p text:style-name="First_20_paragraph">Now, nested:</text:p> <text:p text:style-name="Text_20_body">foo</text:p> <text:p text:style-name="Text_20_body">This should just be an HTML comment:</text:p> <text:p text:style-name="Text_20_body">Multiline:</text:p> <text:p text:style-name="Text_20_body">Code block:</text:p> <text:p text:style-name="P49">&lt;!-- Comment --&gt;</text:p>-<text:p text:style-name="Text_20_body">Just plain comment, with trailing+<text:p text:style-name="First_20_paragraph">Just plain comment, with trailing spaces on the line:</text:p> <text:p text:style-name="Text_20_body">Code:</text:p> <text:p text:style-name="P50">&lt;hr /&gt;</text:p>-<text:p text:style-name="Text_20_body">Hr&#8217;s:</text:p>+<text:p text:style-name="First_20_paragraph">Hr&#8217;s:</text:p> <text:p text:style-name="Horizontal_20_Line" /> <text:h text:style-name="Heading_20_1" text:outline-level="1">Inline Markup</text:h>-<text:p text:style-name="Text_20_body">This is+<text:p text:style-name="First_20_paragraph">This is <text:span text:style-name="T7">emphasized</text:span>, and so <text:span text:style-name="T8">is</text:span><text:span text:style-name="T9"> </text:span><text:span text:style-name="T10">this</text:span>.</text:p>@@ -1365,8 +1370,8 @@ <text:p text:style-name="Horizontal_20_Line" /> <text:h text:style-name="Heading_20_1" text:outline-level="1">Smart quotes, ellipses, dashes</text:h>-<text:p text:style-name="Text_20_body">&#8220;Hello,&#8221; said the spider.-&#8220;&#8216;Shelob&#8217; is my name.&#8221;</text:p>+<text:p text:style-name="First_20_paragraph">&#8220;Hello,&#8221; said the+spider. &#8220;&#8216;Shelob&#8217; is my name.&#8221;</text:p> <text:p text:style-name="Text_20_body">&#8216;A&#8217;, &#8216;B&#8217;, and &#8216;C&#8217; are letters.</text:p> <text:p text:style-name="Text_20_body">&#8216;Oak,&#8217; &#8216;elm,&#8217;@@ -1413,7 +1418,8 @@     α + ω × <text:span text:style-name="T61">x</text:span><text:span text:style-name="T62">2</text:span>.</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">These shouldn&#8217;t be math:</text:p>+<text:p text:style-name="First_20_paragraph">These shouldn&#8217;t be+math:</text:p> <text:list text:style-name="L27">   <text:list-item>     <text:p text:style-name="P52">To get the famous equation, write@@ -1437,11 +1443,12 @@     23$.</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">Here&#8217;s a LaTeX table:</text:p>+<text:p text:style-name="First_20_paragraph">Here&#8217;s a LaTeX+table:</text:p> <text:p text:style-name="Horizontal_20_Line" /> <text:h text:style-name="Heading_20_1" text:outline-level="1">Special Characters</text:h>-<text:p text:style-name="Text_20_body">Here is some unicode:</text:p>+<text:p text:style-name="First_20_paragraph">Here is some unicode:</text:p> <text:list text:style-name="L28">   <text:list-item>     <text:p text:style-name="P53">I hat: Î</text:p>@@ -1459,8 +1466,8 @@     <text:p text:style-name="P53">copyright: ©</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">AT&amp;T has an ampersand in their-name.</text:p>+<text:p text:style-name="First_20_paragraph">AT&amp;T has an ampersand in+their name.</text:p> <text:p text:style-name="Text_20_body">AT&amp;T is another way to write it.</text:p> <text:p text:style-name="Text_20_body">This &amp; that.</text:p>@@ -1485,7 +1492,7 @@ <text:p text:style-name="Horizontal_20_Line" /> <text:h text:style-name="Heading_20_1" text:outline-level="1">Links</text:h> <text:h text:style-name="Heading_20_2" text:outline-level="2">Explicit</text:h>-<text:p text:style-name="Text_20_body">Just a+<text:p text:style-name="First_20_paragraph">Just a <text:a xlink:type="simple" xlink:href="/url/" office:name=""><text:span text:style-name="Definition">URL</text:span></text:a>.</text:p> <text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/" office:name="title"><text:span text:style-name="Definition">URL and title</text:span></text:a>.</text:p>@@ -1502,7 +1509,7 @@ link</text:span></text:a></text:p> <text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="" office:name=""><text:span text:style-name="Definition">Empty</text:span></text:a>.</text:p> <text:h text:style-name="Heading_20_2" text:outline-level="2">Reference</text:h>-<text:p text:style-name="Text_20_body">Foo+<text:p text:style-name="First_20_paragraph">Foo <text:a xlink:type="simple" xlink:href="/url/" office:name=""><text:span text:style-name="Definition">bar</text:span></text:a>.</text:p> <text:p text:style-name="Text_20_body">Foo <text:a xlink:type="simple" xlink:href="/url/" office:name=""><text:span text:style-name="Definition">bar</text:span></text:a>.</text:p>@@ -1521,13 +1528,13 @@ <text:a xlink:type="simple" xlink:href="/url" office:name=""><text:span text:style-name="Definition">thrice</text:span></text:a>.</text:p> <text:p text:style-name="Text_20_body">This should [not][] be a link.</text:p> <text:p text:style-name="P54">[not]: /url</text:p>-<text:p text:style-name="Text_20_body">Foo+<text:p text:style-name="First_20_paragraph">Foo <text:a xlink:type="simple" xlink:href="/url/" office:name="Title with &quot;quotes&quot; inside"><text:span text:style-name="Definition">bar</text:span></text:a>.</text:p> <text:p text:style-name="Text_20_body">Foo <text:a xlink:type="simple" xlink:href="/url/" office:name="Title with &quot;quote&quot; inside"><text:span text:style-name="Definition">biz</text:span></text:a>.</text:p> <text:h text:style-name="Heading_20_2" text:outline-level="2">With ampersands</text:h>-<text:p text:style-name="Text_20_body">Here&#8217;s a+<text:p text:style-name="First_20_paragraph">Here&#8217;s a <text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">link with an ampersand in the URL</text:span></text:a>.</text:p> <text:p text:style-name="Text_20_body">Here&#8217;s a link with an amersand in@@ -1540,7 +1547,7 @@ <text:a xlink:type="simple" xlink:href="/script?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">inline link in pointy braces</text:span></text:a>.</text:p> <text:h text:style-name="Heading_20_2" text:outline-level="2">Autolinks</text:h>-<text:p text:style-name="Text_20_body">With an ampersand:+<text:p text:style-name="First_20_paragraph">With an ampersand: <text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition"><text:span text:style-name="Teletype">http://example.com/?foo=1&amp;bar=2</text:span></text:span></text:a></text:p> <text:list text:style-name="L29">   <text:list-item>@@ -1553,24 +1560,24 @@     <text:p text:style-name="P55">It should.</text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">An e-mail address:+<text:p text:style-name="First_20_paragraph">An e-mail address: <text:a xlink:type="simple" xlink:href="mailto:nobody@nowhere.net" office:name=""><text:span text:style-name="Definition"><text:span text:style-name="Teletype">nobody@nowhere.net</text:span></text:span></text:a></text:p> <text:p text:style-name="P56">Blockquoted: <text:a xlink:type="simple" xlink:href="http://example.com/" office:name=""><text:span text:style-name="Definition"><text:span text:style-name="Teletype">http://example.com/</text:span></text:span></text:a></text:p>-<text:p text:style-name="Text_20_body">Auto-links should not occur here:+<text:p text:style-name="First_20_paragraph">Auto-links should not occur here: <text:span text:style-name="Teletype">&lt;http://example.com/&gt;</text:span></text:p> <text:p text:style-name="P57">or here: &lt;http://example.com/&gt;</text:p> <text:p text:style-name="Horizontal_20_Line" /> <text:h text:style-name="Heading_20_1" text:outline-level="1">Images</text:h>-<text:p text:style-name="Text_20_body">From &#8220;Voyage dans la Lune&#8221;-by Georges Melies (1902):</text:p>-<text:p text:style-name="Text_20_body"><draw:frame><draw:image xlink:href="lalune.jpg" xlink:type="simple"  xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p>+<text:p text:style-name="First_20_paragraph">From &#8220;Voyage dans la+Lune&#8221; by Georges Melies (1902):</text:p>+<text:p text:style-name="Text_20_body"><draw:frame><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p> <text:p text:style-name="Text_20_body">Here is a movie-<draw:frame><draw:image xlink:href="movie.jpg" xlink:type="simple"  xlink:show="embed" xlink:actuate="onLoad" /></draw:frame>+<draw:frame><draw:image xlink:href="movie.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame> icon.</text:p> <text:p text:style-name="Horizontal_20_Line" /> <text:h text:style-name="Heading_20_1" text:outline-level="1">Footnotes</text:h>-<text:p text:style-name="Text_20_body">Here is a footnote+<text:p text:style-name="First_20_paragraph">Here is a footnote reference,<text:note text:id="ftn0" text:note-class="footnote"><text:note-citation>1</text:note-citation><text:note-body><text:p text:style-name="Footnote">Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.</text:p></text:note-body></text:note>@@ -1600,8 +1607,8 @@     list.</text:p></text:note-body></text:note></text:p>   </text:list-item> </text:list>-<text:p text:style-name="Text_20_body">This paragraph should not be part of-the note, as it is not indented.</text:p>+<text:p text:style-name="First_20_paragraph">This paragraph should not be part+of the note, as it is not indented.</text:p> </office:text> </office:body> </office:document-content>