diff options
151 files changed, 6948 insertions, 2104 deletions
diff --git a/.travis.yml b/.travis.yml index 9a67ac32b..2901288e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,39 +1,87 @@ -# NB: don't set `language: haskell` here - -# Ensures that sudo is disabled, so that containerized builds are allowed +# This file has been generated -- see https://github.com/hvr/multi-ghc-travis +language: c sudo: false -# The following enables several GHC versions to be tested; often it's enough to test only against the last release in a major GHC version. Feel free to omit lines listings versions you don't need/want testing for. +cache: + directories: + - $HOME/.cabsnap + - $HOME/.cabal/packages + +before_cache: + - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log + - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar + matrix: - include: - - env: CABALVER=1.16 GHCVER=7.4.2 GHCOPTS="-Werror" JOPTS="" - addons: {apt: {packages: [cabal-install-1.16, ghc-7.4.2], sources: [hvr-ghc]}} - - env: CABALVER=1.18 GHCVER=7.6.3 GHCOPTS="-Werror" JOPTS="-j2" - addons: {apt: {packages: [cabal-install-1.18, ghc-7.6.3], sources: [hvr-ghc]}} - - env: CABALVER=1.18 GHCVER=7.8.4 GHCOPTS="-Werror" JOPTS="-j2" - addons: {apt: {packages: [cabal-install-1.18, ghc-7.8.4], sources: [hvr-ghc]}} - - env: CABALVER=1.22 GHCVER=7.10.1 GHCOPTS="" JOPTS="-j2" - addons: {apt: {packages: [cabal-install-1.22, ghc-7.10.1],sources: [hvr-ghc]}} -# - env: CABALVER=head GHCVER=head GHCOPTS="-Werror" JOPTS="-j2" -# addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}} - -# Note: the distinction between `before_install` and `install` is not important. + include: + - env: CABALVER=1.16 GHCVER=7.4.2 GHCOPTS=-Werror + compiler: ": #GHC 7.4.2" + addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.2], sources: [hvr-ghc]}} + - env: CABALVER=1.16 GHCVER=7.6.3 GHCOPTS=-Werror + compiler: ": #GHC 7.6.3" + addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3], sources: [hvr-ghc]}} + - env: CABALVER=1.18 GHCVER=7.8.4 GHCOPTS=-Werror + compiler: ": #GHC 7.8.4" + addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}} + - env: CABALVER=1.22 GHCVER=7.10.2 GHCOPTS=-Werror + compiler: ": #GHC 7.10.2" + addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2], sources: [hvr-ghc]}} + before_install: - - export PATH=/opt/ghc/$GHCVER/bin:$PATH + - unset CC + - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH install: - - cabal-$CABALVER update -# - git clone https://github.com/jgm/pandoc-types && cd pandoc-types && cabal-1.18 install && cd .. - - cabal-$CABALVER install $JOPTS --only-dependencies --enable-tests + - cabal --version + - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" + - if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ]; + then + zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz > + $HOME/.cabal/packages/hackage.haskell.org/00-index.tar; + fi + - travis_retry cabal update -v + - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config + - cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt + - sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt -# Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail. -script: - - | - if [ "${CABALVER}" != "1.16" ]; then - cabal-$CABALVER sdist --output-directory=build - cd build +# check whether current requested install-plan matches cached package-db snapshot + - if diff -u installplan.txt $HOME/.cabsnap/installplan.txt; + then + echo "cabal build-cache HIT"; + rm -rfv .ghc; + cp -a $HOME/.cabsnap/ghc $HOME/.ghc; + cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/; + else + echo "cabal build-cache MISS"; + rm -rf $HOME/.cabsnap; + mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin; + cabal install --only-dependencies --enable-tests --enable-benchmarks; fi - - cabal-$CABALVER configure --enable-tests -v2 # -v2 provides useful information for debugging - - cabal-$CABALVER build $JOPTS --ghc-options=$GHCOPTS # this builds all libraries and executables (including tests/benchmarks) - - cabal-$CABALVER test - - cabal-$CABALVER check + +# snapshot package-db on cache miss + - if [ ! -d $HOME/.cabsnap ]; + then + echo "snapshotting package-db to build-cache"; + mkdir $HOME/.cabsnap; + cp -a $HOME/.ghc $HOME/.cabsnap/ghc; + cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/; + fi + +# Here starts the actual work to be performed for the package under test; +# any command which exits with a non-zero exit code causes the build to fail. +script: + - if [ -f configure.ac ]; then autoreconf -i; fi + - cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging + - cabal build --ghc-options=$GHCOPTS # this builds all libraries and executables (including tests/benchmarks) + - cabal test + - cabal check +# Test that a source-distribution can be generated +# (with cabal >= 1.18 'cabal sdist' would work too): + - ./dist/setup/setup sdist + +# Check that the resulting source distribution can be built & installed. +# If there are no other `.tar.gz` files in `dist`, this can be even simpler: +# `cabal install --force-reinstalls dist/*-*.tar.gz` + - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && + (cd dist && cabal install --force-reinstalls "$SRC_TGZ") + +# EOF diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b321f868..eff033057 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,6 +25,32 @@ including A small test case (just a few lines) is ideal. If your input is large, try to whittle it down to the minimum necessary to illustrate the problem. +Out of scope? +------------- + +A less than perfect conversion does not necessarily mean there's +a bug in pandoc. Quoting from the README: + +> Because Pandoc's intermediate representation of a document is less +> expressive than many of the formats it converts between, one should +> not expect perfect conversions between every format and every other. +> Pandoc attempts to preserve the structural elements of a document, but +> not formatting details such as margin size. And some document elements, +> such as complex tables, may not fit into Pandoc's simple document +> model. While conversions from Pandoc's Markdown to all formats aspire +> to be perfect, conversions from formats more expressive than Pandoc's +> Markdown can be expected to be lossy. + +For example, both docx and odt can represent margin size, but because +pandoc's internal document model does not contain a representation of +margin size, this information will be lost on converting from docx +to odt. (You can, however, customize margin size using `--reference-odt`.) + +So before submitting a bug report, consider whether it might be +"out of scope." If it concerns a feature of documents that isn't +representable in pandoc's Markdown, then it very likely is. +(If in doubt, you can always ask on pandoc-discuss.) + Fixing bugs from the issue tracker ---------------------------------- @@ -106,6 +132,14 @@ Please follow these guidelines: 9. It is better not to introduce new dependencies. Dependencies on external C libraries should especially be avoided. +10. We aim for compatibility with ghc versions from 7.4.2 to the + latest release. All pull requests and commits are tested + automatically on travis-ci.org, using GHC versions in the + `Tested-With` stanza of `pandoc.cabal`. We currently relax + the "`-Wall` clean" requirement for GHC 7.10.x, because + there are so many warnings relating to the addition of type + classes to the Prelude. + Tests ----- @@ -8,8 +8,26 @@ There are also binary installers for Windows and Mac OS X. If you are installing the development version from github, see also: https://github.com/jgm/pandoc/wiki/Installing-the-development-version-of-pandoc -Quick install -------------- +Quick install with stack +------------------------ + +1. Install [stack](https://github.com/commercialhaskell/stack/wiki/Downloads). + +2. If you used git to get the pandoc source (as opposed to unpacking + a release tarball), do + + git submodule update --init + +3. In the pandoc source directory, + + stack install + + You may be prompted to run `stack setup`, which will automatically + download the ghc compiler if needed. + + +Quick install with cabal +------------------------ 1. Install the [Haskell platform]. This will give you [GHC] and the [cabal-install] build tool. @@ -23,6 +23,9 @@ test: bench: cabal bench +changes_github: + pandoc --filter extract-changes.hs changelog -t markdown_github | pbcopy + install: full cabal copy cabal register @@ -32,7 +35,10 @@ dist: man/pandoc.1 rm -rf "pandoc-${version}" tar xvzf dist/pandoc-${version}.tar.gz cd pandoc-${version} - cabal configure ${CABALARGS} && cabal build && cabal test && cd .. && rm -rf "pandoc-${version}" + stack setup && stack test && cd .. && rm -rf "pandoc-${version}" + +.travis.yml: pandoc.cabal make_travis_yml.hs + runghc make_travis_yml.hs $< > $@ debpkg: man/pandoc.1 ./make_deb.sh @@ -45,6 +51,7 @@ man/pandoc.1: README man/pandoc.1.template --filter man/capitalizeHeaders.hs \ --filter man/removeNotes.hs \ --filter man/removeLinks.hs \ + --variable version="pandoc $(version)" \ -o $@ download_stats: @@ -54,4 +61,4 @@ download_stats: clean: cabal clean -.PHONY: deps quick full install clean test bench osxpkg dist prof download_stats +.PHONY: deps quick full install clean test bench changes_github osxpkg dist prof download_stats @@ -1,6 +1,6 @@ % Pandoc User's Guide % John MacFarlane -% July 15, 2015 +% November 12, 2015 Synopsis ======== @@ -12,34 +12,84 @@ Description Pandoc is a [Haskell] library for converting from one markup format to another, and a command-line tool that uses this library. It can read -[Markdown], [CommonMark], and (subsets of) [Textile], -[reStructuredText], [HTML], [LaTeX], [MediaWiki markup], [TWiki -markup], [Haddock markup], [OPML], [Emacs Org-mode], [DocBook], +[Markdown], [CommonMark], [PHP Markdown Extra], [GitHub-Flavored Markdown], +and (subsets of) [Textile], [reStructuredText], [HTML], [LaTeX], [MediaWiki markup], [TWiki +markup], [Haddock markup], [OPML], [Emacs Org mode], [DocBook], [txt2tags], [EPUB], [ODT] and [Word docx]; and it can write plain text, -[Markdown], [reStructuredText], [XHTML], [HTML 5], [LaTeX] (including -[beamer] slide shows), [ConTeXt], [RTF], [OPML], [DocBook], +[Markdown], [CommonMark], [PHP Markdown Extra], [GitHub-Flavored Markdown], +[reStructuredText], [XHTML], [HTML5], [LaTeX] (including +[`beamer`] slide shows), [ConTeXt], [RTF], [OPML], [DocBook], [OpenDocument], [ODT], [Word docx], [GNU Texinfo], [MediaWiki markup], [DokuWiki markup], [Haddock markup], [EPUB] (v2 or v3), -[FictionBook2], [Textile], [groff man] pages, [Emacs Org-Mode], +[FictionBook2], [Textile], [groff man] pages, [Emacs Org mode], [AsciiDoc], [InDesign ICML], and [Slidy], [Slideous], [DZSlides], [reveal.js] or [S5] HTML slide shows. It can also produce [PDF] output -on systems where LaTeX is installed. - -Pandoc's enhanced version of markdown includes syntax for footnotes, -tables, flexible ordered lists, definition lists, fenced code blocks, -superscript, subscript, strikeout, title blocks, automatic tables of -contents, embedded LaTeX math, citations, and markdown inside HTML block -elements. (These enhancements, described below under -[Pandoc's markdown](#pandocs-markdown), can be disabled using the +on systems where LaTeX or ConTeXt is installed. + +Pandoc's enhanced version of Markdown includes syntax for [footnotes], +[tables], flexible [ordered lists], [definition lists], [fenced code blocks], +[superscripts and subscripts], [strikeout], [metadata blocks], automatic tables of +contents, embedded LaTeX [math], [citations], and [Markdown inside HTML block +elements][Extension: `markdown_in_html_blocks`]. (These enhancements, described below under +[Pandoc's Markdown], can be disabled using the `markdown_strict` input or output format.) -In contrast to most existing tools for converting markdown to HTML, which -use regex substitutions, Pandoc has a modular design: it consists of a +In contrast to most existing tools for converting Markdown to HTML, which +use regex substitutions, pandoc has a modular design: it consists of a set of readers, which parse text in a given format and produce a native representation of the document, and a set of writers, which convert this native representation into a target format. Thus, adding an input or output format requires only adding a reader or writer. +Because pandoc's intermediate representation of a document is less +expressive than many of the formats it converts between, one should +not expect perfect conversions between every format and every other. +Pandoc attempts to preserve the structural elements of a document, but +not formatting details such as margin size. And some document elements, +such as complex tables, may not fit into pandoc's simple document +model. While conversions from pandoc's Markdown to all formats aspire +to be perfect, conversions from formats more expressive than pandoc's +Markdown can be expected to be lossy. + +[Markdown]: http://daringfireball.net/projects/markdown/ +[CommonMark]: http://commonmark.org +[PHP Markdown Extra]: https://michelf.ca/projects/php-markdown/extra/ +[GitHub-Flavored Markdown]: https://help.github.com/articles/github-flavored-markdown/ +[reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html +[S5]: http://meyerweb.com/eric/tools/s5/ +[Slidy]: http://www.w3.org/Talks/Tools/Slidy/ +[Slideous]: http://goessner.net/articles/slideous/ +[HTML]: http://www.w3.org/html/ +[HTML5]: http://www.w3.org/TR/html5/ +[XHTML]: http://www.w3.org/TR/xhtml1/ +[LaTeX]: http://latex-project.org +[`beamer`]: https://ctan.org/pkg/beamer +[Beamer User's Guide]: http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/beamer/doc/beameruserguide.pdf +[ConTeXt]: http://contextgarden.net/ +[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format +[DocBook]: http://docbook.org +[txt2tags]: http://txt2tags.org +[EPUB]: http://idpf.org/epub +[OPML]: http://dev.opml.org/spec2.html +[OpenDocument]: http://opendocument.xml.org +[ODT]: http://en.wikipedia.org/wiki/OpenDocument +[Textile]: http://redcloth.org/textile +[MediaWiki markup]: https://www.mediawiki.org/wiki/Help:Formatting +[DokuWiki markup]: https://www.dokuwiki.org/dokuwiki +[TWiki markup]: http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules +[Haddock markup]: https://www.haskell.org/haddock/doc/html/ch03s08.html +[groff man]: http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man7/groff_man.7.html +[Haskell]: https://www.haskell.org +[GNU Texinfo]: http://www.gnu.org/software/texinfo/ +[Emacs Org mode]: http://orgmode.org +[AsciiDoc]: http://www.methods.co.nz/asciidoc/ +[DZSlides]: http://paulrouget.com/dzslides/ +[Word docx]: http://www.microsoft.com/interop/openup/openxml/default.aspx +[PDF]: https://www.adobe.com/pdf/ +[reveal.js]: http://lab.hakim.se/reveal-js/ +[FictionBook2]: http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1 +[InDesign ICML]: https://www.adobe.com/content/dam/Adobe/en/devnet/indesign/cs55-docs/IDML/idml-specification.pdf + Using `pandoc` -------------- @@ -59,7 +109,7 @@ document, use the `-s` or `--standalone` flag: pandoc -s -o output.html input.txt For more information on how standalone documents are produced, see -[Templates](#templates), below. +[Templates], below. Instead of a file, an absolute URI may be given. In this case pandoc will fetch the content using HTTP: @@ -74,11 +124,11 @@ The format of the input and output can be specified explicitly using command-line options. The input format can be specified using the `-r/--read` or `-f/--from` options, the output format using the `-w/--write` or `-t/--to` options. Thus, to convert `hello.txt` from -markdown to LaTeX, you could type: +Markdown to LaTeX, you could type: pandoc -f markdown -t latex hello.txt -To convert `hello.html` from html to markdown: +To convert `hello.html` from HTML to Markdown: pandoc -f html -t markdown hello.html @@ -93,16 +143,16 @@ the input and output filenames. Thus, for example, pandoc -o hello.tex hello.txt -will convert `hello.txt` from markdown to LaTeX. If no output file +will convert `hello.txt` from Markdown to LaTeX. If no output file is specified (so that output goes to *stdout*), or if the output file's extension is unknown, the output format will default to HTML. If no input file is specified (so that input comes from *stdin*), or if the input files' extensions are unknown, the input format will -be assumed to be markdown unless explicitly specified. +be assumed to be Markdown unless explicitly specified. Pandoc uses the UTF-8 character encoding for both input and output. If your local character encoding is not UTF-8, you -should pipe input and output through `iconv`: +should pipe input and output through [`iconv`]: iconv -t utf-8 input.txt | pandoc | iconv -f utf-8 @@ -111,26 +161,71 @@ RTF, OPML, DocBook, and Texinfo), information about the character encoding is included in the document header, which will only be included if you use the `-s/--standalone` option. +[`iconv`]: http://www.gnu.org/software/libiconv/ + Creating a PDF -------------- -Earlier versions of pandoc came with a program, `markdown2pdf`, that -used pandoc and pdflatex to produce a PDF. This is no longer needed, -since `pandoc` can now produce `pdf` output itself. To produce a PDF, simply -specify an output file with a `.pdf` extension. Pandoc will create a latex -file and use pdflatex (or another engine, see `--latex-engine`) to convert it -to PDF: +To produce a PDF, specify an output file with a `.pdf` extension. +By default, pandoc will use LaTeX to convert it to PDF: pandoc test.txt -o test.pdf Production of a PDF requires that a LaTeX engine be installed (see -`--latex-engine`, below), and assumes that the following LaTeX packages are -available: `amssymb`, `amsmath`, `ifxetex`, `ifluatex`, `listings` (if the -`--listings` option is used), `fancyvrb`, `longtable`, `booktabs`, `url`, -`graphicx` and `grffile` (if the document contains images), - `hyperref`, `ulem`, `babel` (if the `lang` variable is set), -`fontspec` (if `xelatex` or `lualatex` is used as the LaTeX engine), `xltxtra` -and `xunicode` (if `xelatex` is used). +`--latex-engine`, below), and assumes that the following LaTeX packages +are available: [`amsfonts`], [`amsmath`], [`lm`], +[`ifxetex`], [`ifluatex`], [`eurosym`], [`listings`] (if the +`--listings` option is used), [`fancyvrb`], [`longtable`], +[`booktabs`], [`graphicx`] and [`grffile`] (if the +document contains images), [`hyperref`], [`ulem`], +[`geometry`] (with the `geometry` variable set), [`setspace`] (with +`linestretch`), and [`babel`] (with `lang`). The use of `xelatex` or +`lualatex` as the LaTeX engine requires [`fontspec`]; `xelatex` uses +[`mathspec`], [`polyglossia`] (with `lang`), [`xecjk`], and +[`bidi`] (with the `dir` variable set). The [`upquote`] and +[`microtype`] packages are used if available, and [`csquotes`] will +be used for [smart punctuation] if added to the template. The +[`natbib`], [`biblatex`], [`bibtex`], and [`biber`] packages can +optionally be used for [citation rendering]. These are included with +all recent versions of [TeX Live]. + +Alternatively, pandoc can use ConTeXt to create a PDF. +To do this, specify an output file with a `.pdf` extension, +as before, but add `-t context` to the command line. + +PDF output can be controlled using [variables for LaTeX] +or [variables for ConTeXt]. + +[`amsfonts`]: https://ctan.org/pkg/amsfonts +[`amsmath`]: https://ctan.org/pkg/amsmath +[`lm`]: https://ctan.org/pkg/lm +[`ifxetex`]: https://ctan.org/pkg/ifxetex +[`ifluatex`]: https://ctan.org/pkg/ifluatex +[`eurosym`]: https://ctan.org/pkg/eurosym +[`listings`]: https://ctan.org/pkg/listings +[`fancyvrb`]: https://ctan.org/pkg/fancyvrb +[`longtable`]: https://ctan.org/pkg/longtable +[`booktabs`]: https://ctan.org/pkg/booktabs +[`graphicx`]: https://ctan.org/pkg/graphicx +[`grffile`]: https://ctan.org/pkg/grffile +[`geometry`]: https://ctan.org/pkg/geometry +[`setspace`]: https://ctan.org/pkg/setspace +[`xecjk`]: https://ctan.org/pkg/xecjk +[`hyperref`]: https://ctan.org/pkg/hyperref +[`ulem`]: https://ctan.org/pkg/ulem +[`babel`]: https://ctan.org/pkg/babel +[`bidi`]: https://ctan.org/pkg/bidi +[`mathspec`]: https://ctan.org/pkg/mathspec +[`polyglossia`]: https://ctan.org/pkg/polyglossia +[`fontspec`]: https://ctan.org/pkg/fontspec +[`upquote`]: https://ctan.org/pkg/upquote +[`microtype`]: https://ctan.org/pkg/microtype +[`csquotes`]: https://ctan.org/pkg/csquotes +[`natbib`]: https://ctan.org/pkg/natbib +[`biblatex`]: https://ctan.org/pkg/biblatex +[`bibtex`]: https://ctan.org/pkg/bibtex +[`biber`]: https://ctan.org/pkg/biber +[TeX Live]: http://www.tug.org/texlive/ `hsmarkdown` ------------ @@ -140,14 +235,10 @@ a symbolic link to the `pandoc` executable called `hsmarkdown`. When invoked under the name `hsmarkdown`, `pandoc` will behave as if invoked with `-f markdown_strict --email-obfuscation=references`, and all command-line options will be treated as regular arguments. -However, this approach does not work under Cygwin, due to problems with +This approach does not work under [Cygwin], due to problems with its simulation of symbolic links. -[Cygwin]: http://www.cygwin.com/ -[`iconv`]: http://www.gnu.org/software/libiconv/ -[CTAN]: http://www.ctan.org "Comprehensive TeX Archive Network" -[TeX Live]: http://www.tug.org/texlive/ -[MacTeX]: http://www.tug.org/mactex/ +[Cygwin]: https://cygwin.com Options ======= @@ -159,38 +250,38 @@ General options : Specify input format. *FORMAT* can be `native` (native Haskell), `json` (JSON version of native AST), `markdown` (pandoc's - extended markdown), `markdown_strict` (original unextended - markdown), `markdown_phpextra` (PHP Markdown Extra extended - markdown), `markdown_github` (github extended markdown), - `commonmark` (CommonMark markdown), `textile` (Textile), `rst` + extended Markdown), `markdown_strict` (original unextended + Markdown), `markdown_phpextra` (PHP Markdown Extra), + `markdown_github` (GitHub-Flavored Markdown), + `commonmark` (CommonMark Markdown), `textile` (Textile), `rst` (reStructuredText), `html` (HTML), `docbook` (DocBook), `t2t` (txt2tags), `docx` (docx), `odt` (ODT), `epub` (EPUB), `opml` (OPML), - `org` (Emacs Org-mode), `mediawiki` (MediaWiki markup), `twiki` (TWiki + `org` (Emacs Org mode), `mediawiki` (MediaWiki markup), `twiki` (TWiki markup), `haddock` (Haddock markup), or `latex` (LaTeX). If `+lhs` is appended to `markdown`, `rst`, `latex`, or `html`, the input will be treated as literate Haskell source: see [Literate - Haskell support](#literate-haskell-support), below. Markdown + Haskell support], below. Markdown syntax extensions can be individually enabled or disabled by appending `+EXTENSION` or `-EXTENSION` to the format name. So, for example, `markdown_strict+footnotes+definition_lists` is strict - markdown with footnotes and definition lists enabled, and - `markdown-pipe_tables+hard_line_breaks` is pandoc's markdown + Markdown with footnotes and definition lists enabled, and + `markdown-pipe_tables+hard_line_breaks` is pandoc's Markdown without pipe tables and with hard line breaks. See [Pandoc's - markdown](#pandocs-markdown), below, for a list of extensions and + Markdown], below, for a list of extensions and their names. `-t` *FORMAT*, `-w` *FORMAT*, `--to=`*FORMAT*, `--write=`*FORMAT* : Specify output format. *FORMAT* can be `native` (native Haskell), `json` (JSON version of native AST), `plain` (plain text), - `markdown` (pandoc's extended markdown), `markdown_strict` - (original unextended markdown), `markdown_phpextra` (PHP Markdown - extra extended markdown), `markdown_github` (github extended - markdown), `commonmark` (CommonMark markdown), `rst` - (reStructuredText), `html` (XHTML 1), `html5` (HTML 5), `latex` + `markdown` (pandoc's extended Markdown), `markdown_strict` + (original unextended Markdown), `markdown_phpextra` (PHP Markdown + Extra), `markdown_github` (GitHub-Flavored + Markdown), `commonmark` (CommonMark Markdown), `rst` + (reStructuredText), `html` (XHTML), `html5` (HTML5), `latex` (LaTeX), `beamer` (LaTeX beamer slide show), `context` (ConTeXt), `man` (groff man), `mediawiki` (MediaWiki markup), `dokuwiki` - (DokuWiki markup), `textile` (Textile), `org` (Emacs Org-Mode), + (DokuWiki markup), `textile` (Textile), `org` (Emacs Org mode), `texinfo` (GNU Texinfo), `opml` (OPML), `docbook` (DocBook), `opendocument` (OpenDocument), `odt` (OpenOffice text document), `docx` (Word docx), `haddock` (Haddock markup), `rtf` (rich text @@ -201,13 +292,13 @@ General options HTML5 + javascript slide show), `revealjs` (reveal.js HTML5 + javascript slide show), `s5` (S5 HTML and javascript slide show), or the path of a custom lua writer (see [Custom - writers](#custom-writers), below). Note that `odt`, `epub`, and + writers], below). Note that `odt`, `epub`, and `epub3` output will not be directed to *stdout*; an output filename must be specified using the `-o/--output` option. If `+lhs` is appended to `markdown`, `rst`, `latex`, `beamer`, `html`, or `html5`, the output will be rendered as literate Haskell source: see [Literate Haskell - support](#literate-haskell-support), below. Markdown syntax + support], below. Markdown syntax extensions can be individually enabled or disabled by appending `+EXTENSION` or `-EXTENSION` to the format name, as described above under `-f`. @@ -222,24 +313,31 @@ General options : Specify the user data directory to search for pandoc data files. If this option is not specified, the default user data directory - will be used. This is + will be used. This is, in Unix: $HOME/.pandoc - in unix, + in Windows XP: C:\Documents And Settings\USERNAME\Application Data\pandoc - in Windows XP, and + and in Windows Vista or later: C:\Users\USERNAME\AppData\Roaming\pandoc - in Windows 7. (You can find the default user data directory - on your system by looking at the output of `pandoc --version`.) - A `reference.odt`, `reference.docx`, `default.csl`, - `epub.css`, `templates`, `slidy`, `slideous`, or `s5` directory + You can find the default user data directory on your system by + looking at the output of `pandoc --version`. + A `reference.odt`, `reference.docx`, `epub.css`, `templates`, + `slidy`, `slideous`, or `s5` directory placed in this directory will override pandoc's normal defaults. +`--bash-completion` + +: Generate a bash completion script. To enable bash completion + with pandoc, add this to your `.bashrc`: + + eval "$(pandoc --bash-completion)" + `--verbose` : Give verbose debugging output. Currently this only has an effect @@ -260,9 +358,9 @@ Reader options : Parse untranslatable HTML codes and LaTeX environments as raw HTML or LaTeX, instead of ignoring them. Affects only HTML and LaTeX - input. Raw HTML can be printed in markdown, reStructuredText, HTML, + input. Raw HTML can be printed in Markdown, reStructuredText, HTML, Slidy, Slideous, DZSlides, reveal.js, and S5 output; raw LaTeX - can be printed in markdown, reStructuredText, LaTeX, and ConTeXt output. + can be printed in Markdown, reStructuredText, LaTeX, and ConTeXt output. The default is for the readers to omit untranslatable HTML codes and LaTeX environments. (The LaTeX reader does pass through untranslatable LaTeX *commands*, even if `-R` is not specified.) @@ -272,11 +370,9 @@ Reader options : Produce typographically correct output, converting straight quotes to curly quotes, `---` to em-dashes, `--` to en-dashes, and `...` to ellipses. Nonbreaking spaces are inserted after certain - abbreviations, such as "Mr." (Note: This option is significant only when - the input format is `markdown`, `markdown_strict`, `textile` or `twiki`. - It is selected automatically when the input format is `textile` or the - output format is `latex` or `context`, unless `--no-tex-ligatures` - is used.) + abbreviations, such as "Mr." (Note: This option is selected automatically + when the output format is `latex` or `context`, unless `--no-tex-ligatures` + is used. It has no effect for `latex` input.) `--old-dashes` @@ -299,12 +395,12 @@ Reader options : Specify a default extension to use when image paths/URLs have no extension. This allows you to use the same source for formats that require different kinds of images. Currently this option only affects - the markdown and LaTeX readers. + the Markdown and LaTeX readers. `--filter=`*EXECUTABLE* : Specify an executable to be used as a filter transforming the - Pandoc AST after the input is parsed and before the output is + pandoc AST after the input is parsed and before the output is written. The executable should read JSON from stdin and write JSON to stdout. The JSON must be formatted like pandoc's own JSON input and output. The name of the output format will be @@ -321,12 +417,8 @@ Reader options Filters may be written in any language. `Text.Pandoc.JSON` exports `toJSONFilter` to facilitate writing filters in Haskell. Those who would prefer to write filters in python can use the - module `pandocfilters`, installable from PyPI. See - <http://github.com/jgm/pandocfilters> for the module and several - examples. There are also pandoc filter libraries in - [PHP](https://github.com/vinai/pandocfilters-php), - [perl](https://metacpan.org/pod/Pandoc::Filter), and - [javascript/node.js](https://github.com/mvhenderson/pandoc-filter-node). + module [`pandocfilters`], installable from PyPI. There are also + pandoc filter libraries in [PHP], [perl], and [javascript/node.js]. Note that the *EXECUTABLE* will be sought in the user's `PATH`, and not in the working directory, if no directory is @@ -362,7 +454,7 @@ Reader options `--track-changes=accept`|`reject`|`all` : Specifies what to do with insertions and deletions produced by the MS - Word "track-changes" feature. `accept` (the default), inserts all + Word "Track Changes" feature. `accept` (the default), inserts all insertions, and ignores all deletions. `reject` inserts all deletions and ignores insertions. `all` puts in both insertions and deletions, wrapped in spans with `insertion` and `deletion` @@ -378,6 +470,11 @@ Reader options references in the document so they point to the extracted files. This option only affects the docx and epub readers. +[`pandocfilters`]: https://github.com/jgm/pandocfilters +[PHP]: https://github.com/vinai/pandocfilters-php +[perl]: https://metacpan.org/pod/Pandoc::Filter +[javascript/node.js]: https://github.com/mvhenderson/pandoc-filter-node + General writer options ---------------------- @@ -391,7 +488,7 @@ General writer options `--template=`*FILE* : Use *FILE* as a custom template for the generated document. Implies - `--standalone`. See [Templates](#templates) below for a description + `--standalone`. See [Templates], below, for a description of template syntax. If no extension is specified, an extension corresponding to the writer will be added, so that `--template=special` looks for `special.html` for HTML output. If the template is not @@ -525,19 +622,19 @@ Options affecting specific writers `--reference-links` -: Use reference-style links, rather than inline links, in writing markdown +: Use reference-style links, rather than inline links, in writing Markdown or reStructuredText. By default inline links are used. `--atx-headers` -: Use ATX style headers in markdown and asciidoc output. The default is +: Use ATX-style headers in Markdown and asciidoc output. The default is to use setext-style headers for levels 1-2, and then ATX headers. `--chapters` : Treat top-level headers as chapters in LaTeX, ConTeXt, and DocBook - output. When the LaTeX template uses the report, book, or - memoir class, this option is implied. If `beamer` is the output + output. When the LaTeX document class is set to `report`, `book`, or + `memoir`, this option is implied. If `beamer` is the output format, top-level headers will become `\part{..}`. `-N`, `--number-sections` @@ -560,19 +657,23 @@ Options affecting specific writers `--no-tex-ligatures` -: Do not convert quotation marks, apostrophes, and dashes to - the TeX ligatures when writing LaTeX or ConTeXt. Instead, just - use literal unicode characters. This is needed for using advanced - OpenType features with XeLaTeX and LuaLaTeX. Note: normally - `--smart` is selected automatically for LaTeX and ConTeXt - output, but it must be specified explicitly if `--no-tex-ligatures` - is selected. If you use literal curly quotes, dashes, and ellipses - in your source, then you may want to use `--no-tex-ligatures` - without `--smart`. +: Do not use the TeX ligatures for quotation marks, apostrophes, + and dashes (`` `...' ``, ` ``..'' `, `--`, `---`) when + writing or reading LaTeX or ConTeXt. In reading LaTeX, + parse the characters `` ` ``, `'`, and `-` literally, rather + than parsing ligatures for quotation marks and dashes. In + writing LaTeX or ConTeXt, print unicode quotation mark and + dash characters literally, rather than converting them to + the standard ASCII TeX ligatures. Note: normally `--smart` + is selected automatically for LaTeX and ConTeXt output, but + it must be specified explicitly if `--no-tex-ligatures` is + selected. If you use literal curly quotes, dashes, and + ellipses in your source, then you may want to use + `--no-tex-ligatures` without `--smart`. `--listings` -: Use listings package for LaTeX code blocks +: Use the [`listings`] package for LaTeX code blocks `-i`, `--incremental` @@ -587,26 +688,27 @@ Options affecting specific writers slide show into sections; headers below this level create subheads within a slide. The default is to set the slide level based on the contents of the document; see - [Structuring the slide show](#structuring-the-slide-show), below. + [Structuring the slide show]. `--section-divs` : Wrap sections in `<div>` tags (or `<section>` tags in HTML5), and attach identifiers to the enclosing `<div>` (or `<section>`) rather than the header itself. See - [Header identifiers](#header-identifiers), below. + [Header identifiers], below. `--email-obfuscation=none`|`javascript`|`references` : Specify a method for obfuscating `mailto:` links in HTML documents. `none` leaves `mailto:` links as they are. `javascript` obfuscates them using javascript. `references` obfuscates them by printing their - letters as decimal or hexadecimal character references. + letters as decimal or hexadecimal character references. The default + is `javascript`. `--id-prefix=`*STRING* : Specify a prefix to be added to all automatically generated identifiers - in HTML and DocBook output, and to footnote numbers in markdown output. + in HTML and DocBook output, and to footnote numbers in Markdown output. This is useful for preventing duplicate identifiers when generating fragments to be included in other pages. @@ -663,14 +765,13 @@ Options affecting specific writers : Use the specified image as the EPUB cover. It is recommended that the image be less than 1000px in width and height. Note that - in a markdown source document you can also specify `cover-image` + in a Markdown source document you can also specify `cover-image` in a YAML metadata block (see [EPUB Metadata], below). `--epub-metadata=`*FILE* : Look in the specified XML file for metadata for the EPUB. - The file should contain a series of Dublin Core elements, - as documented at <http://dublincore.org/documents/dces/>. + The file should contain a series of [Dublin Core elements]. For example: <dc:rights>Creative Commons</dc:rights> @@ -684,7 +785,7 @@ Options affecting specific writers id="BookId">` (a randomly generated UUID). Any of these may be overridden by elements in the metadata file. - Note: if the source document is markdown, a YAML metadata block + Note: if the source document is Markdown, a YAML metadata block in the document can be used instead. See below under [EPUB Metadata]. @@ -746,6 +847,9 @@ Options affecting specific writers If used multiple times, the arguments are provided with spaces between them. Note that no check for duplicate options is done. +[Dublin Core elements]: http://dublincore.org/documents/dces/ +[ISO 8601 format]: http://www.w3.org/TR/NOTE-datetime + Citation rendering ------------------ @@ -776,17 +880,15 @@ Citation rendering `--natbib` -: Use natbib for citations in LaTeX output. This option is not for use +: Use [`natbib`] for citations in LaTeX output. This option is not for use with the `pandoc-citeproc` filter or with PDF output. It is intended for - use in producing a LaTeX file that can be processed with pdflatex and - bibtex. + use in producing a LaTeX file that can be processed with [`bibtex`]. `--biblatex` -: Use biblatex for citations in LaTeX output. This option is not for use +: Use [`biblatex`] for citations in LaTeX output. This option is not for use with the `pandoc-citeproc` filter or with PDF output. It is intended for - use in producing a LaTeX file that can be processed with pdflatex and - bibtex or biber. + use in producing a LaTeX file that can be processed with [`bibtex`] or [`biber`]. Math rendering in HTML ---------------------- @@ -803,7 +905,7 @@ Math rendering in HTML `--mathml`[`=`*URL*] -: Convert TeX math to MathML (in `docbook` as well as `html` and `html5`). +: Convert TeX math to [MathML] (in `docbook` as well as `html` and `html5`). In standalone `html` output, a small javascript (or a link to such a script if a *URL* is supplied) will be inserted that allows the MathML to be viewed on some browsers. @@ -853,6 +955,14 @@ Math rendering in HTML not specified, a link to the KaTeX CDN will be inserted. Note that this option does not imply `--katex`. +[MathML]: http://www.w3.org/Math/ +[LaTeXMathML]: http://math.etsu.edu/LaTeXMathML/ +[jsMath]: http://www.math.union.edu/~dpvc/jsmath/ +[MathJax]: https://www.mathjax.org +[gladTeX]: http://ans.hsh.no/home/mgg/gladtex/ +[mimeTeX]: http://www.forkosh.com/mimetex.html +[KaTeX]: https://github.com/Khan/KaTeX + Options for wrapper scripts --------------------------- @@ -864,13 +974,13 @@ Options for wrapper scripts with the `-o` option, or `-` (for *stdout*) if no output file was specified. The remaining lines contain the command-line arguments, one per line, in the order they appear. These do not include regular - Pandoc options and their arguments, but do include any options appearing + pandoc options and their arguments, but do include any options appearing after a `--` separator at the end of the line. `--ignore-args` : Ignore command-line arguments (for use in wrapper scripts). - Regular Pandoc options are not ignored. Thus, for example, + Regular pandoc options are not ignored. Thus, for example, pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1 @@ -878,13 +988,6 @@ Options for wrapper scripts pandoc -o foo.html -s -[LaTeXMathML]: http://math.etsu.edu/LaTeXMathML/ -[jsMath]: http://www.math.union.edu/~dpvc/jsmath/ -[MathJax]: http://www.mathjax.org/ -[gladTeX]: http://ans.hsh.no/home/mgg/gladtex/ -[mimeTeX]: http://www.forkosh.com/mimetex.html -[CSL]: http://CitationStyles.org - Templates ========= @@ -892,30 +995,49 @@ When the `-s/--standalone` option is used, pandoc uses a template to add header and footer material that is needed for a self-standing document. To see the default template that is used, just type - pandoc -D FORMAT + pandoc -D *FORMAT* -where `FORMAT` is the name of the output format. A custom template +where *FORMAT* is the name of the output format. A custom template can be specified using the `--template` option. You can also override -the system default templates for a given output format `FORMAT` -by putting a file `templates/default.FORMAT` in the user data +the system default templates for a given output format *FORMAT* +by putting a file `templates/default.*FORMAT*` in the user data directory (see `--data-dir`, above). *Exceptions:* For `odt` output, customize the `default.opendocument` template. For `pdf` output, customize the `default.latex` template. -Templates may contain *variables*. Variable names are sequences of -alphanumerics, `-`, and `_`, starting with a letter. A variable name -surrounded by `$` signs will be replaced by its value. For example, -the string `$title$` in +Templates contain *variables*, which allow for the inclusion of +arbitrary information at any point in the file. Variables may be set +within the document using [YAML metadata blocks][Extension: +`yaml_metadata_block`]. They may also be set at the +command line using the `-V/--variable` option: variables set in this +way override metadata fields with the same name. - <title>$title$</title> +Variables set by pandoc +----------------------- -will be replaced by the document title. +Some variables are set automatically by pandoc. These vary somewhat +depending on the output format, but include metadata fields as well as the following: -To write a literal `$` in a template, use `$$`. +`title`, `author`, `date` +: allow identification of basic aspects of the document. + Included in PDF metadata through LaTeX and ConTeXt. + These can be set through a [pandoc title block][Extension: `pandoc_title_block`], + which allows for multiple authors, or through a YAML metadata block: -Some variables are set automatically by pandoc. These vary somewhat -depending on the output format, but include metadata fields (such -as `title`, `author`, and `date`) as well as the following: + --- + author: + - Aristotle + - Peter Abelard + ... + +`subtitle` +: document subtitle; also used as subject in PDF metadata + +`abstract` +: document summary, included in LaTeX, ConTeXt, AsciiDoc, and Word docx + +`keywords` +: list of keywords to be included in HTML, PDF, and AsciiDoc metadata; may be repeated as for `author`, above `header-includes` : contents specified by `-H/--include-in-header` (may have multiple @@ -924,6 +1046,9 @@ as `title`, `author`, and `date`) as well as the following: `toc` : non-null value if `--toc/--table-of-contents` was specified +`toc-title` +: title of table of contents (works only with EPUB and docx) + `include-before` : contents specified by `-B/--include-before-body` (may have multiple values) @@ -935,8 +1060,54 @@ as `title`, `author`, and `date`) as well as the following: `body` : body of document +Language variables +------------------ + `lang` -: language code for HTML or LaTeX documents +: identifies the main language of the document, + using a code according to [BCP 47] (e.g. `en` or `en-GB`). + For some output formats, pandoc will convert it to an appropriate + format stored in the additional variables `babel-lang`, + `polyglossia-lang` (LaTeX) and `context-lang` (ConTeXt). + + Native pandoc `span`s and `div`s with the lang attribute + (value in BCP 47) can be used to switch the language in + that range. + +`otherlangs` +: a list of other languages used in the document + in the YAML metadata, according to [BCP 47]. For example: + `otherlangs: [en-GB, fr]`. + This is automatically generated from the `lang` attributes + in all `span`s and `div`s but can be overriden. + Currently only used by LaTeX through the generated + `babel-otherlangs` and `polyglossia-otherlangs` variables. + The LaTeX writer outputs polyglossia commands in the text but + the `babel-newcommands` variable contains mappings for them + to the corresponding babel. + +`dir` +: the base direction of the document, either `rtl` (right-to-left) + or `ltr` (left-to-right). + + For bidirectional documents, native pandoc `span`s and `div`s + with the `dir` attribute (value `rtl` or `ltr`) can be used to + override the base direction in some output formats. + This may not always be necessary if the final renderer + (e.g. the browser, when generating HTML) supports the + [Unicode Bidirectional Algorithm]. + + When using LaTeX for bidirectional documents, only the `xelatex` engine + is fully supported (use `--latex-engine=xelatex`). + +[BCP 47]: https://tools.ietf.org/html/bcp47 +[Unicode Bidirectional Algorithm]: http://www.w3.org/International/articles/inline-bidi-markup/uba-basics + +Variables for slides +-------------------- + +Variables are available for [producing slide shows with pandoc], +including all [reveal.js configuration options]. `slidy-url` : base URL for Slidy documents (defaults to @@ -951,84 +1122,168 @@ as `title`, `author`, and `date`) as well as the following: `revealjs-url` : base URL for reveal.js documents (defaults to `reveal.js`) -`theme` -: reveal.js or LaTeX beamer theme +`theme`, `colortheme`, `fonttheme`, `innertheme`, `outertheme` +: themes for LaTeX [`beamer`] documents + +`navigation` +: controls navigation symbols in `beamer` documents + (default is `empty` for no navigation symbols; other valid values + are `frame`, `vertical`, and `horizontal`). -`transition` -: reveal.js transition +[reveal.js configuration options]: https://github.com/hakimel/reveal.js#configuration + +Variables for LaTeX +------------------- + +LaTeX variables are used when [creating a PDF]. `fontsize` -: font size (10pt, 11pt, 12pt) for LaTeX documents +: font size for body text (e.g. `10pt`, `12pt`) `documentclass` -: document class for LaTeX documents +: document class, e.g. [`article`], [`report`], [`book`], [`memoir`] `classoption` -: option for LaTeX documentclass, e.g. `oneside`; may be repeated +: option for document class, e.g. `oneside`; may be repeated for multiple options `geometry` -: options for LaTeX `geometry` class, e.g. `margin=1in`; +: option for [`geometry`] package, e.g. `margin=1in`; may be repeated for multiple options `linestretch` -: adjusts line spacing (requires the `setspace` package) +: adjusts line spacing using the [`setspace`] + package, e.g. `1.25`, `1.5` `fontfamily` -: font package to use for LaTeX documents (with pdflatex): - TeXLive has `bookman` (Bookman), `utopia` or `fourier` (Utopia), - `fouriernc` (New Century Schoolbook), `times` or `txfonts` (Times), - `mathpazo` or `pxfonts` or `mathpple` (Palatino), - `libertine` (Linux Libertine), `arev` (Arev Sans), - and the default `lmodern`, among others. +: font package for use with `pdflatex`: + [TeX Live] includes many options, documented in the [LaTeX Font Catalogue]. + The default is [Latin Modern][`lm`]. + +`fontfamilyoptions` +: options for package used as `fontfamily`: e.g. `osf,sc` with + `fontfamily` set to [`mathpazo`] provides Palatino with old-style + figures and true small caps; may be repeated for multiple options `mainfont`, `sansfont`, `monofont`, `mathfont`, `CJKmainfont` -: fonts for LaTeX documents (works only with xelatex - and lualatex). Note that if `CJKmainfont` is used, - the `xeCJK` package must be available. +: font families for use with `xelatex` or + `lualatex`: take the name of any system font, using the + [`fontspec`] package. Note that if `CJKmainfont` is used, + the [`xecjk`] package must be available. -`colortheme` -: colortheme for LaTeX beamer documents +`mainfontoptions`, `sansfontoptions`, `monofontoptions`, `mathfontoptions`, `CJKoptions` +: options to use with `mainfont`, `sansfont`, `monofont`, `mathfont`, + `CJKmainfont` in `xelatex` and `lualatex`. Allow for any choices + available through [`fontspec`], such as the OpenType features + `Numbers=OldStyle,Numbers=Proportional`. May be repeated for multiple options. -`fonttheme` -: fonttheme for LaTeX beamer documents +`fontenc` +: allows font encoding to be specified through `fontenc` package (with `pdflatex`); + default is `T1` (see guide to [LaTeX font encodings]) -`linkcolor` -: color for internal links in LaTeX documents (`red`, `green`, - `magenta`, `cyan`, `blue`, `black`) +`colorlinks` +: add color to link text; automatically enabled if any of `linkcolor`, `citecolor`, + `urlcolor`, or `toccolor` are set -`toccolor` -: color for links in table of contents in LaTeX documents +`linkcolor`, `citecolor`, `urlcolor`, `toccolor` +: color for internal links, citation links, external links, and links in table of contents: + uses any of the [predefined LaTeX colors] -`urlcolor` -: color for external links in LaTeX documents +`links-as-notes` +: causes links to be printed as footnotes -`citecolor` -: color for citation links in LaTeX documents +`indent` +: uses document class settings for indentation (the default LaTeX template + otherwise removes indentation and adds space between paragraphs) -`links-as-notes` -: causes links to be printed as footnotes in LaTeX documents +`subparagraph` +: disables default behavior of LaTeX template that redefines (sub)paragraphs + as sections, changing the appearance of nested headings in some classes `toc` -: include table of contents in LaTeX documents +: include table of contents (can also be set using `--toc/--table-of-contents`) `toc-depth` -: level of section to include in table of contents in LaTeX documents - -`toc-title` -: title of table of contents (works only with EPUB and docx) - -`lof` -: include list of figures in LaTeX documents +: level of section to include in table of contents -`lot` -: include list of tables in LaTeX documents +`lof`, `lot` +: include list of figures, list of tables `bibliography` : bibliography to use for resolving references `biblio-style` -: bibliography style in LaTeX, when used with `--natbib` +: bibliography style, when used with `--natbib` + +[`article`]: https://ctan.org/pkg/article +[`report`]: https://ctan.org/pkg/report +[`book`]: https://ctan.org/pkg/book +[`memoir`]: https://ctan.org/pkg/memoir +[predefined LaTeX colors]: https://en.wikibooks.org/wiki/LaTeX/Colors#Predefined_colors +[LaTeX Font Catalogue]: http://www.tug.dk/FontCatalogue/ +[`mathpazo`]: https://ctan.org/pkg/mathpazo +[LaTeX font encodings]: https://ctan.org/pkg/encguide + +Variables for ConTeXt +--------------------- + +`papersize` +: paper size, e.g. `letter`, `A4`, `landscape` (see [ConTeXt Paper Setup]); + may be repeated for multiple options + +`layout` +: options for page margins and text arrangement (see [ConTeXt Layout]); + may be repeated for multiple options + +`fontsize` +: font size for body text (e.g. `10pt`, `12pt`) + +`mainfont`, `sansfont`, `monofont`, `mathfont` +: font families: take the name of any system font (see [ConTeXt Font Switching]) + +`linkcolor`, `contrastcolor` +: color for links outside and inside a page, e.g. `red`, `blue` (see [ConTeXt Color]) + +`linkstyle` +: typeface style for links, e.g. `normal`, `bold`, `slanted`, `boldslanted`, `type`, `cap`, `small` + +`indenting` +: controls indentation of paragraphs, e.g. `yes,small,next` (see [ConTeXt Indentation]); + may be repeated for multiple options + +`whitespace` +: spacing between paragraphs, e.g. `none`, `small` (using [`setupwhitespace`]) + +`interlinespace` +: adjusts line spacing, e.g. `4ex` (using [`setupinterlinespace`]); + may be repeated for multiple options + +`headertext`, `footertext` +: text to be placed in running header or footer (see [ConTeXt Headers and Footers]); + may be repeated up to four times for different placement + +`pagenumbering` +: page number style and location (using [`setuppagenumbering`]); + may be repeated for multiple options + +`toc` +: include table of contents (can also be set using `--toc/--table-of-contents`) + +`lof`, `lot` +: include list of figures, list of tables + +[ConTeXt Paper Setup]: http://wiki.contextgarden.net/PaperSetup +[ConTeXt Layout]: http://wiki.contextgarden.net/Layout +[ConTeXt Font Switching]: http://wiki.contextgarden.net/Font_Switching +[ConTeXt Color]: http://wiki.contextgarden.net/Color +[ConTeXt Headers and Footers]: http://wiki.contextgarden.net/Headers_and_Footers +[ConTeXt Indentation]: http://wiki.contextgarden.net/Indentation +[`setupwhitespace`]: http://wiki.contextgarden.net/Command/setupwhitespace +[`setupinterlinespace`]: http://wiki.contextgarden.net/Command/setupinterlinespace +[`setuppagenumbering`]: http://wiki.contextgarden.net/Command/setuppagenumbering + +Variables for man pages +----------------------- `section` : section number in man pages @@ -1039,9 +1294,25 @@ as `title`, `author`, and `date`) as well as the following: `footer` : footer in man pages -Variables may be set at the command line using the `-V/--variable` -option. Variables set in this way override metadata fields with -the same name. +`adjusting` +: adjusts text to left (`l`), right (`r`), center (`c`), + or both (`b`) margins + +`hyphenate` +: if `true` (the default), hyphenation will be used + +Using variables in templates +---------------------------- + +Variable names are sequences of alphanumerics, `-`, and `_`, +starting with a letter. A variable name surrounded by `$` signs +will be replaced by its value. For example, the string `$title$` in + + <title>$title$</title> + +will be replaced by the document title. + +To write a literal `$` in a template, use `$$`. Templates may contain conditionals. The syntax is as follows: @@ -1076,22 +1347,23 @@ an object as its value. So, for example: If you use custom templates, you may need to revise them as pandoc changes. We recommend tracking the changes in the default templates, and modifying your custom templates accordingly. An easy way to do this -is to fork the pandoc-templates repository -(<http://github.com/jgm/pandoc-templates>) and merge in changes after each +is to fork the [pandoc-templates] repository and merge in changes after each pandoc release. -Pandoc's markdown +[pandoc-templates]: https://github.com/jgm/pandoc-templates + +Pandoc's Markdown ================= Pandoc understands an extended and slightly revised version of -John Gruber's [markdown] syntax. This document explains the syntax, -noting differences from standard markdown. Except where noted, these +John Gruber's [Markdown] syntax. This document explains the syntax, +noting differences from standard Markdown. Except where noted, these differences can be suppressed by using the `markdown_strict` format instead of `markdown`. An extensions can be enabled by adding `+EXTENSION` to the format name and disabled by adding `-EXTENSION`. For example, -`markdown_strict+footnotes` is strict markdown with footnotes +`markdown_strict+footnotes` is strict Markdown with footnotes enabled, while `markdown-footnotes-pipe_tables` is pandoc's -markdown without footnotes or pipe tables. +Markdown without footnotes or pipe tables. Philosophy ---------- @@ -1108,7 +1380,7 @@ This principle has guided pandoc's decisions in finding syntax for tables, footnotes, and other extensions. There is, however, one respect in which pandoc's aims are different -from the original aims of markdown. Whereas markdown was originally +from the original aims of Markdown. Whereas Markdown was originally designed with HTML generation in mind, pandoc is designed for multiple output formats. Thus, while pandoc allows the embedding of raw HTML, it discourages it, and provides other, non-HTMLish ways of representing @@ -1132,7 +1404,7 @@ are ignored. Headers ------- -There are two kinds of headers, Setext and atx. +There are two kinds of headers: Setext and ATX. ### Setext-style headers ### @@ -1146,12 +1418,12 @@ A setext-style header is a line of text "underlined" with a row of `=` signs ------------------ The header text can contain inline formatting, such as emphasis (see -[Inline formatting](#inline-formatting), below). +[Inline formatting], below). -### Atx-style headers ### +### ATX-style headers ### -An Atx-style header consists of one to six `#` signs and a line of +An ATX-style header consists of one to six `#` signs and a line of text, optionally followed by any number of `#` signs. The number of `#` signs at the beginning of the line is the header level: @@ -1165,7 +1437,7 @@ As with setext-style headers, the header text can contain formatting: #### Extension: `blank_before_header` #### -Standard markdown syntax does not require a blank line before a header. +Standard Markdown syntax does not require a blank line before a header. Pandoc does require this (except, of course, at the beginning of the document). The reason for the requirement is that it is all too easy for a `#` to end up at the beginning of a line by accident (perhaps through line @@ -1232,11 +1504,11 @@ Thus, for example, Header Identifier ------------------------------- ---------------------------- - Header identifiers in HTML `header-identifiers-in-html` - *Dogs*?--in *my* house? `dogs--in-my-house` - [HTML], [S5], or [RTF]? `html-s5-or-rtf` - 3. Applications `applications` - 33 `section` + `Header identifiers in HTML` `header-identifiers-in-html` + `*Dogs*?--in *my* house?` `dogs--in-my-house` + `[HTML], [S5], or [RTF]?` `html-s5-or-rtf` + `3. Applications` `applications` + `33` `section` These rules should, in most cases, allow one to determine the identifier from the header text. The exception is when several headers have the @@ -1303,8 +1575,8 @@ Block quotations Markdown uses email conventions for quoting blocks of text. A block quotation is one or more paragraphs or other block elements (such as lists or headers), with each line preceded by a `>` character -and a space. (The `>` need not start at the left margin, but it should -not be indented more than three spaces.) +and an optional space. (The `>` need not start at the left margin, but +it should not be indented more than three spaces.) > This is a block quote. This > paragraph has two lines. @@ -1328,9 +1600,16 @@ other block quotes. That is, block quotes can be nested: > > > A block quote within a block quote. +If the `>` character is followed by an optional space, that space +will be considered part of the block quote marker and not part of +the indentation of the contents. Thus, to put an indented code +block in a block quote, you need five spaces after the `>`: + + > code + #### Extension: `blank_before_blockquote` #### -Standard markdown syntax does not require a blank line before a block +Standard Markdown syntax does not require a blank line before a block quote. Pandoc does require this (except, of course, at the beginning of the document). The reason for the requirement is that it is all too easy for a `>` to end up at the beginning of a line by accident (perhaps through line @@ -1364,7 +1643,7 @@ Note: blank lines in the verbatim text need not begin with four spaces. #### Extension: `fenced_code_blocks` #### -In addition to standard indented code blocks, Pandoc supports +In addition to standard indented code blocks, pandoc supports *fenced* code blocks. These begin with a row of three or more tildes (`~`) and end with a row of tildes that must be at least as long as the starting row. Everything between these lines is treated as code. No @@ -1449,7 +1728,7 @@ Line blocks A line block is a sequence of lines beginning with a vertical bar (`|`) followed by a space. The division into lines will be preserved in the output, as will any leading spaces; otherwise, the lines will -be formatted as markdown. This is useful for verse and addresses: +be formatted as Markdown. This is useful for verse and addresses: | The limerick packs laughs anatomical | In space that is quite economical. @@ -1503,7 +1782,7 @@ line (after the bullet): list item. * and my second. -But markdown also allows a "lazy" format: +But Markdown also allows a "lazy" format: * here is my first list item. @@ -1539,7 +1818,7 @@ one tab: + broccoli + chard -As noted above, markdown allows you to write list items "lazily," instead of +As noted above, Markdown allows you to write list items "lazily," instead of indenting continuation lines. However, if there are multiple paragraphs or other blocks in a list item, the first line of each must be indented. @@ -1553,18 +1832,18 @@ other blocks in a list item, the first line of each must be indented. list item. **Note:** Although the four-space rule for continuation paragraphs -comes from the official [markdown syntax guide], the reference implementation, +comes from the official [Markdown syntax guide], the reference implementation, `Markdown.pl`, does not follow it. So pandoc will give different results than `Markdown.pl` when authors have indented continuation paragraphs fewer than four spaces. -The [markdown syntax guide] is not explicit whether the four-space +The [Markdown syntax guide] is not explicit whether the four-space rule applies to *all* block-level content in a list item; it only mentions paragraphs and code blocks. But it implies that the rule applies to all block-level content (including nested lists), and pandoc interprets it that way. - [markdown syntax guide]: + [Markdown syntax guide]: http://daringfireball.net/projects/markdown/syntax#list ### Ordered lists ### @@ -1572,7 +1851,7 @@ pandoc interprets it that way. Ordered lists work just like bulleted lists, except that the items begin with enumerators rather than bullets. -In standard markdown, enumerators are decimal numbers followed +In standard Markdown, enumerators are decimal numbers followed by a period and a space. The numbers themselves are ignored, so there is no difference between this list: @@ -1588,7 +1867,7 @@ and this one: #### Extension: `fancy_lists` #### -Unlike standard markdown, Pandoc allows ordered list items to be marked +Unlike standard Markdown, pandoc allows ordered list items to be marked with uppercase and lowercase letters and roman numerals, in addition to arabic numerals. List markers may be enclosed in parentheses or followed by a single right-parentheses or period. They must be separated from the @@ -1675,7 +1954,7 @@ A term may have multiple definitions, and each definition may consist of one or more block elements (paragraph, code block, list, etc.), each indented four spaces or one tab stop. The body of the definition (including the first line, aside from the colon or tilde) should be indented four spaces. However, -as with other markdown lists, you can "lazily" omit indentation except +as with other Markdown lists, you can "lazily" omit indentation except at the beginning of a paragraph or other block element: Term 1 @@ -1701,13 +1980,10 @@ definition: Note that space between items in a definition list is required. (A variant that loosens this requirement, but disallows "lazy" hard wrapping, can be activated with `compact_definition_lists`: see -[Non-pandoc extensions](#non-pandoc-extensions), below.) +[Non-pandoc extensions], below.) [^3]: I have been influenced by the suggestions of [David Wheeler](http://www.justatheory.com/computers/markup/modest-markdown-proposal.html). -[PHP Markdown Extra]: http://www.michelf.com/projects/php-markdown/extra/ - - ### Numbered example lists ### #### Extension: `example_lists` #### @@ -1750,14 +2026,14 @@ cases" involving lists. Consider this source: + Third Pandoc transforms this into a "compact list" (with no `<p>` tags around -"First", "Second", or "Third"), while markdown puts `<p>` tags around +"First", "Second", or "Third"), while Markdown puts `<p>` tags around "Second" and "Third" (but not "First"), because of the blank space around "Third". Pandoc follows a simple rule: if the text is followed by a blank line, it is treated as a paragraph. Since "Second" is followed by a list, and not a blank line, it isn't treated as a paragraph. The fact that the list is followed by a blank line is irrelevant. (Note: Pandoc works this way even when the `markdown_strict` format is specified. This -behavior is consistent with the official markdown syntax description, +behavior is consistent with the official Markdown syntax description, even though it is different from that of `Markdown.pl`.) @@ -1770,7 +2046,7 @@ What if you want to put an indented code block after a list? { my code block } -Trouble! Here pandoc (like other markdown implementations) will treat +Trouble! Here pandoc (like other Markdown implementations) will treat `{ my code block }` as the second paragraph of item two, and not as a code block. @@ -1898,7 +2174,7 @@ These work like simple tables, but with the following differences: In multiline tables, the table parser pays attention to the widths of the columns, and the writers try to reproduce these relative widths in the output. So, if you find that one of the columns is too narrow in the -output, try widening it in the markdown source. +output, try widening it in the Markdown source. Headers may be omitted in multiline tables as well as simple tables: @@ -1939,7 +2215,7 @@ arbitrary block elements (multiple paragraphs, code blocks, lists, etc.). Alignments are not supported, nor are cells that span multiple columns or rows. Grid tables can be created easily using [Emacs table mode]. - [Emacs table mode]: http://table.sourceforge.net/ +[Emacs table mode]: http://table.sourceforge.net/ #### Extension: `pipe_tables` #### @@ -1953,7 +2229,7 @@ Pipe tables look like this: : Demonstration of pipe table syntax. -The syntax is [the same as in PHP markdown extra]. The beginning and +The syntax is identical to [PHP Markdown Extra tables]. The beginning and ending pipe characters are optional, but pipes are required between all columns. The colons indicate column alignment as shown. The header cannot be omitted. To simulate a headerless table, include a header @@ -1975,10 +2251,7 @@ output, the cells produced by pipe tables will not wrap, since there is no information available about relative widths. If you want content to wrap within cells, use multiline or grid tables. - [the same as in PHP markdown extra]: - http://michelf.ca/projects/php-markdown/extra/#table - -Note: Pandoc also recognizes pipe tables of the following +Note: pandoc also recognizes pipe tables of the following form, as can be produced by Emacs' orgtbl-mode: | One | Two | @@ -1990,6 +2263,8 @@ The difference is that `+` is used instead of `|`. Other orgtbl features are not supported. In particular, to get non-default column alignment, you'll need to add colons as above. +[PHP Markdown Extra tables]: https://michelf.ca/projects/php-markdown/extra/#table + Metadata blocks --------------- @@ -2077,7 +2352,7 @@ hyphens (`---`) at the top and a line of three hyphens (`---`) or three dots document, but if it is not at the beginning, it must be preceded by a blank line. (Note that, because of the way pandoc concatenates input files when several are provided, you may also keep the metadata in a separate YAML file -and pass it to pandoc as an argument, along with your markdown files: +and pass it to pandoc as an argument, along with your Markdown files: pandoc chap1.md chap2.md chap3.md metadata.yaml -s -o book.html @@ -2086,7 +2361,7 @@ Just be sure that the YAML file begins with `---` and ends with `---` or Metadata will be taken from the fields of the YAML object and added to any existing document metadata. Metadata can contain lists and objects (nested -arbitrarily), but all string scalars will be interpreted as markdown. Fields +arbitrarily), but all string scalars will be interpreted as Markdown. Fields with names ending in an underscore will be ignored by pandoc. (They may be given a role by external processors.) @@ -2094,7 +2369,7 @@ A document may contain multiple metadata blocks. The metadata fields will be combined through a *left-biased union*: if two metadata blocks attempt to set the same field, the value from the first block will be taken. -When pandoc is used with `-t markdown` to create a markdown document, +When pandoc is used with `-t markdown` to create a Markdown document, a YAML metadata block will be produced only if the `-s/--standalone` option is used. All of the metadata will appear in a single block at the beginning of the document. @@ -2121,7 +2396,7 @@ when the field contains blank lines: Template variables will be set automatically from the metadata. Thus, for example, in writing HTML, the variable `abstract` will be set to the HTML -equivalent of the markdown in the `abstract` field: +equivalent of the Markdown in the `abstract` field: <p>This is the abstract.</p> <p>It consists of two paragraphs.</p> @@ -2158,12 +2433,12 @@ instead of <strong>hello</strong> -This rule is easier to remember than standard markdown's rule, +This rule is easier to remember than standard Markdown's rule, which allows only the following characters to be backslash-escaped: \`*_{}[]()>#+-.! -(However, if the `markdown_strict` format is used, the standard markdown rule +(However, if the `markdown_strict` format is used, the standard Markdown rule will be used.) A backslash-escaped space is parsed as a nonbreaking space. It will @@ -2173,7 +2448,7 @@ appear in TeX output as `~` and in HTML and XML as `\ ` or A backslash-escaped newline (i.e. a backslash occurring at the end of a line) is parsed as a hard line break. It will appear in TeX output as `\\` and in HTML as `<br />`. This is a nice alternative to -markdown's "invisible" way of indicating hard line breaks using +Markdown's "invisible" way of indicating hard line breaks using two trailing spaces on a line. Backslash escapes do not work in verbatim contexts. @@ -2188,8 +2463,8 @@ correct output, converting straight quotes to curly quotes, `---` to em-dashes, `--` to en-dashes, and `...` to ellipses. Nonbreaking spaces are inserted after certain abbreviations, such as "Mr." -Note: if your LaTeX template uses the `csquotes` package, pandoc will -detect automatically this and use `\enquote{...}` for quoted text. +Note: if your LaTeX template calls for the [`csquotes`] package, pandoc will +detect this automatically and use `\enquote{...}` for quoted text. Inline formatting ----------------- @@ -2265,7 +2540,7 @@ of consecutive backticks (optionally followed by a space) and ends with a string of the same number of backticks (optionally preceded by a space). -Note that backslash-escapes (and other markdown constructs) do not +Note that backslash-escapes (and other Markdown constructs) do not work in verbatim contexts: This is a backslash followed by an asterisk: `\*`. @@ -2273,7 +2548,7 @@ work in verbatim contexts: #### Extension: `inline_code_attributes` #### Attributes can be attached to verbatim text, just as with -[fenced code blocks](#fenced-code-blocks): +[fenced code blocks]: `<$>`{.haskell} @@ -2302,12 +2577,11 @@ them and they won't be treated as math delimiters. TeX math will be printed in all output formats. How it is rendered depends on the output format: -Markdown, LaTeX, Org-Mode, ConTeXt +Markdown, LaTeX, Emacs Org mode, ConTeXt ~ It will appear verbatim between `$` characters. reStructuredText - ~ It will be rendered using an interpreted text role `:math:`, as described - [here](http://docutils.sourceforge.net/docs/ref/rst/roles.html#math) + ~ It will be rendered using an [interpreted text role `:math:`]. AsciiDoc ~ It will be rendered as `latexmath:[...]`. @@ -2328,8 +2602,8 @@ RTF, OpenDocument, ODT ~ It will be rendered, if possible, using unicode characters, and will otherwise appear verbatim. -Docbook - ~ If the `--mathml` flag is used, it will be rendered using mathml +DocBook + ~ If the `--mathml` flag is used, it will be rendered using MathML in an `inlineequation` or `informalequation` tag. Otherwise it will be rendered, if possible, using unicode characters. @@ -2371,7 +2645,7 @@ HTML, Slidy, DZSlides, S5, EPUB 5. If the `--gladtex` option is used, TeX formulas will be enclosed in `<eq>` tags in the HTML output. The resulting `htex` file may then be processed by [gladTeX], which will produce image files for each - formula and an `html` file with links to these images. So, the + formula and an HTML file with links to these images. So, the procedure is: pandoc -s --gladtex myfile.txt -o myfile.htex @@ -2389,6 +2663,8 @@ HTML, Slidy, DZSlides, S5, EPUB math) and put in `<span>` tags with class `math`. The [MathJax] script will be used to render it as formulas. +[interpreted text role `:math:`]: http://docutils.sourceforge.net/docs/ref/rst/roles.html#math + Raw HTML -------- @@ -2397,7 +2673,7 @@ Raw HTML Markdown allows you to insert raw HTML (or DocBook) anywhere in a document (except verbatim contexts, where `<`, `>`, and `&` are interpreted literally). (Technically this is not an extension, since standard -markdown allows it, but it has been made an extension so that it can +Markdown allows it, but it has been made an extension so that it can be disabled if desired.) The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous, @@ -2406,15 +2682,15 @@ formats. #### Extension: `markdown_in_html_blocks` #### -Standard markdown allows you to include HTML "blocks": blocks +Standard Markdown allows you to include HTML "blocks": blocks of HTML between balanced tags that are separated from the surrounding text with blank lines, and start and end at the left margin. Within -these blocks, everything is interpreted as HTML, not markdown; +these blocks, everything is interpreted as HTML, not Markdown; so (for example), `*` does not signify emphasis. Pandoc behaves this way when the `markdown_strict` format is used; but -by default, pandoc interprets material between HTML block tags as markdown. -Thus, for example, Pandoc will turn +by default, pandoc interprets material between HTML block tags as Markdown. +Thus, for example, pandoc will turn <table> <tr> @@ -2435,12 +2711,12 @@ into whereas `Markdown.pl` will preserve it as is. There is one exception to this rule: text between `<script>` and -`<style>` tags is not interpreted as markdown. +`<style>` tags is not interpreted as Markdown. -This departure from standard markdown should make it easier to mix -markdown with HTML block elements. For example, one can surround -a block of markdown text with `<div>` tags without preventing it -from being interpreted as markdown. +This departure from standard Markdown should make it easier to mix +Markdown with HTML block elements. For example, one can surround +a block of Markdown text with `<div>` tags without preventing it +from being interpreted as Markdown. #### Extension: `native_divs` #### @@ -2478,7 +2754,7 @@ Note that in LaTeX environments, like \end{tabular} the material between the begin and end tags will be interpreted as raw -LaTeX, not as markdown. +LaTeX, not as Markdown. Inline LaTeX is ignored in output formats other than Markdown, LaTeX, and ConTeXt. @@ -2574,7 +2850,7 @@ empty: [my website]: http://foo.bar.baz -Note: In `Markdown.pl` and most other markdown implementations, +Note: In `Markdown.pl` and most other Markdown implementations, reference link definitions cannot occur in nested constructions such as list items or block quotes. Pandoc lifts this arbitrary seeming restriction. So the following is fine in pandoc, though @@ -2596,8 +2872,7 @@ be omitted entirely: ### Internal links ### To link to another section of the same document, use the automatically -generated identifier (see [Header identifiers](#header-identifiers), -below). For example: +generated identifier (see [Header identifiers]). For example: See the [Introduction](#introduction). @@ -2640,7 +2915,7 @@ If you just want a regular inline image, just make sure it is not the only thing in the paragraph. One way to do this is to insert a nonbreaking space after the image: - \ + \ #### Extension: `common_link_attributes` #### @@ -2691,7 +2966,7 @@ Footnotes #### Extension: `footnotes` #### -Pandoc's markdown allows footnotes, using the following syntax: +Pandoc's Markdown allows footnotes, using the following syntax: Here is a footnote reference,[^1] and another.[^longnote] @@ -2763,17 +3038,35 @@ The bibliography may have any of these formats: MODS .mods RIS .ris -Note that `.bib` can generally be used with both BibTeX and BibLaTeX -files, but you can use `.bibtex` to force BibTeX. +Note that `.bib` can be used with both BibTeX and BibLaTeX files; +use `.bibtex` to force BibTeX. Note that `pandoc-citeproc --bib2json` and `pandoc-citeproc --bib2yaml` can produce `.json` and `.yaml` files from any of the supported formats. -In-field markup: In bibtex and biblatex databases, pandoc-citeproc parses -(a subset of) LaTeX markup; in CSL JSON databases, an HTML-like markup -([specs](http://docs.citationstyles.org/en/1.0/release-notes.html#rich-text-markup-within-fields)); -and in CSL YAML databases, pandoc markdown. `pandoc-citeproc -j` and `-y` -interconvert these markup formats as far as possible. +In-field markup: In BibTeX and BibLaTeX databases, pandoc-citeproc parses +a subset of LaTeX markup; in CSL YAML databases, pandoc Markdown; and in CSL JSON databases, an [HTML-like markup][CSL markup specs]: + +`<i>...</i>` +: italics + +`<b>...</b>` +: bold + +`<span style="font-variant:small-caps;">...</span>` or `<sc>...</sc>` +: small capitals + +`<sub>...</sub>` +: subscript + +`<sup>...</sup>` +: superscript + +`<span class="nocase">...</span>` +: prevent a phrase from being capitalized as title case + +`pandoc-citeproc -j` and `-y` interconvert the CSL JSON +and CSL YAML formats as far as possible. As an alternative to specifying a bibliography file, you can include the citation data directly in the `references` field of the @@ -2809,13 +3102,11 @@ YAML-encoded references, for example: (`pandoc-citeproc --bib2yaml` can produce these from a bibliography file in one of the supported formats.) -By default, `pandoc-citeproc` will use the Chicago Manual of Style author-date -format for citations and references. To use another style, you will need to -specify a [CSL] 1.0 style file in the `csl` metadata field. A repository of CSL -styles can be found at <https://github.com/citation-style-language/styles>. See -also <http://zotero.org/styles> for easy browsing. A primer on creating and -modifying CSL styles can be found at -<http://citationstyles.org/downloads/primer.html>. +Citations and references can be formatted using any style supported by the +[Citation Style Language], listed in the [Zotero Style Repository]. +These files are specified using the `--csl` option or the `csl` metadata field. +By default, `pandoc-citeproc` will use the [Chicago Manual of Style] author-date +format. The CSL project provides further information on [finding and editing styles]. Citations go inside square brackets and are separated by semicolons. Each citation must have a key, composed of '@' + the citation @@ -2824,12 +3115,23 @@ a locator, and a suffix. The citation key must begin with a letter, digit, or `_`, and may contain alphanumerics, `_`, and internal punctuation characters (`:.#$%&-+?<>~/`). Here are some examples: - Blah blah [see @doe99, pp. 33-35; also @smith04, ch. 1]. + Blah blah [see @doe99, pp. 33-35; also @smith04, chap. 1]. Blah blah [@doe99, pp. 33-35, 38-39 and *passim*]. Blah blah [@smith04; @doe99]. +`pandoc-citeproc` detects locator terms in the [CSL locale files]. +Either abbreviated or unabbreviated forms are accepted. In the `en-US` +locale, locator terms can be written in either singular or plural forms, +as `book`, `bk.`/`bks.`; `chapter`, `chap.`/`chaps.`; `column`, +`col.`/`cols.`; `figure`, `fig.`/`figs.`; `folio`, `fol.`/`fols.`; +`number`, `no.`/`nos.`; `line`, `l.`/`ll.`; `note`, `n.`/`nn.`; `opus`, +`op.`/`opp.`; `page`, `p.`/`pp.`; `paragraph`, `para.`/`paras.`; `part`, +`pt.`/`pts.`; `section`, `sec.`/`secs.`; `sub verbo`, `s.v.`/`s.vv.`; +`verse`, `v.`/`vv.`; `volume`, `vol.`/`vols.`; `¶`/`¶¶`; `§`/`§§`. If no +locator term is used, "page" is assumed. + A minus sign (`-`) before the `@` will suppress mention of the author in the citation. This can be useful when the author is already mentioned in the text: @@ -2869,19 +3171,26 @@ In this example, the document will contain a citation for `item3` only, but the bibliography will contain entries for `item1`, `item2`, and `item3`. -For LaTeX or PDF output, you can also use NatBib or BibLaTeX +For LaTeX or PDF output, you can also use [`natbib`] or [`biblatex`] to render bibliography. In order to do so, specify bibliography files as outlined above, and add `--natbib` or `--biblatex` argument to `pandoc` invocation. Bear in mind that bibliography files have to be in respective format (either BibTeX or BibLaTeX). +[CSL markup specs]: http://docs.citationstyles.org/en/1.0/release-notes.html#rich-text-markup-within-fields +[Chicago Manual of Style]: http://chicagomanualofstyle.org +[Citation Style Language]: http://citationstyles.org +[Zotero Style Repository]: https://www.zotero.org/styles +[finding and editing styles]: http://citationstyles.org/styles/ +[CSL locale files]: https://github.com/citation-style-language/locales + Non-pandoc extensions --------------------- -The following markdown syntax extensions are not enabled by default +The following Markdown syntax extensions are not enabled by default in pandoc, but may be enabled by adding `+EXTENSION` to the format name, where `EXTENSION` is the name of the extension. Thus, for -example, `markdown+hard_line_breaks` is markdown with hard line breaks. +example, `markdown+hard_line_breaks` is Markdown with hard line breaks. #### Extension: `lists_without_preceding_blankline` #### @@ -2900,6 +3209,10 @@ treated as spaces or as hard line breaks. This option is intended for use with East Asian languages where spaces are not used between words, but text is divided into lines for readability. +#### Extension: `emoji` #### + +Parses textual emojis like `:smile:` as Unicode emoticons. + #### Extension: `tex_math_single_backslash` #### Causes anything between `\(` and `\)` to be interpreted as inline @@ -2915,8 +3228,8 @@ as display TeX math. #### Extension: `markdown_attribute` #### -By default, pandoc interprets material inside block-level tags as markdown. -This extension changes the behavior so that markdown is only parsed +By default, pandoc interprets material inside block-level tags as Markdown. +This extension changes the behavior so that Markdown is only parsed inside block-level tags if the tags have the attribute `markdown=1`. #### Extension: `mmd_title_block` #### @@ -2934,13 +3247,13 @@ See the MultiMarkdown documentation for details. If `pandoc_title_block` or `yaml_metadata_block` is enabled, it will take precedence over `mmd_title_block`. - [MultiMarkdown]: http://fletcherpenney.net/multimarkdown/ +[MultiMarkdown]: http://fletcherpenney.net/multimarkdown/ #### Extension: `abbreviations` #### Parses PHP Markdown Extra abbreviation keys, like - *[HTML]: Hyper Text Markup Language + *[HTML]: Hypertext Markup Language Note that the pandoc document model does not support abbreviations, so if this extension is enabled, abbreviation keys are @@ -2976,7 +3289,7 @@ after the header but before any trailing `#`s in an ATX header). #### Extension: `compact_definition_lists` #### Activates the definition list syntax of pandoc 1.12.x and earlier. -This syntax differs from the one described [above](#definition-lists) +This syntax differs from the one described above under [Definition lists] in several respects: - No blank line is required between consecutive items of the @@ -3003,7 +3316,7 @@ in several respects: Markdown variants ----------------- -In addition to pandoc's extended markdown, the following markdown +In addition to pandoc's extended Markdown, the following Markdown variants are supported: `markdown_phpextra` (PHP Markdown Extra) @@ -3012,11 +3325,11 @@ variants are supported: `header_attributes`, `common_link_attributes`, `abbreviations`, `shortcut_reference_links`. -`markdown_github` (GitHub-flavored Markdown) +`markdown_github` (GitHub-Flavored Markdown) : `pipe_tables`, `raw_html`, `tex_math_single_backslash`, `fenced_code_blocks`, `auto_identifiers`, `ascii_identifiers`, `backtick_code_blocks`, `autolink_bare_uris`, - `intraword_underscores`, `strikeout`, `hard_line_breaks`, + `intraword_underscores`, `strikeout`, `hard_line_breaks`, `emoji`, `shortcut_reference_links`. `markdown_mmd` (MultiMarkdown) @@ -3030,11 +3343,11 @@ variants are supported: `markdown_strict` (Markdown.pl) : `raw_html` -Extensions with formats other than markdown +Extensions with formats other than Markdown ------------------------------------------- Some of the extensions discussed above can be used with formats -other than markdown: +other than Markdown: * `auto_identifiers` can be used with `latex`, `rst`, `mediawiki`, and `textile` input (and is used by default). @@ -3044,15 +3357,15 @@ other than markdown: (This is handy for reading web pages formatted using MathJax, for example.) -Producing slide shows with Pandoc +Producing slide shows with pandoc ================================= -You can use Pandoc to produce an HTML + javascript slide presentation +You can use pandoc to produce an HTML + javascript slide presentation that can be viewed via a web browser. There are five ways to do this, using [S5], [DZSlides], [Slidy], [Slideous], or [reveal.js]. -You can also produce a PDF slide show using LaTeX [beamer]. +You can also produce a PDF slide show using LaTeX [`beamer`]. -Here's the markdown source for a simple slide show, `habits.txt`: +Here's the Markdown source for a simple slide show, `habits.txt`: % Habits % John Doe @@ -3097,7 +3410,7 @@ For Slidy, Slideous, reveal.js, and S5, the file produced by pandoc with the assumed to be available at the relative path `s5/default` (for S5), `slideous` (for Slideous), `reveal.js` (for reveal.js), or at the Slidy website at `w3.org` (for Slidy). (These paths can be changed by setting the `slidy-url`, -`slideous-url`, `revealjs-url`, or `s5-url` variables; see `--variable`, +`slideous-url`, `revealjs-url`, or `s5-url` variables; see [Variables for slides], above.) For DZSlides, the (relatively short) javascript and css are included in the file by default. @@ -3194,21 +3507,21 @@ files it does not find in the user data directory. For dzslides, the CSS is included in the HTML file itself, and may be modified there. -For reveal.js, themes can be used by setting the `theme` variable, -for example: +All [reveal.js configuration options] can be set through variables. +For example, themes can be used by setting the `theme` variable: -V theme=moon Or you can specify a custom stylesheet using the `--css` option. -To style beamer slides, you can specify a beamer "theme" or "colortheme" -using the `-V` option: +To style beamer slides, you can specify a `theme`, `colortheme`, +`fonttheme`, `innertheme`, and `outertheme`, using the `-V` option: pandoc -t beamer habits.txt -V theme:Warsaw -o habits.pdf Note that header attributes will turn into slide attributes (on a `<div>` or `<section>`) in HTML slide formats, allowing you -to style individual slides. In Beamer, the only header attribute +to style individual slides. In beamer, the only header attribute that affects slides is the `allowframebreaks` class, which sets the `allowframebreaks` option, causing multiple slides to be created if the content overfills the frame. This is recommended especially for @@ -3220,12 +3533,12 @@ Speaker notes ------------- reveal.js has good support for speaker notes. You can add notes to your -markdown document thus: +Markdown document thus: <div class="notes"> This is my note. - - It can contain markdown + - It can contain Markdown - like this list </div> @@ -3234,8 +3547,8 @@ To show the notes window, press `s` while viewing the presentation. Notes are not yet supported for other slide formats, but the notes will not appear on the slides themselves. -Marking frames "fragile" in beamer ----------------------------------- +Frame attributes in beamer +-------------------------- Sometimes it is necessary to add the LaTeX `[fragile]` option to a frame in beamer (for example, when using the `minted` environment). @@ -3244,12 +3557,20 @@ introducing the slide: # Fragile slide {.fragile} +All of the other frame attributes described in Section 8.1 of +the [Beamer User's Guide] may also be used: `allowdisplaybreaks`, +`allowframebreaks`, `b`, `c`, `t`, `environment`, `label`, `plain`, +`shrink`. + +Creating EPUBs with pandoc +========================== + EPUB Metadata -============= +------------- EPUB metadata may be specified using the `--epub-metadata` option, but -if the source document is markdown, it is better to use a YAML metadata -block. Here is an example: +if the source document is Markdown, it is better to use a [YAML metadata +block][Extension: `yaml_metadata_block`]. Here is an example: --- title: @@ -3286,7 +3607,7 @@ The following fields are recognized: `creator` ~ Either a string value, or an object with fields `role`, `file-as`, and `text`, or a list of such objects. Valid values for `role` are - [marc relators](http://www.loc.gov/marc/relators/relaterm.html), but + [MARC relators], but pandoc will attempt to translate the human-readable versions (like "author" and "editor") to the appropriate marc relators. @@ -3297,8 +3618,8 @@ The following fields are recognized: ~ A string value in `YYYY-MM-DD` format. (Only the year is necessary.) Pandoc will attempt to convert other common date formats. -`language` - ~ A string value in [RFC5646] format. Pandoc will default to the local +`lang` (or legacy: `language`) + ~ A string value in [BCP 47] format. Pandoc will default to the local language if nothing is specified. `subject` @@ -3330,7 +3651,25 @@ The following fields are recognized: `page-progression-direction` ~ Either `ltr` or `rtl`. Specifies the `page-progression-direction` - spine [attribute][EPUBspine]. + attribute for the [`spine` element]. + +[MARC relators]: http://loc.gov/marc/relators/relaterm.html +[`spine` element]: http://idpf.org/epub/301/spec/epub-publications.html#sec-spine-elem + +Linked media +------------ + +By default, pandoc will download linked media (including audio and +video) and include it in the EPUB container, yielding a completely +self-contained EPUB. If you want to link to external media resources +instead, use raw HTML in your source and add `data-external="1"` to the tag +with the `src` attribute. For example: + + <audio controls="1"> + <source src="http://example.com/music/toccata.mp3" + data-external="1" type="audio/mpeg"> + </source> + </audio> Literate Haskell support ======================== @@ -3340,15 +3679,16 @@ format (`markdown`, `markdown_strict`, `rst`, or `latex` for input or output; `beamer`, `html` or `html5` for output only), pandoc will treat the document as literate Haskell source. This means that - - In markdown input, "bird track" sections will be parsed as Haskell + - In Markdown input, "bird track" sections will be parsed as Haskell code rather than block quotations. Text between `\begin{code}` - and `\end{code}` will also be treated as Haskell code. + and `\end{code}` will also be treated as Haskell code. For + ATX-style headers the character '=' will be used instead of '#'. - - In markdown output, code blocks with classes `haskell` and `literate` + - In Markdown output, code blocks with classes `haskell` and `literate` will be rendered using bird tracks, and block quotations will be indented one space, so they will not be treated as Haskell code. In addition, headers will be rendered setext-style (with underlines) - rather than atx-style (with '#' characters). (This is because ghc + rather than ATX-style (with '#' characters). (This is because ghc treats '#' characters in column 1 as introducing line numbers.) - In restructured text input, "bird track" sections will be parsed @@ -3370,7 +3710,7 @@ Examples: pandoc -f markdown+lhs -t html -reads literate Haskell source formatted with markdown conventions and writes +reads literate Haskell source formatted with Markdown conventions and writes ordinary HTML (without bird tracks). pandoc -f markdown+lhs -t html+lhs @@ -3381,10 +3721,8 @@ and pasted as literate Haskell source. Syntax highlighting =================== -Pandoc will automatically highlight syntax in fenced code blocks that -are marked with a language name. (See [Extension: -`inline_code_attributes`] and [Extension: `fenced_code_attributes`], -above.) The Haskell library [highlighting-kate] is used for +Pandoc will automatically highlight syntax in [fenced code blocks] that +are marked with a language name. The Haskell library [highlighting-kate] is used for highlighting, which works in HTML, Docx, and LaTeX/PDF output. The color scheme can be selected using the `--highlight-style` option. The default color scheme is `pygments`, which imitates the default color @@ -3396,6 +3734,8 @@ To see a list of language names that pandoc will recognize, type To disable highlighting, use the `--no-highlight` option. +[highlighting-kate]: https://github.com/jgm/highlighting-kate + Custom writers ============== @@ -3413,6 +3753,8 @@ which you can modify according to your needs, do pandoc --print-default-data-file sample.lua +[lua]: http://www.lua.org + Authors ======= @@ -3430,6 +3772,7 @@ Alfred Wechselberger, Andreas Lööw, Andrew Dunning, Antoine Latter, +Arata Mizuki, Arlo O'Keeffe, Artyom Kazak, Ben Gamari, @@ -3471,7 +3814,7 @@ Hans-Peter Deifel, Henry de Valence, Ilya V. Portnov, infinity0x, -Jaime Marquínez Ferrándiz, +Jaime Marquínez Ferrándiz, James Aspnes, Jamie F. Olson, Jan Larres, @@ -3546,46 +3889,4 @@ Vincent, Wikiwide, and Xavier Olive. -[markdown]: http://daringfireball.net/projects/markdown/ -[reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html -[S5]: http://meyerweb.com/eric/tools/s5/ -[Slidy]: http://www.w3.org/Talks/Tools/Slidy/ -[Slideous]: http://goessner.net/articles/slideous/ -[HTML]: http://www.w3.org/TR/html40/ -[HTML 5]: http://www.w3.org/TR/html5/ -[XHTML]: http://www.w3.org/TR/xhtml1/ -[LaTeX]: http://www.latex-project.org/ -[beamer]: http://www.tex.ac.uk/CTAN/macros/latex/contrib/beamer -[ConTeXt]: http://www.pragma-ade.nl/ -[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format -[DocBook]: http://www.docbook.org/ -[OPML]: http://dev.opml.org/spec2.html -[OpenDocument]: http://opendocument.xml.org/ -[ODT]: http://en.wikipedia.org/wiki/OpenDocument -[Textile]: http://redcloth.org/textile -[MediaWiki markup]: http://www.mediawiki.org/wiki/Help:Formatting -[DokuWiki markup]: https://www.dokuwiki.org/dokuwiki -[TWiki markup]: http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules -[Haddock markup]: http://www.haskell.org/haddock/doc/html/ch03s08.html -[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://orgmode.org -[AsciiDoc]: http://www.methods.co.nz/asciidoc/ [GPL]: http://www.gnu.org/copyleft/gpl.html "GNU General Public License" -[DZSlides]: http://paulrouget.com/dzslides/ -[ISO 8601 format]: http://www.w3.org/TR/NOTE-datetime -[Word docx]: http://www.microsoft.com/interop/openup/openxml/default.aspx -[PDF]: http://www.adobe.com/pdf/ -[reveal.js]: http://lab.hakim.se/reveal-js/ -[FictionBook2]: http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1 -[lua]: http://www.lua.org -[marc relators]: http://www.loc.gov/marc/relators/relaterm.html -[RFC5646]: http://tools.ietf.org/html/rfc5646 -[InDesign ICML]: https://www.adobe.com/content/dam/Adobe/en/devnet/indesign/cs55-docs/IDML/idml-specification.pdf -[txt2tags]: http://txt2tags.org/ -[EPUB]: http://idpf.org/epub -[EPUBspine]: http://www.idpf.org/epub/301/spec/epub-publications.html#sec-spine-elem -[KaTeX]: https://github.com/Khan/KaTeX -[CommonMark]: http://commonmark.org -[highlighting-kate]: http://github.com/jgm/highlighting-kate diff --git a/RELEASE-CHECKLIST b/RELEASE-CHECKLIST index fb786a9f0..7ae936d96 100644 --- a/RELEASE-CHECKLIST +++ b/RELEASE-CHECKLIST @@ -14,13 +14,13 @@ _ Generate Windows package and copy to directory. _ Generate Mac OSX package. -_ Generate Ubuntu/Debian deb package. +_ Generate Ubuntu/Debian deb package (cd deb; make package). -- Add release on github (and upload files) +- Add release on github (use 'make changes_github' and upload files) _ Upload to HackageDB -_ Update website, including short description of changes +_ Update website, including short description of changes ('make changes') _ Announce on pandoc-announce, pandoc-discuss @@ -20,17 +20,14 @@ import Distribution.Simple import Distribution.Simple.PreProcess import Distribution.Simple.Setup (ConfigFlags(..)) import Distribution.PackageDescription (PackageDescription(..), FlagName(..)) -import System.Process ( rawSystem ) -import System.FilePath ( (</>) ) -import System.Directory ( findExecutable ) +import Distribution.Simple.Utils ( rawSystemExitCode, findProgramVersion ) +import System.Exit import Distribution.Verbosity ( Verbosity ) import Distribution.Simple.Utils (info, notice, installOrdinaryFiles) import Distribution.Simple.Setup import Distribution.Simple.Program (simpleProgram, Program(..)) import Distribution.Simple.LocalBuildInfo import Data.Version -import System.Process (readProcess) -import Text.ParserCombinators.ReadP (readP_to_S, skipSpaces, eof) import Control.Monad (when) import qualified Control.Exception as E @@ -39,23 +36,11 @@ main = defaultMainWithHooks $ simpleUserHooks { -- enable hsb2hs preprocessor for .hsb files hookedPreProcessors = [ppBlobSuffixHandler] , hookedPrograms = [(simpleProgram "hsb2hs"){ - programFindVersion = findHsb2hsVersion }] + programFindVersion = \verbosity fp -> + findProgramVersion "--version" id verbosity fp }] , postCopy = installManPage } -findHsb2hsVersion :: Verbosity -> FilePath -> IO (Maybe Version) -findHsb2hsVersion verb fp = do - let handleExitFailure :: IOError -> IO (Maybe Version) - handleExitFailure _ = return Nothing - E.handle handleExitFailure $ do - outp <- readProcess fp ["--version"] "" - case readP_to_S (do v <- parseVersion - skipSpaces - eof - return v) outp of - ((v,""):_) -> return (Just v) - _ -> return Nothing - ppBlobSuffixHandler :: PPSuffixHandler ppBlobSuffixHandler = ("hsb", \_ lbi -> PreProcessor { @@ -67,11 +52,11 @@ ppBlobSuffixHandler = ("hsb", \_ lbi -> _ -> False when embedData $ do info verbosity $ "Preprocessing " ++ infile ++ " to " ++ outfile - hsb2hsPath <- findExecutable "hsb2hs" - case hsb2hsPath of - Just p -> rawSystem p [infile, infile, outfile] - Nothing -> error "hsb2hs is needed to build this program: cabal install hsb2hs" - return () + ec <- rawSystemExitCode verbosity "hsb2hs" + [infile, infile, outfile] + case ec of + ExitSuccess -> return () + ExitFailure _ -> error "hsb2hs is needed to build this program" }) installManPage :: Args -> CopyFlags @@ -80,6 +65,6 @@ installManPage _ flags pkg lbi = do let verbosity = fromFlag (copyVerbosity flags) let copydest = fromFlag (copyDest flags) let mandest = mandir (absoluteInstallDirs pkg lbi copydest) - </> "man1" + ++ "/man1" notice verbosity $ "Copying man page to " ++ mandest installOrdinaryFiles verbosity mandest [("man", "pandoc.1")] diff --git a/appveyor.yml b/appveyor.yml index 11551a88a..00a1aab34 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,15 +7,32 @@ install: $env:Path += ";${env:ProgramFiles}\Haskell Platform\2014.2.0.0\bin" $env:Path += ";${env:ProgramFiles}\Haskell Platform\2014.2.0.0\lib\extralibs\bin" $env:Path += ";${env:ProgramFiles}\Haskell Platform\2014.2.0.0\mingw\bin" + # choco install wixtoolset + cabal sandbox init + $env:Path += ";.\.cabal-sandbox\bin" cabal update - cabal install --only-dependencies --enable-tests -w "C:\Program Files\Haskell Platform\2014.2.0.0\bin\ghc-7.8.3" + cabal install --force hsb2hs build_script: -- ps: | - echo "PATH is $env:Path" - cabal configure --enable-tests -v2 -w "C:\Program Files\Haskell Platform\2014.2.0.0\bin\ghc-7.8.3" - cabal build +- cmd: | + cabal install --force --enable-tests -fembed_data_files + +# after_build: +# - cmd: | +# cabal install -fembed_data_files pandoc-citeproc +# strip .\.cabal-sandbox\bin\pandoc.exe +# strip .\.cabal-sandbox\bin\pandoc-citeproc.exe +# .\.cabal-sandbox\bin\pandoc.exe -s --template data\templates\default.html -S README -o README.html +# .\.cabal-sandbox\bin\pandoc.exe -s --template data\templates\default.rtf COPYING -t rtf -S -o COPYING.rtf +# copy COPYRIGHT COPYRIGHT.txt +# for /f "tokens=2 delims= " %%a in ('.\.cabal-sandbox\bin\pandoc --version') do ( set "VERSION=%%a" && exit ) +# if "%VERSION%" == "" ( echo "Error: could not determine version number." && exit /b 1 ) +# cd windows +# echo Creating msi... +# candle -dVERSION=%VERSION% pandoc.wxs +# if %errorlevel% neq 0 exit /b %errorlevel% +# light -sw1076 -ext WixUIExtension -ext WixUtilExtension -out pandoc-%VERSION%-windows.msi pandoc.wixobj test_script: -- ps: | +- cmd: | cabal test diff --git a/benchmark/benchmark-pandoc.hs b/benchmark/benchmark-pandoc.hs index 3fc70331f..849448feb 100644 --- a/benchmark/benchmark-pandoc.hs +++ b/benchmark/benchmark-pandoc.hs @@ -17,13 +17,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -} import Text.Pandoc import Criterion.Main -import Criterion.Config -import System.Environment (getArgs) -import Data.Monoid +import Criterion.Types (Config(..)) import Data.Maybe (mapMaybe) import Debug.Trace (trace) import Text.Pandoc.Error -import Control.Applicative readerBench :: Pandoc -> (String, ReaderOptions -> String -> IO (Either PandocError Pandoc)) @@ -44,9 +41,6 @@ writerBench doc (name, writer) = bench (name ++ " writer") $ nf main :: IO () main = do - args <- getArgs - (conf,_) <- parseArgs defaultConfig{ cfgSamples = Last $ Just 20 } - defaultOptions args inp <- readFile "tests/testsuite.txt" let opts = def{ readerSmart = True } let doc = handleError $ readMarkdown opts inp @@ -56,5 +50,5 @@ main = do let writers' = [(n,w) | (n, PureStringWriter w) <- writers] let writerBs = map (writerBench doc) $ writers' - defaultMainWith conf (return ()) $ - writerBs ++ readerBs + defaultMainWith defaultConfig{ timeLimit = 6.0 } + (writerBs ++ readerBs) @@ -1,3 +1,517 @@ +pandoc (1.15.2.1) + + * Added two missing test files, and `stack.yaml`, to + `extra-source-files` so they're included in the source tarball. + + * reveal.js template: Fixed parallaxBackground options. + `parallaxBackgroundHorizontal` and `parallaxBackgroundVertical` + need integer values, not strings. (Vaughn Iverson) + +pandoc (1.15.2) + + * `pandoc my.md -t context -o my.pdf` will now create a PDF using + ConTeXt rather than LaTeX (#2463). + + * Fixed omitted `url(...)` in CSS data-uri with `--self-contained` (#2489). + + * Added `emoji` Markdown extension, enabled by default in `markdown_github` + (#2523). Added `Ext_emoji` to `Extension` in `Text.Pandoc.Options` + (API change). + + * `Text.Pandoc.Readers.HTML.parseTags`: Fixed over-eager raw HTML inline + parsing (#2469). Tightened up the inline HTML parser so it disallows + TagWarnings. + + * Derive `Generic` instances for the types in `Text.Pandoc.Options`. + + * Org reader: + + + Fix paragraph/list interaction (Albert Krewinkel, #2464). + Paragraphs can be followed by lists, even if there is no blank line + between the two blocks. However, this should only be true if the + paragraph is not within a list, were the preceding block should be + parsed as a plain instead of paragraph (to allow for compact lists). + Thanks to @rgaiacs for bringing this up. + + Allow toggling header args (Albert Krewinkel, #2269). + Org-mode allows to skip the argument of a code block header argument if + it's toggling a value. Argument-less headers are now recognized, + avoiding weird parsing errors. + + Fix markup parsing in headers (Albert Krewinkel, #2504). + Markup as the very first item in a header wasn't recognized. This was + caused by an incorrect parser state: positions at which inline markup + can start need to be marked explicitly by changing the parser state. + This wasn't done for headers. The proper function to update the state + is now called at the beginning of the header parser, fixing this issue. + + Fix emphasis rules for smart parsing (Albert Krewinkel, #2513). + Smart quotes, ellipses, and dashes should behave like normal quotes, + single dashes, and dots with respect to text markup parsing. + + Require whitespace around definition list markers (#2518). + This rule was not checked before, resulting in bugs with footnotes + and some link types. + + * Markdown reader: + + + Pipe tables with long lines now get relative cell widths (#2471). + If a pipe table contains a line longer than the column width (as set by + `--columns` or 80 by default), relative widths are computed based on the + widths of the separator lines relative to the column width. This should + solve persistent problems with long pipe tables in LaTeX/PDF output, and + give more flexibility for determining relative column widths in other + formats, too. For narrower pipe tables, column widths of 0 are used, + telling pandoc not to specify widths explicitly in output formats that + permit this. + + Improved parser for `mmd_title_block`. We now allow blank metadata + fields. These were explicitly disallowed before. + + Citation keys can now contain `://`, so URLs and DOIs can be used + as citation keys (jgm/pandoc-citeproc#166). + + * Beamer template: fix incompatibility of section slides with natbib. + Natbib (and presumably biblatex) bibliography commands create + their own section. Since these are in frame environments, + we have an incompatibility with the `\AtBeginSection` macro + which creates a special frame when a new section occurs. + (We can't have a frame inside another frame.) This change disables + `\AtBeginSection` inside bibliography slides. Thinks to Yihui Xie for + bringing the problem to my attention. This supersedes #145. See + discussion there. + + * Textile reader: don't do smart punctuation unless explicitly asked + (#2480). Note that although smart punctuation is part of the textile + spec, it's not always wanted when converting from textile + to, say, Markdown. So it seems better to make this an option. + + * LaTeX reader: Handle `comment` environment (Arata Mizuki). + The `comment` environment is handled in a similar way to the + `verbatim` environment, except that its content is discarded. + + * Docx reader: Follow relationships correctly in foot/endnotes (#2258, + Jesse Rosenthal). This fixes a problem with links in notes. + + * LaTeX and ConTeXt writers: support `lang` attribute on divs and spans + (mb21). For LaTeX, also collect `lang` and `dir` attributes on spans and + divs to set the `lang`, `otherlangs` and `dir` variables if they aren’t set + already. See #895. + + * LaTeX writer: + + + Use proper command for `\textarabic` (mb21). + + Added `de-CH-1901`, fixed `el-polyton` in `toPloyglossia` (Nick Bart). + + Use `\hypertarget` and `\hyperlink` for links. This works correctly + to link to Div or Span elements. We now don't bother defining `\label` + for Div or Span elements. Closes jgm/pandoc-citeproc#174. + + Avoid footnotes in list of figures (#1506). + + Properly handle footnotes in captions (#1506). + + Add `\protect` to `\hyperlink` (#2490). Thanks to Hadrien Mary. + + Set `colorlinks` if `linkcolor`, `urlcolor`, `citecolor`, or + `toccolor` is set (#2508). + + * Textile writer: support start number in ordered lists (#2465). + + * OpenDocument writer: Allow customization of opendocument + automatic styles. Automatic styles can now be inserted in the + template, which now provides the enclosing `<office:automatic-styles>` + tags (#2520). + + * Docx writer: insert space between footnote reference and note (#2527). + This matches Word's default behavior. + + * EPUB writer: don't download linked media when `data-external` attribute + set (#2473). By default pandoc downloads all linked media and includes it + in the EPUB container. This can be disabled by setting `data-external` on + the tags linking to media that should not be downloaded. Example: + + <audio controls="1"> + <source src="http://example.com/music/toccata.mp3" + data-external="1" type="audio/mpeg"> + </source> + </audio> + + * HTML writer: use width on whole table if col widths sum to < 100%. + Otherwise some browsers display the table with the columns + separated far apart. + + * AsciiDoc template: Fix `author` and `date`; add `keywords`, + `abstract` (Andrew Dunning). + + * HTML-based templates (Andrew Dunning): + + + Use en dash instead of hyphen between title prefix and title. + + Add `keywords` to metadata. + + Add `lang`, `dir`, `quotes` where missing. + + Always make author and date display conditional. + + Updated dzslides template from source. + + * Man template: make "generated by" comment conditional. + + * LaTeX, Beamer templates: + + + Add `babel-otherlangs` for language divs/spans; `babel-newcommands`, + filled by commands that make babel understand the polyglossia-style + language directives (mb21, #137). + + Improved formatting of conditionals; `$for$` is always provided to allow + multiple options (Andrew Dunning, #141). + + Use `Ligatures=TeX` rather than `Mapping=tex-text` with `fontspec` + to improve support for LuaTeX (Andrew Dunning, #135). + + Revise `hyperref` usage (Andrew Dunning, #139, #141): + - use same options for all LaTeX engines; + - add `subtitle` and `keywords` to PDF metadata; + - do not override `hyperref` link coloring without user input, effectively making + the `hidelinks` option the default (removed as a separate variable); + - link colors can be enabled (using a slightly darker version of the old + defaults) using a new `colorlinks` variable, automatically used by + the LaTeX writer when custom colors are specified; + - `pdfborder={0 0 0}` is automatically set by `hyperref` with + `colorlinks`, and is only applied if `colorlinks` is disabled. + + * ConTeXt template (Andrew Dunning): + + + New variables for controlling styles: `linkstyle`, `linkcolor`, + `linkcontrastcolor`, `layout`, `pagenumbering`, `whitespace`, `indenting`, + `interlinespace`, `headertext`, `footertext`, `mainfont`, `sansfont`, + `monofont`, `mathfont`, `fontsize`. + + Default template no longer supports MkII. + + Improve writing of title block (suppressing numbering of first page). + + Add `title` `subtitle`, `author`, `date`, `keywords` to PDF metadata. + + Support `subtitle`, `abstract`. + + Support list of figures (`lof`), list of tables (`lot`). + + Disable link styling by default. + + Define styles for all section types. + + Enable microtype. + + Improved formatting of conditionals. + + * Beamer template: added code to prevent slide breaks inside paragraphs + (#2422, thanks to Nick Bart). This will matter, in practice, only when + `allowframebreaks` is used. It is especially helpful for bibliography + slides. + + * OpenDocument template: Add `<office:automatic-styles>` tag around + automatic styles. The writer now longer provides this (see #2520). + + * Restored Text.Pandoc.Compat.Monoid. + + * Do not export (<>) from custom Prelude. The Prelude now matches + base 4.8 Prelude's API. + + * Don't use custom prelude with ghc 7.10. Use the custom prelude + only for earlier versions. This change makes `stack ghci` and + `cabal repl` work (#2503), at least with ghc 7.10. + + * Changed § to % in operators from Odt.Arrows.Utils (#2457). + This prevents problems building haddocks with "C" locale. + + * Change default for old-locale flag to False. + + * Use stack in deb, osx, and Windows package generators. + + * Added Vagrantfile for building deb in vm. + This should help in automating binary package creation. 'make package' + will make the package. 'make package COMMIT=blah' will make the package + from commit blah. + + * README: + + + Consistent capitalization for pandoc and Markdown. + + Fixed `auto_identifiers` examples (Benoit Schweblin). + + Improved documentation of template variables (Andrew Dunning). + +pandoc (1.15.1.1) + + * `Text.Pandoc.Data`: store paths in dataFiles using posix separators. + This way we have uniform separators, whether on Windows or Linux. + This should solve a problem where on some Windows versions + the data files weren't being found (#2459). + +pandoc (1.15.1) + + * `pandocVersion` is now defined in `Text.Pandoc.Shared` + and reexported from `Text.Pandoc` (Alex Vong). This allows + writers to access it. (Alex Vong) (API change) + + * For `markdown_mmd`, add: `implicit_figures`, `superscripts`, + `subscripts` (#2401). + + * Added `odt` as input format (Martin Linnemann). Added new module + `Text.Pandoc.Reader.ODT` (API change). Fully implemented features: + Paragraphs, Headers, Basic styling, Unordered lists, Ordered lists, + External Links, Internal Links, Footnotes, Endnotes, Blockquotes. + Partly implemented features: Citations, Tables. + + * Markdown Reader: + + + Add basic tests for each header style (Ophir Lifshitz). + + Add implicit header ref tests for headers with spaces (Ophir Lifshitz). + + Skip spaces in headers (Ophir Lifshitz). + + Handle 'id' and 'class' in parsing key/value attributes (#2396). + `# Header {id="myid" class="foo bar"}` + is now equivalent to `# Header {#myid .foo .bar}`. + + Use '=' instead of '#' for atx-style headers in markdown+lhs. + (Kristof Bastiaensen) + + Pipe tables: allow indented columns. Previously the left-hand column + could not start with 4 or more spaces indent. This was inconvenient + for right-aligned left columns. Note that the first (header column) + must still have 3 or fewer spaces indentation, or the table will be + treated as an indented code block. + + Fix regression: allow HTML comments containing `--`. + Technically this isn't allowed in an HTML comment, but + we've always allowed it, and so do most other implementations. + It is handy if e.g. you want to put command line arguments + in HTML comments. + + * LaTeX reader: + + + Don't eat excess whitespace after macros with only optional + arguments (#2446). + + Support longtable (#2411). + + Implement `\Cite` (#2335). + + Support abstract environment. The abstract populates an + `abstract` metadata field. + + Properly handle booktabs lines. Lines aren't part of the + pandoc table model, so we just ignore them (#2307). + + * HTML reader: + + + Handle type attribute on ol, e.g. `<ol type="i">` (#2313). + + Updated for new automatic header attributes. + + Add auto identifiers if not present on headers. This makes + TOC linking work properly. + + Detect `font-variant` with `pickStyleAttrProps` (Ophir Lifshitz). + + Test `<ol>` type, class, and inline list-style(-type) CSS + (Ophir Lifshitz). + + Better handling of "section" elements (#2438). Previously + `<section>` tags were just parsed as raw HTML blocks. With + this change, section elements are parsed as Div elements with + the class "section". + + * MediaWiki reader: handle unquoted table attributes (#2355). + + * DocBook reader: + + + Added proper support for DocBook `xref` elements (Frerich Raabe). + Added `dbContent` field to reader state, so we can lookup + cross refs. + + Handle `informalexample` (#2319). + + * Docx Reader: + + + Create special punctuation test (Ophir Lifshitz). + + Parse soft, no-break hyphen elements (Ophir Lifshitz). + + Updated headers test (Ophir Lifshitz). Replaced `styles.xml` + in `headers.docx` with pandoc's current `styles.xml`, which + contains styles for Heading 1 through 6. Added Heading 4 + through 7 to the test document. Note that Heading 7 is not + parsed as a Heading because there is no Heading 7 style. + + * RST reader: better handling of indirect roles. + Previously the parser failed on this kind of case + + .. role:: indirect(code) + + .. role:: py(indirect) + :language: python + + :py:`hi` + + Now it correctly recognizes `:py:` as a code role. + + * Org reader: + + + Add auto identifiers if not present on headers + (#2354, Juliusz Gonera). + + Allow verse blocks to contain empty lines (#2402, + Albert Krewinkel). + + * EPUB reader: stop mangling external URLs (#2284). + + * RST writer: + + + Don't insert `\ ` when complex expression in matched pairs. + E.g. `` [:sup:`3`] `` is okay; you don't need `` [:sup:`3`\ ] ``. + + Ensure that `\ ` is inserted when needed before Cite and Span + elements that begin with a "complex" element (jgm/pandoc-citeproc#157). + + Normalize headers only in "standalone" mode (#2394). + + * Haddock writer: escape `*` and `^` (G. Bataille). + + * Markdown writer: + + + In TOC, add links to headers (#829). + + Use unicode super/subscripts for digits in plain output + (when the `superscripts` and `subscripts` extensions are + not enabled). + + * Docx writer: + + + Moved invalid character stripping to `formattedString`. + This avoids an inefficient generic traversal (#2356). + + Use user data directory for `reference.docx` archive. + This allows the test suite to work without installing pandoc first. + It also brings the docx writer in line with the odt writer. + + Tests: docx writer tests now use `../data` for data directory. + This allows tests to be run without installing first. + + Tests: Use real jpg (not empty) for docx tests to avoid warning. + + * LaTeX writer: + + + Fixed detection of 'chapters' from template. + If a documentclass isn't specified in metadata, but the + template has a hardwired bookish documentclass, act as if + `--chapters` was used. This was the default in earlier + versions, but it has been broken for a little while. + + Correctly recognize book documentclass in metadata (#2395). + + Set language-related variables automatically, depending + on the value of the `lang` field, which is now always + assumed to be in BCP47 format (mb21, #1614, #2437). + + Add `\protect` to `\hyperdef` in inline context. This way we + don't get an error when this is used as a moveable argument (#2136). + + Support all frame attributes in Beamer. + + Percent-encode more special characters in URLs (#1640, #2377). + The special characters are '<','>','|','"','{','}','[',']','^', '`'. + + * HTML writer: + + + Update KaTeX JS and CSS versions (Emily Eisenberg). + + For dzslides, add `role="note"` for speaker notes (#1693). + + Percent-encode more special characters in URLs (#1640, #2377). + The special characters are '<','>','|','"','{','}','[',']','^', '`'. + + Render Div with class `section` as `<section>` in HTML5. + + * EPUB writer: + + + In TOC, replace literal `<br/>` with space (#2105). + + With `--webtex`, include image file rather than `data:` URI (#2363). + + * Native writer: format Div properly, with blocks separated. + + * Support bidirectional text output with XeLaTeX, ConTeXt and HTML + (#2191, mb21). + + * Reference Docx: + + + Add missing Header 6 style (steel blue) (Ophir Lifshitz). + + Correct `outlineLvl` for Header styles (Ophir Lifshitz). + + * Templates + + + Beamer: Add `innertheme`, `outertheme` variables + (Guilhem Bonnefille, #121). Add space after colon in figure caption. + Integrate recent font and language updates from LaTeX template; + allow use of `mainfont` variable for changing the slide text + in XeTeX and LuaTeX (Andrew Dunning, #131). + + LaTeX: Add `mainfontoptions`, `sansfontoptions`, + `monofontoptions`, `mathfontoptions`, `fontfamilyoptions` + (Andrew Dunning, #122). Support handling of bidirectional + text (mb21, #120). Improve reliability of superscripts/subscripts + under XeTeX and prevent letters and numbers from appearing on a + different baseline by removing use of the `realscripts` package + (via `xltxtra`). To restore use of OpenType characters for these + features under XeTeX or LuaTeX, add `\usepackage{realscripts}` to + `header-includes` (Andrew Dunning, #130). Remove redundant + reference to `xunicode` (Andrew Dunning, #130). Add `fontenc`, + `indent`, `subparagraph` variables (Andrew Dunning). + Allow use of `hidelinks` variable for `hyperref` package (Hugo Roy, + #113). Prevent package clash with `tufte-latex` and other classes that + include `hyperref` or `color` (Xavier Olive, #115). + + ConTeXt: Support handling of bidirectional text (mb21, #120). + + LaTeX and ConTeXt: Use more specific language variables. + Instead of directly using `lang`, we now use `babel-lang` and + `polyglossia-lang` and `context-lang`. These variables are set by + the writers to the necessary values, based on the `lang` variable + (which now always takes a value in BCP47 format). (mb21, #114, #129). + + HTML: Support handling of bidirectional text (mb21, #120). + Move HTML5 shiv after CSS and fix URL (Andrew Dunning). + Add dir attribute in html5 (Andrew Dunning). + + reveal.js: Add `controls`, `progress` variables (Grégoire Pineau, #127). + Add `width`, `height` variables (Andrew Dunning). Update template + from 3.1 source (Andrew Dunning). All configuration options are now + available as variables, but are only be included if set (reveal.js + uses defaults otherwise). + + man: Added comment stating that the page is autogenerated by pandoc, + giving version. Added `adjusting` and `hyphenate` variables + (Alex Vong, #123). + + * epub.css: added selectors for nested emphasis (Pablo Rodriguez). + + * MediaBag: ensure that `/` is always used as path separator. + + * `sample.lua`: define `CaptionedImage`, add newline at end (#2393). + + * Added `--bash-completion` option. This generates a bash completion + script. To use: `eval "$(pandoc --bash-completion)"`. + + * Text.Pandoc.Error: Define Typeable and Exception instances + for PandocError (#2386). + + * Text.Pandoc.Parsing: `toKey`: strip off outer brackets. + This makes keys with extra space at the beginning and end + work: e.g. + + [foo]: bar + + [ foo ] + + will now be a link to bar (it wasn't before). + + * Text.Pandoc: disable `auto_identifiers` for epub. + The epub writer inserts its own auto identifiers; + this is more complex due to splitting into "chapter" files. + + * Renamed Text.Pandoc.Compat.Locale -> Text.Pandoc.Compat.Time. + It now reexports Data.Time. + + * Use custom Prelude to avoid compiler warnings. + + + The (non-exported) prelude is in prelude/Prelude.hs. + + It exports Monoid and Applicative, like base 4.8 prelude, + but works with older base versions. + + It exports (<>) for mappend. + + It hides 'catch' on older base versions. + + * Added a `stack.ymal` and stack install instructions to INSTALL. + + * Clarified what is "out of scope" in README and CONTRIBUTING.md. + + * Added note to CONTRIBUTING.md about ghc versions and travis. + + * Clarify docs on block quotes. The space after `>` is optional (#2346). + + * Removed obsolete reference to default.csl (#2372). + + * List all styles in manual for `--reference-docx` (Chris Black) + + * Don't capitalize header links in man page. + + * Added section on repl to CONTRIBUTING.md. + + * README: Added space after backslash in image example (#2329). + + * Document details of citation locator terms (Nick Bart). + + * Fixed some internal links in README (#2309). + + * Improve CSL documentation, variables documentations, + links, and cross-references in README. (Andrew Dunning) + + * Fix build failure with `--flags=-https` (Sergei Trofimovich). + + * Use `newManager` instead of `withManager` in recent `http-client`. + This avoids a deprecation warning. + + * Allow building with latest versions of http-types, + HUnit, criterion, syb, aeson. + + * Updated benchmark program for new criterion API. + + * Setup.hs: rewrite so as not to use process, directory, filepath. + Using anything outside base is dangerous, since older + versions of ghc may link against two different versions. + + * Added appveyor (Windows continuous integration) builds. + + * New `.travis.yml`. Autgenerated using `make_travis_yml.hs`. + This script has been modified in a few ways, e.g. to add `GHCOPTS`. + `make .travis.yml` regenerates it based on the tested-with + field of the cabal file. + pandoc (1.15.0.6) * `--self-contained`: Fixed overaggressive CSS minimization (#2301, 2286). @@ -1906,7 +2420,7 @@ pandoc (1.12.4) * MediaWiki reader: - + Accept image links in more languages (Jaime Marquínez Ferrándiz). + + Accept image links in more languages (Jaime Marquínez Ferrándiz). + Fixed bug in certain nested lists (#1213). If a level 2 list was followed by a level 1 list, the first item of the level 1 list would be lost. diff --git a/data/bash_completion.tpl b/data/bash_completion.tpl new file mode 100644 index 000000000..6d7e17215 --- /dev/null +++ b/data/bash_completion.tpl @@ -0,0 +1,62 @@ +#!/bin/bash + +# This script enables bash autocompletion for pandoc. To enable +# bash completion, add this to your .bashrc: +# eval "$(pandoc --bash-completion)" + +_pandoc() +{ + local cur prev opts lastc informats outformats datadir + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + # These should be filled in by pandoc: + opts="%s" + informats="%s" + outformats="%s" + datadir="%s" + + case "${prev}" in + --from|-f|--read|-r) + COMPREPLY=( $(compgen -W "${informats}" -- ${cur}) ) + return 0 + ;; + --to|-t|--write|-w|-D|--print-default-template) + COMPREPLY=( $(compgen -W "${outformats}" -- ${cur}) ) + return 0 + ;; + --email-obfuscation) + COMPREPLY=( $(compgen -W "references javascript none" -- ${cur}) ) + return 0 + ;; + --latex-engine) + COMPREPLY=( $(compgen -W "pdflatex lualatex xelatex" -- ${cur}) ) + return 0 + ;; + --print-default-data-file) + COMPREPLY=( $(compgen -W "reference.odt reference.docx $(find ${datadir} | sed -e 's/.*\/data\///')" -- ${cur}) ) + return 0 + ;; + --highlight-style) + COMPREPLY=( $(compgen -W "pygments tango espresso zenburn kate monochrome haddock" -- ${cur}) ) + return 0 + ;; + *) + ;; + esac + + case "${cur}" in + -*) + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; + *) + COMPREPLY=( $(compgen -f ${cur}) ) + return 0 + ;; + esac + +} + +complete -F _pandoc pandoc diff --git a/data/epub.css b/data/epub.css index 1ea24680d..594a1e01e 100644 --- a/data/epub.css +++ b/data/epub.css @@ -12,4 +12,7 @@ h2.author { } h3.date { } ol.toc { padding: 0; margin-left: 1em; } ol.toc li { list-style-type: none; margin: 0; padding: 0; } -a.footnoteRef { vertical-align: super; }
\ No newline at end of file +a.footnoteRef { vertical-align: super; } +em, em em em, em em em em em { font-style: italic;} +em em, em em em em { font-style: normal; } + diff --git a/data/sample.lua b/data/sample.lua index f5c17839e..fa265d04d 100644 --- a/data/sample.lua +++ b/data/sample.lua @@ -84,7 +84,7 @@ function Doc(body, metadata, variables) end add('</ol>') end - return table.concat(buffer,'\n') + return table.concat(buffer,'\n') .. '\n' end -- The functions that follow render corresponding pandoc elements. @@ -251,6 +251,12 @@ function html_align(align) end end +function CaptionedImage(src, tit, caption) + return '<div class="figure">\n<img src="' .. escape(src,true) .. + '" title="' .. escape(tit,true) .. '"/>\n' .. + '<p class="caption">' .. caption .. '</p>\n</div>' +end + -- Caption is a string, aligns is an array of strings, -- widths is an array of floats, headers is an array of -- strings, rows is an array of arrays of strings. diff --git a/data/templates b/data/templates -Subproject d171db3e6d28134e0f98ba10c60ac8c13380a48 +Subproject ff9ebaa31ae31401e236574e81c2e75609adc72 diff --git a/deb/GlobalSignDomainValidationCA-SHA256-G2.pem b/deb/GlobalSignDomainValidationCA-SHA256-G2.pem new file mode 100644 index 000000000..b9130c350 --- /dev/null +++ b/deb/GlobalSignDomainValidationCA-SHA256-G2.pem @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE-----
+MIIEYzCCA0ugAwIBAgILBAAAAAABRE7wPiAwDQYJKoZIhvcNAQELBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw0xNDAyMjAxMDAw
+MDBaFw0yNDAyMjAxMDAwMDBaMGAxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMTYwNAYDVQQDEy1HbG9iYWxTaWduIERvbWFpbiBWYWxpZGF0
+aW9uIENBIC0gU0hBMjU2IC0gRzIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
+AoIBAQCp3cwOs+IyOd1JIqgTaZOHiOEM7nF9vZCHll1Z8syz0lhXV/lG72wm2DZC
+jn4wsy+aPlN7H262okxFHzzTFZMcie089Ffeyr3sBppqKqAZUn9R0XQ5CJ+r69eG
+ExWXrjbDVGYOWvKgc4Ux47JkFGr/paKOJLu9hVIVonnu8LXuPbj0fYC82ZA1ZbgX
+qa2zmJ+gfn1u+z+tfMIbWTaW2jcyS0tdNQJjjtunz2LuzC7Ujcm9PGqRcqIip3It
+INH6yjfaGJjmFiRxJUvE5XuJUgkC/VkrBG7KB4HUs9ra2+PMgKhWBwZ8lgg3nds4
+tmI0kWIHdAE42HIw4uuQcSZiwFfzAgMBAAGjggElMIIBITAOBgNVHQ8BAf8EBAMC
+AQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQU6k581IAt5RWBhiaMgm3A
+mKTPlw8wRwYDVR0gBEAwPjA8BgRVHSAAMDQwMgYIKwYBBQUHAgEWJmh0dHBzOi8v
+d3d3Lmdsb2JhbHNpZ24uY29tL3JlcG9zaXRvcnkvMDMGA1UdHwQsMCowKKAmoCSG
+Imh0dHA6Ly9jcmwuZ2xvYmFsc2lnbi5uZXQvcm9vdC5jcmwwPQYIKwYBBQUHAQEE
+MTAvMC0GCCsGAQUFBzABhiFodHRwOi8vb2NzcC5nbG9iYWxzaWduLmNvbS9yb290
+cjEwHwYDVR0jBBgwFoAUYHtmGkUNl8qJUC99BM00qP/8/UswDQYJKoZIhvcNAQEL
+BQADggEBANdFnqDc4ONhWgt9d4QXLWVagpqNoycqhffJ7+mG/dRHzQFSlsVDvTex
+4bjyqdKKEYRxkRWJ3AKdC8tsM4U0KJ4gsrGX3G0LEME8zV/qXdeYMcU0mVwAYVXE
+GwJbxeOJyLS4bx448lYm6UHvPc2smU9ZSlctS32ux4j71pg79eXw6ImJuYsDy1oj
+H6T9uOr7Lp2uanMJvPzVoLVEgqtEkS5QLlfBQ9iRBIvpES5ftD953x77PzAAi1Pj
+tywdO02L3ORkHQRYM68bVeerDL8wBHTk8w4vMDmNSwSMHnVmZkngvkA0x1xaUZK6
+EjxS1QSCVS1npd+3lXzuP8MIugS+wEY=
+-----END CERTIFICATE-----
diff --git a/deb/Makefile b/deb/Makefile new file mode 100644 index 000000000..0c4262fc0 --- /dev/null +++ b/deb/Makefile @@ -0,0 +1,12 @@ +COMMIT?=HEAD +VAGRANTBOX?=debian/wheezy64 + +.PHONY: package clean + +package: + VAGRANTBOX=$(VAGRANTBOX) vagrant up + vagrant ssh -c 'rm -rf pandoc && git clone https://github.com/jgm/pandoc && cd pandoc && git checkout -b work $(COMMIT) && git submodule update --init && ./make_deb.sh && cp *.deb /vagrant_data/' + vagrant halt + +clean: + vagrant destroy diff --git a/deb/Vagrantfile b/deb/Vagrantfile new file mode 100644 index 000000000..3a6ac14e8 --- /dev/null +++ b/deb/Vagrantfile @@ -0,0 +1,75 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# All Vagrant configuration is done below. The "2" in Vagrant.configure +# configures the configuration version (we support older styles for +# backwards compatibility). Please don't change it unless you know what +# you're doing. +Vagrant.configure(2) do |config| + # The most common configuration options are documented and commented below. + # For a complete reference, please see the online documentation at + # https://docs.vagrantup.com. + + # Every Vagrant development environment requires a box. You can search for + # boxes at https://atlas.hashicorp.com/search. + config.vm.box = ENV['VAGRANTBOX'] || "ubuntu/precise64" + + # Disable automatic box update checking. If you disable this, then + # boxes will only be checked for updates when the user runs + # `vagrant box outdated`. This is not recommended. + # config.vm.box_check_update = false + + # Create a forwarded port mapping which allows access to a specific port + # within the machine from a port on the host machine. In the example below, + # accessing "localhost:8080" will access port 80 on the guest machine. + # config.vm.network "forwarded_port", guest: 80, host: 8080 + + # Create a private network, which allows host-only access to the machine + # using a specific IP. + # config.vm.network "private_network", ip: "192.168.33.10" + + # Create a public network, which generally matched to bridged network. + # Bridged networks make the machine appear as another physical device on + # your network. + # config.vm.network "public_network" + + # Share an additional folder to the guest VM. The first argument is + # the path on the host to the actual folder. The second argument is + # the path on the guest to mount the folder. And the optional third + # argument is a set of non-required options. + config.vm.synced_folder "..", "/vagrant_data" + + # Provider-specific configuration so you can fine-tune various + # backing providers for Vagrant. These expose provider-specific options. + # Example for VirtualBox: + # + config.vm.provider "virtualbox" do |vb| + # Display the VirtualBox GUI when booting the machine + # vb.gui = true + + # Customize the amount of memory on the VM: + vb.memory = "2048" + end + # + # View the documentation for the provider you are using for more + # information on available options. + + # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies + # such as FTP and Heroku are also available. See the documentation at + # https://docs.vagrantup.com/v2/push/atlas.html for more information. + # config.push.define "atlas" do |push| + # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" + # end + + # Enable provisioning with a shell script. Additional provisioners such as + # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the + # documentation for more information about their specific syntax and use. + config.vm.provision "shell", inline: <<-SHELL + wget -q https://s3.amazonaws.com/download.fpcomplete.com/debian/fpco.key + sudo apt-key add fpco.key + echo 'deb http://download.fpcomplete.com/ubuntu/precise stable main'|sudo tee /etc/apt/sources.list.d/fpco.list + sudo apt-get update + sudo apt-get install -y stack build-essential debhelper dh-make + sudo cp /vagrant_data/deb/*.pem /etc/ssl/certs/ + SHELL +end diff --git a/deb/control.in b/deb/control.in index 0aabf67a2..549f9c115 100644 --- a/deb/control.in +++ b/deb/control.in @@ -4,7 +4,7 @@ Section: text Priority: optional Architecture: ARCHITECTURE Installed-Size: INSTALLED_SIZE -Depends: libc6 (>= 2.11), libgmp10, zlib1g (>= 1:1.1.4) +Depends: libc6 (>= 2.13), libgmp10, zlib1g (>= 1:1.1.4) Maintainer: John MacFarlane <jgm@berkeley.edu> Description: general markup converter Pandoc is a Haskell library for converting from one markup diff --git a/deb/haskell.org.pem b/deb/haskell.org.pem new file mode 100644 index 000000000..05bdffb9a --- /dev/null +++ b/deb/haskell.org.pem @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE-----
+MIIFMjCCBBqgAwIBAgISESGwJtbMWHI+x6Mmm0FEK3WqMA0GCSqGSIb3DQEBCwUA
+MGAxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTYwNAYD
+VQQDEy1HbG9iYWxTaWduIERvbWFpbiBWYWxpZGF0aW9uIENBIC0gU0hBMjU2IC0g
+RzIwHhcNMTUxMTExMjE0NjUzWhcNMTYxMjE1MDYyODEwWjA7MSEwHwYDVQQLExhE
+b21haW4gQ29udHJvbCBWYWxpZGF0ZWQxFjAUBgNVBAMMDSouaGFza2VsbC5vcmcw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDNixwKSAJbYPGflK3nO/hH
+CxigkOiKQr9q47aY9S8l0vU9ISC0eiuKkFD42ia5GzeqyBsGF4HoSF0MtBivShJz
+oxt6xFtmagKRX6VB3Qo41+36IKnqmvWE5CAoNIyoy9+ZgfKQKOaIjQzFd4edYxfa
+AQgEypRjod/BjY4NlAOILXa1L7cNQp29QkouODU5oW9mT/TWh3gNIO7cjqq+GHxh
+7/itRt7I6CJOPhEZa3UaA27yNbDsJK8dxGXeGqkUVqdoff98zO4LygyNxwIguWbD
+ektP8472N9tR4G2e/f3tnWPFzmSFIUYQPQQZsWbMi5lBVAL1IX3kgO8qgyJOQeWN
+AgMBAAGjggIJMIICBTAOBgNVHQ8BAf8EBAMCBaAwSQYDVR0gBEIwQDA+BgZngQwB
+AgEwNDAyBggrBgEFBQcCARYmaHR0cHM6Ly93d3cuZ2xvYmFsc2lnbi5jb20vcmVw
+b3NpdG9yeS8wYgYDVR0RBFswWYINKi5oYXNrZWxsLm9yZ4IYYXV0b2Rpc2NvdmVy
+Lmhhc2tlbGwub3JnghBtYWlsLmhhc2tlbGwub3Jngg9vd2EuaGFza2VsbC5vcmeC
+C2hhc2tlbGwub3JnMAkGA1UdEwQCMAAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsG
+AQUFBwMCMEMGA1UdHwQ8MDowOKA2oDSGMmh0dHA6Ly9jcmwuZ2xvYmFsc2lnbi5j
+b20vZ3MvZ3Nkb21haW52YWxzaGEyZzIuY3JsMIGUBggrBgEFBQcBAQSBhzCBhDBH
+BggrBgEFBQcwAoY7aHR0cDovL3NlY3VyZS5nbG9iYWxzaWduLmNvbS9jYWNlcnQv
+Z3Nkb21haW52YWxzaGEyZzJyMS5jcnQwOQYIKwYBBQUHMAGGLWh0dHA6Ly9vY3Nw
+Mi5nbG9iYWxzaWduLmNvbS9nc2RvbWFpbnZhbHNoYTJnMjAdBgNVHQ4EFgQUsWoN
+IkHc+WhdtDwGB4pRHYZu+x4wHwYDVR0jBBgwFoAU6k581IAt5RWBhiaMgm3AmKTP
+lw8wDQYJKoZIhvcNAQELBQADggEBADrupN5ncMzXJLUxtIkhZKJUOQByrkVqmlvO
+me3tsAQn2YccC1YPE7wlkMttV8h8JN3/CWlvcSwfncXPzDF4lV7tuunapmAJLTxz
+Iz4tCIMzKVaGaivxYe9dml9LtiicsAOo29ZGE4E+mTHXR0EBjylKn4RS5f6XLawC
+wvdzYEH6nw6XbD6PlvYjZekIcky1lZ99cqsBoYiht0PQEcj8LWcBW79o1UWYEaXv
+q8b47QhFYMQ+IKwfIo3PSWjotIBw35lnrfKlrWvqyRA5t+ollH+6X1vdYOibupts
+rUdXZCfeWcwhFiJVOrq7kxpQLNZsPq8nm55Ao2tRGsrDMwsuZhc=
+-----END CERTIFICATE-----
diff --git a/deb/stack.yaml b/deb/stack.yaml new file mode 100644 index 000000000..b4ee36157 --- /dev/null +++ b/deb/stack.yaml @@ -0,0 +1,17 @@ +flags: + pandoc: + trypandoc: false + https: true + embed_data_files: true + old-locale: false + network-uri: true + pandoc-citeproc: + bibutils: true + embed_data_files: true + unicode_collation: false + test_citeproc: false + debug: false +packages: +- '..' +- 'https://hackage.haskell.org/package/pandoc-citeproc-0.8.1.3/pandoc-citeproc-0.8.1.3.tar.gz' +resolver: lts-3.13 diff --git a/extract-changes.hs b/extract-changes.hs new file mode 100644 index 000000000..8c8160c2c --- /dev/null +++ b/extract-changes.hs @@ -0,0 +1,9 @@ +-- Extract changes from latest version in changelog. +import Text.Pandoc.JSON + +main = toJSONFilter extractFirst + +extractFirst :: Pandoc -> Pandoc +extractFirst (Pandoc meta (Para{} : BulletList bs : _)) = + Pandoc meta [BulletList bs] +extractFirst x = x diff --git a/make_deb.sh b/make_deb.sh index a5aaf1549..9b7960805 100755 --- a/make_deb.sh +++ b/make_deb.sh @@ -7,7 +7,7 @@ case "$MACHINE" in i386) ARCHITECTURE=i386;; esac -SANDBOX=`pwd`/.cabal-sandbox +LOCAL=$HOME/.local VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}') DEBPKGVER=1 DEBVER=$VERSION-$DEBPKGVER @@ -16,41 +16,44 @@ DIST=`pwd`/$BASE DEST=$DIST/usr ME=$(whoami) COPYRIGHT=$DEST/share/doc/pandoc/copyright +TEMPDIR=make_binary_package.tmp.$$ -# echo Removing old files... -rm -rf $DIST +# We need this for hsb2hs: +PATH=$LOCAL/bin:$PATH -cabal sandbox init -echo Updating database -cabal update +stack setup +stack clean +which hsb2hs || stack install --stack-yaml stack.hsb2hs.yaml -export PATH=`pwd`/.cabal-sandbox/bin:$PATH -which hsb2hs || cabal install hsb2hs -echo Building pandoc... -cabal clean -cabal install --force --reinstall --flags="embed_data_files make-pandoc-man-pages" . pandoc-citeproc +stack install --stack-yaml deb/stack.yaml +make man/pandoc.1 # get pandoc-citeproc man page: -PANDOC_CITEPROC_PATH=`cabal unpack -d make_binary_package.tmp.$$ pandoc-citeproc | awk '{print $3;}'` -strip $SANDBOX/bin/pandoc -strip $SANDBOX/bin/pandoc-citeproc +PANDOC_CITEPROC_VERSION=`pandoc-citeproc --version | awk '{print $2;}'` +PANDOC_CITEPROC_TARBALL=https://hackage.haskell.org/package/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}.tar.gz +mkdir $TEMPDIR +curl ${PANDOC_CITEPROC_TARBALL} | tar xzC $TEMPDIR +PANDOC_CITEPROC_PATH=$TEMPDIR/pandoc-citeproc-${PANDOC_CITEPROC_VERSION} + +strip $LOCAL/bin/pandoc +strip $LOCAL/bin/pandoc-citeproc mkdir -p $DEST/bin mkdir -p $DEST/share/man/man1 mkdir -p $DEST/share/doc/pandoc mkdir -p $DEST/share/doc/pandoc-citeproc find $DIST -type d | xargs chmod 755 -cp $SANDBOX/bin/pandoc $DEST/bin/ -cp $SANDBOX/bin/pandoc-citeproc $DEST/bin/ -cp $SANDBOX/share/man/man1/pandoc.1 $DEST/share/man/man1/pandoc.1 +cp $LOCAL/bin/pandoc $DEST/bin/ +cp $LOCAL/bin/pandoc-citeproc $DEST/bin/ +cp man/pandoc.1 $DEST/share/man/man1/pandoc.1 gzip -9 $DEST/share/man/man1/pandoc.1 -cp $PANDOC_CITEPROC_PATH/man/man1/pandoc-citeproc.1 $DEST/share/man/man1/ +cp ${PANDOC_CITEPROC_PATH}/man/man1/pandoc-citeproc.1 $DEST/share/man/man1/ gzip -9 $DEST/share/man/man1/pandoc-citeproc.1 cp COPYRIGHT $COPYRIGHT echo "" >> $COPYRIGHT echo "pandoc-citeproc" >> $COPYRIGHT cat $PANDOC_CITEPROC_PATH/LICENSE >> $COPYRIGHT -rm -rf make_binary_package.tmp.$$ +rm -rf $TEMPDIR INSTALLED_SIZE=$(du -B 1024 -s $DEST | awk '{print $1}') mkdir $DIST/DEBIAN diff --git a/make_osx_package.sh b/make_osx_package.sh index e86ed18f2..320c3fead 100755 --- a/make_osx_package.sh +++ b/make_osx_package.sh @@ -1,7 +1,7 @@ #!/bin/bash -e +LOCALBIN=$HOME/.local/bin DIST=`pwd`/osx_package -SANDBOX=`pwd`/.cabal-sandbox VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}') RESOURCES=$DIST/Resources ROOT=$DIST/pandoc @@ -11,38 +11,43 @@ SCRIPTS=$OSX/osx-resources BASE=pandoc-$VERSION ME=$(whoami) PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker -CPPHS=$SANDBOX/bin/cpphs + +# We need this for hsb2hs: +PATH=$LOCALBIN:$PATH +export MACOSX_DEPLOYMENT_TARGET=10.7 # echo Removing old files... rm -rf $DIST +mkdir -p $DIST mkdir -p $RESOURCES - -cabal sandbox init -echo Updating database -cabal update +stack setup +which hsb2hs || stack install --stack-yaml=stack.hsb2hs.yaml echo Building pandoc... -cabal clean -# Use cpphs to avoid problems with clang cpp on ghc 7.8 osx: -cabal install cpphs hsb2hs -cabal install --ghc-options="-optl-mmacosx-version-min=10.6" --reinstall --flags="embed_data_files make-pandoc-man-pages" --ghc-options "-pgmP$CPPHS -optP--cpp" . pandoc-citeproc +stack clean +stack install --stack-yaml=osx/stack.yaml + +echo Getting man pages... +make man/pandoc.1 # get pandoc-citeproc man page: -PANDOC_CITEPROC_PATH=`cabal unpack -d $DIST pandoc-citeproc | awk '{print $3;}'` +PANDOC_CITEPROC_VERSION=`pandoc-citeproc --version | awk '{print $2;}'` +PANDOC_CITEPROC_TARBALL=https://hackage.haskell.org/package/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}.tar.gz +curl ${PANDOC_CITEPROC_TARBALL} | tar xzC $DIST +PANDOC_CITEPROC_PATH=$DIST/pandoc-citeproc-${PANDOC_CITEPROC_VERSION} mkdir -p $DEST/bin mkdir -p $DEST/share/man/man1 -mkdir -p $DEST/share/man/man5 for f in pandoc pandoc-citeproc; do - cp $SANDBOX/bin/$f $DEST/bin/; + cp $LOCALBIN/$f $DEST/bin/; done cp $PANDOC_CITEPROC_PATH/man/man1/pandoc-citeproc.1 $DEST/share/man/man1/ -cp $SANDBOX/share/man/man1/pandoc.1 $DEST/share/man/man1/pandoc.1 +cp man/pandoc.1 $DEST/share/man/man1/ chown -R $ME:staff $DIST echo Copying license... -$SANDBOX/bin/pandoc --data data -t html5 -s COPYING -o $RESOURCES/license.html +$LOCALBIN/pandoc --data data -t html5 -s COPYING -o $RESOURCES/license.html echo Signing pandoc executable... diff --git a/make_travis_yml.hs b/make_travis_yml.hs new file mode 100644 index 000000000..84c58d0d0 --- /dev/null +++ b/make_travis_yml.hs @@ -0,0 +1,210 @@ +#!/usr/bin/env runghc + +-- NB: This code deliberately avoids relying on non-standard packages + +import Control.Monad +import Data.List +import Data.Version +import System.Environment +import System.Exit +import System.IO + +import Distribution.PackageDescription.Parse (readPackageDescription) +import Distribution.PackageDescription (packageDescription, testedWith) +import Distribution.Compiler (CompilerFlavor(..)) +import Distribution.Version +import Distribution.Text + +putStrLnErr :: String -> IO () +putStrLnErr m = hPutStrLn stderr ("*ERROR* " ++ m) >> exitFailure + +putStrLnWarn :: String -> IO () +putStrLnWarn m = hPutStrLn stderr ("*WARNING* " ++ m) + +putStrLnInfo :: String -> IO () +putStrLnInfo m = hPutStrLn stderr ("*INFO* " ++ m) + +main :: IO () +main = do + args <- getArgs + case args of + (cabfn:xpkgs) -> do genTravisFromCabalFile cabfn xpkgs + _ -> putStrLnErr (unlines $ [ "expected .cabal file as command-line argument" + , "Usage: make_travis_yml.hs <cabal-file> <extra-apt-packages...>" + , "" + , "Example: make_travis_yml.hs someProject.cabal alex-3.1.4 liblzma-dev > .travis.yml" + ]) + +genTravisFromCabalFile :: FilePath -> [String] -> IO () +genTravisFromCabalFile fn xpkgs = do + gpd <- readPackageDescription maxBound fn + + let compilers = testedWith $ packageDescription $ gpd + + let unknownComps = nub [ c | (c,_) <- compilers, c /= GHC ] + ghcVerConstrs = [ vc | (GHC,vc) <- compilers ] + ghcVerConstrs' = simplifyVersionRange $ foldr unionVersionRanges noVersion ghcVerConstrs + + when (null compilers) $ do + putStrLnErr "empty or missing 'tested-with:' definition in .cabal file" + + unless (null unknownComps) $ do + putStrLnWarn $ "ignoring unsupported compilers mentioned in tested-with: " ++ show unknownComps + + when (null ghcVerConstrs) $ do + putStrLnErr "'tested-with:' doesn't mention any 'GHC' version" + + when (isNoVersion ghcVerConstrs') $ do + putStrLnErr "'tested-with:' describes an empty version range for 'GHC'" + + when (isAnyVersion ghcVerConstrs') $ do + putStrLnErr "'tested-with:' allows /any/ 'GHC' version" + + let testedGhcVersions = filter (`withinRange` ghcVerConstrs') knownGhcVersions + + when (null testedGhcVersions) $ do + putStrLnErr "no known GHC version is allowed by the 'tested-with' specification" + + putStrLnInfo $ "Generating Travis-CI config for testing for GHC versions: " ++ (unwords $ map disp' $ testedGhcVersions) + + ---------------------------------------------------------------------------- + -- travis.yml generation starts here + + putStrLn "# This file has been generated -- see https://github.com/hvr/multi-ghc-travis" + putStrLn "language: c" + putStrLn "sudo: false" + putStrLn "" + putStrLn "cache:" + putStrLn " directories:" + putStrLn " - $HOME/.cabsnap" + putStrLn " - $HOME/.cabal/packages" + putStrLn "" + putStrLn "before_cache:" + putStrLn " - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log" + putStrLn " - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar" + putStrLn "" + putStrLn "matrix:" + putStrLn " include:" + + forM_ testedGhcVersions $ \gv -> do + let cvs = disp' (lookupCabVer gv) + gvs = disp' gv + ghcopts = if gv >= Version [7,10,0] [] + then "-Werror" + else "-Werror" + + xpkgs' = concatMap (',':) xpkgs + + putStrLn $ concat [ " - env: CABALVER=", cvs, " GHCVER=", gvs, + " GHCOPTS=", ghcopts] + putStrLn $ concat [ " compiler: \": #GHC ", gvs, "\"" ] + putStrLn $ concat [ " addons: {apt: {packages: [cabal-install-", cvs, ",ghc-", gvs, xpkgs' + , "], sources: [hvr-ghc]}}" ] + return () + + let headGhcVers = filter isHead testedGhcVersions + + unless (null headGhcVers) $ do + putStrLn "" + putStrLn " allow_failures:" + + forM_ headGhcVers $ \gv -> do + let cvs = disp' (lookupCabVer gv) + gvs = disp' gv + putStrLn $ concat [ " - env: CABALVER=", cvs, " GHCVER=", gvs ] + + putStrLn "" + putStrLn "before_install:" + putStrLn " - unset CC" + putStrLn " - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH" + + putStrLn "" + + putStr $ unlines + [ "install:" + , " - cabal --version" + , " - echo \"$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]\"" + , " - if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];" + , " then" + , " zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >" + , " $HOME/.cabal/packages/hackage.haskell.org/00-index.tar;" + , " fi" + , " - travis_retry cabal update -v" + , " - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config" + , " - cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt" + , " - sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt" + , "" + , "# check whether current requested install-plan matches cached package-db snapshot" + , " - if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;" + , " then" + , " echo \"cabal build-cache HIT\";" + , " rm -rfv .ghc;" + , " cp -a $HOME/.cabsnap/ghc $HOME/.ghc;" + , " cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;" + , " else" + , " echo \"cabal build-cache MISS\";" + , " rm -rf $HOME/.cabsnap;" + , " mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;" + , " cabal install --only-dependencies --enable-tests --enable-benchmarks;" + , " fi" + , " " + , "# snapshot package-db on cache miss" + , " - if [ ! -d $HOME/.cabsnap ];" + , " then" + , " echo \"snapshotting package-db to build-cache\";" + , " mkdir $HOME/.cabsnap;" + , " cp -a $HOME/.ghc $HOME/.cabsnap/ghc;" + , " cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;" + , " fi" + , "" + , "# Here starts the actual work to be performed for the package under test;" + , "# any command which exits with a non-zero exit code causes the build to fail." + , "script:" + , " - if [ -f configure.ac ]; then autoreconf -i; fi" + , " - cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging" + , " - cabal build --ghc-options=$GHCOPTS # this builds all libraries and executables (including tests/benchmarks)" + , " - cabal test" + , " - cabal check" + , "# Test that a source-distribution can be generated" + , "# (with cabal >= 1.18 'cabal sdist' would work too):" + , " - ./dist/setup/setup sdist" + , "" + , "# Check that the resulting source distribution can be built & installed." + , "# If there are no other `.tar.gz` files in `dist`, this can be even simpler:" + , "# `cabal install --force-reinstalls dist/*-*.tar.gz`" + , " - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&" + , " (cd dist && cabal install --force-reinstalls \"$SRC_TGZ\")" + , "" + , "# EOF" + ] + + return () + where + knownGhcVersions :: [Version] + knownGhcVersions = fmap (`Version` []) + [ [7,0,1], [7,0,2], [7,0,3], [7,0,4] + , [7,2,1], [7,2,2] + , [7,4,1], [7,4,2] + , [7,6,1], [7,6,2], [7,6,3] + , [7,8,1], [7,8,2], [7,8,3], [7,8,4] + , [7,10,1], [7,10,2] + , [7,11] -- HEAD + ] + + lookupCabVer :: Version -> Version + lookupCabVer (Version (x:y:_) _) = maybe (error "internal error") id $ lookup (x,y) cabalVerMap + where + cabalVerMap = fmap (fmap (`Version` [])) + [ ((7, 0), [1,16]) + , ((7, 2), [1,16]) + , ((7, 4), [1,16]) + , ((7, 6), [1,16]) + , ((7, 8), [1,18]) + , ((7,10), [1,22]) + , ((7,11), [1,23]) -- HEAD + ] + + isHead (Version (_:y:_) _) = odd (y :: Int) + + disp' v | isHead v = "head" + | otherwise = display v diff --git a/man/pandoc.1 b/man/pandoc.1 index 2ffd794f6..0126fc6de 100644 --- a/man/pandoc.1 +++ b/man/pandoc.1 @@ -1,5 +1,5 @@ .\"t -.TH PANDOC 1 "July 15, 2015" "" +.TH PANDOC 1 "November 12, 2015" "pandoc 1.15.2.1" .SH NAME pandoc - general markup converter .SH SYNOPSIS @@ -9,32 +9,46 @@ pandoc - general markup converter .PP Pandoc is a Haskell library for converting from one markup format to another, and a command\-line tool that uses this library. -It can read Markdown, CommonMark, and (subsets of) Textile, -reStructuredText, HTML, LaTeX, MediaWiki markup, TWiki markup, Haddock -markup, OPML, Emacs Org\-mode, DocBook, txt2tags, EPUB and Word docx; -and it can write plain text, Markdown, reStructuredText, XHTML, HTML 5, -LaTeX (including beamer slide shows), ConTeXt, RTF, OPML, DocBook, -OpenDocument, ODT, Word docx, GNU Texinfo, MediaWiki markup, DokuWiki -markup, Haddock markup, EPUB (v2 or v3), FictionBook2, Textile, groff -man pages, Emacs Org\-Mode, AsciiDoc, InDesign ICML, and Slidy, -Slideous, DZSlides, reveal.js or S5 HTML slide shows. -It can also produce PDF output on systems where LaTeX is installed. -.PP -Pandoc\[aq]s enhanced version of markdown includes syntax for footnotes, +It can read Markdown, CommonMark, PHP Markdown Extra, GitHub\-Flavored +Markdown, and (subsets of) Textile, reStructuredText, HTML, LaTeX, +MediaWiki markup, TWiki markup, Haddock markup, OPML, Emacs Org mode, +DocBook, txt2tags, EPUB, ODT and Word docx; and it can write plain text, +Markdown, CommonMark, PHP Markdown Extra, GitHub\-Flavored Markdown, +reStructuredText, XHTML, HTML5, LaTeX (including \f[C]beamer\f[] slide +shows), ConTeXt, RTF, OPML, DocBook, OpenDocument, ODT, Word docx, GNU +Texinfo, MediaWiki markup, DokuWiki markup, Haddock markup, EPUB (v2 or +v3), FictionBook2, Textile, groff man pages, Emacs Org mode, AsciiDoc, +InDesign ICML, and Slidy, Slideous, DZSlides, reveal.js or S5 HTML slide +shows. +It can also produce PDF output on systems where LaTeX or ConTeXt is +installed. +.PP +Pandoc\[aq]s enhanced version of Markdown includes syntax for footnotes, tables, flexible ordered lists, definition lists, fenced code blocks, -superscript, subscript, strikeout, title blocks, automatic tables of -contents, embedded LaTeX math, citations, and markdown inside HTML block -elements. -(These enhancements, described below under Pandoc\[aq]s markdown, can be +superscripts and subscripts, strikeout, metadata blocks, automatic +tables of contents, embedded LaTeX math, citations, and Markdown inside +HTML block elements. +(These enhancements, described below under Pandoc\[aq]s Markdown, can be disabled using the \f[C]markdown_strict\f[] input or output format.) .PP -In contrast to most existing tools for converting markdown to HTML, -which use regex substitutions, Pandoc has a modular design: it consists +In contrast to most existing tools for converting Markdown to HTML, +which use regex substitutions, pandoc has a modular design: it consists of a set of readers, which parse text in a given format and produce a native representation of the document, and a set of writers, which convert this native representation into a target format. Thus, adding an input or output format requires only adding a reader or writer. +.PP +Because pandoc\[aq]s intermediate representation of a document is less +expressive than many of the formats it converts between, one should not +expect perfect conversions between every format and every other. +Pandoc attempts to preserve the structural elements of a document, but +not formatting details such as margin size. +And some document elements, such as complex tables, may not fit into +pandoc\[aq]s simple document model. +While conversions from pandoc\[aq]s Markdown to all formats aspire to be +perfect, conversions from formats more expressive than pandoc\[aq]s +Markdown can be expected to be lossy. .SS Using \f[C]pandoc\f[] .PP If no \f[I]input\-file\f[] is specified, input is read from @@ -77,15 +91,15 @@ pandoc\ \-f\ html\ \-t\ markdown\ http://www.fsf.org .PP If multiple input files are given, \f[C]pandoc\f[] will concatenate them all (with blank lines between them) before parsing. -This feature is disabled for binary input formats such as \f[C]EPUB\f[] -and \f[C]docx\f[]. +This feature is disabled for binary input formats such as \f[C]EPUB\f[], +\f[C]odt\f[], and \f[C]docx\f[]. .PP The format of the input and output can be specified explicitly using command\-line options. The input format can be specified using the \f[C]\-r/\-\-read\f[] or \f[C]\-f/\-\-from\f[] options, the output format using the \f[C]\-w/\-\-write\f[] or \f[C]\-t/\-\-to\f[] options. -Thus, to convert \f[C]hello.txt\f[] from markdown to LaTeX, you could +Thus, to convert \f[C]hello.txt\f[] from Markdown to LaTeX, you could type: .IP .nf @@ -94,7 +108,7 @@ pandoc\ \-f\ markdown\ \-t\ latex\ hello.txt \f[] .fi .PP -To convert \f[C]hello.html\f[] from html to markdown: +To convert \f[C]hello.html\f[] from HTML to Markdown: .IP .nf \f[C] @@ -121,13 +135,13 @@ pandoc\ \-o\ hello.tex\ hello.txt \f[] .fi .PP -will convert \f[C]hello.txt\f[] from markdown to LaTeX. +will convert \f[C]hello.txt\f[] from Markdown to LaTeX. If no output file is specified (so that output goes to \f[I]stdout\f[]), or if the output file\[aq]s extension is unknown, the output format will default to HTML. If no input file is specified (so that input comes from \f[I]stdin\f[]), or if the input files\[aq] extensions are unknown, the input format will -be assumed to be markdown unless explicitly specified. +be assumed to be Markdown unless explicitly specified. .PP Pandoc uses the UTF\-8 character encoding for both input and output. If your local character encoding is not UTF\-8, you should pipe input @@ -145,14 +159,9 @@ included in the document header, which will only be included if you use the \f[C]\-s/\-\-standalone\f[] option. .SS Creating a PDF .PP -Earlier versions of pandoc came with a program, \f[C]markdown2pdf\f[], -that used pandoc and pdflatex to produce a PDF. -This is no longer needed, since \f[C]pandoc\f[] can now produce -\f[C]pdf\f[] output itself. -To produce a PDF, simply specify an output file with a \f[C]\&.pdf\f[] +To produce a PDF, specify an output file with a \f[C]\&.pdf\f[] extension. -Pandoc will create a latex file and use pdflatex (or another engine, see -\f[C]\-\-latex\-engine\f[]) to convert it to PDF: +By default, pandoc will use LaTeX to convert it to PDF: .IP .nf \f[C] @@ -162,15 +171,32 @@ pandoc\ test.txt\ \-o\ test.pdf .PP Production of a PDF requires that a LaTeX engine be installed (see \f[C]\-\-latex\-engine\f[], below), and assumes that the following LaTeX -packages are available: \f[C]amssymb\f[], \f[C]amsmath\f[], -\f[C]ifxetex\f[], \f[C]ifluatex\f[], \f[C]listings\f[] (if the -\f[C]\-\-listings\f[] option is used), \f[C]fancyvrb\f[], -\f[C]longtable\f[], \f[C]booktabs\f[], \f[C]url\f[], \f[C]graphicx\f[] -and \f[C]grffile\f[] (if the document contains images), -\f[C]hyperref\f[], \f[C]ulem\f[], \f[C]babel\f[] (if the \f[C]lang\f[] -variable is set), \f[C]fontspec\f[] (if \f[C]xelatex\f[] or -\f[C]lualatex\f[] is used as the LaTeX engine), \f[C]xltxtra\f[] and -\f[C]xunicode\f[] (if \f[C]xelatex\f[] is used). +packages are available: \f[C]amsfonts\f[], \f[C]amsmath\f[], +\f[C]lm\f[], \f[C]ifxetex\f[], \f[C]ifluatex\f[], \f[C]eurosym\f[], +\f[C]listings\f[] (if the \f[C]\-\-listings\f[] option is used), +\f[C]fancyvrb\f[], \f[C]longtable\f[], \f[C]booktabs\f[], \f[C]url\f[], +\f[C]graphicx\f[] and \f[C]grffile\f[] (if the document contains +images), \f[C]color\f[], \f[C]hyperref\f[], \f[C]ulem\f[], +\f[C]geometry\f[] (with the \f[C]geometry\f[] variable set), +\f[C]setspace\f[] (with \f[C]linestretch\f[]), and \f[C]babel\f[] (with +\f[C]lang\f[]). +The use of \f[C]xelatex\f[] or \f[C]lualatex\f[] as the LaTeX engine +requires \f[C]fontspec\f[]; \f[C]xelatex\f[] uses \f[C]mathspec\f[], +\f[C]polyglossia\f[] (with \f[C]lang\f[]), \f[C]xecjk\f[], and +\f[C]bidi\f[] (with the \f[C]dir\f[] variable set). +The \f[C]upquote\f[] and \f[C]microtype\f[] packages are used if +available, and \f[C]csquotes\f[] will be used for smart punctuation if +added to the template. +The \f[C]natbib\f[], \f[C]biblatex\f[], \f[C]bibtex\f[], and +\f[C]biber\f[] packages can optionally be used for citation rendering. +These are included with all recent versions of TeX Live. +.PP +Alternatively, pandoc can use ConTeXt to create a PDF. +To do this, specify an output file with a \f[C]\&.pdf\f[] extension, as +before, but add \f[C]\-t\ context\f[] to the command line. +.PP +PDF output can be controlled using variables for LaTeX or variables for +ConTeXt. .SS \f[C]hsmarkdown\f[] .PP A user who wants a drop\-in replacement for \f[C]Markdown.pl\f[] may @@ -180,8 +206,8 @@ When invoked under the name \f[C]hsmarkdown\f[], \f[C]pandoc\f[] will behave as if invoked with \f[C]\-f\ markdown_strict\ \-\-email\-obfuscation=references\f[], and all command\-line options will be treated as regular arguments. -However, this approach does not work under Cygwin, due to problems with -its simulation of symbolic links. +This approach does not work under Cygwin, due to problems with its +simulation of symbolic links. .SH OPTIONS .SS General options .TP @@ -189,15 +215,15 @@ its simulation of symbolic links. Specify input format. \f[I]FORMAT\f[] can be \f[C]native\f[] (native Haskell), \f[C]json\f[] (JSON version of native AST), \f[C]markdown\f[] (pandoc\[aq]s extended -markdown), \f[C]markdown_strict\f[] (original unextended markdown), -\f[C]markdown_phpextra\f[] (PHP Markdown Extra extended markdown), -\f[C]markdown_github\f[] (github extended markdown), \f[C]commonmark\f[] -(CommonMark markdown), \f[C]textile\f[] (Textile), \f[C]rst\f[] -(reStructuredText), \f[C]html\f[] (HTML), \f[C]docbook\f[] (DocBook), -\f[C]t2t\f[] (txt2tags), \f[C]docx\f[] (docx), \f[C]epub\f[] (EPUB), -\f[C]opml\f[] (OPML), \f[C]org\f[] (Emacs Org\-mode), \f[C]mediawiki\f[] -(MediaWiki markup), \f[C]twiki\f[] (TWiki markup), \f[C]haddock\f[] -(Haddock markup), or \f[C]latex\f[] (LaTeX). +Markdown), \f[C]markdown_strict\f[] (original unextended Markdown), +\f[C]markdown_phpextra\f[] (PHP Markdown Extra), +\f[C]markdown_github\f[] (GitHub\-Flavored Markdown), +\f[C]commonmark\f[] (CommonMark Markdown), \f[C]textile\f[] (Textile), +\f[C]rst\f[] (reStructuredText), \f[C]html\f[] (HTML), \f[C]docbook\f[] +(DocBook), \f[C]t2t\f[] (txt2tags), \f[C]docx\f[] (docx), \f[C]odt\f[] +(ODT), \f[C]epub\f[] (EPUB), \f[C]opml\f[] (OPML), \f[C]org\f[] (Emacs +Org mode), \f[C]mediawiki\f[] (MediaWiki markup), \f[C]twiki\f[] (TWiki +markup), \f[C]haddock\f[] (Haddock markup), or \f[C]latex\f[] (LaTeX). If \f[C]+lhs\f[] is appended to \f[C]markdown\f[], \f[C]rst\f[], \f[C]latex\f[], or \f[C]html\f[], the input will be treated as literate Haskell source: see Literate Haskell support, below. @@ -205,10 +231,10 @@ Markdown syntax extensions can be individually enabled or disabled by appending \f[C]+EXTENSION\f[] or \f[C]\-EXTENSION\f[] to the format name. So, for example, \f[C]markdown_strict+footnotes+definition_lists\f[] is -strict markdown with footnotes and definition lists enabled, and -\f[C]markdown\-pipe_tables+hard_line_breaks\f[] is pandoc\[aq]s markdown +strict Markdown with footnotes and definition lists enabled, and +\f[C]markdown\-pipe_tables+hard_line_breaks\f[] is pandoc\[aq]s Markdown without pipe tables and with hard line breaks. -See Pandoc\[aq]s markdown, below, for a list of extensions and their +See Pandoc\[aq]s Markdown, below, for a list of extensions and their names. .RS .RE @@ -217,27 +243,27 @@ names. Specify output format. \f[I]FORMAT\f[] can be \f[C]native\f[] (native Haskell), \f[C]json\f[] (JSON version of native AST), \f[C]plain\f[] (plain text), -\f[C]markdown\f[] (pandoc\[aq]s extended markdown), -\f[C]markdown_strict\f[] (original unextended markdown), -\f[C]markdown_phpextra\f[] (PHP Markdown extra extended markdown), -\f[C]markdown_github\f[] (github extended markdown), \f[C]commonmark\f[] -(CommonMark markdown), \f[C]rst\f[] (reStructuredText), \f[C]html\f[] -(XHTML 1), \f[C]html5\f[] (HTML 5), \f[C]latex\f[] (LaTeX), -\f[C]beamer\f[] (LaTeX beamer slide show), \f[C]context\f[] (ConTeXt), -\f[C]man\f[] (groff man), \f[C]mediawiki\f[] (MediaWiki markup), -\f[C]dokuwiki\f[] (DokuWiki markup), \f[C]textile\f[] (Textile), -\f[C]org\f[] (Emacs Org\-Mode), \f[C]texinfo\f[] (GNU Texinfo), -\f[C]opml\f[] (OPML), \f[C]docbook\f[] (DocBook), \f[C]opendocument\f[] -(OpenDocument), \f[C]odt\f[] (OpenOffice text document), \f[C]docx\f[] -(Word docx), \f[C]haddock\f[] (Haddock markup), \f[C]rtf\f[] (rich text -format), \f[C]epub\f[] (EPUB v2 book), \f[C]epub3\f[] (EPUB v3), -\f[C]fb2\f[] (FictionBook2 e\-book), \f[C]asciidoc\f[] (AsciiDoc), -\f[C]icml\f[] (InDesign ICML), \f[C]slidy\f[] (Slidy HTML and javascript -slide show), \f[C]slideous\f[] (Slideous HTML and javascript slide -show), \f[C]dzslides\f[] (DZSlides HTML5 + javascript slide show), -\f[C]revealjs\f[] (reveal.js HTML5 + javascript slide show), \f[C]s5\f[] -(S5 HTML and javascript slide show), or the path of a custom lua writer -(see Custom writers, below). +\f[C]markdown\f[] (pandoc\[aq]s extended Markdown), +\f[C]markdown_strict\f[] (original unextended Markdown), +\f[C]markdown_phpextra\f[] (PHP Markdown Extra), +\f[C]markdown_github\f[] (GitHub\-Flavored Markdown), +\f[C]commonmark\f[] (CommonMark Markdown), \f[C]rst\f[] +(reStructuredText), \f[C]html\f[] (XHTML), \f[C]html5\f[] (HTML5), +\f[C]latex\f[] (LaTeX), \f[C]beamer\f[] (LaTeX beamer slide show), +\f[C]context\f[] (ConTeXt), \f[C]man\f[] (groff man), \f[C]mediawiki\f[] +(MediaWiki markup), \f[C]dokuwiki\f[] (DokuWiki markup), +\f[C]textile\f[] (Textile), \f[C]org\f[] (Emacs Org mode), +\f[C]texinfo\f[] (GNU Texinfo), \f[C]opml\f[] (OPML), \f[C]docbook\f[] +(DocBook), \f[C]opendocument\f[] (OpenDocument), \f[C]odt\f[] +(OpenOffice text document), \f[C]docx\f[] (Word docx), \f[C]haddock\f[] +(Haddock markup), \f[C]rtf\f[] (rich text format), \f[C]epub\f[] (EPUB +v2 book), \f[C]epub3\f[] (EPUB v3), \f[C]fb2\f[] (FictionBook2 e\-book), +\f[C]asciidoc\f[] (AsciiDoc), \f[C]icml\f[] (InDesign ICML), +\f[C]slidy\f[] (Slidy HTML and javascript slide show), \f[C]slideous\f[] +(Slideous HTML and javascript slide show), \f[C]dzslides\f[] (DZSlides +HTML5 + javascript slide show), \f[C]revealjs\f[] (reveal.js HTML5 + +javascript slide show), \f[C]s5\f[] (S5 HTML and javascript slide show), +or the path of a custom lua writer (see Custom writers, below). Note that \f[C]odt\f[], \f[C]epub\f[], and \f[C]epub3\f[] output will not be directed to \f[I]stdout\f[]; an output filename must be specified using the \f[C]\-o/\-\-output\f[] option. @@ -263,7 +289,7 @@ If \f[I]FILE\f[] is \f[C]\-\f[], output will go to \f[I]stdout\f[]. Specify the user data directory to search for pandoc data files. If this option is not specified, the default user data directory will be used. -This is +This is, in Unix: .RS .IP .nf @@ -272,7 +298,7 @@ $HOME/.pandoc \f[] .fi .PP -in unix, +in Windows XP: .IP .nf \f[C] @@ -280,7 +306,7 @@ C:\\Documents\ And\ Settings\\USERNAME\\Application\ Data\\pandoc \f[] .fi .PP -in Windows XP, and +and in Windows Vista or later: .IP .nf \f[C] @@ -288,13 +314,25 @@ C:\\Users\\USERNAME\\AppData\\Roaming\\pandoc \f[] .fi .PP -in Windows 7. -(You can find the default user data directory on your system by looking -at the output of \f[C]pandoc\ \-\-version\f[].) A -\f[C]reference.odt\f[], \f[C]reference.docx\f[], \f[C]default.csl\f[], -\f[C]epub.css\f[], \f[C]templates\f[], \f[C]slidy\f[], -\f[C]slideous\f[], or \f[C]s5\f[] directory placed in this directory -will override pandoc\[aq]s normal defaults. +You can find the default user data directory on your system by looking +at the output of \f[C]pandoc\ \-\-version\f[]. +A \f[C]reference.odt\f[], \f[C]reference.docx\f[], \f[C]epub.css\f[], +\f[C]templates\f[], \f[C]slidy\f[], \f[C]slideous\f[], or \f[C]s5\f[] +directory placed in this directory will override pandoc\[aq]s normal +defaults. +.RE +.TP +.B \f[C]\-\-bash\-completion\f[] +Generate a bash completion script. +To enable bash completion with pandoc, add this to your +\f[C]\&.bashrc\f[]: +.RS +.IP +.nf +\f[C] +\ eval\ "$(pandoc\ \-\-bash\-completion)" +\f[] +.fi .RE .TP .B \f[C]\-\-verbose\f[] @@ -318,9 +356,9 @@ Show usage message. Parse untranslatable HTML codes and LaTeX environments as raw HTML or LaTeX, instead of ignoring them. Affects only HTML and LaTeX input. -Raw HTML can be printed in markdown, reStructuredText, HTML, Slidy, +Raw HTML can be printed in Markdown, reStructuredText, HTML, Slidy, Slideous, DZSlides, reveal.js, and S5 output; raw LaTeX can be printed -in markdown, reStructuredText, LaTeX, and ConTeXt output. +in Markdown, reStructuredText, LaTeX, and ConTeXt output. The default is for the readers to omit untranslatable HTML codes and LaTeX environments. (The LaTeX reader does pass through untranslatable LaTeX @@ -333,11 +371,8 @@ Produce typographically correct output, converting straight quotes to curly quotes, \f[C]\-\-\-\f[] to em\-dashes, \f[C]\-\-\f[] to en\-dashes, and \f[C]\&...\f[] to ellipses. Nonbreaking spaces are inserted after certain abbreviations, such as -"Mr." (Note: This option is significant only when the input format is -\f[C]markdown\f[], \f[C]markdown_strict\f[], \f[C]textile\f[] or -\f[C]twiki\f[]. -It is selected automatically when the input format is \f[C]textile\f[] -or the output format is \f[C]latex\f[] or \f[C]context\f[], unless +"Mr." (Note: This option is selected automatically when the output +format is \f[C]latex\f[] or \f[C]context\f[], unless \f[C]\-\-no\-tex\-ligatures\f[] is used.) .RS .RE @@ -367,12 +402,12 @@ Specify a default extension to use when image paths/URLs have no extension. This allows you to use the same source for formats that require different kinds of images. -Currently this option only affects the markdown and LaTeX readers. +Currently this option only affects the Markdown and LaTeX readers. .RS .RE .TP .B \f[C]\-\-filter=\f[]\f[I]EXECUTABLE\f[] -Specify an executable to be used as a filter transforming the Pandoc AST +Specify an executable to be used as a filter transforming the pandoc AST after the input is parsed and before the output is written. The executable should read JSON from stdin and write JSON to stdout. The JSON must be formatted like pandoc\[aq]s own JSON input and output. @@ -402,8 +437,6 @@ Filters may be written in any language. writing filters in Haskell. Those who would prefer to write filters in python can use the module \f[C]pandocfilters\f[], installable from PyPI. -See http://github.com/jgm/pandocfilters for the module and several -examples. There are also pandoc filter libraries in PHP, perl, and javascript/node.js. .PP @@ -449,7 +482,7 @@ Specify the number of spaces per tab (default is 4). .TP .B \f[C]\-\-track\-changes=accept\f[]|\f[C]reject\f[]|\f[C]all\f[] Specifies what to do with insertions and deletions produced by the MS -Word "track\-changes" feature. +Word "Track Changes" feature. \f[C]accept\f[] (the default), inserts all insertions, and ignores all deletions. \f[C]reject\f[] inserts all deletions and ignores insertions. @@ -482,7 +515,7 @@ This option is set automatically for \f[C]pdf\f[], \f[C]epub\f[], .B \f[C]\-\-template=\f[]\f[I]FILE\f[] Use \f[I]FILE\f[] as a custom template for the generated document. Implies \f[C]\-\-standalone\f[]. -See Templates below for a description of template syntax. +See Templates, below, for a description of template syntax. If no extension is specified, an extension corresponding to the writer will be added, so that \f[C]\-\-template=special\f[] looks for \f[C]special.html\f[] for HTML output. @@ -644,13 +677,13 @@ instead of UTF\-8 when this option is selected). .TP .B \f[C]\-\-reference\-links\f[] Use reference\-style links, rather than inline links, in writing -markdown or reStructuredText. +Markdown or reStructuredText. By default inline links are used. .RS .RE .TP .B \f[C]\-\-atx\-headers\f[] -Use ATX style headers in markdown and asciidoc output. +Use ATX\-style headers in Markdown and asciidoc output. The default is to use setext\-style headers for levels 1\-2, and then ATX headers. .RS @@ -659,8 +692,8 @@ ATX headers. .B \f[C]\-\-chapters\f[] Treat top\-level headers as chapters in LaTeX, ConTeXt, and DocBook output. -When the LaTeX template uses the report, book, or memoir class, this -option is implied. +When the LaTeX document class is set to \f[C]report\f[], \f[C]book\f[], +or \f[C]memoir\f[], this option is implied. If \f[C]beamer\f[] is the output format, top\-level headers will become \f[C]\\part{..}\f[]. .RS @@ -692,8 +725,8 @@ Implies \f[C]\-\-number\-sections\f[]. Do not convert quotation marks, apostrophes, and dashes to the TeX ligatures when writing LaTeX or ConTeXt. Instead, just use literal unicode characters. -This is needed for using advanced OpenType features with XeLaTeX and -LuaLaTeX. +This is needed for using advanced OpenType features with +\f[C]xelatex\f[] and \f[C]lualatex\f[]. Note: normally \f[C]\-\-smart\f[] is selected automatically for LaTeX and ConTeXt output, but it must be specified explicitly if \f[C]\-\-no\-tex\-ligatures\f[] is selected. @@ -704,7 +737,7 @@ then you may want to use \f[C]\-\-no\-tex\-ligatures\f[] without .RE .TP .B \f[C]\-\-listings\f[] -Use listings package for LaTeX code blocks +Use the \f[C]listings\f[] package for LaTeX code blocks .RS .RE .TP @@ -722,7 +755,7 @@ Headers above this level in the hierarchy are used to divide the slide show into sections; headers below this level create subheads within a slide. The default is to set the slide level based on the contents of the -document; see Structuring the slide show, below. +document; see Structuring the slide show. .RS .RE .TP @@ -741,12 +774,13 @@ documents. \f[C]javascript\f[] obfuscates them using javascript. \f[C]references\f[] obfuscates them by printing their letters as decimal or hexadecimal character references. +The default is \f[C]javascript\f[]. .RS .RE .TP .B \f[C]\-\-id\-prefix=\f[]\f[I]STRING\f[] Specify a prefix to be added to all automatically generated identifiers -in HTML and DocBook output, and to footnote numbers in markdown output. +in HTML and DocBook output, and to footnote numbers in Markdown output. This is useful for preventing duplicate identifiers when generating fragments to be included in other pages. .RS @@ -814,7 +848,7 @@ If it is not found there, sensible defaults will be used. Use the specified image as the EPUB cover. It is recommended that the image be less than 1000px in width and height. -Note that in a markdown source document you can also specify +Note that in a Markdown source document you can also specify \f[C]cover\-image\f[] in a YAML metadata block (see EPUB Metadata, below). .RS @@ -822,8 +856,7 @@ below). .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 -at http://dublincore.org/documents/dces/. +The file should contain a series of Dublin Core elements. For example: .RS .IP @@ -842,7 +875,7 @@ which should be in ISO 8601 format), \f[C]<dc:language>\f[] (from the \f[C]<dc:identifier\ id="BookId">\f[] (a randomly generated UUID). Any of these may be overridden by elements in the metadata file. .PP -Note: if the source document is markdown, a YAML metadata block in the +Note: if the source document is Markdown, a YAML metadata block in the document can be used instead. See below under EPUB Metadata. .RE @@ -951,20 +984,20 @@ only relevant with \f[C]pandoc\-citeproc\f[]. .RE .TP .B \f[C]\-\-natbib\f[] -Use natbib for citations in LaTeX output. +Use \f[C]natbib\f[] for citations in LaTeX output. This option is not for use with the \f[C]pandoc\-citeproc\f[] filter or with PDF output. It is intended for use in producing a LaTeX file that can be processed -with pdflatex and bibtex. +with \f[C]bibtex\f[]. .RS .RE .TP .B \f[C]\-\-biblatex\f[] -Use biblatex for citations in LaTeX output. +Use \f[C]biblatex\f[] for citations in LaTeX output. This option is not for use with the \f[C]pandoc\-citeproc\f[] filter or with PDF output. It is intended for use in producing a LaTeX file that can be processed -with pdflatex and bibtex or biber. +with \f[C]bibtex\f[] or \f[C]biber\f[]. .RS .RE .SS Math rendering in HTML @@ -1057,7 +1090,7 @@ with the \f[C]\-o\f[] option, or \f[C]\-\f[] (for \f[I]stdout\f[]) if no output file was specified. The remaining lines contain the command\-line arguments, one per line, in the order they appear. -These do not include regular Pandoc options and their arguments, but do +These do not include regular pandoc options and their arguments, but do include any options appearing after a \f[C]\-\-\f[] separator at the end of the line. .RS @@ -1065,7 +1098,7 @@ of the line. .TP .B \f[C]\-\-ignore\-args\f[] Ignore command\-line arguments (for use in wrapper scripts). -Regular Pandoc options are not ignored. +Regular pandoc options are not ignored. Thus, for example, .RS .IP @@ -1092,42 +1125,66 @@ To see the default template that is used, just type .IP .nf \f[C] -pandoc\ \-D\ FORMAT +pandoc\ \-D\ *FORMAT* \f[] .fi .PP -where \f[C]FORMAT\f[] is the name of the output format. +where \f[I]FORMAT\f[] is the name of the output format. A custom template can be specified using the \f[C]\-\-template\f[] option. You can also override the system default templates for a given output -format \f[C]FORMAT\f[] by putting a file -\f[C]templates/default.FORMAT\f[] in the user data directory (see +format \f[I]FORMAT\f[] by putting a file +\f[C]templates/default.*FORMAT*\f[] in the user data directory (see \f[C]\-\-data\-dir\f[], above). \f[I]Exceptions:\f[] For \f[C]odt\f[] output, customize the \f[C]default.opendocument\f[] template. For \f[C]pdf\f[] output, customize the \f[C]default.latex\f[] template. .PP -Templates may contain \f[I]variables\f[]. -Variable names are sequences of alphanumerics, \f[C]\-\f[], and -\f[C]_\f[], starting with a letter. -A variable name surrounded by \f[C]$\f[] signs will be replaced by its -value. -For example, the string \f[C]$title$\f[] in +Templates contain \f[I]variables\f[], which allow for the inclusion of +arbitrary information at any point in the file. +Variables may be set within the document using YAML metadata blocks. +They may also be set at the command line using the +\f[C]\-V/\-\-variable\f[] option: variables set in this way override +metadata fields with the same name. +.SS Variables set by pandoc +.PP +Some variables are set automatically by pandoc. +These vary somewhat depending on the output format, but include metadata +fields as well as the following: +.TP +.B \f[C]title\f[], \f[C]author\f[], \f[C]date\f[] +allow identification of basic aspects of the document. +Included in PDF metadata through LaTeX and ConTeXt. +These can be set through a pandoc title block, which allows for multiple +authors, or through a YAML metadata block: +.RS .IP .nf \f[C] -<title>$title$</title> +\-\-\- +author: +\-\ Aristotle +\-\ Peter\ Abelard +\&... \f[] .fi -.PP -will be replaced by the document title. -.PP -To write a literal \f[C]$\f[] in a template, use \f[C]$$\f[]. -.PP -Some variables are set automatically by pandoc. -These vary somewhat depending on the output format, but include metadata -fields (such as \f[C]title\f[], \f[C]author\f[], and \f[C]date\f[]) as -well as the following: +.RE +.TP +.B \f[C]subtitle\f[] +document subtitle; also used as subject in PDF metadata +.RS +.RE +.TP +.B \f[C]abstract\f[] +document summary, included in LaTeX, ConTeXt, AsciiDoc, and Word docx +.RS +.RE +.TP +.B \f[C]keywords\f[] +list of keywords to be included in HTML, PDF, and AsciiDoc metadata; may +be repeated as for \f[C]author\f[], above +.RS +.RE .TP .B \f[C]header\-includes\f[] contents specified by \f[C]\-H/\-\-include\-in\-header\f[] (may have @@ -1141,6 +1198,11 @@ specified .RS .RE .TP +.B \f[C]toc\-title\f[] +title of table of contents (works only with EPUB and docx) +.RS +.RE +.TP .B \f[C]include\-before\f[] contents specified by \f[C]\-B/\-\-include\-before\-body\f[] (may have multiple values) @@ -1157,12 +1219,57 @@ multiple values) body of document .RS .RE +.SS Language variables .TP .B \f[C]lang\f[] -language code for HTML or LaTeX documents +identifies the main language of the document, using a code according to +BCP 47 (e.g. +\f[C]en\f[] or \f[C]en\-GB\f[]). +For some output formats, pandoc will convert it to an appropriate format +stored in the additional variables \f[C]babel\-lang\f[], +\f[C]polyglossia\-lang\f[] (LaTeX) and \f[C]context\-lang\f[] (ConTeXt). .RS +.PP +Native pandoc \f[C]span\f[]s and \f[C]div\f[]s with the lang attribute +(value in BCP 47) can be used to switch the language in that range. .RE .TP +.B \f[C]otherlangs\f[] +a list of other languages used in the document in the YAML metadata, +according to BCP 47. +For example: \f[C]otherlangs:\ [en\-GB,\ fr]\f[]. +This is automatically generated from the \f[C]lang\f[] attributes in all +\f[C]span\f[]s and \f[C]div\f[]s but can be overriden. +Currently only used by LaTeX through the generated +\f[C]babel\-otherlangs\f[] and \f[C]polyglossia\-otherlangs\f[] +variables. +The LaTeX writer outputs polyglossia commands in the text but the +\f[C]babel\-newcommands\f[] variable contains mappings for them to the +corresponding babel. +.RS +.RE +.TP +.B \f[C]dir\f[] +the base direction of the document, either \f[C]rtl\f[] +(right\-to\-left) or \f[C]ltr\f[] (left\-to\-right). +.RS +.PP +For bidirectional documents, native pandoc \f[C]span\f[]s and +\f[C]div\f[]s with the \f[C]dir\f[] attribute (value \f[C]rtl\f[] or +\f[C]ltr\f[]) can be used to override the base direction in some output +formats. +This may not always be necessary if the final renderer (e.g. +the browser, when generating HTML) supports the Unicode Bidirectional +Algorithm. +.PP +When using LaTeX for bidirectional documents, only the \f[C]xelatex\f[] +engine is fully supported (use \f[C]\-\-latex\-engine=xelatex\f[]). +.RE +.SS Variables for slides +.PP +Variables are available for producing slide shows with pandoc, including +all reveal.js configuration options. +.TP .B \f[C]slidy\-url\f[] base URL for Slidy documents (defaults to \f[C]http://www.w3.org/Talks/Tools/Slidy2\f[]) @@ -1184,133 +1291,219 @@ base URL for reveal.js documents (defaults to \f[C]reveal.js\f[]) .RS .RE .TP -.B \f[C]theme\f[] -reveal.js or LaTeX beamer theme -.RS -.RE -.TP -.B \f[C]transition\f[] -reveal.js transition +.B \f[C]theme\f[], \f[C]colortheme\f[], \f[C]fonttheme\f[], \f[C]innertheme\f[], \f[C]outertheme\f[] +themes for LaTeX \f[C]beamer\f[] documents .RS .RE +.SS Variables for LaTeX +.PP +LaTeX variables are used when creating a PDF. .TP .B \f[C]fontsize\f[] -font size (10pt, 11pt, 12pt) for LaTeX documents +font size for body text (e.g. +\f[C]10pt\f[], \f[C]12pt\f[]) .RS .RE .TP .B \f[C]documentclass\f[] -document class for LaTeX documents +document class, e.g. +\f[C]article\f[], \f[C]report\f[], \f[C]book\f[], \f[C]memoir\f[] .RS .RE .TP .B \f[C]classoption\f[] -option for LaTeX documentclass, e.g. +option for document class, e.g. \f[C]oneside\f[]; may be repeated for multiple options .RS .RE .TP .B \f[C]geometry\f[] -options for LaTeX \f[C]geometry\f[] class, e.g. +option for \f[C]geometry\f[] package, e.g. \f[C]margin=1in\f[]; may be repeated for multiple options .RS .RE .TP .B \f[C]linestretch\f[] -adjusts line spacing (requires the \f[C]setspace\f[] package) +adjusts line spacing using the \f[C]setspace\f[] package, e.g. +\f[C]1.25\f[], \f[C]1.5\f[] .RS .RE .TP .B \f[C]fontfamily\f[] -font package to use for LaTeX documents (with pdflatex): TeXLive has -\f[C]bookman\f[] (Bookman), \f[C]utopia\f[] or \f[C]fourier\f[] -(Utopia), \f[C]fouriernc\f[] (New Century Schoolbook), \f[C]times\f[] or -\f[C]txfonts\f[] (Times), \f[C]mathpazo\f[] or \f[C]pxfonts\f[] or -\f[C]mathpple\f[] (Palatino), \f[C]libertine\f[] (Linux Libertine), -\f[C]arev\f[] (Arev Sans), and the default \f[C]lmodern\f[], among -others. +font package for use with \f[C]pdflatex\f[]: TeX Live includes many +options, documented in the LaTeX Font Catalogue. +The default is Latin Modern. +.RS +.RE +.TP +.B \f[C]fontfamilyoptions\f[] +options for package used as \f[C]fontfamily\f[]: e.g. +\f[C]osf,sc\f[] with \f[C]fontfamily\f[] set to \f[C]mathpazo\f[] +provides Palatino with old\-style figures and true small caps; may be +repeated for multiple options .RS .RE .TP .B \f[C]mainfont\f[], \f[C]sansfont\f[], \f[C]monofont\f[], \f[C]mathfont\f[], \f[C]CJKmainfont\f[] -fonts for LaTeX documents (works only with xelatex and lualatex). -Note that if \f[C]CJKmainfont\f[] is used, the \f[C]xeCJK\f[] package +font families for use with \f[C]xelatex\f[] or \f[C]lualatex\f[]: take +the name of any system font, using the \f[C]fontspec\f[] package. +Note that if \f[C]CJKmainfont\f[] is used, the \f[C]xecjk\f[] package must be available. .RS .RE .TP -.B \f[C]colortheme\f[] -colortheme for LaTeX beamer documents +.B \f[C]mainfontoptions\f[], \f[C]sansfontoptions\f[], \f[C]monofontoptions\f[], \f[C]mathfontoptions\f[], \f[C]CJKoptions\f[] +options to use with \f[C]mainfont\f[], \f[C]sansfont\f[], +\f[C]monofont\f[], \f[C]mathfont\f[], \f[C]CJKmainfont\f[] in +\f[C]xelatex\f[] and \f[C]lualatex\f[]. +Allow for any choices available through \f[C]fontspec\f[], such as the +OpenType features \f[C]Numbers=OldStyle,Numbers=Proportional\f[]. +May be repeated for multiple options. .RS .RE .TP -.B \f[C]fonttheme\f[] -fonttheme for LaTeX beamer documents +.B \f[C]fontenc\f[] +allows font encoding to be specified through \f[C]fontenc\f[] package +(with \f[C]pdflatex\f[]); default is \f[C]T1\f[] (see guide to LaTeX +font encodings) .RS .RE .TP -.B \f[C]linkcolor\f[] -color for internal links in LaTeX documents (\f[C]red\f[], -\f[C]green\f[], \f[C]magenta\f[], \f[C]cyan\f[], \f[C]blue\f[], -\f[C]black\f[]) +.B \f[C]linkcolor\f[], \f[C]toccolor\f[], \f[C]urlcolor\f[], \f[C]citecolor\f[] +color for internal links, links in table of contents, external links, +and citation links, using options available through \f[C]color\f[] +package, e.g. +\f[C]red\f[], \f[C]green\f[], \f[C]magenta\f[], \f[C]cyan\f[], +\f[C]blue\f[], \f[C]black\f[] .RS .RE .TP -.B \f[C]toccolor\f[] -color for links in table of contents in LaTeX documents +.B \f[C]hidelinks\f[] +enables \f[C]hidelinks\f[] option for \f[C]hyperref\f[], disabling link +color .RS .RE .TP -.B \f[C]urlcolor\f[] -color for external links in LaTeX documents +.B \f[C]links\-as\-notes\f[] +causes links to be printed as footnotes .RS .RE .TP -.B \f[C]citecolor\f[] -color for citation links in LaTeX documents +.B \f[C]indent\f[] +uses document class settings for indentation (the default LaTeX template +otherwise removes indentation and adds space between paragraphs) .RS .RE .TP -.B \f[C]links\-as\-notes\f[] -causes links to be printed as footnotes in LaTeX documents +.B \f[C]subparagraph\f[] +disables default behavior of LaTeX template that redefines +(sub)paragraphs as sections, changing the appearance of nested headings +in some classes .RS .RE .TP .B \f[C]toc\f[] -include table of contents in LaTeX documents +include table of contents (can also be set using +\f[C]\-\-toc/\-\-table\-of\-contents\f[]) .RS .RE .TP .B \f[C]toc\-depth\f[] -level of section to include in table of contents in LaTeX documents +level of section to include in table of contents .RS .RE .TP -.B \f[C]toc\-title\f[] -title of table of contents (works only with EPUB and docx) +.B \f[C]lof\f[], \f[C]lot\f[] +include list of figures, list of tables .RS .RE .TP -.B \f[C]lof\f[] -include list of figures in LaTeX documents +.B \f[C]bibliography\f[] +bibliography to use for resolving references .RS .RE .TP -.B \f[C]lot\f[] -include list of tables in LaTeX documents +.B \f[C]biblio\-style\f[] +bibliography style, when used with \f[C]\-\-natbib\f[] .RS .RE +.SS Variables for ConTeXt .TP -.B \f[C]bibliography\f[] -bibliography to use for resolving references +.B \f[C]papersize\f[] +paper size, e.g. +\f[C]letter\f[], \f[C]A4\f[], \f[C]landscape\f[] (see ConTeXt Paper +Setup); may be repeated for multiple options .RS .RE .TP -.B \f[C]biblio\-style\f[] -bibliography style in LaTeX, when used with \f[C]\-\-natbib\f[] +.B \f[C]layout\f[] +options for page margins and text arrangement (see ConTeXt Layout); may +be repeated for multiple options +.RS +.RE +.TP +.B \f[C]fontsize\f[] +font size for body text (e.g. +\f[C]10pt\f[], \f[C]12pt\f[]) .RS .RE .TP +.B \f[C]mainfont\f[], \f[C]sansfont\f[], \f[C]monofont\f[], \f[C]mathfont\f[] +font families: take the name of any system font (see ConTeXt Font +Switching) +.RS +.RE +.TP +.B \f[C]linkcolor\f[] +color for links, e.g. +\f[C]red\f[], \f[C]blue\f[] (see ConTeXt Color) +.RS +.RE +.TP +.B \f[C]indenting\f[] +controls indentation of paragraphs, e.g. +\f[C]yes,small,next\f[] (see ConTeXt Indentation); may be repeated for +multiple options +.RS +.RE +.TP +.B \f[C]whitespace\f[] +spacing between paragraphs, e.g. +\f[C]none\f[], \f[C]small\f[] (using \f[C]setupwhitespace\f[]) +.RS +.RE +.TP +.B \f[C]interlinespace\f[] +adjusts line spacing, e.g. +\f[C]4ex\f[] (using \f[C]setupinterlinespace\f[]); may be repeated for +multiple options +.RS +.RE +.TP +.B \f[C]headertext\f[], \f[C]footertext\f[] +text to be placed in running header or footer (see ConTeXt Headers and +Footers); may be repeated up to four times for different placement +.RS +.RE +.TP +.B \f[C]pagenumbering\f[] +page number style and location (using \f[C]setuppagenumbering\f[]); may +be repeated for multiple options +.RS +.RE +.TP +.B \f[C]toc\f[] +include table of contents (can also be set using +\f[C]\-\-toc/\-\-table\-of\-contents\f[]) +.RS +.RE +.TP +.B \f[C]lof\f[], \f[C]lot\f[] +include list of figures, list of tables +.RS +.RE +.SS Variables for man pages +.TP .B \f[C]section\f[] section number in man pages .RS @@ -1325,10 +1518,34 @@ header in man pages footer in man pages .RS .RE +.TP +.B \f[C]adjusting\f[] +adjusts text to left (\f[C]l\f[]), right (\f[C]r\f[]), center +(\f[C]c\f[]), or both (\f[C]b\f[]) margins +.RS +.RE +.TP +.B \f[C]hyphenate\f[] +if \f[C]true\f[] (the default), hyphenation will be used +.RS +.RE +.SS Using variables in templates +.PP +Variable names are sequences of alphanumerics, \f[C]\-\f[], and +\f[C]_\f[], starting with a letter. +A variable name surrounded by \f[C]$\f[] signs will be replaced by its +value. +For example, the string \f[C]$title$\f[] in +.IP +.nf +\f[C] +<title>$title$</title> +\f[] +.fi +.PP +will be replaced by the document title. .PP -Variables may be set at the command line using the -\f[C]\-V/\-\-variable\f[] option. -Variables set in this way override metadata fields with the same name. +To write a literal \f[C]$\f[] in a template, use \f[C]$$\f[]. .PP Templates may contain conditionals. The syntax is as follows: @@ -1383,22 +1600,21 @@ If you use custom templates, you may need to revise them as pandoc changes. We recommend tracking the changes in the default templates, and modifying your custom templates accordingly. -An easy way to do this is to fork the pandoc\-templates repository -(http://github.com/jgm/pandoc\-templates) and merge in changes after -each pandoc release. +An easy way to do this is to fork the pandoc\-templates repository and +merge in changes after each pandoc release. .SH PANDOC\[aq]S MARKDOWN .PP Pandoc understands an extended and slightly revised version of John -Gruber\[aq]s markdown syntax. +Gruber\[aq]s Markdown syntax. This document explains the syntax, noting differences from standard -markdown. +Markdown. Except where noted, these differences can be suppressed by using the \f[C]markdown_strict\f[] format instead of \f[C]markdown\f[]. An extensions can be enabled by adding \f[C]+EXTENSION\f[] to the format name and disabled by adding \f[C]\-EXTENSION\f[]. -For example, \f[C]markdown_strict+footnotes\f[] is strict markdown with +For example, \f[C]markdown_strict+footnotes\f[] is strict Markdown with footnotes enabled, while \f[C]markdown\-footnotes\-pipe_tables\f[] is -pandoc\[aq]s markdown without footnotes or pipe tables. +pandoc\[aq]s Markdown without footnotes or pipe tables. .SS Philosophy .PP Markdown is designed to be easy to write, and, even more importantly, @@ -1415,8 +1631,8 @@ This principle has guided pandoc\[aq]s decisions in finding syntax for tables, footnotes, and other extensions. .PP There is, however, one respect in which pandoc\[aq]s aims are different -from the original aims of markdown. -Whereas markdown was originally designed with HTML generation in mind, +from the original aims of Markdown. +Whereas Markdown was originally designed with HTML generation in mind, pandoc is designed for multiple output formats. Thus, while pandoc allows the embedding of raw HTML, it discourages it, and provides other, non\-HTMLish ways of representing important document @@ -1436,7 +1652,7 @@ Note: in multiline and grid table cells, this is the only way to create a hard line break, since trailing spaces in the cells are ignored. .SS Headers .PP -There are two kinds of headers, Setext and atx. +There are two kinds of headers: Setext and ATX. .SS Setext\-style headers .PP A setext\-style header is a line of text "underlined" with a row of @@ -1455,9 +1671,9 @@ A\ level\-two\ header .PP The header text can contain inline formatting, such as emphasis (see Inline formatting, below). -.SS Atx\-style headers +.SS ATX\-style headers .PP -An Atx\-style header consists of one to six \f[C]#\f[] signs and a line +An ATX\-style header consists of one to six \f[C]#\f[] signs and a line of text, optionally followed by any number of \f[C]#\f[] signs. The number of \f[C]#\f[] signs at the beginning of the line is the header level: @@ -1479,7 +1695,7 @@ As with setext\-style headers, the header text can contain formatting: .fi .SS Extension: \f[C]blank_before_header\f[] .PP -Standard markdown syntax does not require a blank line before a header. +Standard Markdown syntax does not require a blank line before a header. Pandoc does require this (except, of course, at the beginning of the document). The reason for the requirement is that it is all too easy for a @@ -1581,28 +1797,27 @@ Identifier T} _ T{ -Header identifiers in HTML +\f[C]Header\ identifiers\ in\ HTML\f[] T}@T{ \f[C]header\-identifiers\-in\-html\f[] T} T{ -\f[I]Dogs\f[]?\-\-in \f[I]my\f[] house? +\f[C]*Dogs*?\-\-in\ *my*\ house?\f[] T}@T{ \f[C]dogs\-\-in\-my\-house\f[] T} T{ -HTML, S5, or RTF? +\f[C][HTML],\ [S5],\ or\ [RTF]?\f[] T}@T{ \f[C]html\-s5\-or\-rtf\f[] T} T{ -3. -Applications +\f[C]3.\ Applications\f[] T}@T{ \f[C]applications\f[] T} T{ -33 +\f[C]33\f[] T}@T{ \f[C]section\f[] T} @@ -1699,7 +1914,7 @@ See\ [foo] Markdown uses email conventions for quoting blocks of text. A block quotation is one or more paragraphs or other block elements (such as lists or headers), with each line preceded by a \f[C]>\f[] -character and a space. +character and an optional space. (The \f[C]>\f[] need not start at the left margin, but it should not be indented more than three spaces.) .IP @@ -1737,9 +1952,21 @@ That is, block quotes can be nested: >\ >\ A\ block\ quote\ within\ a\ block\ quote. \f[] .fi +.PP +If the \f[C]>\f[] character is followed by an optional space, that space +will be considered part of the block quote marker and not part of the +indentation of the contents. +Thus, to put an indented code block in a block quote, you need five +spaces after the \f[C]>\f[]: +.IP +.nf +\f[C] +>\ \ \ \ \ code +\f[] +.fi .SS Extension: \f[C]blank_before_blockquote\f[] .PP -Standard markdown syntax does not require a blank line before a block +Standard Markdown syntax does not require a blank line before a block quote. Pandoc does require this (except, of course, at the beginning of the document). @@ -1778,7 +2005,7 @@ Note: blank lines in the verbatim text need not begin with four spaces. .SS Fenced code blocks .SS Extension: \f[C]fenced_code_blocks\f[] .PP -In addition to standard indented code blocks, Pandoc supports +In addition to standard indented code blocks, pandoc supports \f[I]fenced\f[] code blocks. These begin with a row of three or more tildes (\f[C]~\f[]) and end with a row of tildes that must be at least as long as the starting row. @@ -1884,7 +2111,7 @@ For more information on highlighting, see Syntax highlighting, below. A line block is a sequence of lines beginning with a vertical bar (\f[C]|\f[]) followed by a space. The division into lines will be preserved in the output, as will any -leading spaces; otherwise, the lines will be formatted as markdown. +leading spaces; otherwise, the lines will be formatted as Markdown. This is useful for verse and addresses: .IP .nf @@ -1958,7 +2185,7 @@ List items look best if subsequent lines are flush with the first line \f[] .fi .PP -But markdown also allows a "lazy" format: +But Markdown also allows a "lazy" format: .IP .nf \f[C] @@ -2007,7 +2234,7 @@ The nested list must be indented four spaces or one tab: \f[] .fi .PP -As noted above, markdown allows you to write list items "lazily," +As noted above, Markdown allows you to write list items "lazily," instead of indenting continuation lines. However, if there are multiple paragraphs or other blocks in a list item, the first line of each must be indented. @@ -2026,12 +2253,12 @@ list\ item. .fi .PP \f[B]Note:\f[] Although the four\-space rule for continuation paragraphs -comes from the official markdown syntax guide, the reference +comes from the official Markdown syntax guide, the reference implementation, \f[C]Markdown.pl\f[], does not follow it. So pandoc will give different results than \f[C]Markdown.pl\f[] when authors have indented continuation paragraphs fewer than four spaces. .PP -The markdown syntax guide is not explicit whether the four\-space rule +The Markdown syntax guide is not explicit whether the four\-space rule applies to \f[I]all\f[] block\-level content in a list item; it only mentions paragraphs and code blocks. But it implies that the rule applies to all block\-level content @@ -2041,7 +2268,7 @@ But it implies that the rule applies to all block\-level content Ordered lists work just like bulleted lists, except that the items begin with enumerators rather than bullets. .PP -In standard markdown, enumerators are decimal numbers followed by a +In standard Markdown, enumerators are decimal numbers followed by a period and a space. The numbers themselves are ignored, so there is no difference between this list: @@ -2065,7 +2292,7 @@ and this one: .fi .SS Extension: \f[C]fancy_lists\f[] .PP -Unlike standard markdown, Pandoc allows ordered list items to be marked +Unlike standard Markdown, pandoc allows ordered list items to be marked with uppercase and lowercase letters and roman numerals, in addition to arabic numerals. List markers may be enclosed in parentheses or followed by a single @@ -2157,7 +2384,7 @@ one or more block elements (paragraph, code block, list, etc.), each indented four spaces or one tab stop. The body of the definition (including the first line, aside from the colon or tilde) should be indented four spaces. -However, as with other markdown lists, you can "lazily" omit indentation +However, as with other Markdown lists, you can "lazily" omit indentation except at the beginning of a paragraph or other block element: .IP .nf @@ -2247,7 +2474,7 @@ Consider this source: .fi .PP Pandoc transforms this into a "compact list" (with no \f[C]<p>\f[] tags -around "First", "Second", or "Third"), while markdown puts \f[C]<p>\f[] +around "First", "Second", or "Third"), while Markdown puts \f[C]<p>\f[] tags around "Second" and "Third" (but not "First"), because of the blank space around "Third". Pandoc follows a simple rule: if the text is followed by a blank line, @@ -2257,7 +2484,7 @@ treated as a paragraph. The fact that the list is followed by a blank line is irrelevant. (Note: Pandoc works this way even when the \f[C]markdown_strict\f[] format is specified. -This behavior is consistent with the official markdown syntax +This behavior is consistent with the official Markdown syntax description, even though it is different from that of \f[C]Markdown.pl\f[].) .SS Ending a list @@ -2273,7 +2500,7 @@ What if you want to put an indented code block after a list? \f[] .fi .PP -Trouble! Here pandoc (like other markdown implementations) will treat +Trouble! Here pandoc (like other Markdown implementations) will treat \f[C]{\ my\ code\ block\ }\f[] as the second paragraph of item two, and not as a code block. .PP @@ -2427,7 +2654,7 @@ In multiline tables, the table parser pays attention to the widths of the columns, and the writers try to reproduce these relative widths in the output. So, if you find that one of the columns is too narrow in the output, try -widening it in the markdown source. +widening it in the Markdown source. .PP Headers may be omitted in multiline tables as well as simple tables: .IP @@ -2492,7 +2719,7 @@ Pipe tables look like this: \f[] .fi .PP -The syntax is the same as in PHP markdown extra. +The syntax is identical to PHP Markdown Extra tables. The beginning and ending pipe characters are optional, but pipes are required between all columns. The colons indicate column alignment as shown. @@ -2520,7 +2747,7 @@ will not wrap, since there is no information available about relative widths. If you want content to wrap within cells, use multiline or grid tables. .PP -Note: Pandoc also recognizes pipe tables of the following form, as can +Note: pandoc also recognizes pipe tables of the following form, as can be produced by Emacs\[aq] orgtbl\-mode: .IP .nf @@ -2653,7 +2880,7 @@ A YAML metadata block may occur anywhere in the document, but if it is not at the beginning, it must be preceded by a blank line. (Note that, because of the way pandoc concatenates input files when several are provided, you may also keep the metadata in a separate YAML -file and pass it to pandoc as an argument, along with your markdown +file and pass it to pandoc as an argument, along with your Markdown files: .IP .nf @@ -2668,7 +2895,7 @@ with \f[C]\-\-\-\f[] or \f[C]\&...\f[].) Metadata will be taken from the fields of the YAML object and added to any existing document metadata. Metadata can contain lists and objects (nested arbitrarily), but all -string scalars will be interpreted as markdown. +string scalars will be interpreted as Markdown. Fields with names ending in an underscore will be ignored by pandoc. (They may be given a role by external processors.) .PP @@ -2677,7 +2904,7 @@ The metadata fields will be combined through a \f[I]left\-biased union\f[]: if two metadata blocks attempt to set the same field, the value from the first block will be taken. .PP -When pandoc is used with \f[C]\-t\ markdown\f[] to create a markdown +When pandoc is used with \f[C]\-t\ markdown\f[] to create a Markdown document, a YAML metadata block will be produced only if the \f[C]\-s/\-\-standalone\f[] option is used. All of the metadata will appear in a single block at the beginning of @@ -2709,7 +2936,7 @@ abstract:\ | .PP Template variables will be set automatically from the metadata. Thus, for example, in writing HTML, the variable \f[C]abstract\f[] will -be set to the HTML equivalent of the markdown in the \f[C]abstract\f[] +be set to the HTML equivalent of the Markdown in the \f[C]abstract\f[] field: .IP .nf @@ -2766,7 +2993,7 @@ instead of \f[] .fi .PP -This rule is easier to remember than standard markdown\[aq]s rule, which +This rule is easier to remember than standard Markdown\[aq]s rule, which allows only the following characters to be backslash\-escaped: .IP .nf @@ -2776,7 +3003,7 @@ allows only the following characters to be backslash\-escaped: .fi .PP (However, if the \f[C]markdown_strict\f[] format is used, the standard -markdown rule will be used.) +Markdown rule will be used.) .PP A backslash\-escaped space is parsed as a nonbreaking space. It will appear in TeX output as \f[C]~\f[] and in HTML and XML as @@ -2787,7 +3014,7 @@ a backslash occurring at the end of a line) is parsed as a hard line break. It will appear in TeX output as \f[C]\\\\\f[] and in HTML as \f[C]<br\ />\f[]. -This is a nice alternative to markdown\[aq]s "invisible" way of +This is a nice alternative to Markdown\[aq]s "invisible" way of indicating hard line breaks using two trailing spaces on a line. .PP Backslash escapes do not work in verbatim contexts. @@ -2801,9 +3028,9 @@ quotes, \f[C]\-\-\-\f[] to em\-dashes, \f[C]\-\-\f[] to en\-dashes, and Nonbreaking spaces are inserted after certain abbreviations, such as "Mr." .PP -Note: if your LaTeX template uses the \f[C]csquotes\f[] package, pandoc -will detect automatically this and use \f[C]\\enquote{...}\f[] for -quoted text. +Note: if your LaTeX template calls for the \f[C]csquotes\f[] package, +pandoc will detect this automatically and use \f[C]\\enquote{...}\f[] +for quoted text. .SS Inline formatting .SS Emphasis .PP @@ -2902,7 +3129,7 @@ The general rule is that a verbatim span starts with a string of consecutive backticks (optionally followed by a space) and ends with a string of the same number of backticks (optionally preceded by a space). .PP -Note that backslash\-escapes (and other markdown constructs) do not work +Note that backslash\-escapes (and other Markdown constructs) do not work in verbatim contexts: .IP .nf @@ -2948,14 +3175,13 @@ delimiters. TeX math will be printed in all output formats. How it is rendered depends on the output format: .TP -.B Markdown, LaTeX, Org\-Mode, ConTeXt +.B Markdown, LaTeX, Emacs Org mode, ConTeXt It will appear verbatim between \f[C]$\f[] characters. .RS .RE .TP .B reStructuredText -It will be rendered using an interpreted text role \f[C]:math:\f[], as -described here +It will be rendered using an interpreted text role \f[C]:math:\f[]. .RS .RE .TP @@ -2990,9 +3216,9 @@ otherwise appear verbatim. .RS .RE .TP -.B Docbook +.B DocBook If the \f[C]\-\-mathml\f[] flag is used, it will be rendered using -mathml in an \f[C]inlineequation\f[] or \f[C]informalequation\f[] tag. +MathML in an \f[C]inlineequation\f[] or \f[C]informalequation\f[] tag. Otherwise it will be rendered, if possible, using unicode characters. .RS .RE @@ -3043,8 +3269,8 @@ is at \f[C]/cgi\-bin/mimetex.cgi\f[]. If the \f[C]\-\-gladtex\f[] option is used, TeX formulas will be enclosed in \f[C]<eq>\f[] tags in the HTML output. The resulting \f[C]htex\f[] file may then be processed by gladTeX, which -will produce image files for each formula and an \f[C]html\f[] file with -links to these images. +will produce image files for each formula and an HTML file with links to +these images. So, the procedure is: .RS 4 .IP @@ -3075,7 +3301,7 @@ The MathJax script will be used to render it as formulas. Markdown allows you to insert raw HTML (or DocBook) anywhere in a document (except verbatim contexts, where \f[C]<\f[], \f[C]>\f[], and \f[C]&\f[] are interpreted literally). -(Technically this is not an extension, since standard markdown allows +(Technically this is not an extension, since standard Markdown allows it, but it has been made an extension so that it can be disabled if desired.) .PP @@ -3084,16 +3310,16 @@ DZSlides, EPUB, Markdown, and Textile output, and suppressed in other formats. .SS Extension: \f[C]markdown_in_html_blocks\f[] .PP -Standard markdown allows you to include HTML "blocks": blocks of HTML +Standard Markdown allows you to include HTML "blocks": blocks of HTML between balanced tags that are separated from the surrounding text with blank lines, and start and end at the left margin. -Within these blocks, everything is interpreted as HTML, not markdown; so +Within these blocks, everything is interpreted as HTML, not Markdown; so (for example), \f[C]*\f[] does not signify emphasis. .PP Pandoc behaves this way when the \f[C]markdown_strict\f[] format is used; but by default, pandoc interprets material between HTML block tags -as markdown. -Thus, for example, Pandoc will turn +as Markdown. +Thus, for example, pandoc will turn .IP .nf \f[C] @@ -3122,13 +3348,13 @@ into whereas \f[C]Markdown.pl\f[] will preserve it as is. .PP There is one exception to this rule: text between \f[C]<script>\f[] and -\f[C]<style>\f[] tags is not interpreted as markdown. +\f[C]<style>\f[] tags is not interpreted as Markdown. .PP -This departure from standard markdown should make it easier to mix -markdown with HTML block elements. -For example, one can surround a block of markdown text with +This departure from standard Markdown should make it easier to mix +Markdown with HTML block elements. +For example, one can surround a block of Markdown text with \f[C]<div>\f[] tags without preventing it from being interpreted as -markdown. +Markdown. .SS Extension: \f[C]native_divs\f[] .PP Use native pandoc \f[C]Div\f[] blocks for content inside \f[C]<div>\f[] @@ -3172,7 +3398,7 @@ Age\ &\ Frequency\ \\\\\ \\hline .fi .PP the material between the begin and end tags will be interpreted as raw -LaTeX, not as markdown. +LaTeX, not as Markdown. .PP Inline LaTeX is ignored in output formats other than Markdown, LaTeX, and ConTeXt. @@ -3295,7 +3521,7 @@ See\ [my\ website][]. \f[] .fi .PP -Note: In \f[C]Markdown.pl\f[] and most other markdown implementations, +Note: In \f[C]Markdown.pl\f[] and most other Markdown implementations, reference link definitions cannot occur in nested constructions such as list items or block quotes. Pandoc lifts this arbitrary seeming restriction. @@ -3324,7 +3550,7 @@ See\ [my\ website]. .SS Internal links .PP To link to another section of the same document, use the automatically -generated identifier (see Header identifiers, below). +generated identifier (see Header identifiers). For example: .IP .nf @@ -3379,13 +3605,13 @@ One way to do this is to insert a nonbreaking space after the image: .IP .nf \f[C] -![This\ image\ won\[aq]t\ be\ a\ figure](/url/of/image.png)\\ +![This\ image\ won\[aq]t\ be\ a\ figure](/url/of/image.png)\\\ \f[] .fi .SS Footnotes .SS Extension: \f[C]footnotes\f[] .PP -Pandoc\[aq]s markdown allows footnotes, using the following syntax: +Pandoc\[aq]s Markdown allows footnotes, using the following syntax: .IP .nf \f[C] @@ -3520,18 +3746,49 @@ T}@T{ T} .TE .PP -Note that \f[C]\&.bib\f[] can generally be used with both BibTeX and -BibLaTeX files, but you can use \f[C]\&.bibtex\f[] to force BibTeX. +Note that \f[C]\&.bib\f[] can be used with both BibTeX and BibLaTeX +files; use \f[C]\&.bibtex\f[] to force BibTeX. .PP Note that \f[C]pandoc\-citeproc\ \-\-bib2json\f[] and \f[C]pandoc\-citeproc\ \-\-bib2yaml\f[] can produce \f[C]\&.json\f[] and \f[C]\&.yaml\f[] files from any of the supported formats. .PP -In\-field markup: In bibtex and biblatex databases, pandoc\-citeproc -parses (a subset of) LaTeX markup; in CSL JSON databases, an HTML\-like -markup (specs); and in CSL YAML databases, pandoc markdown. -\f[C]pandoc\-citeproc\ \-j\f[] and \f[C]\-y\f[] interconvert these -markup formats as far as possible. +In\-field markup: In BibTeX and BibLaTeX databases, pandoc\-citeproc +parses a subset of LaTeX markup; in CSL YAML databases, pandoc Markdown; +and in CSL JSON databases, an HTML\-like markup: +.TP +.B \f[C]<i>...</i>\f[] +italics +.RS +.RE +.TP +.B \f[C]<b>...</b>\f[] +bold +.RS +.RE +.TP +.B \f[C]<span\ style="font\-variant:small\-caps;">...</span>\f[] or \f[C]<sc>...</sc>\f[] +small capitals +.RS +.RE +.TP +.B \f[C]<sub>...</sub>\f[] +subscript +.RS +.RE +.TP +.B \f[C]<sup>...</sup>\f[] +superscript +.RS +.RE +.TP +.B \f[C]<span\ class="nocase">...</span>\f[] +prevent a phrase from being capitalized as title case +.RS +.RE +.PP +\f[C]pandoc\-citeproc\ \-j\f[] and \f[C]\-y\f[] interconvert the CSL +JSON and CSL YAML formats as far as possible. .PP As an alternative to specifying a bibliography file, you can include the citation data directly in the \f[C]references\f[] field of the @@ -3572,15 +3829,14 @@ references: (\f[C]pandoc\-citeproc\ \-\-bib2yaml\f[] can produce these from a bibliography file in one of the supported formats.) .PP +Citations and references can be formatted using any style supported by +the Citation Style Language, listed in the Zotero Style Repository. +These files are specified using the \f[C]\-\-csl\f[] option or the +\f[C]csl\f[] metadata field. By default, \f[C]pandoc\-citeproc\f[] will use the Chicago Manual of -Style author\-date format for citations and references. -To use another style, you will need to specify a CSL 1.0 style file in -the \f[C]csl\f[] metadata field. -A repository of CSL styles can be found at -https://github.com/citation\-style\-language/styles. -See also http://zotero.org/styles for easy browsing. -A primer on creating and modifying CSL styles can be found at -http://citationstyles.org/downloads/primer.html. +Style author\-date format. +The CSL project provides further information on finding and editing +styles. .PP Citations go inside square brackets and are separated by semicolons. Each citation must have a key, composed of \[aq]\@\[aq] + the citation @@ -3593,7 +3849,7 @@ Here are some examples: .IP .nf \f[C] -Blah\ blah\ [see\ \@doe99,\ pp.\ 33\-35;\ also\ \@smith04,\ ch.\ 1]. +Blah\ blah\ [see\ \@doe99,\ pp.\ 33\-35;\ also\ \@smith04,\ chap.\ 1]. Blah\ blah\ [\@doe99,\ pp.\ 33\-35,\ 38\-39\ and\ *passim*]. @@ -3601,6 +3857,25 @@ Blah\ blah\ [\@smith04;\ \@doe99]. \f[] .fi .PP +\f[C]pandoc\-citeproc\f[] detects locator terms in the CSL locale files. +Either abbreviated or unabbreviated forms are accepted. +In the \f[C]en\-US\f[] locale, locator terms can be written in either +singular or plural forms, as \f[C]book\f[], \f[C]bk.\f[]/\f[C]bks.\f[]; +\f[C]chapter\f[], \f[C]chap.\f[]/\f[C]chaps.\f[]; \f[C]column\f[], +\f[C]col.\f[]/\f[C]cols.\f[]; \f[C]figure\f[], +\f[C]fig.\f[]/\f[C]figs.\f[]; \f[C]folio\f[], +\f[C]fol.\f[]/\f[C]fols.\f[]; \f[C]number\f[], +\f[C]no.\f[]/\f[C]nos.\f[]; \f[C]line\f[], \f[C]l.\f[]/\f[C]ll.\f[]; +\f[C]note\f[], \f[C]n.\f[]/\f[C]nn.\f[]; \f[C]opus\f[], +\f[C]op.\f[]/\f[C]opp.\f[]; \f[C]page\f[], \f[C]p.\f[]/\f[C]pp.\f[]; +\f[C]paragraph\f[], \f[C]para.\f[]/\f[C]paras.\f[]; \f[C]part\f[], +\f[C]pt.\f[]/\f[C]pts.\f[]; \f[C]section\f[], +\f[C]sec.\f[]/\f[C]secs.\f[]; \f[C]sub\ verbo\f[], +\f[C]s.v.\f[]/\f[C]s.vv.\f[]; \f[C]verse\f[], \f[C]v.\f[]/\f[C]vv.\f[]; +\f[C]volume\f[], \f[C]vol.\f[]/\f[C]vols.\f[]; \f[C]¶\f[]/\f[C]¶¶\f[]; +\f[C]§\f[]/\f[C]§§\f[]. +If no locator term is used, "page" is assumed. +.PP A minus sign (\f[C]\-\f[]) before the \f[C]\@\f[] will suppress mention of the author in the citation. This can be useful when the author is already mentioned in the text: @@ -3656,8 +3931,8 @@ In this example, the document will contain a citation for \f[C]item3\f[] only, but the bibliography will contain entries for \f[C]item1\f[], \f[C]item2\f[], and \f[C]item3\f[]. .PP -For LaTeX or PDF output, you can also use NatBib or BibLaTeX to render -bibliography. +For LaTeX or PDF output, you can also use \f[C]natbib\f[] or +\f[C]biblatex\f[] to render bibliography. In order to do so, specify bibliography files as outlined above, and add \f[C]\-\-natbib\f[] or \f[C]\-\-biblatex\f[] argument to \f[C]pandoc\f[] invocation. @@ -3665,10 +3940,10 @@ Bear in mind that bibliography files have to be in respective format (either BibTeX or BibLaTeX). .SS Non\-pandoc extensions .PP -The following markdown syntax extensions are not enabled by default in +The following Markdown syntax extensions are not enabled by default in pandoc, but may be enabled by adding \f[C]+EXTENSION\f[] to the format name, where \f[C]EXTENSION\f[] is the name of the extension. -Thus, for example, \f[C]markdown+hard_line_breaks\f[] is markdown with +Thus, for example, \f[C]markdown+hard_line_breaks\f[] is Markdown with hard line breaks. .SS Extension: \f[C]lists_without_preceding_blankline\f[] .PP @@ -3685,6 +3960,9 @@ treated as spaces or as hard line breaks. This option is intended for use with East Asian languages where spaces are not used between words, but text is divided into lines for readability. +.SS Extension: \f[C]emoji\f[] +.PP +Parses textual emojis like \f[C]:smile:\f[] as Unicode emoticons. .SS Extension: \f[C]tex_math_single_backslash\f[] .PP Causes anything between \f[C]\\(\f[] and \f[C]\\)\f[] to be interpreted @@ -3700,8 +3978,8 @@ interpreted as inline TeX math, and anything between \f[C]\\\\[\f[] and .SS Extension: \f[C]markdown_attribute\f[] .PP By default, pandoc interprets material inside block\-level tags as -markdown. -This extension changes the behavior so that markdown is only parsed +Markdown. +This extension changes the behavior so that Markdown is only parsed inside block\-level tags if the tags have the attribute \f[C]markdown=1\f[]. .SS Extension: \f[C]mmd_title_block\f[] @@ -3728,7 +4006,7 @@ Parses PHP Markdown Extra abbreviation keys, like .IP .nf \f[C] -*[HTML]:\ Hyper\ Text\ Markup\ Language +*[HTML]:\ Hypertext\ Markup\ Language \f[] .fi .PP @@ -3758,7 +4036,8 @@ the header but before any trailing \f[C]#\f[]s in an ATX header). .SS Extension: \f[C]compact_definition_lists\f[] .PP Activates the definition list syntax of pandoc 1.12.x and earlier. -This syntax differs from the one described above in several respects: +This syntax differs from the one described above under Definition lists +in several respects: .IP \[bu] 2 No blank line is required between consecutive items of the definition list. @@ -3771,7 +4050,7 @@ Lazy wrapping of paragraphs is not allowed: the entire definition must be indented four spaces. .SS Markdown variants .PP -In addition to pandoc\[aq]s extended markdown, the following markdown +In addition to pandoc\[aq]s extended Markdown, the following Markdown variants are supported: .TP .B \f[C]markdown_phpextra\f[] (PHP Markdown Extra) @@ -3783,13 +4062,14 @@ variants are supported: .RS .RE .TP -.B \f[C]markdown_github\f[] (GitHub\-flavored Markdown) +.B \f[C]markdown_github\f[] (GitHub\-Flavored Markdown) \f[C]pipe_tables\f[], \f[C]raw_html\f[], \f[C]tex_math_single_backslash\f[], \f[C]fenced_code_blocks\f[], \f[C]auto_identifiers\f[], \f[C]ascii_identifiers\f[], \f[C]backtick_code_blocks\f[], \f[C]autolink_bare_uris\f[], \f[C]intraword_underscores\f[], \f[C]strikeout\f[], -\f[C]hard_line_breaks\f[], \f[C]shortcut_reference_links\f[]. +\f[C]hard_line_breaks\f[], \f[C]emoji\f[], +\f[C]shortcut_reference_links\f[]. .RS .RE .TP @@ -3808,10 +4088,10 @@ variants are supported: \f[C]raw_html\f[] .RS .RE -.SS Extensions with formats other than markdown +.SS Extensions with formats other than Markdown .PP Some of the extensions discussed above can be used with formats other -than markdown: +than Markdown: .IP \[bu] 2 \f[C]auto_identifiers\f[] can be used with \f[C]latex\f[], \f[C]rst\f[], \f[C]mediawiki\f[], and \f[C]textile\f[] input (and is used by default). @@ -3822,13 +4102,13 @@ than markdown: example.) .SH PRODUCING SLIDE SHOWS WITH PANDOC .PP -You can use Pandoc to produce an HTML + javascript slide presentation +You can use pandoc to produce an HTML + javascript slide presentation that can be viewed via a web browser. There are five ways to do this, using S5, DZSlides, Slidy, Slideous, or reveal.js. -You can also produce a PDF slide show using LaTeX beamer. +You can also produce a PDF slide show using LaTeX \f[C]beamer\f[]. .PP -Here\[aq]s the markdown source for a simple slide show, +Here\[aq]s the Markdown source for a simple slide show, \f[C]habits.txt\f[]: .IP .nf @@ -3886,7 +4166,7 @@ CSS files, which are assumed to be available at the relative path \f[C]w3.org\f[] (for Slidy). (These paths can be changed by setting the \f[C]slidy\-url\f[], \f[C]slideous\-url\f[], \f[C]revealjs\-url\f[], or \f[C]s5\-url\f[] -variables; see \f[C]\-\-variable\f[], above.) For DZSlides, the +variables; see Variables for slides, above.) For DZSlides, the (relatively short) javascript and css are included in the file by default. .PP @@ -3993,8 +4273,8 @@ directory. For dzslides, the CSS is included in the HTML file itself, and may be modified there. .PP -For reveal.js, themes can be used by setting the \f[C]theme\f[] -variable, for example: +All reveal.js configuration options can be set through variables. +For example, themes can be used by setting the \f[C]theme\f[] variable: .IP .nf \f[C] @@ -4005,8 +4285,9 @@ variable, for example: Or you can specify a custom stylesheet using the \f[C]\-\-css\f[] option. .PP -To style beamer slides, you can specify a beamer "theme" or "colortheme" -using the \f[C]\-V\f[] option: +To style beamer slides, you can specify a \f[C]theme\f[], +\f[C]colortheme\f[], \f[C]fonttheme\f[], \f[C]innertheme\f[], and +\f[C]outertheme\f[], using the \f[C]\-V\f[] option: .IP .nf \f[C] @@ -4017,7 +4298,7 @@ pandoc\ \-t\ beamer\ habits.txt\ \-V\ theme:Warsaw\ \-o\ habits.pdf Note that header attributes will turn into slide attributes (on a \f[C]<div>\f[] or \f[C]<section>\f[]) in HTML slide formats, allowing you to style individual slides. -In Beamer, the only header attribute that affects slides is the +In beamer, the only header attribute that affects slides is the \f[C]allowframebreaks\f[] class, which sets the \f[C]allowframebreaks\f[] option, causing multiple slides to be created if the content overfills the frame. @@ -4031,14 +4312,14 @@ This is recommended especially for bibliographies: .SS Speaker notes .PP reveal.js has good support for speaker notes. -You can add notes to your markdown document thus: +You can add notes to your Markdown document thus: .IP .nf \f[C] <div\ class="notes"> This\ is\ my\ note. -\-\ It\ can\ contain\ markdown +\-\ It\ can\ contain\ Markdown \-\ like\ this\ list </div> @@ -4049,7 +4330,7 @@ To show the notes window, press \f[C]s\f[] while viewing the presentation. Notes are not yet supported for other slide formats, but the notes will not appear on the slides themselves. -.SS Marking frames "fragile" in beamer +.SS Frame attributes in beamer .PP Sometimes it is necessary to add the LaTeX \f[C][fragile]\f[] option to a frame in beamer (for example, when using the \f[C]minted\f[] @@ -4062,10 +4343,16 @@ introducing the slide: #\ Fragile\ slide\ {.fragile} \f[] .fi -.SH EPUB METADATA +.PP +All of the other frame attributes described in Section 8.1 of the Beamer +User\[aq]s Guide may also be used: \f[C]allowdisplaybreaks\f[], +\f[C]allowframebreaks\f[], \f[C]b\f[], \f[C]c\f[], \f[C]t\f[], +\f[C]environment\f[], \f[C]label\f[], \f[C]plain\f[], \f[C]shrink\f[]. +.SH CREATING EPUBS WITH PANDOC +.SS EPUB Metadata .PP EPUB metadata may be specified using the \f[C]\-\-epub\-metadata\f[] -option, but if the source document is markdown, it is better to use a +option, but if the source document is Markdown, it is better to use a YAML metadata block. Here is an example: .IP @@ -4116,7 +4403,7 @@ Valid values for \f[C]type\f[] are \f[C]main\f[], \f[C]subtitle\f[], .B \f[C]creator\f[] Either a string value, or an object with fields \f[C]role\f[], \f[C]file\-as\f[], and \f[C]text\f[], or a list of such objects. -Valid values for \f[C]role\f[] are marc relators, but pandoc will +Valid values for \f[C]role\f[] are MARC relators, but pandoc will attempt to translate the human\-readable versions (like "author" and "editor") to the appropriate marc relators. .RS @@ -4134,8 +4421,8 @@ common date formats. .RS .RE .TP -.B \f[C]language\f[] -A string value in RFC5646 format. +.B \f[C]lang\f[] (or legacy: \f[C]language\f[]) +A string value in BCP 47 format. Pandoc will default to the local language if nothing is specified. .RS .RE @@ -4187,9 +4474,29 @@ A string value (path to CSS stylesheet). .TP .B \f[C]page\-progression\-direction\f[] Either \f[C]ltr\f[] or \f[C]rtl\f[]. -Specifies the \f[C]page\-progression\-direction\f[] spine attribute. +Specifies the \f[C]page\-progression\-direction\f[] attribute for the +\f[C]spine\f[] element. .RS .RE +.SS Linked media +.PP +By default, pandoc will download linked media (including audio and +video) and include it in the EPUB container, yielding a completely +self\-contained EPUB. +If you want to link to external media resources instead, use raw HTML in +your source and add \f[C]data\-external="1"\f[] to the tag with the +\f[C]src\f[] attribute. +For example: +.IP +.nf +\f[C] +<audio\ controls="1"> +\ \ <source\ src="http://example.com/music/toccata.mp3" +\ \ \ \ \ \ \ \ \ \ data\-external="1"\ type="audio/mpeg"> +\ \ </source> +</audio> +\f[] +.fi .SH LITERATE HASKELL SUPPORT .PP If you append \f[C]+lhs\f[] (or \f[C]+literate_haskell\f[]) to an @@ -4199,17 +4506,19 @@ output; \f[C]beamer\f[], \f[C]html\f[] or \f[C]html5\f[] for output only), pandoc will treat the document as literate Haskell source. This means that .IP \[bu] 2 -In markdown input, "bird track" sections will be parsed as Haskell code +In Markdown input, "bird track" sections will be parsed as Haskell code rather than block quotations. Text between \f[C]\\begin{code}\f[] and \f[C]\\end{code}\f[] will also be treated as Haskell code. +For ATX\-style headers the character \[aq]=\[aq] will be used instead of +\[aq]#\[aq]. .IP \[bu] 2 -In markdown output, code blocks with classes \f[C]haskell\f[] and +In Markdown output, code blocks with classes \f[C]haskell\f[] and \f[C]literate\f[] will be rendered using bird tracks, and block quotations will be indented one space, so they will not be treated as Haskell code. In addition, headers will be rendered setext\-style (with underlines) -rather than atx\-style (with \[aq]#\[aq] characters). +rather than ATX\-style (with \[aq]#\[aq] characters). (This is because ghc treats \[aq]#\[aq] characters in column 1 as introducing line numbers.) .IP \[bu] 2 @@ -4236,7 +4545,7 @@ pandoc\ \-f\ markdown+lhs\ \-t\ html \f[] .fi .PP -reads literate Haskell source formatted with markdown conventions and +reads literate Haskell source formatted with Markdown conventions and writes ordinary HTML (without bird tracks). .IP .nf @@ -4251,10 +4560,8 @@ and pasted as literate Haskell source. .PP Pandoc will automatically highlight syntax in fenced code blocks that are marked with a language name. -(See [Extension: \f[C]inline_code_attributes\f[]] and [Extension: -\f[C]fenced_code_attributes\f[]], above.) The Haskell library -highlighting\-kate is used for highlighting, which works in HTML, Docx, -and LaTeX/PDF output. +The Haskell library highlighting\-kate is used for highlighting, which +works in HTML, Docx, and LaTeX/PDF output. The color scheme can be selected using the \f[C]\-\-highlight\-style\f[] option. The default color scheme is \f[C]pygments\f[], which imitates the @@ -4300,9 +4607,10 @@ This software carries no warranty of any kind. .PP Contributors include Aaron Wolen, Albert Krewinkel, Alexander Kondratskiy, Alexander Sulfrian, Alexander V Vershilov, Alfred -Wechselberger, Andreas Lööw, Andrew Dunning, Antoine Latter, Arlo -O\[aq]Keeffe, Artyom Kazak, Ben Gamari, Beni Cherniavsky\-Paskin, Bjorn -Buckwalter, Bradley Kuhn, Brent Yorgey, Bryan O\[aq]Sullivan, B. +Wechselberger, Andreas Lööw, Andrew Dunning, Antoine Latter, Arata +Mizuki, Arlo O\[aq]Keeffe, Artyom Kazak, Ben Gamari, Beni +Cherniavsky\-Paskin, Bjorn Buckwalter, Bradley Kuhn, Brent Yorgey, Bryan +O\[aq]Sullivan, B. Scott Michel, Caleb McDaniel, Calvin Beck, Christoffer Ackelman, Christoffer Sawicki, Clare Macrae, Clint Adams, Conal Elliott, Craig S. Bosma, Daniel Bergey, Daniel T. @@ -4312,7 +4620,7 @@ Calvert, Eric Kow, Eric Seidel, Florian Eitel, François Gannaz, Freiric Barral, Fyodor Sheremetyev, Gabor Pali, Gavin Beatty, Greg Maslov, Grégory Bataille, Greg Rundlett, gwern, Gwern Branwen, Hans\-Peter Deifel, Henry de Valence, Ilya V. -Portnov, infinity0x, Jaime Marquínez Ferrándiz, James Aspnes, Jamie F. +Portnov, infinity0x, Jaime Marquínez Ferrándiz, James Aspnes, Jamie F. Olson, Jan Larres, Jason Ronallo, Jeff Arnold, Jeff Runningen, Jens Petersen, Jérémy Bobbio, Jesse Rosenthal, J. Lewis Muir, Joe Hillenbrand, John MacFarlane, Jonas Smedegaard, Jonathan diff --git a/osx/stack.yaml b/osx/stack.yaml new file mode 100644 index 000000000..71af73661 --- /dev/null +++ b/osx/stack.yaml @@ -0,0 +1,20 @@ +flags: + pandoc: + trypandoc: false + https: true + embed_data_files: true + old-locale: false + network-uri: true + pandoc-citeproc: + bibutils: true + embed_data_files: true + unicode_collation: false + test_citeproc: false + debug: false +ghc-options: + pandoc-citeproc: '-pgmP cpphs -optP--cpp' + highlighting-kate: '-pgmP cpphs -optP--cpp' +packages: +- '..' +- 'https://hackage.haskell.org/package/pandoc-citeproc-0.8.1.3/pandoc-citeproc-0.8.1.3.tar.gz' +resolver: lts-3.13 diff --git a/pandoc.cabal b/pandoc.cabal index a2e7ee9bc..c463d605b 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -1,5 +1,5 @@ Name: pandoc -Version: 1.15.0.6 +Version: 1.16 Cabal-Version: >= 1.10 Build-Type: Custom License: GPL @@ -11,7 +11,7 @@ Bug-Reports: https://github.com/jgm/pandoc/issues Stability: alpha Homepage: http://pandoc.org Category: Text -Tested-With: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.2 +Tested-With: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2 Synopsis: Conversion between markup formats Description: Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses @@ -105,12 +105,16 @@ Data-Files: data/dzslides/template.html -- sample lua custom writer data/sample.lua + -- bash completion template + data/bash_completion.tpl -- documentation README, COPYRIGHT Extra-Source-Files: -- documentation INSTALL, BUGS, CONTRIBUTING.md, changelog man/pandoc.1 + -- stack build plan + stack.yaml -- files needed to build man page man/capitalizeHeaders.hs man/removeNotes.hs @@ -123,6 +127,7 @@ Extra-Source-Files: tests/bodybg.gif tests/*.native tests/docbook-reader.docbook + tests/docbook-xref.docbook tests/html-reader.html tests/opml-reader.opml tests/haddock-reader.haddock @@ -184,6 +189,8 @@ Extra-Source-Files: tests/writer.fb2 tests/writer.opml tests/writer.dokuwiki + tests/writers-lang-and-dir.latex + tests/writers-lang-and-dir.context tests/dokuwiki_inline_formatting.dokuwiki tests/lhs-test.markdown tests/lhs-test.markdown+lhs @@ -236,18 +243,18 @@ Flag network-uri Flag old-locale Description: Use old-locale and time < 1.5 - Default: True + Default: False Library Build-Depends: base >= 4.2 && <5, - syb >= 0.1 && < 0.6, + syb >= 0.1 && < 0.7, containers >= 0.1 && < 0.6, unordered-containers >= 0.2 && < 0.3, array >= 0.3 && < 0.6, parsec >= 3.1 && < 3.2, mtl >= 1.1 && < 2.3, filepath >= 1.1 && < 1.5, - process >= 1 && < 1.3, + process >= 1 && < 1.4, directory >= 1 && < 1.3, bytestring >= 0.9 && < 0.11, text >= 0.11 && < 1.3, @@ -257,8 +264,8 @@ Library xml >= 1.3.12 && < 1.4, random >= 1 && < 1.2, extensible-exceptions >= 0.1 && < 0.2, - pandoc-types >= 1.14 && < 1.15, - aeson >= 0.7 && < 0.10, + pandoc-types >= 1.16 && < 1.17, + aeson >= 0.7 && < 0.11, tagsoup >= 0.13.1 && < 0.14, base64-bytestring >= 0.1 && < 1.1, zlib >= 0.5 && < 0.7, @@ -278,7 +285,8 @@ Library deepseq-generics >= 0.1 && < 0.2, JuicyPixels >= 3.1.6.1 && < 3.3, filemanip >= 0.3 && < 0.4, - cmark >= 0.4.0.1 && < 0.5 + cmark >= 0.4.0.1 && < 0.5, + ghc-prim >= 0.2 if flag(old-locale) Build-Depends: old-locale >= 1 && < 1.1, time >= 1.2 && < 1.5 @@ -291,7 +299,7 @@ Library if flag(https) Build-Depends: http-client >= 0.3.2 && < 0.5, http-client-tls >= 0.2 && < 0.3, - http-types >= 0.8 && < 0.9 + http-types >= 0.8 && < 0.10 cpp-options: -DHTTP_CLIENT if flag(embed_data_files) cpp-options: -DEMBED_DATA_FILES @@ -307,6 +315,9 @@ Library RelaxedPolyRec, DeriveDataTypeable, TypeSynonymInstances, FlexibleInstances Hs-Source-Dirs: src + if impl(ghc < 7.10) + Hs-Source-Dirs: prelude + Other-Modules: Prelude Exposed-Modules: Text.Pandoc, Text.Pandoc.Options, @@ -362,7 +373,8 @@ Library Text.Pandoc.Templates, Text.Pandoc.XML, Text.Pandoc.SelfContained, - Text.Pandoc.Process + Text.Pandoc.Process, + Text.Pandoc.CSS Other-Modules: Text.Pandoc.Readers.Docx.Lists, Text.Pandoc.Readers.Docx.Reducible, Text.Pandoc.Readers.Docx.Parse, @@ -383,23 +395,24 @@ Library Text.Pandoc.Writers.Shared, Text.Pandoc.Asciify, Text.Pandoc.MIME, + Text.Pandoc.Emoji, Text.Pandoc.Parsing, Text.Pandoc.UUID, Text.Pandoc.ImageSize, Text.Pandoc.Slides, Text.Pandoc.Highlighting, - Text.Pandoc.Compat.Locale, - Text.Pandoc.Compat.Monoid, + Text.Pandoc.Compat.Time, Text.Pandoc.Compat.Except, Text.Pandoc.Compat.TagSoupEntity, - Text.Pandoc.Compat.Directory + Text.Pandoc.Compat.Directory, + Text.Pandoc.Compat.Monoid, Paths_pandoc Buildable: True Executable pandoc Build-Depends: pandoc, - pandoc-types >= 1.14 && < 1.15, + pandoc-types >= 1.16 && < 1.17, base >= 4.2 && <5, directory >= 1 && < 1.3, filepath >= 1.1 && < 1.5, @@ -407,7 +420,7 @@ Executable pandoc bytestring >= 0.9 && < 0.11, extensible-exceptions >= 0.1 && < 0.2, highlighting-kate >= 0.6 && < 0.7, - aeson >= 0.7.0.5 && < 0.10, + aeson >= 0.7.0.5 && < 0.11, yaml >= 0.8.8.2 && < 0.9, containers >= 0.1 && < 0.6, HTTP >= 4000.0.5 && < 4000.3 @@ -425,12 +438,19 @@ Executable pandoc RelaxedPolyRec, DeriveDataTypeable, TypeSynonymInstances, FlexibleInstances Hs-Source-Dirs: . + if impl(ghc < 7.10) + Hs-Source-Dirs: prelude + Other-Modules: Prelude Main-Is: pandoc.hs Buildable: True + Other-Modules: Paths_pandoc Executable trypandoc Main-Is: trypandoc.hs Hs-Source-Dirs: trypandoc + if impl(ghc < 7.10) + Hs-Source-Dirs: prelude + Other-Modules: Prelude default-language: Haskell2010 if flag(trypandoc) Build-Depends: base, aeson, pandoc, highlighting-kate, @@ -443,22 +463,25 @@ Test-Suite test-pandoc Type: exitcode-stdio-1.0 Main-Is: test-pandoc.hs Hs-Source-Dirs: tests + if impl(ghc < 7.10) + Hs-Source-Dirs: prelude + Other-Modules: Prelude Build-Depends: base >= 4.2 && < 5, - syb >= 0.1 && < 0.6, + syb >= 0.1 && < 0.7, pandoc, - pandoc-types >= 1.14 && < 1.15, + pandoc-types >= 1.16 && < 1.17, bytestring >= 0.9 && < 0.11, text >= 0.11 && < 1.3, directory >= 1 && < 1.3, filepath >= 1.1 && < 1.5, - process >= 1 && < 1.3, + process >= 1 && < 1.4, highlighting-kate >= 0.6 && < 0.7, Diff >= 0.2 && < 0.4, test-framework >= 0.3 && < 0.9, test-framework-hunit >= 0.2 && < 0.4, test-framework-quickcheck2 >= 0.2.9 && < 0.4, QuickCheck >= 2.4 && < 2.9, - HUnit >= 1.2 && < 1.3, + HUnit >= 1.2 && < 1.4, containers >= 0.1 && < 0.6, ansi-terminal >= 0.5 && < 0.7, executable-path >= 0.0 && < 0.1, @@ -494,9 +517,12 @@ benchmark benchmark-pandoc Type: exitcode-stdio-1.0 Main-Is: benchmark-pandoc.hs Hs-Source-Dirs: benchmark + if impl(ghc < 7.10) + Hs-Source-Dirs: prelude + Other-Modules: Prelude Build-Depends: pandoc, base >= 4.2 && < 5, - syb >= 0.1 && < 0.6, - criterion >= 0.5 && < 1.1 + syb >= 0.1 && < 0.7, + criterion >= 1.0 && < 1.2 Ghc-Options: -rtsopts -Wall -fno-warn-unused-do-bind Default-Language: Haskell98 @@ -68,10 +68,10 @@ import qualified Data.Map as M import Data.Yaml (decode) import qualified Data.Yaml as Yaml import qualified Data.Text as T -import Control.Applicative ((<$>), (<|>)) +import Control.Applicative ((<|>)) import Text.Pandoc.Readers.Txt2Tags (getT2TMeta) -import Data.Monoid - +import Paths_pandoc (getDataDir) +import Text.Printf (printf) import Text.Pandoc.Error type Transform = Pandoc -> Pandoc @@ -856,7 +856,7 @@ options = (\arg opt -> return opt { optKaTeXJS = - arg <|> Just "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.1.0/katex.min.js"}) + arg <|> Just "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.js"}) "URL") "" -- Use KaTeX for HTML Math @@ -892,6 +892,22 @@ options = (\opt -> return opt { optVerbose = True })) "" -- "Verbose diagnostic output." + , Option "" ["bash-completion"] + (NoArg + (\_ -> do + ddir <- getDataDir + tpl <- readDataFileUTF8 Nothing "bash_completion.tpl" + let optnames (Option shorts longs _ _) = + map (\c -> ['-',c]) shorts ++ + map ("--" ++) longs + let allopts = unwords (concatMap optnames options) + UTF8.hPutStrLn stdout $ printf tpl allopts + (unwords (map fst readers)) + (unwords ("pdf": map fst writers)) + ddir + exitWith ExitSuccess )) + "" -- "Print bash completion script" + , Option "v" ["version"] (NoArg (\_ -> do @@ -1006,6 +1022,7 @@ defaultWriterName x = ".epub" -> "epub" ".org" -> "org" ".asciidoc" -> "asciidoc" + ".adoc" -> "asciidoc" ".pdf" -> "latex" ".fb2" -> "fb2" ".opml" -> "opml" @@ -1128,7 +1145,7 @@ main = do mapM_ (\arg -> UTF8.hPutStrLn stdout arg) args exitWith ExitSuccess - let csscdn = "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.1.0/katex.min.css" + let csscdn = "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.css" let mathMethod = case (katexJS, katexStylesheet) of (Nothing, _) -> mathMethod' @@ -1136,7 +1153,7 @@ main = do -- --bibliography implies -F pandoc-citeproc for backwards compatibility: - let needsCiteproc = any ("--bibliography" `isPrefixOf`) rawArgs && + let needsCiteproc = M.lookup "bibliography" (optMetadata opts) /= Nothing && optCiteMethod opts `notElem` [Natbib, Biblatex] && "pandoc-citeproc" `notElem` map takeBaseName filters let filters' = if needsCiteproc then "pandoc-citeproc" : filters @@ -1170,6 +1187,10 @@ main = do let laTeXOutput = "latex" `isPrefixOf` writerName' || "beamer" `isPrefixOf` writerName' + let conTeXtOutput = "context" `isPrefixOf` writerName' + + let laTeXInput = "latex" `isPrefixOf` readerName' || + "beamer" `isPrefixOf` readerName' writer <- if ".lua" `isSuffixOf` writerName' -- note: use non-lowercased version writerName @@ -1252,8 +1273,10 @@ main = do uriFragment = "" } _ -> Nothing - let readerOpts = def{ readerSmart = smart || (texLigatures && - (laTeXOutput || "context" `isPrefixOf` writerName')) + let readerOpts = def{ readerSmart = if laTeXInput + then texLigatures + else smart || (texLigatures && + (laTeXOutput || conTeXtOutput)) , readerStandalone = standalone' , readerParseRaw = parseRaw , readerColumns = columns @@ -1365,17 +1388,20 @@ main = do PureStringWriter f | pdfOutput -> do -- make sure writer is latex or beamer - unless laTeXOutput $ + unless (laTeXOutput || conTeXtOutput) $ err 47 $ "cannot produce pdf output with " ++ writerName' ++ " writer" + let texprog = if conTeXtOutput + then "context" + else latexEngine -- check for latex program - mbLatex <- findExecutable latexEngine + mbLatex <- findExecutable texprog when (mbLatex == Nothing) $ - err 41 $ latexEngine ++ " not found. " ++ - latexEngine ++ " is needed for pdf output." + err 41 $ texprog ++ " not found. " ++ + texprog ++ " is needed for pdf output." - res <- makePDF latexEngine f writerOptions doc' + res <- makePDF texprog f writerOptions doc' case res of Right pdf -> writeBinary pdf Left err' -> do diff --git a/prelude/Prelude.hs b/prelude/Prelude.hs new file mode 100644 index 000000000..50e86a7b9 --- /dev/null +++ b/prelude/Prelude.hs @@ -0,0 +1,30 @@ +{-# LANGUAGE PackageImports #-} +{-# LANGUAGE CPP #-} + +-- This custom Prelude emulates the API of the prelude +-- with base 4.8. + +module Prelude +( + module P +#if MIN_VERSION_base(4,8,0) +#else +, Monoid(..) +, Applicative(..) +, (<$>) +, (<$) +#endif +) +where + +#if MIN_VERSION_base(4,8,0) +import "base" Prelude as P +#elif MIN_VERSION_base(4,6,0) +import "base" Prelude as P +import Control.Applicative +import Data.Monoid +#else +import "base" Prelude as P hiding (catch) +import Control.Applicative +import Data.Monoid +#endif diff --git a/src/Text/Pandoc.hs b/src/Text/Pandoc.hs index f9d19d9dd..ee4284979 100644 --- a/src/Text/Pandoc.hs +++ b/src/Text/Pandoc.hs @@ -117,12 +117,11 @@ module Text.Pandoc , writeCustom -- * Rendering templates and default templates , module Text.Pandoc.Templates - -- * Version - , pandocVersion -- * Miscellaneous , getReader , getWriter , ToJsonFilter(..) + , pandocVersion ) where import Text.Pandoc.Definition @@ -172,23 +171,17 @@ import Text.Pandoc.Writers.CommonMark import Text.Pandoc.Writers.Custom import Text.Pandoc.Templates import Text.Pandoc.Options -import Text.Pandoc.Shared (safeRead, warn, mapLeft) +import Text.Pandoc.Shared (safeRead, warn, mapLeft, pandocVersion) import Text.Pandoc.MediaBag (MediaBag) import Text.Pandoc.Error import Data.Aeson import qualified Data.ByteString.Lazy as BL import Data.List (intercalate) -import Data.Version (showVersion) import Data.Set (Set) import qualified Data.Set as Set import Text.Parsec import Text.Parsec.Error import qualified Text.Pandoc.UTF8 as UTF8 -import Paths_pandoc (version) - --- | Version number of pandoc library. -pandocVersion :: String -pandocVersion = showVersion version parseFormatSpec :: String -> Either ParseError (String, Set Extension -> Set Extension) @@ -320,14 +313,14 @@ getDefaultExtensions "markdown_mmd" = multimarkdownExtensions getDefaultExtensions "markdown_github" = githubMarkdownExtensions getDefaultExtensions "markdown" = pandocExtensions getDefaultExtensions "plain" = plainExtensions -getDefaultExtensions "org" = Set.fromList [Ext_citations] +getDefaultExtensions "org" = Set.fromList [Ext_citations, + Ext_auto_identifiers] getDefaultExtensions "textile" = Set.fromList [Ext_auto_identifiers] getDefaultExtensions "html" = Set.fromList [Ext_auto_identifiers, Ext_native_divs, Ext_native_spans] getDefaultExtensions "html5" = getDefaultExtensions "html" -getDefaultExtensions "epub" = Set.fromList [Ext_auto_identifiers, - Ext_raw_html, +getDefaultExtensions "epub" = Set.fromList [Ext_raw_html, Ext_native_divs, Ext_native_spans, Ext_epub_html_exts] diff --git a/src/Text/Pandoc/CSS.hs b/src/Text/Pandoc/CSS.hs new file mode 100644 index 000000000..9d0c84243 --- /dev/null +++ b/src/Text/Pandoc/CSS.hs @@ -0,0 +1,34 @@ +module Text.Pandoc.CSS ( foldOrElse, + pickStyleAttrProps + ) +where + +import Text.Pandoc.Shared (trim) +import Text.Parsec +import Text.Parsec.String + +ruleParser :: Parser (String, String) +ruleParser = do + p <- many1 (noneOf ":") <* char ':' + v <- many1 (noneOf ":;") <* char ';' <* spaces + return (trim p, trim v) + +styleAttrParser :: Parser [(String, String)] +styleAttrParser = do + p <- many1 ruleParser + return p + +orElse :: Eq a => a -> a -> a -> a +orElse v x y = if v == x then y else x + +foldOrElse :: Eq a => a -> [a] -> a +foldOrElse v xs = foldr (orElse v) v xs + +eitherToMaybe :: Either a b -> Maybe b +eitherToMaybe (Right x) = Just x +eitherToMaybe _ = Nothing + +pickStyleAttrProps :: [String] -> String -> Maybe String +pickStyleAttrProps lookupProps styleAttr = do + styles <- eitherToMaybe $ parse styleAttrParser "" styleAttr + foldOrElse Nothing $ map (flip lookup styles) lookupProps diff --git a/src/Text/Pandoc/Compat/Locale.hs b/src/Text/Pandoc/Compat/Locale.hs deleted file mode 100644 index ac791136c..000000000 --- a/src/Text/Pandoc/Compat/Locale.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE CPP #-} -module Text.Pandoc.Compat.Locale ( defaultTimeLocale ) -where - -#if MIN_VERSION_time(1,5,0) -import Data.Time.Format ( defaultTimeLocale ) -#else -import System.Locale ( defaultTimeLocale ) -#endif diff --git a/src/Text/Pandoc/Compat/Monoid.hs b/src/Text/Pandoc/Compat/Monoid.hs index cb7ea2527..4daceb8e1 100644 --- a/src/Text/Pandoc/Compat/Monoid.hs +++ b/src/Text/Pandoc/Compat/Monoid.hs @@ -1,19 +1,16 @@ {-# LANGUAGE CPP #-} -module Text.Pandoc.Compat.Monoid ( Monoid(..) - , (<>) - ) where +module Text.Pandoc.Compat.Monoid ( (<>) ) + where #if MIN_VERSION_base(4,5,0) -import Data.Monoid ((<>), Monoid(..)) -#else -import Data.Monoid (mappend, Monoid(..)) -#endif +import Data.Monoid ((<>)) -#if MIN_VERSION_base(4,5,0) #else +import Data.Monoid + infixr 6 <> --- | An infix synonym for 'mappend'. +--- | An infix synonym for 'mappend'. (<>) :: Monoid m => m -> m -> m (<>) = mappend {-# INLINE (<>) #-} diff --git a/src/Text/Pandoc/Compat/Time.hs b/src/Text/Pandoc/Compat/Time.hs new file mode 100644 index 000000000..aa08ca224 --- /dev/null +++ b/src/Text/Pandoc/Compat/Time.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE CPP #-} +#if MIN_VERSION_time(1,5,0) +module Text.Pandoc.Compat.Time ( + module Data.Time +) +where +import Data.Time + +#else +module Text.Pandoc.Compat.Time ( + module Data.Time, + defaultTimeLocale +) +where +import Data.Time +import System.Locale ( defaultTimeLocale ) + +#endif diff --git a/src/Text/Pandoc/Data.hsb b/src/Text/Pandoc/Data.hsb index 3a0bf8ac4..d408bf510 100644 --- a/src/Text/Pandoc/Data.hsb +++ b/src/Text/Pandoc/Data.hsb @@ -2,6 +2,14 @@ -- to be processed using hsb2hs module Text.Pandoc.Data (dataFiles) where import qualified Data.ByteString as B +import System.FilePath (splitDirectories) +import qualified System.FilePath.Posix as Posix +-- We ensure that the data files are stored using Posix +-- path separators (/), even on Windows. dataFiles :: [(FilePath, B.ByteString)] -dataFiles = ("README", %blob "README") : %blobs "data"
\ No newline at end of file +dataFiles = map (\(fp, contents) -> + (Posix.joinPath (splitDirectories fp), contents)) dataFiles' + +dataFiles' :: [(FilePath, B.ByteString)] +dataFiles' = ("README", %blob "README") : %blobs "data" diff --git a/src/Text/Pandoc/Emoji.hs b/src/Text/Pandoc/Emoji.hs new file mode 100644 index 000000000..c98b06fa1 --- /dev/null +++ b/src/Text/Pandoc/Emoji.hs @@ -0,0 +1,905 @@ +{- +Copyright (C) 2015 John MacFarlane <jgm@berkeley.edu> + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-} + +{- | + Module : Text.Pandoc.Emoji + Copyright : Copyright (C) 2015 John MacFarlane + License : GNU GPL, version 2 or above + + Maintainer : John MacFarlane <jgm@berkeley.edu> + Stability : alpha + Portability : portable + +Emoji symbol lookup from canonical string identifier. +-} +module Text.Pandoc.Emoji ( emojis ) where +import qualified Data.Map as M + +emojis :: M.Map String String +emojis = M.fromList + [ ("100", "\x1f4af") + , ("1234", "\x1f522") + , ("smile", "\x1f604") + , ("smiley", "\x1f603") + , ("grinning", "\x1f600") + , ("blush", "\x1f60a") + , ("relaxed", "\x263a\fe0f") + , ("wink", "\x1f609") + , ("heart_eyes", "\x1f60d") + , ("kissing_heart", "\x1f618") + , ("kissing_closed_eyes", "\x1f61a") + , ("kissing", "\x1f617") + , ("kissing_smiling_eyes", "\x1f619") + , ("stuck_out_tongue_winking_eye", "\x1f61c") + , ("stuck_out_tongue_closed_eyes", "\x1f61d") + , ("stuck_out_tongue", "\x1f61b") + , ("flushed", "\x1f633") + , ("grin", "\x1f601") + , ("pensive", "\x1f614") + , ("relieved", "\x1f60c") + , ("unamused", "\x1f612") + , ("disappointed", "\x1f61e") + , ("persevere", "\x1f623") + , ("cry", "\x1f622") + , ("joy", "\x1f602") + , ("sob", "\x1f62d") + , ("sleepy", "\x1f62a") + , ("disappointed_relieved", "\x1f625") + , ("cold_sweat", "\x1f630") + , ("sweat_smile", "\x1f605") + , ("sweat", "\x1f613") + , ("weary", "\x1f629") + , ("tired_face", "\x1f62b") + , ("fearful", "\x1f628") + , ("scream", "\x1f631") + , ("angry", "\x1f620") + , ("rage", "\x1f621") + , ("triumph", "\x1f624") + , ("confounded", "\x1f616") + , ("laughing", "\x1f606") + , ("satisfied", "\x1f606") + , ("yum", "\x1f60b") + , ("mask", "\x1f637") + , ("sunglasses", "\x1f60e") + , ("sleeping", "\x1f634") + , ("dizzy_face", "\x1f635") + , ("astonished", "\x1f632") + , ("worried", "\x1f61f") + , ("frowning", "\x1f626") + , ("anguished", "\x1f627") + , ("smiling_imp", "\x1f608") + , ("imp", "\x1f47f") + , ("open_mouth", "\x1f62e") + , ("grimacing", "\x1f62c") + , ("neutral_face", "\x1f610") + , ("confused", "\x1f615") + , ("hushed", "\x1f62f") + , ("no_mouth", "\x1f636") + , ("innocent", "\x1f607") + , ("smirk", "\x1f60f") + , ("expressionless", "\x1f611") + , ("man_with_gua_pi_mao", "\x1f472") + , ("man_with_turban", "\x1f473") + , ("cop", "\x1f46e") + , ("construction_worker", "\x1f477") + , ("guardsman", "\x1f482") + , ("baby", "\x1f476") + , ("boy", "\x1f466") + , ("girl", "\x1f467") + , ("man", "\x1f468") + , ("woman", "\x1f469") + , ("older_man", "\x1f474") + , ("older_woman", "\x1f475") + , ("person_with_blond_hair", "\x1f471") + , ("angel", "\x1f47c") + , ("princess", "\x1f478") + , ("smiley_cat", "\x1f63a") + , ("smile_cat", "\x1f638") + , ("heart_eyes_cat", "\x1f63b") + , ("kissing_cat", "\x1f63d") + , ("smirk_cat", "\x1f63c") + , ("scream_cat", "\x1f640") + , ("crying_cat_face", "\x1f63f") + , ("joy_cat", "\x1f639") + , ("pouting_cat", "\x1f63e") + , ("japanese_ogre", "\x1f479") + , ("japanese_goblin", "\x1f47a") + , ("see_no_evil", "\x1f648") + , ("hear_no_evil", "\x1f649") + , ("speak_no_evil", "\x1f64a") + , ("skull", "\x1f480") + , ("alien", "\x1f47d") + , ("hankey", "\x1f4a9") + , ("poop", "\x1f4a9") + , ("shit", "\x1f4a9") + , ("fire", "\x1f525") + , ("sparkles", "\x2728") + , ("star2", "\x1f31f") + , ("dizzy", "\x1f4ab") + , ("boom", "\x1f4a5") + , ("collision", "\x1f4a5") + , ("anger", "\x1f4a2") + , ("sweat_drops", "\x1f4a6") + , ("droplet", "\x1f4a7") + , ("zzz", "\x1f4a4") + , ("dash", "\x1f4a8") + , ("ear", "\x1f442") + , ("eyes", "\x1f440") + , ("nose", "\x1f443") + , ("tongue", "\x1f445") + , ("lips", "\x1f444") + , ("+1", "\x1f44d") + , ("thumbsup", "\x1f44d") + , ("-1", "\x1f44e") + , ("thumbsdown", "\x1f44e") + , ("ok_hand", "\x1f44c") + , ("facepunch", "\x1f44a") + , ("punch", "\x1f44a") + , ("fist", "\x270a") + , ("v", "\x270c\fe0f") + , ("wave", "\x1f44b") + , ("hand", "\x270b") + , ("raised_hand", "\x270b") + , ("open_hands", "\x1f450") + , ("point_up_2", "\x1f446") + , ("point_down", "\x1f447") + , ("point_right", "\x1f449") + , ("point_left", "\x1f448") + , ("raised_hands", "\x1f64c") + , ("pray", "\x1f64f") + , ("point_up", "\x261d\fe0f") + , ("clap", "\x1f44f") + , ("muscle", "\x1f4aa") + , ("walking", "\x1f6b6") + , ("runner", "\x1f3c3") + , ("running", "\x1f3c3") + , ("dancer", "\x1f483") + , ("couple", "\x1f46b") + , ("family", "\x1f46a") + , ("two_men_holding_hands", "\x1f46c") + , ("two_women_holding_hands", "\x1f46d") + , ("couplekiss", "\x1f48f") + , ("couple_with_heart", "\x1f491") + , ("dancers", "\x1f46f") + , ("ok_woman", "\x1f646") + , ("no_good", "\x1f645") + , ("information_desk_person", "\x1f481") + , ("raising_hand", "\x1f64b") + , ("massage", "\x1f486") + , ("haircut", "\x1f487") + , ("nail_care", "\x1f485") + , ("bride_with_veil", "\x1f470") + , ("person_with_pouting_face", "\x1f64e") + , ("person_frowning", "\x1f64d") + , ("bow", "\x1f647") + , ("tophat", "\x1f3a9") + , ("crown", "\x1f451") + , ("womans_hat", "\x1f452") + , ("athletic_shoe", "\x1f45f") + , ("mans_shoe", "\x1f45e") + , ("shoe", "\x1f45e") + , ("sandal", "\x1f461") + , ("high_heel", "\x1f460") + , ("boot", "\x1f462") + , ("shirt", "\x1f455") + , ("tshirt", "\x1f455") + , ("necktie", "\x1f454") + , ("womans_clothes", "\x1f45a") + , ("dress", "\x1f457") + , ("running_shirt_with_sash", "\x1f3bd") + , ("jeans", "\x1f456") + , ("kimono", "\x1f458") + , ("bikini", "\x1f459") + , ("briefcase", "\x1f4bc") + , ("handbag", "\x1f45c") + , ("pouch", "\x1f45d") + , ("purse", "\x1f45b") + , ("eyeglasses", "\x1f453") + , ("ribbon", "\x1f380") + , ("closed_umbrella", "\x1f302") + , ("lipstick", "\x1f484") + , ("yellow_heart", "\x1f49b") + , ("blue_heart", "\x1f499") + , ("purple_heart", "\x1f49c") + , ("green_heart", "\x1f49a") + , ("heart", "\x2764\fe0f") + , ("broken_heart", "\x1f494") + , ("heartpulse", "\x1f497") + , ("heartbeat", "\x1f493") + , ("two_hearts", "\x1f495") + , ("sparkling_heart", "\x1f496") + , ("revolving_hearts", "\x1f49e") + , ("cupid", "\x1f498") + , ("love_letter", "\x1f48c") + , ("kiss", "\x1f48b") + , ("ring", "\x1f48d") + , ("gem", "\x1f48e") + , ("bust_in_silhouette", "\x1f464") + , ("busts_in_silhouette", "\x1f465") + , ("speech_balloon", "\x1f4ac") + , ("footprints", "\x1f463") + , ("thought_balloon", "\x1f4ad") + , ("dog", "\x1f436") + , ("wolf", "\x1f43a") + , ("cat", "\x1f431") + , ("mouse", "\x1f42d") + , ("hamster", "\x1f439") + , ("rabbit", "\x1f430") + , ("frog", "\x1f438") + , ("tiger", "\x1f42f") + , ("koala", "\x1f428") + , ("bear", "\x1f43b") + , ("pig", "\x1f437") + , ("pig_nose", "\x1f43d") + , ("cow", "\x1f42e") + , ("boar", "\x1f417") + , ("monkey_face", "\x1f435") + , ("monkey", "\x1f412") + , ("horse", "\x1f434") + , ("sheep", "\x1f411") + , ("elephant", "\x1f418") + , ("panda_face", "\x1f43c") + , ("penguin", "\x1f427") + , ("bird", "\x1f426") + , ("baby_chick", "\x1f424") + , ("hatched_chick", "\x1f425") + , ("hatching_chick", "\x1f423") + , ("chicken", "\x1f414") + , ("snake", "\x1f40d") + , ("turtle", "\x1f422") + , ("bug", "\x1f41b") + , ("bee", "\x1f41d") + , ("honeybee", "\x1f41d") + , ("ant", "\x1f41c") + , ("beetle", "\x1f41e") + , ("snail", "\x1f40c") + , ("octopus", "\x1f419") + , ("shell", "\x1f41a") + , ("tropical_fish", "\x1f420") + , ("fish", "\x1f41f") + , ("dolphin", "\x1f42c") + , ("flipper", "\x1f42c") + , ("whale", "\x1f433") + , ("whale2", "\x1f40b") + , ("cow2", "\x1f404") + , ("ram", "\x1f40f") + , ("rat", "\x1f400") + , ("water_buffalo", "\x1f403") + , ("tiger2", "\x1f405") + , ("rabbit2", "\x1f407") + , ("dragon", "\x1f409") + , ("racehorse", "\x1f40e") + , ("goat", "\x1f410") + , ("rooster", "\x1f413") + , ("dog2", "\x1f415") + , ("pig2", "\x1f416") + , ("mouse2", "\x1f401") + , ("ox", "\x1f402") + , ("dragon_face", "\x1f432") + , ("blowfish", "\x1f421") + , ("crocodile", "\x1f40a") + , ("camel", "\x1f42b") + , ("dromedary_camel", "\x1f42a") + , ("leopard", "\x1f406") + , ("cat2", "\x1f408") + , ("poodle", "\x1f429") + , ("feet", "\x1f43e") + , ("paw_prints", "\x1f43e") + , ("bouquet", "\x1f490") + , ("cherry_blossom", "\x1f338") + , ("tulip", "\x1f337") + , ("four_leaf_clover", "\x1f340") + , ("rose", "\x1f339") + , ("sunflower", "\x1f33b") + , ("hibiscus", "\x1f33a") + , ("maple_leaf", "\x1f341") + , ("leaves", "\x1f343") + , ("fallen_leaf", "\x1f342") + , ("herb", "\x1f33f") + , ("ear_of_rice", "\x1f33e") + , ("mushroom", "\x1f344") + , ("cactus", "\x1f335") + , ("palm_tree", "\x1f334") + , ("evergreen_tree", "\x1f332") + , ("deciduous_tree", "\x1f333") + , ("chestnut", "\x1f330") + , ("seedling", "\x1f331") + , ("blossom", "\x1f33c") + , ("globe_with_meridians", "\x1f310") + , ("sun_with_face", "\x1f31e") + , ("full_moon_with_face", "\x1f31d") + , ("new_moon_with_face", "\x1f31a") + , ("new_moon", "\x1f311") + , ("waxing_crescent_moon", "\x1f312") + , ("first_quarter_moon", "\x1f313") + , ("moon", "\x1f314") + , ("waxing_gibbous_moon", "\x1f314") + , ("full_moon", "\x1f315") + , ("waning_gibbous_moon", "\x1f316") + , ("last_quarter_moon", "\x1f317") + , ("waning_crescent_moon", "\x1f318") + , ("last_quarter_moon_with_face", "\x1f31c") + , ("first_quarter_moon_with_face", "\x1f31b") + , ("crescent_moon", "\x1f319") + , ("earth_africa", "\x1f30d") + , ("earth_americas", "\x1f30e") + , ("earth_asia", "\x1f30f") + , ("volcano", "\x1f30b") + , ("milky_way", "\x1f30c") + , ("stars", "\x1f320") + , ("star", "\x2b50") + , ("sunny", "\x2600\fe0f") + , ("partly_sunny", "\x26c5") + , ("cloud", "\x2601\fe0f") + , ("zap", "\x26a1") + , ("umbrella", "\x2614") + , ("snowflake", "\x2744\fe0f") + , ("snowman", "\x26c4") + , ("cyclone", "\x1f300") + , ("foggy", "\x1f301") + , ("rainbow", "\x1f308") + , ("ocean", "\x1f30a") + , ("bamboo", "\x1f38d") + , ("gift_heart", "\x1f49d") + , ("dolls", "\x1f38e") + , ("school_satchel", "\x1f392") + , ("mortar_board", "\x1f393") + , ("flags", "\x1f38f") + , ("fireworks", "\x1f386") + , ("sparkler", "\x1f387") + , ("wind_chime", "\x1f390") + , ("rice_scene", "\x1f391") + , ("jack_o_lantern", "\x1f383") + , ("ghost", "\x1f47b") + , ("santa", "\x1f385") + , ("christmas_tree", "\x1f384") + , ("gift", "\x1f381") + , ("tanabata_tree", "\x1f38b") + , ("tada", "\x1f389") + , ("confetti_ball", "\x1f38a") + , ("balloon", "\x1f388") + , ("crossed_flags", "\x1f38c") + , ("crystal_ball", "\x1f52e") + , ("movie_camera", "\x1f3a5") + , ("camera", "\x1f4f7") + , ("video_camera", "\x1f4f9") + , ("vhs", "\x1f4fc") + , ("cd", "\x1f4bf") + , ("dvd", "\x1f4c0") + , ("minidisc", "\x1f4bd") + , ("floppy_disk", "\x1f4be") + , ("computer", "\x1f4bb") + , ("iphone", "\x1f4f1") + , ("phone", "\x260e\fe0f") + , ("telephone", "\x260e\fe0f") + , ("telephone_receiver", "\x1f4de") + , ("pager", "\x1f4df") + , ("fax", "\x1f4e0") + , ("satellite", "\x1f4e1") + , ("tv", "\x1f4fa") + , ("radio", "\x1f4fb") + , ("loud_sound", "\x1f50a") + , ("sound", "\x1f509") + , ("speaker", "\x1f508") + , ("mute", "\x1f507") + , ("bell", "\x1f514") + , ("no_bell", "\x1f515") + , ("loudspeaker", "\x1f4e2") + , ("mega", "\x1f4e3") + , ("hourglass_flowing_sand", "\x23f3") + , ("hourglass", "\x231b") + , ("alarm_clock", "\x23f0") + , ("watch", "\x231a") + , ("unlock", "\x1f513") + , ("lock", "\x1f512") + , ("lock_with_ink_pen", "\x1f50f") + , ("closed_lock_with_key", "\x1f510") + , ("key", "\x1f511") + , ("mag_right", "\x1f50e") + , ("bulb", "\x1f4a1") + , ("flashlight", "\x1f526") + , ("high_brightness", "\x1f506") + , ("low_brightness", "\x1f505") + , ("electric_plug", "\x1f50c") + , ("battery", "\x1f50b") + , ("mag", "\x1f50d") + , ("bathtub", "\x1f6c1") + , ("bath", "\x1f6c0") + , ("shower", "\x1f6bf") + , ("toilet", "\x1f6bd") + , ("wrench", "\x1f527") + , ("nut_and_bolt", "\x1f529") + , ("hammer", "\x1f528") + , ("door", "\x1f6aa") + , ("smoking", "\x1f6ac") + , ("bomb", "\x1f4a3") + , ("gun", "\x1f52b") + , ("hocho", "\x1f52a") + , ("knife", "\x1f52a") + , ("pill", "\x1f48a") + , ("syringe", "\x1f489") + , ("moneybag", "\x1f4b0") + , ("yen", "\x1f4b4") + , ("dollar", "\x1f4b5") + , ("pound", "\x1f4b7") + , ("euro", "\x1f4b6") + , ("credit_card", "\x1f4b3") + , ("money_with_wings", "\x1f4b8") + , ("calling", "\x1f4f2") + , ("e-mail", "\x1f4e7") + , ("inbox_tray", "\x1f4e5") + , ("outbox_tray", "\x1f4e4") + , ("email", "\x2709\fe0f") + , ("envelope", "\x2709\fe0f") + , ("envelope_with_arrow", "\x1f4e9") + , ("incoming_envelope", "\x1f4e8") + , ("postal_horn", "\x1f4ef") + , ("mailbox", "\x1f4eb") + , ("mailbox_closed", "\x1f4ea") + , ("mailbox_with_mail", "\x1f4ec") + , ("mailbox_with_no_mail", "\x1f4ed") + , ("postbox", "\x1f4ee") + , ("package", "\x1f4e6") + , ("memo", "\x1f4dd") + , ("pencil", "\x1f4dd") + , ("page_facing_up", "\x1f4c4") + , ("page_with_curl", "\x1f4c3") + , ("bookmark_tabs", "\x1f4d1") + , ("bar_chart", "\x1f4ca") + , ("chart_with_upwards_trend", "\x1f4c8") + , ("chart_with_downwards_trend", "\x1f4c9") + , ("scroll", "\x1f4dc") + , ("clipboard", "\x1f4cb") + , ("date", "\x1f4c5") + , ("calendar", "\x1f4c6") + , ("card_index", "\x1f4c7") + , ("file_folder", "\x1f4c1") + , ("open_file_folder", "\x1f4c2") + , ("scissors", "\x2702\fe0f") + , ("pushpin", "\x1f4cc") + , ("paperclip", "\x1f4ce") + , ("black_nib", "\x2712\fe0f") + , ("pencil2", "\x270f\fe0f") + , ("straight_ruler", "\x1f4cf") + , ("triangular_ruler", "\x1f4d0") + , ("closed_book", "\x1f4d5") + , ("green_book", "\x1f4d7") + , ("blue_book", "\x1f4d8") + , ("orange_book", "\x1f4d9") + , ("notebook", "\x1f4d3") + , ("notebook_with_decorative_cover", "\x1f4d4") + , ("ledger", "\x1f4d2") + , ("books", "\x1f4da") + , ("book", "\x1f4d6") + , ("open_book", "\x1f4d6") + , ("bookmark", "\x1f516") + , ("name_badge", "\x1f4db") + , ("microscope", "\x1f52c") + , ("telescope", "\x1f52d") + , ("newspaper", "\x1f4f0") + , ("art", "\x1f3a8") + , ("clapper", "\x1f3ac") + , ("microphone", "\x1f3a4") + , ("headphones", "\x1f3a7") + , ("musical_score", "\x1f3bc") + , ("musical_note", "\x1f3b5") + , ("notes", "\x1f3b6") + , ("musical_keyboard", "\x1f3b9") + , ("violin", "\x1f3bb") + , ("trumpet", "\x1f3ba") + , ("saxophone", "\x1f3b7") + , ("guitar", "\x1f3b8") + , ("space_invader", "\x1f47e") + , ("video_game", "\x1f3ae") + , ("black_joker", "\x1f0cf") + , ("flower_playing_cards", "\x1f3b4") + , ("mahjong", "\x1f004") + , ("game_die", "\x1f3b2") + , ("dart", "\x1f3af") + , ("football", "\x1f3c8") + , ("basketball", "\x1f3c0") + , ("soccer", "\x26bd") + , ("baseball", "\x26be\fe0f") + , ("tennis", "\x1f3be") + , ("8ball", "\x1f3b1") + , ("rugby_football", "\x1f3c9") + , ("bowling", "\x1f3b3") + , ("golf", "\x26f3") + , ("mountain_bicyclist", "\x1f6b5") + , ("bicyclist", "\x1f6b4") + , ("checkered_flag", "\x1f3c1") + , ("horse_racing", "\x1f3c7") + , ("trophy", "\x1f3c6") + , ("ski", "\x1f3bf") + , ("snowboarder", "\x1f3c2") + , ("swimmer", "\x1f3ca") + , ("surfer", "\x1f3c4") + , ("fishing_pole_and_fish", "\x1f3a3") + , ("coffee", "\x2615") + , ("tea", "\x1f375") + , ("sake", "\x1f376") + , ("baby_bottle", "\x1f37c") + , ("beer", "\x1f37a") + , ("beers", "\x1f37b") + , ("cocktail", "\x1f378") + , ("tropical_drink", "\x1f379") + , ("wine_glass", "\x1f377") + , ("fork_and_knife", "\x1f374") + , ("pizza", "\x1f355") + , ("hamburger", "\x1f354") + , ("fries", "\x1f35f") + , ("poultry_leg", "\x1f357") + , ("meat_on_bone", "\x1f356") + , ("spaghetti", "\x1f35d") + , ("curry", "\x1f35b") + , ("fried_shrimp", "\x1f364") + , ("bento", "\x1f371") + , ("sushi", "\x1f363") + , ("fish_cake", "\x1f365") + , ("rice_ball", "\x1f359") + , ("rice_cracker", "\x1f358") + , ("rice", "\x1f35a") + , ("ramen", "\x1f35c") + , ("stew", "\x1f372") + , ("oden", "\x1f362") + , ("dango", "\x1f361") + , ("egg", "\x1f373") + , ("bread", "\x1f35e") + , ("doughnut", "\x1f369") + , ("custard", "\x1f36e") + , ("icecream", "\x1f366") + , ("ice_cream", "\x1f368") + , ("shaved_ice", "\x1f367") + , ("birthday", "\x1f382") + , ("cake", "\x1f370") + , ("cookie", "\x1f36a") + , ("chocolate_bar", "\x1f36b") + , ("candy", "\x1f36c") + , ("lollipop", "\x1f36d") + , ("honey_pot", "\x1f36f") + , ("apple", "\x1f34e") + , ("green_apple", "\x1f34f") + , ("tangerine", "\x1f34a") + , ("lemon", "\x1f34b") + , ("cherries", "\x1f352") + , ("grapes", "\x1f347") + , ("watermelon", "\x1f349") + , ("strawberry", "\x1f353") + , ("peach", "\x1f351") + , ("melon", "\x1f348") + , ("banana", "\x1f34c") + , ("pear", "\x1f350") + , ("pineapple", "\x1f34d") + , ("sweet_potato", "\x1f360") + , ("eggplant", "\x1f346") + , ("tomato", "\x1f345") + , ("corn", "\x1f33d") + , ("house", "\x1f3e0") + , ("house_with_garden", "\x1f3e1") + , ("school", "\x1f3eb") + , ("office", "\x1f3e2") + , ("post_office", "\x1f3e3") + , ("hospital", "\x1f3e5") + , ("bank", "\x1f3e6") + , ("convenience_store", "\x1f3ea") + , ("love_hotel", "\x1f3e9") + , ("hotel", "\x1f3e8") + , ("wedding", "\x1f492") + , ("church", "\x26ea") + , ("department_store", "\x1f3ec") + , ("european_post_office", "\x1f3e4") + , ("city_sunrise", "\x1f307") + , ("city_sunset", "\x1f306") + , ("japanese_castle", "\x1f3ef") + , ("european_castle", "\x1f3f0") + , ("tent", "\x26fa") + , ("factory", "\x1f3ed") + , ("tokyo_tower", "\x1f5fc") + , ("japan", "\x1f5fe") + , ("mount_fuji", "\x1f5fb") + , ("sunrise_over_mountains", "\x1f304") + , ("sunrise", "\x1f305") + , ("night_with_stars", "\x1f303") + , ("statue_of_liberty", "\x1f5fd") + , ("bridge_at_night", "\x1f309") + , ("carousel_horse", "\x1f3a0") + , ("ferris_wheel", "\x1f3a1") + , ("fountain", "\x26f2") + , ("roller_coaster", "\x1f3a2") + , ("ship", "\x1f6a2") + , ("boat", "\x26f5") + , ("sailboat", "\x26f5") + , ("speedboat", "\x1f6a4") + , ("rowboat", "\x1f6a3") + , ("anchor", "\x2693") + , ("rocket", "\x1f680") + , ("airplane", "\x2708\fe0f") + , ("seat", "\x1f4ba") + , ("helicopter", "\x1f681") + , ("steam_locomotive", "\x1f682") + , ("tram", "\x1f68a") + , ("station", "\x1f689") + , ("mountain_railway", "\x1f69e") + , ("train2", "\x1f686") + , ("bullettrain_side", "\x1f684") + , ("bullettrain_front", "\x1f685") + , ("light_rail", "\x1f688") + , ("metro", "\x1f687") + , ("monorail", "\x1f69d") + , ("train", "\x1f68b") + , ("railway_car", "\x1f683") + , ("trolleybus", "\x1f68e") + , ("bus", "\x1f68c") + , ("oncoming_bus", "\x1f68d") + , ("blue_car", "\x1f699") + , ("oncoming_automobile", "\x1f698") + , ("car", "\x1f697") + , ("red_car", "\x1f697") + , ("taxi", "\x1f695") + , ("oncoming_taxi", "\x1f696") + , ("articulated_lorry", "\x1f69b") + , ("truck", "\x1f69a") + , ("rotating_light", "\x1f6a8") + , ("police_car", "\x1f693") + , ("oncoming_police_car", "\x1f694") + , ("fire_engine", "\x1f692") + , ("ambulance", "\x1f691") + , ("minibus", "\x1f690") + , ("bike", "\x1f6b2") + , ("aerial_tramway", "\x1f6a1") + , ("suspension_railway", "\x1f69f") + , ("mountain_cableway", "\x1f6a0") + , ("tractor", "\x1f69c") + , ("barber", "\x1f488") + , ("busstop", "\x1f68f") + , ("ticket", "\x1f3ab") + , ("vertical_traffic_light", "\x1f6a6") + , ("traffic_light", "\x1f6a5") + , ("warning", "\x26a0\fe0f") + , ("construction", "\x1f6a7") + , ("beginner", "\x1f530") + , ("fuelpump", "\x26fd") + , ("izakaya_lantern", "\x1f3ee") + , ("lantern", "\x1f3ee") + , ("slot_machine", "\x1f3b0") + , ("hotsprings", "\x2668\fe0f") + , ("moyai", "\x1f5ff") + , ("circus_tent", "\x1f3aa") + , ("performing_arts", "\x1f3ad") + , ("round_pushpin", "\x1f4cd") + , ("triangular_flag_on_post", "\x1f6a9") + , ("jp", "\x1f1ef\1f1f5") + , ("kr", "\x1f1f0\1f1f7") + , ("de", "\x1f1e9\1f1ea") + , ("cn", "\x1f1e8\1f1f3") + , ("us", "\x1f1fa\1f1f8") + , ("fr", "\x1f1eb\1f1f7") + , ("es", "\x1f1ea\1f1f8") + , ("it", "\x1f1ee\1f1f9") + , ("ru", "\x1f1f7\1f1fa") + , ("gb", "\x1f1ec\1f1e7") + , ("uk", "\x1f1ec\1f1e7") + , ("one", "1\fe0f\20e3") + , ("two", "2\fe0f\20e3") + , ("three", "3\fe0f\20e3") + , ("four", "4\fe0f\20e3") + , ("five", "5\fe0f\20e3") + , ("six", "6\fe0f\20e3") + , ("seven", "7\fe0f\20e3") + , ("eight", "8\fe0f\20e3") + , ("nine", "9\fe0f\20e3") + , ("zero", "0\fe0f\20e3") + , ("keycap_ten", "\x1f51f") + , ("hash", "#\fe0f\20e3") + , ("symbols", "\x1f523") + , ("arrow_up", "\x2b06\fe0f") + , ("arrow_down", "\x2b07\fe0f") + , ("arrow_left", "\x2b05\fe0f") + , ("arrow_right", "\x27a1\fe0f") + , ("capital_abcd", "\x1f520") + , ("abcd", "\x1f521") + , ("abc", "\x1f524") + , ("arrow_upper_right", "\x2197\fe0f") + , ("arrow_upper_left", "\x2196\fe0f") + , ("arrow_lower_right", "\x2198\fe0f") + , ("arrow_lower_left", "\x2199\fe0f") + , ("left_right_arrow", "\x2194\fe0f") + , ("arrow_up_down", "\x2195\fe0f") + , ("arrows_counterclockwise", "\x1f504") + , ("arrow_backward", "\x25c0\fe0f") + , ("arrow_forward", "\x25b6\fe0f") + , ("arrow_up_small", "\x1f53c") + , ("arrow_down_small", "\x1f53d") + , ("leftwards_arrow_with_hook", "\x21a9\fe0f") + , ("arrow_right_hook", "\x21aa\fe0f") + , ("information_source", "\x2139\fe0f") + , ("rewind", "\x23ea") + , ("fast_forward", "\x23e9") + , ("arrow_double_up", "\x23eb") + , ("arrow_double_down", "\x23ec") + , ("arrow_heading_down", "\x2935\fe0f") + , ("arrow_heading_up", "\x2934\fe0f") + , ("ok", "\x1f197") + , ("twisted_rightwards_arrows", "\x1f500") + , ("repeat", "\x1f501") + , ("repeat_one", "\x1f502") + , ("new", "\x1f195") + , ("up", "\x1f199") + , ("cool", "\x1f192") + , ("free", "\x1f193") + , ("ng", "\x1f196") + , ("signal_strength", "\x1f4f6") + , ("cinema", "\x1f3a6") + , ("koko", "\x1f201") + , ("u6307", "\x1f22f") + , ("u7a7a", "\x1f233") + , ("u6e80", "\x1f235") + , ("u5408", "\x1f234") + , ("u7981", "\x1f232") + , ("ideograph_advantage", "\x1f250") + , ("u5272", "\x1f239") + , ("u55b6", "\x1f23a") + , ("u6709", "\x1f236") + , ("u7121", "\x1f21a") + , ("restroom", "\x1f6bb") + , ("mens", "\x1f6b9") + , ("womens", "\x1f6ba") + , ("baby_symbol", "\x1f6bc") + , ("wc", "\x1f6be") + , ("potable_water", "\x1f6b0") + , ("put_litter_in_its_place", "\x1f6ae") + , ("parking", "\x1f17f\fe0f") + , ("wheelchair", "\x267f") + , ("no_smoking", "\x1f6ad") + , ("u6708", "\x1f237\fe0f") + , ("u7533", "\x1f238") + , ("sa", "\x1f202\fe0f") + , ("m", "\x24c2\fe0f") + , ("passport_control", "\x1f6c2") + , ("baggage_claim", "\x1f6c4") + , ("left_luggage", "\x1f6c5") + , ("customs", "\x1f6c3") + , ("accept", "\x1f251") + , ("secret", "\x3299\fe0f") + , ("congratulations", "\x3297\fe0f") + , ("cl", "\x1f191") + , ("sos", "\x1f198") + , ("id", "\x1f194") + , ("no_entry_sign", "\x1f6ab") + , ("underage", "\x1f51e") + , ("no_mobile_phones", "\x1f4f5") + , ("do_not_litter", "\x1f6af") + , ("non-potable_water", "\x1f6b1") + , ("no_bicycles", "\x1f6b3") + , ("no_pedestrians", "\x1f6b7") + , ("children_crossing", "\x1f6b8") + , ("no_entry", "\x26d4") + , ("eight_spoked_asterisk", "\x2733\fe0f") + , ("sparkle", "\x2747\fe0f") + , ("negative_squared_cross_mark", "\x274e") + , ("white_check_mark", "\x2705") + , ("eight_pointed_black_star", "\x2734\fe0f") + , ("heart_decoration", "\x1f49f") + , ("vs", "\x1f19a") + , ("vibration_mode", "\x1f4f3") + , ("mobile_phone_off", "\x1f4f4") + , ("a", "\x1f170\fe0f") + , ("b", "\x1f171\fe0f") + , ("ab", "\x1f18e") + , ("o2", "\x1f17e\fe0f") + , ("diamond_shape_with_a_dot_inside", "\x1f4a0") + , ("loop", "\x27bf") + , ("recycle", "\x267b\fe0f") + , ("aries", "\x2648") + , ("taurus", "\x2649") + , ("gemini", "\x264a") + , ("cancer", "\x264b") + , ("leo", "\x264c") + , ("virgo", "\x264d") + , ("libra", "\x264e") + , ("scorpius", "\x264f") + , ("sagittarius", "\x2650") + , ("capricorn", "\x2651") + , ("aquarius", "\x2652") + , ("pisces", "\x2653") + , ("ophiuchus", "\x26ce") + , ("six_pointed_star", "\x1f52f") + , ("atm", "\x1f3e7") + , ("chart", "\x1f4b9") + , ("heavy_dollar_sign", "\x1f4b2") + , ("currency_exchange", "\x1f4b1") + , ("copyright", "©\fe0f") + , ("registered", "®\fe0f") + , ("tm", "\x2122\fe0f") + , ("x", "\x274c") + , ("bangbang", "\x203c\fe0f") + , ("interrobang", "\x2049\fe0f") + , ("exclamation", "\x2757") + , ("heavy_exclamation_mark", "\x2757") + , ("question", "\x2753") + , ("grey_exclamation", "\x2755") + , ("grey_question", "\x2754") + , ("o", "\x2b55") + , ("top", "\x1f51d") + , ("end", "\x1f51a") + , ("back", "\x1f519") + , ("on", "\x1f51b") + , ("soon", "\x1f51c") + , ("arrows_clockwise", "\x1f503") + , ("clock12", "\x1f55b") + , ("clock1230", "\x1f567") + , ("clock1", "\x1f550") + , ("clock130", "\x1f55c") + , ("clock2", "\x1f551") + , ("clock230", "\x1f55d") + , ("clock3", "\x1f552") + , ("clock330", "\x1f55e") + , ("clock4", "\x1f553") + , ("clock430", "\x1f55f") + , ("clock5", "\x1f554") + , ("clock530", "\x1f560") + , ("clock6", "\x1f555") + , ("clock7", "\x1f556") + , ("clock8", "\x1f557") + , ("clock9", "\x1f558") + , ("clock10", "\x1f559") + , ("clock11", "\x1f55a") + , ("clock630", "\x1f561") + , ("clock730", "\x1f562") + , ("clock830", "\x1f563") + , ("clock930", "\x1f564") + , ("clock1030", "\x1f565") + , ("clock1130", "\x1f566") + , ("heavy_multiplication_x", "\x2716\fe0f") + , ("heavy_plus_sign", "\x2795") + , ("heavy_minus_sign", "\x2796") + , ("heavy_division_sign", "\x2797") + , ("spades", "\x2660\fe0f") + , ("hearts", "\x2665\fe0f") + , ("clubs", "\x2663\fe0f") + , ("diamonds", "\x2666\fe0f") + , ("white_flower", "\x1f4ae") + , ("heavy_check_mark", "\x2714\fe0f") + , ("ballot_box_with_check", "\x2611\fe0f") + , ("radio_button", "\x1f518") + , ("link", "\x1f517") + , ("curly_loop", "\x27b0") + , ("wavy_dash", "\x3030\fe0f") + , ("part_alternation_mark", "\x303d\fe0f") + , ("trident", "\x1f531") + , ("black_medium_square", "\x25fc\fe0f") + , ("white_medium_square", "\x25fb\fe0f") + , ("black_medium_small_square", "\x25fe") + , ("white_medium_small_square", "\x25fd") + , ("black_small_square", "\x25aa\fe0f") + , ("white_small_square", "\x25ab\fe0f") + , ("small_red_triangle", "\x1f53a") + , ("black_square_button", "\x1f532") + , ("white_square_button", "\x1f533") + , ("black_circle", "\x26ab") + , ("white_circle", "\x26aa") + , ("red_circle", "\x1f534") + , ("large_blue_circle", "\x1f535") + , ("small_red_triangle_down", "\x1f53b") + , ("white_large_square", "\x2b1c") + , ("black_large_square", "\x2b1b") + , ("large_orange_diamond", "\x1f536") + , ("large_blue_diamond", "\x1f537") + , ("small_orange_diamond", "\x1f538") + , ("small_blue_diamond", "\x1f539") + ] diff --git a/src/Text/Pandoc/Error.hs b/src/Text/Pandoc/Error.hs index 73d1e8f08..0a4e08175 100644 --- a/src/Text/Pandoc/Error.hs +++ b/src/Text/Pandoc/Error.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-} {- Copyright (C) 2006-2015 John MacFarlane <jgm@berkeley.edu> @@ -33,6 +34,9 @@ module Text.Pandoc.Error (PandocError(..), handleError) where import Text.Parsec.Error import Text.Parsec.Pos hiding (Line) import Text.Pandoc.Compat.Except +import GHC.Generics (Generic) +import Data.Generics (Typeable) +import Control.Exception (Exception) type Input = String @@ -40,8 +44,9 @@ data PandocError = -- | Generic parse failure ParseFailure String -- | Error thrown by a Parsec parser | ParsecError Input ParseError - deriving (Show) + deriving (Show, Typeable, Generic) +instance Exception PandocError instance Error PandocError where strMsg = ParseFailure diff --git a/src/Text/Pandoc/ImageSize.hs b/src/Text/Pandoc/ImageSize.hs index 7489afc8e..5c775c908 100644 --- a/src/Text/Pandoc/ImageSize.hs +++ b/src/Text/Pandoc/ImageSize.hs @@ -49,7 +49,6 @@ import Data.ByteString (ByteString, unpack) import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy as BL import Data.Char (isDigit) -import Control.Applicative import Control.Monad import Data.Bits import Data.Binary diff --git a/src/Text/Pandoc/MediaBag.hs b/src/Text/Pandoc/MediaBag.hs index 1246cdc8f..eea25fadf 100644 --- a/src/Text/Pandoc/MediaBag.hs +++ b/src/Text/Pandoc/MediaBag.hs @@ -37,10 +37,10 @@ module Text.Pandoc.MediaBag ( extractMediaBag ) where import System.FilePath +import qualified System.FilePath.Posix as Posix import System.Directory (createDirectoryIfMissing) import qualified Data.Map as M import qualified Data.ByteString.Lazy as BL -import Data.Monoid (Monoid) import Control.Monad (when) import Text.Pandoc.MIME (MimeType, getMimeTypeDef) import qualified Text.Pandoc.UTF8 as UTF8 @@ -67,7 +67,7 @@ insertMedia :: FilePath -- ^ relative path and canonical name of resource -> MediaBag -> MediaBag insertMedia fp mbMime contents (MediaBag mediamap) = - MediaBag (M.insert (splitPath fp) (mime, contents) mediamap) + MediaBag (M.insert (splitDirectories fp) (mime, contents) mediamap) where mime = fromMaybe fallback mbMime fallback = case takeExtension fp of ".gz" -> getMimeTypeDef $ dropExtension fp @@ -77,14 +77,14 @@ insertMedia fp mbMime contents (MediaBag mediamap) = lookupMedia :: FilePath -> MediaBag -> Maybe (MimeType, BL.ByteString) -lookupMedia fp (MediaBag mediamap) = M.lookup (splitPath fp) mediamap +lookupMedia fp (MediaBag mediamap) = M.lookup (splitDirectories fp) mediamap -- | Get a list of the file paths stored in a 'MediaBag', with -- their corresponding mime types and the lengths in bytes of the contents. mediaDirectory :: MediaBag -> [(String, MimeType, Int)] mediaDirectory (MediaBag mediamap) = M.foldWithKey (\fp (mime,contents) -> - (((joinPath fp), mime, fromIntegral $ BL.length contents):)) [] mediamap + (((Posix.joinPath fp), mime, fromIntegral $ BL.length contents):)) [] mediamap -- | Extract contents of MediaBag to a given directory. Print informational -- messages if 'verbose' is true. @@ -95,7 +95,7 @@ extractMediaBag :: Bool extractMediaBag verbose dir (MediaBag mediamap) = do sequence_ $ M.foldWithKey (\fp (_ ,contents) -> - ((writeMedia verbose dir (joinPath fp, contents)):)) [] mediamap + ((writeMedia verbose dir (Posix.joinPath fp, contents)):)) [] mediamap writeMedia :: Bool -> FilePath -> (FilePath, BL.ByteString) -> IO () writeMedia verbose dir (subpath, bs) = do diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs index 060fa6c05..1dc3bad3a 100644 --- a/src/Text/Pandoc/Options.hs +++ b/src/Text/Pandoc/Options.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-} {- Copyright (C) 2012-2015 John MacFarlane <jgm@berkeley.edu> @@ -52,9 +52,9 @@ import qualified Data.Set as Set import Data.Default import Text.Pandoc.Highlighting (Style, pygments) import Text.Pandoc.MediaBag (MediaBag) -import Data.Monoid import Data.Data (Data) import Data.Typeable (Typeable) +import GHC.Generics (Generic) -- | Individually selectable syntax extensions. data Extension = @@ -107,6 +107,7 @@ data Extension = | Ext_ignore_line_breaks -- ^ Newlines in paragraphs are ignored | Ext_literate_haskell -- ^ Enable literate Haskell conventions | Ext_abbreviations -- ^ PHP markdown extra abbreviation definitions + | Ext_emoji -- ^ Support emoji like :smile: | Ext_auto_identifiers -- ^ Automatic identifiers for headers | Ext_ascii_identifiers -- ^ ascii-only identifiers for headers | Ext_header_attributes -- ^ Explicit header attributes {#id .class k=v} @@ -115,7 +116,7 @@ data Extension = | Ext_line_blocks -- ^ RST style line blocks | Ext_epub_html_exts -- ^ Recognise the EPUB extended version of HTML | Ext_shortcut_reference_links -- ^ Shortcut reference links - deriving (Show, Read, Enum, Eq, Ord, Bounded, Data, Typeable) + deriving (Show, Read, Enum, Eq, Ord, Bounded, Data, Typeable, Generic) pandocExtensions :: Set Extension pandocExtensions = Set.fromList @@ -207,6 +208,7 @@ githubMarkdownExtensions = Set.fromList , Ext_intraword_underscores , Ext_strikeout , Ext_hard_line_breaks + , Ext_emoji , Ext_lists_without_preceding_blankline , Ext_shortcut_reference_links ] @@ -227,6 +229,15 @@ multimarkdownExtensions = Set.fromList , Ext_implicit_header_references , Ext_auto_identifiers , Ext_mmd_header_identifiers + , Ext_implicit_figures + -- Note: MMD's syntax for superscripts and subscripts + -- is a bit more permissive than pandoc's, allowing + -- e^2 and a~1 instead of e^2^ and a~1~, so even with + -- these options we don't have full support for MMD + -- superscripts and subscripts, but there's no reason + -- not to include these: + , Ext_superscript + , Ext_subscript ] strictExtensions :: Set Extension @@ -251,7 +262,7 @@ data ReaderOptions = ReaderOptions{ , readerDefaultImageExtension :: String -- ^ Default extension for images , readerTrace :: Bool -- ^ Print debugging info , readerTrackChanges :: TrackChanges -} deriving (Show, Read, Data, Typeable) +} deriving (Show, Read, Data, Typeable, Generic) instance Default ReaderOptions where def = ReaderOptions{ @@ -273,7 +284,7 @@ instance Default ReaderOptions -- Writer options -- -data EPUBVersion = EPUB2 | EPUB3 deriving (Eq, Show, Read, Data, Typeable) +data EPUBVersion = EPUB2 | EPUB3 deriving (Eq, Show, Read, Data, Typeable, Generic) data HTMLMathMethod = PlainMath | LaTeXMathML (Maybe String) -- url of LaTeXMathML.js @@ -283,18 +294,18 @@ data HTMLMathMethod = PlainMath | MathML (Maybe String) -- url of MathMLinHTML.js | MathJax String -- url of MathJax.js | KaTeX String String -- url of stylesheet and katex.js - deriving (Show, Read, Eq, Data, Typeable) + deriving (Show, Read, Eq, Data, Typeable, Generic) data CiteMethod = Citeproc -- use citeproc to render them | Natbib -- output natbib cite commands | Biblatex -- output biblatex cite commands - deriving (Show, Read, Eq, Data, Typeable) + deriving (Show, Read, Eq, Data, Typeable, Generic) -- | Methods for obfuscating email addresses in HTML. data ObfuscationMethod = NoObfuscation | ReferenceObfuscation | JavascriptObfuscation - deriving (Show, Read, Eq, Data, Typeable) + deriving (Show, Read, Eq, Data, Typeable, Generic) -- | Varieties of HTML slide shows. data HTMLSlideVariant = S5Slides @@ -303,13 +314,13 @@ data HTMLSlideVariant = S5Slides | DZSlides | RevealJsSlides | NoSlides - deriving (Show, Read, Eq, Data, Typeable) + deriving (Show, Read, Eq, Data, Typeable, Generic) -- | Options for accepting or rejecting MS Word track-changes. data TrackChanges = AcceptChanges | RejectChanges | AllChanges - deriving (Show, Read, Eq, Data, Typeable) + deriving (Show, Read, Eq, Data, Typeable, Generic) -- | Options for writers data WriterOptions = WriterOptions @@ -357,7 +368,7 @@ data WriterOptions = WriterOptions , writerMediaBag :: MediaBag -- ^ Media collected by docx or epub reader , writerVerbose :: Bool -- ^ Verbose debugging output , writerLaTeXArgs :: [String] -- ^ Flags to pass to latex-engine - } deriving (Show, Data, Typeable) + } deriving (Show, Data, Typeable, Generic) instance Default WriterOptions where def = WriterOptions { writerStandalone = False diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs index 25a90f08f..38e8b8a9d 100644 --- a/src/Text/Pandoc/PDF.hs +++ b/src/Text/Pandoc/PDF.hs @@ -34,6 +34,7 @@ import Data.ByteString.Lazy (ByteString) import qualified Data.ByteString.Lazy as B import qualified Data.ByteString.Lazy.Char8 as BC import qualified Data.ByteString as BS +import Text.Pandoc.Compat.Monoid ((<>)) import System.Exit (ExitCode (..)) import System.FilePath import System.IO (stderr, stdout) @@ -42,13 +43,12 @@ import Data.Digest.Pure.SHA (showDigest, sha1) import System.Environment import Control.Monad (unless, when, (<=<)) import qualified Control.Exception as E -import Control.Applicative ((<$)) import Data.List (isInfixOf) import Data.Maybe (fromMaybe) import qualified Text.Pandoc.UTF8 as UTF8 import Text.Pandoc.Definition import Text.Pandoc.Walk (walkM) -import Text.Pandoc.Shared (fetchItem', warn, withTempDir) +import Text.Pandoc.Shared (fetchItem', warn, withTempDir, inDirectory) import Text.Pandoc.Options (WriterOptions(..)) import Text.Pandoc.MIME (extensionFromMimeType, getMimeType) import Text.Pandoc.Process (pipeProcess) @@ -72,7 +72,9 @@ makePDF program writer opts doc = withTempDir "tex2pdf." $ \tmpdir -> do doc' <- handleImages opts tmpdir doc let source = writer opts doc' args = writerLaTeXArgs opts - tex2pdf' (writerVerbose opts) args tmpdir program source + case program of + "context" -> context2pdf (writerVerbose opts) tmpdir source + _ -> tex2pdf' (writerVerbose opts) args tmpdir program source handleImages :: WriterOptions -> FilePath -- ^ temp dir to store images @@ -156,9 +158,6 @@ tex2pdf' verbose args tmpDir program source = do (ExitSuccess, Nothing) -> return $ Left "" (ExitSuccess, Just pdf) -> return $ Right pdf -(<>) :: ByteString -> ByteString -> ByteString -(<>) = B.append - -- parsing output extractMsg :: ByteString -> ByteString @@ -170,6 +169,14 @@ extractMsg log' = do then log' else BC.unlines (msg'' ++ lineno) +extractConTeXtMsg :: ByteString -> ByteString +extractConTeXtMsg log' = do + let msg' = take 1 $ + dropWhile (not . ("tex error" `BC.isPrefixOf`)) $ BC.lines log' + if null msg' + then log' + else BC.unlines msg' + -- running tex programs -- Run a TeX program on an input bytestring and return (exit code, @@ -228,3 +235,55 @@ runTeXProgram verbose program args runNumber numRuns tmpDir source = do else return Nothing return (exit, out <> err, pdf) +context2pdf :: Bool -- ^ Verbose output + -> FilePath -- ^ temp directory for output + -> String -- ^ ConTeXt source + -> IO (Either ByteString ByteString) +context2pdf verbose tmpDir source = inDirectory tmpDir $ do + let file = "input.tex" + UTF8.writeFile file source +#ifdef _WINDOWS + -- note: we want / even on Windows, for TexLive + let tmpDir' = changePathSeparators tmpDir +#else + let tmpDir' = tmpDir +#endif + let programArgs = ["--batchmode"] ++ [file] + env' <- getEnvironment + let sep = searchPathSeparator:[] + let texinputs = maybe (".." ++ sep) ((".." ++ sep) ++) + $ lookup "TEXINPUTS" env' + let env'' = ("TEXINPUTS", texinputs) : + [(k,v) | (k,v) <- env', k /= "TEXINPUTS"] + when verbose $ do + putStrLn $ "[makePDF] temp dir:" + putStrLn tmpDir' + putStrLn $ "[makePDF] Command line:" + putStrLn $ "context" ++ " " ++ unwords (map show programArgs) + putStr "\n" + putStrLn $ "[makePDF] Environment:" + mapM_ print env'' + putStr "\n" + putStrLn $ "[makePDF] Contents of " ++ file ++ ":" + B.readFile file >>= B.putStr + putStr "\n" + (exit, out, err) <- pipeProcess (Just env'') "context" programArgs BL.empty + when verbose $ do + B.hPutStr stdout out + B.hPutStr stderr err + putStr "\n" + let pdfFile = replaceExtension file ".pdf" + pdfExists <- doesFileExist pdfFile + mbPdf <- if pdfExists + -- We read PDF as a strict bytestring to make sure that the + -- temp directory is removed on Windows. + -- See https://github.com/jgm/pandoc/issues/1192. + then (Just . B.fromChunks . (:[])) `fmap` BS.readFile pdfFile + else return Nothing + let log' = out <> err + case (exit, mbPdf) of + (ExitFailure _, _) -> do + let logmsg = extractConTeXtMsg log' + return $ Left logmsg + (ExitSuccess, Nothing) -> return $ Left "" + (ExitSuccess, Just pdf) -> return $ Right pdf diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 6b9565a51..c79c8fffc 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -186,12 +186,11 @@ import Text.TeXMath.Readers.TeX.Macros (applyMacros, Macro, parseMacroDefinitions) import Text.Pandoc.Compat.TagSoupEntity ( lookupEntity ) import Text.Pandoc.Asciify (toAsciiChar) +import Text.Pandoc.Compat.Monoid ((<>)) import Data.Default import qualified Data.Set as Set import Control.Monad.Reader import Control.Monad.Identity -import Control.Applicative ((<$>), (<*>), (*>), (<*), (<$), Applicative) -import Data.Monoid import Data.Maybe (catMaybes) import Text.Pandoc.Error @@ -1213,7 +1212,8 @@ citeKey = try $ do firstChar <- alphaNum <|> char '_' <|> char '*' -- @* for wildcard in nocite let regchar = satisfy (\c -> isAlphaNum c || c == '_') let internal p = try $ p <* lookAhead regchar - rest <- many $ regchar <|> internal (oneOf ":.#$%&-+?<>~/") + rest <- many $ regchar <|> internal (oneOf ":.#$%&-+?<>~/") <|> + (oneOf ":/" <* lookAhead (char '/')) let key = firstChar:rest return (suppress_author, key) diff --git a/src/Text/Pandoc/Pretty.hs b/src/Text/Pandoc/Pretty.hs index bb0091ca5..88b7dd09e 100644 --- a/src/Text/Pandoc/Pretty.hs +++ b/src/Text/Pandoc/Pretty.hs @@ -77,10 +77,10 @@ where import Data.Sequence (Seq, fromList, (<|), singleton, mapWithIndex, viewl, ViewL(..)) import Data.Foldable (toList) import Data.List (intercalate) -import Data.Monoid import Data.String import Control.Monad.State import Data.Char (isSpace) +import Text.Pandoc.Compat.Monoid ((<>)) data RenderState a = RenderState{ output :: [a] -- ^ In reverse order diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index db438e26d..e8fe92e27 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -8,16 +8,15 @@ import Text.XML.Light import Text.Pandoc.Compat.TagSoupEntity (lookupEntity) import Data.Either (rights) import Data.Generics -import Data.Monoid import Data.Char (isSpace) import Control.Monad.State -import Control.Applicative ((<$>)) import Data.List (intersperse) import Data.Maybe (fromMaybe) import Text.TeXMath (readMathML, writeTeX) import Text.Pandoc.Error (PandocError) import Text.Pandoc.Compat.Except import Data.Default +import Data.Foldable (asum) {- @@ -194,7 +193,7 @@ List of all DocBook tags, with [x] indicating implemented, [x] indexterm - A wrapper for terms to be indexed [x] info - A wrapper for information about a component or other block. (DocBook v5) [x] informalequation - A displayed mathematical equation without a title -[ ] informalexample - A displayed example without a title +[x] informalexample - A displayed example without a title [ ] informalfigure - A untitled figure [ ] informaltable - A table without a title [ ] initializer - The initializer for a FieldSynopsis @@ -498,7 +497,7 @@ List of all DocBook tags, with [x] indicating implemented, [x] warning - An admonition set off from the text [x] wordasword - A word meant specifically as a word and not representing anything else -[ ] xref - A cross reference to another part of the document +[x] xref - A cross reference to another part of the document [ ] year - The year of publication of a document [x] ?asciidoc-br? - line break from asciidoc docbook output -} @@ -511,6 +510,7 @@ data DBState = DBState{ dbSectionLevel :: Int , dbAcceptsMeta :: Bool , dbBook :: Bool , dbFigureTitle :: Inlines + , dbContent :: [Content] } deriving Show instance Default DBState where @@ -519,13 +519,14 @@ instance Default DBState where , dbMeta = mempty , dbAcceptsMeta = False , dbBook = False - , dbFigureTitle = mempty } + , dbFigureTitle = mempty + , dbContent = [] } readDocBook :: ReaderOptions -> String -> Either PandocError Pandoc readDocBook _ inp = (\blocks -> Pandoc (dbMeta st') (toList . mconcat $ blocks)) <$> bs - where (bs , st') = flip runState def . runExceptT . mapM parseBlock . normalizeTree . parseXML $ inp' - inp' = handleInstructions inp + where (bs , st') = flip runState (def{ dbContent = tree }) . runExceptT . mapM parseBlock $ tree + tree = normalizeTree . parseXML . handleInstructions $ inp -- We treat <?asciidoc-br?> specially (issue #1236), converting it -- to <br/>, since xml-light doesn't parse the instruction correctly. @@ -611,6 +612,7 @@ isBlockElement (Elem e) = qName (elName e) `elem` blocktags "important","caution","note","tip","warning","qandadiv", "question","answer","abstract","itemizedlist","orderedlist", "variablelist","article","book","table","informaltable", + "informalexample", "screen","programlisting","example","calloutlist"] isBlockElement _ = False @@ -656,7 +658,7 @@ getMediaobject e = do let (caption, title) = if isNull figTitle then (getCaption e, "") else (return figTitle, "fig:") - liftM (imageWith imageUrl title attr) caption + liftM (imageWith attr imageUrl title) caption getBlocks :: Element -> DB Blocks getBlocks e = mconcat <$> (mapM parseBlock $ elContent e) @@ -775,6 +777,8 @@ parseBlock (Elem e) = "book" -> modify (\st -> st{ dbBook = True }) >> getBlocks e "table" -> parseTable "informaltable" -> parseTable + "informalexample" -> divWith ("", ["informalexample"], []) <$> + getBlocks e "literallayout" -> codeBlockWithLang "screen" -> codeBlockWithLang "programlisting" -> codeBlockWithLang @@ -956,7 +960,13 @@ parseInline (Elem e) = "keycombo" -> keycombo <$> (mapM parseInline $ elContent e) "menuchoice" -> menuchoice <$> (mapM parseInline $ filter isGuiMenu $ elContent e) - "xref" -> return $ str "?" -- so at least you know something is there + "xref" -> do + content <- dbContent <$> get + let linkend = attrValue "linkend" e + let title = case attrValue "endterm" e of + "" -> maybe "???" xrefTitleByElem (findElementById linkend content) + endterm -> maybe "???" strContent (findElementById endterm content) + return $ link ('#' : linkend) "" (singleton (Str title)) "email" -> return $ link ("mailto:" ++ strContent e) "" $ str $ strContent e "uri" -> return $ link (strContent e) "" $ str $ strContent e @@ -968,7 +978,7 @@ parseInline (Elem e) = _ -> ('#' : attrValue "linkend" e) let ils' = if ils == mempty then str href else ils let attr = (attrValue "id" e, words $ attrValue "role" e, []) - return $ linkWith href "" attr ils' + return $ linkWith attr href "" ils' "foreignphrase" -> emph <$> innerInlines "emphasis" -> case attrValue "role" e of "bold" -> strong <$> innerInlines @@ -1018,3 +1028,26 @@ parseInline (Elem e) = isGuiMenu (Elem x) = named "guimenu" x || named "guisubmenu" x || named "guimenuitem" x isGuiMenu _ = False + + findElementById idString content + = asum [filterElement (\x -> attrValue "id" x == idString) el | Elem el <- content] + + -- Use the 'xreflabel' attribute for getting the title of a xref link; + -- if there's no such attribute, employ some heuristics based on what + -- docbook-xsl does. + xrefTitleByElem el + | not (null xrefLabel) = xrefLabel + | otherwise = case qName (elName el) of + "chapter" -> descendantContent "title" el + "sect1" -> descendantContent "title" el + "sect2" -> descendantContent "title" el + "sect3" -> descendantContent "title" el + "sect4" -> descendantContent "title" el + "sect5" -> descendantContent "title" el + "cmdsynopsis" -> descendantContent "command" el + "funcsynopsis" -> descendantContent "function" el + _ -> qName (elName el) ++ "_title" + where + xrefLabel = attrValue "xreflabel" el + descendantContent name = maybe "???" strContent + . findElement (QName name Nothing Nothing) diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs index b80280553..439e2d3e4 100644 --- a/src/Text/Pandoc/Readers/Docx.hs +++ b/src/Text/Pandoc/Readers/Docx.hs @@ -85,14 +85,12 @@ import Text.Pandoc.Readers.Docx.Reducible import Text.Pandoc.Shared import Text.Pandoc.MediaBag (insertMedia, MediaBag) import Data.List (delete, (\\), intersect) -import Data.Monoid import Text.TeXMath (writeTeX) import Data.Default (Default) import qualified Data.ByteString.Lazy as B import qualified Data.Map as M import Control.Monad.Reader import Control.Monad.State -import Control.Applicative ((<$>)) import Data.Sequence (ViewL(..), viewl) import qualified Data.Sequence as Seq (null) @@ -206,11 +204,15 @@ runElemToInlines :: RunElem -> Inlines runElemToInlines (TextRun s) = text s runElemToInlines (LnBrk) = linebreak runElemToInlines (Tab) = space +runElemToInlines (SoftHyphen) = text "\xad" +runElemToInlines (NoBreakHyphen) = text "\x2011" runElemToString :: RunElem -> String runElemToString (TextRun s) = s runElemToString (LnBrk) = ['\n'] runElemToString (Tab) = ['\t'] +runElemToString (SoftHyphen) = ['\xad'] +runElemToString (NoBreakHyphen) = ['\x2011'] runToString :: Run -> String runToString (Run _ runElems) = concatMap runElemToString runElems @@ -501,6 +503,10 @@ bodyPartToBlocks (ListItem pPr numId lvl levelInfo parparts) = do ] blks <- bodyPartToBlocks (Paragraph pPr parparts) return $ divWith ("", ["list-item"], kvs) blks +bodyPartToBlocks (DummyListItem pPr _ parparts) = + let pPr' = pPr {pStyle = "ListParagraph": (pStyle pPr)} + in + bodyPartToBlocks $ Paragraph pPr' parparts bodyPartToBlocks (Tbl _ _ _ []) = return $ para mempty bodyPartToBlocks (Tbl cap _ look (r:rs)) = do diff --git a/src/Text/Pandoc/Readers/Docx/Parse.hs b/src/Text/Pandoc/Readers/Docx/Parse.hs index cce80fb48..5910a476b 100644 --- a/src/Text/Pandoc/Readers/Docx/Parse.hs +++ b/src/Text/Pandoc/Readers/Docx/Parse.hs @@ -59,7 +59,7 @@ import Data.Bits ((.|.)) import qualified Data.ByteString.Lazy as B import qualified Text.Pandoc.UTF8 as UTF8 import Control.Monad.Reader -import Control.Applicative ((<$>), (<|>)) +import Control.Applicative ((<|>)) import qualified Data.Map as M import Text.Pandoc.Compat.Except import Text.TeXMath.Readers.OMML (readOMML) @@ -75,6 +75,7 @@ data ReaderEnv = ReaderEnv { envNotes :: Notes , envFont :: Maybe Font , envCharStyles :: CharStyleMap , envParStyles :: ParStyleMap + , envLocation :: DocumentLocation } deriving Show @@ -87,7 +88,7 @@ instance Error DocxError where type D = ExceptT DocxError (Reader ReaderEnv) runD :: D a -> ReaderEnv -> Either DocxError a -runD dx re = runReader (runExceptT dx ) re +runD dx re = runReader (runExceptT dx) re maybeToD :: Maybe a -> D a maybeToD (Just a) = return a @@ -140,7 +141,10 @@ data AbstractNumb = AbstractNumb String [Level] -- (ilvl, format, string, start) type Level = (String, String, String, Maybe Integer) -data Relationship = Relationship (RelId, Target) +data DocumentLocation = InDocument | InFootnote | InEndnote + deriving (Eq,Show) + +data Relationship = Relationship DocumentLocation RelId Target deriving Show data Notes = Notes NameSpaces @@ -174,6 +178,7 @@ defaultParagraphStyle = ParagraphStyle { pStyle = [] data BodyPart = Paragraph ParagraphStyle [ParPart] | ListItem ParagraphStyle String String Level [ParPart] + | DummyListItem ParagraphStyle String [ParPart] | Tbl String TblGrid TblLook [Row] | OMathPara [Exp] deriving Show @@ -208,7 +213,7 @@ data Run = Run RunStyle [RunElem] | InlineDrawing FilePath B.ByteString deriving Show -data RunElem = TextRun String | LnBrk | Tab +data RunElem = TextRun String | LnBrk | Tab | SoftHyphen | NoBreakHyphen deriving Show data VertAlign = BaseLn | SupScrpt | SubScrpt @@ -238,7 +243,6 @@ defaultRunStyle = RunStyle { isBold = Nothing , rUnderline = Nothing , rStyle = Nothing} - type Target = String type Anchor = String type URL = String @@ -255,7 +259,8 @@ archiveToDocx archive = do rels = archiveToRelationships archive media = archiveToMedia archive (styles, parstyles) = archiveToStyles archive - rEnv = ReaderEnv notes numbering rels media Nothing styles parstyles + rEnv = + ReaderEnv notes numbering rels media Nothing styles parstyles InDocument doc <- runD (archiveToDocument archive) rEnv return $ Docx doc @@ -362,29 +367,30 @@ archiveToNotes zf = in Notes ns fn en -filePathIsRel :: FilePath -> Bool -filePathIsRel fp = - let (dir, name) = splitFileName fp - in - (dir == "word/_rels/") && ((takeExtension name) == ".rels") +filePathToRelType :: FilePath -> Maybe DocumentLocation +filePathToRelType "word/_rels/document.xml.rels" = Just InDocument +filePathToRelType "word/_rels/footnotes.xml.rels" = Just InFootnote +filePathToRelType "word/_rels/endnotes.xml.rels" = Just InEndnote +filePathToRelType _ = Nothing -relElemToRelationship :: Element -> Maybe Relationship -relElemToRelationship element | qName (elName element) == "Relationship" = +relElemToRelationship :: DocumentLocation -> Element -> Maybe Relationship +relElemToRelationship relType element | qName (elName element) == "Relationship" = do relId <- findAttr (QName "Id" Nothing Nothing) element target <- findAttr (QName "Target" Nothing Nothing) element - return $ Relationship (relId, target) -relElemToRelationship _ = Nothing - - + return $ Relationship relType relId target +relElemToRelationship _ _ = Nothing + +filePathToRelationships :: Archive -> FilePath -> [Relationship] +filePathToRelationships ar fp | Just relType <- filePathToRelType fp + , Just entry <- findEntryByPath fp ar + , Just relElems <- (parseXMLDoc . UTF8.toStringLazy . fromEntry) entry = + mapMaybe (relElemToRelationship relType) $ elChildren relElems +filePathToRelationships _ _ = [] + archiveToRelationships :: Archive -> [Relationship] archiveToRelationships archive = - let relPaths = filter filePathIsRel (filesInArchive archive) - entries = mapMaybe (\f -> findEntryByPath f archive) relPaths - relElems = mapMaybe (parseXMLDoc . UTF8.toStringLazy . fromEntry) entries - rels = mapMaybe relElemToRelationship $ concatMap elChildren relElems - in - rels + concatMap (filePathToRelationships archive) $ filesInArchive archive filePathIsMedia :: FilePath -> Bool filePathIsMedia fp = @@ -409,6 +415,7 @@ lookupLevel numId ilvl (Numbering _ numbs absNumbs) = do lvl <- lookup ilvl $ map (\l@(i, _, _, _) -> (i, l)) lvls return lvl + numElemToNum :: NameSpaces -> Element -> Maybe Numb numElemToNum ns element | qName (elName element) == "num" && @@ -560,7 +567,7 @@ elemToBodyPart ns element num <- asks envNumbering case lookupLevel numId lvl num of Just levelInfo -> return $ ListItem parstyle numId lvl levelInfo parparts - Nothing -> throwError WrongElem + Nothing -> return $ DummyListItem parstyle lvl parparts elemToBodyPart ns element | isElem ns "w" "p" element = do sty <- asks envParStyles @@ -573,7 +580,7 @@ elemToBodyPart ns element Just levelInfo -> return $ ListItem parstyle numId lvl levelInfo parparts Nothing -> - throwError WrongElem + return $ DummyListItem parstyle lvl parparts Nothing -> return $ Paragraph parstyle parparts elemToBodyPart ns element | isElem ns "w" "tbl" element = do @@ -596,13 +603,16 @@ elemToBodyPart ns element return $ Tbl caption grid tblLook rows elemToBodyPart _ _ = throwError WrongElem -lookupRelationship :: RelId -> [Relationship] -> Maybe Target -lookupRelationship relid rels = - lookup relid (map (\(Relationship pair) -> pair) rels) +lookupRelationship :: DocumentLocation -> RelId -> [Relationship] -> Maybe Target +lookupRelationship docLocation relid rels = + lookup (docLocation, relid) pairs + where + pairs = map (\(Relationship loc relid' target) -> ((loc, relid'), target)) rels expandDrawingId :: String -> D (FilePath, B.ByteString) expandDrawingId s = do - target <- asks (lookupRelationship s . envRelationships) + location <- asks envLocation + target <- asks (lookupRelationship location s . envRelationships) case target of Just filepath -> do bytes <- asks (lookup ("word/" ++ filepath) . envMedia) @@ -657,9 +667,10 @@ elemToParPart ns element elemToParPart ns element | isElem ns "w" "hyperlink" element , Just relId <- findAttr (elemName ns "r" "id") element = do + location <- asks envLocation runs <- mapD (elemToRun ns) (elChildren element) rels <- asks envRelationships - case lookupRelationship relId rels of + case lookupRelationship location relId rels of Just target -> do case findAttr (elemName ns "w" "anchor") element of Just anchor -> return $ ExternalHyperLink (target ++ '#':anchor) runs @@ -699,7 +710,7 @@ elemToRun ns element , Just fnId <- findAttr (elemName ns "w" "id") ref = do notes <- asks envNotes case lookupFootnote fnId notes of - Just e -> do bps <- mapD (elemToBodyPart ns) (elChildren e) + Just e -> do bps <- local (\r -> r {envLocation=InFootnote}) $ mapD (elemToBodyPart ns) (elChildren e) return $ Footnote bps Nothing -> return $ Footnote [] elemToRun ns element @@ -708,7 +719,7 @@ elemToRun ns element , Just enId <- findAttr (elemName ns "w" "id") ref = do notes <- asks envNotes case lookupEndnote enId notes of - Just e -> do bps <- mapD (elemToBodyPart ns) (elChildren e) + Just e -> do bps <- local (\r -> r {envLocation=InEndnote}) $ mapD (elemToBodyPart ns) (elChildren e) return $ Endnote bps Nothing -> return $ Endnote [] elemToRun ns element @@ -877,6 +888,8 @@ elemToRunElem ns element map (\x -> fromMaybe x . getUnicode f . lowerFromPrivate $ x) str | isElem ns "w" "br" element = return LnBrk | isElem ns "w" "tab" element = return Tab + | isElem ns "w" "softHyphen" element = return SoftHyphen + | isElem ns "w" "noBreakHyphen" element = return NoBreakHyphen | isElem ns "w" "sym" element = return (getSymChar ns element) | otherwise = throwError WrongElem where diff --git a/src/Text/Pandoc/Readers/Docx/Reducible.hs b/src/Text/Pandoc/Readers/Docx/Reducible.hs index 8269ca88d..c93b40119 100644 --- a/src/Text/Pandoc/Readers/Docx/Reducible.hs +++ b/src/Text/Pandoc/Readers/Docx/Reducible.hs @@ -8,7 +8,6 @@ module Text.Pandoc.Readers.Docx.Reducible ( concatReduce import Text.Pandoc.Builder -import Data.Monoid import Data.List import Data.Sequence (ViewR(..), ViewL(..), viewl, viewr) import qualified Data.Sequence as Seq (null) diff --git a/src/Text/Pandoc/Readers/EPUB.hs b/src/Text/Pandoc/Readers/EPUB.hs index fb86f1286..79aa540f6 100644 --- a/src/Text/Pandoc/Readers/EPUB.hs +++ b/src/Text/Pandoc/Readers/EPUB.hs @@ -16,6 +16,7 @@ import Text.Pandoc.Options ( ReaderOptions(..), readerTrace) import Text.Pandoc.Shared (escapeURI, collapseFilePath, addMetaField) import Text.Pandoc.MediaBag (MediaBag, insertMedia) import Text.Pandoc.Compat.Except (MonadError, throwError, runExcept, Except) +import Text.Pandoc.Compat.Monoid ((<>)) import Text.Pandoc.MIME (MimeType) import qualified Text.Pandoc.Builder as B import Codec.Archive.Zip ( Archive (..), toArchive, fromEntry @@ -25,9 +26,7 @@ import System.FilePath ( takeFileName, (</>), dropFileName, normalise , dropFileName , splitFileName ) import qualified Text.Pandoc.UTF8 as UTF8 (toStringLazy) -import Control.Applicative ((<$>)) import Control.Monad (guard, liftM, when) -import Data.Monoid (mempty, (<>)) import Data.List (isPrefixOf, isInfixOf) import Data.Maybe (mapMaybe, fromMaybe) import qualified Data.Map as M (Map, lookup, fromList, elems) @@ -181,7 +180,6 @@ getManifest archive = do fixInternalReferences :: FilePath -> Pandoc -> Pandoc fixInternalReferences pathToFile = (walk $ renameImages root) - . (walk normalisePath) . (walk $ fixBlockIRs filename) . (walk $ fixInlineIRs filename) where @@ -196,12 +194,6 @@ fixInlineIRs s (Link attr t ('#':url, tit)) = Link attr t (addHash s url, tit) fixInlineIRs _ v = v -normalisePath :: Inline -> Inline -normalisePath (Link attr t (url, tit)) = - let (path, uid) = span (/= '#') url in - Link attr t (takeFileName path ++ uid, tit) -normalisePath s = s - prependHash :: [String] -> Inline -> Inline prependHash ps l@(Link attr is (url, tit)) | or [s `isPrefixOf` url | s <- ps] = @@ -223,7 +215,7 @@ fixAttrs s (ident, cs, kvs) = (addHash s ident, filter (not . null) cs, removeEP addHash :: String -> String -> String addHash _ "" = "" -addHash s ident = s ++ "#" ++ ident +addHash s ident = takeFileName s ++ "#" ++ ident removeEPUBAttrs :: [(String, String)] -> [(String, String)] removeEPUBAttrs kvs = filter (not . isEPUBAttr) kvs diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index 5a93e0d5b..85e9a0743 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -50,13 +50,14 @@ import Text.Pandoc.Options (ReaderOptions(readerParseRaw, readerTrace) Ext_native_divs, Ext_native_spans)) import Text.Pandoc.Parsing hiding ((<|>)) import Text.Pandoc.Walk +import qualified Data.Map as M import Data.Maybe ( fromMaybe, isJust) import Data.List ( intercalate, isInfixOf, isPrefixOf, isSuffixOf ) import Data.Char ( isDigit ) import Control.Monad ( liftM, guard, when, mzero, void, unless ) import Control.Arrow ((***)) -import Control.Applicative ( (<$>), (<$), (<*), (*>), (<|>)) -import Data.Monoid (mconcat, Monoid, mempty, (<>), First (..)) +import Control.Applicative ( (<|>) ) +import Data.Monoid (First (..)) import Text.Printf (printf) import Debug.Trace (trace) import Text.TeXMath (readMathML, writeTeX) @@ -64,7 +65,8 @@ import Data.Default (Default (..), def) import Control.Monad.Reader (Reader,ask, asks, local, runReader) import Network.URI (isURI) import Text.Pandoc.Error - +import Text.Pandoc.CSS (foldOrElse, pickStyleAttrProps) +import Text.Pandoc.Compat.Monoid ((<>)) import Text.Parsec.Error @@ -74,8 +76,9 @@ readHtml :: ReaderOptions -- ^ Reader options -> Either PandocError Pandoc readHtml opts inp = mapLeft (ParseFailure . getError) . flip runReader def $ - runParserT parseDoc (HTMLState def{ stateOptions = opts } [] Nothing) - "source" tags + runParserT parseDoc + (HTMLState def{ stateOptions = opts } [] Nothing [] M.empty) + "source" tags where tags = stripPrefixes . canonicalizeTags $ parseTagsOptions parseOptions{ optTagPosition = True } inp parseDoc = do @@ -100,7 +103,9 @@ data HTMLState = HTMLState { parserState :: ParserState, noteTable :: [(String, Blocks)], - baseHref :: Maybe String + baseHref :: Maybe String, + identifiers :: [String], + headerMap :: M.Map Inlines String } data HTMLLocal = HTMLLocal { quoteContext :: QuoteContext @@ -252,6 +257,22 @@ pListItem nonItem = do let liDiv = maybe mempty (\x -> B.divWith (x, [], []) mempty) (lookup "id" attr) (liDiv <>) <$> pInTags "li" block <* skipMany nonItem +parseListStyleType :: String -> ListNumberStyle +parseListStyleType "lower-roman" = LowerRoman +parseListStyleType "upper-roman" = UpperRoman +parseListStyleType "lower-alpha" = LowerAlpha +parseListStyleType "upper-alpha" = UpperAlpha +parseListStyleType "decimal" = Decimal +parseListStyleType _ = DefaultStyle + +parseTypeAttr :: String -> ListNumberStyle +parseTypeAttr "i" = LowerRoman +parseTypeAttr "I" = UpperRoman +parseTypeAttr "a" = LowerAlpha +parseTypeAttr "A" = UpperAlpha +parseTypeAttr "1" = Decimal +parseTypeAttr _ = DefaultStyle + pOrderedList :: TagParser Blocks pOrderedList = try $ do TagOpen _ attribs <- pSatisfy (~== TagOpen "ol" []) @@ -261,23 +282,19 @@ pOrderedList = try $ do sta' = if all isDigit sta then read sta else 1 - sty = fromMaybe (fromMaybe "" $ - lookup "style" attribs) $ - lookup "class" attribs - sty' = case sty of - "lower-roman" -> LowerRoman - "upper-roman" -> UpperRoman - "lower-alpha" -> LowerAlpha - "upper-alpha" -> UpperAlpha - "decimal" -> Decimal - _ -> - case lookup "type" attribs of - Just "1" -> Decimal - Just "I" -> UpperRoman - Just "i" -> LowerRoman - Just "A" -> UpperAlpha - Just "a" -> LowerAlpha - _ -> DefaultStyle + + pickListStyle = pickStyleAttrProps ["list-style-type", "list-style"] + + typeAttr = fromMaybe "" $ lookup "type" attribs + classAttr = fromMaybe "" $ lookup "class" attribs + styleAttr = fromMaybe "" $ lookup "style" attribs + listStyle = fromMaybe "" $ pickListStyle styleAttr + + sty' = foldOrElse DefaultStyle + [ parseTypeAttr typeAttr + , parseListStyleType classAttr + , parseListStyleType listStyle + ] let nonItem = pSatisfy (\t -> not (tagOpen (`elem` ["li","ol","ul","dl"]) (const True) t) && not (t ~== TagClose "ol")) @@ -330,9 +347,16 @@ pRawTag = do pDiv :: TagParser Blocks pDiv = try $ do guardEnabled Ext_native_divs - TagOpen _ attr <- lookAhead $ pSatisfy $ tagOpen (=="div") (const True) - contents <- pInTags "div" block - return $ B.divWith (mkAttr attr) contents + let isDivLike "div" = True + isDivLike "section" = True + isDivLike _ = False + TagOpen tag attr <- lookAhead $ pSatisfy $ tagOpen isDivLike (const True) + contents <- pInTags tag block + let (ident, classes, kvs) = mkAttr attr + let classes' = if tag == "section" + then "section":classes + else classes + return $ B.divWith (ident, classes', kvs) contents pRawHtmlBlock :: TagParser Blocks pRawHtmlBlock = do @@ -385,9 +409,10 @@ pHeader = try $ do let ident = fromMaybe "" $ lookup "id" attr let classes = maybe [] words $ lookup "class" attr let keyvals = [(k,v) | (k,v) <- attr, k /= "class", k /= "id"] + attr' <- registerHeader (ident, classes, keyvals) contents return $ if bodyTitle then mempty -- skip a representation of the title in the body - else B.headerWith (ident, classes, keyvals) level contents + else B.headerWith attr' level contents pHrule :: TagParser Blocks pHrule = do @@ -587,7 +612,7 @@ pLink = try $ do let uid = fromAttrib "id" tag let cls = words $ fromAttrib "class" tag lab <- trimInlines . mconcat <$> manyTill inline (pCloses "a") - return $ B.linkWith (escapeURI url) title (uid, cls, []) lab + return $ B.linkWith (uid, cls, []) (escapeURI url) title lab pImage :: TagParser Inlines pImage = do @@ -605,7 +630,7 @@ pImage = do "" -> [] v -> [(k, v)] let kvs = concat $ map getAtt ["width", "height", "sizes", "srcset"] - return $ B.imageWith (escapeURI url) title (uid, cls, kvs) (B.text alt) + return $ B.imageWith (uid, cls, kvs) (escapeURI url) title (B.text alt) pCode :: TagParser Inlines pCode = try $ do @@ -618,12 +643,11 @@ pSpan = try $ do guardEnabled Ext_native_spans TagOpen _ attr <- lookAhead $ pSatisfy $ tagOpen (=="span") (const True) contents <- pInTags "span" inline - let attr' = mkAttr attr - return $ case attr' of - ("",[],[("style",s)]) - | filter (`notElem` " \t;") s == "font-variant:small-caps" -> - B.smallcaps contents - _ -> B.spanWith (mkAttr attr) contents + let isSmallCaps = fontVariant == "small-caps" + where styleAttr = fromMaybe "" $ lookup "style" attr + fontVariant = fromMaybe "" $ pickStyleAttrProps ["font-variant"] styleAttr + let tag = if isSmallCaps then B.smallcaps else B.spanWith (mkAttr attr) + return $ tag contents pRawHtmlInline :: TagParser Inlines pRawHtmlInline = do @@ -920,6 +944,7 @@ htmlTag f = try $ do parseOptions{ optTagWarning = True } inp guard $ f next case next of + TagWarning _ -> fail "encountered TagWarning" TagComment s | "<!--" `isPrefixOf` inp -> do count (length s + 4) anyChar @@ -967,6 +992,14 @@ isSpace _ = False -- Instances +instance HasIdentifierList HTMLState where + extractIdentifierList = identifiers + updateIdentifierList f s = s{ identifiers = f (identifiers s) } + +instance HasHeaderMap HTMLState where + extractHeaderMap = headerMap + updateHeaderMap f s = s{ headerMap = f (headerMap s) } + -- This signature should be more general -- MonadReader HTMLLocal m => HasQuoteContext st m instance HasQuoteContext st (Reader HTMLLocal) where @@ -976,9 +1009,6 @@ instance HasQuoteContext st (Reader HTMLLocal) where instance HasReaderOptions HTMLState where extractReaderOptions = extractReaderOptions . parserState -instance Default HTMLState where - def = HTMLState def [] Nothing - instance HasMeta HTMLState where setMeta s b st = st {parserState = setMeta s b $ parserState st} deleteMeta s st = st {parserState = deleteMeta s $ parserState st} diff --git a/src/Text/Pandoc/Readers/Haddock.hs b/src/Text/Pandoc/Readers/Haddock.hs index aa2534afc..16f3d7ef3 100644 --- a/src/Text/Pandoc/Readers/Haddock.hs +++ b/src/Text/Pandoc/Readers/Haddock.hs @@ -16,8 +16,8 @@ module Text.Pandoc.Readers.Haddock import Text.Pandoc.Builder (Blocks, Inlines) import qualified Text.Pandoc.Builder as B +import Text.Pandoc.Compat.Monoid ((<>)) import Text.Pandoc.Shared (trim, splitBy) -import Data.Monoid import Data.List (intersperse, stripPrefix) import Data.Maybe (fromMaybe) import Text.Pandoc.Definition diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index def429232..673deba14 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -46,8 +46,7 @@ import Data.Char ( chr, ord, isLetter, isAlphaNum ) import Control.Monad.Trans (lift) import Control.Monad import Text.Pandoc.Builder -import Control.Applicative -import Data.Monoid +import Control.Applicative ((<|>), many, optional) import Data.Maybe (fromMaybe, maybeToList) import System.Environment (getEnv) import System.FilePath (replaceExtension, (</>), takeExtension, addExtension) @@ -171,17 +170,23 @@ quoted' f starter ender = do try ((f . mconcat) <$> manyTill inline ender) <|> lit startchs doubleQuote :: LP Inlines -doubleQuote = - quoted' doubleQuoted (try $ string "``") (void $ try $ string "''") - <|> quoted' doubleQuoted (string "“") (void $ char '”') - -- the following is used by babel for localized quotes: - <|> quoted' doubleQuoted (try $ string "\"`") (void $ try $ string "\"'") - <|> quoted' doubleQuoted (string "\"") (void $ char '"') +doubleQuote = do + smart <- getOption readerSmart + if smart + then quoted' doubleQuoted (try $ string "``") (void $ try $ string "''") + <|> quoted' doubleQuoted (string "“") (void $ char '”') + -- the following is used by babel for localized quotes: + <|> quoted' doubleQuoted (try $ string "\"`") (void $ try $ string "\"'") + <|> quoted' doubleQuoted (string "\"") (void $ char '"') + else str <$> many1 (oneOf "`'“”\"") singleQuote :: LP Inlines -singleQuote = - quoted' singleQuoted (string "`") (try $ char '\'' >> notFollowedBy letter) - <|> quoted' singleQuoted (string "‘") (try $ char '’' >> notFollowedBy letter) +singleQuote = do + smart <- getOption readerSmart + if smart + then quoted' singleQuoted (string "`") (try $ char '\'' >> notFollowedBy letter) + <|> quoted' singleQuoted (string "‘") (try $ char '’' >> notFollowedBy letter) + else str <$> many1 (oneOf "`\'‘’") inline :: LP Inlines inline = (mempty <$ comment) @@ -235,7 +240,9 @@ blocks = mconcat <$> many block getRawCommand :: String -> LP String getRawCommand name' = do - rawargs <- withRaw (skipopts *> option "" dimenarg *> many braced) + rawargs <- withRaw (many (try (optional sp *> opt)) *> + option "" (try (optional sp *> dimenarg)) *> + many braced) return $ '\\' : name' ++ snd rawargs lookupListDefault :: (Ord k) => v -> [k] -> M.Map k v -> v @@ -528,6 +535,7 @@ inlineCommands = M.fromList $ mkImage options src) , ("enquote", enquote) , ("cite", citation "cite" AuthorInText False) + , ("Cite", citation "cite" AuthorInText False) , ("citep", citation "citep" NormalCitation False) , ("citep*", citation "citep*" NormalCitation False) , ("citeal", citation "citeal" NormalCitation False) @@ -597,8 +605,8 @@ mkImage options src = do case takeExtension src of "" -> do defaultExt <- getOption readerDefaultImageExtension - return $ imageWith (addExtension src defaultExt) "" attr alt - _ -> return $ imageWith src "" attr alt + return $ imageWith attr (addExtension src defaultExt) "" alt + _ -> return $ imageWith attr src "" alt inNote :: Inlines -> Inlines inNote ils = @@ -824,10 +832,10 @@ tok :: LP Inlines tok = try $ grouped inline <|> inlineCommand <|> str <$> count 1 inlineChar opt :: LP Inlines -opt = bracketed inline <* optional sp +opt = bracketed inline skipopts :: LP () -skipopts = skipMany opt +skipopts = skipMany (opt *> optional sp) inlineText :: LP Inlines inlineText = str <$> many1 inlineChar @@ -893,7 +901,7 @@ verbatimEnv' = fmap snd <$> string "\\begin" name <- braced' guard $ name `elem` ["verbatim", "Verbatim", "lstlisting", - "minted", "alltt"] + "minted", "alltt", "comment"] manyTill anyChar (try $ string $ "\\end{" ++ name ++ "}") blob' :: IncludeParser @@ -1030,6 +1038,8 @@ environments = M.fromList , ("figure", env "figure" $ resetCaption *> skipopts *> blocks >>= addImageCaption) , ("center", env "center" blocks) + , ("longtable", env "longtable" $ + resetCaption *> skipopts *> blocks >>= addTableCaption) , ("table", env "table" $ resetCaption *> skipopts *> blocks >>= addTableCaption) , ("tabular*", env "tabular" $ simpTable True) @@ -1044,6 +1054,7 @@ environments = M.fromList , ("code", guardEnabled Ext_literate_haskell *> (codeBlockWith ("",["sourceCode","literate","haskell"],[]) <$> verbEnv "code")) + , ("comment", mempty <$ verbEnv "comment") , ("verbatim", codeBlock <$> verbEnv "verbatim") , ("Verbatim", do options <- option [] keyvals let kvs = [ (if k == "firstnumber" diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index ebca7e83d..fd16a5f75 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -39,6 +39,7 @@ import Data.Ord ( comparing ) import Data.Char ( isSpace, isAlphaNum, toLower ) import Data.Maybe import Text.Pandoc.Definition +import Text.Pandoc.Emoji (emojis) import qualified Data.Text as T import Data.Text (Text) import qualified Data.Yaml as Yaml @@ -47,7 +48,7 @@ import qualified Data.HashMap.Strict as H import qualified Text.Pandoc.Builder as B import qualified Text.Pandoc.UTF8 as UTF8 import qualified Data.Vector as V -import Text.Pandoc.Builder (Inlines, Blocks, trimInlines, (<>)) +import Text.Pandoc.Builder (Inlines, Blocks, trimInlines) import Text.Pandoc.Options import Text.Pandoc.Shared import Text.Pandoc.XML (fromEntities) @@ -55,8 +56,6 @@ import Text.Pandoc.Parsing hiding (tableWith) import Text.Pandoc.Readers.LaTeX ( rawLaTeXInline, rawLaTeXBlock ) import Text.Pandoc.Readers.HTML ( htmlTag, htmlInBalanced, isInlineTag, isBlockTag, isTextTag, isCommentTag ) -import Data.Monoid (mconcat, mempty) -import Control.Applicative ((<$>), (<*), (*>), (<$), (<*>)) import Control.Monad import System.FilePath (takeExtension, addExtension) import Text.HTML.TagSoup @@ -64,6 +63,7 @@ import Text.HTML.TagSoup.Match (tagOpen) import qualified Data.Set as Set import Text.Printf (printf) import Debug.Trace (trace) +import Text.Pandoc.Compat.Monoid ((<>)) import Text.Pandoc.Error type MarkdownParser = Parser [Char] ParserState @@ -328,23 +328,22 @@ stopLine = try $ (string "---" <|> string "...") >> blankline >> return () mmdTitleBlock :: MarkdownParser () mmdTitleBlock = try $ do guardEnabled Ext_mmd_title_block - kvPairs <- many1 kvPair + firstPair <- kvPair False + restPairs <- many (kvPair True) + let kvPairs = firstPair : restPairs blanklines updateState $ \st -> st{ stateMeta' = stateMeta' st <> return (Meta $ M.fromList kvPairs) } -kvPair :: MarkdownParser (String, MetaValue) -kvPair = try $ do +kvPair :: Bool -> MarkdownParser (String, MetaValue) +kvPair allowEmpty = try $ do key <- many1Till (alphaNum <|> oneOf "_- ") (char ':') - skipMany1 spaceNoNewline - val <- manyTill anyChar + val <- trim <$> manyTill anyChar (try $ newline >> lookAhead (blankline <|> nonspaceChar)) - guard $ not . null . trim $ val + guard $ allowEmpty || not (null val) let key' = concat $ words $ map toLower key - let val' = MetaBlocks $ B.toList $ B.plain $ B.text $ trim val + let val' = MetaBlocks $ B.toList $ B.plain $ B.text $ val return (key',val') - where - spaceNoNewline = satisfy (\x -> isSpace x && (x/='\n') && (x/='\r')) parseMarkdown :: MarkdownParser Pandoc parseMarkdown = do @@ -506,9 +505,15 @@ block = do header :: MarkdownParser (F Blocks) header = setextHeader <|> atxHeader <?> "header" +atxChar :: MarkdownParser Char +atxChar = do + exts <- getOption readerExtensions + return $ if Set.member Ext_literate_haskell exts + then '=' else '#' + atxHeader :: MarkdownParser (F Blocks) atxHeader = try $ do - level <- many1 (char '#') >>= return . length + level <- atxChar >>= many1 . char >>= return . length notFollowedBy $ guardEnabled Ext_fancy_lists >> (char '.' <|> char ')') -- this would be a list skipSpaces @@ -524,7 +529,7 @@ atxClosing :: MarkdownParser Attr atxClosing = try $ do attr' <- option nullAttr (guardEnabled Ext_mmd_header_identifiers >> mmdHeaderIdentifier) - skipMany (char '#') + skipMany . char =<< atxChar skipSpaces attr <- option attr' (guardEnabled Ext_header_attributes >> attributes) @@ -636,7 +641,11 @@ keyValAttr = try $ do val <- enclosed (char '"') (char '"') litChar <|> enclosed (char '\'') (char '\'') litChar <|> many (escapedChar' <|> noneOf " \t\n\r}") - return $ \(id',cs,kvs) -> (id',cs,kvs ++ [(key,val)]) + return $ \(id',cs,kvs) -> + case key of + "id" -> (val,cs,kvs) + "class" -> (id',cs ++ words val,kvs) + _ -> (id',cs,kvs ++ [(key,val)]) specialAttr :: MarkdownParser (Attr -> Attr) specialAttr = do @@ -1316,7 +1325,7 @@ removeOneLeadingSpace xs = gridTableFooter :: MarkdownParser [Char] gridTableFooter = blanklines -pipeBreak :: MarkdownParser [Alignment] +pipeBreak :: MarkdownParser ([Alignment], [Int]) pipeBreak = try $ do nonindentSpaces openPipe <- (True <$ char '|') <|> return False @@ -1326,14 +1335,22 @@ pipeBreak = try $ do guard $ not (null rest && not openPipe) optional (char '|') blankline - return (first:rest) + return $ unzip (first:rest) pipeTable :: MarkdownParser ([Alignment], [Double], F [Blocks], F [[Blocks]]) pipeTable = try $ do - (heads,aligns) <- (,) <$> pipeTableRow <*> pipeBreak - lines' <- sequence <$> many pipeTableRow - let widths = replicate (length aligns) 0.0 - return $ (aligns, widths, heads, lines') + nonindentSpaces + lookAhead nonspaceChar + (heads,(aligns, seplengths)) <- (,) <$> pipeTableRow <*> pipeBreak + (lines', rawRows) <- unzip <$> many (withRaw pipeTableRow) + let maxlength = maximum $ map length rawRows + numColumns <- getOption readerColumns + let widths = if maxlength > numColumns + then map (\len -> + fromIntegral (len + 1) / fromIntegral numColumns) + seplengths + else replicate (length aligns) 0.0 + return $ (aligns, widths, heads, sequence lines') sepPipe :: MarkdownParser () sepPipe = try $ do @@ -1343,7 +1360,7 @@ sepPipe = try $ do -- parse a row, also returning probable alignments for org-table cells pipeTableRow :: MarkdownParser (F [Blocks]) pipeTableRow = do - nonindentSpaces + skipMany spaceChar openPipe <- (True <$ char '|') <|> return False let cell = mconcat <$> many (notFollowedBy (blankline <|> char '|') >> inline) @@ -1362,19 +1379,20 @@ pipeTableRow = do ils' | B.isNull ils' -> mempty | otherwise -> B.plain $ ils') cells' -pipeTableHeaderPart :: Parser [Char] st Alignment +pipeTableHeaderPart :: Parser [Char] st (Alignment, Int) pipeTableHeaderPart = try $ do skipMany spaceChar left <- optionMaybe (char ':') - many1 (char '-') + pipe <- many1 (char '-') right <- optionMaybe (char ':') skipMany spaceChar + let len = length pipe + maybe 0 (const 1) left + maybe 0 (const 1) right return $ - case (left,right) of - (Nothing,Nothing) -> AlignDefault - (Just _,Nothing) -> AlignLeft - (Nothing,Just _) -> AlignRight - (Just _,Just _) -> AlignCenter + ((case (left,right) of + (Nothing,Nothing) -> AlignDefault + (Just _,Nothing) -> AlignLeft + (Nothing,Just _) -> AlignRight + (Just _,Just _) -> AlignCenter), len) -- Succeed only if current line contains a pipe. scanForPipe :: Parser [Char] st () @@ -1453,6 +1471,7 @@ inline = choice [ whitespace , exampleRef , smart , return . B.singleton <$> charRef + , emoji , symbol , ltSign ] <?> "inline" @@ -1652,7 +1671,7 @@ endline = try $ do notFollowedBy (inList >> listStart) guardDisabled Ext_lists_without_preceding_blankline <|> notFollowedBy listStart guardEnabled Ext_blank_before_blockquote <|> notFollowedBy emailBlockQuoteStart - guardEnabled Ext_blank_before_header <|> notFollowedBy (char '#') -- atx header + guardEnabled Ext_blank_before_header <|> (notFollowedBy . char =<< atxChar) -- atx header guardDisabled Ext_backtick_code_blocks <|> notFollowedBy (() <$ (lookAhead (char '`') >> codeBlockFenced)) notFollowedByHtmlCloser @@ -1705,16 +1724,16 @@ link = try $ do setState $ st{ stateAllowLinks = True } regLink B.linkWith lab <|> referenceLink B.linkWith (lab,raw) -regLink :: (String -> String -> Attr -> Inlines -> Inlines) +regLink :: (Attr -> String -> String -> Inlines -> Inlines) -> F Inlines -> MarkdownParser (F Inlines) regLink constructor lab = try $ do (src, tit) <- source attr <- option nullAttr $ guardEnabled Ext_common_link_attributes >> attributes - return $ constructor src tit attr <$> lab + return $ constructor attr src tit <$> lab -- a link like [this][ref] or [this][] or [this] -referenceLink :: (String -> String -> Attr -> Inlines -> Inlines) +referenceLink :: (Attr -> String -> String -> Inlines -> Inlines) -> (F Inlines, String) -> MarkdownParser (F Inlines) referenceLink constructor (lab, raw) = do sp <- (True <$ lookAhead (char ' ')) <|> return False @@ -1743,10 +1762,10 @@ referenceLink constructor (lab, raw) = do then do headerKeys <- asksF stateHeaderKeys case M.lookup key headerKeys of - Just ((src, tit), _) -> constructor src tit nullAttr <$> lab + Just ((src, tit), _) -> constructor nullAttr src tit <$> lab Nothing -> makeFallback else makeFallback - Just ((src,tit), attr) -> constructor src tit attr <$> lab + Just ((src,tit), attr) -> constructor attr src tit <$> lab dropBrackets :: String -> String dropBrackets = reverse . dropRB . reverse . dropLB @@ -1780,9 +1799,9 @@ image = try $ do char '!' (lab,raw) <- reference defaultExt <- getOption readerDefaultImageExtension - let constructor src = case takeExtension src of - "" -> B.imageWith (addExtension src defaultExt) - _ -> B.imageWith src + let constructor attr' src = case takeExtension src of + "" -> B.imageWith attr' (addExtension src defaultExt) + _ -> B.imageWith attr' src regLink constructor lab <|> referenceLink constructor (lab,raw) note :: MarkdownParser (F Inlines) @@ -1886,6 +1905,21 @@ rawHtmlInline = do else not . isTextTag return $ return $ B.rawInline "html" result +-- Emoji + +emojiChars :: [Char] +emojiChars = ['a'..'z'] ++ ['0'..'9'] ++ ['_','+','-'] + +emoji :: MarkdownParser (F Inlines) +emoji = try $ do + guardEnabled Ext_emoji + char ':' + emojikey <- many1 (oneOf emojiChars) + char ':' + case M.lookup emojikey emojis of + Just s -> return (return (B.str s)) + Nothing -> mzero + -- Citations cite :: MarkdownParser (F Inlines) diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs index 6f7da2586..24b3f5c7e 100644 --- a/src/Text/Pandoc/Readers/MediaWiki.hs +++ b/src/Text/Pandoc/Readers/MediaWiki.hs @@ -38,15 +38,14 @@ module Text.Pandoc.Readers.MediaWiki ( readMediaWiki ) where import Text.Pandoc.Definition import qualified Text.Pandoc.Builder as B -import Text.Pandoc.Builder (Inlines, Blocks, trimInlines, (<>)) +import Text.Pandoc.Builder (Inlines, Blocks, trimInlines) +import Text.Pandoc.Compat.Monoid ((<>)) import Text.Pandoc.Options import Text.Pandoc.Readers.HTML ( htmlTag, isBlockTag, isCommentTag ) import Text.Pandoc.XML ( fromEntities ) import Text.Pandoc.Parsing hiding ( nested ) import Text.Pandoc.Walk ( walk ) import Text.Pandoc.Shared ( stripTrailingNewlines, safeRead, stringify, trim ) -import Data.Monoid (mconcat, mempty) -import Control.Applicative ((<$>), (<*), (*>), (<$)) import Control.Monad import Data.List (intersperse, intercalate, isPrefixOf ) import Text.HTML.TagSoup @@ -252,8 +251,8 @@ parseAttr = try $ do skipMany spaceChar k <- many1 letter char '=' - char '"' - v <- many1Till (satisfy (/='\n')) (char '"') + v <- (char '"' >> many1Till (satisfy (/='\n')) (char '"')) + <|> many1 nonspaceChar return (k,v) tableStart :: MWParser () @@ -588,7 +587,7 @@ image = try $ do let attr = ("", [], kvs) caption <- (B.str fname <$ sym "]]") <|> try (char '|' *> (mconcat <$> manyTill inline (sym "]]"))) - return $ B.imageWith fname ("fig:" ++ stringify caption) attr caption + return $ B.imageWith attr fname ("fig:" ++ stringify caption) caption imageOption :: MWParser String imageOption = try $ char '|' *> opt diff --git a/src/Text/Pandoc/Readers/Native.hs b/src/Text/Pandoc/Readers/Native.hs index 94ea9e3a2..4ec164e19 100644 --- a/src/Text/Pandoc/Readers/Native.hs +++ b/src/Text/Pandoc/Readers/Native.hs @@ -34,7 +34,6 @@ import Text.Pandoc.Definition import Text.Pandoc.Shared (safeRead) import Text.Pandoc.Error -import Control.Applicative -- | Read native formatted text and return a Pandoc document. -- The input may be a full pandoc document, a block list, a block, diff --git a/src/Text/Pandoc/Readers/OPML.hs b/src/Text/Pandoc/Readers/OPML.hs index 19ddba36b..b2e5f2e67 100644 --- a/src/Text/Pandoc/Readers/OPML.hs +++ b/src/Text/Pandoc/Readers/OPML.hs @@ -9,9 +9,7 @@ import Text.Pandoc.Readers.Markdown (readMarkdown) import Text.XML.Light import Text.Pandoc.Compat.TagSoupEntity (lookupEntity) import Data.Generics -import Data.Monoid import Control.Monad.State -import Control.Applicative ((<$>), (<$)) import Data.Default import Text.Pandoc.Compat.Except import Text.Pandoc.Error diff --git a/src/Text/Pandoc/Readers/Odt.hs b/src/Text/Pandoc/Readers/Odt.hs index 1c8ec51bc..a925c1d84 100644 --- a/src/Text/Pandoc/Readers/Odt.hs +++ b/src/Text/Pandoc/Readers/Odt.hs @@ -36,7 +36,6 @@ import Codec.Archive.Zip import qualified Text.XML.Light as XML import qualified Data.ByteString.Lazy as B -import Data.Monoid ( mempty ) import Text.Pandoc.Definition import Text.Pandoc.Error diff --git a/src/Text/Pandoc/Readers/Odt/Arrows/State.hs b/src/Text/Pandoc/Readers/Odt/Arrows/State.hs index 310ca028e..30f96c557 100644 --- a/src/Text/Pandoc/Readers/Odt/Arrows/State.hs +++ b/src/Text/Pandoc/Readers/Odt/Arrows/State.hs @@ -44,9 +44,9 @@ import qualified Control.Category as Cat import Control.Arrow import Control.Monad -import Data.Monoid import Data.Foldable +import Text.Pandoc.Compat.Monoid import Text.Pandoc.Readers.Odt.Arrows.Utils import Text.Pandoc.Readers.Odt.Generic.Fallible diff --git a/src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs b/src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs index 9710973b3..8c9ee0539 100644 --- a/src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs +++ b/src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs @@ -42,12 +42,11 @@ module Text.Pandoc.Readers.Odt.Arrows.Utils where import Control.Arrow import Control.Monad ( join, MonadPlus(..) ) -import Data.Monoid import qualified Data.Foldable as F import Text.Pandoc.Readers.Odt.Generic.Fallible import Text.Pandoc.Readers.Odt.Generic.Utils - +import Text.Pandoc.Compat.Monoid and2 :: (Arrow a) => a b c -> a b c' -> a b (c,c') and2 = (&&&) @@ -130,24 +129,23 @@ joinOn :: (Arrow a) => (x -> y -> z) -> a (x,y) z joinOn = arr.uncurry -- | Applies a function to the uncurried result-pair of an arrow-application. --- (The §-symbol was chosen to evoke an association with pairs through the --- shared first character) -(>>§) :: (Arrow a) => a x (b,c) -> (b -> c -> d) -> a x d -a >>§ f = a >>^ uncurry f +-- (The %-symbol was chosen to evoke an association with pairs.) +(>>%) :: (Arrow a) => a x (b,c) -> (b -> c -> d) -> a x d +a >>% f = a >>^ uncurry f --- | '(>>§)' with its arguments flipped -(§<<) :: (Arrow a) => (b -> c -> d) -> a x (b,c) -> a x d -(§<<) = flip (>>§) +-- | '(>>%)' with its arguments flipped +(%<<) :: (Arrow a) => (b -> c -> d) -> a x (b,c) -> a x d +(%<<) = flip (>>%) -- | Precomposition with an uncurried function -(§>>) :: (Arrow a) => (b -> c -> d) -> a d r -> a (b,c) r -f §>> a = uncurry f ^>> a +(%>>) :: (Arrow a) => (b -> c -> d) -> a d r -> a (b,c) r +f %>> a = uncurry f ^>> a -- | Precomposition with an uncurried function (right to left variant) -(<<§) :: (Arrow a) => a d r -> (b -> c -> d) -> a (b,c) r -(<<§) = flip (§>>) +(<<%) :: (Arrow a) => a d r -> (b -> c -> d) -> a (b,c) r +(<<%) = flip (%>>) -infixr 2 >>§, §<<, §>>, <<§ +infixr 2 >>%, %<<, %>>, <<% -- | Duplicate a value and apply an arrow to the second instance. @@ -272,7 +270,7 @@ newtype ParallelArrow a b c = CoEval { evalParallelArrow :: a b c } instance (Arrow a, Monoid m) => Monoid (ParallelArrow a b m) where mempty = CoEval $ returnV mempty - (CoEval a) `mappend` (CoEval ~b) = CoEval $ a &&& b >>§ mappend + (CoEval a) `mappend` (CoEval ~b) = CoEval $ a &&& b >>% mappend -- | Evaluates a collection of arrows in a parallel fashion. -- @@ -434,29 +432,29 @@ a ^>>?^? f = a ^>> Left ^|||^ f a >>?! f = a >>> right f --- -(>>?§) :: (ArrowChoice a, Monoid f) +(>>?%) :: (ArrowChoice a, Monoid f) => FallibleArrow a x f (b,b') -> (b -> b' -> c) -> FallibleArrow a x f c -a >>?§ f = a >>?^ (uncurry f) +a >>?% f = a >>?^ (uncurry f) --- -(^>>?§) :: (ArrowChoice a, Monoid f) +(^>>?%) :: (ArrowChoice a, Monoid f) => (x -> Either f (b,b')) -> (b -> b' -> c) -> FallibleArrow a x f c -a ^>>?§ f = arr a >>?^ (uncurry f) +a ^>>?% f = arr a >>?^ (uncurry f) --- -(>>?§?) :: (ArrowChoice a, Monoid f) +(>>?%?) :: (ArrowChoice a, Monoid f) => FallibleArrow a x f (b,b') -> (b -> b' -> (Either f c)) -> FallibleArrow a x f c -a >>?§? f = a >>?^? (uncurry f) +a >>?%? f = a >>?^? (uncurry f) infixr 1 >>?, >>?^, >>?^? infixr 1 ^>>?, ^>>?^, ^>>?^?, >>?! -infixr 1 >>?§, ^>>?§, >>?§? +infixr 1 >>?%, ^>>?%, >>?%? -- | Keep values that are Right, replace Left values by a constant. ifFailedUse :: (ArrowChoice a) => v -> a (Either f v) v diff --git a/src/Text/Pandoc/Readers/Odt/ContentReader.hs b/src/Text/Pandoc/Readers/Odt/ContentReader.hs index 9bb585b8e..1f1c57646 100644 --- a/src/Text/Pandoc/Readers/Odt/ContentReader.hs +++ b/src/Text/Pandoc/Readers/Odt/ContentReader.hs @@ -44,7 +44,6 @@ import Control.Applicative hiding ( liftA, liftA2, liftA3 ) import qualified Data.Map as M import Data.List ( find ) -import Data.Monoid import Data.Maybe import qualified Text.XML.Light as XML @@ -146,7 +145,7 @@ type OdtReaderSafe a b = XMLReaderSafe ReaderState a b fromStyles :: (a -> Styles -> b) -> OdtReaderSafe a b fromStyles f = keepingTheValue (getExtraState >>^ styleSet) - >>§ f + >>% f -- getStyleByName :: OdtReader StyleName Style @@ -163,7 +162,7 @@ lookupListStyle = fromStyles lookupListStyleByName >>^ maybeToChoice -- switchCurrentListStyle :: OdtReaderSafe (Maybe ListStyle) (Maybe ListStyle) switchCurrentListStyle = keepingTheValue getExtraState - >>§ swapCurrentListStyle + >>% swapCurrentListStyle >>> first setExtraState >>^ snd @@ -171,7 +170,7 @@ switchCurrentListStyle = keepingTheValue getExtraState pushStyle :: OdtReaderSafe Style Style pushStyle = keepingTheValue ( ( keepingTheValue getExtraState - >>§ pushStyle' + >>% pushStyle' ) >>> setExtraState ) @@ -471,7 +470,7 @@ matchingElement :: (Monoid e) matchingElement ns name reader = (ns, name, asResultAccumulator reader) where asResultAccumulator :: (ArrowChoice a, Monoid m) => a m m -> a m (Fallible m) - asResultAccumulator a = liftAsSuccess $ keepingTheValue a >>§ (<>) + asResultAccumulator a = liftAsSuccess $ keepingTheValue a >>% (<>) -- matchChildContent' :: (Monoid result) @@ -498,14 +497,14 @@ matchChildContent ls fallback = returnV mempty >>> matchContent ls fallback -- -- | Open Document allows several consecutive spaces if they are marked up read_plain_text :: OdtReaderSafe (Inlines, XML.Content) Inlines -read_plain_text = fst ^&&& read_plain_text' >>§ recover +read_plain_text = fst ^&&& read_plain_text' >>% recover where -- fallible version read_plain_text' :: OdtReader (Inlines, XML.Content) Inlines read_plain_text' = ( second ( arr extractText ) >>^ spreadChoice >>?! second text ) - >>?§ (<>) + >>?% (<>) -- extractText :: XML.Content -> Fallible String extractText (XML.Text cData) = succeedWith (XML.cdData cData) diff --git a/src/Text/Pandoc/Readers/Odt/Generic/Fallible.hs b/src/Text/Pandoc/Readers/Odt/Generic/Fallible.hs index 5922164c9..d0fdc228f 100644 --- a/src/Text/Pandoc/Readers/Odt/Generic/Fallible.hs +++ b/src/Text/Pandoc/Readers/Odt/Generic/Fallible.hs @@ -41,9 +41,8 @@ module Text.Pandoc.Readers.Odt.Generic.Fallible where import Control.Applicative import Control.Monad - +import Text.Pandoc.Compat.Monoid ((<>)) import qualified Data.Foldable as F -import Data.Monoid -- | Default for now. Will probably become a class at some point. type Failure = () diff --git a/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs b/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs index ec7e0ea5e..8c03d1a09 100644 --- a/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs +++ b/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs @@ -123,7 +123,6 @@ import Control.Arrow import qualified Data.Map as M import qualified Data.Foldable as F import Data.Default -import Data.Monoid ( Monoid ) import Data.Maybe import qualified Text.XML.Light as XML @@ -332,7 +331,7 @@ convertingExtraState v a = withSubStateF setVAsExtraState modifyWithA where setVAsExtraState = liftAsSuccess $ extractFromState id >>^ replaceExtraState v modifyWithA = keepingTheValue (moreState ^>> a) - >>^ spreadChoice >>?§ flip replaceExtraState + >>^ spreadChoice >>?% flip replaceExtraState -- | First sets the extra state to the new value. Then produces a new -- extra state with a converter that uses the new state. Finally, the @@ -414,14 +413,14 @@ elemName :: (NameSpaceID nsID) -> XMLConverter nsID extraState x XML.QName elemName nsID name = lookupNSiri nsID &&& lookupNSprefix nsID - >>§ XML.QName name + >>% XML.QName name -- | Checks if a given element matches both a specified namespace id -- and a specified element name elemNameIs :: (NameSpaceID nsID) => nsID -> ElementName -> XMLConverter nsID extraState XML.Element Bool -elemNameIs nsID name = keepingTheValue (lookupNSiri nsID) >>§ hasThatName +elemNameIs nsID name = keepingTheValue (lookupNSiri nsID) >>% hasThatName where hasThatName e iri = let elName = XML.elName e in XML.qName elName == name && XML.qURI elName == iri @@ -462,8 +461,8 @@ currentElemIs'' nsID name = ( (getCurrentElement >>^ XML.elName >>> (XML.qName >>^ (&&).(== name) ) ^&&&^ (XML.qIRI >>^ (==) ) - ) >>§ (.) - ) &&& lookupNSiri nsID >>§ ($) + ) >>% (.) + ) &&& lookupNSiri nsID >>% ($) -} -- @@ -488,7 +487,7 @@ findChildren :: (NameSpaceID nsID) -> XMLConverter nsID extraState x [XML.Element] findChildren nsID name = elemName nsID name &&& getCurrentElement - >>§ XML.findChildren + >>% XML.findChildren -- filterChildren :: (XML.Element -> Bool) @@ -509,7 +508,7 @@ findChild' :: (NameSpaceID nsID) -> XMLConverter nsID extraState x (Maybe XML.Element) findChild' nsID name = elemName nsID name &&& getCurrentElement - >>§ XML.findChild + >>% XML.findChild -- findChild :: (NameSpaceID nsID) @@ -597,7 +596,7 @@ isThatTheAttrValue :: (NameSpaceID nsID) isThatTheAttrValue nsID attrName = keepingTheValue (findAttr nsID attrName) - >>§ right.(==) + >>% right.(==) -- | Lookup value in a dictionary, fail if no attribute found or value -- not in dictionary @@ -670,7 +669,7 @@ findAttr' :: (NameSpaceID nsID) -> XMLConverter nsID extraState x (Maybe AttributeValue) findAttr' nsID attrName = elemName nsID attrName &&& getCurrentElement - >>§ XML.findAttr + >>% XML.findAttr -- | Return value as string or fail findAttr :: (NameSpaceID nsID) @@ -788,7 +787,7 @@ prepareIteration :: (NameSpaceID nsID) -> XMLConverter nsID extraState b [(b, XML.Element)] prepareIteration nsID name = keepingTheValue (findChildren nsID name) - >>§ distributeValue + >>% distributeValue -- | Applies a converter to every child element of a specific type. -- Collects results in a 'Monoid'. @@ -878,9 +877,9 @@ makeMatcherE nsID name c = ( second ( elemNameIs nsID name >>^ bool Nothing (Just tryC) ) - >>§ (<|>) + >>% (<|>) ) &&&^ snd - where tryC = (fst ^&&& executeThere c >>§ recover) &&&^ snd + where tryC = (fst ^&&& executeThere c >>% recover) &&&^ snd -- Helper function: The @c@ is actually a converter that is to be selected by -- matching XML content to the first two parameters. @@ -900,14 +899,14 @@ makeMatcherC nsID name c = ( second ( contentToElem >>^ bool Nothing (Just cWithJump) ) ) - >>§ (<|>) + >>% (<|>) ) &&&^ snd where cWithJump = ( fst ^&&& ( second contentToElem >>> spreadChoice ^>>? executeThere c ) - >>§ recover) + >>% recover) &&&^ snd contentToElem :: FallibleXMLConverter nsID extraState XML.Content XML.Element contentToElem = arr $ \e -> case e of diff --git a/src/Text/Pandoc/Readers/Odt/Namespaces.hs b/src/Text/Pandoc/Readers/Odt/Namespaces.hs index e28056814..deb009998 100644 --- a/src/Text/Pandoc/Readers/Odt/Namespaces.hs +++ b/src/Text/Pandoc/Readers/Odt/Namespaces.hs @@ -107,4 +107,4 @@ nsIDs = [ ("http://www.w3.org/1999/xhtml" , NsXHtml ), ("http://www.w3.org/2002/xforms" , NsXForms ), ("http://www.w3.org/1999/xlink" , NsXLink ) - ]
\ No newline at end of file + ] diff --git a/src/Text/Pandoc/Readers/Odt/StyleReader.hs b/src/Text/Pandoc/Readers/Odt/StyleReader.hs index 1cf87cc59..96cfed0b3 100644 --- a/src/Text/Pandoc/Readers/Odt/StyleReader.hs +++ b/src/Text/Pandoc/Readers/Odt/StyleReader.hs @@ -78,7 +78,6 @@ import qualified Data.Map as M import qualified Data.Set as S import Data.List ( unfoldr ) import Data.Default -import Data.Monoid import Data.Maybe import qualified Text.XML.Light as XML @@ -175,7 +174,7 @@ findPitch :: XMLReaderSafe FontPitches _x (Maybe FontPitch) findPitch = ( lookupAttr NsStyle "font-pitch" `ifFailedDo` findAttr NsStyle "font-name" >>? ( keepingTheValue getExtraState - >>§ M.lookup + >>% M.lookup >>^ maybeToChoice ) ) @@ -362,11 +361,11 @@ instance Read XslUnit where estimateInMillimeter :: Int -> XslUnit -> Int estimateInMillimeter n XslUnitMM = n estimateInMillimeter n XslUnitCM = n * 10 -estimateInMillimeter n XslUnitInch = n * 25 -- * 25.4 -estimateInMillimeter n XslUnitPoints = n `div` 3 -- * 1/72 * 25.4 -estimateInMillimeter n XslUnitPica = n * 4 -- * 12 * 1/72 * 25.4 -estimateInMillimeter n XslUnitPixel = n `div`3 -- * 1/72 * 25.4 -estimateInMillimeter n XslUnitEM = n * 7 -- * 16 * 1/72 * 25.4 +estimateInMillimeter n XslUnitInch = n * 25 -- \* 25.4 +estimateInMillimeter n XslUnitPoints = n `div` 3 -- \* 1/72 * 25.4 +estimateInMillimeter n XslUnitPica = n * 4 -- \* 12 * 1/72 * 25.4 +estimateInMillimeter n XslUnitPixel = n `div`3 -- \* 1/72 * 25.4 +estimateInMillimeter n XslUnitEM = n * 7 -- \* 16 * 1/72 * 25.4 ---- @@ -385,7 +384,7 @@ getListLevelStyle level ListStyle{..} = let (lower , exactHit , _) = M.splitLookup level levelStyles in exactHit <|> fmap fst (M.maxView lower) -- findBy (`M.lookup` levelStyles) [level, (level-1) .. 1] - -- ^ simpler, but in general less efficient + -- \^ simpler, but in general less efficient data ListLevelStyle = ListLevelStyle { listLevelType :: ListLevelType , listItemPrefix :: Maybe String @@ -448,7 +447,7 @@ readAllStyles :: StyleReader _x Styles readAllStyles = ( readFontPitches >>?! ( readAutomaticStyles &&& readStyles )) - >>?§? chooseMax + >>?%? chooseMax -- all top elements are always on the same hierarchy level -- diff --git a/src/Text/Pandoc/Readers/Org.hs b/src/Text/Pandoc/Readers/Org.hs index 980f63504..3be47cfd4 100644 --- a/src/Text/Pandoc/Readers/Org.hs +++ b/src/Text/Pandoc/Readers/Org.hs @@ -2,7 +2,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, FlexibleInstances #-} {- -Copyright (C) 2014-2015 Albert Krewinkel <tarleb@moltkeplatz.de> +Copyright (C) 2014-2015 Albert Krewinkel <tarleb+pandoc@moltkeplatz.de> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,19 +21,20 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA {- | Module : Text.Pandoc.Readers.Org - Copyright : Copyright (C) 2014 Albert Krewinkel + Copyright : Copyright (C) 2014-2015 Albert Krewinkel License : GNU GPL, version 2 or above - Maintainer : Albert Krewinkel <tarleb@moltkeplatz.de> + Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de> Conversion of org-mode formatted plain text to 'Pandoc' document. -} module Text.Pandoc.Readers.Org ( readOrg ) where import qualified Text.Pandoc.Builder as B -import Text.Pandoc.Builder ( Inlines, Blocks, HasMeta(..), (<>) - , trimInlines ) +import Text.Pandoc.Builder ( Inlines, Blocks, HasMeta(..), + trimInlines ) import Text.Pandoc.Definition +import Text.Pandoc.Compat.Monoid ((<>)) import Text.Pandoc.Options import qualified Text.Pandoc.Parsing as P import Text.Pandoc.Parsing hiding ( F, unF, askF, asksF, runF @@ -45,8 +46,6 @@ import Text.Pandoc.Shared (compactify', compactify'DL) import Text.TeXMath (readTeX, writePandoc, DisplayType(..)) import qualified Text.TeXMath.Readers.MathML.EntityMap as MathMLEntityMap -import Control.Applicative ( Applicative, pure - , (<$>), (<$), (<*>), (<*), (*>) ) import Control.Arrow (first) import Control.Monad (foldM, guard, liftM, liftM2, mplus, mzero, when) import Control.Monad.Reader (Reader, runReader, ask, asks, local) @@ -55,7 +54,6 @@ import Data.Default import Data.List (intersperse, isPrefixOf, isSuffixOf) import qualified Data.Map as M import Data.Maybe (fromMaybe, isJust) -import Data.Monoid (Monoid, mconcat, mempty, mappend) import Network.HTTP (urlEncode) import Text.Pandoc.Error @@ -70,6 +68,14 @@ data OrgParserLocal = OrgParserLocal { orgLocalQuoteContext :: QuoteContext } type OrgParser = ParserT [Char] OrgParserState (Reader OrgParserLocal) +instance HasIdentifierList OrgParserState where + extractIdentifierList = orgStateIdentifiers + updateIdentifierList f s = s{ orgStateIdentifiers = f (orgStateIdentifiers s) } + +instance HasHeaderMap OrgParserState where + extractHeaderMap = orgStateHeaderMap + updateHeaderMap f s = s{ orgStateHeaderMap = f (orgStateHeaderMap s) } + parseOrg :: OrgParser Pandoc parseOrg = do blocks' <- parseBlocks @@ -135,6 +141,9 @@ data OrgParserState = OrgParserState , orgStateMeta :: Meta , orgStateMeta' :: F Meta , orgStateNotes' :: OrgNoteTable + , orgStateParserContext :: ParserContext + , orgStateIdentifiers :: [String] + , orgStateHeaderMap :: M.Map Inlines String } instance Default OrgParserLocal where @@ -174,6 +183,9 @@ defaultOrgParserState = OrgParserState , orgStateMeta = nullMeta , orgStateMeta' = return nullMeta , orgStateNotes' = [] + , orgStateParserContext = NullState + , orgStateIdentifiers = [] + , orgStateHeaderMap = M.empty } recordAnchorId :: String -> OrgParser () @@ -282,6 +294,23 @@ blanklines = <* updateLastPreCharPos <* updateLastForbiddenCharPos +-- | Succeeds when we're in list context. +inList :: OrgParser () +inList = do + ctx <- orgStateParserContext <$> getState + guard (ctx == ListItemState) + +-- | Parse in different context +withContext :: ParserContext -- ^ New parser context + -> OrgParser a -- ^ Parser to run in that context + -> OrgParser a +withContext context parser = do + oldContext <- orgStateParserContext <$> getState + updateState $ \s -> s{ orgStateParserContext = context } + result <- parser + updateState $ \s -> s{ orgStateParserContext = oldContext } + return result + -- -- parsing blocks -- @@ -397,7 +426,7 @@ verseBlock blkProp = try $ do ignHeaders content <- rawBlockContent blkProp fmap B.para . mconcat . intersperse (pure B.linebreak) - <$> mapM (parseFromString parseInlines) (lines content) + <$> mapM (parseFromString parseInlines) (map (++ "\n") . lines $ content) exportsCode :: [(String, String)] -> Bool exportsCode attrs = not (("rundoc-exports", "none") `elem` attrs @@ -504,10 +533,16 @@ rundocBlockClass :: String rundocBlockClass = rundocPrefix ++ "block" blockOption :: OrgParser (String, String) -blockOption = try $ (,) <$> orgArgKey <*> orgParamValue +blockOption = try $ do + argKey <- orgArgKey + paramValue <- option "yes" orgParamValue + return (argKey, paramValue) inlineBlockOption :: OrgParser (String, String) -inlineBlockOption = try $ (,) <$> orgArgKey <*> orgInlineParamValue +inlineBlockOption = try $ do + argKey <- orgArgKey + paramValue <- option "yes" orgInlineParamValue + return (argKey, paramValue) orgArgKey :: OrgParser String orgArgKey = try $ @@ -516,11 +551,17 @@ orgArgKey = try $ orgParamValue :: OrgParser String orgParamValue = try $ - skipSpaces *> many1 (noneOf "\t\n\r ") <* skipSpaces + skipSpaces + *> notFollowedBy (char ':' ) + *> many1 (noneOf "\t\n\r ") + <* skipSpaces orgInlineParamValue :: OrgParser String orgInlineParamValue = try $ - skipSpaces *> many1 (noneOf "\t\n\r ]") <* skipSpaces + skipSpaces + *> notFollowedBy (char ':') + *> many1 (noneOf "\t\n\r ]") + <* skipSpaces orgArgWordChar :: OrgParser Char orgArgWordChar = alphaNum <|> oneOf "-_" @@ -668,7 +709,10 @@ header = try $ do title <- manyTill inline (lookAhead headerEnd) tags <- headerEnd let inlns = trimInlinesF . mconcat $ title <> map tagToInlineF tags - return $ B.header level <$> inlns + st <- getState + let inlines = runF inlns st + attr <- registerHeader nullAttr inlines + return $ pure (B.headerWith attr level inlines) where tagToInlineF :: String -> F Inlines tagToInlineF t = return $ B.spanWith ("", ["tag"], [("data-tag-name", t)]) mempty @@ -687,7 +731,7 @@ headerTags = try $ headerStart :: OrgParser Int headerStart = try $ - (length <$> many1 (char '*')) <* many1 (char ' ') + (length <$> many1 (char '*')) <* many1 (char ' ') <* updateLastPreCharPos -- Don't use (or need) the reader wrapper here, we want hline to be @@ -879,9 +923,13 @@ noteBlock = try $ do paraOrPlain :: OrgParser (F Blocks) paraOrPlain = try $ do ils <- parseInlines - nl <- option False (newline >> return True) - try (guard nl >> notFollowedBy (orderedListStart <|> bulletListStart) >> - return (B.para <$> ils)) + nl <- option False (newline *> return True) + -- Read block as paragraph, except if we are in a list context and the block + -- is directly followed by a list item, in which case the block is read as + -- plain text. + try (guard nl + *> notFollowedBy (inList *> (orderedListStart <|> bulletListStart)) + *> return (B.para <$> ils)) <|> (return (B.plain <$> ils)) inlinesTillNewline :: OrgParser (F Inlines) @@ -946,19 +994,22 @@ definitionListItem :: OrgParser Int -> OrgParser (F (Inlines, [Blocks])) definitionListItem parseMarkerGetLength = try $ do markerLength <- parseMarkerGetLength - term <- manyTill (noneOf "\n\r") (try $ string "::") + term <- manyTill (noneOf "\n\r") (try definitionMarker) line1 <- anyLineNewline blank <- option "" ("\n" <$ blankline) cont <- concat <$> many (listContinuation markerLength) term' <- parseFromString parseInlines term contents' <- parseFromString parseBlocks $ line1 ++ blank ++ cont return $ (,) <$> term' <*> fmap (:[]) contents' + where + definitionMarker = + spaceChar *> string "::" <* (spaceChar <|> lookAhead P.newline) -- parse raw text for one list item, excluding start marker and continuations listItem :: OrgParser Int -> OrgParser (F Blocks) -listItem start = try $ do +listItem start = try . withContext ListItemState $ do markerLength <- try start firstLine <- anyLineNewline blank <- option "" ("\n" <$ blankline) @@ -1537,8 +1588,11 @@ smart :: OrgParser (F Inlines) smart = do getOption readerSmart >>= guard doubleQuoted <|> singleQuoted <|> - choice (map (return <$>) [orgApostrophe, dash, ellipses]) - where orgApostrophe = + choice (map (return <$>) [orgApostrophe, orgDash, orgEllipses]) + where + orgDash = dash <* updatePositions '-' + orgEllipses = ellipses <* updatePositions '.' + orgApostrophe = (char '\'' <|> char '\8217') <* updateLastPreCharPos <* updateLastForbiddenCharPos *> return (B.str "\x2019") @@ -1546,9 +1600,10 @@ smart = do singleQuoted :: OrgParser (F Inlines) singleQuoted = try $ do singleQuoteStart + updatePositions '\'' withQuoteContext InSingleQuote $ fmap B.singleQuoted . trimInlinesF . mconcat <$> - many1Till inline singleQuoteEnd + many1Till inline (singleQuoteEnd <* updatePositions '\'') -- doubleQuoted will handle regular double-quoted sections, as well -- as dialogues with an open double-quote without a close double-quote @@ -1556,6 +1611,7 @@ singleQuoted = try $ do doubleQuoted :: OrgParser (F Inlines) doubleQuoted = try $ do doubleQuoteStart + updatePositions '"' contents <- mconcat <$> many (try $ notFollowedBy doubleQuoteEnd >> inline) (withQuoteContext InDoubleQuote $ (doubleQuoteEnd <* updateLastForbiddenCharPos) >> return (fmap B.doubleQuoted . trimInlinesF $ contents)) diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 4138d65ea..0e5bb2a87 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -44,13 +44,11 @@ import Data.List ( findIndex, intersperse, intercalate, import Data.Maybe (fromMaybe) import qualified Data.Map as M import Text.Printf ( printf ) -import Control.Applicative ((<$>), (<$), (<*), (*>), (<*>), pure) -import Text.Pandoc.Builder (Inlines, Blocks, trimInlines, (<>)) +import Text.Pandoc.Builder (Inlines, Blocks, trimInlines) import qualified Text.Pandoc.Builder as B -import Data.Monoid (mconcat, mempty) import Data.Sequence (viewr, ViewR(..)) import Data.Char (toLower, isHexDigit, isSpace) - +import Text.Pandoc.Compat.Monoid ((<>)) import Text.Pandoc.Error -- | Parse reStructuredText string and return Pandoc document. @@ -614,20 +612,22 @@ directive' = do return mempty -- TODO: --- - Silently ignores illegal fields -- - Only supports :format: fields with a single format for :raw: roles, -- change Text.Pandoc.Definition.Format to fix addNewRole :: String -> [(String, String)] -> RSTParser Blocks addNewRole roleString fields = do (role, parentRole) <- parseFromString inheritedRole roleString customRoles <- stateRstCustomRoles <$> getState - let (baseRole, baseFmt, baseAttr) = - maybe (parentRole, Nothing, nullAttr) id $ - M.lookup parentRole customRoles + let getBaseRole (r, f, a) roles = + case M.lookup r roles of + Just (r', f', a') -> getBaseRole (r', f', a') roles + Nothing -> (r, f, a) + (baseRole, baseFmt, baseAttr) = + getBaseRole (parentRole, Nothing, nullAttr) customRoles fmt = if parentRole == "raw" then lookup "format" fields else baseFmt annotate :: [String] -> [String] annotate = maybe id (:) $ - if parentRole == "code" + if baseRole == "code" then lookup "language" fields else Nothing attr = let (ident, classes, keyValues) = baseAttr @@ -636,12 +636,12 @@ addNewRole roleString fields = do -- warn about syntax we ignore flip mapM_ fields $ \(key, _) -> case key of - "language" -> when (parentRole /= "code") $ addWarning Nothing $ + "language" -> when (baseRole /= "code") $ addWarning Nothing $ "ignoring :language: field because the parent of role :" ++ - role ++ ": is :" ++ parentRole ++ ": not :code:" - "format" -> when (parentRole /= "raw") $ addWarning Nothing $ + role ++ ": is :" ++ baseRole ++ ": not :code:" + "format" -> when (baseRole /= "raw") $ addWarning Nothing $ "ignoring :format: field because the parent of role :" ++ - role ++ ": is :" ++ parentRole ++ ": not :raw:" + role ++ ": is :" ++ baseRole ++ ": not :raw:" _ -> addWarning Nothing $ "ignoring unknown field :" ++ key ++ ": in definition of role :" ++ role ++ ": in" when (parentRole == "raw" && countKeys "format" > 1) $ @@ -1138,7 +1138,7 @@ referenceLink = try $ do Just val -> return val -- if anonymous link, remove key so it won't be used again when (isAnonKey key) $ updateState $ \s -> s{ stateKeys = M.delete key keyTable } - return $ B.linkWith src tit attr label' + return $ B.linkWith attr src tit label' autoURI :: RSTParser Inlines autoURI = do diff --git a/src/Text/Pandoc/Readers/TWiki.hs b/src/Text/Pandoc/Readers/TWiki.hs index 07b414431..fc2bdc069 100644 --- a/src/Text/Pandoc/Readers/TWiki.hs +++ b/src/Text/Pandoc/Readers/TWiki.hs @@ -38,8 +38,6 @@ import qualified Text.Pandoc.Builder as B import Text.Pandoc.Options import Text.Pandoc.Parsing hiding (enclosed, macro, nested) import Text.Pandoc.Readers.HTML (htmlTag, isCommentTag) -import Data.Monoid (Monoid, mconcat, mempty) -import Control.Applicative ((<$>), (<*), (*>), (<$)) import Control.Monad import Text.Printf (printf) import Debug.Trace (trace) diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index ec1da896d..3db01faf4 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -64,9 +64,8 @@ import Text.HTML.TagSoup.Match import Data.List ( intercalate ) import Data.Char ( digitToInt, isUpper) import Control.Monad ( guard, liftM, when ) +import Text.Pandoc.Compat.Monoid ((<>)) import Text.Printf -import Control.Applicative ((<$>), (*>), (<*), (<$)) -import Data.Monoid import Debug.Trace (trace) import Text.Pandoc.Error @@ -81,11 +80,12 @@ readTextile opts s = -- | Generate a Pandoc ADT from a textile document parseTextile :: Parser [Char] ParserState Pandoc parseTextile = do - -- textile allows raw HTML and does smart punctuation by default + -- textile allows raw HTML and does smart punctuation by default, + -- but we do not enable smart punctuation unless it is explicitly + -- asked for, for better conversion to other light markup formats oldOpts <- stateOptions `fmap` getState updateState $ \state -> state{ stateOptions = - oldOpts{ readerSmart = True - , readerParseRaw = True + oldOpts{ readerParseRaw = True , readerOldDashes = True } } many blankline @@ -535,6 +535,7 @@ link = try $ do image :: Parser [Char] ParserState Inlines image = try $ do char '!' >> notFollowedBy space + _ <- attributes -- ignore for now, until we have image attributes src <- manyTill anyChar' (lookAhead $ oneOf "!(") alt <- option "" (try $ (char '(' >> manyTill anyChar' (char ')'))) char '!' diff --git a/src/Text/Pandoc/Readers/Txt2Tags.hs b/src/Text/Pandoc/Readers/Txt2Tags.hs index 304d6d4c5..58841f2ce 100644 --- a/src/Text/Pandoc/Readers/Txt2Tags.hs +++ b/src/Text/Pandoc/Readers/Txt2Tags.hs @@ -33,17 +33,15 @@ module Text.Pandoc.Readers.Txt2Tags ( readTxt2Tags where import qualified Text.Pandoc.Builder as B -import Text.Pandoc.Builder ( Inlines, Blocks, (<>) - , trimInlines ) +import Text.Pandoc.Builder ( Inlines, Blocks, trimInlines ) +import Text.Pandoc.Compat.Monoid ((<>)) import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Shared (escapeURI,compactify', compactify'DL) import Text.Pandoc.Parsing hiding (space, spaces, uri, macro) -import Control.Applicative ((<$>), (<$), (<*>), (<*), (*>)) import Data.Char (toLower) import Data.List (transpose, intersperse, intercalate) import Data.Maybe (fromMaybe) -import Data.Monoid (Monoid, mconcat, mempty, mappend) --import Network.URI (isURI) -- Not sure whether to use this function import Control.Monad (void, guard, when) import Data.Default @@ -53,7 +51,7 @@ import Text.Pandoc.Error import Data.Time.LocalTime (getZonedTime) import Text.Pandoc.Compat.Directory(getModificationTime) import Data.Time.Format (formatTime) -import Text.Pandoc.Compat.Locale (defaultTimeLocale) +import Text.Pandoc.Compat.Time (defaultTimeLocale) import System.IO.Error (catchIOError) type T2T = ParserT String ParserState (Reader T2TMeta) diff --git a/src/Text/Pandoc/SelfContained.hs b/src/Text/Pandoc/SelfContained.hs index a77127286..390a7a21a 100644 --- a/src/Text/Pandoc/SelfContained.hs +++ b/src/Text/Pandoc/SelfContained.hs @@ -46,7 +46,7 @@ import Text.Pandoc.MIME (MimeType) import Text.Pandoc.UTF8 (toString) import Text.Pandoc.Options (WriterOptions(..)) import Data.List (isPrefixOf) -import Control.Applicative +import Control.Applicative ((<|>)) import Text.Parsec (runParserT, ParsecT) import qualified Text.Parsec as P import Control.Monad.Trans (lift) @@ -135,7 +135,7 @@ pCSSUrl media sourceURL d = P.try $ do 'd':'a':'t':'a':':':_ -> return fallback u -> do let url' = if isURI u then u else d </> u enc <- lift $ getDataURI media sourceURL "" url' - return (B.pack enc) + return (B.pack $ "url(" ++ enc ++ ")") getDataURI :: MediaBag -> Maybe String -> MimeType -> String diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index a86e5da95..96dbec6f6 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -92,7 +92,9 @@ module Text.Pandoc.Shared ( -- * Safe read safeRead, -- * Temp directory - withTempDir + withTempDir, + -- * Version + pandocVersion ) where import Text.Pandoc.Definition @@ -106,35 +108,38 @@ import System.Exit (exitWith, ExitCode(..)) import Data.Char ( toLower, isLower, isUpper, isAlpha, isLetter, isDigit, isSpace ) import Data.List ( find, stripPrefix, intercalate ) +import Data.Version ( showVersion ) import qualified Data.Map as M import Network.URI ( escapeURIString, isURI, nonStrictRelativeTo, unEscapeString, parseURIReference, isAllowedInURI ) import qualified Data.Set as Set import System.Directory -import System.FilePath (joinPath, splitDirectories, pathSeparator, isPathSeparator) +import System.FilePath (splitDirectories, isPathSeparator) +import qualified System.FilePath.Posix as Posix import Text.Pandoc.MIME (MimeType, getMimeType) import System.FilePath ( (</>), takeExtension, dropExtension) import Data.Generics (Typeable, Data) import qualified Control.Monad.State as S import qualified Control.Exception as E -import Control.Applicative ((<$>)) import Control.Monad (msum, unless, MonadPlus(..)) import Text.Pandoc.Pretty (charWidth) -import Text.Pandoc.Compat.Locale (defaultTimeLocale) -import Data.Time +import Text.Pandoc.Compat.Time import Data.Time.Clock.POSIX import System.IO (stderr) import System.IO.Temp import Text.HTML.TagSoup (renderTagsOptions, RenderOptions(..), Tag(..), renderOptions) +import Text.Pandoc.Compat.Monoid ((<>)) import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as B8 -import Text.Pandoc.Compat.Monoid import Data.ByteString.Base64 (decodeLenient) import Data.Sequence (ViewR(..), ViewL(..), viewl, viewr) import qualified Data.Text as T (toUpper, pack, unpack) import Data.ByteString.Lazy (toChunks, fromChunks) import qualified Data.ByteString.Lazy as BL +import Paths_pandoc (version) + +import Codec.Archive.Zip #ifdef EMBED_DATA_FILES import Text.Pandoc.Data (dataFiles) @@ -155,7 +160,6 @@ import Network.HTTP.Client.TLS (tlsManagerSettings) import System.Environment (getEnv) import Network.HTTP.Types.Header ( hContentType) import Network (withSocketsDo) -import Codec.Archive.Zip #else import Network.URI (parseURI) import Network.HTTP (findHeader, rspBody, @@ -163,6 +167,10 @@ import Network.HTTP (findHeader, rspBody, import Network.Browser (browse, setAllowRedirects, setOutHandler, request) #endif +-- | Version number of pandoc library. +pandocVersion :: String +pandocVersion = showVersion version + -- -- List processing -- @@ -278,9 +286,12 @@ toRomanNumeral x = _ | x >= 1 -> "I" ++ toRomanNumeral (x - 1) _ -> "" --- | Escape whitespace in URI. +-- | Escape whitespace and some punctuation characters in URI. escapeURI :: String -> String -escapeURI = escapeURIString (not . isSpace) +escapeURI = escapeURIString (not . needsEscaping) + where needsEscaping c = isSpace c || c `elem` + ['<','>','|','"','{','}','[',']','^', '`'] + -- | Convert tabs to spaces and filter out DOS line endings. -- Tabs will be preserved if tab stop is set to 0. @@ -310,7 +321,12 @@ tabFilter tabStop = normalizeDate :: String -> Maybe String normalizeDate s = fmap (formatTime defaultTimeLocale "%F") (msum $ map (\fs -> parsetimeWith fs s) formats :: Maybe Day) - where parsetimeWith = parseTime defaultTimeLocale + where parsetimeWith = +#if MIN_VERSION_time(1,5,0) + parseTimeM True defaultTimeLocale +#else + parseTime defaultTimeLocale +#endif formats = ["%x","%m/%d/%Y", "%D","%F", "%d %b %Y", "%d %B %Y", "%b. %d, %Y", "%B %d, %Y", "%Y"] @@ -539,6 +555,7 @@ stringify = query go . walk deNote go (Str x) = x go (Code _ x) = x go (Math _ x) = x + go (RawInline (Format "html") ('<':'b':'r':_)) = " " -- see #2105 go LineBreak = " " go _ = "" deNote (Note _) = Str "" @@ -830,7 +847,7 @@ readDefaultDataFile fname = case lookup (makeCanonical fname) dataFiles of Nothing -> err 97 $ "Could not find data file " ++ fname Just contents -> return contents - where makeCanonical = joinPath . transformPathParts . splitDirectories + where makeCanonical = Posix.joinPath . transformPathParts . splitDirectories transformPathParts = reverse . foldl go [] go as "." = as go (_:as) ".." = as @@ -838,7 +855,6 @@ readDefaultDataFile fname = #else getDataFileName fname' >>= checkExistence >>= BS.readFile where fname' = if fname == "README" then fname else "data" </> fname -#endif checkExistence :: FilePath -> IO FilePath checkExistence fn = do @@ -846,6 +862,7 @@ checkExistence fn = do if exists then return fn else err 97 ("Could not find data file " ++ fn) +#endif -- | Read file from specified user data directory or, if not found there, from -- Cabal data directory. @@ -897,9 +914,9 @@ fetchItem' media sourceURL s = do -- | Read from a URL and return raw data and maybe mime type. openURL :: String -> IO (Either E.SomeException (BS.ByteString, Maybe MimeType)) openURL u - | Just u' <- stripPrefix "data:" u = - let mime = takeWhile (/=',') u' - contents = B8.pack $ unEscapeString $ drop 1 $ dropWhile (/=',') u' + | Just u'' <- stripPrefix "data:" u = + let mime = takeWhile (/=',') u'' + contents = B8.pack $ unEscapeString $ drop 1 $ dropWhile (/=',') u'' in return $ Right (decodeLenient contents, Just mime) #ifdef HTTP_CLIENT | otherwise = withSocketsDo $ E.try $ do @@ -965,14 +982,14 @@ hush (Right x) = Just x -- > collapseFilePath "parent/foo/.." == "parent" -- > collapseFilePath "/parent/foo/../../bar" == "/bar" collapseFilePath :: FilePath -> FilePath -collapseFilePath = joinPath . reverse . foldl go [] . splitDirectories +collapseFilePath = Posix.joinPath . reverse . foldl go [] . splitDirectories where go rs "." = rs go r@(p:rs) ".." = case p of ".." -> ("..":r) (checkPathSeperator -> Just True) -> ("..":r) _ -> rs - go _ (checkPathSeperator -> Just True) = [[pathSeparator]] + go _ (checkPathSeperator -> Just True) = [[Posix.pathSeparator]] go rs x = x:rs isSingleton [] = Nothing isSingleton [x] = Just x diff --git a/src/Text/Pandoc/Templates.hs b/src/Text/Pandoc/Templates.hs index b3243d752..a010433fa 100644 --- a/src/Text/Pandoc/Templates.hs +++ b/src/Text/Pandoc/Templates.hs @@ -98,11 +98,10 @@ import Control.Monad (guard, when) import Data.Aeson (ToJSON(..), Value(..)) import qualified Text.Parsec as P import Text.Parsec.Text (Parser) -import Control.Applicative +import Text.Pandoc.Compat.Monoid ((<>)) import qualified Data.Text as T import Data.Text (Text) import Data.Text.Encoding (encodeUtf8) -import Text.Pandoc.Compat.Monoid ((<>), Monoid(..)) import Data.List (intersperse) import System.FilePath ((</>), (<.>)) import qualified Data.Map as M @@ -118,6 +117,7 @@ import Text.Blaze (preEscapedText, Html) import Data.ByteString.Lazy (ByteString, fromChunks) import Text.Pandoc.Shared (readDataFileUTF8, ordNub) import Data.Vector ((!?)) +import Control.Applicative (many, (<|>)) -- | Get default template for the specified writer. getDefaultTemplate :: (Maybe FilePath) -- ^ User data directory to search first diff --git a/src/Text/Pandoc/Writers/AsciiDoc.hs b/src/Text/Pandoc/Writers/AsciiDoc.hs index 4e8c96907..174b00dac 100644 --- a/src/Text/Pandoc/Writers/AsciiDoc.hs +++ b/src/Text/Pandoc/Writers/AsciiDoc.hs @@ -51,7 +51,6 @@ import Control.Monad.State import qualified Data.Map as M import Data.Aeson (Value(String), fromJSON, toJSON, Result(..)) import qualified Data.Text as T -import Control.Applicative ((<*), (*>)) data WriterState = WriterState { defListMarker :: String , orderedListLevel :: Int diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs index 56fcd4b0b..bbc5f7132 100644 --- a/src/Text/Pandoc/Writers/ConTeXt.hs +++ b/src/Text/Pandoc/Writers/ConTeXt.hs @@ -81,16 +81,21 @@ pandocToConTeXt options (Pandoc meta blocks) = do "subsubsubsection","subsubsubsubsection"]) $ defField "body" main $ defField "number-sections" (writerNumberSections options) - $ defField "mainlang" (maybe "" - (reverse . takeWhile (/=',') . reverse) - (lookup "lang" $ writerVariables options)) $ metadata + let context' = defField "context-lang" (maybe "" (fromBcp47 . splitBy (=='-')) $ + getField "lang" context) + $ defField "context-dir" (toContextDir $ getField "dir" context) + $ context return $ if writerStandalone options - then renderTemplate' (writerTemplate options) context + then renderTemplate' (writerTemplate options) context' else main --- escape things as needed for ConTeXt +toContextDir :: Maybe String -> String +toContextDir (Just "rtl") = "r2l" +toContextDir (Just "ltr") = "l2r" +toContextDir _ = "" +-- | escape things as needed for ConTeXt escapeCharForConTeXt :: WriterOptions -> Char -> String escapeCharForConTeXt opts ch = let ligatures = writerTeXLigatures opts in @@ -156,13 +161,22 @@ blockToConTeXt (CodeBlock _ str) = -- blankline because \stoptyping can't have anything after it, inc. '}' blockToConTeXt (RawBlock "context" str) = return $ text str <> blankline blockToConTeXt (RawBlock _ _ ) = return empty -blockToConTeXt (Div (ident,_,_) bs) = do - contents <- blockListToConTeXt bs - if null ident - then return contents - else return $ - ("\\reference" <> brackets (text $ toLabel ident) <> braces empty <> - "%") $$ contents +blockToConTeXt (Div (ident,_,kvs) bs) = do + let align dir txt = "\\startalignment[" <> dir <> "]" $$ txt $$ "\\stopalignment" + let wrapRef txt = if null ident + then txt + else ("\\reference" <> brackets (text $ toLabel ident) <> + braces empty <> "%") $$ txt + wrapDir = case lookup "dir" kvs of + Just "rtl" -> align "righttoleft" + Just "ltr" -> align "lefttoright" + _ -> id + wrapLang txt = case lookup "lang" kvs of + Just lng -> "\\start\\language[" + <> text (fromBcp47' lng) <> "]" $$ txt $$ "\\stop" + Nothing -> txt + wrapBlank txt = blankline <> txt <> blankline + fmap (wrapBlank . wrapLang . wrapDir . wrapRef) $ blockListToConTeXt bs blockToConTeXt (BulletList lst) = do contents <- mapM listItemToConTeXt lst return $ ("\\startitemize" <> if isTightList lst @@ -358,7 +372,16 @@ inlineToConTeXt (Note contents) = do then text "\\footnote{" <> nest 2 contents' <> char '}' else text "\\startbuffer " <> nest 2 contents' <> text "\\stopbuffer\\footnote{\\getbuffer}" -inlineToConTeXt (Span _ ils) = inlineListToConTeXt ils +inlineToConTeXt (Span (_,_,kvs) ils) = do + let wrapDir txt = case lookup "dir" kvs of + Just "rtl" -> braces $ "\\righttoleft " <> txt + Just "ltr" -> braces $ "\\lefttoright " <> txt + _ -> txt + wrapLang txt = case lookup "lang" kvs of + Just lng -> "\\start\\language[" <> text (fromBcp47' lng) + <> "]" <> txt <> "\\stop " + Nothing -> txt + fmap (wrapLang . wrapDir) $ inlineListToConTeXt ils -- | Craft the section header, inserting the secton reference, if supplied. sectionHeader :: Attr @@ -385,3 +408,38 @@ sectionHeader (ident,classes,_) hdrLevel lst = do then char '\\' <> chapter <> braces contents else contents <> blankline +fromBcp47' :: String -> String +fromBcp47' = fromBcp47 . splitBy (=='-') + +-- Takes a list of the constituents of a BCP 47 language code +-- and irons out ConTeXt's exceptions +-- https://tools.ietf.org/html/bcp47#section-2.1 +-- http://wiki.contextgarden.net/Language_Codes +fromBcp47 :: [String] -> String +fromBcp47 [] = "" +fromBcp47 ("ar":"SY":_) = "ar-sy" +fromBcp47 ("ar":"IQ":_) = "ar-iq" +fromBcp47 ("ar":"JO":_) = "ar-jo" +fromBcp47 ("ar":"LB":_) = "ar-lb" +fromBcp47 ("ar":"DZ":_) = "ar-dz" +fromBcp47 ("ar":"MA":_) = "ar-ma" +fromBcp47 ("de":"1901":_) = "deo" +fromBcp47 ("de":"DE":_) = "de-de" +fromBcp47 ("de":"AT":_) = "de-at" +fromBcp47 ("de":"CH":_) = "de-ch" +fromBcp47 ("el":"poly":_) = "agr" +fromBcp47 ("en":"US":_) = "en-us" +fromBcp47 ("en":"GB":_) = "en-gb" +fromBcp47 ("grc":_) = "agr" +fromBcp47 x = fromIso $ head x + where + fromIso "cz" = "cs" + fromIso "el" = "gr" + fromIso "eu" = "ba" + fromIso "he" = "il" + fromIso "jp" = "ja" + fromIso "uk" = "ua" + fromIso "vi" = "vn" + fromIso "zh" = "cn" + fromIso l = l + diff --git a/src/Text/Pandoc/Writers/Custom.hs b/src/Text/Pandoc/Writers/Custom.hs index 8f2810932..e89828911 100644 --- a/src/Text/Pandoc/Writers/Custom.hs +++ b/src/Text/Pandoc/Writers/Custom.hs @@ -44,7 +44,6 @@ import Scripting.Lua (LuaState, StackValue, callfunc) import Text.Pandoc.Writers.Shared import qualified Scripting.Lua as Lua import qualified Text.Pandoc.UTF8 as UTF8 -import Data.Monoid import Control.Monad (when) import Control.Exception import qualified Data.Map as M diff --git a/src/Text/Pandoc/Writers/Docbook.hs b/src/Text/Pandoc/Writers/Docbook.hs index e3444d257..d2c39e3b9 100644 --- a/src/Text/Pandoc/Writers/Docbook.hs +++ b/src/Text/Pandoc/Writers/Docbook.hs @@ -39,7 +39,6 @@ import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.Readers.TeXMath import Data.List ( stripPrefix, isPrefixOf, intercalate, isSuffixOf ) import Data.Char ( toLower ) -import Control.Applicative ((<$>)) import Data.Monoid ( Any(..) ) import Text.Pandoc.Highlighting ( languages, languagesByExtension ) import Text.Pandoc.Pretty diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index e9f256210..dd4a4b258 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -35,13 +35,11 @@ import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Lazy.Char8 as BL8 import qualified Data.Map as M import qualified Text.Pandoc.UTF8 as UTF8 -import Text.Pandoc.Compat.Monoid ((<>)) import Codec.Archive.Zip import Data.Time.Clock.POSIX import Data.Time.Clock -import Data.Time.Format import System.Environment -import Text.Pandoc.Compat.Locale (defaultTimeLocale) +import Text.Pandoc.Compat.Time import Text.Pandoc.Definition import Text.Pandoc.Generic import Text.Pandoc.ImageSize @@ -62,9 +60,10 @@ import Data.Unique (hashUnique, newUnique) import System.Random (randomRIO) import Text.Printf (printf) import qualified Control.Exception as E +import Text.Pandoc.Compat.Monoid ((<>)) import Text.Pandoc.MIME (MimeType, getMimeType, getMimeTypeDef, extensionFromMimeType) -import Control.Applicative ((<$>), (<|>), (<*>)) +import Control.Applicative ((<|>)) import Data.Maybe (fromMaybe, mapMaybe, maybeToList) import Data.Char (ord) @@ -181,8 +180,8 @@ renumIds f renumMap = map (renumId f renumMap) -- | Certain characters are invalid in XML even if escaped. -- See #1992 -stripInvalidChars :: Pandoc -> Pandoc -stripInvalidChars = bottomUp (filter isValidChar) +stripInvalidChars :: String -> String +stripInvalidChars = filter isValidChar -- | See XML reference isValidChar :: Char -> Bool @@ -208,10 +207,10 @@ writeDocx :: WriterOptions -- ^ Writer options -> IO BL.ByteString writeDocx opts doc@(Pandoc meta _) = do let datadir = writerUserDataDir opts - let doc' = stripInvalidChars . walk fixDisplayMath $ doc + let doc' = walk fixDisplayMath $ doc username <- lookup "USERNAME" <$> getEnvironment utctime <- getCurrentTime - distArchive <- getDefaultReferenceDocx Nothing + distArchive <- getDefaultReferenceDocx datadir refArchive <- case writerReferenceDocx opts of Just f -> liftM (toArchive . toLazy) $ B.readFile f Nothing -> getDefaultReferenceDocx datadir @@ -973,7 +972,7 @@ formattedString str = do return [ mknode "w:r" [] $ props ++ [ mknode (if inDel then "w:delText" else "w:t") - [("xml:space","preserve")] str ] ] + [("xml:space","preserve")] (stripInvalidChars str) ] ] setFirstPara :: WS () setFirstPara = modify $ \s -> s { stFirstPara = True } @@ -1070,8 +1069,8 @@ inlineToOpenXML opts (Note bs) = do [ mknode "w:rPr" [] footnoteStyle , mknode "w:footnoteRef" [] () ] let notemarkerXml = RawInline (Format "openxml") $ ppElement notemarker - let insertNoteRef (Plain ils : xs) = Plain (notemarkerXml : ils) : xs - insertNoteRef (Para ils : xs) = Para (notemarkerXml : ils) : xs + let insertNoteRef (Plain ils : xs) = Plain (notemarkerXml : Space : ils) : xs + insertNoteRef (Para ils : xs) = Para (notemarkerXml : Space : ils) : xs insertNoteRef xs = Para [notemarkerXml] : xs oldListLevel <- gets stListLevel oldParaProperties <- gets stParaProperties diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs index ebd5f8d70..730b31fe8 100644 --- a/src/Text/Pandoc/Writers/DokuWiki.hs +++ b/src/Text/Pandoc/Writers/DokuWiki.hs @@ -55,7 +55,6 @@ import Network.URI ( isURI ) import Control.Monad ( zipWithM ) import Control.Monad.State ( modify, State, get, evalState ) import Control.Monad.Reader ( ReaderT, runReaderT, ask, local ) -import Control.Applicative ( (<$>) ) data WriterState = WriterState { stNotes :: Bool -- True if there are notes diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index c3e295c8f..f4989c8ea 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -37,16 +37,14 @@ import System.Environment ( getEnv ) import Text.Printf (printf) import System.FilePath ( takeExtension, takeFileName ) import System.FilePath.Glob ( namesMatching ) +import Network.HTTP ( urlEncode ) import qualified Data.ByteString.Lazy as B import qualified Data.ByteString.Lazy.Char8 as B8 import qualified Text.Pandoc.UTF8 as UTF8 -import Text.Pandoc.SelfContained ( makeSelfContained ) import Codec.Archive.Zip ( emptyArchive, addEntryToArchive, eRelativePath, fromEntry , Entry, toEntry, fromArchive) -import Control.Applicative ((<$>)) import Data.Time.Clock.POSIX ( getPOSIXTime ) -import Data.Time (getCurrentTime,UTCTime, formatTime) -import Text.Pandoc.Compat.Locale ( defaultTimeLocale ) -import Text.Pandoc.Shared ( trimr, renderTags', safeRead, uniqueIdent, trim +import Text.Pandoc.Compat.Time +import Text.Pandoc.Shared ( renderTags', safeRead, uniqueIdent, trim , normalizeDate, readDataFile, stringify, warn , hierarchicalize, fetchItem' ) import qualified Text.Pandoc.Shared as S (Element(..)) @@ -65,7 +63,7 @@ import Text.XML.Light ( unode, Element(..), unqual, Attr(..), add_attrs , strContent, lookupAttr, Node(..), QName(..), parseXML , onlyElems, node, ppElement) import Text.Pandoc.UUID (getRandomUUID) -import Text.Pandoc.Writers.HTML (writeHtmlString, writeHtml) +import Text.Pandoc.Writers.HTML ( writeHtml ) import Data.Char ( toLower, isDigit, isAlphaNum ) import Text.Pandoc.MIME (MimeType, getMimeType, extensionFromMimeType) import qualified Control.Exception as E @@ -818,7 +816,8 @@ transformTag :: WriterOptions -> Tag String -> IO (Tag String) transformTag opts mediaRef tag@(TagOpen name attr) - | name `elem` ["video", "source", "img", "audio"] = do + | name `elem` ["video", "source", "img", "audio"] && + lookup "data-external" attr == Nothing = do let src = fromAttrib "src" tag let poster = fromAttrib "poster" tag newsrc <- modifyMediaRef opts mediaRef src @@ -874,10 +873,11 @@ transformInline :: WriterOptions transformInline opts mediaRef (Image attr lab (src,tit)) = do newsrc <- modifyMediaRef opts mediaRef src return $ Image attr lab (newsrc, tit) -transformInline opts _ (x@(Math _ _)) - | WebTeX _ <- writerHTMLMathMethod opts = do - raw <- makeSelfContained opts $ writeHtmlInline opts x - return $ RawInline (Format "html") raw +transformInline opts mediaRef (x@(Math t m)) + | WebTeX url <- writerHTMLMathMethod opts = do + newsrc <- modifyMediaRef opts mediaRef (url ++ urlEncode m) + let mathclass = if t == DisplayMath then "display" else "inline" + return $ Span ("",["math",mathclass],[]) [Image nullAttr [x] (newsrc, "")] transformInline opts mediaRef (RawInline fmt raw) | fmt == Format "html" = do let tags = parseTags raw @@ -885,11 +885,6 @@ transformInline opts mediaRef (RawInline fmt raw) return $ RawInline fmt (renderTags' tags') transformInline _ _ x = return x -writeHtmlInline :: WriterOptions -> Inline -> String -writeHtmlInline opts z = trimr $ - writeHtmlString opts{ writerStandalone = False } - $ Pandoc nullMeta [Plain [z]] - (!) :: Node t => (t -> Element) -> [(String, String)] -> t -> Element (!) f attrs n = add_attrs (map (\(k,v) -> Attr (unqual k) v) attrs) (f n) diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index ab158b38d..67d398a4d 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -31,6 +31,7 @@ Conversion of 'Pandoc' documents to HTML. -} module Text.Pandoc.Writers.HTML ( writeHtml , writeHtmlString ) where import Text.Pandoc.Definition +import Text.Pandoc.Compat.Monoid ((<>)) import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Options @@ -67,9 +68,7 @@ import Text.XML.Light.Output import Text.XML.Light (unode, elChildren, unqual) import qualified Text.XML.Light as XML import System.FilePath (takeExtension) -import Data.Monoid import Data.Aeson (Value) -import Control.Applicative ((<$>)) data WriterState = WriterState { stNotes :: [Html] -- ^ List of notes @@ -195,9 +194,6 @@ pandocToHtml opts (Pandoc meta blocks) = do defField "revealjs-url" ("reveal.js" :: String) $ defField "s5-url" ("s5/default" :: String) $ defField "html5" (writerHtml5 opts) $ - defField "center" (case lookupMeta "center" meta of - Just (MetaBool False) -> False - _ -> True) $ metadata return (thebody, context) @@ -310,11 +306,9 @@ elementToHtml slideLevel opts (Sec level num (id',classes,keyvals) title' elemen $ if titleSlide -- title slides have no content of their own then filter isSec elements - else if slide - then case splitBy isPause elements of - [] -> [] - (x:xs) -> x ++ concatMap inDiv xs - else elements + else case splitBy isPause elements of + [] -> [] + (x:xs) -> x ++ concatMap inDiv xs let inNl x = mconcat $ nl opts : intersperse (nl opts) x ++ [nl opts] let classes' = ["titleslide" | titleSlide] ++ ["slide" | slide] ++ ["section" | (slide || writerSectionDivs opts) && @@ -471,12 +465,15 @@ blockToHtml opts (Para [Image attr txt (s,'f':'i':'g':':':tit)]) = do blockToHtml opts (Para lst) = do contents <- inlineListToHtml opts lst return $ H.p contents -blockToHtml opts (Div attr@(_,classes,_) bs) = do +blockToHtml opts (Div attr@(ident, classes, kvs) bs) = do let speakerNotes = "notes" `elem` classes -- we don't want incremental output inside speaker notes, see #1394 let opts' = if speakerNotes then opts{ writerIncremental = False } else opts contents <- blockListToHtml opts' bs let contents' = nl opts >> contents >> nl opts + let (divtag, classes') = if writerHtml5 opts && "section" `elem` classes + then (H5.section, filter (/= "section") classes) + else (H.div, classes) return $ if speakerNotes then case writerSlideVariant opts of @@ -485,7 +482,7 @@ blockToHtml opts (Div attr@(_,classes,_) bs) = do ! (H5.customAttribute "role" "note") NoSlides -> addAttrs opts' attr $ H.div $ contents' _ -> mempty - else addAttrs opts attr $ H.div $ contents' + else addAttrs opts (ident, classes', kvs) $ divtag $ contents' blockToHtml opts (RawBlock f str) | f == Format "html" = return $ preEscapedString str | f == Format "latex" = @@ -565,6 +562,9 @@ blockToHtml opts (OrderedList (startnum, numstyle, _) lst) = do let attribs = (if startnum /= 1 then [A.start $ toValue startnum] else []) ++ + (if numstyle == Example + then [A.class_ "example"] + else []) ++ (if numstyle /= DefaultStyle then if writerHtml5 opts then [A.type_ $ @@ -615,8 +615,15 @@ blockToHtml opts (Table capt aligns widths headers rows') = do return $ H.thead (nl opts >> contents) >> nl opts body' <- liftM (\x -> H.tbody (nl opts >> mconcat x)) $ zipWithM (tableRowToHtml opts aligns) [1..] rows' - return $ H.table $ nl opts >> captionDoc >> coltags >> head' >> - body' >> nl opts + let tbl = H.table $ + nl opts >> captionDoc >> coltags >> head' >> body' >> nl opts + let totalWidth = sum widths + -- When widths of columns are < 100%, we need to set width for the whole + -- table, or some browsers give us skinny columns with lots of space between: + return $ if totalWidth == 0 || totalWidth == 1 + then tbl + else tbl ! A.style (toValue $ "width:" ++ + show (round (totalWidth * 100) :: Int) ++ "%;") tableRowToHtml :: WriterOptions -> [Alignment] diff --git a/src/Text/Pandoc/Writers/Haddock.hs b/src/Text/Pandoc/Writers/Haddock.hs index a3188c647..118d42d7d 100644 --- a/src/Text/Pandoc/Writers/Haddock.hs +++ b/src/Text/Pandoc/Writers/Haddock.hs @@ -327,8 +327,8 @@ inlineToHaddock _ (RawInline f str) inlineToHaddock _ (LineBreak) = return cr inlineToHaddock _ Space = return space inlineToHaddock opts (Cite _ lst) = inlineListToHaddock opts lst -inlineToHaddock opts (Link _ txt (src, _)) = do - linktext <- inlineListToHaddock opts txt +inlineToHaddock _ (Link _ txt (src, _)) = do + let linktext = text $ escapeString $ stringify txt let useAuto = isURI src && case txt of [Str s] | escapeURI s == src -> True diff --git a/src/Text/Pandoc/Writers/ICML.hs b/src/Text/Pandoc/Writers/ICML.hs index 2bbd3b44f..eb6d135ca 100644 --- a/src/Text/Pandoc/Writers/ICML.hs +++ b/src/Text/Pandoc/Writers/ICML.hs @@ -16,6 +16,7 @@ into InDesign with File -> Place. module Text.Pandoc.Writers.ICML (writeICML) where import Text.Pandoc.Definition import Text.Pandoc.XML +import Text.Pandoc.Readers.TeXMath (texMathToInlines) import Text.Pandoc.Writers.Shared import Text.Pandoc.Shared (splitBy, fetchItem, warn) import Text.Pandoc.Options @@ -24,7 +25,6 @@ import Text.Pandoc.Pretty import Text.Pandoc.ImageSize import Data.List (isPrefixOf, isInfixOf, stripPrefix) import Data.Text as Text (breakOnAll, pack) -import Data.Monoid (mappend) import Control.Monad.State import Network.URI (isURI) import System.FilePath (pathSeparator) @@ -415,7 +415,8 @@ inlineToICML opts style (Cite _ lst) = inlinesToICML opts (citeName:style) lst inlineToICML _ style (Code _ str) = charStyle (codeName:style) $ text $ escapeStringForXML str inlineToICML _ style Space = charStyle style space inlineToICML _ style LineBreak = charStyle style $ text lineSeparator -inlineToICML _ style (Math _ str) = charStyle style $ text $ escapeStringForXML str --InDesign doesn't really do math +inlineToICML opts style (Math mt str) = + cat <$> mapM (inlineToICML opts style) (texMathToInlines mt str) inlineToICML _ _ (RawInline f str) | f == Format "icml" = return $ text str | otherwise = return empty diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 5857723a6..9e15e0be7 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -38,10 +38,11 @@ import Text.Pandoc.Options import Text.Pandoc.Templates import Text.Printf ( printf ) import Network.URI ( isURI, unEscapeString ) -import Data.List ( (\\), isInfixOf, stripPrefix, intercalate, intersperse ) +import Data.Aeson (object, (.=)) +import Data.List ( (\\), isInfixOf, stripPrefix, intercalate, intersperse, nub, nubBy ) import Data.Char ( toLower, isPunctuation, isAscii, isLetter, isDigit, ord ) -import Data.Maybe ( fromMaybe ) -import Data.Aeson.Types ( (.:), parseMaybe, withObject ) +import Data.Maybe ( fromMaybe, isJust ) +import qualified Data.Text as T import Control.Applicative ((<|>)) import Control.Monad.State import qualified Text.Parsec as P @@ -121,7 +122,7 @@ pandocToLaTeX options (Pandoc meta blocks) = do Right r -> r Left _ -> "" case lookup "documentclass" (writerVariables options) `mplus` - parseMaybe (withObject "object" (.: "documentclass")) metadata of + fmap stringify (lookupMeta "documentclass" meta) of Just x | x `elem` bookClasses -> modify $ \s -> s{stBook = True} | otherwise -> return () Nothing | documentClass `elem` bookClasses @@ -145,11 +146,8 @@ pandocToLaTeX options (Pandoc meta blocks) = do st <- get titleMeta <- stringToLaTeX TextString $ stringify $ docTitle meta authorsMeta <- mapM (stringToLaTeX TextString . stringify) $ docAuthors meta - let (mainlang, otherlang) = - case (reverse . splitBy (==',') . filter (/=' ')) `fmap` - getField "lang" metadata of - Just (m:os) -> (m, reverse os) - _ -> ("", []) + let docLangs = nub $ query (extract "lang") blocks + let hasStringValue x = isJust (getField x metadata :: Maybe String) let context = defField "toc" (writerTableOfContents options) $ defField "toc-depth" (show (writerTOCDepth options - if stBook st @@ -174,8 +172,6 @@ pandocToLaTeX options (Pandoc meta blocks) = do defField "euro" (stUsesEuro st) $ defField "listings" (writerListings options || stLHS st) $ defField "beamer" (writerBeamer options) $ - defField "mainlang" mainlang $ - defField "otherlang" otherlang $ (if stHighlighting st then defField "highlighting-macros" (styleToLaTeX $ writerHighlightStyle options ) @@ -186,9 +182,56 @@ pandocToLaTeX options (Pandoc meta blocks) = do Biblatex -> defField "biblio-title" biblioTitle . defField "biblatex" True _ -> id) $ + -- set lang to something so polyglossia/babel is included + defField "lang" (if null docLangs then ""::String else "en") $ + defField "otherlangs" docLangs $ + defField "colorlinks" (any hasStringValue + ["citecolor", "urlcolor", "linkcolor", "toccolor"]) $ + defField "dir" (if (null $ query (extract "dir") blocks) + then ""::String + else "ltr") $ metadata + let toPolyObj lang = object [ "name" .= T.pack name + , "options" .= T.pack opts ] + where + (name, opts) = toPolyglossia lang + let lang = maybe [] (splitBy (=='-')) $ getField "lang" context + otherlangs = maybe [] (map $ splitBy (=='-')) $ getField "otherlangs" context + let context' = + defField "babel-lang" (toBabel lang) + $ defField "babel-otherlangs" (map toBabel otherlangs) + $ defField "babel-newcommands" (concatMap (\(poly, babel) -> + -- \textspanish and \textgalician are already used by babel + -- save them as \oritext... and let babel use that + if poly `elem` ["spanish", "galician"] + then "\\let\\oritext" ++ poly ++ "\\text" ++ poly ++ "\n" ++ + "\\AddBabelHook{" ++ poly ++ "}{beforeextras}" ++ + "{\\renewcommand{\\text" ++ poly ++ "}{\\oritext" + ++ poly ++ "}}\n" ++ + "\\AddBabelHook{" ++ poly ++ "}{afterextras}" ++ + "{\\renewcommand{\\text" ++ poly ++ "}[2][]{\\foreignlanguage{" + ++ poly ++ "}{##2}}}\n" + else "\\newcommand{\\text" ++ poly ++ "}[2][]{\\foreignlanguage{" + ++ babel ++ "}{#2}}\n" ++ + "\\newenvironment{" ++ poly ++ "}[1]{\\begin{otherlanguage}{" + ++ babel ++ "}}{\\end{otherlanguage}}\n" + ) + -- eliminate duplicates that have same polyglossia name + $ nubBy (\a b -> fst a == fst b) + -- find polyglossia and babel names of languages used in the document + $ map (\l -> + let lng = splitBy (=='-') l + in (fst $ toPolyglossia lng, toBabel lng) + ) + docLangs ) + $ defField "polyglossia-lang" (toPolyObj lang) + $ defField "polyglossia-otherlangs" (map toPolyObj otherlangs) + $ defField "latex-dir-rtl" (case (getField "dir" context)::Maybe String of + Just "rtl" -> True + _ -> False) + $ context return $ if writerStandalone options - then renderTemplate' template context + then renderTemplate' template context' else main -- | Convert Elements to LaTeX @@ -234,7 +277,7 @@ stringToLaTeX ctx (x:xs) = do '^' -> "\\^{}" ++ rest '\\'| isUrl -> '/' : rest -- NB. / works as path sep even on Windows | otherwise -> "\\textbackslash{}" ++ rest - '|' -> "\\textbar{}" ++ rest + '|' | not isUrl -> "\\textbar{}" ++ rest '<' -> "\\textless{}" ++ rest '>' -> "\\textgreater{}" ++ rest '[' -> "{[}" ++ rest -- to avoid interpretation as @@ -292,9 +335,12 @@ elementToBeamer slideLevel (Sec lvl _num (ident,classes,kvs) tit elts) if writerListings opts then query hasCode elts else []) - let allowframebreaks = "allowframebreaks" `elem` classes + let frameoptions = ["allowdisplaybreaks", "allowframebreaks", + "b", "c", "t", "environment", + "label", "plain", "shrink"] let optionslist = ["fragile" | fragile] ++ - ["allowframebreaks" | allowframebreaks] + [k | k <- classes, k `elem` frameoptions] ++ + [k ++ "=" ++ v | (k,v) <- kvs, k `elem` frameoptions] let options = if null optionslist then "" else "[" ++ intercalate "," optionslist ++ "]" @@ -322,34 +368,53 @@ isLineBreakOrSpace _ = False blockToLaTeX :: Block -- ^ Block to convert -> State WriterState Doc blockToLaTeX Null = return empty -blockToLaTeX (Div (identifier,classes,_) bs) = do +blockToLaTeX (Div (identifier,classes,kvs) bs) = do beamer <- writerBeamer `fmap` gets stOptions ref <- toLabel identifier let linkAnchor = if null identifier then empty - else "\\hyperdef{}" <> braces (text ref) <> - braces ("\\label" <> braces (text ref)) - contents <- blockListToLaTeX bs - if beamer && "notes" `elem` classes -- speaker notes - then return $ "\\note" <> braces contents - else return (linkAnchor $$ contents) + else "\\hypertarget" <> braces (text ref) <> + braces empty + let align dir txt = inCmd "begin" dir $$ txt $$ inCmd "end" dir + let wrapDir = case lookup "dir" kvs of + Just "rtl" -> align "RTL" + Just "ltr" -> align "LTR" + _ -> id + wrapLang txt = case lookup "lang" kvs of + Just lng -> let (l, o) = toPolyglossiaEnv lng + ops = if null o + then "" + else brackets $ text o + in inCmd "begin" (text l) <> ops + $$ blankline <> txt <> blankline + $$ inCmd "end" (text l) + Nothing -> txt + wrapNotes txt = if beamer && "notes" `elem` classes + then "\\note" <> braces txt -- speaker notes + else linkAnchor $$ txt + fmap (wrapDir . wrapLang . wrapNotes) $ blockListToLaTeX bs blockToLaTeX (Plain lst) = inlineListToLaTeX $ dropWhile isLineBreakOrSpace lst -- title beginning with fig: indicates that the image is a figure blockToLaTeX (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do inNote <- gets stInNote + modify $ \st -> st{ stInMinipage = True, stNotes = [] } capt <- inlineListToLaTeX txt + notes <- gets stNotes + modify $ \st -> st{ stInMinipage = False, stNotes = [] } + -- We can't have footnotes in the list of figures, so remove them: + captForLof <- if null notes + then return empty + else brackets <$> inlineListToLaTeX (walk deNote txt) img <- inlineToLaTeX (Image attr txt (src,tit)) - let (ident, _, _) = attr - idn <- toLabel ident - let label = if null ident - then empty - else "\\label" <> braces (text idn) + let footnotes = notesToLaTeX notes return $ if inNote -- can't have figures in notes then "\\begin{center}" $$ img $+$ capt $$ "\\end{center}" else "\\begin{figure}[htbp]" $$ "\\centering" $$ img $$ - ("\\caption" <> braces capt) $$ label $$ "\\end{figure}" + ("\\caption" <> captForLof <> braces capt) $$ + "\\end{figure}" $$ + footnotes -- . . . indicates pause in beamer slides blockToLaTeX (Para [Str ".",Space,Str ".",Space,Str "."]) = do beamer <- writerBeamer `fmap` gets stOptions @@ -378,7 +443,7 @@ blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do ref <- toLabel identifier let linkAnchor = if null identifier then empty - else "\\hyperdef{}" <> braces (text ref) <> + else "\\hypertarget" <> braces (text ref) <> braces ("\\label" <> braces (text ref)) let lhsCodeBlock = do modify $ \s -> s{ stLHS = True } @@ -591,19 +656,21 @@ tableCellToLaTeX header (width, align, blocks) = do return $ ("\\begin{minipage}" <> valign <> braces (text (printf "%.2f\\columnwidth" width)) <> (halign <> "\\strut" <> cr <> cellContents <> cr) <> - "\\strut\\end{minipage}") - $$ case notes of - [] -> empty - ns -> (case length ns of + "\\strut\\end{minipage}") $$ + notesToLaTeX notes + +notesToLaTeX :: [Doc] -> Doc +notesToLaTeX [] = empty +notesToLaTeX ns = (case length ns of n | n > 1 -> "\\addtocounter" <> braces "footnote" <> braces (text $ show $ 1 - n) | otherwise -> empty) - $$ - vcat (intersperse - ("\\addtocounter" <> braces "footnote" <> braces "1") - $ map (\x -> "\\footnotetext" <> braces x) - $ reverse ns) + $$ + vcat (intersperse + ("\\addtocounter" <> braces "footnote" <> braces "1") + $ map (\x -> "\\footnotetext" <> braces x) + $ reverse ns) listItemToLaTeX :: [Block] -> State WriterState Doc listItemToLaTeX lst @@ -665,8 +732,7 @@ sectionHeader unnumbered ref level lst = do let level' = if book || writerChapters opts then level - 1 else level internalLinks <- gets stInternalLinks let refLabel x = (if ref `elem` internalLinks - then text "\\hyperdef" - <> braces empty + then text "\\hypertarget" <> braces lab <> braces x else x) @@ -731,22 +797,29 @@ isQuoted _ = False -- | Convert inline element to LaTeX inlineToLaTeX :: Inline -- ^ Inline to convert -> State WriterState Doc -inlineToLaTeX (Span (id',classes,_) ils) = do +inlineToLaTeX (Span (id',classes,kvs) ils) = do let noEmph = "csl-no-emph" `elem` classes let noStrong = "csl-no-strong" `elem` classes let noSmallCaps = "csl-no-smallcaps" `elem` classes + let rtl = ("dir","rtl") `elem` kvs + let ltr = ("dir","ltr") `elem` kvs ref <- toLabel id' let linkAnchor = if null id' then empty - else "\\hyperdef{}" <> braces (text ref) <> - braces ("\\label" <> braces (text ref)) + else "\\protect\\hypertarget" <> braces (text ref) <> + braces empty fmap (linkAnchor <>) ((if noEmph then inCmd "textup" else id) . (if noStrong then inCmd "textnormal" else id) . (if noSmallCaps then inCmd "textnormal" else id) . - (if not (noEmph || noStrong || noSmallCaps) - then braces - else id)) `fmap` inlineListToLaTeX ils + (if rtl then inCmd "RL" else id) . + (if ltr then inCmd "LR" else id) . + (case lookup "lang" kvs of + Just lng -> let (l, o) = toPolyglossia $ splitBy (=='-') lng + ops = if null o then "" else brackets (text o) + in \c -> char '\\' <> "text" <> text l <> ops <> braces c + Nothing -> id) + ) `fmap` inlineListToLaTeX ils inlineToLaTeX (Emph lst) = inlineListToLaTeX lst >>= return . inCmd "emph" inlineToLaTeX (Strong lst) = @@ -831,22 +904,22 @@ inlineToLaTeX Space = return space inlineToLaTeX (Link _ txt ('#':ident, _)) = do contents <- inlineListToLaTeX txt lab <- toLabel ident - return $ text "\\hyperref" <> brackets (text lab) <> braces contents + return $ text "\\protect\\hyperlink" <> braces (text lab) <> braces contents inlineToLaTeX (Link _ txt (src, _)) = case txt of [Str x] | escapeURI x == src -> -- autolink do modify $ \s -> s{ stUrl = True } - src' <- stringToLaTeX URLString src + src' <- stringToLaTeX URLString (escapeURI src) return $ text $ "\\url{" ++ src' ++ "}" [Str x] | Just rest <- stripPrefix "mailto:" src, escapeURI x == rest -> -- email autolink do modify $ \s -> s{ stUrl = True } - src' <- stringToLaTeX URLString src + src' <- stringToLaTeX URLString (escapeURI src) contents <- inlineListToLaTeX txt return $ "\\href" <> braces (text src') <> braces ("\\nolinkurl" <> braces contents) _ -> do contents <- inlineListToLaTeX txt - src' <- stringToLaTeX URLString src + src' <- stringToLaTeX URLString (escapeURI src) return $ text ("\\href{" ++ src' ++ "}{") <> contents <> char '}' inlineToLaTeX (Image attr _ (source, _)) = do @@ -869,7 +942,7 @@ inlineToLaTeX (Image attr _ (source, _)) = do source' = if isURI source then source else unEscapeString source - source'' <- stringToLaTeX URLString source' + source'' <- stringToLaTeX URLString (escapeURI source') inHeading <- gets stInHeading return $ (if inHeading then "\\protect\\includegraphics" else "\\includegraphics") <> @@ -1001,3 +1074,173 @@ citationsToBiblatex _ = return empty getListingsLanguage :: [String] -> Maybe String getListingsLanguage [] = Nothing getListingsLanguage (x:xs) = toListingsLanguage x <|> getListingsLanguage xs + +-- Extract a key from divs and spans +extract :: String -> Block -> [String] +extract key (Div attr _) = lookKey key attr +extract key (Plain ils) = concatMap (extractInline key) ils +extract key (Para ils) = concatMap (extractInline key) ils +extract key (Header _ _ ils) = concatMap (extractInline key) ils +extract _ _ = [] + +-- Extract a key from spans +extractInline :: String -> Inline -> [String] +extractInline key (Span attr _) = lookKey key attr +extractInline _ _ = [] + +-- Look up a key in an attribute and give a list of its values +lookKey :: String -> Attr -> [String] +lookKey key (_,_,kvs) = maybe [] words $ lookup key kvs + +-- In environments \Arabic instead of \arabic is used +toPolyglossiaEnv :: String -> (String, String) +toPolyglossiaEnv l = + case toPolyglossia $ (splitBy (=='-')) l of + ("arabic", o) -> ("Arabic", o) + x -> x + +-- Takes a list of the constituents of a BCP 47 language code and +-- converts it to a Polyglossia (language, options) tuple +-- http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/polyglossia/polyglossia.pdf +toPolyglossia :: [String] -> (String, String) +toPolyglossia ("ar":"DZ":_) = ("arabic", "locale=algeria") +toPolyglossia ("ar":"IQ":_) = ("arabic", "locale=mashriq") +toPolyglossia ("ar":"JO":_) = ("arabic", "locale=mashriq") +toPolyglossia ("ar":"LB":_) = ("arabic", "locale=mashriq") +toPolyglossia ("ar":"LY":_) = ("arabic", "locale=libya") +toPolyglossia ("ar":"MA":_) = ("arabic", "locale=morocco") +toPolyglossia ("ar":"MR":_) = ("arabic", "locale=mauritania") +toPolyglossia ("ar":"PS":_) = ("arabic", "locale=mashriq") +toPolyglossia ("ar":"SY":_) = ("arabic", "locale=mashriq") +toPolyglossia ("ar":"TN":_) = ("arabic", "locale=tunisia") +toPolyglossia ("de":"1901":_) = ("german", "spelling=old") +toPolyglossia ("de":"AT":"1901":_) = ("german", "variant=austrian, spelling=old") +toPolyglossia ("de":"AT":_) = ("german", "variant=austrian") +toPolyglossia ("de":"CH":"1901":_) = ("german", "variant=swiss, spelling=old") +toPolyglossia ("de":"CH":_) = ("german", "variant=swiss") +toPolyglossia ("de":_) = ("german", "") +toPolyglossia ("dsb":_) = ("lsorbian", "") +toPolyglossia ("el":"polyton":_) = ("greek", "variant=poly") +toPolyglossia ("en":"AU":_) = ("english", "variant=australian") +toPolyglossia ("en":"CA":_) = ("english", "variant=canadian") +toPolyglossia ("en":"GB":_) = ("english", "variant=british") +toPolyglossia ("en":"NZ":_) = ("english", "variant=newzealand") +toPolyglossia ("en":"UK":_) = ("english", "variant=british") +toPolyglossia ("en":"US":_) = ("english", "variant=american") +toPolyglossia ("grc":_) = ("greek", "variant=ancient") +toPolyglossia ("hsb":_) = ("usorbian", "") +toPolyglossia ("sl":_) = ("slovenian", "") +toPolyglossia x = (commonFromBcp47 x, "") + +-- Takes a list of the constituents of a BCP 47 language code and +-- converts it to a Babel language string. +-- http://mirrors.concertpass.com/tex-archive/macros/latex/required/babel/base/babel.pdf +-- Note that the PDF unfortunately does not contain a complete list of supported languages. +toBabel :: [String] -> String +toBabel ("de":"1901":_) = "german" +toBabel ("de":"AT":"1901":_) = "austrian" +toBabel ("de":"AT":_) = "naustrian" +toBabel ("de":_) = "ngerman" +toBabel ("dsb":_) = "lowersorbian" +toBabel ("el":"polyton":_) = "polutonikogreek" +toBabel ("en":"AU":_) = "australian" +toBabel ("en":"CA":_) = "canadian" +toBabel ("en":"GB":_) = "british" +toBabel ("en":"NZ":_) = "newzealand" +toBabel ("en":"UK":_) = "british" +toBabel ("en":"US":_) = "american" +toBabel ("fr":"CA":_) = "canadien" +toBabel ("fra":"aca":_) = "acadian" +toBabel ("grc":_) = "polutonikogreek" +toBabel ("hsb":_) = "uppersorbian" +toBabel ("sl":_) = "slovene" +toBabel x = commonFromBcp47 x + +-- Takes a list of the constituents of a BCP 47 language code +-- and converts it to a string shared by Babel and Polyglossia. +-- https://tools.ietf.org/html/bcp47#section-2.1 +commonFromBcp47 :: [String] -> String +commonFromBcp47 [] = "" +commonFromBcp47 ("pt":"BR":_) = "brazilian" +commonFromBcp47 x = fromIso $ head x + where + fromIso "af" = "afrikaans" + fromIso "am" = "amharic" + fromIso "ar" = "arabic" + fromIso "ast" = "asturian" + fromIso "bg" = "bulgarian" + fromIso "bn" = "bengali" + fromIso "bo" = "tibetan" + fromIso "br" = "breton" + fromIso "ca" = "catalan" + fromIso "cy" = "welsh" + fromIso "cz" = "czech" + fromIso "cop" = "coptic" + fromIso "da" = "danish" + fromIso "dv" = "divehi" + fromIso "el" = "greek" + fromIso "en" = "english" + fromIso "eo" = "esperanto" + fromIso "es" = "spanish" + fromIso "et" = "estonian" + fromIso "eu" = "basque" + fromIso "fa" = "farsi" + fromIso "fi" = "finnish" + fromIso "fr" = "french" + fromIso "fur" = "friulan" + fromIso "ga" = "irish" + fromIso "gd" = "scottish" + fromIso "gl" = "galician" + fromIso "he" = "hebrew" + fromIso "hi" = "hindi" + fromIso "hr" = "croatian" + fromIso "hy" = "armenian" + fromIso "hu" = "magyar" + fromIso "ia" = "interlingua" + fromIso "id" = "indonesian" + fromIso "ie" = "interlingua" + fromIso "is" = "icelandic" + fromIso "it" = "italian" + fromIso "jp" = "japanese" + fromIso "km" = "khmer" + fromIso "kn" = "kannada" + fromIso "ko" = "korean" + fromIso "la" = "latin" + fromIso "lo" = "lao" + fromIso "lt" = "lithuanian" + fromIso "lv" = "latvian" + fromIso "ml" = "malayalam" + fromIso "mn" = "mongolian" + fromIso "mr" = "marathi" + fromIso "nb" = "norsk" + fromIso "nl" = "dutch" + fromIso "nn" = "nynorsk" + fromIso "no" = "norsk" + fromIso "nqo" = "nko" + fromIso "oc" = "occitan" + fromIso "pl" = "polish" + fromIso "pms" = "piedmontese" + fromIso "pt" = "portuguese" + fromIso "rm" = "romansh" + fromIso "ro" = "romanian" + fromIso "ru" = "russian" + fromIso "sa" = "sanskrit" + fromIso "se" = "samin" + fromIso "sk" = "slovak" + fromIso "sq" = "albanian" + fromIso "sr" = "serbian" + fromIso "sv" = "swedish" + fromIso "syr" = "syriac" + fromIso "ta" = "tamil" + fromIso "te" = "telugu" + fromIso "th" = "thai" + fromIso "tk" = "turkmen" + fromIso "tr" = "turkish" + fromIso "uk" = "ukrainian" + fromIso "ur" = "urdu" + fromIso "vi" = "vietnamese" + fromIso _ = "" + +deNote :: Inline -> Inline +deNote (Note _) = RawInline (Format "latex") "" +deNote x = x diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs index 71fd145e2..b8b1c1fdd 100644 --- a/src/Text/Pandoc/Writers/Man.hs +++ b/src/Text/Pandoc/Writers/Man.hs @@ -85,6 +85,8 @@ pandocToMan opts (Pandoc meta blocks) = do let context = defField "body" main $ setFieldsFromTitle $ defField "has-tables" hasTables + $ defField "hyphenate" True + $ defField "pandoc-version" pandocVersion $ metadata if writerStandalone opts then return $ renderTemplate' (writerTemplate opts) context diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 019a0e272..898e6c32d 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -40,7 +40,7 @@ import Text.Pandoc.Options import Text.Pandoc.Parsing hiding (blankline, blanklines, char, space) import Data.Maybe (fromMaybe) import Data.List ( group, stripPrefix, find, intersperse, transpose, sortBy ) -import Data.Char ( isSpace, isPunctuation ) +import Data.Char ( isSpace, isPunctuation, ord, chr ) import Data.Ord ( comparing ) import Text.Pandoc.Pretty import Control.Monad.State @@ -260,10 +260,13 @@ tableOfContents opts headers = -- | Converts an Element to a list item for a table of contents, elementToListItem :: WriterOptions -> Element -> [Block] -elementToListItem opts (Sec lev _ _ headerText subsecs) - = Plain headerText : +elementToListItem opts (Sec lev _nums (ident,_,_) headerText subsecs) + = Plain headerLink : [ BulletList (map (elementToListItem opts) subsecs) | not (null subsecs) && lev < writerTOCDepth opts ] + where headerLink = if null ident + then headerText + else [Link nullAttr headerText ('#':ident, "")] elementToListItem _ (Blk _) = [] attrsToMarkdown :: Attr -> Doc @@ -780,14 +783,25 @@ inlineToMarkdown opts (Superscript lst) = do then "^" <> contents <> "^" else if isEnabled Ext_raw_html opts then "<sup>" <> contents <> "</sup>" - else contents + else case (render Nothing contents) of + ds | all (\d -> d >= '0' && d <= '9') ds + -> text (map toSuperscript ds) + _ -> contents + where toSuperscript '1' = '\x00B9' + toSuperscript '2' = '\x00B2' + toSuperscript '3' = '\x00B3' + toSuperscript c = chr (0x2070 + (ord c - 48)) inlineToMarkdown opts (Subscript lst) = do contents <- inlineListToMarkdown opts $ walk escapeSpaces lst return $ if isEnabled Ext_subscript opts then "~" <> contents <> "~" else if isEnabled Ext_raw_html opts then "<sub>" <> contents <> "</sub>" - else contents + else case (render Nothing contents) of + ds | all (\d -> d >= '0' && d <= '9') ds + -> text (map toSubscript ds) + _ -> contents + where toSubscript c = chr (0x2080 + (ord c - 48)) inlineToMarkdown opts (SmallCaps lst) = do plain <- gets stPlain if not plain && diff --git a/src/Text/Pandoc/Writers/Native.hs b/src/Text/Pandoc/Writers/Native.hs index f342dc4f5..2343ff1a8 100644 --- a/src/Text/Pandoc/Writers/Native.hs +++ b/src/Text/Pandoc/Writers/Native.hs @@ -63,6 +63,8 @@ prettyBlock (Table caption aligns widths header rows) = prettyRow header $$ prettyList (map prettyRow rows) where prettyRow cols = prettyList (map (prettyList . map prettyBlock) cols) +prettyBlock (Div attr blocks) = + text ("Div " <> show attr) $$ prettyList (map prettyBlock blocks) prettyBlock block = text $ show block -- | Prettyprint Pandoc document. diff --git a/src/Text/Pandoc/Writers/ODT.hs b/src/Text/Pandoc/Writers/ODT.hs index f7df74246..835e79ce7 100644 --- a/src/Text/Pandoc/Writers/ODT.hs +++ b/src/Text/Pandoc/Writers/ODT.hs @@ -37,7 +37,6 @@ import Text.TeXMath import qualified Data.ByteString.Lazy as B import Text.Pandoc.UTF8 ( fromStringLazy ) import Codec.Archive.Zip -import Control.Applicative ((<$>)) import Text.Pandoc.Options ( WriterOptions(..) ) import Text.Pandoc.Shared ( stringify, fetchItem', warn, getDefaultReferenceODT ) diff --git a/src/Text/Pandoc/Writers/OPML.hs b/src/Text/Pandoc/Writers/OPML.hs index c7563d751..519136861 100644 --- a/src/Text/Pandoc/Writers/OPML.hs +++ b/src/Text/Pandoc/Writers/OPML.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {- Copyright (C) 2013-2015 John MacFarlane <jgm@berkeley.edu> @@ -37,8 +38,7 @@ import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.Writers.HTML (writeHtmlString) import Text.Pandoc.Writers.Markdown (writeMarkdown) import Text.Pandoc.Pretty -import Data.Time -import Text.Pandoc.Compat.Locale (defaultTimeLocale) +import Text.Pandoc.Compat.Time import qualified Text.Pandoc.Builder as B -- | Convert Pandoc document to string in OPML format. @@ -69,8 +69,13 @@ showDateTimeRFC822 :: UTCTime -> String showDateTimeRFC822 = formatTime defaultTimeLocale "%a, %d %b %Y %X %Z" convertDate :: [Inline] -> String -convertDate ils = maybe "" showDateTimeRFC822 - $ parseTime defaultTimeLocale "%F" =<< (normalizeDate $ stringify ils) +convertDate ils = maybe "" showDateTimeRFC822 $ +#if MIN_VERSION_time(1,5,0) + parseTimeM True +#else + parseTime +#endif + defaultTimeLocale "%F" =<< (normalizeDate $ stringify ils) -- | Convert an Element to OPML. elementToOPML :: WriterOptions -> Element -> Doc diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs index 7b964e2d2..dad6b431e 100644 --- a/src/Text/Pandoc/Writers/OpenDocument.hs +++ b/src/Text/Pandoc/Writers/OpenDocument.hs @@ -37,7 +37,6 @@ import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.Readers.TeXMath import Text.Pandoc.Pretty import Text.Printf ( printf ) -import Control.Applicative ( (<$>) ) import Control.Arrow ( (***), (>>>) ) import Control.Monad.State hiding ( when ) import Data.Char (chr, isDigit) @@ -192,8 +191,7 @@ writeOpenDocument opts (Pandoc meta blocks) = listStyle (n,l) = inTags True "text:list-style" [("style:name", "L" ++ show n)] (vcat l) listStyles = map listStyle (stListStyles s) - automaticStyles = inTagsIndented "office:automatic-styles" $ vcat $ - reverse $ styles ++ listStyles + automaticStyles = vcat $ reverse $ styles ++ listStyles context = defField "body" body $ defField "automatic-styles" (render' automaticStyles) $ metadata diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs index 24da7b9e1..75967fa2a 100644 --- a/src/Text/Pandoc/Writers/Org.hs +++ b/src/Text/Pandoc/Writers/Org.hs @@ -40,7 +40,6 @@ import Text.Pandoc.Pretty import Text.Pandoc.Templates (renderTemplate') import Data.List ( intersect, intersperse, transpose ) import Control.Monad.State -import Control.Applicative ( (<$>) ) data WriterState = WriterState { stNotes :: [[Block]] diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs index a65d6f8bb..94c54c250 100644 --- a/src/Text/Pandoc/Writers/RST.hs +++ b/src/Text/Pandoc/Writers/RST.hs @@ -43,7 +43,6 @@ import Data.List ( isPrefixOf, stripPrefix, intersperse, transpose ) import Network.URI (isURI) import Text.Pandoc.Pretty import Control.Monad.State -import Control.Applicative ( (<$>) ) import Data.Char (isSpace, toLower) type Refs = [([Inline], Target)] @@ -82,7 +81,9 @@ pandocToRST (Pandoc meta blocks) = do (fmap (render colwidth) . blockListToRST) (fmap (trimr . render colwidth) . inlineListToRST) $ deleteMeta "title" $ deleteMeta "subtitle" meta - body <- blockListToRST' True $ normalizeHeadings 1 blocks + body <- blockListToRST' True $ if writerStandalone opts + then normalizeHeadings 1 blocks + else blocks notes <- liftM (reverse . stNotes) get >>= notesToRST -- note that the notes may contain refs, so we do them first refs <- liftM (reverse . stLinks) get >>= refsToRST @@ -102,7 +103,8 @@ pandocToRST (Pandoc meta blocks) = do then return $ renderTemplate' (writerTemplate opts) context else return main where - normalizeHeadings lev (Header l a i:bs) = Header lev a i:normalizeHeadings (lev+1) cont ++ normalizeHeadings lev bs' + normalizeHeadings lev (Header l a i:bs) = + Header lev a i:normalizeHeadings (lev+1) cont ++ normalizeHeadings lev bs' where (cont,bs') = break (headerLtEq l) bs headerLtEq level (Header l' _ _) = l' <= level headerLtEq _ _ = False @@ -344,7 +346,8 @@ blockListToRST = blockListToRST' False -- | Convert list of Pandoc inline elements to RST. inlineListToRST :: [Inline] -> State WriterState Doc inlineListToRST lst = - mapM inlineToRST (removeSpaceAfterDisplayMath $ insertBS lst) >>= return . hcat + mapM inlineToRST (removeSpaceAfterDisplayMath $ insertBS lst) >>= + return . hcat where -- remove spaces after displaymath, as they screw up indentation: removeSpaceAfterDisplayMath (Math DisplayMath x : zs) = Math DisplayMath x : dropWhile (==Space) zs @@ -352,8 +355,8 @@ inlineListToRST lst = removeSpaceAfterDisplayMath [] = [] insertBS :: [Inline] -> [Inline] -- insert '\ ' where needed insertBS (x:y:z:zs) - | isComplex y && surroundComplex x z = - x : y : RawInline "rst" "\\ " : insertBS (z:zs) + | isComplex y && (surroundComplex x z) = + x : y : insertBS (z : zs) insertBS (x:y:zs) | isComplex x && not (okAfterComplex y) = x : RawInline "rst" "\\ " : insertBS (y : zs) @@ -394,6 +397,8 @@ inlineListToRST lst = isComplex (Image _ _ _) = True isComplex (Code _ _) = True isComplex (Math _ _) = True + isComplex (Cite _ (x:_)) = isComplex x + isComplex (Span _ (x:_)) = isComplex x isComplex _ = False -- | Convert Pandoc inline element to RST. diff --git a/src/Text/Pandoc/Writers/Textile.hs b/src/Text/Pandoc/Writers/Textile.hs index 456bf19c9..1d5734c96 100644 --- a/src/Text/Pandoc/Writers/Textile.hs +++ b/src/Text/Pandoc/Writers/Textile.hs @@ -40,12 +40,12 @@ import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.XML ( escapeStringForXML ) import Data.List ( intercalate ) import Control.Monad.State -import Control.Applicative ((<$>)) import Data.Char ( isSpace ) data WriterState = WriterState { stNotes :: [String] -- Footnotes , stListLevel :: [Char] -- String at beginning of list items, e.g. "**" + , stStartNum :: Maybe Int -- Start number if first list item , stUseTags :: Bool -- True if we should use HTML tags because we're in a complex list } @@ -53,7 +53,8 @@ data WriterState = WriterState { writeTextile :: WriterOptions -> Pandoc -> String writeTextile opts document = evalState (pandocToTextile opts document) - WriterState { stNotes = [], stListLevel = [], stUseTags = False } + WriterState { stNotes = [], stListLevel = [], stStartNum = Nothing, + stUseTags = False } -- | Return Textile representation of document. pandocToTextile :: WriterOptions -> Pandoc -> State WriterState String @@ -220,7 +221,7 @@ blockToTextile opts x@(BulletList items) = do modify $ \s -> s { stListLevel = init (stListLevel s) } return $ vcat contents ++ (if level > 1 then "" else "\n") -blockToTextile opts x@(OrderedList attribs items) = do +blockToTextile opts x@(OrderedList attribs@(start, _, _) items) = do oldUseTags <- liftM stUseTags get let useTags = oldUseTags || not (isSimpleList x) if useTags @@ -229,10 +230,14 @@ blockToTextile opts x@(OrderedList attribs items) = do return $ "<ol" ++ listAttribsToString attribs ++ ">\n" ++ vcat contents ++ "\n</ol>\n" else do - modify $ \s -> s { stListLevel = stListLevel s ++ "#" } + modify $ \s -> s { stListLevel = stListLevel s ++ "#" + , stStartNum = if start > 1 + then Just start + else Nothing } level <- get >>= return . length . stListLevel contents <- mapM (listItemToTextile opts) items - modify $ \s -> s { stListLevel = init (stListLevel s) } + modify $ \s -> s { stListLevel = init (stListLevel s), + stStartNum = Nothing } return $ vcat contents ++ (if level > 1 then "" else "\n") blockToTextile opts (DefinitionList items) = do @@ -260,8 +265,13 @@ listItemToTextile opts items = do if useTags then return $ "<li>" ++ contents ++ "</li>" else do - marker <- get >>= return . stListLevel - return $ marker ++ " " ++ contents + marker <- gets stListLevel + mbstart <- gets stStartNum + case mbstart of + Just n -> do + modify $ \s -> s{ stStartNum = Nothing } + return $ marker ++ show n ++ " " ++ contents + Nothing -> return $ marker ++ " " ++ contents -- | Convert definition list item (label, list of blocks) to Textile. definitionListItemToTextile :: WriterOptions @@ -278,8 +288,8 @@ isSimpleList :: Block -> Bool isSimpleList x = case x of BulletList items -> all isSimpleListItem items - OrderedList (num, sty, _) items -> all isSimpleListItem items && - num == 1 && sty `elem` [DefaultStyle, Decimal] + OrderedList (_, sty, _) items -> all isSimpleListItem items && + sty `elem` [DefaultStyle, Decimal] _ -> False -- | True if list item can be handled with the simple wiki syntax. False if diff --git a/stack.hsb2hs.yaml b/stack.hsb2hs.yaml new file mode 100644 index 000000000..1703e778f --- /dev/null +++ b/stack.hsb2hs.yaml @@ -0,0 +1,4 @@ +packages: +- 'https://hackage.haskell.org/package/preprocessor-tools-1.0.1/preprocessor-tools-1.0.1.tar.gz' +- 'https://hackage.haskell.org/package/hsb2hs-0.3.1/hsb2hs-0.3.1.tar.gz' +resolver: lts-3.10 diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 000000000..9f5838c6f --- /dev/null +++ b/stack.yaml @@ -0,0 +1,19 @@ +flags: + pandoc: + trypandoc: false + https: true + embed_data_files: false + old-locale: false + network-uri: true +packages: +- '.' +- location: + git: 'https://github.com/jgm/pandoc-types' + commit: c64eb383dce64396290aa815351ddb6e43cb6b0f + extra-dep: true +- location: + git: 'https://github.com/jgm/texmath' + commit: a716e9b5d8c1634847db2c1119e60836634569bf + extra-dep: true +extra-deps: [] +resolver: lts-3.13 diff --git a/tests/Tests/Old.hs b/tests/Tests/Old.hs index 047ad0481..c27d30deb 100644 --- a/tests/Tests/Old.hs +++ b/tests/Tests/Old.hs @@ -105,6 +105,8 @@ tests = [ testGroup "markdown" [ testGroup "writer" $ writerTests "docbook" , test "reader" ["-r", "docbook", "-w", "native", "-s"] "docbook-reader.docbook" "docbook-reader.native" + , test "reader" ["-r", "docbook", "-w", "native", "-s"] + "docbook-xref.docbook" "docbook-xref.native" ] , testGroup "native" [ testGroup "writer" $ writerTests "native" @@ -163,6 +165,12 @@ tests = [ testGroup "markdown" [ "opendocument" , "context" , "texinfo", "icml" , "man" , "plain" , "rtf", "org", "asciidoc" ] + , testGroup "writers-lang-and-dir" + [ test "latex" ["-f", "native", "-t", "latex", "-s"] + "writers-lang-and-dir.native" "writers-lang-and-dir.latex" + , test "context" ["-f", "native", "-t", "context", "-s"] + "writers-lang-and-dir.native" "writers-lang-and-dir.context" + ] ] -- makes sure file is fully closed after reading @@ -194,7 +202,8 @@ writerTests format , test "tables" opts "tables.native" ("tables" <.> format) ] where - opts = ["-r", "native", "-w", format, "--columns=78"] + opts = ["-r", "native", "-w", format, "--columns=78", + "--variable", "pandoc-version="] s5WriterTest :: String -> [String] -> String -> Test s5WriterTest modifier opts format diff --git a/tests/Tests/Readers/Docx.hs b/tests/Tests/Readers/Docx.hs index 47292bc99..086d3f964 100644 --- a/tests/Tests/Readers/Docx.hs +++ b/tests/Tests/Readers/Docx.hs @@ -131,6 +131,10 @@ tests = [ testGroup "inlines" "docx/tabs.docx" "docx/tabs.native" , testCompare + "special punctuation" + "docx/special_punctuation.docx" + "docx/special_punctuation.native" + , testCompare "normalizing inlines" "docx/normalize.docx" "docx/normalize.native" @@ -181,10 +185,22 @@ tests = [ testGroup "inlines" "docx/german_styled_lists.docx" "docx/german_styled_lists.native" , testCompare + "user deletes bullet after list item (=> part of item par)" + "docx/dummy_item_after_list_item.docx" + "docx/dummy_item_after_list_item.native" + , testCompare + "user deletes bullet after par (=> new par)" + "docx/dummy_item_after_paragraph.docx" + "docx/dummy_item_after_paragraph.native" + , testCompare "footnotes and endnotes" "docx/notes.docx" "docx/notes.native" , testCompare + "links in footnotes and endnotes" + "docx/link_in_notes.docx" + "docx/link_in_notes.native" + , testCompare "blockquotes (parsing indent as blockquote)" "docx/block_quotes.docx" "docx/block_quotes_parse_indent.native" diff --git a/tests/Tests/Readers/EPUB.hs b/tests/Tests/Readers/EPUB.hs index 033352d51..2ad36eba6 100644 --- a/tests/Tests/Readers/EPUB.hs +++ b/tests/Tests/Readers/EPUB.hs @@ -7,7 +7,6 @@ import Test.Framework.Providers.HUnit import qualified Data.ByteString.Lazy as BL import Text.Pandoc.Readers.EPUB import Text.Pandoc.MediaBag (MediaBag, mediaDirectory) -import Control.Applicative import Text.Pandoc.Error getMediaBag :: FilePath -> IO MediaBag diff --git a/tests/Tests/Readers/LaTeX.hs b/tests/Tests/Readers/LaTeX.hs index b72d707e7..e21f75aa9 100644 --- a/tests/Tests/Readers/LaTeX.hs +++ b/tests/Tests/Readers/LaTeX.hs @@ -7,7 +7,6 @@ import Tests.Helpers import Tests.Arbitrary() import Text.Pandoc.Builder import Text.Pandoc -import Data.Monoid (mempty) import Text.Pandoc.Error latex :: String -> Pandoc diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs index 5b39ae7e2..366ab7413 100644 --- a/tests/Tests/Readers/Markdown.hs +++ b/tests/Tests/Readers/Markdown.hs @@ -66,9 +66,11 @@ bareLinkTests = , ("http://en.wikipedia.org/wiki/Sprite_(computer_graphics)", autolink "http://en.wikipedia.org/wiki/Sprite_(computer_graphics)") , ("http://en.wikipedia.org/wiki/Sprite_[computer_graphics]", - autolink "http://en.wikipedia.org/wiki/Sprite_[computer_graphics]") + link "http://en.wikipedia.org/wiki/Sprite_%5Bcomputer_graphics%5D" "" + (str "http://en.wikipedia.org/wiki/Sprite_[computer_graphics]")) , ("http://en.wikipedia.org/wiki/Sprite_{computer_graphics}", - autolink "http://en.wikipedia.org/wiki/Sprite_{computer_graphics}") + link "http://en.wikipedia.org/wiki/Sprite_%7Bcomputer_graphics%7D" "" + (str "http://en.wikipedia.org/wiki/Sprite_{computer_graphics}")) , ("http://example.com/Notification_Center-GitHub-20101108-140050.jpg", autolink "http://example.com/Notification_Center-GitHub-20101108-140050.jpg") , ("https://github.com/github/hubot/blob/master/scripts/cream.js#L20-20", @@ -179,6 +181,13 @@ tests = [ testGroup "inline code" , "technically invalid comment" =: "<!-- pandoc --help -->" =?> rawBlock "html" "<!-- pandoc --help -->" + , test markdownGH "issue 2469" $ + "<\n\na>" =?> + para (text "<") <> para (text "a>") + ] + , testGroup "emoji" + [ test markdownGH "emoji symbols" $ + ":smile: and :+1:" =?> para (text "😄 and 👍") ] , "unbalanced brackets" =: "[[[[[[[[[[[[[[[hi" =?> para (text "[[[[[[[[[[[[[[[hi") diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index 92e6993df..9e7399aa0 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -7,7 +7,6 @@ import Tests.Helpers import Text.Pandoc.Builder import Text.Pandoc import Data.List (intersperse) -import Data.Monoid (mempty, mappend, mconcat) import Text.Pandoc.Error org :: String -> Pandoc @@ -265,6 +264,16 @@ tests = ) "echo 'Hello, World'") + , "Inline code block with toggle" =: + "src_sh[:toggle]{echo $HOME}" =?> + (para $ codeWith ( "" + , [ "bash", "rundoc-block" ] + , [ ("rundoc-language", "sh") + , ("rundoc-toggle", "yes") + ] + ) + "echo $HOME") + , "Citation" =: "[@nonexistent]" =?> let citation = Citation @@ -457,21 +466,25 @@ tests = , "First Level Header" =: "* Headline\n" =?> - header 1 "Headline" + headerWith ("headline", [], []) 1 "Headline" , "Third Level Header" =: "*** Third Level Headline\n" =?> - header 3 ("Third" <> space <> - "Level" <> space <> - "Headline") + headerWith ("third-level-headline", [], []) + 3 + ("Third" <> space <> "Level" <> space <> "Headline") , "Compact Headers with Paragraph" =: unlines [ "* First Level" , "** Second Level" , " Text" ] =?> - mconcat [ header 1 ("First" <> space <> "Level") - , header 2 ("Second" <> space <> "Level") + mconcat [ headerWith ("first-level", [], []) + 1 + ("First" <> space <> "Level") + , headerWith ("second-level", [], []) + 2 + ("Second" <> space <> "Level") , para "Text" ] @@ -482,8 +495,12 @@ tests = , "" , " Text" ] =?> - mconcat [ header 1 ("First" <> space <> "Level") - , header 2 ("Second" <> space <> "Level") + mconcat [ headerWith ("first-level", [], []) + 1 + ("First" <> space <> "Level") + , headerWith ("second-level", [], []) + 2 + ("Second" <> space <> "Level") , para "Text" ] @@ -492,9 +509,13 @@ tests = , "Spaghetti and meatballs tonight." , "** walk dog" ] =?> - mconcat [ header 2 ("eat" <> space <> "dinner") + mconcat [ headerWith ("eat-dinner", [], []) + 2 + ("eat" <> space <> "dinner") , para $ spcSep [ "Spaghetti", "and", "meatballs", "tonight." ] - , header 2 ("walk" <> space <> "dog") + , headerWith ("walk-dog", [], []) + 2 + ("walk" <> space <> "dog") ] , "Tagged headers" =: @@ -503,14 +524,31 @@ tests = , "** Call John :@PHONE:JOHN: " ] =?> let tagSpan t = spanWith ("", ["tag"], [("data-tag-name", t)]) mempty - in mconcat [ header 1 ("Personal" <> tagSpan "PERSONAL") - , header 2 ("Call Mom" <> tagSpan "@PHONE") - , header 2 ("Call John" <> tagSpan "@PHONE" <> tagSpan "JOHN") + in mconcat [ headerWith ("personal", [], []) + 1 + ("Personal" <> tagSpan "PERSONAL") + , headerWith ("call-mom", [], []) + 2 + ("Call Mom" <> tagSpan "@PHONE") + , headerWith ("call-john", [], []) + 2 + ("Call John" <> tagSpan "@PHONE" <> tagSpan "JOHN") ] , "Untagged header containing colons" =: "* This: is not: tagged" =?> - header 1 "This: is not: tagged" + headerWith ("this-is-not-tagged", [], []) 1 "This: is not: tagged" + + , "Header starting with strokeout text" =: + unlines [ "foo" + , "" + , "* +thing+ other thing" + ] =?> + mconcat [ para "foo" + , headerWith ("thing-other-thing", [], []) + 1 + ((strikeout "thing") <> " other thing") + ] , "Comment Trees" =: unlines [ "* COMMENT A comment tree" @@ -518,7 +556,7 @@ tests = , "** This will be dropped" , "* Comment tree above" ] =?> - header 1 "Comment tree above" + headerWith ("comment-tree-above", [], []) 1 "Comment tree above" , "Nothing but a COMMENT header" =: "* COMMENT Test" =?> @@ -640,7 +678,7 @@ tests = [ "Another", space, "note" , note $ para ("This" <> space <> "is" <> space <> "great!") ]) - , header 2 "Headline" + , headerWith ("headline", [], []) 2 "Headline" ] ] @@ -664,7 +702,7 @@ tests = "* Item2\n") =?> bulletList [ plain "Item1" ] <> - header 1 "Item2" + headerWith ("item2", [], []) 1 "Item2" , "Multi-line Bullet Lists" =: ("- *Fat\n" ++ @@ -724,7 +762,7 @@ tests = mconcat [ bulletList [ plain "Discovery" , plain ("Human" <> space <> "After" <> space <> "All") ] - , header 1 "Homework" + , headerWith ("homework", [], []) 1 "Homework" ] , "Bullet List Unindented with trailing Header" =: @@ -734,7 +772,7 @@ tests = mconcat [ bulletList [ plain "Discovery" , plain "Homework" ] - , header 1 "NotValidListItem" + , headerWith ("notvalidlistitem", [], []) 1 "NotValidListItem" ] , "Simple Ordered List" =: @@ -803,7 +841,7 @@ tests = unlines [ "- PLL :: phase-locked loop" , "- TTL ::" , " transistor-transistor logic" - , "- PSK::phase-shift keying" + , "- PSK :: phase-shift keying" , "" , " a digital modulation scheme" ] =?> @@ -839,9 +877,13 @@ tests = mconcat [ definitionList [ ("definition", [plain "list"]) , ("cool", [plain "defs"]) ] - , header 1 "header" + , headerWith ("header", [], []) 1 "header" ] + , "Definition lists double-colon markers must be surrounded by whitespace" =: + "- std::cout" =?> + bulletList [ plain "std::cout" ] + , "Loose bullet list" =: unlines [ "- apple" , "" @@ -853,6 +895,14 @@ tests = , para "orange" , para "peach" ] + + , "Recognize preceding paragraphs in non-list contexts" =: + unlines [ "CLOSED: [2015-10-19 Mon 15:03]" + , "- Note taken on [2015-10-19 Mon 13:24]" + ] =?> + mconcat [ para "CLOSED: [2015-10-19 Mon 15:03]" + , bulletList [ plain "Note taken on [2015-10-19 Mon 13:24]" ] + ] ] , testGroup "Tables" @@ -1077,6 +1127,15 @@ tests = , ": 65" ] =?> rawBlock "html" "" + , "Source block with toggling header arguments" =: + unlines [ "#+BEGIN_SRC sh :noeval" + , "echo $HOME" + , "#+END_SRC" + ] =?> + let classes = [ "bash", "rundoc-block" ] + params = [ ("rundoc-language", "sh"), ("rundoc-noeval", "yes") ] + in codeBlockWith ("", classes, params) "echo $HOME\n" + , "Example block" =: unlines [ "#+begin_example" , "A chosen representation of" @@ -1125,6 +1184,15 @@ tests = ] ] + , "Verse block with newlines" =: + unlines [ "#+BEGIN_VERSE" + , "foo" + , "" + , "bar" + , "#+END_VERSE" + ] =?> + para ("foo" <> linebreak <> linebreak <> "bar") + , "LaTeX fragment" =: unlines [ "\\begin{equation}" , "X_i = \\begin{cases}" @@ -1182,6 +1250,7 @@ tests = ] in codeBlockWith ( "", classes, params) "code body\n" ] + , testGroup "Smart punctuation" [ test orgSmart "quote before ellipses" ("'...hi'" @@ -1202,5 +1271,13 @@ tests = , test orgSmart "Dashes are allowed at the borders of emphasis'" ("/foo---/" =?> para (emph "foo—")) + + , test orgSmart "Single quotes can be followed by emphasized text" + ("Singles on the '/meat market/'" =?> + para ("Singles on the " <> (singleQuoted $ emph "meat market"))) + + , test orgSmart "Double quotes can be followed by emphasized text" + ("Double income, no kids: \"/DINK/\"" =?> + para ("Double income, no kids: " <> (doubleQuoted $ emph "DINK"))) ] ] diff --git a/tests/Tests/Readers/RST.hs b/tests/Tests/Readers/RST.hs index 48abc16f8..df6ba61b2 100644 --- a/tests/Tests/Readers/RST.hs +++ b/tests/Tests/Readers/RST.hs @@ -8,7 +8,6 @@ import Tests.Arbitrary() import Text.Pandoc.Builder import Text.Pandoc import Text.Pandoc.Error -import Data.Monoid (mempty) rst :: String -> Pandoc rst = handleError . readRST def{ readerStandalone = True } diff --git a/tests/Tests/Readers/Txt2Tags.hs b/tests/Tests/Readers/Txt2Tags.hs index 938a2b455..bfe217ce3 100644 --- a/tests/Tests/Readers/Txt2Tags.hs +++ b/tests/Tests/Readers/Txt2Tags.hs @@ -9,7 +9,6 @@ import Text.Pandoc.Builder import Text.Pandoc import Text.Pandoc.Error import Data.List (intersperse) -import Data.Monoid (mempty, mconcat) import Text.Pandoc.Readers.Txt2Tags t2t :: String -> Pandoc diff --git a/tests/Tests/Shared.hs b/tests/Tests/Shared.hs index 9b55b7b1d..12652e4b7 100644 --- a/tests/Tests/Shared.hs +++ b/tests/Tests/Shared.hs @@ -8,8 +8,7 @@ import Tests.Arbitrary() import Test.Framework.Providers.HUnit import Test.HUnit ( assertBool, (@?=) ) import Text.Pandoc.Builder -import Data.Monoid -import System.FilePath (joinPath) +import System.FilePath.Posix (joinPath) tests :: [Test] tests = [ testGroup "normalize" diff --git a/tests/Tests/Walk.hs b/tests/Tests/Walk.hs index 34350e28a..c87cc17d7 100644 --- a/tests/Tests/Walk.hs +++ b/tests/Tests/Walk.hs @@ -8,7 +8,6 @@ import Tests.Helpers import Data.Char (toUpper) import Tests.Arbitrary() import Data.Generics -import Data.Monoid tests :: [Test] tests = [ testGroup "Walk" diff --git a/tests/Tests/Writers/AsciiDoc.hs b/tests/Tests/Writers/AsciiDoc.hs index f9e6bd154..56a62c6e4 100644 --- a/tests/Tests/Writers/AsciiDoc.hs +++ b/tests/Tests/Writers/AsciiDoc.hs @@ -5,7 +5,6 @@ import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Tests.Arbitrary() -import Data.Monoid asciidoc :: (ToString a, ToPandoc a) => a -> String asciidoc = writeAsciiDoc def{ writerWrapText = False } . toPandoc diff --git a/tests/Tests/Writers/Docx.hs b/tests/Tests/Writers/Docx.hs index 068c5a935..8dba0ea55 100644 --- a/tests/Tests/Writers/Docx.hs +++ b/tests/Tests/Writers/Docx.hs @@ -8,6 +8,7 @@ import Test.Framework import Text.Pandoc.Readers.Docx import Text.Pandoc.Writers.Docx import Text.Pandoc.Error +import System.FilePath ((</>)) type Options = (WriterOptions, ReaderOptions) @@ -16,7 +17,9 @@ compareOutput :: Options -> IO (Pandoc, Pandoc) compareOutput opts nativeFile = do nf <- Prelude.readFile nativeFile - df <- writeDocx (fst opts) (handleError $ readNative nf) + let wopts = fst opts + df <- writeDocx wopts{writerUserDataDir = Just (".." </> "data")} + (handleError $ readNative nf) let (p, _) = handleError $ readDocx (snd opts) df return (p, handleError $ readNative nf) diff --git a/tests/Tests/Writers/LaTeX.hs b/tests/Tests/Writers/LaTeX.hs index d1cfd3ddf..05dfcbd3d 100644 --- a/tests/Tests/Writers/LaTeX.hs +++ b/tests/Tests/Writers/LaTeX.hs @@ -42,7 +42,7 @@ tests = [ testGroup "code blocks" , testGroup "definition lists" [ "with internal link" =: definitionList [(link "#go" "" (str "testing"), [plain (text "hi there")])] =?> - "\\begin{description}\n\\tightlist\n\\item[{\\hyperref[go]{testing}}]\nhi there\n\\end{description}" + "\\begin{description}\n\\tightlist\n\\item[{\\protect\\hyperlink{go}{testing}}]\nhi there\n\\end{description}" ] , testGroup "math" [ "escape |" =: para (math "\\sigma|_{\\{x\\}}") =?> diff --git a/tests/Tests/Writers/RST.hs b/tests/Tests/Writers/RST.hs index 2a511782f..b9e359dae 100644 --- a/tests/Tests/Writers/RST.hs +++ b/tests/Tests/Writers/RST.hs @@ -46,7 +46,10 @@ tests = [ testGroup "rubrics" unlines [ "foo" , "==="] - , "heading levels" =: + -- note: heading normalization is only done in standalone mode + , test (writeRST def{ writerStandalone = True, + writerTemplate = "$body$\n" } . toPandoc) + "heading levels" $ header 1 (text "Header 1") <> header 3 (text "Header 2") <> header 2 (text "Header 2") <> @@ -75,5 +78,32 @@ tests = [ testGroup "rubrics" , "" , "Header 2" , "--------"] + , test (writeRST def{ writerStandalone = True, + writerTemplate = "$body$\n" } . toPandoc) + "minimal heading levels" $ + header 2 (text "Header 1") <> + header 3 (text "Header 2") <> + header 2 (text "Header 1") <> + header 4 (text "Header 2") <> + header 5 (text "Header 3") <> + header 3 (text "Header 2") =?> + unlines + [ "Header 1" + , "========" + , "" + , "Header 2" + , "--------" + , "" + , "Header 1" + , "========" + , "" + , "Header 2" + , "--------" + , "" + , "Header 3" + , "~~~~~~~~" + , "" + , "Header 2" + , "--------"] ] ] diff --git a/tests/docbook-xref.docbook b/tests/docbook-xref.docbook new file mode 100644 index 000000000..ebcd94d00 --- /dev/null +++ b/tests/docbook-xref.docbook @@ -0,0 +1,70 @@ +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +<book><title>An Example Book</title> +<chapter id="ch01"><title>XRef Samples</title> +<para> +This paragraph demonstrates several features of +<sgmltag>XRef</sgmltag>. +</para> +<itemizedlist> +<listitem><para>A straight link generates the +cross-reference text: <xref linkend="ch02"/>. +</para></listitem> +<listitem><para>A link to an element with an +<sgmltag class="attribute">XRefLabel</sgmltag>: +<xref linkend="ch03"/>. +</para></listitem> +<listitem><para>A link with an +<sgmltag class="attribute">EndTerm</sgmltag>: +<xref linkend="ch04" endterm="ch04short"/>. +</para></listitem> +<listitem><para>A link to an +<sgmltag>cmdsynopsis</sgmltag> element: <xref linkend="cmd01"/>. +</para></listitem> +<listitem><para>A link to an +<sgmltag>funcsynopsis</sgmltag> element: <xref linkend="func01"/>. +</para></listitem> +</itemizedlist> +</chapter> + +<chapter id="ch02"> + <title>The Second Chapter</title> + <para>Some content here</para> +</chapter> + +<chapter id="ch03" xreflabel="Chapter the Third"> + <title>The Third Chapter</title> + <para>Some content here</para> +</chapter> + +<chapter id="ch04"> + <title>The Fourth Chapter</title> + <titleabbrev id="ch04short">Chapter 4</titleabbrev> + <para>Some content here</para> + +<cmdsynopsis id="cmd01"> + <command>chgrp</command> + <arg>-R + <group> + <arg>-H</arg> + <arg>-L</arg> + <arg>-P</arg> + </group> + </arg> + <arg>-f</arg> + <arg choice='plain'><replaceable>group</replaceable></arg> + <arg rep='repeat' choice='plain'><replaceable>file</replaceable></arg> +</cmdsynopsis> + + +<funcsynopsis id="func01"> +<funcprototype> +<funcdef>int <function>max</function></funcdef> +<paramdef>int <parameter>int1</parameter></paramdef> +<paramdef>int <parameter>int2</parameter></paramdef> +</funcprototype> +</funcsynopsis> + +</chapter> +</book> + diff --git a/tests/docbook-xref.native b/tests/docbook-xref.native new file mode 100644 index 000000000..2a83faf41 --- /dev/null +++ b/tests/docbook-xref.native @@ -0,0 +1,29 @@ +Pandoc (Meta {unMeta = fromList []}) +[Header 1 ("ch01",[],[]) [Str "XRef",Space,Str "Samples"] +,Para [Str "This",Space,Str "paragraph",Space,Str "demonstrates",Space,Str "several",Space,Str "features",Space,Str "of",Space,Str "XRef."] +,BulletList + [[Para [Str "A",Space,Str "straight",Space,Str "link",Space,Str "generates",Space,Str "the",Space,Str "cross-reference",Space,Str "text:",Space,Link ("",[],[]) [Str "The Second Chapter"] ("#ch02",""),Str "."]] + ,[Para [Str "A",Space,Str "link",Space,Str "to",Space,Str "an",Space,Str "element",Space,Str "with",Space,Str "an",Space,Str "XRefLabel:",Space,Link ("",[],[]) [Str "Chapter the Third"] ("#ch03",""),Str "."]] + ,[Para [Str "A",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "EndTerm:",Space,Link ("",[],[]) [Str "Chapter 4"] ("#ch04",""),Str "."]] + ,[Para [Str "A",Space,Str "link",Space,Str "to",Space,Str "an",Space,Str "cmdsynopsis",Space,Str "element:",Space,Link ("",[],[]) [Str "chgrp"] ("#cmd01",""),Str "."]] + ,[Para [Str "A",Space,Str "link",Space,Str "to",Space,Str "an",Space,Str "funcsynopsis",Space,Str "element:",Space,Link ("",[],[]) [Str "max"] ("#func01",""),Str "."]]] +,Header 1 ("ch02",[],[]) [Str "The",Space,Str "Second",Space,Str "Chapter"] +,Para [Str "Some",Space,Str "content",Space,Str "here"] +,Header 1 ("ch03",[],[]) [Str "The",Space,Str "Third",Space,Str "Chapter"] +,Para [Str "Some",Space,Str "content",Space,Str "here"] +,Header 1 ("ch04",[],[]) [Str "The",Space,Str "Fourth",Space,Str "Chapter"] +,Para [Str "Some",Space,Str "content",Space,Str "here"] +,Plain [Str "chgrp"] +,Plain [Str "-R"] +,Plain [Str "-H"] +,Plain [Str "-L"] +,Plain [Str "-P"] +,Plain [Str "-f"] +,Plain [Str "group"] +,Plain [Str "file"] +,Plain [Str "int"] +,Plain [Str "max"] +,Plain [Str "int"] +,Plain [Str "int1"] +,Plain [Str "int"] +,Plain [Str "int2"]] diff --git a/tests/docx/dummy_item_after_list_item.docx b/tests/docx/dummy_item_after_list_item.docx Binary files differnew file mode 100644 index 000000000..5e29b993c --- /dev/null +++ b/tests/docx/dummy_item_after_list_item.docx diff --git a/tests/docx/dummy_item_after_list_item.native b/tests/docx/dummy_item_after_list_item.native new file mode 100644 index 000000000..3f6231932 --- /dev/null +++ b/tests/docx/dummy_item_after_list_item.native @@ -0,0 +1,3 @@ +[OrderedList (1,Decimal,Period) + [[Para [Str "One"] + ,Para [Str "Two",LineBreak,LineBreak,Str "Three"]]]] diff --git a/tests/docx/dummy_item_after_paragraph.docx b/tests/docx/dummy_item_after_paragraph.docx Binary files differnew file mode 100644 index 000000000..b0aee8843 --- /dev/null +++ b/tests/docx/dummy_item_after_paragraph.docx diff --git a/tests/docx/dummy_item_after_paragraph.native b/tests/docx/dummy_item_after_paragraph.native new file mode 100644 index 000000000..2e9b831c4 --- /dev/null +++ b/tests/docx/dummy_item_after_paragraph.native @@ -0,0 +1,3 @@ +[Para [Str "First",Space,Str "bullet",Space,Str "point",Space,Str "created",Space,Str "and",Space,Str "then",Space,Str "deleted"] +,Para [Str "A",Space,Str "normal",Space,Str "paragraph"] +,Para [Str "First",Space,Str "bullet",Space,Str "point",Space,Str "created",Space,Str "and",Space,Str "then",Space,Str "deleted",Space,Str "after",Space,Str "the",Space,Str "normal",Space,Str "paragraph"]] diff --git a/tests/docx/link_in_notes.docx b/tests/docx/link_in_notes.docx Binary files differnew file mode 100644 index 000000000..f3398f438 --- /dev/null +++ b/tests/docx/link_in_notes.docx diff --git a/tests/docx/link_in_notes.native b/tests/docx/link_in_notes.native new file mode 100644 index 000000000..b20358698 --- /dev/null +++ b/tests/docx/link_in_notes.native @@ -0,0 +1 @@ +[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Note [Para [Link ("",[],[]) [Str "http://wikipedia.org/"] ("http://wikipedia.org/","")]],Str "."]] diff --git a/tests/docx/special_punctuation.docx b/tests/docx/special_punctuation.docx Binary files differnew file mode 100644 index 000000000..8e0bb55c9 --- /dev/null +++ b/tests/docx/special_punctuation.docx diff --git a/tests/docx/special_punctuation.native b/tests/docx/special_punctuation.native new file mode 100644 index 000000000..304289f44 --- /dev/null +++ b/tests/docx/special_punctuation.native @@ -0,0 +1,2 @@ +[Para [Str "Soft",Space,Str "hyphen:",Space,Str "[\173]"] +,Para [Str "Non-breaking",Space,Str "hyphen:",Space,Str "[\8209]"]] diff --git a/tests/epub/features.native b/tests/epub/features.native index 96783ac03..0487fd635 100644 --- a/tests/epub/features.native +++ b/tests/epub/features.native @@ -1,107 +1,92 @@ [Para [Span ("front.xhtml",[],[]) []] -,RawBlock (Format "html") "<section>" -,Header 1 ("",[],[]) [Str "Reflowable",Space,Str "EPUB",Space,Str "3",Space,Str "Conformance",Space,Str "Test",Space,Str "Document:",Space,Str "0100"] -,RawBlock (Format "html") "<section>" -,Header 2 ("",[],[]) [Str "Status",Space,Str "of",Space,Str "this",Space,Str "Document"] -,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "currently",Space,Str "considered",Space,Span ("",["status"],[]) [Str "[UNDER",Space,Str "DEVELOPMENT]"],Space,Str "by",Space,Str "the",Space,Str "IDPF."] -,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "part",Space,Str "of",Space,Str "version",Space,Span ("",["version"],[]) [Str "X.X"],Space,Str "of",Space,Str "the",Space,Str "EPUB",Space,Str "3.0",Space,Str "Compliance",Space,Str "Test",Space,Str "Suite",Space,Str "released",Space,Str "on",Space,RawInline (Format "html") "<time class=\"release\">",Str "TBD",RawInline (Format "html") "</time>",Str "."] -,Para [Str "Before",Space,Str "using",Space,Str "this",Space,Str "publication",Space,Str "to",Space,Str "evaluate",Space,Str "reading",Space,Str "systems,",Space,Str "testers",Space,Str "are",Space,Str "strongly",Space,Str "encouraged",Space,Str "to",Space,Str "verify",Space,Str "that",Space,Str "they",Space,Str "have",Space,Str "the",Space,Str "latest",Space,Str "release",Space,Str "by",Space,Str "checking",Space,Str "the",Space,Str "current",Space,Str "release",Space,Str "version",Space,Str "and",Space,Str "date",Space,Str "of",Space,Str "the",Space,Str "test",Space,Str "suite",Space,Str "at",Space,Link ("",[],[]) [Str "TBD"] ("","")] -,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "one",Space,Str "of",Space,Str "several",Space,Str "that",Space,Str "currently",Space,Str "comprise",Space,Str "the",Space,Str "EPUB",Space,Str "3",Space,Str "conformance",Space,Str "test",Space,Str "suite",Space,Str "for",Space,Str "reflowable",Space,Str "content.",Space,Str "The",Space,Str "complete",Space,Str "test",Space,Str "suite",Space,Str "includes",Space,Str "all",Space,Str "of",Space,Str "the",Space,Str "following",Space,Str "publications:"] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "."]]] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section>" -,Header 2 ("",[],[]) [Str "About",Space,Str "this",Space,Str "Document"] -,Para [Str "This",Space,Str "document",Space,Str "focuses",Space,Str "on",Space,Str "human-evaluated",Space,Str "binary",Space,Str "(pass/fail)",Space,Str "tests",Space,Str "in",Space,Str "a",Space,Str "reflowable",Space,Str "context.",Space,Str "Tests",Space,Str "for",Space,Str "fixed-layout",Space,Str "content",Space,Str "and",Space,Str "other",Space,Str "individual",Space,Str "tests",Space,Str "that",Space,Str "require",Space,Str "a",Space,Str "dedicated",Space,Str "epub",Space,Str "file",Space,Str "are",Space,Str "available",Space,Str "in",Space,Str "additional",Space,Str "sibling",Space,Str "documents;",Space,Str "refer",Space,Str "to",Space,Str "the",Space,Link ("",[],[]) [Str "test",Space,Str "suite",Space,Str "wiki"] ("Overview",""),Space,Str "(",Code ("",[],[]) "https://github.com/mgylling/epub-testsuite/wiki/Overview",Str ")",Space,Str "for",Space,Str "additional",Space,Str "information."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section>" -,Header 2 ("",[],[]) [Str "Conventions"] -,Para [Str "The",Space,Str "following",Space,Str "conventions",Space,Str "are",Space,Str "used",Space,Str "throughout",Space,Str "the",Space,Str "document:"] -,DefinitionList - [([Str "1.",Space,Str "Locating",Space,Str "a",Space,Str "test"], - [[Div ("",["ctest"],[]) [Para [Str "Tests",Space,Str "for",Space,Emph [Str "required"],Space,Str "Reading",Space,Str "System",Space,Str "functionality",Space,Str "are",Space,Str "preceded",Space,Str "by",Space,Str "the",Space,Str "label:",Space,Span ("",["nature"],[("style","display: inline; font-size: 100%")]) [Str "[REQUIRED]"]]] - ,Div ("",["otest"],[]) [Para [Str "Tests",Space,Str "for",Space,Emph [Str "optional"],Space,Str "Reading",Space,Str "System",Space,Str "functionality",Space,Str "are",Space,Str "preceded",Space,Str "by",Space,Str "the",Space,Str "label:",Space,Span ("",["nature"],[("style","display: inline; font-size: 100%")]) [Str "[OPTIONAL]"]]]]]) - ,([Str "2.",Space,Str "Performing",Space,Str "the",Space,Str "test"], - [[Plain [Str "Each",Space,Str "test",Space,Str "includes",Space,Str "a",Space,Str "description",Space,Str "of",Space,Str "its",Space,Str "purpose",Space,Str "followed",Space,Str "by",Space,Str "the",Space,Str "actual",Space,Strong [Str "test",Space,Str "statement,",Space,Str "which",Space,Str "can",Space,Str "always",Space,Str "be",Space,Str "evaluated",Space,Str "to",Space,Str "true",Space,Str "or",Space,Str "false"],Str ".",Space,Str "These",Space,Str "statements",Space,Str "typically",Space,Str "have",Space,Str "the",Space,Str "form:",Space,Str "\"If",Space,Str "[some",Space,Str "condition],",Space,Str "the",Space,Str "test",Space,Str "passes\"."]]]) - ,([Str "3.",Space,Str "Scoring",Space,Str "in",Space,Str "the",Space,Str "results",Space,Str "form"], - [[Plain [Str "@@@TODO",Space,Str "provide",Space,Str "info",Space,Str "on",Space,Str "where",Space,Str "to",Space,Str "get",Space,Str "the",Space,Str "results",Space,Str "form"]]])] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "</section>" +,Div ("",["section"],[]) + [Header 1 ("",[],[]) [Str "Reflowable",Space,Str "EPUB",Space,Str "3",Space,Str "Conformance",Space,Str "Test",Space,Str "Document:",Space,Str "0100"] + ,Div ("",["section"],[]) + [Header 2 ("",[],[]) [Str "Status",Space,Str "of",Space,Str "this",Space,Str "Document"] + ,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "currently",Space,Str "considered",Space,Span ("",["status"],[]) [Str "[UNDER",Space,Str "DEVELOPMENT]"],Space,Str "by",Space,Str "the",Space,Str "IDPF."] + ,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "part",Space,Str "of",Space,Str "version",Space,Span ("",["version"],[]) [Str "X.X"],Space,Str "of",Space,Str "the",Space,Str "EPUB",Space,Str "3.0",Space,Str "Compliance",Space,Str "Test",Space,Str "Suite",Space,Str "released",Space,Str "on",Space,RawInline (Format "html") "<time class=\"release\">",Str "TBD",RawInline (Format "html") "</time>",Str "."] + ,Para [Str "Before",Space,Str "using",Space,Str "this",Space,Str "publication",Space,Str "to",Space,Str "evaluate",Space,Str "reading",Space,Str "systems,",Space,Str "testers",Space,Str "are",Space,Str "strongly",Space,Str "encouraged",Space,Str "to",Space,Str "verify",Space,Str "that",Space,Str "they",Space,Str "have",Space,Str "the",Space,Str "latest",Space,Str "release",Space,Str "by",Space,Str "checking",Space,Str "the",Space,Str "current",Space,Str "release",Space,Str "version",Space,Str "and",Space,Str "date",Space,Str "of",Space,Str "the",Space,Str "test",Space,Str "suite",Space,Str "at",Space,Link ("",[],[]) [Str "TBD"] ("http://idpf.org/","")] + ,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "one",Space,Str "of",Space,Str "several",Space,Str "that",Space,Str "currently",Space,Str "comprise",Space,Str "the",Space,Str "EPUB",Space,Str "3",Space,Str "conformance",Space,Str "test",Space,Str "suite",Space,Str "for",Space,Str "reflowable",Space,Str "content.",Space,Str "The",Space,Str "complete",Space,Str "test",Space,Str "suite",Space,Str "includes",Space,Str "all",Space,Str "of",Space,Str "the",Space,Str "following",Space,Str "publications:"] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "."]]]] + ,Div ("",["section"],[]) + [Header 2 ("",[],[]) [Str "About",Space,Str "this",Space,Str "Document"] + ,Para [Str "This",Space,Str "document",Space,Str "focuses",Space,Str "on",Space,Str "human-evaluated",Space,Str "binary",Space,Str "(pass/fail)",Space,Str "tests",Space,Str "in",Space,Str "a",Space,Str "reflowable",Space,Str "context.",Space,Str "Tests",Space,Str "for",Space,Str "fixed-layout",Space,Str "content",Space,Str "and",Space,Str "other",Space,Str "individual",Space,Str "tests",Space,Str "that",Space,Str "require",Space,Str "a",Space,Str "dedicated",Space,Str "epub",Space,Str "file",Space,Str "are",Space,Str "available",Space,Str "in",Space,Str "additional",Space,Str "sibling",Space,Str "documents;",Space,Str "refer",Space,Str "to",Space,Str "the",Space,Link ("",[],[]) [Str "test",Space,Str "suite",Space,Str "wiki"] ("https://github.com/mgylling/epub-testsuite/wiki/Overview",""),Space,Str "(",Code ("",[],[]) "https://github.com/mgylling/epub-testsuite/wiki/Overview",Str ")",Space,Str "for",Space,Str "additional",Space,Str "information."]] + ,Div ("",["section"],[]) + [Header 2 ("",[],[]) [Str "Conventions"] + ,Para [Str "The",Space,Str "following",Space,Str "conventions",Space,Str "are",Space,Str "used",Space,Str "throughout",Space,Str "the",Space,Str "document:"] + ,DefinitionList + [([Str "1.",Space,Str "Locating",Space,Str "a",Space,Str "test"], + [[Div ("",["ctest"],[]) + [Para [Str "Tests",Space,Str "for",Space,Emph [Str "required"],Space,Str "Reading",Space,Str "System",Space,Str "functionality",Space,Str "are",Space,Str "preceded",Space,Str "by",Space,Str "the",Space,Str "label:",Space,Span ("",["nature"],[("style","display: inline; font-size: 100%")]) [Str "[REQUIRED]"]]] + ,Div ("",["otest"],[]) + [Para [Str "Tests",Space,Str "for",Space,Emph [Str "optional"],Space,Str "Reading",Space,Str "System",Space,Str "functionality",Space,Str "are",Space,Str "preceded",Space,Str "by",Space,Str "the",Space,Str "label:",Space,Span ("",["nature"],[("style","display: inline; font-size: 100%")]) [Str "[OPTIONAL]"]]]]]) + ,([Str "2.",Space,Str "Performing",Space,Str "the",Space,Str "test"], + [[Plain [Str "Each",Space,Str "test",Space,Str "includes",Space,Str "a",Space,Str "description",Space,Str "of",Space,Str "its",Space,Str "purpose",Space,Str "followed",Space,Str "by",Space,Str "the",Space,Str "actual",Space,Strong [Str "test",Space,Str "statement,",Space,Str "which",Space,Str "can",Space,Str "always",Space,Str "be",Space,Str "evaluated",Space,Str "to",Space,Str "true",Space,Str "or",Space,Str "false"],Str ".",Space,Str "These",Space,Str "statements",Space,Str "typically",Space,Str "have",Space,Str "the",Space,Str "form:",Space,Str "\"If",Space,Str "[some",Space,Str "condition],",Space,Str "the",Space,Str "test",Space,Str "passes\"."]]]) + ,([Str "3.",Space,Str "Scoring",Space,Str "in",Space,Str "the",Space,Str "results",Space,Str "form"], + [[Plain [Str "@@@TODO",Space,Str "provide",Space,Str "info",Space,Str "on",Space,Str "where",Space,Str "to",Space,Str "get",Space,Str "the",Space,Str "results",Space,Str "form"]]])]]] ,Para [Span ("content-mathml-001.xhtml",[],[]) []] -,RawBlock (Format "html") "<section>" -,Header 2 ("content-mathml-001.xhtml#mathml",[],[]) [Str "MathML"] -,RawBlock (Format "html") "<section id=\"mathml-010\" class=\"ctest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "mathml-010"],Space,Str "Rendering"] -,Para [Str "Tests",Space,Str "whether",Space,Str "MathML",Space,Str "equation",Space,Str "rendering",Space,Str "is",Space,Str "supported."] -,Para [Math DisplayMath "\\int_{- \\infty}^{\\infty}e^{- x^{2}}\\, dx = \\sqrt{\\pi}",Space,Math DisplayMath "\\sum\\limits_{n = 1}^{\\infty}\\frac{1}{n^{2}} = \\frac{\\pi^{2}}{6}",Space,Math DisplayMath "x = \\frac{- b \\pm \\sqrt{b^{2} - 4ac}}{2a}"] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "equations",Space,Str "are",Space,Str "not",Space,Str "presented",Space,Str "as",Space,Str "linear",Space,Str "text",Space,Str "(e.g.,",Space,Str "x=-b\177b2-4ac2a),",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"mathml-020\" class=\"otest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "mathml-020"],Space,Str "CSS",Space,Str "Styling",Space,Str "of",Space,Str "the",Space,Code ("",[],[]) "math",Space,Str "element"] -,Para [Str "Tests",Space,Str "whether",Space,Str "basic",Space,Str "CSS",Space,Str "styling",Space,Str "of",Space,Str "MathML",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "the",Space,Code ("",[],[]) "math",Space,Str "element."] -,Para [Math InlineMath "{2x}{+ y - z}"] -,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "equation",Space,Str "has",Space,Str "a",Space,Str "yellow",Space,Str "background",Space,Str "and",Space,Str "a",Space,Str "dashed",Space,Str "border."] -,Para [Str "If",Space,Str "the",Space,Str "reading",Space,Str "system",Space,Str "does",Space,Str "not",Space,Str "have",Space,Str "a",Space,Str "viewport,",Space,Str "or",Space,Str "does",Space,Str "not",Space,Str "support",Space,Str "CSS",Space,Str "styles,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"mathml-021\" class=\"otest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "mathml-021"],Space,Str "CSS",Space,Str "Styling",Space,Str "of",Space,Str "the",Space,Code ("",[],[]) "mo",Space,Str "element"] -,Para [Str "Tests",Space,Str "whether",Space,Str "basic",Space,Str "CSS",Space,Str "styling",Space,Str "of",Space,Str "MathML",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "the",Space,Code ("",[],[]) "mo",Space,Str "element."] -,Para [Math InlineMath "{2x}{+ y - z}"] -,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "operators",Space,Str "are",Space,Str "enlarged",Space,Str "relative",Space,Str "to",Space,Str "the",Space,Str "other",Space,Str "symbols",Space,Str "and",Space,Str "numbers."] -,Para [Str "If",Space,Str "the",Space,Str "reading",Space,Str "system",Space,Str "does",Space,Str "not",Space,Str "have",Space,Str "a",Space,Str "viewport,",Space,Str "or",Space,Str "does",Space,Str "not",Space,Str "support",Space,Str "CSS",Space,Str "styles,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"mathml-022\" class=\"otest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "mathml-022"],Space,Str "CSS",Space,Str "Styling",Space,Str "of",Space,Str "the",Space,Code ("",[],[]) "mi",Space,Str "element"] -,Para [Str "Tests",Space,Str "whether",Space,Str "basic",Space,Str "CSS",Space,Str "styling",Space,Str "of",Space,Str "MathML",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "the",Space,Code ("",[],[]) "mi",Space,Str "element."] -,Para [Math InlineMath "{2x}{+ y - z}"] -,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "identifiers",Space,Str "are",Space,Str "bolded",Space,Str "and",Space,Str "blue."] -,Para [Str "If",Space,Str "the",Space,Str "reading",Space,Str "system",Space,Str "does",Space,Str "not",Space,Str "have",Space,Str "a",Space,Str "viewport,",Space,Str "or",Space,Str "does",Space,Str "not",Space,Str "support",Space,Str "CSS",Space,Str "styles,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"mathml-023\" class=\"otest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "mathml-023"],Space,Str "CSS",Space,Str "Styling",Space,Str "of",Space,Str "the",Space,Code ("",[],[]) "mn",Space,Str "element"] -,Para [Str "Tests",Space,Str "whether",Space,Str "basic",Space,Str "CSS",Space,Str "styling",Space,Str "of",Space,Str "MathML",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "the",Space,Code ("",[],[]) "mn",Space,Str "element."] -,Para [Math InlineMath "{2x}{+ y - z}"] -,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "number",Space,Str "2",Space,Str "is",Space,Str "italicized",Space,Str "and",Space,Str "blue."] -,Para [Str "If",Space,Str "the",Space,Str "reading",Space,Str "system",Space,Str "does",Space,Str "not",Space,Str "have",Space,Str "a",Space,Str "viewport,",Space,Str "or",Space,Str "does",Space,Str "not",Space,Str "support",Space,Str "CSS",Space,Str "styles,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"mathml-024\" class=\"ctest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "mathml-024"],Str "Horizontal",Space,Str "stretch,",Space,Code ("",[],[]) "mover",Str ",",Space,Code ("",[],[]) "munder",Str ",",Space,Str "and",Space,Code ("",[],[]) "mspace",Space,Str "elements"] -,Para [Str "Tests",Space,Str "whether",Space,Str "horizontal",Space,Str "stretch,",Space,Code ("",[],[]) "mover",Str ",",Space,Code ("",[],[]) "munder",Str ",",Space,Code ("",[],[]) "mspace",Space,Str "elements",Space,Str "are",Space,Str "supported."] -,Para [Math DisplayMath "c = \\overset{\\text{complex\\ number}}{\\overbrace{\\underset{\\text{real}}{\\underbrace{\\mspace{20mu} a\\mspace{20mu}}} + \\underset{\\text{imaginary}}{\\underbrace{\\quad b{\\mathbb{i}}\\quad}}}}"] -,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Str "."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"mathml-025\" class=\"ctest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "mathml-025"],Str "Testing",Space,Code ("",[],[]) "mtable",Space,Str "with",Space,Code ("",[],[]) "colspan",Space,Str "and",Space,Code ("",[],[]) "rowspan",Space,Str "attributes,",Space,Str "Hebrew",Space,Str "and",Space,Str "Script",Space,Str "fonts"] -,Para [Str "Tests",Space,Str "whether",Space,Code ("",[],[]) "mtable",Space,Str "with",Space,Code ("",[],[]) "colspan",Space,Str "and",Space,Code ("",[],[]) "mspace",Space,Str "attributes",Space,Str "(colum",Space,Str "and",Space,Str "row",Space,Str "spanning)",Space,Str "are",Space,Str "supported;",Space,Str "uses",Space,Str "Hebrew",Space,Str "and",Space,Str "Script",Space,Str "alphabets."] -,Para [Math DisplayMath "\\begin{array}{llllllllll}\n & {\\operatorname{cov}\\left( \\mathcal{L} \\right)} & \\longrightarrow & {\\operatorname{non}\\left( \\mathcal{K} \\right)} & \\longrightarrow & {\\operatorname{cof}\\left( \\mathcal{K} \\right)} & \\longrightarrow & {\\operatorname{cof}\\left( \\mathcal{L} \\right)} & \\longrightarrow & 2^{\\aleph_{0}} \\\\\n & \\uparrow & & \\uparrow & & \\uparrow & & \\uparrow & & \\\\\n & {\\mathfrak{b}} & \\longrightarrow & {\\mathfrak{d}} & & & & & & \\\\\n & \\uparrow & & \\uparrow & & & & & & \\\\\n\\aleph_{1} & \\longrightarrow & {\\operatorname{add}\\left( \\mathcal{L} \\right)} & \\longrightarrow & {\\operatorname{add}\\left( \\mathcal{K} \\right)} & \\longrightarrow & {\\operatorname{cov}\\left( \\mathcal{K} \\right)} & \\longrightarrow & {\\operatorname{non}\\left( \\mathcal{L} \\right)} & \\\\\n\\end{array}"] -,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Link ("",[],[]) [Str "Cicho\324's",Space,Str "Diagram"] ("Cicho%C5%84's_diagram",""),Str ":",Space,Str "."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"mathml-026\" class=\"ctest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "mathml-026"],Str "BiDi,",Space,Str "RTL",Space,Str "and",Space,Str "Arabic",Space,Str "alphabets"] -,Para [Str "Tests",Space,Str "whether",Space,Str "right-to-left",Space,Str "and",Space,Str "Arabic",Space,Str "alphabets",Space,Str "are",Space,Str "supported."] -,Para [Math DisplayMath "{d\\left( s \\right)} = \\begin{cases}\n{\\sum\\limits_{{\\lbrack?\\rbrack} = 1}^{S}s^{\\lbrack?\\rbrack}} & {\\text{\1573\1584\1575\1603\1575\1606}s > 0} \\\\\n{\\int_{1}^{S}{s^{\\lbrack?\\rbrack}s}} & {\\text{\1573\1584\1575\1603\1575\1606}s \\in m} \\\\\n{T\\pi} & {\\text{\1594\1610\1585\1584\1604\1603}\\left( \\text{\1605\1593}\\pi \\simeq 3,141 \\right)} \\\\\n\\end{cases}"] -,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Str "the",Space,Str "following",Space,Str "image:"] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"mathml-027\" class=\"ctest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "mathml-027"],Str "Elementary",Space,Str "math:",Space,Str "long",Space,Str "division",Space,Str "notation"] -,Para [Str "Tests",Space,Str "whether",Space,Code ("",[],[]) "mlongdiv",Space,Str "elements",Space,Str "(from",Space,Str "elementary",Space,Str "math)",Space,Str "are",Space,Str "supported."] -,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Str "the",Space,Str "following",Space,Str "image:",Space,Str "."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "</section>" +,Div ("",["section"],[]) + [Header 2 ("content-mathml-001.xhtml#mathml",[],[]) [Str "MathML"] + ,Div ("content-mathml-001.xhtml#mathml-010",["section","ctest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "mathml-010"],Space,Str "Rendering"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "MathML",Space,Str "equation",Space,Str "rendering",Space,Str "is",Space,Str "supported."] + ,Plain [Math DisplayMath "\\int_{- \\infty}^{\\infty}e^{- x^{2}}\\, dx = \\sqrt{\\pi}",Space,Math DisplayMath "\\sum\\limits_{n = 1}^{\\infty}\\frac{1}{n^{2}} = \\frac{\\pi^{2}}{6}",Space,Math DisplayMath "x = \\frac{- b \\pm \\sqrt{b^{2} - 4ac}}{2a}"] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "equations",Space,Str "are",Space,Str "not",Space,Str "presented",Space,Str "as",Space,Str "linear",Space,Str "text",Space,Str "(e.g.,",Space,Str "x=-b\177b2-4ac2a),",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("content-mathml-001.xhtml#mathml-020",["section","otest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "mathml-020"],Space,Str "CSS",Space,Str "Styling",Space,Str "of",Space,Str "the",Space,Code ("",[],[]) "math",Space,Str "element"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "basic",Space,Str "CSS",Space,Str "styling",Space,Str "of",Space,Str "MathML",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "the",Space,Code ("",[],[]) "math",Space,Str "element."] + ,Plain [Math InlineMath "{2x}{+ y - z}"] + ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "equation",Space,Str "has",Space,Str "a",Space,Str "yellow",Space,Str "background",Space,Str "and",Space,Str "a",Space,Str "dashed",Space,Str "border."] + ,Para [Str "If",Space,Str "the",Space,Str "reading",Space,Str "system",Space,Str "does",Space,Str "not",Space,Str "have",Space,Str "a",Space,Str "viewport,",Space,Str "or",Space,Str "does",Space,Str "not",Space,Str "support",Space,Str "CSS",Space,Str "styles,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."]] + ,Div ("content-mathml-001.xhtml#mathml-021",["section","otest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "mathml-021"],Space,Str "CSS",Space,Str "Styling",Space,Str "of",Space,Str "the",Space,Code ("",[],[]) "mo",Space,Str "element"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "basic",Space,Str "CSS",Space,Str "styling",Space,Str "of",Space,Str "MathML",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "the",Space,Code ("",[],[]) "mo",Space,Str "element."] + ,Plain [Math InlineMath "{2x}{+ y - z}"] + ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "operators",Space,Str "are",Space,Str "enlarged",Space,Str "relative",Space,Str "to",Space,Str "the",Space,Str "other",Space,Str "symbols",Space,Str "and",Space,Str "numbers."] + ,Para [Str "If",Space,Str "the",Space,Str "reading",Space,Str "system",Space,Str "does",Space,Str "not",Space,Str "have",Space,Str "a",Space,Str "viewport,",Space,Str "or",Space,Str "does",Space,Str "not",Space,Str "support",Space,Str "CSS",Space,Str "styles,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."]] + ,Div ("content-mathml-001.xhtml#mathml-022",["section","otest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "mathml-022"],Space,Str "CSS",Space,Str "Styling",Space,Str "of",Space,Str "the",Space,Code ("",[],[]) "mi",Space,Str "element"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "basic",Space,Str "CSS",Space,Str "styling",Space,Str "of",Space,Str "MathML",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "the",Space,Code ("",[],[]) "mi",Space,Str "element."] + ,Plain [Math InlineMath "{2x}{+ y - z}"] + ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "identifiers",Space,Str "are",Space,Str "bolded",Space,Str "and",Space,Str "blue."] + ,Para [Str "If",Space,Str "the",Space,Str "reading",Space,Str "system",Space,Str "does",Space,Str "not",Space,Str "have",Space,Str "a",Space,Str "viewport,",Space,Str "or",Space,Str "does",Space,Str "not",Space,Str "support",Space,Str "CSS",Space,Str "styles,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."]] + ,Div ("content-mathml-001.xhtml#mathml-023",["section","otest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "mathml-023"],Space,Str "CSS",Space,Str "Styling",Space,Str "of",Space,Str "the",Space,Code ("",[],[]) "mn",Space,Str "element"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "basic",Space,Str "CSS",Space,Str "styling",Space,Str "of",Space,Str "MathML",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "the",Space,Code ("",[],[]) "mn",Space,Str "element."] + ,Plain [Math InlineMath "{2x}{+ y - z}"] + ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "number",Space,Str "2",Space,Str "is",Space,Str "italicized",Space,Str "and",Space,Str "blue."] + ,Para [Str "If",Space,Str "the",Space,Str "reading",Space,Str "system",Space,Str "does",Space,Str "not",Space,Str "have",Space,Str "a",Space,Str "viewport,",Space,Str "or",Space,Str "does",Space,Str "not",Space,Str "support",Space,Str "CSS",Space,Str "styles,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."]] + ,Div ("content-mathml-001.xhtml#mathml-024",["section","ctest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "mathml-024"],Str "Horizontal",Space,Str "stretch,",Space,Code ("",[],[]) "mover",Str ",",Space,Code ("",[],[]) "munder",Str ",",Space,Str "and",Space,Code ("",[],[]) "mspace",Space,Str "elements"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "horizontal",Space,Str "stretch,",Space,Code ("",[],[]) "mover",Str ",",Space,Code ("",[],[]) "munder",Str ",",Space,Code ("",[],[]) "mspace",Space,Str "elements",Space,Str "are",Space,Str "supported."] + ,Plain [Math DisplayMath "c = \\overset{\\text{complex\\ number}}{\\overbrace{\\underset{\\text{real}}{\\underbrace{\\mspace{20mu} a\\mspace{20mu}}} + \\underset{\\text{imaginary}}{\\underbrace{\\quad b{\\mathbb{i}}\\quad}}}}"] + ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Str "."]] + ,Div ("content-mathml-001.xhtml#mathml-025",["section","ctest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "mathml-025"],Str "Testing",Space,Code ("",[],[]) "mtable",Space,Str "with",Space,Code ("",[],[]) "colspan",Space,Str "and",Space,Code ("",[],[]) "rowspan",Space,Str "attributes,",Space,Str "Hebrew",Space,Str "and",Space,Str "Script",Space,Str "fonts"] + ,Para [Str "Tests",Space,Str "whether",Space,Code ("",[],[]) "mtable",Space,Str "with",Space,Code ("",[],[]) "colspan",Space,Str "and",Space,Code ("",[],[]) "mspace",Space,Str "attributes",Space,Str "(colum",Space,Str "and",Space,Str "row",Space,Str "spanning)",Space,Str "are",Space,Str "supported;",Space,Str "uses",Space,Str "Hebrew",Space,Str "and",Space,Str "Script",Space,Str "alphabets."] + ,Plain [Math DisplayMath "\\begin{array}{llllllllll}\n & {\\operatorname{cov}\\left( \\mathcal{L} \\right)} & \\longrightarrow & {\\operatorname{non}\\left( \\mathcal{K} \\right)} & \\longrightarrow & {\\operatorname{cof}\\left( \\mathcal{K} \\right)} & \\longrightarrow & {\\operatorname{cof}\\left( \\mathcal{L} \\right)} & \\longrightarrow & 2^{\\aleph_{0}} \\\\\n & \\uparrow & & \\uparrow & & \\uparrow & & \\uparrow & & \\\\\n & {\\mathfrak{b}} & \\longrightarrow & {\\mathfrak{d}} & & & & & & \\\\\n & \\uparrow & & \\uparrow & & & & & & \\\\\n\\aleph_{1} & \\longrightarrow & {\\operatorname{add}\\left( \\mathcal{L} \\right)} & \\longrightarrow & {\\operatorname{add}\\left( \\mathcal{K} \\right)} & \\longrightarrow & {\\operatorname{cov}\\left( \\mathcal{K} \\right)} & \\longrightarrow & {\\operatorname{non}\\left( \\mathcal{L} \\right)} & \\\\\n\\end{array}"] + ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Link ("",[],[]) [Str "Cicho\324's",Space,Str "Diagram"] ("http://en.wikipedia.org/wiki/Cicho%C5%84's_diagram",""),Str ":",Space,Str "."]] + ,Div ("content-mathml-001.xhtml#mathml-026",["section","ctest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "mathml-026"],Str "BiDi,",Space,Str "RTL",Space,Str "and",Space,Str "Arabic",Space,Str "alphabets"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "right-to-left",Space,Str "and",Space,Str "Arabic",Space,Str "alphabets",Space,Str "are",Space,Str "supported."] + ,Plain [Math DisplayMath "{d\\left( s \\right)} = \\begin{cases}\n{\\sum\\limits_{{\\lbrack?\\rbrack} = 1}^{S}s^{\\lbrack?\\rbrack}} & {\\text{\1573\1584\1575\1603\1575\1606}s > 0} \\\\\n{\\int_{1}^{S}{s^{\\lbrack?\\rbrack}s}} & {\\text{\1573\1584\1575\1603\1575\1606}s \\in m} \\\\\n{T\\pi} & {\\text{\1594\1610\1585\1584\1604\1603}\\left( \\text{\1605\1593}\\pi \\simeq 3,141 \\right)} \\\\\n\\end{cases}"] + ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Str "the",Space,Str "following",Space,Str "image:"]] + ,Div ("content-mathml-001.xhtml#mathml-027",["section","ctest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "mathml-027"],Str "Elementary",Space,Str "math:",Space,Str "long",Space,Str "division",Space,Str "notation"] + ,Para [Str "Tests",Space,Str "whether",Space,Code ("",[],[]) "mlongdiv",Space,Str "elements",Space,Str "(from",Space,Str "elementary",Space,Str "math)",Space,Str "are",Space,Str "supported."] + ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Str "the",Space,Str "following",Space,Str "image:",Space,Str "."]]] ,Para [Span ("content-switch-001.xhtml",[],[]) []] -,RawBlock (Format "html") "<section id=\"epub-switch\">" -,Header 3 ("",[],[]) [Code ("",[],[]) "epub:switch"] -,RawBlock (Format "html") "<section id=\"switch-010\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "switch-010"],Space,Str "Support"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "epub:switch",Space,Str "element",Space,Str "is",Space,Str "supported."] -,Para [Str "PASS"] -,Para [Str "If",Space,Str "only",Space,Str "the",Space,Str "word",Space,Str "\"PASS\"",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes.",Space,Str "If",Space,Str "both",Space,Str "\"PASS\"",Space,Str "and",Space,Str "\"FAIL\"",Space,Str "are",Space,Str "rendered,",Space,Str "or",Space,Str "neither",Space,Str "\"PASS\"",Space,Str "nor",Space,Str "\"FAIL\"",Space,Str "is",Space,Str "rendered,",Space,Str "the",Space,Str "test",Space,Str "fails."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"switch-020\" class=\"otest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "switch-020"],Space,Str "MathML",Space,Str "Embedding"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Str "MathML",Space,Str "namespace",Space,Str "is",Space,Str "recognized",Space,Str "when",Space,Str "used",Space,Str "in",Space,Str "an",Space,Code ("",[],[]) "epub:case",Space,Str "element."] -,Para [Math InlineMath "{2x}{+ y - z}"] -,Para [Str "If",Space,Str "a",Space,Str "MathML",Space,Str "equation",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,Para [Str "If",Space,Str "test",Space,Code ("",[],[]) "switch-010",Space,Str "did",Space,Str "not",Space,Str "pass,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "</section>"] +,Div ("content-switch-001.xhtml#epub-switch",["section"],[]) + [Header 3 ("",[],[]) [Code ("",[],[]) "epub:switch"] + ,Div ("content-switch-001.xhtml#switch-010",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "switch-010"],Space,Str "Support"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "epub:switch",Space,Str "element",Space,Str "is",Space,Str "supported."] + ,Para [Str "PASS"] + ,Para [Str "If",Space,Str "only",Space,Str "the",Space,Str "word",Space,Str "\"PASS\"",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes.",Space,Str "If",Space,Str "both",Space,Str "\"PASS\"",Space,Str "and",Space,Str "\"FAIL\"",Space,Str "are",Space,Str "rendered,",Space,Str "or",Space,Str "neither",Space,Str "\"PASS\"",Space,Str "nor",Space,Str "\"FAIL\"",Space,Str "is",Space,Str "rendered,",Space,Str "the",Space,Str "test",Space,Str "fails."]] + ,Div ("content-switch-001.xhtml#switch-020",["section","otest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "switch-020"],Space,Str "MathML",Space,Str "Embedding"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Str "MathML",Space,Str "namespace",Space,Str "is",Space,Str "recognized",Space,Str "when",Space,Str "used",Space,Str "in",Space,Str "an",Space,Code ("",[],[]) "epub:case",Space,Str "element."] + ,Para [Math InlineMath "{2x}{+ y - z}"] + ,Para [Str "If",Space,Str "a",Space,Str "MathML",Space,Str "equation",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes."] + ,Para [Str "If",Space,Str "test",Space,Code ("",[],[]) "switch-010",Space,Str "did",Space,Str "not",Space,Str "pass,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."]]]] diff --git a/tests/epub/formatting.native b/tests/epub/formatting.native index 82655c6cc..ba0c55464 100644 --- a/tests/epub/formatting.native +++ b/tests/epub/formatting.native @@ -1,447 +1,402 @@ [Para [Span ("front.xhtml",[],[]) []] -,RawBlock (Format "html") "<section>" -,Header 1 ("",[],[]) [Str "EPUB",Space,Str "3",Space,Str "Styling",Space,Str "Test",Space,Str "Document:",Space,Str "0101"] -,RawBlock (Format "html") "<section>" -,Header 2 ("",[],[]) [Str "Status",Space,Str "of",Space,Str "this",Space,Str "Document"] -,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "currently",Space,Str "considered",Space,Span ("",["status"],[]) [Str "[UNDER",Space,Str "DEVELOPMENT]"],Space,Str "by",Space,Str "the",Space,Str "IDPF."] -,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "part",Space,Str "of",Space,Str "version",Space,Span ("",["version"],[]) [Str "X.X"],Space,Str "of",Space,Str "the",Space,Str "EPUB",Space,Str "3.0",Space,Str "Compliance",Space,Str "Test",Space,Str "Suite",Space,Str "released",Space,Str "on",Space,RawInline (Format "html") "<time class=\"release\">",Str "TBD",RawInline (Format "html") "</time>",Str "."] -,Para [Str "Before",Space,Str "using",Space,Str "this",Space,Str "publication",Space,Str "to",Space,Str "evaluate",Space,Str "reading",Space,Str "systems,",Space,Str "testers",Space,Str "are",Space,Str "strongly",Space,Str "encouraged",Space,Str "to",Space,Str "verify",Space,Str "that",Space,Str "they",Space,Str "have",Space,Str "the",Space,Str "latest",Space,Str "release",Space,Str "by",Space,Str "checking",Space,Str "the",Space,Str "current",Space,Str "release",Space,Str "version",Space,Str "and",Space,Str "date",Space,Str "of",Space,Str "the",Space,Str "test",Space,Str "suite",Space,Str "at",Space,Link ("",[],[]) [Str "TBD"] ("","")] -,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "one",Space,Str "of",Space,Str "several",Space,Str "that",Space,Str "currently",Space,Str "comprise",Space,Str "the",Space,Str "EPUB",Space,Str "3",Space,Str "conformance",Space,Str "test",Space,Str "suite",Space,Str "for",Space,Str "reflowable",Space,Str "content.",Space,Str "The",Space,Str "complete",Space,Str "test",Space,Str "suite",Space,Str "includes",Space,Str "all",Space,Str "of",Space,Str "the",Space,Str "following",Space,Str "publications:"] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "."]]] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section>" -,Header 2 ("",[],[]) [Str "About",Space,Str "this",Space,Str "Document"] -,Para [Str "This",Space,Str "document",Space,Str "focuses",Space,Str "on",Space,Str "human-evaluated",Space,Str "binary",Space,Str "(pass/fail)",Space,Str "tests",Space,Str "in",Space,Str "a",Space,Str "reflowable",Space,Str "context.",Space,Str "Tests",Space,Str "for",Space,Str "fixed-layout",Space,Str "content",Space,Str "and",Space,Str "other",Space,Str "individual",Space,Str "tests",Space,Str "that",Space,Str "require",Space,Str "a",Space,Str "dedicated",Space,Str "epub",Space,Str "file",Space,Str "are",Space,Str "available",Space,Str "in",Space,Str "additional",Space,Str "sibling",Space,Str "documents;",Space,Str "refer",Space,Str "to",Space,Str "the",Space,Link ("",[],[]) [Str "test",Space,Str "suite",Space,Str "wiki"] ("Overview",""),Space,Str "(",Code ("",[],[]) "https://github.com/mgylling/epub-testsuite/wiki/Overview",Str ")",Space,Str "for",Space,Str "additional",Space,Str "information."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section>" -,Header 2 ("",[],[]) [Str "Conventions"] -,Para [Str "The",Space,Str "following",Space,Str "conventions",Space,Str "are",Space,Str "used",Space,Str "throughout",Space,Str "the",Space,Str "document:"] -,DefinitionList - [([Str "1.",Space,Str "Locating",Space,Str "a",Space,Str "test"], - [[Div ("",["ctest"],[]) [Para [Str "Tests",Space,Str "for",Space,Emph [Str "required"],Space,Str "Reading",Space,Str "System",Space,Str "functionality",Space,Str "are",Space,Str "preceded",Space,Str "by",Space,Str "the",Space,Str "label:",Space,Span ("",["nature"],[("style","display: inline; font-size: 100%")]) [Str "[REQUIRED]"]]] - ,Div ("",["otest"],[]) [Para [Str "Tests",Space,Str "for",Space,Emph [Str "optional"],Space,Str "Reading",Space,Str "System",Space,Str "functionality",Space,Str "are",Space,Str "preceded",Space,Str "by",Space,Str "the",Space,Str "label:",Space,Span ("",["nature"],[("style","display: inline; font-size: 100%")]) [Str "[OPTIONAL]"]]]]]) - ,([Str "2.",Space,Str "Performing",Space,Str "the",Space,Str "test"], - [[Plain [Str "Each",Space,Str "test",Space,Str "includes",Space,Str "a",Space,Str "description",Space,Str "of",Space,Str "its",Space,Str "purpose",Space,Str "followed",Space,Str "by",Space,Str "the",Space,Str "actual",Space,Strong [Str "test",Space,Str "statement,",Space,Str "which",Space,Str "can",Space,Str "always",Space,Str "be",Space,Str "evaluated",Space,Str "to",Space,Str "true",Space,Str "or",Space,Str "false"],Str ".",Space,Str "These",Space,Str "statements",Space,Str "typically",Space,Str "have",Space,Str "the",Space,Str "form:",Space,Str "\"If",Space,Str "[some",Space,Str "condition],",Space,Str "the",Space,Str "test",Space,Str "passes\"."]]]) - ,([Str "3.",Space,Str "Scoring",Space,Str "in",Space,Str "the",Space,Str "results",Space,Str "form"], - [[Plain [Str "@@@TODO",Space,Str "provide",Space,Str "info",Space,Str "on",Space,Str "where",Space,Str "to",Space,Str "get",Space,Str "the",Space,Str "results",Space,Str "form"]]])] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "</section>" +,Div ("",["section"],[]) + [Header 1 ("",[],[]) [Str "EPUB",Space,Str "3",Space,Str "Styling",Space,Str "Test",Space,Str "Document:",Space,Str "0101"] + ,Div ("",["section"],[]) + [Header 2 ("",[],[]) [Str "Status",Space,Str "of",Space,Str "this",Space,Str "Document"] + ,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "currently",Space,Str "considered",Space,Span ("",["status"],[]) [Str "[UNDER",Space,Str "DEVELOPMENT]"],Space,Str "by",Space,Str "the",Space,Str "IDPF."] + ,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "part",Space,Str "of",Space,Str "version",Space,Span ("",["version"],[]) [Str "X.X"],Space,Str "of",Space,Str "the",Space,Str "EPUB",Space,Str "3.0",Space,Str "Compliance",Space,Str "Test",Space,Str "Suite",Space,Str "released",Space,Str "on",Space,RawInline (Format "html") "<time class=\"release\">",Str "TBD",RawInline (Format "html") "</time>",Str "."] + ,Para [Str "Before",Space,Str "using",Space,Str "this",Space,Str "publication",Space,Str "to",Space,Str "evaluate",Space,Str "reading",Space,Str "systems,",Space,Str "testers",Space,Str "are",Space,Str "strongly",Space,Str "encouraged",Space,Str "to",Space,Str "verify",Space,Str "that",Space,Str "they",Space,Str "have",Space,Str "the",Space,Str "latest",Space,Str "release",Space,Str "by",Space,Str "checking",Space,Str "the",Space,Str "current",Space,Str "release",Space,Str "version",Space,Str "and",Space,Str "date",Space,Str "of",Space,Str "the",Space,Str "test",Space,Str "suite",Space,Str "at",Space,Link ("",[],[]) [Str "TBD"] ("http://idpf.org/","")] + ,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "one",Space,Str "of",Space,Str "several",Space,Str "that",Space,Str "currently",Space,Str "comprise",Space,Str "the",Space,Str "EPUB",Space,Str "3",Space,Str "conformance",Space,Str "test",Space,Str "suite",Space,Str "for",Space,Str "reflowable",Space,Str "content.",Space,Str "The",Space,Str "complete",Space,Str "test",Space,Str "suite",Space,Str "includes",Space,Str "all",Space,Str "of",Space,Str "the",Space,Str "following",Space,Str "publications:"] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "."]]]] + ,Div ("",["section"],[]) + [Header 2 ("",[],[]) [Str "About",Space,Str "this",Space,Str "Document"] + ,Para [Str "This",Space,Str "document",Space,Str "focuses",Space,Str "on",Space,Str "human-evaluated",Space,Str "binary",Space,Str "(pass/fail)",Space,Str "tests",Space,Str "in",Space,Str "a",Space,Str "reflowable",Space,Str "context.",Space,Str "Tests",Space,Str "for",Space,Str "fixed-layout",Space,Str "content",Space,Str "and",Space,Str "other",Space,Str "individual",Space,Str "tests",Space,Str "that",Space,Str "require",Space,Str "a",Space,Str "dedicated",Space,Str "epub",Space,Str "file",Space,Str "are",Space,Str "available",Space,Str "in",Space,Str "additional",Space,Str "sibling",Space,Str "documents;",Space,Str "refer",Space,Str "to",Space,Str "the",Space,Link ("",[],[]) [Str "test",Space,Str "suite",Space,Str "wiki"] ("https://github.com/mgylling/epub-testsuite/wiki/Overview",""),Space,Str "(",Code ("",[],[]) "https://github.com/mgylling/epub-testsuite/wiki/Overview",Str ")",Space,Str "for",Space,Str "additional",Space,Str "information."]] + ,Div ("",["section"],[]) + [Header 2 ("",[],[]) [Str "Conventions"] + ,Para [Str "The",Space,Str "following",Space,Str "conventions",Space,Str "are",Space,Str "used",Space,Str "throughout",Space,Str "the",Space,Str "document:"] + ,DefinitionList + [([Str "1.",Space,Str "Locating",Space,Str "a",Space,Str "test"], + [[Div ("",["ctest"],[]) + [Para [Str "Tests",Space,Str "for",Space,Emph [Str "required"],Space,Str "Reading",Space,Str "System",Space,Str "functionality",Space,Str "are",Space,Str "preceded",Space,Str "by",Space,Str "the",Space,Str "label:",Space,Span ("",["nature"],[("style","display: inline; font-size: 100%")]) [Str "[REQUIRED]"]]] + ,Div ("",["otest"],[]) + [Para [Str "Tests",Space,Str "for",Space,Emph [Str "optional"],Space,Str "Reading",Space,Str "System",Space,Str "functionality",Space,Str "are",Space,Str "preceded",Space,Str "by",Space,Str "the",Space,Str "label:",Space,Span ("",["nature"],[("style","display: inline; font-size: 100%")]) [Str "[OPTIONAL]"]]]]]) + ,([Str "2.",Space,Str "Performing",Space,Str "the",Space,Str "test"], + [[Plain [Str "Each",Space,Str "test",Space,Str "includes",Space,Str "a",Space,Str "description",Space,Str "of",Space,Str "its",Space,Str "purpose",Space,Str "followed",Space,Str "by",Space,Str "the",Space,Str "actual",Space,Strong [Str "test",Space,Str "statement,",Space,Str "which",Space,Str "can",Space,Str "always",Space,Str "be",Space,Str "evaluated",Space,Str "to",Space,Str "true",Space,Str "or",Space,Str "false"],Str ".",Space,Str "These",Space,Str "statements",Space,Str "typically",Space,Str "have",Space,Str "the",Space,Str "form:",Space,Str "\"If",Space,Str "[some",Space,Str "condition],",Space,Str "the",Space,Str "test",Space,Str "passes\"."]]]) + ,([Str "3.",Space,Str "Scoring",Space,Str "in",Space,Str "the",Space,Str "results",Space,Str "form"], + [[Plain [Str "@@@TODO",Space,Str "provide",Space,Str "info",Space,Str "on",Space,Str "where",Space,Str "to",Space,Str "get",Space,Str "the",Space,Str "results",Space,Str "form"]]])]]] ,Para [Span ("styling-xhtml-001.xhtml",[],[]) []] -,RawBlock (Format "html") "<section id=\"epub-css\">" -,Header 1 ("",[],[]) [Str "EPUB",Space,Str "Style",Space,Str "Sheets"] -,Para [Str "This",Space,Str "section",Space,Str "contains",Space,Str "tests",Space,Str "for",Space,Str "styling",Space,Str "and",Space,Str "layout."] -,RawBlock (Format "html") "</section>" +,Div ("styling-xhtml-001.xhtml#epub-css",["section"],[]) + [Header 1 ("",[],[]) [Str "EPUB",Space,Str "Style",Space,Str "Sheets"] + ,Para [Str "This",Space,Str "section",Space,Str "contains",Space,Str "tests",Space,Str "for",Space,Str "styling",Space,Str "and",Space,Str "layout."]] ,Para [Span ("styling-xhtml-003.xhtml",[],[]) []] -,RawBlock (Format "html") "<section id=\"style-110\" class=\"ctest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-110"],Space,Str "Multi-Column",Space,Str "Layouts"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "CSS Multi-Column Layout",Space,Str "properties",Space,Str "are",Space,Str "supported."] -,Div ("",["multicol"],[]) [Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."],Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."],Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."],Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."],Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."],Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."],Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."],Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."],Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "text",Space,Str "is",Space,Str "rendered",Space,Str "in",Space,Str "three",Space,Str "columns,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" +,Div ("styling-xhtml-003.xhtml#style-110",["section","ctest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-110"],Space,Str "Multi-Column",Space,Str "Layouts"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "CSS Multi-Column Layout",Space,Str "properties",Space,Str "are",Space,Str "supported."] + ,Div ("",["multicol"],[]) + [Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] + ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] + ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] + ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] + ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] + ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] + ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] + ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] + ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "text",Space,Str "is",Space,Str "rendered",Space,Str "in",Space,Str "three",Space,Str "columns,",Space,Str "the",Space,Str "test",Space,Str "passes."]] ,Para [Span ("styling-xhtml-002.xhtml",[],[]) []] -,RawBlock (Format "html") "<section id=\"style-lists\">" -,Header 2 ("",[],[]) [Str "Lists"] -,RawBlock (Format "html") "<section id=\"style-list-style-type\">" -,Header 3 ("",[],[]) [Str "The",Space,Code ("",[],[]) "list-style-type",Space,Str "property"] -,RawBlock (Format "html") "<section id=\"style-009\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-009"],Space,Code ("",[],[]) "decimal"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "decimal",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "decimal",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-010\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-010"],Space,Code ("",[],[]) "circle"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "circle",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."] -,BulletList - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "circle",Space,Str "markers,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-011\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-011"],Space,Code ("",[],[]) "square"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "square",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."] -,BulletList - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "square",Space,Str "markers,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-012\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-012"],Space,Code ("",[],[]) "disc"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "disc",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."] -,BulletList - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "disc",Space,Str "markers,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-013\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-013"],Space,Code ("",[],[]) "lower-latin"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "lower-latin",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "lower-latin",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-014\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-014"],Space,Code ("",[],[]) "lower-roman"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "lower-roman",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "lower-roman",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-015\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-015"],Space,Code ("",[],[]) "upper-alpha"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "upper-alpha",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "upper-alpha",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-016\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-016"],Space,Code ("",[],[]) "hiragana"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "hiragana",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "hiragana",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-017\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-017"],Space,Code ("",[],[]) "hiragana-iroha"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "hiragana-iroha",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "hiragana-iroha",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-018\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-018"],Space,Code ("",[],[]) "katakana"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "katakana",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "katakana",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-019\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-019"],Space,Code ("",[],[]) "katakana-iroha"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "katakana-iroha",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "katakana-iroha",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-020\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-020"],Space,Code ("",[],[]) "upper-roman"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "upper-roman",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "upper-roman",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-021\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-021"],Space,Code ("",[],[]) "upper-latin"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "upper-latin",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "upper-latin",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-022\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-022"],Space,Code ("",[],[]) "lower-alpha"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "lower-alpha",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "lower-alpha",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-023\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-023"],Space,Code ("",[],[]) "lower-greek"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "lower-greek",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "lower-greek",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-024\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-024"],Space,Code ("",[],[]) "armenian"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "armenian",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "armenian",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-025\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-025"],Space,Code ("",[],[]) "cjk-ideographic"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "cjk-ideographic",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "cjk-ideographic",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-026\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-026"],Space,Code ("",[],[]) "decimal-leading-zero"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "decimal-leading-zero",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "decimal-leading-zero",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-027\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-027"],Space,Code ("",[],[]) "georgian"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "georgian",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "georgian",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-028\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-028"],Space,Code ("",[],[]) "hebrew"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "hebrew",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "hebrew",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-029\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-029"],Space,Code ("",[],[]) "none"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "none",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] -,OrderedList (1,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "no",Space,Str "markers,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-list-style\">" -,Header 3 ("",[],[]) [Str "The",Space,Code ("",[],[]) "list-style",Space,Str "property"] -,RawBlock (Format "html") "<section id=\"style-030\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-030"],Space,Str "images"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style",Space,Str "shorthand",Space,Str "property",Space,Str "is",Space,Str "supported",Space,Str "using",Space,Str "a",Space,Str "gif",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."] -,BulletList - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "the",Space,Str "purple",Space,Str "and",Space,Str "aqua",Space,Str "square",Space,Str "bullet",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-list-style-position\">" -,Header 3 ("",[],[]) [Str "The",Space,Code ("",[],[]) "list-style-position",Space,Str "property"] -,RawBlock (Format "html") "<section id=\"style-040\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-040"],Space,Str "The",Space,Code ("",[],[]) "list-style-position",Space,Str "property:",Space,Code ("",[],[]) "inside"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "inside",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."] -,BulletList - [[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]] - ,[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]] - ,[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "markers",Space,Str "inside",Space,Str "the",Space,Str "indentation,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-041\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-041"],Space,Str "The",Space,Code ("",[],[]) "list-style-position",Space,Str "property:",Space,Code ("",[],[]) "outside"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "outside",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."] -,BulletList - [[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]] - ,[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]] - ,[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "the",Space,Str "default",Space,Str "setting",Space,Str "(marker",Space,Str "outside",Space,Str "the",Space,Str "indentation),",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-list-start\">" -,Header 3 ("",[],[]) [Str "The",Space,Str "HTML",Space,Code ("",[],[]) "start",Space,Str "attribute"] -,RawBlock (Format "html") "<section id=\"style-050\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-050"],Space,Str "Without",Space,Code ("",[],[]) "list-style-type",Space,Str "set"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "start",Space,Str "attribute",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element",Space,Str "with",Space,Str "no",Space,Code ("",[],[]) "list-style-type",Space,Str "property."] -,OrderedList (25,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "starts",Space,Str "at",Space,Str "25,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-051\" class=\"ctest\">" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-051"],Space,Str "With",Space,Code ("",[],[]) "list-style-type",Space,Str "set"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "start",Space,Str "attribute",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element",Space,Str "with",Space,Str "a",Space,Code ("",[],[]) "list-style-type",Space,Str "property."] -,OrderedList (50,DefaultStyle,DefaultDelim) - [[Plain [Str "Lorem"]] - ,[Plain [Str "Ipsum"]] - ,[Plain [Str "Dolor"]] - ,[Plain [Str "Sit"]] - ,[Plain [Str "Amet"]]] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "starts",Space,Str "at",Space,Str "'L'",Space,Str "(50),",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "</section>" +,Div ("styling-xhtml-002.xhtml#style-lists",["section"],[]) + [Header 2 ("",[],[]) [Str "Lists"] + ,Div ("styling-xhtml-002.xhtml#style-list-style-type",["section"],[]) + [Header 3 ("",[],[]) [Str "The",Space,Code ("",[],[]) "list-style-type",Space,Str "property"] + ,Div ("styling-xhtml-002.xhtml#style-009",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-009"],Space,Code ("",[],[]) "decimal"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "decimal",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "decimal",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-010",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-010"],Space,Code ("",[],[]) "circle"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "circle",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."] + ,BulletList + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "circle",Space,Str "markers,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-011",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-011"],Space,Code ("",[],[]) "square"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "square",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."] + ,BulletList + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "square",Space,Str "markers,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-012",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-012"],Space,Code ("",[],[]) "disc"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "disc",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."] + ,BulletList + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "disc",Space,Str "markers,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-013",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-013"],Space,Code ("",[],[]) "lower-latin"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "lower-latin",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "lower-latin",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-014",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-014"],Space,Code ("",[],[]) "lower-roman"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "lower-roman",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "lower-roman",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-015",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-015"],Space,Code ("",[],[]) "upper-alpha"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "upper-alpha",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "upper-alpha",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-016",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-016"],Space,Code ("",[],[]) "hiragana"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "hiragana",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "hiragana",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-017",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-017"],Space,Code ("",[],[]) "hiragana-iroha"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "hiragana-iroha",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "hiragana-iroha",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-018",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-018"],Space,Code ("",[],[]) "katakana"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "katakana",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "katakana",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-019",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-019"],Space,Code ("",[],[]) "katakana-iroha"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "katakana-iroha",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "katakana-iroha",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-020",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-020"],Space,Code ("",[],[]) "upper-roman"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "upper-roman",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "upper-roman",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-021",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-021"],Space,Code ("",[],[]) "upper-latin"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "upper-latin",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "upper-latin",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-022",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-022"],Space,Code ("",[],[]) "lower-alpha"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "lower-alpha",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "lower-alpha",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-023",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-023"],Space,Code ("",[],[]) "lower-greek"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "lower-greek",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "lower-greek",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-024",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-024"],Space,Code ("",[],[]) "armenian"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "armenian",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "armenian",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-025",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-025"],Space,Code ("",[],[]) "cjk-ideographic"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "cjk-ideographic",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "cjk-ideographic",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-026",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-026"],Space,Code ("",[],[]) "decimal-leading-zero"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "decimal-leading-zero",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "decimal-leading-zero",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-027",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-027"],Space,Code ("",[],[]) "georgian"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "georgian",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "georgian",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-028",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-028"],Space,Code ("",[],[]) "hebrew"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "hebrew",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "hebrew",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-029",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-029"],Space,Code ("",[],[]) "none"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "none",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "no",Space,Str "markers,",Space,Str "the",Space,Str "test",Space,Str "passes."]]] + ,Div ("styling-xhtml-002.xhtml#style-list-style",["section"],[]) + [Header 3 ("",[],[]) [Str "The",Space,Code ("",[],[]) "list-style",Space,Str "property"] + ,Div ("styling-xhtml-002.xhtml#style-030",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-030"],Space,Str "images"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style",Space,Str "shorthand",Space,Str "property",Space,Str "is",Space,Str "supported",Space,Str "using",Space,Str "a",Space,Str "gif",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."] + ,BulletList + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "the",Space,Str "purple",Space,Str "and",Space,Str "aqua",Space,Str "square",Space,Str "bullet",Space,Str "the",Space,Str "test",Space,Str "passes."]]] + ,Div ("styling-xhtml-002.xhtml#style-list-style-position",["section"],[]) + [Header 3 ("",[],[]) [Str "The",Space,Code ("",[],[]) "list-style-position",Space,Str "property"] + ,Div ("styling-xhtml-002.xhtml#style-040",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-040"],Space,Str "The",Space,Code ("",[],[]) "list-style-position",Space,Str "property:",Space,Code ("",[],[]) "inside"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "inside",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."] + ,BulletList + [[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]] + ,[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]] + ,[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "markers",Space,Str "inside",Space,Str "the",Space,Str "indentation,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-041",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-041"],Space,Str "The",Space,Code ("",[],[]) "list-style-position",Space,Str "property:",Space,Code ("",[],[]) "outside"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "outside",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."] + ,BulletList + [[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]] + ,[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]] + ,[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "the",Space,Str "default",Space,Str "setting",Space,Str "(marker",Space,Str "outside",Space,Str "the",Space,Str "indentation),",Space,Str "the",Space,Str "test",Space,Str "passes."]]] + ,Div ("styling-xhtml-002.xhtml#style-list-start",["section"],[]) + [Header 3 ("",[],[]) [Str "The",Space,Str "HTML",Space,Code ("",[],[]) "start",Space,Str "attribute"] + ,Div ("styling-xhtml-002.xhtml#style-050",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-050"],Space,Str "Without",Space,Code ("",[],[]) "list-style-type",Space,Str "set"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "start",Space,Str "attribute",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element",Space,Str "with",Space,Str "no",Space,Code ("",[],[]) "list-style-type",Space,Str "property."] + ,OrderedList (25,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "starts",Space,Str "at",Space,Str "25,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-002.xhtml#style-051",["section","ctest"],[]) + [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-051"],Space,Str "With",Space,Code ("",[],[]) "list-style-type",Space,Str "set"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "start",Space,Str "attribute",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element",Space,Str "with",Space,Str "a",Space,Code ("",[],[]) "list-style-type",Space,Str "property."] + ,OrderedList (50,DefaultStyle,DefaultDelim) + [[Plain [Str "Lorem"]] + ,[Plain [Str "Ipsum"]] + ,[Plain [Str "Dolor"]] + ,[Plain [Str "Sit"]] + ,[Plain [Str "Amet"]]] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "starts",Space,Str "at",Space,Str "'L'",Space,Str "(50),",Space,Str "the",Space,Str "test",Space,Str "passes."]]]] ,Para [Span ("styling-xhtml-004.xhtml",[],[]) []] -,RawBlock (Format "html") "<section id=\"style-media-rules\">" -,Header 2 ("",[],[]) [Code ("",[],[]) "@media",Space,Str "Rules"] -,RawBlock (Format "html") "<section id=\"style-210\" class=\"ctest\">" -,Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-210"],Space,Code ("",[],[]) "all"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "all",Space,Str "is",Space,Str "supported."] -,Para [Str "FAIL"] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-211\" class=\"ctest\">" -,Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-211"],Space,Code ("",[],[]) "screen"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "screen",Space,Str "is",Space,Str "supported."] -,Para [Str "FAIL"] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-212\" class=\"ctest\">" -,Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-212"],Space,Code ("",[],[]) "handheld"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "handheld",Space,Str "is",Space,Str "supported."] -,Para [Str "FAIL"] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-213\" class=\"ctest\">" -,Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-213"],Space,Code ("",[],[]) "tv"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "tv",Space,Str "is",Space,Str "supported."] -,Para [Str "FAIL"] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-220\" class=\"ctest\">" -,Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-220"],Space,Code ("",[],[]) "orientation:landscape"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "orientation:landscape",Space,Str "is",Space,Str "supported."] -,Para [Str "FAIL"] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\"",Space,Str "when",Space,Str "the",Space,Str "device",Space,Str "is",Space,Str "held",Space,Str "in",Space,Str "landscape",Space,Str "mode,",Space,Str "and",Space,Str "the",Space,Str "device",Space,Str "supports",Space,Str "multiple",Space,Str "orientations,",Space,Str "the",Space,Str "test",Space,Str "fails."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-221\" class=\"ctest\">" -,Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-221"],Space,Code ("",[],[]) "orientation:portrait"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "orientation:portrait",Space,Str "is",Space,Str "supported."] -,Para [Str "FAIL"] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\"",Space,Str "when",Space,Str "the",Space,Str "device",Space,Str "is",Space,Str "held",Space,Str "in",Space,Str "portrait",Space,Str "mode,",Space,Str "and",Space,Str "the",Space,Str "device",Space,Str "supports",Space,Str "multiple",Space,Str "orientations,",Space,Str "the",Space,Str "test",Space,Str "fails."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-230\" class=\"ctest\">" -,Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-230"],Space,Code ("",[],[]) "min-width"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "min-width:200px",Space,Str "is",Space,Str "supported."] -,Para [Str "FAIL"] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-231\" class=\"ctest\">" -,Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-231"],Space,Code ("",[],[]) "max-width"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "max-width:2000px",Space,Str "is",Space,Str "supported."] -,Para [Str "FAIL"] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-240\" class=\"ctest\">" -,Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-240"],Space,Code ("",[],[]) "min-device-width"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "min-device-width:200px",Space,Str "is",Space,Str "supported."] -,Para [Str "FAIL"] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-241\" class=\"ctest\">" -,Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-241"],Space,Code ("",[],[]) "max-device-width"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "max-device-width:2000px",Space,Str "is",Space,Str "supported."] -,Para [Str "FAIL"] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "</section>" +,Div ("styling-xhtml-004.xhtml#style-media-rules",["section"],[]) + [Header 2 ("",[],[]) [Code ("",[],[]) "@media",Space,Str "Rules"] + ,Div ("styling-xhtml-004.xhtml#style-210",["section","ctest"],[]) + [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-210"],Space,Code ("",[],[]) "all"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "all",Space,Str "is",Space,Str "supported."] + ,Para [Str "FAIL"] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]] + ,Div ("styling-xhtml-004.xhtml#style-211",["section","ctest"],[]) + [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-211"],Space,Code ("",[],[]) "screen"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "screen",Space,Str "is",Space,Str "supported."] + ,Para [Str "FAIL"] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]] + ,Div ("styling-xhtml-004.xhtml#style-212",["section","ctest"],[]) + [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-212"],Space,Code ("",[],[]) "handheld"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "handheld",Space,Str "is",Space,Str "supported."] + ,Para [Str "FAIL"] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]] + ,Div ("styling-xhtml-004.xhtml#style-213",["section","ctest"],[]) + [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-213"],Space,Code ("",[],[]) "tv"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "tv",Space,Str "is",Space,Str "supported."] + ,Para [Str "FAIL"] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]] + ,Div ("styling-xhtml-004.xhtml#style-220",["section","ctest"],[]) + [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-220"],Space,Code ("",[],[]) "orientation:landscape"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "orientation:landscape",Space,Str "is",Space,Str "supported."] + ,Para [Str "FAIL"] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\"",Space,Str "when",Space,Str "the",Space,Str "device",Space,Str "is",Space,Str "held",Space,Str "in",Space,Str "landscape",Space,Str "mode,",Space,Str "and",Space,Str "the",Space,Str "device",Space,Str "supports",Space,Str "multiple",Space,Str "orientations,",Space,Str "the",Space,Str "test",Space,Str "fails."]] + ,Div ("styling-xhtml-004.xhtml#style-221",["section","ctest"],[]) + [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-221"],Space,Code ("",[],[]) "orientation:portrait"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "orientation:portrait",Space,Str "is",Space,Str "supported."] + ,Para [Str "FAIL"] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\"",Space,Str "when",Space,Str "the",Space,Str "device",Space,Str "is",Space,Str "held",Space,Str "in",Space,Str "portrait",Space,Str "mode,",Space,Str "and",Space,Str "the",Space,Str "device",Space,Str "supports",Space,Str "multiple",Space,Str "orientations,",Space,Str "the",Space,Str "test",Space,Str "fails."]] + ,Div ("styling-xhtml-004.xhtml#style-230",["section","ctest"],[]) + [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-230"],Space,Code ("",[],[]) "min-width"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "min-width:200px",Space,Str "is",Space,Str "supported."] + ,Para [Str "FAIL"] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]] + ,Div ("styling-xhtml-004.xhtml#style-231",["section","ctest"],[]) + [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-231"],Space,Code ("",[],[]) "max-width"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "max-width:2000px",Space,Str "is",Space,Str "supported."] + ,Para [Str "FAIL"] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]] + ,Div ("styling-xhtml-004.xhtml#style-240",["section","ctest"],[]) + [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-240"],Space,Code ("",[],[]) "min-device-width"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "min-device-width:200px",Space,Str "is",Space,Str "supported."] + ,Para [Str "FAIL"] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]] + ,Div ("styling-xhtml-004.xhtml#style-241",["section","ctest"],[]) + [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-241"],Space,Code ("",[],[]) "max-device-width"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "max-device-width:2000px",Space,Str "is",Space,Str "supported."] + ,Para [Str "FAIL"] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]]] ,Para [Span ("styling-xhtml-005.xhtml",[],[]) []] -,RawBlock (Format "html") "<section id=\"style-text-xform\">" -,Header 2 ("",[],[]) [Str "The",Space,Code ("",[],[]) "text-transform",Space,Str "property"] -,RawBlock (Format "html") "<section id=\"style-310\" class=\"ctest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-310"],Space,Code ("",[],[]) "uppercase"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "text-transform",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "uppercase",Space,Str "is",Space,Str "supported."] -,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "is",Space,Str "in",Space,Str "upper",Space,Str "case,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-311\" class=\"ctest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-311"],Space,Code ("",[],[]) "capitalize"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "text-transform",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "capitalize",Space,Str "is",Space,Str "supported."] -,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] -,Para [Str "If",Space,Str "each",Space,Str "first",Space,Str "letter",Space,Str "of",Space,Str "each",Space,Str "word",Space,Str "in",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "is",Space,Str "in",Space,Str "upper",Space,Str "case,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-312\" class=\"ctest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-312"],Space,Code ("",[],[]) "lowercase"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "text-transform",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "lowercase",Space,Str "is",Space,Str "supported."] -,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "is",Space,Str "in",Space,Str "lower",Space,Str "case,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "</section>" +,Div ("styling-xhtml-005.xhtml#style-text-xform",["section"],[]) + [Header 2 ("",[],[]) [Str "The",Space,Code ("",[],[]) "text-transform",Space,Str "property"] + ,Div ("styling-xhtml-005.xhtml#style-310",["section","ctest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-310"],Space,Code ("",[],[]) "uppercase"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "text-transform",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "uppercase",Space,Str "is",Space,Str "supported."] + ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "is",Space,Str "in",Space,Str "upper",Space,Str "case,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-005.xhtml#style-311",["section","ctest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-311"],Space,Code ("",[],[]) "capitalize"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "text-transform",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "capitalize",Space,Str "is",Space,Str "supported."] + ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] + ,Para [Str "If",Space,Str "each",Space,Str "first",Space,Str "letter",Space,Str "of",Space,Str "each",Space,Str "word",Space,Str "in",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "is",Space,Str "in",Space,Str "upper",Space,Str "case,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-005.xhtml#style-312",["section","ctest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-312"],Space,Code ("",[],[]) "lowercase"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "text-transform",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "lowercase",Space,Str "is",Space,Str "supported."] + ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."] + ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "is",Space,Str "in",Space,Str "lower",Space,Str "case,",Space,Str "the",Space,Str "test",Space,Str "passes."]]] ,Para [Span ("styling-xhtml-006.xhtml",[],[]) []] -,RawBlock (Format "html") "<section id=\"style-ruby\">" -,Header 2 ("",[],[]) [Str "The",Space,Code ("",[],[]) "epub-ruby-position",Space,Str "property"] -,RawBlock (Format "html") "<section id=\"style-410\" class=\"ctest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-410"],Space,Code ("",[],[]) "over"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "-epub-ruby-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "over",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "<ruby class=\"ruby-over\">",Strong [Str "Lorem",Space,Str "Ipsum"],Space,RawInline (Format "html") "<rp>",Str "(",RawInline (Format "html") "</rp>",RawInline (Format "html") "<rt>",Str "Lorem",Space,Str "Ipsum",RawInline (Format "html") "</rt>",RawInline (Format "html") "<rp>",Str ")",RawInline (Format "html") "</rp>",RawInline (Format "html") "</ruby>"] -,Para [Str "If",Space,Str "the",Space,Str "Ruby",Space,Str "text",Space,Str "is",Space,Str "positioned",Space,Str "on",Space,Str "the",Space,Link ("",[],[]) [Str "over"] ("#over",""),Space,Str "side",Space,Str "of",Space,Str "the",Space,Str "ruby",Space,Str "base,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-411\" class=\"ctest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-411"],Space,Code ("",[],[]) "under"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "-epub-ruby-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "under",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "<ruby class=\"ruby-under\">",Strong [Str "Lorem",Space,Str "Ipsum"],Space,RawInline (Format "html") "<rp>",Str "(",RawInline (Format "html") "</rp>",RawInline (Format "html") "<rt>",Str "Lorem",Space,Str "Ipsum",RawInline (Format "html") "</rt>",RawInline (Format "html") "<rp>",Str ")",RawInline (Format "html") "</rp>",RawInline (Format "html") "</ruby>"] -,Para [Str "If",Space,Str "the",Space,Str "Ruby",Space,Str "text",Space,Str "is",Space,Str "positioned",Space,Str "on",Space,Str "the",Space,Link ("",[],[]) [Str "under"] ("#under",""),Space,Str "side",Space,Str "of",Space,Str "the",Space,Str "ruby",Space,Str "base,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section id=\"style-412\" class=\"ctest\">" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-412"],Space,Code ("",[],[]) "inter-character"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "-epub-ruby-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "inter-caracter",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "<ruby class=\"ruby-inter-character\">",Strong [Str "Lorem",Space,Str "Ipsum"],Space,RawInline (Format "html") "<rp>",Str "(",RawInline (Format "html") "</rp>",RawInline (Format "html") "<rt>",Str "Lorem",Space,Str "Ipsum",RawInline (Format "html") "</rt>",RawInline (Format "html") "<rp>",Str ")",RawInline (Format "html") "</rp>",RawInline (Format "html") "</ruby>"] -,Para [Str "If",Space,Str "the",Space,Str "Ruby",Space,Str "text",Space,Str "is",Space,Str "positioned",Space,Str "on",Space,Str "the",Space,Str "right",Space,Str "side",Space,Str "of",Space,Str "the",Space,Str "base",Space,Str "text,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "</section>"] +,Div ("styling-xhtml-006.xhtml#style-ruby",["section"],[]) + [Header 2 ("",[],[]) [Str "The",Space,Code ("",[],[]) "epub-ruby-position",Space,Str "property"] + ,Div ("styling-xhtml-006.xhtml#style-410",["section","ctest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-410"],Space,Code ("",[],[]) "over"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "-epub-ruby-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "over",Space,Str "is",Space,Str "supported."] + ,Plain [RawInline (Format "html") "<ruby class=\"ruby-over\">",Strong [Str "Lorem",Space,Str "Ipsum"],Space,RawInline (Format "html") "<rp>",Str "(",RawInline (Format "html") "</rp>",RawInline (Format "html") "<rt>",Str "Lorem",Space,Str "Ipsum",RawInline (Format "html") "</rt>",RawInline (Format "html") "<rp>",Str ")",RawInline (Format "html") "</rp>",RawInline (Format "html") "</ruby>"] + ,Para [Str "If",Space,Str "the",Space,Str "Ruby",Space,Str "text",Space,Str "is",Space,Str "positioned",Space,Str "on",Space,Str "the",Space,Link ("",[],[]) [Str "over"] ("http://www.w3.org/TR/css3-writing-modes/#over",""),Space,Str "side",Space,Str "of",Space,Str "the",Space,Str "ruby",Space,Str "base,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-006.xhtml#style-411",["section","ctest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-411"],Space,Code ("",[],[]) "under"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "-epub-ruby-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "under",Space,Str "is",Space,Str "supported."] + ,Plain [RawInline (Format "html") "<ruby class=\"ruby-under\">",Strong [Str "Lorem",Space,Str "Ipsum"],Space,RawInline (Format "html") "<rp>",Str "(",RawInline (Format "html") "</rp>",RawInline (Format "html") "<rt>",Str "Lorem",Space,Str "Ipsum",RawInline (Format "html") "</rt>",RawInline (Format "html") "<rp>",Str ")",RawInline (Format "html") "</rp>",RawInline (Format "html") "</ruby>"] + ,Para [Str "If",Space,Str "the",Space,Str "Ruby",Space,Str "text",Space,Str "is",Space,Str "positioned",Space,Str "on",Space,Str "the",Space,Link ("",[],[]) [Str "under"] ("http://www.w3.org/TR/css3-writing-modes/#under",""),Space,Str "side",Space,Str "of",Space,Str "the",Space,Str "ruby",Space,Str "base,",Space,Str "the",Space,Str "test",Space,Str "passes."]] + ,Div ("styling-xhtml-006.xhtml#style-412",["section","ctest"],[]) + [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-412"],Space,Code ("",[],[]) "inter-character"] + ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "-epub-ruby-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "inter-caracter",Space,Str "is",Space,Str "supported."] + ,Plain [RawInline (Format "html") "<ruby class=\"ruby-inter-character\">",Strong [Str "Lorem",Space,Str "Ipsum"],Space,RawInline (Format "html") "<rp>",Str "(",RawInline (Format "html") "</rp>",RawInline (Format "html") "<rt>",Str "Lorem",Space,Str "Ipsum",RawInline (Format "html") "</rt>",RawInline (Format "html") "<rp>",Str ")",RawInline (Format "html") "</rp>",RawInline (Format "html") "</ruby>"] + ,Para [Str "If",Space,Str "the",Space,Str "Ruby",Space,Str "text",Space,Str "is",Space,Str "positioned",Space,Str "on",Space,Str "the",Space,Str "right",Space,Str "side",Space,Str "of",Space,Str "the",Space,Str "base",Space,Str "text,",Space,Str "the",Space,Str "test",Space,Str "passes."]]]] diff --git a/tests/epub/wasteland.native b/tests/epub/wasteland.native index c2e18e082..820b6ebe2 100644 --- a/tests/epub/wasteland.native +++ b/tests/epub/wasteland.native @@ -1,9 +1,941 @@ [Para [Image ("",[],[]) [] ("wasteland-cover.jpg","")] ,Para [Span ("wasteland-content.xhtml",[],[]) []] -,RawBlock (Format "html") "<section type=\"frontmatter\" id=\"frontmatter\">" -,RawBlock (Format "html") "</section>" -,RawBlock (Format "html") "<section type=\"bodymatter\" id=\"bodymatter\">" -,RawBlock (Format "html") "<section id=\"ch1\">" -,Header 2 ("",[],[]) [Str "I.",Space,Str "THE",Space,Str "BURIAL",Space,Str "OF",Space,Str "THE",Space,Str "DEAD"] -,Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "April",Space,Str "is",Space,Str "the",Space,Str "cruellest",Space,Str "month,",Space,Str "breeding"]],Div ("",[],[]) [Plain [Str "Lilacs",Space,Str "out",Space,Str "of",Space,Str "the",Space,Str "dead",Space,Str "land,",Space,Str "mixing"]],Div ("",[],[]) [Plain [Str "Memory",Space,Str "and",Space,Str "desire,",Space,Str "stirring"]],Div ("",[],[]) [Plain [Str "Dull",Space,Str "roots",Space,Str "with",Space,Str "spring",Space,Str "rain."]],Div ("",[],[]) [Plain [Str "Winter",Space,Str "kept",Space,Str "us",Space,Str "warm,",Space,Str "covering"]],Div ("",[],[]) [Plain [Str "Earth",Space,Str "in",Space,Str "forgetful",Space,Str "snow,",Space,Str "feeding"]],Div ("",[],[]) [Plain [Str "A",Space,Str "little",Space,Str "life",Space,Str "with",Space,Str "dried",Space,Str "tubers."]],Div ("",[],[]) [Plain [Str "Summer",Space,Str "surprised",Space,Str "us,",Space,Str "coming",Space,Str "over",Space,Str "the",Space,Str "Starnbergersee"]],Div ("",[],[]) [Plain [Str "With",Space,Str "a",Space,Str "shower",Space,Str "of",Space,Str "rain;",Space,Str "we",Space,Str "stopped",Space,Str "in",Space,Str "the",Space,Str "colonnade,"]],Div ("",[],[]) [Plain [Str "And",Space,Str "went",Space,Str "on",Space,Str "in",Space,Str "sunlight,",Space,Str "into",Space,Str "the",Space,Str "Hofgarten,",Span ("",["lnum"],[]) [Str "10"]]],Div ("",[],[]) [Plain [Str "And",Space,Str "drank",Space,Str "coffee,",Space,Str "and",Space,Str "talked",Space,Str "for",Space,Str "an",Space,Str "hour."]],Div ("",[],[("lang","de")]) [Plain [Str "Bin",Space,Str "gar",Space,Str "keine",Space,Str "Russin,",Space,Str "stamm'",Space,Str "aus",Space,Str "Litauen,",Space,Str "echt",Space,Str "deutsch."]],Div ("",[],[]) [Plain [Str "And",Space,Str "when",Space,Str "we",Space,Str "were",Space,Str "children,",Space,Str "staying",Space,Str "at",Space,Str "the",Space,Str "archduke's,"]],Div ("",[],[]) [Plain [Str "My",Space,Str "cousin's,",Space,Str "he",Space,Str "took",Space,Str "me",Space,Str "out",Space,Str "on",Space,Str "a",Space,Str "sled,"]],Div ("",[],[]) [Plain [Str "And",Space,Str "I",Space,Str "was",Space,Str "frightened.",Space,Str "He",Space,Str "said,",Space,Str "Marie,"]],Div ("",[],[]) [Plain [Str "Marie,",Space,Str "hold",Space,Str "on",Space,Str "tight.",Space,Str "And",Space,Str "down",Space,Str "we",Space,Str "went."]],Div ("",[],[]) [Plain [Str "In",Space,Str "the",Space,Str "mountains,",Space,Str "there",Space,Str "you",Space,Str "feel",Space,Str "free."]],Div ("",[],[]) [Plain [Str "I",Space,Str "read,",Space,Str "much",Space,Str "of",Space,Str "the",Space,Str "night,",Space,Str "and",Space,Str "go",Space,Str "south",Space,Str "in",Space,Str "the",Space,Str "winter."]]] -,Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "What",Space,Str "are",Space,Str "the",Space,Str "roots",Space,Str "that",Space,Str "clutch,",Space,Str "what",Space,Str "branches",Space,Str "grow"]],Div ("wasteland-content.xhtml#ln20",[],[]) [Plain [Str "Out",Space,Str "of",Space,Str "this",Space,Str "stony",Space,Str "rubbish?",Space,Str "Son",Space,Str "of",Space,Str "man,",Note [Para [Link ("",[],[]) [Str "Line",Space,Str "20."] ("#wasteland-content.xhtml#ln20",""),Space,Str "Cf.",Space,Str "Ezekiel",Space,Str "2:1."]]],Div ("",[],[]) [Plain [Str "You",Space,Str "cannot",Space,Str "say,",Space,Str "or",Space,Str "guess,",Space,Str "for",Space,Str "you",Space,Str "know",Space,Str "only"]],Div ("",[],[]) [Plain [Str "A",Space,Str "heap",Space,Str "of",Space,Str "broken",Space,Str "images,",Space,Str "where",Space,Str "the",Space,Str "sun",Space,Str "beats,"]],Div ("wasteland-content.xhtml#ln23",[],[]) [Plain [Str "And",Space,Str "the",Space,Str "dead",Space,Str "tree",Space,Str "gives",Space,Str "no",Space,Str "shelter,",Space,Str "the",Space,Str "cricket",Space,Str "no",Space,Str "relief,",Note [Para [Link ("",[],[]) [Str "23."] ("#wasteland-content.xhtml#ln23",""),Space,Str "Cf.",Space,Str "Ecclesiastes",Space,Str "12:5."]]],Div ("",[],[]) [Plain [Str "And",Space,Str "the",Space,Str "dry",Space,Str "stone",Space,Str "no",Space,Str "sound",Space,Str "of",Space,Str "water.",Space,Str "Only"]],Div ("",[],[]) [Plain [Str "There",Space,Str "is",Space,Str "shadow",Space,Str "under",Space,Str "this",Space,Str "red",Space,Str "rock,"]],Div ("",[],[]) [Plain [Str "(Come",Space,Str "in",Space,Str "under",Space,Str "the",Space,Str "shadow",Space,Str "of",Space,Str "this",Space,Str "red",Space,Str "rock),"]],Div ("",[],[]) [Plain [Str "And",Space,Str "I",Space,Str "will",Space,Str "show",Space,Str "you",Space,Str "something",Space,Str "different",Space,Str "from",Space,Str "either"]],Div ("",[],[]) [Plain [Str "Your",Space,Str "shadow",Space,Str "at",Space,Str "morning",Space,Str "striding",Space,Str "behind",Space,Str "you"]],Div ("",[],[]) [Plain [Str "Or",Space,Str "your",Space,Str "shadow",Space,Str "at",Space,Str "evening",Space,Str "rising",Space,Str "to",Space,Str "meet",Space,Str "you;"]],Div ("",[],[]) [Plain [Str "I",Space,Str "will",Space,Str "show",Space,Str "you",Space,Str "fear",Space,Str "in",Space,Str "a",Space,Str "handful",Space,Str "of",Space,Str "dust.",Span ("",["lnum"],[]) [Str "30"]]],BlockQuote [Div ("",[],[]) [Div ("wasteland-content.xhtml#ln31",[],[]) [Plain [Str "Frisch",Space,Str "weht",Space,Str "der",Space,Str "Wind",Note [Para [Link ("",[],[]) [Str "31."] ("#wasteland-content.xhtml#ln31",""),Space,Str "V.",Space,Str "Tristan",Space,Str "und",Space,Str "Isolde,",Space,Str "i,",Space,Str "verses",Space,Str "5-8."]]],Div ("",[],[]) [Plain [Str "Der",Space,Str "Heimat",Space,Str "zu"]],Div ("",[],[]) [Plain [Str "Mein",Space,Str "Irisch",Space,Str "Kind,"]],Div ("",[],[]) [Plain [Str "Wo",Space,Str "weilest",Space,Str "du?"]]],RawBlock (Format "html") "</blockquote>",Div ("",[],[]) [Plain [Str "\"You",Space,Str "gave",Space,Str "me",Space,Str "hyacinths",Space,Str "first",Space,Str "a",Space,Str "year",Space,Str "ago;"]],Div ("",[],[]) [Plain [Str "\"They",Space,Str "called",Space,Str "me",Space,Str "the",Space,Str "hyacinth",Space,Str "girl.\""]],Div ("",[],[]) [Plain [Str "\8213Yet",Space,Str "when",Space,Str "we",Space,Str "came",Space,Str "back,",Space,Str "late,",Space,Str "from",Space,Str "the",Space,Str "Hyacinth",Space,Str "garden,"]],Div ("",[],[]) [Plain [Str "Your",Space,Str "arms",Space,Str "full,",Space,Str "and",Space,Str "your",Space,Str "hair",Space,Str "wet,",Space,Str "I",Space,Str "could",Space,Str "not"]],Div ("",[],[]) [Plain [Str "Speak,",Space,Str "and",Space,Str "my",Space,Str "eyes",Space,Str "failed,",Space,Str "I",Space,Str "was",Space,Str "neither"]],Div ("",[],[]) [Plain [Str "Living",Space,Str "nor",Space,Str "dead,",Space,Str "and",Space,Str "I",Space,Str "knew",Space,Str "nothing,",Span ("",["lnum"],[]) [Str "40"]]],Div ("",[],[]) [Plain [Str "Looking",Space,Str "into",Space,Str "the",Space,Str "heart",Space,Str "of",Space,Str "light,",Space,Str "the",Space,Str "silence."]],Div ("wasteland-content.xhtml#ln42",[],[("lang","de")]) [Plain [Emph [Str "Od'",Space,Str "und",Space,Str "leer",Space,Str "das",Space,Str "Meer"],Str ".",Note [Para [Link ("",[],[]) [Str "42."] ("#wasteland-content.xhtml#ln42",""),Space,Str "Id.",Space,Str "iii,",Space,Str "verse",Space,Str "24."]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "Madame",Space,Str "Sosostris,",Space,Str "famous",Space,Str "clairvoyante,"]],Div ("",[],[]) [Plain [Str "Had",Space,Str "a",Space,Str "bad",Space,Str "cold,",Space,Str "nevertheless"]],Div ("",[],[]) [Plain [Str "Is",Space,Str "known",Space,Str "to",Space,Str "be",Space,Str "the",Space,Str "wisest",Space,Str "woman",Space,Str "in",Space,Str "Europe,"]],Div ("wasteland-content.xhtml#ln46",[],[]) [Plain [Str "With",Space,Str "a",Space,Str "wicked",Space,Str "pack",Space,Str "of",Space,Str "cards.",Space,Str "Here,",Space,Str "said",Space,Str "she,",Note [Para [Link ("",[],[]) [Str "46."] ("#wasteland-content.xhtml#ln46",""),Space,Str "I",Space,Str "am",Space,Str "not",Space,Str "familiar",Space,Str "with",Space,Str "the",Space,Str "exact",Space,Str "constitution",Space,Str "of",Space,Str "the",Space,Str "Tarot",Space,Str "pack",Space,Str "of",Space,Str "cards,",Space,Str "from",Space,Str "which",Space,Str "I",Space,Str "have",Space,Str "obviously",Space,Str "departed",Space,Str "to",Space,Str "suit",Space,Str "my",Space,Str "own",Space,Str "convenience.",Space,Str "The",Space,Str "Hanged",Space,Str "Man,",Space,Str "a",Space,Str "member",Space,Str "of",Space,Str "the",Space,Str "traditional",Space,Str "pack,",Space,Str "fits",Space,Str "my",Space,Str "purpose",Space,Str "in",Space,Str "two",Space,Str "ways:",Space,Str "because",Space,Str "he",Space,Str "is",Space,Str "associated",Space,Str "in",Space,Str "my",Space,Str "mind",Space,Str "with",Space,Str "the",Space,Str "Hanged",Space,Str "God",Space,Str "of",Space,Str "Frazer,",Space,Str "and",Space,Str "because",Space,Str "I",Space,Str "associate",Space,Str "him",Space,Str "with",Space,Str "the",Space,Str "hooded",Space,Str "figure",Space,Str "in",Space,Str "the",Space,Str "passage",Space,Str "of",Space,Str "the",Space,Str "disciples",Space,Str "to",Space,Str "Emmaus",Space,Str "in",Space,Str "Part",Space,Str "V.",Space,Str "The",Space,Str "Phoenician",Space,Str "Sailor",Space,Str "and",Space,Str "the",Space,Str "Merchant",Space,Str "appear",Space,Str "later;",Space,Str "also",Space,Str "the",Space,Str "\"crowds",Space,Str "of",Space,Str "people,\"",Space,Str "and",Space,Str "Death",Space,Str "by",Space,Str "Water",Space,Str "is",Space,Str "executed",Space,Str "in",Space,Str "Part",Space,Str "IV.",Space,Str "The",Space,Str "Man",Space,Str "with",Space,Str "Three",Space,Str "Staves",Space,Str "(an",Space,Str "authentic",Space,Str "member",Space,Str "of",Space,Str "the",Space,Str "Tarot",Space,Str "pack)",Space,Str "I",Space,Str "associate,",Space,Str "quite",Space,Str "arbitrarily,",Space,Str "with",Space,Str "the",Space,Str "Fisher",Space,Str "King",Space,Str "himself."]]],Div ("",[],[]) [Plain [Str "Is",Space,Str "your",Space,Str "card,",Space,Str "the",Space,Str "drowned",Space,Str "Phoenician",Space,Str "Sailor,"]],Div ("",[],[]) [Plain [Str "(Those",Space,Str "are",Space,Str "pearls",Space,Str "that",Space,Str "were",Space,Str "his",Space,Str "eyes.",Space,Str "Look!)"]],Div ("",[],[]) [Plain [Str "Here",Space,Str "is",Space,Str "Belladonna,",Space,Str "the",Space,Str "Lady",Space,Str "of",Space,Str "the",Space,Str "Rocks,"]],Div ("",[],[]) [Plain [Str "The",Space,Str "lady",Space,Str "of",Space,Str "situations.",Span ("",["lnum"],[]) [Str "50"]]],Div ("",[],[]) [Plain [Str "Here",Space,Str "is",Space,Str "the",Space,Str "man",Space,Str "with",Space,Str "three",Space,Str "staves,",Space,Str "and",Space,Str "here",Space,Str "the",Space,Str "Wheel,"]],Div ("",[],[]) [Plain [Str "And",Space,Str "here",Space,Str "is",Space,Str "the",Space,Str "one-eyed",Space,Str "merchant,",Space,Str "and",Space,Str "this",Space,Str "card,"]],Div ("",[],[]) [Plain [Str "Which",Space,Str "is",Space,Str "blank,",Space,Str "is",Space,Str "something",Space,Str "he",Space,Str "carries",Space,Str "on",Space,Str "his",Space,Str "back,"]],Div ("",[],[]) [Plain [Str "Which",Space,Str "I",Space,Str "am",Space,Str "forbidden",Space,Str "to",Space,Str "see.",Space,Str "I",Space,Str "do",Space,Str "not",Space,Str "find"]],Div ("",[],[]) [Plain [Str "The",Space,Str "Hanged",Space,Str "Man.",Space,Str "Fear",Space,Str "death",Space,Str "by",Space,Str "water."]],Div ("",[],[]) [Plain [Str "I",Space,Str "see",Space,Str "crowds",Space,Str "of",Space,Str "people,",Space,Str "walking",Space,Str "round",Space,Str "in",Space,Str "a",Space,Str "ring."]],Div ("",[],[]) [Plain [Str "Thank",Space,Str "you.",Space,Str "If",Space,Str "you",Space,Str "see",Space,Str "dear",Space,Str "Mrs.",Space,Str "Equitone,"]],Div ("",[],[]) [Plain [Str "Tell",Space,Str "her",Space,Str "I",Space,Str "bring",Space,Str "the",Space,Str "horoscope",Space,Str "myself:"]],Div ("",[],[]) [Plain [Str "One",Space,Str "must",Space,Str "be",Space,Str "so",Space,Str "careful",Space,Str "these",Space,Str "days."]]],Div ("",["linegroup"],[]) [Div ("wasteland-content.xhtml#ln60",[],[]) [Plain [Str "Unreal",Space,Str "City,",Note [Para [Link ("",[],[]) [Str "60."] ("#wasteland-content.xhtml#ln60",""),Space,Str "Cf.",Space,Str "Baudelaire:"],BlockQuote [Para [Str "\"Fourmillante",Space,Str "cite;,",Space,Str "cite;",Space,Str "pleine",Space,Str "de",Space,Str "reves,",LineBreak,Str "Ou",Space,Str "le",Space,Str "spectre",Space,Str "en",Space,Str "plein",Space,Str "jour",Space,Str "raccroche",Space,Str "le",Space,Str "passant.\""]]]],Div ("",[],[]) [Plain [Str "Under",Space,Str "the",Space,Str "brown",Space,Str "fog",Space,Str "of",Space,Str "a",Space,Str "winter",Space,Str "dawn,"]],Div ("",[],[]) [Plain [Str "A",Space,Str "crowd",Space,Str "flowed",Space,Str "over",Space,Str "London",Space,Str "Bridge,",Space,Str "so",Space,Str "many,"]],Div ("wasteland-content.xhtml#ln63",[],[]) [Plain [Str "I",Space,Str "had",Space,Str "not",Space,Str "thought",Space,Str "death",Space,Str "had",Space,Str "undone",Space,Str "so",Space,Str "many.",Note [Para [Link ("",[],[]) [Str "63."] ("#wasteland-content.xhtml#ln63",""),Space,Str "Cf.",Space,Str "Inferno,",Space,Str "iii.",Space,Str "55-7."],BlockQuote [Para [Str "\"si",Space,Str "lunga",Space,Str "tratta",LineBreak,Str "di",Space,Str "gente,",Space,Str "ch'io",Space,Str "non",Space,Str "avrei",Space,Str "mai",Space,Str "creduto",LineBreak,Str "che",Space,Str "morte",Space,Str "tanta",Space,Str "n'avesse",Space,Str "disfatta.\""]]]],Div ("wasteland-content.xhtml#ln64",[],[]) [Plain [Str "Sighs,",Space,Str "short",Space,Str "and",Space,Str "infrequent,",Space,Str "were",Space,Str "exhaled,",Note [Para [Link ("",[],[]) [Str "64."] ("#wasteland-content.xhtml#ln64",""),Space,Str "Cf.",Space,Str "Inferno,",Space,Str "iv.",Space,Str "25-7:"],BlockQuote [Para [Str "\"Quivi,",Space,Str "secondo",Space,Str "che",Space,Str "per",Space,Str "ascoltahre,",LineBreak,Str "\"non",Space,Str "avea",Space,Str "pianto,",Space,Str "ma'",Space,Str "che",Space,Str "di",Space,Str "sospiri,",LineBreak,Str "\"che",Space,Str "l'aura",Space,Str "eterna",Space,Str "facevan",Space,Str "tremare.\""]]]],Div ("",[],[]) [Plain [Str "And",Space,Str "each",Space,Str "man",Space,Str "fixed",Space,Str "his",Space,Str "eyes",Space,Str "before",Space,Str "his",Space,Str "feet."]],Div ("",[],[]) [Plain [Str "Flowed",Space,Str "up",Space,Str "the",Space,Str "hill",Space,Str "and",Space,Str "down",Space,Str "King",Space,Str "William",Space,Str "Street,"]],Div ("",[],[]) [Plain [Str "To",Space,Str "where",Space,Str "Saint",Space,Str "Mary",Space,Str "Woolnoth",Space,Str "kept",Space,Str "the",Space,Str "hours"]],Div ("wasteland-content.xhtml#ln68",[],[]) [Plain [Str "With",Space,Str "a",Space,Str "dead",Space,Str "sound",Space,Str "on",Space,Str "the",Space,Str "final",Space,Str "stroke",Space,Str "of",Space,Str "nine.",Note [Para [Link ("",[],[]) [Str "68."] ("#wasteland-content.xhtml#ln68",""),Space,Str "A",Space,Str "phenomenon",Space,Str "which",Space,Str "I",Space,Str "have",Space,Str "often",Space,Str "noticed."]]],Div ("",[],[]) [Plain [Str "There",Space,Str "I",Space,Str "saw",Space,Str "one",Space,Str "I",Space,Str "knew,",Space,Str "and",Space,Str "stopped",Space,Str "him,",Space,Str "crying",Space,Str "\"Stetson!"]],Div ("",[],[]) [Plain [Str "\"You",Space,Str "who",Space,Str "were",Space,Str "with",Space,Str "me",Space,Str "in",Space,Str "the",Space,Str "ships",Space,Str "at",Space,Str "Mylae!",Span ("",["lnum"],[]) [Str "70"]]],Div ("",[],[]) [Plain [Str "\"That",Space,Str "corpse",Space,Str "you",Space,Str "planted",Space,Str "last",Space,Str "year",Space,Str "in",Space,Str "your",Space,Str "garden,"]],Div ("",[],[]) [Plain [Str "\"Has",Space,Str "it",Space,Str "begun",Space,Str "to",Space,Str "sprout?",Space,Str "Will",Space,Str "it",Space,Str "bloom",Space,Str "this",Space,Str "year?"]],Div ("",[],[]) [Plain [Str "\"Or",Space,Str "has",Space,Str "the",Space,Str "sudden",Space,Str "frost",Space,Str "disturbed",Space,Str "its",Space,Str "bed?"]]],Div ("",["linegroup"],[]) [Div ("wasteland-content.xhtml#ln74",[],[]) [Plain [Str "\"Oh",Space,Str "keep",Space,Str "the",Space,Str "Dog",Space,Str "far",Space,Str "hence,",Space,Str "that's",Space,Str "friend",Space,Str "to",Space,Str "men,",Note [Para [Link ("",[],[]) [Str "74."] ("#wasteland-content.xhtml#ln74",""),Space,Str "Cf.",Space,Str "the",Space,Str "Dirge",Space,Str "in",Space,Str "Webster's",Space,Str "White",Space,Str "Devil",Space,Str "."]]],Div ("",[],[]) [Plain [Str "\"Or",Space,Str "with",Space,Str "his",Space,Str "nails",Space,Str "he'll",Space,Str "dig",Space,Str "it",Space,Str "up",Space,Str "again!"]],Div ("wasteland-content.xhtml#ln76",[],[]) [Plain [Str "\"You!",Space,Span ("",[],[("lang","fr")]) [Str "hypocrite",Space,Str "lecteur!",Space,Str "-",Space,Str "mon",Space,Str "semblable,",Space,Str "-",Space,Str "mon",Space,Str "frere"],Space,Str "!\"",Note [Para [Link ("",[],[]) [Str "76."] ("#wasteland-content.xhtml#ln76",""),Space,Str "V.",Space,Str "Baudelaire,",Space,Str "Preface",Space,Str "to",Space,Str "Fleurs",Space,Str "du",Space,Str "Mal."]]],RawBlock (Format "html") "<section id=\"ch2\">",Header 2 ("",[],[]) [Str "II.",Space,Str "A",Space,Str "GAME",Space,Str "OF",Space,Str "CHESS"],Div ("",["linegroup"],[]) [Div ("wasteland-content.xhtml#ln77",[],[]) [Plain [Str "The",Space,Str "Chair",Space,Str "she",Space,Str "sat",Space,Str "in,",Space,Str "like",Space,Str "a",Space,Str "burnished",Space,Str "throne,",Note [Para [Link ("",[],[]) [Str "77."] ("#wasteland-content.xhtml#ln77",""),Space,Str "Cf.",Space,Str "Antony",Space,Str "and",Space,Str "Cleopatra,",Space,Str "II.",Space,Str "ii.,",Space,Str "l.",Space,Str "190."]]],Div ("",[],[]) [Plain [Str "Glowed",Space,Str "on",Space,Str "the",Space,Str "marble,",Space,Str "where",Space,Str "the",Space,Str "glass"]],Div ("",[],[]) [Plain [Str "Held",Space,Str "up",Space,Str "by",Space,Str "standards",Space,Str "wrought",Space,Str "with",Space,Str "fruited",Space,Str "vines"]],Div ("",[],[]) [Plain [Str "From",Space,Str "which",Space,Str "a",Space,Str "golden",Space,Str "Cupidon",Space,Str "peeped",Space,Str "out",Span ("",["lnum"],[]) [Str "80"]]],Div ("",[],[]) [Plain [Str "(Another",Space,Str "hid",Space,Str "his",Space,Str "eyes",Space,Str "behind",Space,Str "his",Space,Str "wing)"]],Div ("",[],[]) [Plain [Str "Doubled",Space,Str "the",Space,Str "flames",Space,Str "of",Space,Str "sevenbranched",Space,Str "candelabra"]],Div ("",[],[]) [Plain [Str "Reflecting",Space,Str "light",Space,Str "upon",Space,Str "the",Space,Str "table",Space,Str "as"]],Div ("",[],[]) [Plain [Str "The",Space,Str "glitter",Space,Str "of",Space,Str "her",Space,Str "jewels",Space,Str "rose",Space,Str "to",Space,Str "meet",Space,Str "it,"]],Div ("",[],[]) [Plain [Str "From",Space,Str "satin",Space,Str "cases",Space,Str "poured",Space,Str "in",Space,Str "rich",Space,Str "profusion;"]],Div ("",[],[]) [Plain [Str "In",Space,Str "vials",Space,Str "of",Space,Str "ivory",Space,Str "and",Space,Str "coloured",Space,Str "glass"]],Div ("",[],[]) [Plain [Str "Unstoppered,",Space,Str "lurked",Space,Str "her",Space,Str "strange",Space,Str "synthetic",Space,Str "perfumes,"]],Div ("",[],[]) [Plain [Str "Unguent,",Space,Str "powdered,",Space,Str "or",Space,Str "liquid",Space,Str "-",Space,Str "troubled,",Space,Str "confused"]],Div ("",[],[]) [Plain [Str "And",Space,Str "drowned",Space,Str "the",Space,Str "sense",Space,Str "in",Space,Str "odours;",Space,Str "stirred",Space,Str "by",Space,Str "the",Space,Str "air"]],Div ("",[],[]) [Plain [Str "That",Space,Str "freshened",Space,Str "from",Space,Str "the",Space,Str "window,",Space,Str "these",Space,Str "ascended",Span ("",["lnum"],[]) [Str "90"]]],Div ("",[],[]) [Plain [Str "In",Space,Str "fattening",Space,Str "the",Space,Str "prolonged",Space,Str "candle-flames,"]],Div ("wasteland-content.xhtml#ln92",[],[]) [Plain [Str "Flung",Space,Str "their",Space,Str "smoke",Space,Str "into",Space,Str "the",Space,Str "laquearia,",Note [Para [Link ("",[],[]) [Str "92."] ("#wasteland-content.xhtml#ln92",""),Space,Str "Laquearia.",Space,Str "V.",Space,Str "Aeneid,",Space,Str "I.",Space,Str "726:"],BlockQuote [Para [Str "dependent",Space,Str "lychni",Space,Str "laquearibus",Space,Str "aureis",Space,Str "incensi,",Space,Str "et",Space,Str "noctem",Space,Str "flammis",LineBreak,Str "funalia",Space,Str "vincunt."]]]],Div ("",[],[]) [Plain [Str "Stirring",Space,Str "the",Space,Str "pattern",Space,Str "on",Space,Str "the",Space,Str "coffered",Space,Str "ceiling."]],Div ("",[],[]) [Plain [Str "Huge",Space,Str "sea-wood",Space,Str "fed",Space,Str "with",Space,Str "copper"]],Div ("",[],[]) [Plain [Str "Burned",Space,Str "green",Space,Str "and",Space,Str "orange,",Space,Str "framed",Space,Str "by",Space,Str "the",Space,Str "coloured",Space,Str "stone,"]],Div ("",[],[]) [Plain [Str "In",Space,Str "which",Space,Str "sad",Space,Str "light",Space,Str "a",Space,Str "carved",Space,Str "dolphin",Space,Str "swam."]],Div ("",[],[]) [Plain [Str "Above",Space,Str "the",Space,Str "antique",Space,Str "mantel",Space,Str "was",Space,Str "displayed"]],Div ("wasteland-content.xhtml#ln98",[],[]) [Plain [Str "As",Space,Str "though",Space,Str "a",Space,Str "window",Space,Str "gave",Space,Str "upon",Space,Str "the",Space,Str "sylvan",Space,Str "scene",Note [Para [Link ("",[],[]) [Str "98."] ("#wasteland-content.xhtml#ln98",""),Space,Str "Sylvan",Space,Str "scene.",Space,Str "V.",Space,Str "Milton,",Space,Str "Paradise",Space,Str "Lost,",Space,Str "iv.",Space,Str "140."]]],Div ("wasteland-content.xhtml#ln99",[],[]) [Plain [Str "The",Space,Str "change",Space,Str "of",Space,Str "Philomel,",Space,Str "by",Space,Str "the",Space,Str "barbarous",Space,Str "king",Note [Para [Link ("",[],[]) [Str "99."] ("#wasteland-content.xhtml#ln99",""),Space,Str "V.",Space,Str "Ovid,",Space,Str "Metamorphoses,",Space,Str "vi,",Space,Str "Philomela."]]],Div ("wasteland-content.xhtml#ln100",[],[]) [Plain [Str "So",Space,Str "rudely",Space,Str "forced;",Space,Str "yet",Space,Str "there",Space,Str "the",Space,Str "nightingale",Note [Para [Link ("",[],[]) [Str "100."] ("#wasteland-content.xhtml#ln100",""),Space,Str "Cf.",Space,Str "Part",Space,Str "III,",Space,Str "l.",Space,Str "204."]]],Div ("",[],[]) [Plain [Str "Filled",Space,Str "all",Space,Str "the",Space,Str "desert",Space,Str "with",Space,Str "inviolable",Space,Str "voice"]],Div ("",[],[]) [Plain [Str "And",Space,Str "still",Space,Str "she",Space,Str "cried,",Space,Str "and",Space,Str "still",Space,Str "the",Space,Str "world",Space,Str "pursues,"]],Div ("",[],[]) [Plain [Str "\"Jug",Space,Str "Jug\"",Space,Str "to",Space,Str "dirty",Space,Str "ears."]],Div ("",[],[]) [Plain [Str "And",Space,Str "other",Space,Str "withered",Space,Str "stumps",Space,Str "of",Space,Str "time"]],Div ("",[],[]) [Plain [Str "Were",Space,Str "told",Space,Str "upon",Space,Str "the",Space,Str "walls;",Space,Str "staring",Space,Str "forms"]],Div ("",[],[]) [Plain [Str "Leaned",Space,Str "out,",Space,Str "leaning,",Space,Str "hushing",Space,Str "the",Space,Str "room",Space,Str "enclosed."]],Div ("",[],[]) [Plain [Str "Footsteps",Space,Str "shuffled",Space,Str "on",Space,Str "the",Space,Str "stair."]],Div ("",[],[]) [Plain [Str "Under",Space,Str "the",Space,Str "firelight,",Space,Str "under",Space,Str "the",Space,Str "brush,",Space,Str "her",Space,Str "hair"]],Div ("",[],[]) [Plain [Str "Spread",Space,Str "out",Space,Str "in",Space,Str "fiery",Space,Str "points"]],Div ("",[],[]) [Plain [Str "Glowed",Space,Str "into",Space,Str "words,",Space,Str "then",Space,Str "would",Space,Str "be",Space,Str "savagely",Space,Str "still.",Span ("",["lnum"],[]) [Str "110"]]]],Div ("",["linegroup"],[]) [Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "\"My",Space,Str "nerves",Space,Str "are",Space,Str "bad",Space,Str "to-night.",Space,Str "Yes,",Space,Str "bad.",Space,Str "Stay",Space,Str "with",Space,Str "me."]],Div ("",[],[]) [Plain [Str "\"Speak",Space,Str "to",Space,Str "me.",Space,Str "Why",Space,Str "do",Space,Str "you",Space,Str "never",Space,Str "speak.",Space,Str "Speak."]],Div ("",[],[]) [Plain [Str "\"What",Space,Str "are",Space,Str "you",Space,Str "thinking",Space,Str "of?",Space,Str "What",Space,Str "thinking?",Space,Str "What?"]],Div ("",[],[]) [Plain [Str "\"I",Space,Str "never",Space,Str "know",Space,Str "what",Space,Str "you",Space,Str "are",Space,Str "thinking.",Space,Str "Think.\""]]],Div ("",["linegroup"],[]) [Div ("wasteland-content.xhtml#ln115",[],[]) [Plain [Str "I",Space,Str "think",Space,Str "we",Space,Str "are",Space,Str "in",Space,Str "rats'",Space,Str "alley",Note [Para [Link ("",[],[]) [Str "115."] ("#wasteland-content.xhtml#ln115",""),Space,Str "Cf.",Space,Str "Part",Space,Str "III,",Space,Str "l.",Space,Str "195."]]],Div ("",[],[]) [Plain [Str "Where",Space,Str "the",Space,Str "dead",Space,Str "men",Space,Str "lost",Space,Str "their",Space,Str "bones."]]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "\"What",Space,Str "is",Space,Str "that",Space,Str "noise?\""]],Div ("wasteland-content.xhtml#ln118",["indent"],[]) [Plain [Str "The",Space,Str "wind",Space,Str "under",Space,Str "the",Space,Str "door.",Note [Para [Link ("",[],[]) [Str "118."] ("#wasteland-content.xhtml#ln118",""),Space,Str "Cf.",Space,Str "Webster:"],BlockQuote [Para [Str "\"Is",Space,Str "the",Space,Str "wind",Space,Str "in",Space,Str "that",Space,Str "door",Space,Str "still?\""]]]],Div ("",[],[]) [Plain [Str "\"What",Space,Str "is",Space,Str "that",Space,Str "noise",Space,Str "now?",Space,Str "What",Space,Str "is",Space,Str "the",Space,Str "wind",Space,Str "doing?\""]],Div ("",["indent"],[]) [Plain [Str "Nothing",Space,Str "again",Space,Str "nothing.",Span ("",["lnum"],[]) [Str "120"]]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "\"Do"]],Div ("",[],[]) [Plain [Str "\"You",Space,Str "know",Space,Str "nothing?",Space,Str "Do",Space,Str "you",Space,Str "see",Space,Str "nothing?",Space,Str "Do",Space,Str "you",Space,Str "remember"]],Div ("",[],[]) [Plain [Str "\"Nothing?\""]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "I",Space,Str "remember"]],Div ("",[],[]) [Plain [Str "Those",Space,Str "are",Space,Str "pearls",Space,Str "that",Space,Str "were",Space,Str "his",Space,Str "eyes."]],Div ("wasteland-content.xhtml#ln126",[],[]) [Plain [Str "\"Are",Space,Str "you",Space,Str "alive,",Space,Str "or",Space,Str "not?",Space,Str "Is",Space,Str "there",Space,Str "nothing",Space,Str "in",Space,Str "your",Space,Str "head?\"",Note [Para [Link ("",[],[]) [Str "126."] ("#wasteland-content.xhtml#ln126",""),Space,Str "Cf.",Space,Str "Part",Space,Str "I,",Space,Str "l.",Space,Str "37,",Space,Str "48."]]],Div ("",[],[]) [Plain [Str "But"]],Div ("",[],[]) [Plain [Str "O",Space,Str "O",Space,Str "O",Space,Str "O",Space,Str "that",Space,Str "Shakespeherian",Space,Str "Rag\8213"]],Div ("",[],[]) [Plain [Str "It's",Space,Str "so",Space,Str "elegant"]],Div ("",[],[]) [Plain [Str "So",Space,Str "intelligent",Span ("",["lnum"],[]) [Str "130"]]],Div ("",[],[]) [Plain [Str "\"What",Space,Str "shall",Space,Str "I",Space,Str "do",Space,Str "now?",Space,Str "What",Space,Str "shall",Space,Str "I",Space,Str "do?\""]],Div ("",[],[]) [Plain [Str "I",Space,Str "shall",Space,Str "rush",Space,Str "out",Space,Str "as",Space,Str "I",Space,Str "am,",Space,Str "and",Space,Str "walk",Space,Str "the",Space,Str "street"]],Div ("",[],[]) [Plain [Str "\"With",Space,Str "my",Space,Str "hair",Space,Str "down,",Space,Str "so.",Space,Str "What",Space,Str "shall",Space,Str "we",Space,Str "do",Space,Str "to-morrow?"]],Div ("",[],[]) [Plain [Str "\"What",Space,Str "shall",Space,Str "we",Space,Str "ever",Space,Str "do?\""]],Div ("",[],[]) [Plain [Str "The",Space,Str "hot",Space,Str "water",Space,Str "at",Space,Str "ten."]],Div ("",[],[]) [Plain [Str "And",Space,Str "if",Space,Str "it",Space,Str "rains,",Space,Str "a",Space,Str "closed",Space,Str "car",Space,Str "at",Space,Str "four."]],Div ("",[],[]) [Plain [Str "And",Space,Str "we",Space,Str "shall",Space,Str "play",Space,Str "a",Space,Str "game",Space,Str "of",Space,Str "chess,"]],Div ("wasteland-content.xhtml#ln138",[],[]) [Plain [Str "Pressing",Space,Str "lidless",Space,Str "eyes",Space,Str "and",Space,Str "waiting",Space,Str "for",Space,Str "a",Space,Str "knock",Space,Str "upon",Space,Str "the",Space,Str "door.",Note [Para [Link ("",[],[]) [Str "138."] ("#wasteland-content.xhtml#ln138",""),Space,Str "Cf.",Space,Str "the",Space,Str "game",Space,Str "of",Space,Str "chess",Space,Str "in",Space,Str "Middleton's",Space,Str "Women",Space,Str "beware",Space,Str "Women."]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "When",Space,Str "Lil's",Space,Str "husband",Space,Str "got",Space,Str "demobbed,",Space,Str "I",Space,Str "said",Space,Str "-"]],Div ("",[],[]) [Plain [Str "I",Space,Str "didn't",Space,Str "mince",Space,Str "my",Space,Str "words,",Space,Str "I",Space,Str "said",Space,Str "to",Space,Str "her",Space,Str "myself,",Span ("",["lnum"],[]) [Str "140"]]],Div ("",[],[]) [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]],Div ("",[],[]) [Plain [Str "Now",Space,Str "Albert's",Space,Str "coming",Space,Str "back,",Space,Str "make",Space,Str "yourself",Space,Str "a",Space,Str "bit",Space,Str "smart."]],Div ("",[],[]) [Plain [Str "He'll",Space,Str "want",Space,Str "to",Space,Str "know",Space,Str "what",Space,Str "you",Space,Str "done",Space,Str "with",Space,Str "that",Space,Str "money",Space,Str "he",Space,Str "gave",Space,Str "you"]],Div ("",[],[]) [Plain [Str "To",Space,Str "get",Space,Str "yourself",Space,Str "some",Space,Str "teeth.",Space,Str "He",Space,Str "did,",Space,Str "I",Space,Str "was",Space,Str "there."]],Div ("",[],[]) [Plain [Str "You",Space,Str "have",Space,Str "them",Space,Str "all",Space,Str "out,",Space,Str "Lil,",Space,Str "and",Space,Str "get",Space,Str "a",Space,Str "nice",Space,Str "set,"]],Div ("",[],[]) [Plain [Str "He",Space,Str "said,",Space,Str "I",Space,Str "swear,",Space,Str "I",Space,Str "can't",Space,Str "bear",Space,Str "to",Space,Str "look",Space,Str "at",Space,Str "you."]],Div ("",[],[]) [Plain [Str "And",Space,Str "no",Space,Str "more",Space,Str "can't",Space,Str "I,",Space,Str "I",Space,Str "said,",Space,Str "and",Space,Str "think",Space,Str "of",Space,Str "poor",Space,Str "Albert,"]],Div ("",[],[]) [Plain [Str "He's",Space,Str "been",Space,Str "in",Space,Str "the",Space,Str "army",Space,Str "four",Space,Str "years,",Space,Str "he",Space,Str "wants",Space,Str "a",Space,Str "good",Space,Str "time,"]],Div ("",[],[]) [Plain [Str "And",Space,Str "if",Space,Str "you",Space,Str "don't",Space,Str "give",Space,Str "it",Space,Str "him,",Space,Str "there's",Space,Str "others",Space,Str "will,",Space,Str "I",Space,Str "said."]],Div ("",[],[]) [Plain [Str "Oh",Space,Str "is",Space,Str "there,",Space,Str "she",Space,Str "said.",Space,Str "Something",Space,Str "o'",Space,Str "that,",Space,Str "I",Space,Str "said.",Span ("",["lnum"],[]) [Str "150"]]],Div ("",[],[]) [Plain [Str "Then",Space,Str "I'll",Space,Str "know",Space,Str "who",Space,Str "to",Space,Str "thank,",Space,Str "she",Space,Str "said,",Space,Str "and",Space,Str "give",Space,Str "me",Space,Str "a",Space,Str "straight",Space,Str "look."]],Div ("",[],[]) [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]],Div ("",[],[]) [Plain [Str "If",Space,Str "you",Space,Str "don't",Space,Str "like",Space,Str "it",Space,Str "you",Space,Str "can",Space,Str "get",Space,Str "on",Space,Str "with",Space,Str "it,",Space,Str "I",Space,Str "said."]],Div ("",[],[]) [Plain [Str "Others",Space,Str "can",Space,Str "pick",Space,Str "and",Space,Str "choose",Space,Str "if",Space,Str "you",Space,Str "can't."]],Div ("",[],[]) [Plain [Str "But",Space,Str "if",Space,Str "Albert",Space,Str "makes",Space,Str "off,",Space,Str "it",Space,Str "won't",Space,Str "be",Space,Str "for",Space,Str "lack",Space,Str "of",Space,Str "telling."]],Div ("",[],[]) [Plain [Str "You",Space,Str "ought",Space,Str "to",Space,Str "be",Space,Str "ashamed,",Space,Str "I",Space,Str "said,",Space,Str "to",Space,Str "look",Space,Str "so",Space,Str "antique."]],Div ("",[],[]) [Plain [Str "(And",Space,Str "her",Space,Str "only",Space,Str "thirty-one.)"]],Div ("",[],[]) [Plain [Str "I",Space,Str "can't",Space,Str "help",Space,Str "it,",Space,Str "she",Space,Str "said,",Space,Str "pulling",Space,Str "a",Space,Str "long",Space,Str "face,"]],Div ("",[],[]) [Plain [Str "It's",Space,Str "them",Space,Str "pills",Space,Str "I",Space,Str "took,",Space,Str "to",Space,Str "bring",Space,Str "it",Space,Str "off,",Space,Str "she",Space,Str "said."]],Div ("",[],[]) [Plain [Str "(She's",Space,Str "had",Space,Str "five",Space,Str "already,",Space,Str "and",Space,Str "nearly",Space,Str "died",Space,Str "of",Space,Str "young",Space,Str "George.)",Span ("",["lnum"],[]) [Str "160"]]],Div ("",[],[]) [Plain [Str "The",Space,Str "chemist",Space,Str "said",Space,Str "it",Space,Str "would",Space,Str "be",Space,Str "all",Space,Str "right,",Space,Str "but",Space,Str "I've",Space,Str "never",Space,Str "been",Space,Str "the",Space,Str "same."]],Div ("",[],[]) [Plain [Str "You",Space,Emph [Str "are"],Space,Str "a",Space,Str "proper",Space,Str "fool,",Space,Str "I",Space,Str "said."]],Div ("",[],[]) [Plain [Str "Well,",Space,Str "if",Space,Str "Albert",Space,Str "won't",Space,Str "leave",Space,Str "you",Space,Str "alone,",Space,Str "there",Space,Str "it",Space,Str "is,",Space,Str "I",Space,Str "said,"]],Div ("",[],[]) [Plain [Str "What",Space,Str "you",Space,Str "get",Space,Str "married",Space,Str "for",Space,Str "if",Space,Str "you",Space,Str "don't",Space,Str "want",Space,Str "children?"]],Div ("",[],[]) [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]],Div ("",[],[]) [Plain [Str "Well,",Space,Str "that",Space,Str "Sunday",Space,Str "Albert",Space,Str "was",Space,Str "home,",Space,Str "they",Space,Str "had",Space,Str "a",Space,Str "hot",Space,Str "gammon,"]],Div ("",[],[]) [Plain [Str "And",Space,Str "they",Space,Str "asked",Space,Str "me",Space,Str "in",Space,Str "to",Space,Str "dinner,",Space,Str "to",Space,Str "get",Space,Str "the",Space,Str "beauty",Space,Str "of",Space,Str "it",Space,Str "hot\8213"]],Div ("",[],[]) [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]],Div ("",[],[]) [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]],Div ("",[],[]) [Plain [Str "Goonight",Space,Str "Bill.",Space,Str "Goonight",Space,Str "Lou.",Space,Str "Goonight",Space,Str "May.",Space,Str "Goonight.",Span ("",["lnum"],[]) [Str "170"]]],Div ("",[],[]) [Plain [Str "Ta",Space,Str "ta.",Space,Str "Goonight.",Space,Str "Goonight."]],Div ("",[],[]) [Plain [Str "Good",Space,Str "night,",Space,Str "ladies,",Space,Str "good",Space,Str "night,",Space,Str "sweet",Space,Str "ladies,",Space,Str "good",Space,Str "night,",Space,Str "good",Space,Str "night."]]],RawBlock (Format "html") "</section>",RawBlock (Format "html") "<section id=\"ch3\">",Header 2 ("",[],[]) [Str "III.",Space,Str "THE",Space,Str "FIRE",Space,Str "SERMON"],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "The",Space,Str "river's",Space,Str "tent",Space,Str "is",Space,Str "broken:",Space,Str "the",Space,Str "last",Space,Str "fingers",Space,Str "of",Space,Str "leaf"]],Div ("",[],[]) [Plain [Str "Clutch",Space,Str "and",Space,Str "sink",Space,Str "into",Space,Str "the",Space,Str "wet",Space,Str "bank.",Space,Str "The",Space,Str "wind"]],Div ("",[],[]) [Plain [Str "Crosses",Space,Str "the",Space,Str "brown",Space,Str "land,",Space,Str "unheard.",Space,Str "The",Space,Str "nymphs",Space,Str "are",Space,Str "departed."]],Div ("wasteland-content.xhtml#ln176",[],[]) [Plain [Str "Sweet",Space,Str "Thames,",Space,Str "run",Space,Str "softly,",Space,Str "till",Space,Str "I",Space,Str "end",Space,Str "my",Space,Str "song.",Note [Para [Link ("",[],[]) [Str "176."] ("#wasteland-content.xhtml#ln176",""),Space,Str "V.",Space,Str "Spenser,",Space,Str "Prothalamion."]]],Div ("",[],[]) [Plain [Str "The",Space,Str "river",Space,Str "bears",Space,Str "no",Space,Str "empty",Space,Str "bottles,",Space,Str "sandwich",Space,Str "papers,"]],Div ("",[],[]) [Plain [Str "Silk",Space,Str "handkerchiefs,",Space,Str "cardboard",Space,Str "boxes,",Space,Str "cigarette",Space,Str "ends"]],Div ("",[],[]) [Plain [Str "Or",Space,Str "other",Space,Str "testimony",Space,Str "of",Space,Str "summer",Space,Str "nights.",Space,Str "The",Space,Str "nymphs",Space,Str "are",Space,Str "departed."]],Div ("",[],[]) [Plain [Str "And",Space,Str "their",Space,Str "friends,",Space,Str "the",Space,Str "loitering",Space,Str "heirs",Space,Str "of",Space,Str "city",Space,Str "directors;",Span ("",["lnum"],[]) [Str "180"]]],Div ("",[],[]) [Plain [Str "Departed,",Space,Str "have",Space,Str "left",Space,Str "no",Space,Str "addresses."]],Div ("",[],[]) [Plain [Str "By",Space,Str "the",Space,Str "waters",Space,Str "of",Space,Str "Leman",Space,Str "I",Space,Str "sat",Space,Str "down",Space,Str "and",Space,Str "wept",Space,Str ".",Space,Str ".",Space,Str "."]],Div ("",[],[]) [Plain [Str "Sweet",Space,Str "Thames,",Space,Str "run",Space,Str "softly",Space,Str "till",Space,Str "I",Space,Str "end",Space,Str "my",Space,Str "song,"]],Div ("",[],[]) [Plain [Str "Sweet",Space,Str "Thames,",Space,Str "run",Space,Str "softly,",Space,Str "for",Space,Str "I",Space,Str "speak",Space,Str "not",Space,Str "loud",Space,Str "or",Space,Str "long."]],Div ("",[],[]) [Plain [Str "But",Space,Str "at",Space,Str "my",Space,Str "back",Space,Str "in",Space,Str "a",Space,Str "cold",Space,Str "blast",Space,Str "I",Space,Str "hear"]],Div ("",[],[]) [Plain [Str "The",Space,Str "rattle",Space,Str "of",Space,Str "the",Space,Str "bones,",Space,Str "and",Space,Str "chuckle",Space,Str "spread",Space,Str "from",Space,Str "ear",Space,Str "to",Space,Str "ear."]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "A",Space,Str "rat",Space,Str "crept",Space,Str "softly",Space,Str "through",Space,Str "the",Space,Str "vegetation"]],Div ("",[],[]) [Plain [Str "Dragging",Space,Str "its",Space,Str "slimy",Space,Str "belly",Space,Str "on",Space,Str "the",Space,Str "bank"]],Div ("",[],[]) [Plain [Str "While",Space,Str "I",Space,Str "was",Space,Str "fishing",Space,Str "in",Space,Str "the",Space,Str "dull",Space,Str "canal"]],Div ("",[],[]) [Plain [Str "On",Space,Str "a",Space,Str "winter",Space,Str "evening",Space,Str "round",Space,Str "behind",Space,Str "the",Space,Str "gashouse",Span ("",["lnum"],[]) [Str "190"]]],Div ("",[],[]) [Plain [Str "Musing",Space,Str "upon",Space,Str "the",Space,Str "king",Space,Str "my",Space,Str "brother's",Space,Str "wreck"]],Div ("wasteland-content.xhtml#ln192",[],[]) [Plain [Str "And",Space,Str "on",Space,Str "the",Space,Str "king",Space,Str "my",Space,Str "father's",Space,Str "death",Space,Str "before",Space,Str "him.",Note [Para [Link ("",[],[]) [Str "192."] ("#wasteland-content.xhtml#ln192",""),Space,Str "Cf.",Space,Str "The",Space,Str "Tempest,",Space,Str "I.",Space,Str "ii."]]],Div ("",[],[]) [Plain [Str "White",Space,Str "bodies",Space,Str "naked",Space,Str "on",Space,Str "the",Space,Str "low",Space,Str "damp",Space,Str "ground"]],Div ("",[],[]) [Plain [Str "And",Space,Str "bones",Space,Str "cast",Space,Str "in",Space,Str "a",Space,Str "little",Space,Str "low",Space,Str "dry",Space,Str "garret,"]],Div ("",[],[]) [Plain [Str "Rattled",Space,Str "by",Space,Str "the",Space,Str "rat's",Space,Str "foot",Space,Str "only,",Space,Str "year",Space,Str "to",Space,Str "year."]],Div ("wasteland-content.xhtml#ln196",[],[]) [Plain [Str "But",Space,Str "at",Space,Str "my",Space,Str "back",Space,Str "from",Space,Str "time",Space,Str "to",Space,Str "time",Space,Str "I",Space,Str "hear",Note [Para [Link ("",[],[]) [Str "196."] ("#wasteland-content.xhtml#ln196",""),Space,Str "Cf.",Space,Str "Marvell,",Space,Str "To",Space,Str "His",Space,Str "Coy",Space,Str "Mistress."]]],Div ("wasteland-content.xhtml#ln197",[],[]) [Plain [Str "The",Space,Str "sound",Space,Str "of",Space,Str "horns",Space,Str "and",Space,Str "motors,",Space,Str "which",Space,Str "shall",Space,Str "bring",Note [Para [Link ("",[],[]) [Str "197."] ("#wasteland-content.xhtml#ln197",""),Space,Str "Cf.",Space,Str "Day,",Space,Str "Parliament",Space,Str "of",Space,Str "Bees:"],BlockQuote [Div ("",[],[]) [Div ("",[],[]) [Plain [Str "\"When",Space,Str "of",Space,Str "the",Space,Str "sudden,",Space,Str "listening,",Space,Str "you",Space,Str "shall",Space,Str "hear,"]],Div ("",[],[]) [Plain [Str "\"A",Space,Str "noise",Space,Str "of",Space,Str "horns",Space,Str "and",Space,Str "hunting,",Space,Str "which",Space,Str "shall",Space,Str "bring"]],Div ("",[],[]) [Plain [Str "\"Actaeon",Space,Str "to",Space,Str "Diana",Space,Str "in",Space,Str "the",Space,Str "spring,"]],Div ("",[],[]) [Plain [Str "\"Where",Space,Str "all",Space,Str "shall",Space,Str "see",Space,Str "her",Space,Str "naked",Space,Str "skin",Space,Str ".",Space,Str ".",Space,Str ".\""]]]]]],Div ("",[],[]) [Plain [Str "Sweeney",Space,Str "to",Space,Str "Mrs.",Space,Str "Porter",Space,Str "in",Space,Str "the",Space,Str "spring."]],Div ("wasteland-content.xhtml#ln199",[],[]) [Plain [Str "O",Space,Str "the",Space,Str "moon",Space,Str "shone",Space,Str "bright",Space,Str "on",Space,Str "Mrs.",Space,Str "Porter",Note [Para [Link ("",[],[]) [Str "199."] ("#wasteland-content.xhtml#ln199",""),Space,Str "I",Space,Str "do",Space,Str "not",Space,Str "know",Space,Str "the",Space,Str "origin",Space,Str "of",Space,Str "the",Space,Str "ballad",Space,Str "from",Space,Str "which",Space,Str "these",Space,Str "lines",Space,Str "are",Space,Str "taken:",Space,Str "it",Space,Str "was",Space,Str "reported",Space,Str "to",Space,Str "me",Space,Str "from",Space,Str "Sydney,",Space,Str "Australia."]]],Div ("",[],[]) [Plain [Str "And",Space,Str "on",Space,Str "her",Space,Str "daughter",Span ("",["lnum"],[]) [Str "200"]]],Div ("",[],[]) [Plain [Str "They",Space,Str "wash",Space,Str "their",Space,Str "feet",Space,Str "in",Space,Str "soda",Space,Str "water"]],Div ("wasteland-content.xhtml#ln202",[],[("lang","fr")]) [Plain [Emph [Str "Et",Space,Str "O",Space,Str "ces",Space,Str "voix",Space,Str "d'enfants,",Space,Str "chantant",Space,Str "dans",Space,Str "la",Space,Str "coupole"],Str "!",Note [Para [Link ("",[],[]) [Str "202."] ("#wasteland-content.xhtml#ln202",""),Space,Str "V.",Space,Str "Verlaine,",Space,Str "Parsifal."]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "Twit",Space,Str "twit",Space,Str "twit"]],Div ("",[],[]) [Plain [Str "Jug",Space,Str "jug",Space,Str "jug",Space,Str "jug",Space,Str "jug",Space,Str "jug"]],Div ("",[],[]) [Plain [Str "So",Space,Str "rudely",Space,Str "forc'd."]],Div ("",[],[]) [Plain [Str "Tereu"]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "Unreal",Space,Str "City"]],Div ("",[],[]) [Plain [Str "Under",Space,Str "the",Space,Str "brown",Space,Str "fog",Space,Str "of",Space,Str "a",Space,Str "winter",Space,Str "noon"]],Div ("",[],[]) [Plain [Str "Mr.",Space,Str "Eugenides,",Space,Str "the",Space,Str "Smyrna",Space,Str "merchant"]],Div ("wasteland-content.xhtml#ln210",[],[]) [Plain [Str "Unshaven,",Space,Str "with",Space,Str "a",Space,Str "pocket",Space,Str "full",Space,Str "of",Space,Str "currants",Note [Para [Link ("",[],[]) [Str "210."] ("#wasteland-content.xhtml#ln210",""),Space,Str "The",Space,Str "currants",Space,Str "were",Space,Str "quoted",Space,Str "at",Space,Str "a",Space,Str "price",Space,Str "\"cost",Space,Str "insurance",Space,Str "and",Space,Str "freight",Space,Str "to",Space,Str "London\";",Space,Str "and",Space,Str "the",Space,Str "Bill",Space,Str "of",Space,Str "Lading",Space,Str "etc.",Space,Str "were",Space,Str "to",Space,Str "be",Space,Str "handed",Space,Str "to",Space,Str "the",Space,Str "buyer",Space,Str "upon",Space,Str "payment",Space,Str "of",Space,Str "the",Space,Str "sight",Space,Str "draft."]]],Div ("",[],[]) [Plain [Str "C.i.f.",Space,Str "London:",Space,Str "documents",Space,Str "at",Space,Str "sight,"]],Div ("",[],[]) [Plain [Str "Asked",Space,Str "me",Space,Str "in",Space,Str "demotic",Space,Str "French"]],Div ("",[],[]) [Plain [Str "To",Space,Str "luncheon",Space,Str "at",Space,Str "the",Space,Str "Cannon",Space,Str "Street",Space,Str "Hotel"]],Div ("",[],[]) [Plain [Str "Followed",Space,Str "by",Space,Str "a",Space,Str "weekend",Space,Str "at",Space,Str "the",Space,Str "Metropole."]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "At",Space,Str "the",Space,Str "violet",Space,Str "hour,",Space,Str "when",Space,Str "the",Space,Str "eyes",Space,Str "and",Space,Str "back"]],Div ("",[],[]) [Plain [Str "Turn",Space,Str "upward",Space,Str "from",Space,Str "the",Space,Str "desk,",Space,Str "when",Space,Str "the",Space,Str "human",Space,Str "engine",Space,Str "waits"]],Div ("",[],[]) [Plain [Str "Like",Space,Str "a",Space,Str "taxi",Space,Str "throbbing",Space,Str "waiting,"]],Div ("wasteland-content.xhtml#ln218",[],[]) [Plain [Str "I",Space,Str "Tiresias,",Space,Str "though",Space,Str "blind,",Space,Str "throbbing",Space,Str "between",Space,Str "two",Space,Str "lives,",Note [Para [Link ("",[],[]) [Str "218."] ("#wasteland-content.xhtml#ln218",""),Space,Str "Tiresias,",Space,Str "although",Space,Str "a",Space,Str "mere",Space,Str "spectator",Space,Str "and",Space,Str "not",Space,Str "indeed",Space,Str "a",Space,Str "\"character,\"",Space,Str "is",Space,Str "yet",Space,Str "the",Space,Str "most",Space,Str "important",Space,Str "personage",Space,Str "in",Space,Str "the",Space,Str "poem,",Space,Str "uniting",Space,Str "all",Space,Str "the",Space,Str "rest.",Space,Str "Just",Space,Str "as",Space,Str "the",Space,Str "one-eyed",Space,Str "merchant,",Space,Str "seller",Space,Str "of",Space,Str "currants,",Space,Str "melts",Space,Str "into",Space,Str "the",Space,Str "Phoenician",Space,Str "Sailor,",Space,Str "and",Space,Str "the",Space,Str "latter",Space,Str "is",Space,Str "not",Space,Str "wholly",Space,Str "distinct",Space,Str "from",Space,Str "Ferdinand",Space,Str "Prince",Space,Str "of",Space,Str "Naples,",Space,Str "so",Space,Str "all",Space,Str "the",Space,Str "women",Space,Str "are",Space,Str "one",Space,Str "woman,",Space,Str "and",Space,Str "the",Space,Str "two",Space,Str "sexes",Space,Str "meet",Space,Str "in",Space,Str "Tiresias.",Space,Str "What",Space,Str "Tiresias",Space,Str "sees,",Space,Str "in",Space,Str "fact,",Space,Str "is",Space,Str "the",Space,Str "substance",Space,Str "of",Space,Str "the",Space,Str "poem.",Space,Str "The",Space,Str "whole",Space,Str "passage",Space,Str "from",Space,Str "Ovid",Space,Str "is",Space,Str "of",Space,Str "great",Space,Str "anthropological",Space,Str "interest:"],BlockQuote [Para [Str "'.",Space,Str ".",Space,Str ".",Space,Str "Cum",Space,Str "Iunone",Space,Str "iocos",Space,Str "et",Space,Str "maior",Space,Str "vestra",Space,Str "profecto",Space,Str "est",LineBreak,Space,Str "Quam,",Space,Str "quae",Space,Str "contingit",Space,Str "maribus,'",Space,Str "dixisse,",Space,Str "'voluptas.'",LineBreak,Space,Str "Illa",Space,Str "negat;",Space,Str "placuit",Space,Str "quae",Space,Str "sit",Space,Str "sententia",Space,Str "docti",LineBreak,Space,Str "Quaerere",Space,Str "Tiresiae:",Space,Str "venus",Space,Str "huic",Space,Str "erat",Space,Str "utraque",Space,Str "nota.",LineBreak,Space,Str "Nam",Space,Str "duo",Space,Str "magnorum",Space,Str "viridi",Space,Str "coeuntia",Space,Str "silva",LineBreak,Space,Str "Corpora",Space,Str "serpentum",Space,Str "baculi",Space,Str "violaverat",Space,Str "ictu",LineBreak,Space,Str "Deque",Space,Str "viro",Space,Str "factus,",Space,Str "mirabile,",Space,Str "femina",Space,Str "septem",LineBreak,Space,Str "Egerat",Space,Str "autumnos;",Space,Str "octavo",Space,Str "rursus",Space,Str "eosdem",LineBreak,Space,Str "Vidit",Space,Str "et",Space,Str "'est",Space,Str "vestrae",Space,Str "si",Space,Str "tanta",Space,Str "potentia",Space,Str "plagae,'",LineBreak,Space,Str "Dixit",Space,Str "'ut",Space,Str "auctoris",Space,Str "sortem",Space,Str "in",Space,Str "contraria",Space,Str "mutet,",LineBreak,Space,Str "Nunc",Space,Str "quoque",Space,Str "vos",Space,Str "feriam!'",Space,Str "percussis",Space,Str "anguibus",Space,Str "isdem",LineBreak,Space,Str "Forma",Space,Str "prior",Space,Str "rediit",Space,Str "genetivaque",Space,Str "venit",Space,Str "imago.",LineBreak,Space,Str "Arbiter",Space,Str "hic",Space,Str "igitur",Space,Str "sumptus",Space,Str "de",Space,Str "lite",Space,Str "iocosa",LineBreak,Space,Str "Dicta",Space,Str "Iovis",Space,Str "firmat;",Space,Str "gravius",Space,Str "Saturnia",Space,Str "iusto",LineBreak,Space,Str "Nec",Space,Str "pro",Space,Str "materia",Space,Str "fertur",Space,Str "doluisse",Space,Str "suique",LineBreak,Space,Str "Iudicis",Space,Str "aeterna",Space,Str "damnavit",Space,Str "lumina",Space,Str "nocte,",LineBreak,Space,Str "At",Space,Str "pater",Space,Str "omnipotens",Space,Str "(neque",Space,Str "enim",Space,Str "licet",Space,Str "inrita",Space,Str "cuiquam",LineBreak,Space,Str "Facta",Space,Str "dei",Space,Str "fecisse",Space,Str "deo)",Space,Str "pro",Space,Str "lumine",Space,Str "adempto",LineBreak,Space,Str "Scire",Space,Str "futura",Space,Str "dedit",Space,Str "poenamque",Space,Str "levavit",Space,Str "honore.",LineBreak]]]],Div ("",[],[]) [Plain [Str "Old",Space,Str "man",Space,Str "with",Space,Str "wrinkled",Space,Str "female",Space,Str "breasts,",Space,Str "can",Space,Str "see"]],Div ("",[],[]) [Plain [Str "At",Space,Str "the",Space,Str "violet",Space,Str "hour,",Space,Str "the",Space,Str "evening",Space,Str "hour",Space,Str "that",Space,Str "strives",Span ("",["lnum"],[]) [Str "220"]]],Div ("wasteland-content.xhtml#ln221",[],[]) [Plain [Str "Homeward,",Space,Str "and",Space,Str "brings",Space,Str "the",Space,Str "sailor",Space,Str "home",Space,Str "from",Space,Str "sea,",Note [Para [Link ("",[],[]) [Str "221."] ("#wasteland-content.xhtml#ln221",""),Space,Str "This",Space,Str "may",Space,Str "not",Space,Str "appear",Space,Str "as",Space,Str "exact",Space,Str "as",Space,Str "Sappho's",Space,Str "lines,",Space,Str "but",Space,Str "I",Space,Str "had",Space,Str "in",Space,Str "mind",Space,Str "the",Space,Str "\"longshore\"",Space,Str "or",Space,Str "\"dory\"",Space,Str "fisherman,",Space,Str "who",Space,Str "returns",Space,Str "at",Space,Str "nightfall."]]],Div ("",[],[]) [Plain [Str "The",Space,Str "typist",Space,Str "home",Space,Str "at",Space,Str "teatime,",Space,Str "clears",Space,Str "her",Space,Str "breakfast,",Space,Str "lights"]],Div ("",[],[]) [Plain [Str "Her",Space,Str "stove,",Space,Str "and",Space,Str "lays",Space,Str "out",Space,Str "food",Space,Str "in",Space,Str "tins."]],Div ("",[],[]) [Plain [Str "Out",Space,Str "of",Space,Str "the",Space,Str "window",Space,Str "perilously",Space,Str "spread"]],Div ("",[],[]) [Plain [Str "Her",Space,Str "drying",Space,Str "combinations",Space,Str "touched",Space,Str "by",Space,Str "the",Space,Str "sun's",Space,Str "last",Space,Str "rays,"]],Div ("",[],[]) [Plain [Str "On",Space,Str "the",Space,Str "divan",Space,Str "are",Space,Str "piled",Space,Str "(at",Space,Str "night",Space,Str "her",Space,Str "bed)"]],Div ("",[],[]) [Plain [Str "Stockings,",Space,Str "slippers,",Space,Str "camisoles,",Space,Str "and",Space,Str "stays."]],Div ("",[],[]) [Plain [Str "I",Space,Str "Tiresias,",Space,Str "old",Space,Str "man",Space,Str "with",Space,Str "wrinkled",Space,Str "dugs"]],Div ("",[],[]) [Plain [Str "Perceived",Space,Str "the",Space,Str "scene,",Space,Str "and",Space,Str "foretold",Space,Str "the",Space,Str "rest",Space,Str "-"]],Div ("",[],[]) [Plain [Str "I",Space,Str "too",Space,Str "awaited",Space,Str "the",Space,Str "expected",Space,Str "guest.",Span ("",["lnum"],[]) [Str "230"]]],Div ("",[],[]) [Plain [Str "He,",Space,Str "the",Space,Str "young",Space,Str "man",Space,Str "carbuncular,",Space,Str "arrives,"]],Div ("",[],[]) [Plain [Str "A",Space,Str "small",Space,Str "house",Space,Str "agent's",Space,Str "clerk,",Space,Str "with",Space,Str "one",Space,Str "bold",Space,Str "stare,"]],Div ("",[],[]) [Plain [Str "One",Space,Str "of",Space,Str "the",Space,Str "low",Space,Str "on",Space,Str "whom",Space,Str "assurance",Space,Str "sits"]],Div ("",[],[]) [Plain [Str "As",Space,Str "a",Space,Str "silk",Space,Str "hat",Space,Str "on",Space,Str "a",Space,Str "Bradford",Space,Str "millionaire."]],Div ("",[],[]) [Plain [Str "The",Space,Str "time",Space,Str "is",Space,Str "now",Space,Str "propitious,",Space,Str "as",Space,Str "he",Space,Str "guesses,"]],Div ("",[],[]) [Plain [Str "The",Space,Str "meal",Space,Str "is",Space,Str "ended,",Space,Str "she",Space,Str "is",Space,Str "bored",Space,Str "and",Space,Str "tired,"]],Div ("",[],[]) [Plain [Str "Endeavours",Space,Str "to",Space,Str "engage",Space,Str "her",Space,Str "in",Space,Str "caresses"]],Div ("",[],[]) [Plain [Str "Which",Space,Str "still",Space,Str "are",Space,Str "unreproved,",Space,Str "if",Space,Str "undesired."]],Div ("",[],[]) [Plain [Str "Flushed",Space,Str "and",Space,Str "decided,",Space,Str "he",Space,Str "assaults",Space,Str "at",Space,Str "once;"]],Div ("",[],[]) [Plain [Str "Exploring",Space,Str "hands",Space,Str "encounter",Space,Str "no",Space,Str "defence;",Span ("",["lnum"],[]) [Str "240"]]],Div ("",[],[]) [Plain [Str "His",Space,Str "vanity",Space,Str "requires",Space,Str "no",Space,Str "response,"]],Div ("",[],[]) [Plain [Str "And",Space,Str "makes",Space,Str "a",Space,Str "welcome",Space,Str "of",Space,Str "indifference."]],Div ("",[],[]) [Plain [Str "(And",Space,Str "I",Space,Str "Tiresias",Space,Str "have",Space,Str "foresuffered",Space,Str "all"]],Div ("",[],[]) [Plain [Str "Enacted",Space,Str "on",Space,Str "this",Space,Str "same",Space,Str "divan",Space,Str "or",Space,Str "bed;"]],Div ("",[],[]) [Plain [Str "I",Space,Str "who",Space,Str "have",Space,Str "sat",Space,Str "by",Space,Str "Thebes",Space,Str "below",Space,Str "the",Space,Str "wall"]],Div ("",[],[]) [Plain [Str "And",Space,Str "walked",Space,Str "among",Space,Str "the",Space,Str "lowest",Space,Str "of",Space,Str "the",Space,Str "dead.)"]],Div ("",[],[]) [Plain [Str "Bestows",Space,Str "one",Space,Str "final",Space,Str "patronising",Space,Str "kiss,"]],Div ("",[],[]) [Plain [Str "And",Space,Str "gropes",Space,Str "his",Space,Str "way,",Space,Str "finding",Space,Str "the",Space,Str "stairs",Space,Str "unlit",Space,Str ".",Space,Str ".",Space,Str "."]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "She",Space,Str "turns",Space,Str "and",Space,Str "looks",Space,Str "a",Space,Str "moment",Space,Str "in",Space,Str "the",Space,Str "glass,"]],Div ("",[],[]) [Plain [Str "Hardly",Space,Str "aware",Space,Str "of",Space,Str "her",Space,Str "departed",Space,Str "lover;",Span ("",["lnum"],[]) [Str "250"]]],Div ("",[],[]) [Plain [Str "Her",Space,Str "brain",Space,Str "allows",Space,Str "one",Space,Str "half-formed",Space,Str "thought",Space,Str "to",Space,Str "pass:"]],Div ("",[],[]) [Plain [Str "\"Well",Space,Str "now",Space,Str "that's",Space,Str "done:",Space,Str "and",Space,Str "I'm",Space,Str "glad",Space,Str "it's",Space,Str "over.\""]],Div ("wasteland-content.xhtml#ln253",[],[]) [Plain [Str "When",Space,Str "lovely",Space,Str "woman",Space,Str "stoops",Space,Str "to",Space,Str "folly",Space,Str "and",Note [Para [Link ("",[],[]) [Str "253."] ("#wasteland-content.xhtml#ln253",""),Space,Str "V.",Space,Str "Goldsmith,",Space,Str "the",Space,Str "song",Space,Str "in",Space,Str "The",Space,Str "Vicar",Space,Str "of",Space,Str "Wakefield."]]],Div ("",[],[]) [Plain [Str "Paces",Space,Str "about",Space,Str "her",Space,Str "room",Space,Str "again,",Space,Str "alone,"]],Div ("",[],[]) [Plain [Str "She",Space,Str "smoothes",Space,Str "her",Space,Str "hair",Space,Str "with",Space,Str "automatic",Space,Str "hand,"]],Div ("",[],[]) [Plain [Str "And",Space,Str "puts",Space,Str "a",Space,Str "record",Space,Str "on",Space,Str "the",Space,Str "gramophone."]]],Div ("",["linegroup"],[]) [Div ("wasteland-content.xhtml#ln257",[],[]) [Plain [Str "\"This",Space,Str "music",Space,Str "crept",Space,Str "by",Space,Str "me",Space,Str "upon",Space,Str "the",Space,Str "waters\"",Note [Para [Link ("",[],[]) [Str "257."] ("#wasteland-content.xhtml#ln257",""),Space,Str "V.",Space,Str "The",Space,Str "Tempest,",Space,Str "as",Space,Str "above."]]],Div ("",[],[]) [Plain [Str "And",Space,Str "along",Space,Str "the",Space,Str "Strand,",Space,Str "up",Space,Str "Queen",Space,Str "Victoria",Space,Str "Street."]],Div ("",[],[]) [Plain [Str "O",Space,Str "City",Space,Str "city,",Space,Str "I",Space,Str "can",Space,Str "sometimes",Space,Str "hear"]],Div ("",[],[]) [Plain [Str "Beside",Space,Str "a",Space,Str "public",Space,Str "bar",Space,Str "in",Space,Str "Lower",Space,Str "Thames",Space,Str "Street,",Span ("",["lnum"],[]) [Str "260"]]],Div ("",[],[]) [Plain [Str "The",Space,Str "pleasant",Space,Str "whining",Space,Str "of",Space,Str "a",Space,Str "mandoline"]],Div ("",[],[]) [Plain [Str "And",Space,Str "a",Space,Str "clatter",Space,Str "and",Space,Str "a",Space,Str "chatter",Space,Str "from",Space,Str "within"]],Div ("",[],[]) [Plain [Str "Where",Space,Str "fishmen",Space,Str "lounge",Space,Str "at",Space,Str "noon:",Space,Str "where",Space,Str "the",Space,Str "walls"]],Div ("wasteland-content.xhtml#ln264",[],[]) [Plain [Str "Of",Space,Str "Magnus",Space,Str "Martyr",Space,Str "hold",Note [Para [Link ("",[],[]) [Str "264."] ("#wasteland-content.xhtml#ln264",""),Space,Str "The",Space,Str "interior",Space,Str "of",Space,Str "St.",Space,Str "Magnus",Space,Str "Martyr",Space,Str "is",Space,Str "to",Space,Str "my",Space,Str "mind",Space,Str "one",Space,Str "of",Space,Str "the",Space,Str "finest",Space,Str "among",Space,Str "Wren's",Space,Str "interiors.",Space,Str "See",Space,Str "The",Space,Str "Proposed",Space,Str "Demolition",Space,Str "of",Space,Str "Nineteen",Space,Str "City",Space,Str "Churches",Space,Str "(P.",Space,Str "S.",Space,Str "King",Space,Str "&",Space,Str "Son,",Space,Str "Ltd.)."]]],Div ("",[],[]) [Plain [Str "Inexplicable",Space,Str "splendour",Space,Str "of",Space,Str "Ionian",Space,Str "white",Space,Str "and",Space,Str "gold."]]],Div ("",["linegroup","indent"],[]) [Div ("wasteland-content.xhtml#ln266",[],[]) [Plain [Str "The",Space,Str "river",Space,Str "sweats",Note [Para [Link ("",[],[]) [Str "266."] ("#wasteland-content.xhtml#ln266",""),Space,Str "The",Space,Str "Song",Space,Str "of",Space,Str "the",Space,Str "(three)",Space,Str "Thames-daughters",Space,Str "begins",Space,Str "here.",Space,Str "From",Space,Str "line",Space,Str "292",Space,Str "to",Space,Str "306",Space,Str "inclusive",Space,Str "they",Space,Str "speak",Space,Str "in",Space,Str "turn.",Space,Str "V.",Space,Str "Gutterdsammerung,",Space,Str "III.",Space,Str "i:",Space,Str "the",Space,Str "Rhine-daughters."]]],Div ("",[],[]) [Plain [Str "Oil",Space,Str "and",Space,Str "tar"]],Div ("",[],[]) [Plain [Str "The",Space,Str "barges",Space,Str "drift"]],Div ("",[],[]) [Plain [Str "With",Space,Str "the",Space,Str "turning",Space,Str "tide"]],Div ("",[],[]) [Plain [Str "Red",Space,Str "sails",Span ("",["lnum"],[]) [Str "270"]]],Div ("",[],[]) [Plain [Str "Wide"]],Div ("",[],[]) [Plain [Str "To",Space,Str "leeward,",Space,Str "swing",Space,Str "on",Space,Str "the",Space,Str "heavy",Space,Str "spar."]],Div ("",[],[]) [Plain [Str "The",Space,Str "barges",Space,Str "wash"]],Div ("",[],[]) [Plain [Str "Drifting",Space,Str "logs"]],Div ("",[],[]) [Plain [Str "Down",Space,Str "Greenwich",Space,Str "reach"]],Div ("",[],[]) [Plain [Str "Past",Space,Str "the",Space,Str "Isle",Space,Str "of",Space,Str "Dogs."]],Div ("",["indent"],[]) [Plain [Str "Weialala",Space,Str "leia"]],Div ("",["indent"],[]) [Plain [Str "Wallala",Space,Str "leialala"]]],Div ("",["linegroup","indent"],[]) [Div ("wasteland-content.xhtml#ln279",[],[]) [Plain [Str "Elizabeth",Space,Str "and",Space,Str "Leicester",Note [Para [Link ("",[],[]) [Str "279."] ("#wasteland-content.xhtml#ln279",""),Space,Str "V.",Space,Str "Froude,",Space,Str "Elizabeth,",Space,Str "Vol.",Space,Str "I,",Space,Str "ch.",Space,Str "iv,",Space,Str "letter",Space,Str "of",Space,Str "De",Space,Str "Quadra",Space,Str "to",Space,Str "Philip",Space,Str "of",Space,Str "Spain:"],BlockQuote [Div ("",[],[]) [Div ("",[],[]) [Plain [Str "\"In",Space,Str "the",Space,Str "afternoon",Space,Str "we",Space,Str "were",Space,Str "in",Space,Str "a",Space,Str "barge,",Space,Str "watching",Space,Str "the",Space,Str "games",Space,Str "on",Space,Str "the",Space,Str "river."]],Div ("",[],[]) [Plain [Str "(The",Space,Str "queen)",Space,Str "was",Space,Str "alone",Space,Str "with",Space,Str "Lord",Space,Str "Robert",Space,Str "and",Space,Str "myself",Space,Str "on",Space,Str "the",Space,Str "poop,"]],Div ("",[],[]) [Plain [Str "when",Space,Str "they",Space,Str "began",Space,Str "to",Space,Str "talk",Space,Str "nonsense,",Space,Str "and",Space,Str "went",Space,Str "so",Space,Str "far",Space,Str "that",Space,Str "Lord",Space,Str "Robert"]],Div ("",[],[]) [Plain [Str "at",Space,Str "last",Space,Str "said,",Space,Str "as",Space,Str "I",Space,Str "was",Space,Str "on",Space,Str "the",Space,Str "spot",Space,Str "there",Space,Str "was",Space,Str "no",Space,Str "reason",Space,Str "why",Space,Str "they"]],Div ("",[],[]) [Plain [Str "should",Space,Str "not",Space,Str "be",Space,Str "married",Space,Str "if",Space,Str "the",Space,Str "queen",Space,Str "pleased.\""]]]]]],Div ("",[],[]) [Plain [Str "Beating",Space,Str "oars",Span ("",["lnum"],[]) [Str "280"]]],Div ("",[],[]) [Plain [Str "The",Space,Str "stern",Space,Str "was",Space,Str "formed"]],Div ("",[],[]) [Plain [Str "A",Space,Str "gilded",Space,Str "shell"]],Div ("",[],[]) [Plain [Str "Red",Space,Str "and",Space,Str "gold"]],Div ("",[],[]) [Plain [Str "The",Space,Str "brisk",Space,Str "swell"]],Div ("",[],[]) [Plain [Str "Rippled",Space,Str "both",Space,Str "shores"]],Div ("",[],[]) [Plain [Str "Southwest",Space,Str "wind"]],Div ("",[],[]) [Plain [Str "Carried",Space,Str "down",Space,Str "stream"]],Div ("",[],[]) [Plain [Str "The",Space,Str "peal",Space,Str "of",Space,Str "bells"]],Div ("",[],[]) [Plain [Str "White",Space,Str "towers"]],Div ("",["indent"],[]) [Plain [Str "Weialala",Space,Str "leia",Span ("",["lnum"],[]) [Str "290"]]],Div ("",["indent"],[]) [Plain [Str "Wallala",Space,Str "leialala"]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "\"Trams",Space,Str "and",Space,Str "dusty",Space,Str "trees."]],Div ("wasteland-content.xhtml#ln293",[],[]) [Plain [Str "Highbury",Space,Str "bore",Space,Str "me.",Space,Str "Richmond",Space,Str "and",Space,Str "Kew",Note [Para [Link ("",[],[]) [Str "293."] ("#wasteland-content.xhtml#ln293",""),Space,Str "Cf.",Space,Str "Purgatorio,",Space,Str "v.",Space,Str "133:"],BlockQuote [Para [Str "\"Ricorditi",Space,Str "di",Space,Str "me,",Space,Str "che",Space,Str "son",Space,Str "la",Space,Str "Pia;",LineBreak,Str "Siena",Space,Str "mi",Space,Str "fe',",Space,Str "disfecemi",Space,Str "Maremma.\""]]]],Div ("",[],[]) [Plain [Str "Undid",Space,Str "me.",Space,Str "By",Space,Str "Richmond",Space,Str "I",Space,Str "raised",Space,Str "my",Space,Str "knees"]],Div ("",[],[]) [Plain [Str "Supine",Space,Str "on",Space,Str "the",Space,Str "floor",Space,Str "of",Space,Str "a",Space,Str "narrow",Space,Str "canoe.\""]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "\"My",Space,Str "feet",Space,Str "are",Space,Str "at",Space,Str "Moorgate,",Space,Str "and",Space,Str "my",Space,Str "heart"]],Div ("",[],[]) [Plain [Str "Under",Space,Str "my",Space,Str "feet.",Space,Str "After",Space,Str "the",Space,Str "event"]],Div ("",[],[]) [Plain [Str "He",Space,Str "wept.",Space,Str "He",Space,Str "promised",Space,Str "'a",Space,Str "new",Space,Str "start'."]],Div ("",[],[]) [Plain [Str "I",Space,Str "made",Space,Str "no",Space,Str "comment.",Space,Str "What",Space,Str "should",Space,Str "I",Space,Str "resent?\""]],Div ("",[],[]) [Plain [Str "\"On",Space,Str "Margate",Space,Str "Sands.",Span ("",["lnum"],[]) [Str "300"]]],Div ("",[],[]) [Plain [Str "I",Space,Str "can",Space,Str "connect"]],Div ("",[],[]) [Plain [Str "Nothing",Space,Str "with",Space,Str "nothing."]],Div ("",[],[]) [Plain [Str "The",Space,Str "broken",Space,Str "fingernails",Space,Str "of",Space,Str "dirty",Space,Str "hands."]],Div ("",[],[]) [Plain [Str "My",Space,Str "people",Space,Str "humble",Space,Str "people",Space,Str "who",Space,Str "expect"]],Div ("",[],[]) [Plain [Str "Nothing.\""]],Div ("",["indent"],[]) [Plain [Str "la",Space,Str "la"]]],Div ("",["linegroup"],[]) [Div ("wasteland-content.xhtml#ln307",[],[]) [Plain [Str "To",Space,Str "Carthage",Space,Str "then",Space,Str "I",Space,Str "came",Note [Para [Link ("",[],[]) [Str "307."] ("#wasteland-content.xhtml#ln307",""),Space,Str "V.",Space,Str "St.",Space,Str "Augustine's",Space,Str "Confessions:",Space,Str "\"to",Space,Str "Carthage",Space,Str "then",Space,Str "I",Space,Str "came,",Space,Str "where",Space,Str "a",Space,Str "cauldron",Space,Str "of",Space,Str "unholy",Space,Str "loves",Space,Str "sang",Space,Str "all",Space,Str "about",Space,Str "mine",Space,Str "ears.\""]]],Div ("",["linegroup"],[]) [Div ("wasteland-content.xhtml#ln308",[],[]) [Plain [Str "Burning",Space,Str "burning",Space,Str "burning",Space,Str "burning",Note [Para [Link ("",[],[]) [Str "308."] ("#wasteland-content.xhtml#ln308",""),Space,Str "The",Space,Str "complete",Space,Str "text",Space,Str "of",Space,Str "the",Space,Str "Buddha's",Space,Str "Fire",Space,Str "Sermon",Space,Str "(which",Space,Str "corresponds",Space,Str "in",Space,Str "importance",Space,Str "to",Space,Str "the",Space,Str "Sermon",Space,Str "on",Space,Str "the",Space,Str "Mount)",Space,Str "from",Space,Str "which",Space,Str "these",Space,Str "words",Space,Str "are",Space,Str "taken,",Space,Str "will",Space,Str "be",Space,Str "found",Space,Str "translated",Space,Str "in",Space,Str "the",Space,Str "late",Space,Str "Henry",Space,Str "Clarke",Space,Str "Warren's",Space,Str "Buddhism",Space,Str "in",Space,Str "Translation",Space,Str "(Harvard",Space,Str "Oriental",Space,Str "Series).",Space,Str "Mr.",Space,Str "Warren",Space,Str "was",Space,Str "one",Space,Str "of",Space,Str "the",Space,Str "great",Space,Str "pioneers",Space,Str "of",Space,Str "Buddhist",Space,Str "studies",Space,Str "in",Space,Str "the",Space,Str "Occident."]]],Div ("wasteland-content.xhtml#ln309",[],[]) [Plain [Str "O",Space,Str "Lord",Space,Str "Thou",Space,Str "pluckest",Space,Str "me",Space,Str "out",Note [Para [Link ("",[],[]) [Str "309."] ("#wasteland-content.xhtml#ln309",""),Space,Str "From",Space,Str "St.",Space,Str "Augustine's",Space,Str "Confessions",Space,Str "again.",Space,Str "The",Space,Str "collocation",Space,Str "of",Space,Str "these",Space,Str "two",Space,Str "representatives",Space,Str "of",Space,Str "eastern",Space,Str "and",Space,Str "western",Space,Str "asceticism,",Space,Str "as",Space,Str "the",Space,Str "culmination",Space,Str "of",Space,Str "this",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "poem,",Space,Str "is",Space,Str "not",Space,Str "an",Space,Str "accident."]]],Div ("",[],[]) [Plain [Str "O",Space,Str "Lord",Space,Str "Thou",Space,Str "pluckest",Span ("",["lnum"],[]) [Str "310"]]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "burning"]]],RawBlock (Format "html") "</section>",RawBlock (Format "html") "<section id=\"ch4\">",Header 2 ("",[],[]) [Str "IV.",Space,Str "DEATH",Space,Str "BY",Space,Str "WATER"],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "Phlebas",Space,Str "the",Space,Str "Phoenician,",Space,Str "a",Space,Str "fortnight",Space,Str "dead,"]],Div ("",[],[]) [Plain [Str "Forgot",Space,Str "the",Space,Str "cry",Space,Str "of",Space,Str "gulls,",Space,Str "and",Space,Str "the",Space,Str "deep",Space,Str "sea",Space,Str "swell"]],Div ("",[],[]) [Plain [Str "And",Space,Str "the",Space,Str "profit",Space,Str "and",Space,Str "loss."]]],Div ("",["linegroup"],[]) [Div ("",["indent2"],[]) [Plain [Str "A",Space,Str "current",Space,Str "under",Space,Str "sea"]],Div ("",[],[]) [Plain [Str "Picked",Space,Str "his",Space,Str "bones",Space,Str "in",Space,Str "whispers.",Space,Str "As",Space,Str "he",Space,Str "rose",Space,Str "and",Space,Str "fell"]],Div ("",[],[]) [Plain [Str "He",Space,Str "passed",Space,Str "the",Space,Str "stages",Space,Str "of",Space,Str "his",Space,Str "age",Space,Str "and",Space,Str "youth"]],Div ("",[],[]) [Plain [Str "Entering",Space,Str "the",Space,Str "whirlpool."]]],Div ("",["linegroup"],[]) [Div ("",["indent2"],[]) [Plain [Str "Gentile",Space,Str "or",Space,Str "Jew"]],Div ("",[],[]) [Plain [Str "O",Space,Str "you",Space,Str "who",Space,Str "turn",Space,Str "the",Space,Str "wheel",Space,Str "and",Space,Str "look",Space,Str "to",Space,Str "windward,",Span ("",["lnum"],[]) [Str "320"]]],Div ("",[],[]) [Plain [Str "Consider",Space,Str "Phlebas,",Space,Str "who",Space,Str "was",Space,Str "once",Space,Str "handsome",Space,Str "and",Space,Str "tall",Space,Str "as",Space,Str "you."]]],RawBlock (Format "html") "</section>",RawBlock (Format "html") "<section id=\"ch5\">",Header 2 ("",[],[]) [Str "V.",Space,Str "WHAT",Space,Str "THE",Space,Str "THUNDER",Space,Str "SAID"],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "After",Space,Str "the",Space,Str "torchlight",Space,Str "red",Space,Str "on",Space,Str "sweaty",Space,Str "faces"]],Div ("",[],[]) [Plain [Str "After",Space,Str "the",Space,Str "frosty",Space,Str "silence",Space,Str "in",Space,Str "the",Space,Str "gardens"]],Div ("",[],[]) [Plain [Str "After",Space,Str "the",Space,Str "agony",Space,Str "in",Space,Str "stony",Space,Str "places"]],Div ("",[],[]) [Plain [Str "The",Space,Str "shouting",Space,Str "and",Space,Str "the",Space,Str "crying"]],Div ("",[],[]) [Plain [Str "Prison",Space,Str "and",Space,Str "palace",Space,Str "and",Space,Str "reverberation"]],Div ("",[],[]) [Plain [Str "Of",Space,Str "thunder",Space,Str "of",Space,Str "spring",Space,Str "over",Space,Str "distant",Space,Str "mountains"]],Div ("",[],[]) [Plain [Str "He",Space,Str "who",Space,Str "was",Space,Str "living",Space,Str "is",Space,Str "now",Space,Str "dead"]],Div ("",[],[]) [Plain [Str "We",Space,Str "who",Space,Str "were",Space,Str "living",Space,Str "are",Space,Str "now",Space,Str "dying"]],Div ("",[],[]) [Plain [Str "With",Space,Str "a",Space,Str "little",Space,Str "patience",Span ("",["lnum"],[]) [Str "330"]]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "Here",Space,Str "is",Space,Str "no",Space,Str "water",Space,Str "but",Space,Str "only",Space,Str "rock"]],Div ("",[],[]) [Plain [Str "Rock",Space,Str "and",Space,Str "no",Space,Str "water",Space,Str "and",Space,Str "the",Space,Str "sandy",Space,Str "road"]],Div ("",[],[]) [Plain [Str "The",Space,Str "road",Space,Str "winding",Space,Str "above",Space,Str "among",Space,Str "the",Space,Str "mountains"]],Div ("",[],[]) [Plain [Str "Which",Space,Str "are",Space,Str "mountains",Space,Str "of",Space,Str "rock",Space,Str "without",Space,Str "water"]],Div ("",[],[]) [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "water",Space,Str "we",Space,Str "should",Space,Str "stop",Space,Str "and",Space,Str "drink"]],Div ("",[],[]) [Plain [Str "Amongst",Space,Str "the",Space,Str "rock",Space,Str "one",Space,Str "cannot",Space,Str "stop",Space,Str "or",Space,Str "think"]],Div ("",[],[]) [Plain [Str "Sweat",Space,Str "is",Space,Str "dry",Space,Str "and",Space,Str "feet",Space,Str "are",Space,Str "in",Space,Str "the",Space,Str "sand"]],Div ("",[],[]) [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "only",Space,Str "water",Space,Str "amongst",Space,Str "the",Space,Str "rock"]],Div ("",[],[]) [Plain [Str "Dead",Space,Str "mountain",Space,Str "mouth",Space,Str "of",Space,Str "carious",Space,Str "teeth",Space,Str "that",Space,Str "cannot",Space,Str "spit"]],Div ("",[],[]) [Plain [Str "Here",Space,Str "one",Space,Str "can",Space,Str "neither",Space,Str "stand",Space,Str "nor",Space,Str "lie",Space,Str "nor",Space,Str "sit",Span ("",["lnum"],[]) [Str "340"]]],Div ("",[],[]) [Plain [Str "There",Space,Str "is",Space,Str "not",Space,Str "even",Space,Str "silence",Space,Str "in",Space,Str "the",Space,Str "mountains"]],Div ("",[],[]) [Plain [Str "But",Space,Str "dry",Space,Str "sterile",Space,Str "thunder",Space,Str "without",Space,Str "rain"]],Div ("",[],[]) [Plain [Str "There",Space,Str "is",Space,Str "not",Space,Str "even",Space,Str "solitude",Space,Str "in",Space,Str "the",Space,Str "mountains"]],Div ("",[],[]) [Plain [Str "But",Space,Str "red",Space,Str "sullen",Space,Str "faces",Space,Str "sneer",Space,Str "and",Space,Str "snarl"]],Div ("",[],[]) [Plain [Str "From",Space,Str "doors",Space,Str "of",Space,Str "mudcracked",Space,Str "houses"]],Div ("",["linegroup"],[]) [Div ("",["indent2"],[]) [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "water"]],Div ("",[],[]) [Plain [Str "And",Space,Str "no",Space,Str "rock"]],Div ("",[],[]) [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "rock"]],Div ("",[],[]) [Plain [Str "And",Space,Str "also",Space,Str "water"]],Div ("",[],[]) [Plain [Str "And",Space,Str "water",Span ("",["lnum"],[]) [Str "350"]]],Div ("",[],[]) [Plain [Str "A",Space,Str "spring"]],Div ("",[],[]) [Plain [Str "A",Space,Str "pool",Space,Str "among",Space,Str "the",Space,Str "rock"]],Div ("",[],[]) [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "the",Space,Str "sound",Space,Str "of",Space,Str "water",Space,Str "only"]],Div ("",[],[]) [Plain [Str "Not",Space,Str "the",Space,Str "cicada"]],Div ("",[],[]) [Plain [Str "And",Space,Str "dry",Space,Str "grass",Space,Str "singing"]],Div ("",[],[]) [Plain [Str "But",Space,Str "sound",Space,Str "of",Space,Str "water",Space,Str "over",Space,Str "a",Space,Str "rock"]],Div ("wasteland-content.xhtml#ln357",[],[]) [Plain [Str "Where",Space,Str "the",Space,Str "hermit-thrush",Space,Str "sings",Space,Str "in",Space,Str "the",Space,Str "pine",Space,Str "trees",Note [Para [Link ("",[],[]) [Str "357."] ("#wasteland-content.xhtml#ln357",""),Space,Str "This",Space,Str "is",Space,Str "Turdus",Space,Str "aonalaschkae",Space,Str "pallasii,",Space,Str "the",Space,Str "hermit-thrush",Space,Str "which",Space,Str "I",Space,Str "have",Space,Str "heard",Space,Str "in",Space,Str "Quebec",Space,Str "County.",Space,Str "Chapman",Space,Str "says",Space,Str "(Handbook",Space,Str "of",Space,Str "Birds",Space,Str "of",Space,Str "Eastern",Space,Str "North",Space,Str "America)",Space,Str "\"it",Space,Str "is",Space,Str "most",Space,Str "at",Space,Str "home",Space,Str "in",Space,Str "secluded",Space,Str "woodland",Space,Str "and",Space,Str "thickety",Space,Str "retreats.",Space,Str ".",Space,Str ".",Space,Str ".",Space,Str "Its",Space,Str "notes",Space,Str "are",Space,Str "not",Space,Str "remarkable",Space,Str "for",Space,Str "variety",Space,Str "or",Space,Str "volume,",Space,Str "but",Space,Str "in",Space,Str "purity",Space,Str "and",Space,Str "sweetness",Space,Str "of",Space,Str "tone",Space,Str "and",Space,Str "exquisite",Space,Str "modulation",Space,Str "they",Space,Str "are",Space,Str "unequalled.\"",Space,Str "Its",Space,Str "\"water-dripping",Space,Str "song\"",Space,Str "is",Space,Str "justly",Space,Str "celebrated."]]],Div ("",[],[]) [Plain [Str "Drip",Space,Str "drop",Space,Str "drip",Space,Str "drop",Space,Str "drop",Space,Str "drop",Space,Str "drop"]],Div ("",[],[]) [Plain [Str "But",Space,Str "there",Space,Str "is",Space,Str "no",Space,Str "water"]]]],Div ("",["linegroup"],[]) [Div ("wasteland-content.xhtml#ln360",[],[]) [Plain [Str "Who",Space,Str "is",Space,Str "the",Space,Str "third",Space,Str "who",Space,Str "walks",Space,Str "always",Space,Str "beside",Space,Str "you?",Note [Para [Link ("",[],[]) [Str "360."] ("#wasteland-content.xhtml#ln360",""),Space,Str "The",Space,Str "following",Space,Str "lines",Space,Str "were",Space,Str "stimulated",Space,Str "by",Space,Str "the",Space,Str "account",Space,Str "of",Space,Str "one",Space,Str "of",Space,Str "the",Space,Str "Antarctic",Space,Str "expeditions",Space,Str "(I",Space,Str "forget",Space,Str "which,",Space,Str "but",Space,Str "I",Space,Str "think",Space,Str "one",Space,Str "of",Space,Str "Shackleton's):",Space,Str "it",Space,Str "was",Space,Str "related",Space,Str "that",Space,Str "the",Space,Str "party",Space,Str "of",Space,Str "explorers,",Space,Str "at",Space,Str "the",Space,Str "extremity",Space,Str "of",Space,Str "their",Space,Str "strength,",Space,Str "had",Space,Str "the",Space,Str "constant",Space,Str "delusion",Space,Str "that",Space,Str "there",Space,Str "was",Space,Str "one",Space,Str "more",Space,Str "member",Space,Str "than",Space,Str "could",Space,Str "actually",Space,Str "be",Space,Str "counted."]]],Div ("",[],[]) [Plain [Str "When",Space,Str "I",Space,Str "count,",Space,Str "there",Space,Str "are",Space,Str "only",Space,Str "you",Space,Str "and",Space,Str "I",Space,Str "together"]],Div ("",[],[]) [Plain [Str "But",Space,Str "when",Space,Str "I",Space,Str "look",Space,Str "ahead",Space,Str "up",Space,Str "the",Space,Str "white",Space,Str "road"]],Div ("",[],[]) [Plain [Str "There",Space,Str "is",Space,Str "always",Space,Str "another",Space,Str "one",Space,Str "walking",Space,Str "beside",Space,Str "you"]],Div ("",[],[]) [Plain [Str "Gliding",Space,Str "wrapt",Space,Str "in",Space,Str "a",Space,Str "brown",Space,Str "mantle,",Space,Str "hooded"]],Div ("",[],[]) [Plain [Str "I",Space,Str "do",Space,Str "not",Space,Str "know",Space,Str "whether",Space,Str "a",Space,Str "man",Space,Str "or",Space,Str "a",Space,Str "woman"]],Div ("wasteland-content.xhtml#ln367",[],[]) [Plain [Str "\8213But",Space,Str "who",Space,Str "is",Space,Str "that",Space,Str "on",Space,Str "the",Space,Str "other",Space,Str "side",Space,Str "of",Space,Str "you?",Note [Para [Link ("",[],[]) [Str "367-77."] ("#wasteland-content.xhtml#ln367",""),Space,Str "Cf.",Space,Str "Hermann",Space,Str "Hesse,",Space,Str "Blick",Space,Str "ins",Space,Str "Chaos:"],BlockQuote [Para [Str "\"Schon",Space,Str "ist",Space,Str "halb",Space,Str "Europa,",Space,Str "schon",Space,Str "ist",Space,Str "zumindest",Space,Str "der",Space,Str "halbe",Space,Str "Osten",Space,Str "Europas",Space,Str "auf",Space,Str "dem",LineBreak,Space,Str "Wege",Space,Str "zum",Space,Str "Chaos,",Space,Str "fhrt",Space,Str "betrunken",Space,Str "im",Space,Str "heiligem",Space,Str "Wahn",Space,Str "am",Space,Str "Abgrund",Space,Str "entlang",LineBreak,Space,Str "und",Space,Str "singt",Space,Str "dazu,",Space,Str "singt",Space,Str "betrunken",Space,Str "und",Space,Str "hymnisch",Space,Str "wie",Space,Str "Dmitri",Space,Str "Karamasoff",Space,Str "sang.",LineBreak,Space,Str "Ueber",Space,Str "diese",Space,Str "Lieder",Space,Str "lacht",Space,Str "der",Space,Str "Bsrger",Space,Str "beleidigt,",Space,Str "der",Space,Str "Heilige",LineBreak,Space,Str "und",Space,Str "Seher",Space,Str "hrt",Space,Str "sie",Space,Str "mit",Space,Str "Trvnen.\""]]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "What",Space,Str "is",Space,Str "that",Space,Str "sound",Space,Str "high",Space,Str "in",Space,Str "the",Space,Str "air"]],Div ("",[],[]) [Plain [Str "Murmur",Space,Str "of",Space,Str "maternal",Space,Str "lamentation"]],Div ("",[],[]) [Plain [Str "Who",Space,Str "are",Space,Str "those",Space,Str "hooded",Space,Str "hordes",Space,Str "swarming"]],Div ("",[],[]) [Plain [Str "Over",Space,Str "endless",Space,Str "plains,",Space,Str "stumbling",Space,Str "in",Space,Str "cracked",Space,Str "earth",Span ("",["lnum"],[]) [Str "370"]]],Div ("",[],[]) [Plain [Str "Ringed",Space,Str "by",Space,Str "the",Space,Str "flat",Space,Str "horizon",Space,Str "only"]],Div ("",[],[]) [Plain [Str "What",Space,Str "is",Space,Str "the",Space,Str "city",Space,Str "over",Space,Str "the",Space,Str "mountains"]],Div ("",[],[]) [Plain [Str "Cracks",Space,Str "and",Space,Str "reforms",Space,Str "and",Space,Str "bursts",Space,Str "in",Space,Str "the",Space,Str "violet",Space,Str "air"]],Div ("",[],[]) [Plain [Str "Falling",Space,Str "towers"]],Div ("",[],[]) [Plain [Str "Jerusalem",Space,Str "Athens",Space,Str "Alexandria"]],Div ("",[],[]) [Plain [Str "Vienna",Space,Str "London"]],Div ("",[],[]) [Plain [Str "Unreal"]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "A",Space,Str "woman",Space,Str "drew",Space,Str "her",Space,Str "long",Space,Str "black",Space,Str "hair",Space,Str "out",Space,Str "tight"]],Div ("",[],[]) [Plain [Str "And",Space,Str "fiddled",Space,Str "whisper",Space,Str "music",Space,Str "on",Space,Str "those",Space,Str "strings"]],Div ("",[],[]) [Plain [Str "And",Space,Str "bats",Space,Str "with",Space,Str "baby",Space,Str "faces",Space,Str "in",Space,Str "the",Space,Str "violet",Space,Str "light",Span ("",["lnum"],[]) [Str "380"]]],Div ("",[],[]) [Plain [Str "Whistled,",Space,Str "and",Space,Str "beat",Space,Str "their",Space,Str "wings"]],Div ("",[],[]) [Plain [Str "And",Space,Str "crawled",Space,Str "head",Space,Str "downward",Space,Str "down",Space,Str "a",Space,Str "blackened",Space,Str "wall"]],Div ("",[],[]) [Plain [Str "And",Space,Str "upside",Space,Str "down",Space,Str "in",Space,Str "air",Space,Str "were",Space,Str "towers"]],Div ("",[],[]) [Plain [Str "Tolling",Space,Str "reminiscent",Space,Str "bells,",Space,Str "that",Space,Str "kept",Space,Str "the",Space,Str "hours"]],Div ("",[],[]) [Plain [Str "And",Space,Str "voices",Space,Str "singing",Space,Str "out",Space,Str "of",Space,Str "empty",Space,Str "cisterns",Space,Str "and",Space,Str "exhausted",Space,Str "wells."]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "In",Space,Str "this",Space,Str "decayed",Space,Str "hole",Space,Str "among",Space,Str "the",Space,Str "mountains"]],Div ("",[],[]) [Plain [Str "In",Space,Str "the",Space,Str "faint",Space,Str "moonlight,",Space,Str "the",Space,Str "grass",Space,Str "is",Space,Str "singing"]],Div ("",[],[]) [Plain [Str "Over",Space,Str "the",Space,Str "tumbled",Space,Str "graves,",Space,Str "about",Space,Str "the",Space,Str "chapel"]],Div ("",[],[]) [Plain [Str "There",Space,Str "is",Space,Str "the",Space,Str "empty",Space,Str "chapel,",Space,Str "only",Space,Str "the",Space,Str "wind's",Space,Str "home."]],Div ("",[],[]) [Plain [Str "It",Space,Str "has",Space,Str "no",Space,Str "windows,",Space,Str "and",Space,Str "the",Space,Str "door",Space,Str "swings,",Span ("",["lnum"],[]) [Str "390"]]],Div ("",[],[]) [Plain [Str "Dry",Space,Str "bones",Space,Str "can",Space,Str "harm",Space,Str "no",Space,Str "one."]],Div ("",[],[]) [Plain [Str "Only",Space,Str "a",Space,Str "cock",Space,Str "stood",Space,Str "on",Space,Str "the",Space,Str "rooftree"]],Div ("",[],[]) [Plain [Str "Co",Space,Str "co",Space,Str "rico",Space,Str "co",Space,Str "co",Space,Str "rico"]],Div ("",[],[]) [Plain [Str "In",Space,Str "a",Space,Str "flash",Space,Str "of",Space,Str "lightning.",Space,Str "Then",Space,Str "a",Space,Str "damp",Space,Str "gust"]],Div ("",[],[]) [Plain [Str "Bringing",Space,Str "rain"]]],Div ("",["linegroup"],[]) [Div ("",[],[]) [Plain [Str "Ganga",Space,Str "was",Space,Str "sunken,",Space,Str "and",Space,Str "the",Space,Str "limp",Space,Str "leaves"]],Div ("",[],[]) [Plain [Str "Waited",Space,Str "for",Space,Str "rain,",Space,Str "while",Space,Str "the",Space,Str "black",Space,Str "clouds"]],Div ("",[],[]) [Plain [Str "Gathered",Space,Str "far",Space,Str "distant,",Space,Str "over",Space,Str "Himavant."]],Div ("",[],[]) [Plain [Str "The",Space,Str "jungle",Space,Str "crouched,",Space,Str "humped",Space,Str "in",Space,Str "silence."]],Div ("",[],[]) [Plain [Str "Then",Space,Str "spoke",Space,Str "the",Space,Str "thunder",Span ("",["lnum"],[]) [Str "400"]]],Div ("",[],[]) [Plain [Str "DA"]],Div ("wasteland-content.xhtml#ln402",[],[]) [Plain [Span ("",[],[("lang","sa")]) [Str "Datta"],Str ":",Space,Str "what",Space,Str "have",Space,Str "we",Space,Str "given?",Note [Para [Link ("",[],[]) [Str "402."] ("#wasteland-content.xhtml#ln402",""),Space,Quoted DoubleQuote [Str "\"Datta,",Space,Str "dayadhvam,",Space,Str "damyata\""],Space,Str "(Give,",Space,Str "sympathize,",Space,Str "control).",Space,Str "The",Space,Str "fable",Space,Str "of",Space,Str "the",Space,Str "meaning",Space,Str "of",Space,Str "the",Space,Str "Thunder",Space,Str "is",Space,Str "found",Space,Str "in",Space,Str "the",Space,Str "Brihadaranyaka-Upanishad,",Space,Str "5,",Space,Str "1.",Space,Str "A",Space,Str "translation",Space,Str "is",Space,Str "found",Space,Str "in",Space,Str "Deussen's",Space,Str "Sechzig",Space,Str "Upanishads",Space,Str "des",Space,Str "Veda,",Space,Str "p.",Space,Str "489."]]],Div ("",[],[]) [Plain [Str "My",Space,Str "friend,",Space,Str "blood",Space,Str "shaking",Space,Str "my",Space,Str "heart"]],Div ("",[],[]) [Plain [Str "The",Space,Str "awful",Space,Str "daring",Space,Str "of",Space,Str "a",Space,Str "moment's",Space,Str "surrender"]],Div ("",[],[]) [Plain [Str "Which",Space,Str "an",Space,Str "age",Space,Str "of",Space,Str "prudence",Space,Str "can",Space,Str "never",Space,Str "retract"]],Div ("",[],[]) [Plain [Str "By",Space,Str "this,",Space,Str "and",Space,Str "this",Space,Str "only,",Space,Str "we",Space,Str "have",Space,Str "existed"]],Div ("",[],[]) [Plain [Str "Which",Space,Str "is",Space,Str "not",Space,Str "to",Space,Str "be",Space,Str "found",Space,Str "in",Space,Str "our",Space,Str "obituaries"]],Div ("wasteland-content.xhtml#ln408",[],[]) [Plain [Str "Or",Space,Str "in",Space,Str "memories",Space,Str "draped",Space,Str "by",Space,Str "the",Space,Str "beneficent",Space,Str "spider",Note [Para [Link ("",[],[]) [Str "408."] ("#wasteland-content.xhtml#ln408",""),Space,Str "Cf.",Space,Str "Webster,",Space,Str "The",Space,Str "White",Space,Str "Devil,",Space,Str "v.",Space,Str "vi:"],BlockQuote [Para [Str "\".",Space,Str ".",Space,Str ".",Space,Str "they'll",Space,Str "remarry",LineBreak,Space,Str "Ere",Space,Str "the",Space,Str "worm",Space,Str "pierce",Space,Str "your",Space,Str "winding-sheet,",Space,Str "ere",Space,Str "the",Space,Str "spider",LineBreak,Space,Str "Make",Space,Str "a",Space,Str "thin",Space,Str "curtain",Space,Str "for",Space,Str "your",Space,Str "epitaphs.\""]]]],Div ("",[],[]) [Plain [Str "Or",Space,Str "under",Space,Str "seals",Space,Str "broken",Space,Str "by",Space,Str "the",Space,Str "lean",Space,Str "solicitor"]],Div ("",[],[]) [Plain [Str "In",Space,Str "our",Space,Str "empty",Space,Str "rooms",Span ("",["lnum"],[]) [Str "410"]]],Div ("",[],[]) [Plain [Str "DA"]],Div ("wasteland-content.xhtml#ln412",[],[]) [Plain [Span ("",[],[("lang","sa")]) [Str "Dayadhvam"],Str ":",Space,Str "I",Space,Str "have",Space,Str "heard",Space,Str "the",Space,Str "key",Note [Para [Link ("",[],[]) [Str "412."] ("#wasteland-content.xhtml#ln412",""),Space,Str "Cf.",Space,Str "Inferno,",Space,Str "xxxiii.",Space,Str "46:"],BlockQuote [Para [Str "\"ed",Space,Str "io",Space,Str "sentii",Space,Str "chiavar",Space,Str "l'uscio",Space,Str "di",Space,Str "sotto",LineBreak,Space,Str "all'orribile",Space,Str "torre.\""]],Para [Str "Also",Space,Str "F.",Space,Str "H.",Space,Str "Bradley,",Space,Str "Appearance",Space,Str "and",Space,Str "Reality,",Space,Str "p.",Space,Str "346:"],BlockQuote [Para [Str "\"My",Space,Str "external",Space,Str "sensations",Space,Str "are",Space,Str "no",Space,Str "less",Space,Str "private",Space,Str "to",Space,Str "myself",Space,Str "than",Space,Str "are",Space,Str "my",Space,Str "thoughts",Space,Str "or",Space,Str "my",Space,Str "feelings.",Space,Str "In",Space,Str "either",Space,Str "case",Space,Str "my",Space,Str "experience",Space,Str "falls",Space,Str "within",Space,Str "my",Space,Str "own",Space,Str "circle,",Space,Str "a",Space,Str "circle",Space,Str "closed",Space,Str "on",Space,Str "the",Space,Str "outside;",Space,Str "and,",Space,Str "with",Space,Str "all",Space,Str "its",Space,Str "elements",Space,Str "alike,",Space,Str "every",Space,Str "sphere",Space,Str "is",Space,Str "opaque",Space,Str "to",Space,Str "the",Space,Str "others",Space,Str "which",Space,Str "surround",Space,Str "it.",Space,Str ".",Space,Str ".",Space,Str ".",Space,Str "In",Space,Str "brief,",Space,Str "regarded",Space,Str "as",Space,Str "an",Space,Str "existence",Space,Str "which",Space,Str "appears",Space,Str "in",Space,Str "a",Space,Str "soul,",Space,Str "the",Space,Str "whole",Space,Str "world",Space,Str "for",Space,Str "each",Space,Str "is",Space,Str "peculiar",Space,Str "and",Space,Str "private",Space,Str "to",Space,Str "that",Space,Str "soul.\""]]]],Div ("",[],[]) [Plain [Str "Turn",Space,Str "in",Space,Str "the",Space,Str "door",Space,Str "once",Space,Str "and",Space,Str "turn",Space,Str "once",Space,Str "only"]],Div ("",[],[]) [Plain [Str "We",Space,Str "think",Space,Str "of",Space,Str "the",Space,Str "key,",Space,Str "each",Space,Str "in",Space,Str "his",Space,Str "prison"]],Div ("",[],[]) [Plain [Str "Thinking",Space,Str "of",Space,Str "the",Space,Str "key,",Space,Str "each",Space,Str "confirms",Space,Str "a",Space,Str "prison"]],Div ("",[],[]) [Plain [Str "Only",Space,Str "at",Space,Str "nightfall,",Space,Str "aetherial",Space,Str "rumours"]],Div ("",[],[]) [Plain [Str "Revive",Space,Str "for",Space,Str "a",Space,Str "moment",Space,Str "a",Space,Str "broken",Space,Str "Coriolanus"]],Div ("",[],[]) [Plain [Str "DA"]],Div ("",[],[]) [Plain [Span ("",[],[("lang","sa")]) [Str "Damyata"],Str ":",Space,Str "The",Space,Str "boat",Space,Str "responded"]],Div ("",[],[]) [Plain [Str "Gaily,",Space,Str "to",Space,Str "the",Space,Str "hand",Space,Str "expert",Space,Str "with",Space,Str "sail",Space,Str "and",Space,Str "oar",Span ("",["lnum"],[]) [Str "420"]]],Div ("",[],[]) [Plain [Str "The",Space,Str "sea",Space,Str "was",Space,Str "calm,",Space,Str "your",Space,Str "heart",Space,Str "would",Space,Str "have",Space,Str "responded"]],Div ("",[],[]) [Plain [Str "Gaily,",Space,Str "when",Space,Str "invited,",Space,Str "beating",Space,Str "obedient"]],Div ("",[],[]) [Plain [Str "To",Space,Str "controlling",Space,Str "hands"]]],Div ("",["linegroup"],[]) [Div ("",["indent"],[]) [Plain [Str "I",Space,Str "sat",Space,Str "upon",Space,Str "the",Space,Str "shore"]],Div ("wasteland-content.xhtml#ln425",[],[]) [Plain [Str "Fishing,",Space,Str "with",Space,Str "the",Space,Str "arid",Space,Str "plain",Space,Str "behind",Space,Str "me",Note [Para [Link ("",[],[]) [Str "425."] ("#wasteland-content.xhtml#ln425",""),Space,Str "V.",Space,Str "Weston,",Space,Str "From",Space,Str "Ritual",Space,Str "to",Space,Str "Romance;",Space,Str "chapter",Space,Str "on",Space,Str "the",Space,Str "Fisher",Space,Str "King."]]],Div ("",[],[]) [Plain [Str "Shall",Space,Str "I",Space,Str "at",Space,Str "least",Space,Str "set",Space,Str "my",Space,Str "lands",Space,Str "in",Space,Str "order?"]],Div ("",[],[]) [Plain [Str "London",Space,Str "Bridge",Space,Str "is",Space,Str "falling",Space,Str "down",Space,Str "falling",Space,Str "down",Space,Str "falling",Space,Str "down"]],Div ("wasteland-content.xhtml#ln428",[],[("lang","it")]) [Plain [Emph [Str "Poi",Space,Str "s'ascose",Space,Str "nel",Space,Str "foco",Space,Str "che",Space,Str "gli",Space,Str "affina"],Space,Note [Para [Link ("",[],[]) [Str "428."] ("#wasteland-content.xhtml#ln428",""),Space,Str "V.",Space,Str "Purgatorio,",Space,Str "xxvi.",Space,Str "148."],BlockQuote [Para [Str "\"'Ara",Space,Str "vos",Space,Str "prec",Space,Str "per",Space,Str "aquella",Space,Str "valor",LineBreak,Space,Str "'que",Space,Str "vos",Space,Str "guida",Space,Str "al",Space,Str "som",Space,Str "de",Space,Str "l'escalina,",LineBreak,Space,Str "'sovegna",Space,Str "vos",Space,Str "a",Space,Str "temps",Space,Str "de",Space,Str "ma",Space,Str "dolor.'",LineBreak,Space,Str "Poi",Space,Str "s'ascose",Space,Str "nel",Space,Str "foco",Space,Str "che",Space,Str "gli",Space,Str "affina.\""]]]],Div ("wasteland-content.xhtml#ln429",[],[]) [Plain [Span ("",[],[("lang","it")]) [Space,Emph [Str "Quando",Space,Str "fiam",Space,Str "ceu",Space,Str "chelidon"],Space],Space,Str "-",Space,Str "O",Space,Str "swallow",Space,Str "swallow",Note [Para [Link ("",[],[]) [Str "429."] ("#wasteland-content.xhtml#ln429",""),Space,Str "V.",Space,Str "Pervigilium",Space,Str "Veneris.",Space,Str "Cf.",Space,Str "Philomela",Space,Str "in",Space,Str "Parts",Space,Str "II",Space,Str "and",Space,Str "III."]]],Div ("wasteland-content.xhtml#ln430",[],[("lang","fr")]) [Plain [Emph [Str "Le",Space,Str "Prince",Space,Str "d'Aquitaine",Space,Str "a",Space,Str "la",Space,Str "tour",Space,Str "abolie"],Space,Note [Para [Link ("",[],[]) [Str "430."] ("#wasteland-content.xhtml#ln430",""),Space,Str "V.",Space,Str "Gerard",Space,Str "de",Space,Str "Nerval,",Space,Str "Sonnet",Space,Str "El",Space,Str "Desdichado."]]],Div ("",[],[]) [Plain [Str "These",Space,Str "fragments",Space,Str "I",Space,Str "have",Space,Str "shored",Space,Str "against",Space,Str "my",Space,Str "ruins"]],Div ("wasteland-content.xhtml#ln432",[],[]) [Plain [Str "Why",Space,Str "then",Space,Str "Ile",Space,Str "fit",Space,Str "you.",Space,Str "Hieronymo's",Space,Str "mad",Space,Str "againe.",Note [Para [Link ("",[],[]) [Str "432."] ("#wasteland-content.xhtml#ln432",""),Space,Str "V.",Space,Str "Kyd's",Space,Str "Spanish",Space,Str "Tragedy."]]],Div ("",[],[("lang","sa")]) [Plain [Str "Datta.",Space,Str "Dayadhvam.",Space,Str "Damyata."]],Div ("wasteland-content.xhtml#ln434",["linegroup","indent"],[]) [Plain [Span ("",[],[("lang","sa")]) [Str "Shantih",Space,Str "shantih",Space,Str "shantih",Note [Para [Link ("",[],[]) [Str "434."] ("#wasteland-content.xhtml#ln434",""),Space,Str "Shantih.",Space,Str "Repeated",Space,Str "as",Space,Str "here,",Space,Str "a",Space,Str "formal",Space,Str "ending",Space,Str "to",Space,Str "an",Space,Str "Upanishad.",Space,Str "'The",Space,Str "Peace",Space,Str "which",Space,Str "passeth",Space,Str "understanding'",Space,Str "is",Space,Str "a",Space,Str "feeble",Space,Str "translation",Space,Str "of",Space,Str "the",Space,Str "content",Space,Str "of",Space,Str "this",Space,Str "word."]]]],RawBlock (Format "html") "<section type=\"backmatter\" id=\"backmatter\">",RawBlock (Format "html") "<section type=\"rearnotes\" id=\"rearnotes\">",Header 2 ("",[],[]) [Str "NOTES",Space,Str "ON",Space,Str "\"THE",Space,Str "WASTE",Space,Str "LAND\""],Para [Str "Not",Space,Str "only",Space,Str "the",Space,Str "title,",Space,Str "but",Space,Str "the",Space,Str "plan",Space,Str "and",Space,Str "a",Space,Str "good",Space,Str "deal",Space,Str "of",Space,Str "the",Space,Str "incidental",Space,Str "symbolism",Space,Str "of",Space,Str "the",Space,Str "poem",Space,Str "were",Space,Str "suggested",Space,Str "by",Space,Str "Miss",Space,Str "Jessie",Space,Str "L.",Space,Str "Weston's",Space,Str "book",Space,Str "on",Space,Str "the",Space,Str "Grail",Space,Str "legend:",Space,Str "From",Space,Str "Ritual",Space,Str "to",Space,Str "Romance"],Para [Str "Indeed,",Space,Str "so",Space,Str "deeply",Space,Str "am",Space,Str "I",Space,Str "indebted,",Space,Str "Miss",Space,Str "Weston's",Space,Str "book",Space,Str "will",Space,Str "elucidate",Space,Str "the",Space,Str "difficulties",Space,Str "of",Space,Str "the",Space,Str "poem",Space,Str "much",Space,Str "better",Space,Str "than",Space,Str "my",Space,Str "notes",Space,Str "can",Space,Str "do;",Space,Str "and",Space,Str "I",Space,Str "recommend",Space,Str "it",Space,Str "(apart",Space,Str "from",Space,Str "the",Space,Str "great",Space,Str "interest",Space,Str "of",Space,Str "the",Space,Str "book",Space,Str "itself)",Space,Str "to",Space,Str "any",Space,Str "who",Space,Str "think",Space,Str "such",Space,Str "elucidation",Space,Str "of",Space,Str "the",Space,Str "poem",Space,Str "worth",Space,Str "the",Space,Str "trouble.",Space,Str "To",Space,Str "another",Space,Str "work",Space,Str "of",Space,Str "anthropology",Space,Str "I",Space,Str "am",Space,Str "indebted",Space,Str "in",Space,Str "general,",Space,Str "one",Space,Str "which",Space,Str "has",Space,Str "influenced",Space,Str "our",Space,Str "generation",Space,Str "profoundly;",Space,Str "I",Space,Str "mean",Space,Str "The",Space,Str "Golden",Space,Str "Bough;",Space,Str "I",Space,Str "have",Space,Str "used",Space,Str "especially",Space,Str "the",Space,Str "two",Space,Str "volumes",Space,Str "Adonis,",Space,Str "Attis,",Space,Str "Osiris.",Space,Str "Anyone",Space,Str "who",Space,Str "is",Space,Str "acquainted",Space,Str "with",Space,Str "these",Space,Str "works",Space,Str "will",Space,Str "immediately",Space,Str "recognise",Space,Str "in",Space,Str "the",Space,Str "poem",Space,Str "certain",Space,Str "references",Space,Str "to",Space,Str "vegetation",Space,Str "ceremonies."],RawBlock (Format "html") "<section>",Header 3 ("",[],[]) [Str "I.",Space,Str "THE",Space,Str "BURIAL",Space,Str "OF",Space,Str "THE",Space,Str "DEAD"],RawBlock (Format "html") "</section>",RawBlock (Format "html") "<section>",Header 3 ("",[],[]) [Str "II.",Space,Str "A",Space,Str "GAME",Space,Str "OF",Space,Str "CHESS"],RawBlock (Format "html") "</section>",RawBlock (Format "html") "<section>",Header 3 ("",[],[]) [Str "III.",Space,Str "THE",Space,Str "FIRE",Space,Str "SERMON"],RawBlock (Format "html") "</section>",RawBlock (Format "html") "<section>",Header 3 ("",[],[]) [Str "V.",Space,Str "WHAT",Space,Str "THE",Space,Str "THUNDER",Space,Str "SAID"],Para [Str "In",Space,Str "the",Space,Str "first",Space,Str "part",Space,Str "of",Space,Str "Part",Space,Str "V",Space,Str "three",Space,Str "themes",Space,Str "are",Space,Str "employed:",Space,Str "the",Space,Str "journey",Space,Str "to",Space,Str "Emmaus,",Space,Str "the",Space,Str "approach",Space,Str "to",Space,Str "the",Space,Str "Chapel",Space,Str "Perilous",Space,Str "(see",Space,Str "Miss",Space,Str "Weston's",Space,Str "book)",Space,Str "and",Space,Str "the",Space,Str "present",Space,Str "decay",Space,Str "of",Space,Str "eastern",Space,Str "Europe."],RawBlock (Format "html") "</section>",RawBlock (Format "html") "</section>",RawBlock (Format "html") "</section>"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] +,Div ("wasteland-content.xhtml#frontmatter",["section"],[("type","frontmatter")]) + [] +,Div ("wasteland-content.xhtml#bodymatter",["section"],[("type","bodymatter")]) + [Div ("wasteland-content.xhtml#ch1",["section"],[]) + [Header 2 ("",[],[]) [Str "I.",Space,Str "THE",Space,Str "BURIAL",Space,Str "OF",Space,Str "THE",Space,Str "DEAD"] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "April",Space,Str "is",Space,Str "the",Space,Str "cruellest",Space,Str "month,",Space,Str "breeding"]] + ,Div ("",[],[]) + [Plain [Str "Lilacs",Space,Str "out",Space,Str "of",Space,Str "the",Space,Str "dead",Space,Str "land,",Space,Str "mixing"]] + ,Div ("",[],[]) + [Plain [Str "Memory",Space,Str "and",Space,Str "desire,",Space,Str "stirring"]] + ,Div ("",[],[]) + [Plain [Str "Dull",Space,Str "roots",Space,Str "with",Space,Str "spring",Space,Str "rain."]] + ,Div ("",[],[]) + [Plain [Str "Winter",Space,Str "kept",Space,Str "us",Space,Str "warm,",Space,Str "covering"]] + ,Div ("",[],[]) + [Plain [Str "Earth",Space,Str "in",Space,Str "forgetful",Space,Str "snow,",Space,Str "feeding"]] + ,Div ("",[],[]) + [Plain [Str "A",Space,Str "little",Space,Str "life",Space,Str "with",Space,Str "dried",Space,Str "tubers."]] + ,Div ("",[],[]) + [Plain [Str "Summer",Space,Str "surprised",Space,Str "us,",Space,Str "coming",Space,Str "over",Space,Str "the",Space,Str "Starnbergersee"]] + ,Div ("",[],[]) + [Plain [Str "With",Space,Str "a",Space,Str "shower",Space,Str "of",Space,Str "rain;",Space,Str "we",Space,Str "stopped",Space,Str "in",Space,Str "the",Space,Str "colonnade,"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "went",Space,Str "on",Space,Str "in",Space,Str "sunlight,",Space,Str "into",Space,Str "the",Space,Str "Hofgarten,",Span ("",["lnum"],[]) [Str "10"]]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "drank",Space,Str "coffee,",Space,Str "and",Space,Str "talked",Space,Str "for",Space,Str "an",Space,Str "hour."]] + ,Div ("",[],[("lang","de")]) + [Plain [Str "Bin",Space,Str "gar",Space,Str "keine",Space,Str "Russin,",Space,Str "stamm'",Space,Str "aus",Space,Str "Litauen,",Space,Str "echt",Space,Str "deutsch."]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "when",Space,Str "we",Space,Str "were",Space,Str "children,",Space,Str "staying",Space,Str "at",Space,Str "the",Space,Str "archduke's,"]] + ,Div ("",[],[]) + [Plain [Str "My",Space,Str "cousin's,",Space,Str "he",Space,Str "took",Space,Str "me",Space,Str "out",Space,Str "on",Space,Str "a",Space,Str "sled,"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "I",Space,Str "was",Space,Str "frightened.",Space,Str "He",Space,Str "said,",Space,Str "Marie,"]] + ,Div ("",[],[]) + [Plain [Str "Marie,",Space,Str "hold",Space,Str "on",Space,Str "tight.",Space,Str "And",Space,Str "down",Space,Str "we",Space,Str "went."]] + ,Div ("",[],[]) + [Plain [Str "In",Space,Str "the",Space,Str "mountains,",Space,Str "there",Space,Str "you",Space,Str "feel",Space,Str "free."]] + ,Div ("",[],[]) + [Plain [Str "I",Space,Str "read,",Space,Str "much",Space,Str "of",Space,Str "the",Space,Str "night,",Space,Str "and",Space,Str "go",Space,Str "south",Space,Str "in",Space,Str "the",Space,Str "winter."]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "What",Space,Str "are",Space,Str "the",Space,Str "roots",Space,Str "that",Space,Str "clutch,",Space,Str "what",Space,Str "branches",Space,Str "grow"]] + ,Div ("wasteland-content.xhtml#ln20",[],[]) + [Plain [Str "Out",Space,Str "of",Space,Str "this",Space,Str "stony",Space,Str "rubbish?",Space,Str "Son",Space,Str "of",Space,Str "man,",Note [Para [Link ("",[],[]) [Str "Line",Space,Str "20."] ("#wasteland-content.xhtml#ln20",""),Space,Str "Cf.",Space,Str "Ezekiel",Space,Str "2:1."]]] + ,Div ("",[],[]) + [Plain [Str "You",Space,Str "cannot",Space,Str "say,",Space,Str "or",Space,Str "guess,",Space,Str "for",Space,Str "you",Space,Str "know",Space,Str "only"]] + ,Div ("",[],[]) + [Plain [Str "A",Space,Str "heap",Space,Str "of",Space,Str "broken",Space,Str "images,",Space,Str "where",Space,Str "the",Space,Str "sun",Space,Str "beats,"]] + ,Div ("wasteland-content.xhtml#ln23",[],[]) + [Plain [Str "And",Space,Str "the",Space,Str "dead",Space,Str "tree",Space,Str "gives",Space,Str "no",Space,Str "shelter,",Space,Str "the",Space,Str "cricket",Space,Str "no",Space,Str "relief,",Note [Para [Link ("",[],[]) [Str "23."] ("#wasteland-content.xhtml#ln23",""),Space,Str "Cf.",Space,Str "Ecclesiastes",Space,Str "12:5."]]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "the",Space,Str "dry",Space,Str "stone",Space,Str "no",Space,Str "sound",Space,Str "of",Space,Str "water.",Space,Str "Only"]] + ,Div ("",[],[]) + [Plain [Str "There",Space,Str "is",Space,Str "shadow",Space,Str "under",Space,Str "this",Space,Str "red",Space,Str "rock,"]] + ,Div ("",[],[]) + [Plain [Str "(Come",Space,Str "in",Space,Str "under",Space,Str "the",Space,Str "shadow",Space,Str "of",Space,Str "this",Space,Str "red",Space,Str "rock),"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "I",Space,Str "will",Space,Str "show",Space,Str "you",Space,Str "something",Space,Str "different",Space,Str "from",Space,Str "either"]] + ,Div ("",[],[]) + [Plain [Str "Your",Space,Str "shadow",Space,Str "at",Space,Str "morning",Space,Str "striding",Space,Str "behind",Space,Str "you"]] + ,Div ("",[],[]) + [Plain [Str "Or",Space,Str "your",Space,Str "shadow",Space,Str "at",Space,Str "evening",Space,Str "rising",Space,Str "to",Space,Str "meet",Space,Str "you;"]] + ,Div ("",[],[]) + [Plain [Str "I",Space,Str "will",Space,Str "show",Space,Str "you",Space,Str "fear",Space,Str "in",Space,Str "a",Space,Str "handful",Space,Str "of",Space,Str "dust.",Span ("",["lnum"],[]) [Str "30"]]] + ,BlockQuote + [Div ("",[],[]) + [Div ("wasteland-content.xhtml#ln31",[],[]) + [Plain [Str "Frisch",Space,Str "weht",Space,Str "der",Space,Str "Wind",Note [Para [Link ("",[],[]) [Str "31."] ("#wasteland-content.xhtml#ln31",""),Space,Str "V.",Space,Str "Tristan",Space,Str "und",Space,Str "Isolde,",Space,Str "i,",Space,Str "verses",Space,Str "5-8."]]] + ,Div ("",[],[]) + [Plain [Str "Der",Space,Str "Heimat",Space,Str "zu"]] + ,Div ("",[],[]) + [Plain [Str "Mein",Space,Str "Irisch",Space,Str "Kind,"]] + ,Div ("",[],[]) + [Plain [Str "Wo",Space,Str "weilest",Space,Str "du?"]]] + ,RawBlock (Format "html") "</blockquote>" + ,Div ("",[],[]) + [Plain [Str "\"You",Space,Str "gave",Space,Str "me",Space,Str "hyacinths",Space,Str "first",Space,Str "a",Space,Str "year",Space,Str "ago;"]] + ,Div ("",[],[]) + [Plain [Str "\"They",Space,Str "called",Space,Str "me",Space,Str "the",Space,Str "hyacinth",Space,Str "girl.\""]] + ,Div ("",[],[]) + [Plain [Str "\8213Yet",Space,Str "when",Space,Str "we",Space,Str "came",Space,Str "back,",Space,Str "late,",Space,Str "from",Space,Str "the",Space,Str "Hyacinth",Space,Str "garden,"]] + ,Div ("",[],[]) + [Plain [Str "Your",Space,Str "arms",Space,Str "full,",Space,Str "and",Space,Str "your",Space,Str "hair",Space,Str "wet,",Space,Str "I",Space,Str "could",Space,Str "not"]] + ,Div ("",[],[]) + [Plain [Str "Speak,",Space,Str "and",Space,Str "my",Space,Str "eyes",Space,Str "failed,",Space,Str "I",Space,Str "was",Space,Str "neither"]] + ,Div ("",[],[]) + [Plain [Str "Living",Space,Str "nor",Space,Str "dead,",Space,Str "and",Space,Str "I",Space,Str "knew",Space,Str "nothing,",Span ("",["lnum"],[]) [Str "40"]]] + ,Div ("",[],[]) + [Plain [Str "Looking",Space,Str "into",Space,Str "the",Space,Str "heart",Space,Str "of",Space,Str "light,",Space,Str "the",Space,Str "silence."]] + ,Div ("wasteland-content.xhtml#ln42",[],[("lang","de")]) + [Plain [Emph [Str "Od'",Space,Str "und",Space,Str "leer",Space,Str "das",Space,Str "Meer"],Str ".",Note [Para [Link ("",[],[]) [Str "42."] ("#wasteland-content.xhtml#ln42",""),Space,Str "Id.",Space,Str "iii,",Space,Str "verse",Space,Str "24."]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "Madame",Space,Str "Sosostris,",Space,Str "famous",Space,Str "clairvoyante,"]] + ,Div ("",[],[]) + [Plain [Str "Had",Space,Str "a",Space,Str "bad",Space,Str "cold,",Space,Str "nevertheless"]] + ,Div ("",[],[]) + [Plain [Str "Is",Space,Str "known",Space,Str "to",Space,Str "be",Space,Str "the",Space,Str "wisest",Space,Str "woman",Space,Str "in",Space,Str "Europe,"]] + ,Div ("wasteland-content.xhtml#ln46",[],[]) + [Plain [Str "With",Space,Str "a",Space,Str "wicked",Space,Str "pack",Space,Str "of",Space,Str "cards.",Space,Str "Here,",Space,Str "said",Space,Str "she,",Note [Para [Link ("",[],[]) [Str "46."] ("#wasteland-content.xhtml#ln46",""),Space,Str "I",Space,Str "am",Space,Str "not",Space,Str "familiar",Space,Str "with",Space,Str "the",Space,Str "exact",Space,Str "constitution",Space,Str "of",Space,Str "the",Space,Str "Tarot",Space,Str "pack",Space,Str "of",Space,Str "cards,",Space,Str "from",Space,Str "which",Space,Str "I",Space,Str "have",Space,Str "obviously",Space,Str "departed",Space,Str "to",Space,Str "suit",Space,Str "my",Space,Str "own",Space,Str "convenience.",Space,Str "The",Space,Str "Hanged",Space,Str "Man,",Space,Str "a",Space,Str "member",Space,Str "of",Space,Str "the",Space,Str "traditional",Space,Str "pack,",Space,Str "fits",Space,Str "my",Space,Str "purpose",Space,Str "in",Space,Str "two",Space,Str "ways:",Space,Str "because",Space,Str "he",Space,Str "is",Space,Str "associated",Space,Str "in",Space,Str "my",Space,Str "mind",Space,Str "with",Space,Str "the",Space,Str "Hanged",Space,Str "God",Space,Str "of",Space,Str "Frazer,",Space,Str "and",Space,Str "because",Space,Str "I",Space,Str "associate",Space,Str "him",Space,Str "with",Space,Str "the",Space,Str "hooded",Space,Str "figure",Space,Str "in",Space,Str "the",Space,Str "passage",Space,Str "of",Space,Str "the",Space,Str "disciples",Space,Str "to",Space,Str "Emmaus",Space,Str "in",Space,Str "Part",Space,Str "V.",Space,Str "The",Space,Str "Phoenician",Space,Str "Sailor",Space,Str "and",Space,Str "the",Space,Str "Merchant",Space,Str "appear",Space,Str "later;",Space,Str "also",Space,Str "the",Space,Str "\"crowds",Space,Str "of",Space,Str "people,\"",Space,Str "and",Space,Str "Death",Space,Str "by",Space,Str "Water",Space,Str "is",Space,Str "executed",Space,Str "in",Space,Str "Part",Space,Str "IV.",Space,Str "The",Space,Str "Man",Space,Str "with",Space,Str "Three",Space,Str "Staves",Space,Str "(an",Space,Str "authentic",Space,Str "member",Space,Str "of",Space,Str "the",Space,Str "Tarot",Space,Str "pack)",Space,Str "I",Space,Str "associate,",Space,Str "quite",Space,Str "arbitrarily,",Space,Str "with",Space,Str "the",Space,Str "Fisher",Space,Str "King",Space,Str "himself."]]] + ,Div ("",[],[]) + [Plain [Str "Is",Space,Str "your",Space,Str "card,",Space,Str "the",Space,Str "drowned",Space,Str "Phoenician",Space,Str "Sailor,"]] + ,Div ("",[],[]) + [Plain [Str "(Those",Space,Str "are",Space,Str "pearls",Space,Str "that",Space,Str "were",Space,Str "his",Space,Str "eyes.",Space,Str "Look!)"]] + ,Div ("",[],[]) + [Plain [Str "Here",Space,Str "is",Space,Str "Belladonna,",Space,Str "the",Space,Str "Lady",Space,Str "of",Space,Str "the",Space,Str "Rocks,"]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "lady",Space,Str "of",Space,Str "situations.",Span ("",["lnum"],[]) [Str "50"]]] + ,Div ("",[],[]) + [Plain [Str "Here",Space,Str "is",Space,Str "the",Space,Str "man",Space,Str "with",Space,Str "three",Space,Str "staves,",Space,Str "and",Space,Str "here",Space,Str "the",Space,Str "Wheel,"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "here",Space,Str "is",Space,Str "the",Space,Str "one-eyed",Space,Str "merchant,",Space,Str "and",Space,Str "this",Space,Str "card,"]] + ,Div ("",[],[]) + [Plain [Str "Which",Space,Str "is",Space,Str "blank,",Space,Str "is",Space,Str "something",Space,Str "he",Space,Str "carries",Space,Str "on",Space,Str "his",Space,Str "back,"]] + ,Div ("",[],[]) + [Plain [Str "Which",Space,Str "I",Space,Str "am",Space,Str "forbidden",Space,Str "to",Space,Str "see.",Space,Str "I",Space,Str "do",Space,Str "not",Space,Str "find"]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "Hanged",Space,Str "Man.",Space,Str "Fear",Space,Str "death",Space,Str "by",Space,Str "water."]] + ,Div ("",[],[]) + [Plain [Str "I",Space,Str "see",Space,Str "crowds",Space,Str "of",Space,Str "people,",Space,Str "walking",Space,Str "round",Space,Str "in",Space,Str "a",Space,Str "ring."]] + ,Div ("",[],[]) + [Plain [Str "Thank",Space,Str "you.",Space,Str "If",Space,Str "you",Space,Str "see",Space,Str "dear",Space,Str "Mrs.",Space,Str "Equitone,"]] + ,Div ("",[],[]) + [Plain [Str "Tell",Space,Str "her",Space,Str "I",Space,Str "bring",Space,Str "the",Space,Str "horoscope",Space,Str "myself:"]] + ,Div ("",[],[]) + [Plain [Str "One",Space,Str "must",Space,Str "be",Space,Str "so",Space,Str "careful",Space,Str "these",Space,Str "days."]]] + ,Div ("",["linegroup"],[]) + [Div ("wasteland-content.xhtml#ln60",[],[]) + [Plain [Str "Unreal",Space,Str "City,",Note [Para [Link ("",[],[]) [Str "60."] ("#wasteland-content.xhtml#ln60",""),Space,Str "Cf.",Space,Str "Baudelaire:"],BlockQuote [Para [Str "\"Fourmillante",Space,Str "cite;,",Space,Str "cite;",Space,Str "pleine",Space,Str "de",Space,Str "reves,",LineBreak,Str "Ou",Space,Str "le",Space,Str "spectre",Space,Str "en",Space,Str "plein",Space,Str "jour",Space,Str "raccroche",Space,Str "le",Space,Str "passant.\""]]]] + ,Div ("",[],[]) + [Plain [Str "Under",Space,Str "the",Space,Str "brown",Space,Str "fog",Space,Str "of",Space,Str "a",Space,Str "winter",Space,Str "dawn,"]] + ,Div ("",[],[]) + [Plain [Str "A",Space,Str "crowd",Space,Str "flowed",Space,Str "over",Space,Str "London",Space,Str "Bridge,",Space,Str "so",Space,Str "many,"]] + ,Div ("wasteland-content.xhtml#ln63",[],[]) + [Plain [Str "I",Space,Str "had",Space,Str "not",Space,Str "thought",Space,Str "death",Space,Str "had",Space,Str "undone",Space,Str "so",Space,Str "many.",Note [Para [Link ("",[],[]) [Str "63."] ("#wasteland-content.xhtml#ln63",""),Space,Str "Cf.",Space,Str "Inferno,",Space,Str "iii.",Space,Str "55-7."],BlockQuote [Para [Str "\"si",Space,Str "lunga",Space,Str "tratta",LineBreak,Str "di",Space,Str "gente,",Space,Str "ch'io",Space,Str "non",Space,Str "avrei",Space,Str "mai",Space,Str "creduto",LineBreak,Str "che",Space,Str "morte",Space,Str "tanta",Space,Str "n'avesse",Space,Str "disfatta.\""]]]] + ,Div ("wasteland-content.xhtml#ln64",[],[]) + [Plain [Str "Sighs,",Space,Str "short",Space,Str "and",Space,Str "infrequent,",Space,Str "were",Space,Str "exhaled,",Note [Para [Link ("",[],[]) [Str "64."] ("#wasteland-content.xhtml#ln64",""),Space,Str "Cf.",Space,Str "Inferno,",Space,Str "iv.",Space,Str "25-7:"],BlockQuote [Para [Str "\"Quivi,",Space,Str "secondo",Space,Str "che",Space,Str "per",Space,Str "ascoltahre,",LineBreak,Str "\"non",Space,Str "avea",Space,Str "pianto,",Space,Str "ma'",Space,Str "che",Space,Str "di",Space,Str "sospiri,",LineBreak,Str "\"che",Space,Str "l'aura",Space,Str "eterna",Space,Str "facevan",Space,Str "tremare.\""]]]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "each",Space,Str "man",Space,Str "fixed",Space,Str "his",Space,Str "eyes",Space,Str "before",Space,Str "his",Space,Str "feet."]] + ,Div ("",[],[]) + [Plain [Str "Flowed",Space,Str "up",Space,Str "the",Space,Str "hill",Space,Str "and",Space,Str "down",Space,Str "King",Space,Str "William",Space,Str "Street,"]] + ,Div ("",[],[]) + [Plain [Str "To",Space,Str "where",Space,Str "Saint",Space,Str "Mary",Space,Str "Woolnoth",Space,Str "kept",Space,Str "the",Space,Str "hours"]] + ,Div ("wasteland-content.xhtml#ln68",[],[]) + [Plain [Str "With",Space,Str "a",Space,Str "dead",Space,Str "sound",Space,Str "on",Space,Str "the",Space,Str "final",Space,Str "stroke",Space,Str "of",Space,Str "nine.",Note [Para [Link ("",[],[]) [Str "68."] ("#wasteland-content.xhtml#ln68",""),Space,Str "A",Space,Str "phenomenon",Space,Str "which",Space,Str "I",Space,Str "have",Space,Str "often",Space,Str "noticed."]]] + ,Div ("",[],[]) + [Plain [Str "There",Space,Str "I",Space,Str "saw",Space,Str "one",Space,Str "I",Space,Str "knew,",Space,Str "and",Space,Str "stopped",Space,Str "him,",Space,Str "crying",Space,Str "\"Stetson!"]] + ,Div ("",[],[]) + [Plain [Str "\"You",Space,Str "who",Space,Str "were",Space,Str "with",Space,Str "me",Space,Str "in",Space,Str "the",Space,Str "ships",Space,Str "at",Space,Str "Mylae!",Span ("",["lnum"],[]) [Str "70"]]] + ,Div ("",[],[]) + [Plain [Str "\"That",Space,Str "corpse",Space,Str "you",Space,Str "planted",Space,Str "last",Space,Str "year",Space,Str "in",Space,Str "your",Space,Str "garden,"]] + ,Div ("",[],[]) + [Plain [Str "\"Has",Space,Str "it",Space,Str "begun",Space,Str "to",Space,Str "sprout?",Space,Str "Will",Space,Str "it",Space,Str "bloom",Space,Str "this",Space,Str "year?"]] + ,Div ("",[],[]) + [Plain [Str "\"Or",Space,Str "has",Space,Str "the",Space,Str "sudden",Space,Str "frost",Space,Str "disturbed",Space,Str "its",Space,Str "bed?"]]] + ,Div ("",["linegroup"],[]) + [Div ("wasteland-content.xhtml#ln74",[],[]) + [Plain [Str "\"Oh",Space,Str "keep",Space,Str "the",Space,Str "Dog",Space,Str "far",Space,Str "hence,",Space,Str "that's",Space,Str "friend",Space,Str "to",Space,Str "men,",Note [Para [Link ("",[],[]) [Str "74."] ("#wasteland-content.xhtml#ln74",""),Space,Str "Cf.",Space,Str "the",Space,Str "Dirge",Space,Str "in",Space,Str "Webster's",Space,Str "White",Space,Str "Devil",Space,Str "."]]] + ,Div ("",[],[]) + [Plain [Str "\"Or",Space,Str "with",Space,Str "his",Space,Str "nails",Space,Str "he'll",Space,Str "dig",Space,Str "it",Space,Str "up",Space,Str "again!"]] + ,Div ("wasteland-content.xhtml#ln76",[],[]) + [Plain [Str "\"You!",Space,Span ("",[],[("lang","fr")]) [Str "hypocrite",Space,Str "lecteur!",Space,Str "-",Space,Str "mon",Space,Str "semblable,",Space,Str "-",Space,Str "mon",Space,Str "frere"],Space,Str "!\"",Note [Para [Link ("",[],[]) [Str "76."] ("#wasteland-content.xhtml#ln76",""),Space,Str "V.",Space,Str "Baudelaire,",Space,Str "Preface",Space,Str "to",Space,Str "Fleurs",Space,Str "du",Space,Str "Mal."]]] + ,Div ("wasteland-content.xhtml#ch2",["section"],[]) + [Header 2 ("",[],[]) [Str "II.",Space,Str "A",Space,Str "GAME",Space,Str "OF",Space,Str "CHESS"] + ,Div ("",["linegroup"],[]) + [Div ("wasteland-content.xhtml#ln77",[],[]) + [Plain [Str "The",Space,Str "Chair",Space,Str "she",Space,Str "sat",Space,Str "in,",Space,Str "like",Space,Str "a",Space,Str "burnished",Space,Str "throne,",Note [Para [Link ("",[],[]) [Str "77."] ("#wasteland-content.xhtml#ln77",""),Space,Str "Cf.",Space,Str "Antony",Space,Str "and",Space,Str "Cleopatra,",Space,Str "II.",Space,Str "ii.,",Space,Str "l.",Space,Str "190."]]] + ,Div ("",[],[]) + [Plain [Str "Glowed",Space,Str "on",Space,Str "the",Space,Str "marble,",Space,Str "where",Space,Str "the",Space,Str "glass"]] + ,Div ("",[],[]) + [Plain [Str "Held",Space,Str "up",Space,Str "by",Space,Str "standards",Space,Str "wrought",Space,Str "with",Space,Str "fruited",Space,Str "vines"]] + ,Div ("",[],[]) + [Plain [Str "From",Space,Str "which",Space,Str "a",Space,Str "golden",Space,Str "Cupidon",Space,Str "peeped",Space,Str "out",Span ("",["lnum"],[]) [Str "80"]]] + ,Div ("",[],[]) + [Plain [Str "(Another",Space,Str "hid",Space,Str "his",Space,Str "eyes",Space,Str "behind",Space,Str "his",Space,Str "wing)"]] + ,Div ("",[],[]) + [Plain [Str "Doubled",Space,Str "the",Space,Str "flames",Space,Str "of",Space,Str "sevenbranched",Space,Str "candelabra"]] + ,Div ("",[],[]) + [Plain [Str "Reflecting",Space,Str "light",Space,Str "upon",Space,Str "the",Space,Str "table",Space,Str "as"]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "glitter",Space,Str "of",Space,Str "her",Space,Str "jewels",Space,Str "rose",Space,Str "to",Space,Str "meet",Space,Str "it,"]] + ,Div ("",[],[]) + [Plain [Str "From",Space,Str "satin",Space,Str "cases",Space,Str "poured",Space,Str "in",Space,Str "rich",Space,Str "profusion;"]] + ,Div ("",[],[]) + [Plain [Str "In",Space,Str "vials",Space,Str "of",Space,Str "ivory",Space,Str "and",Space,Str "coloured",Space,Str "glass"]] + ,Div ("",[],[]) + [Plain [Str "Unstoppered,",Space,Str "lurked",Space,Str "her",Space,Str "strange",Space,Str "synthetic",Space,Str "perfumes,"]] + ,Div ("",[],[]) + [Plain [Str "Unguent,",Space,Str "powdered,",Space,Str "or",Space,Str "liquid",Space,Str "-",Space,Str "troubled,",Space,Str "confused"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "drowned",Space,Str "the",Space,Str "sense",Space,Str "in",Space,Str "odours;",Space,Str "stirred",Space,Str "by",Space,Str "the",Space,Str "air"]] + ,Div ("",[],[]) + [Plain [Str "That",Space,Str "freshened",Space,Str "from",Space,Str "the",Space,Str "window,",Space,Str "these",Space,Str "ascended",Span ("",["lnum"],[]) [Str "90"]]] + ,Div ("",[],[]) + [Plain [Str "In",Space,Str "fattening",Space,Str "the",Space,Str "prolonged",Space,Str "candle-flames,"]] + ,Div ("wasteland-content.xhtml#ln92",[],[]) + [Plain [Str "Flung",Space,Str "their",Space,Str "smoke",Space,Str "into",Space,Str "the",Space,Str "laquearia,",Note [Para [Link ("",[],[]) [Str "92."] ("#wasteland-content.xhtml#ln92",""),Space,Str "Laquearia.",Space,Str "V.",Space,Str "Aeneid,",Space,Str "I.",Space,Str "726:"],BlockQuote [Para [Str "dependent",Space,Str "lychni",Space,Str "laquearibus",Space,Str "aureis",Space,Str "incensi,",Space,Str "et",Space,Str "noctem",Space,Str "flammis",LineBreak,Str "funalia",Space,Str "vincunt."]]]] + ,Div ("",[],[]) + [Plain [Str "Stirring",Space,Str "the",Space,Str "pattern",Space,Str "on",Space,Str "the",Space,Str "coffered",Space,Str "ceiling."]] + ,Div ("",[],[]) + [Plain [Str "Huge",Space,Str "sea-wood",Space,Str "fed",Space,Str "with",Space,Str "copper"]] + ,Div ("",[],[]) + [Plain [Str "Burned",Space,Str "green",Space,Str "and",Space,Str "orange,",Space,Str "framed",Space,Str "by",Space,Str "the",Space,Str "coloured",Space,Str "stone,"]] + ,Div ("",[],[]) + [Plain [Str "In",Space,Str "which",Space,Str "sad",Space,Str "light",Space,Str "a",Space,Str "carved",Space,Str "dolphin",Space,Str "swam."]] + ,Div ("",[],[]) + [Plain [Str "Above",Space,Str "the",Space,Str "antique",Space,Str "mantel",Space,Str "was",Space,Str "displayed"]] + ,Div ("wasteland-content.xhtml#ln98",[],[]) + [Plain [Str "As",Space,Str "though",Space,Str "a",Space,Str "window",Space,Str "gave",Space,Str "upon",Space,Str "the",Space,Str "sylvan",Space,Str "scene",Note [Para [Link ("",[],[]) [Str "98."] ("#wasteland-content.xhtml#ln98",""),Space,Str "Sylvan",Space,Str "scene.",Space,Str "V.",Space,Str "Milton,",Space,Str "Paradise",Space,Str "Lost,",Space,Str "iv.",Space,Str "140."]]] + ,Div ("wasteland-content.xhtml#ln99",[],[]) + [Plain [Str "The",Space,Str "change",Space,Str "of",Space,Str "Philomel,",Space,Str "by",Space,Str "the",Space,Str "barbarous",Space,Str "king",Note [Para [Link ("",[],[]) [Str "99."] ("#wasteland-content.xhtml#ln99",""),Space,Str "V.",Space,Str "Ovid,",Space,Str "Metamorphoses,",Space,Str "vi,",Space,Str "Philomela."]]] + ,Div ("wasteland-content.xhtml#ln100",[],[]) + [Plain [Str "So",Space,Str "rudely",Space,Str "forced;",Space,Str "yet",Space,Str "there",Space,Str "the",Space,Str "nightingale",Note [Para [Link ("",[],[]) [Str "100."] ("#wasteland-content.xhtml#ln100",""),Space,Str "Cf.",Space,Str "Part",Space,Str "III,",Space,Str "l.",Space,Str "204."]]] + ,Div ("",[],[]) + [Plain [Str "Filled",Space,Str "all",Space,Str "the",Space,Str "desert",Space,Str "with",Space,Str "inviolable",Space,Str "voice"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "still",Space,Str "she",Space,Str "cried,",Space,Str "and",Space,Str "still",Space,Str "the",Space,Str "world",Space,Str "pursues,"]] + ,Div ("",[],[]) + [Plain [Str "\"Jug",Space,Str "Jug\"",Space,Str "to",Space,Str "dirty",Space,Str "ears."]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "other",Space,Str "withered",Space,Str "stumps",Space,Str "of",Space,Str "time"]] + ,Div ("",[],[]) + [Plain [Str "Were",Space,Str "told",Space,Str "upon",Space,Str "the",Space,Str "walls;",Space,Str "staring",Space,Str "forms"]] + ,Div ("",[],[]) + [Plain [Str "Leaned",Space,Str "out,",Space,Str "leaning,",Space,Str "hushing",Space,Str "the",Space,Str "room",Space,Str "enclosed."]] + ,Div ("",[],[]) + [Plain [Str "Footsteps",Space,Str "shuffled",Space,Str "on",Space,Str "the",Space,Str "stair."]] + ,Div ("",[],[]) + [Plain [Str "Under",Space,Str "the",Space,Str "firelight,",Space,Str "under",Space,Str "the",Space,Str "brush,",Space,Str "her",Space,Str "hair"]] + ,Div ("",[],[]) + [Plain [Str "Spread",Space,Str "out",Space,Str "in",Space,Str "fiery",Space,Str "points"]] + ,Div ("",[],[]) + [Plain [Str "Glowed",Space,Str "into",Space,Str "words,",Space,Str "then",Space,Str "would",Space,Str "be",Space,Str "savagely",Space,Str "still.",Span ("",["lnum"],[]) [Str "110"]]]] + ,Div ("",["linegroup"],[]) + [Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "\"My",Space,Str "nerves",Space,Str "are",Space,Str "bad",Space,Str "to-night.",Space,Str "Yes,",Space,Str "bad.",Space,Str "Stay",Space,Str "with",Space,Str "me."]] + ,Div ("",[],[]) + [Plain [Str "\"Speak",Space,Str "to",Space,Str "me.",Space,Str "Why",Space,Str "do",Space,Str "you",Space,Str "never",Space,Str "speak.",Space,Str "Speak."]] + ,Div ("",[],[]) + [Plain [Str "\"What",Space,Str "are",Space,Str "you",Space,Str "thinking",Space,Str "of?",Space,Str "What",Space,Str "thinking?",Space,Str "What?"]] + ,Div ("",[],[]) + [Plain [Str "\"I",Space,Str "never",Space,Str "know",Space,Str "what",Space,Str "you",Space,Str "are",Space,Str "thinking.",Space,Str "Think.\""]]] + ,Div ("",["linegroup"],[]) + [Div ("wasteland-content.xhtml#ln115",[],[]) + [Plain [Str "I",Space,Str "think",Space,Str "we",Space,Str "are",Space,Str "in",Space,Str "rats'",Space,Str "alley",Note [Para [Link ("",[],[]) [Str "115."] ("#wasteland-content.xhtml#ln115",""),Space,Str "Cf.",Space,Str "Part",Space,Str "III,",Space,Str "l.",Space,Str "195."]]] + ,Div ("",[],[]) + [Plain [Str "Where",Space,Str "the",Space,Str "dead",Space,Str "men",Space,Str "lost",Space,Str "their",Space,Str "bones."]]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "\"What",Space,Str "is",Space,Str "that",Space,Str "noise?\""]] + ,Div ("wasteland-content.xhtml#ln118",["indent"],[]) + [Plain [Str "The",Space,Str "wind",Space,Str "under",Space,Str "the",Space,Str "door.",Note [Para [Link ("",[],[]) [Str "118."] ("#wasteland-content.xhtml#ln118",""),Space,Str "Cf.",Space,Str "Webster:"],BlockQuote [Para [Str "\"Is",Space,Str "the",Space,Str "wind",Space,Str "in",Space,Str "that",Space,Str "door",Space,Str "still?\""]]]] + ,Div ("",[],[]) + [Plain [Str "\"What",Space,Str "is",Space,Str "that",Space,Str "noise",Space,Str "now?",Space,Str "What",Space,Str "is",Space,Str "the",Space,Str "wind",Space,Str "doing?\""]] + ,Div ("",["indent"],[]) + [Plain [Str "Nothing",Space,Str "again",Space,Str "nothing.",Span ("",["lnum"],[]) [Str "120"]]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "\"Do"]] + ,Div ("",[],[]) + [Plain [Str "\"You",Space,Str "know",Space,Str "nothing?",Space,Str "Do",Space,Str "you",Space,Str "see",Space,Str "nothing?",Space,Str "Do",Space,Str "you",Space,Str "remember"]] + ,Div ("",[],[]) + [Plain [Str "\"Nothing?\""]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "I",Space,Str "remember"]] + ,Div ("",[],[]) + [Plain [Str "Those",Space,Str "are",Space,Str "pearls",Space,Str "that",Space,Str "were",Space,Str "his",Space,Str "eyes."]] + ,Div ("wasteland-content.xhtml#ln126",[],[]) + [Plain [Str "\"Are",Space,Str "you",Space,Str "alive,",Space,Str "or",Space,Str "not?",Space,Str "Is",Space,Str "there",Space,Str "nothing",Space,Str "in",Space,Str "your",Space,Str "head?\"",Note [Para [Link ("",[],[]) [Str "126."] ("#wasteland-content.xhtml#ln126",""),Space,Str "Cf.",Space,Str "Part",Space,Str "I,",Space,Str "l.",Space,Str "37,",Space,Str "48."]]] + ,Div ("",[],[]) + [Plain [Str "But"]] + ,Div ("",[],[]) + [Plain [Str "O",Space,Str "O",Space,Str "O",Space,Str "O",Space,Str "that",Space,Str "Shakespeherian",Space,Str "Rag\8213"]] + ,Div ("",[],[]) + [Plain [Str "It's",Space,Str "so",Space,Str "elegant"]] + ,Div ("",[],[]) + [Plain [Str "So",Space,Str "intelligent",Span ("",["lnum"],[]) [Str "130"]]] + ,Div ("",[],[]) + [Plain [Str "\"What",Space,Str "shall",Space,Str "I",Space,Str "do",Space,Str "now?",Space,Str "What",Space,Str "shall",Space,Str "I",Space,Str "do?\""]] + ,Div ("",[],[]) + [Plain [Str "I",Space,Str "shall",Space,Str "rush",Space,Str "out",Space,Str "as",Space,Str "I",Space,Str "am,",Space,Str "and",Space,Str "walk",Space,Str "the",Space,Str "street"]] + ,Div ("",[],[]) + [Plain [Str "\"With",Space,Str "my",Space,Str "hair",Space,Str "down,",Space,Str "so.",Space,Str "What",Space,Str "shall",Space,Str "we",Space,Str "do",Space,Str "to-morrow?"]] + ,Div ("",[],[]) + [Plain [Str "\"What",Space,Str "shall",Space,Str "we",Space,Str "ever",Space,Str "do?\""]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "hot",Space,Str "water",Space,Str "at",Space,Str "ten."]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "if",Space,Str "it",Space,Str "rains,",Space,Str "a",Space,Str "closed",Space,Str "car",Space,Str "at",Space,Str "four."]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "we",Space,Str "shall",Space,Str "play",Space,Str "a",Space,Str "game",Space,Str "of",Space,Str "chess,"]] + ,Div ("wasteland-content.xhtml#ln138",[],[]) + [Plain [Str "Pressing",Space,Str "lidless",Space,Str "eyes",Space,Str "and",Space,Str "waiting",Space,Str "for",Space,Str "a",Space,Str "knock",Space,Str "upon",Space,Str "the",Space,Str "door.",Note [Para [Link ("",[],[]) [Str "138."] ("#wasteland-content.xhtml#ln138",""),Space,Str "Cf.",Space,Str "the",Space,Str "game",Space,Str "of",Space,Str "chess",Space,Str "in",Space,Str "Middleton's",Space,Str "Women",Space,Str "beware",Space,Str "Women."]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "When",Space,Str "Lil's",Space,Str "husband",Space,Str "got",Space,Str "demobbed,",Space,Str "I",Space,Str "said",Space,Str "-"]] + ,Div ("",[],[]) + [Plain [Str "I",Space,Str "didn't",Space,Str "mince",Space,Str "my",Space,Str "words,",Space,Str "I",Space,Str "said",Space,Str "to",Space,Str "her",Space,Str "myself,",Span ("",["lnum"],[]) [Str "140"]]] + ,Div ("",[],[]) + [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]] + ,Div ("",[],[]) + [Plain [Str "Now",Space,Str "Albert's",Space,Str "coming",Space,Str "back,",Space,Str "make",Space,Str "yourself",Space,Str "a",Space,Str "bit",Space,Str "smart."]] + ,Div ("",[],[]) + [Plain [Str "He'll",Space,Str "want",Space,Str "to",Space,Str "know",Space,Str "what",Space,Str "you",Space,Str "done",Space,Str "with",Space,Str "that",Space,Str "money",Space,Str "he",Space,Str "gave",Space,Str "you"]] + ,Div ("",[],[]) + [Plain [Str "To",Space,Str "get",Space,Str "yourself",Space,Str "some",Space,Str "teeth.",Space,Str "He",Space,Str "did,",Space,Str "I",Space,Str "was",Space,Str "there."]] + ,Div ("",[],[]) + [Plain [Str "You",Space,Str "have",Space,Str "them",Space,Str "all",Space,Str "out,",Space,Str "Lil,",Space,Str "and",Space,Str "get",Space,Str "a",Space,Str "nice",Space,Str "set,"]] + ,Div ("",[],[]) + [Plain [Str "He",Space,Str "said,",Space,Str "I",Space,Str "swear,",Space,Str "I",Space,Str "can't",Space,Str "bear",Space,Str "to",Space,Str "look",Space,Str "at",Space,Str "you."]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "no",Space,Str "more",Space,Str "can't",Space,Str "I,",Space,Str "I",Space,Str "said,",Space,Str "and",Space,Str "think",Space,Str "of",Space,Str "poor",Space,Str "Albert,"]] + ,Div ("",[],[]) + [Plain [Str "He's",Space,Str "been",Space,Str "in",Space,Str "the",Space,Str "army",Space,Str "four",Space,Str "years,",Space,Str "he",Space,Str "wants",Space,Str "a",Space,Str "good",Space,Str "time,"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "if",Space,Str "you",Space,Str "don't",Space,Str "give",Space,Str "it",Space,Str "him,",Space,Str "there's",Space,Str "others",Space,Str "will,",Space,Str "I",Space,Str "said."]] + ,Div ("",[],[]) + [Plain [Str "Oh",Space,Str "is",Space,Str "there,",Space,Str "she",Space,Str "said.",Space,Str "Something",Space,Str "o'",Space,Str "that,",Space,Str "I",Space,Str "said.",Span ("",["lnum"],[]) [Str "150"]]] + ,Div ("",[],[]) + [Plain [Str "Then",Space,Str "I'll",Space,Str "know",Space,Str "who",Space,Str "to",Space,Str "thank,",Space,Str "she",Space,Str "said,",Space,Str "and",Space,Str "give",Space,Str "me",Space,Str "a",Space,Str "straight",Space,Str "look."]] + ,Div ("",[],[]) + [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]] + ,Div ("",[],[]) + [Plain [Str "If",Space,Str "you",Space,Str "don't",Space,Str "like",Space,Str "it",Space,Str "you",Space,Str "can",Space,Str "get",Space,Str "on",Space,Str "with",Space,Str "it,",Space,Str "I",Space,Str "said."]] + ,Div ("",[],[]) + [Plain [Str "Others",Space,Str "can",Space,Str "pick",Space,Str "and",Space,Str "choose",Space,Str "if",Space,Str "you",Space,Str "can't."]] + ,Div ("",[],[]) + [Plain [Str "But",Space,Str "if",Space,Str "Albert",Space,Str "makes",Space,Str "off,",Space,Str "it",Space,Str "won't",Space,Str "be",Space,Str "for",Space,Str "lack",Space,Str "of",Space,Str "telling."]] + ,Div ("",[],[]) + [Plain [Str "You",Space,Str "ought",Space,Str "to",Space,Str "be",Space,Str "ashamed,",Space,Str "I",Space,Str "said,",Space,Str "to",Space,Str "look",Space,Str "so",Space,Str "antique."]] + ,Div ("",[],[]) + [Plain [Str "(And",Space,Str "her",Space,Str "only",Space,Str "thirty-one.)"]] + ,Div ("",[],[]) + [Plain [Str "I",Space,Str "can't",Space,Str "help",Space,Str "it,",Space,Str "she",Space,Str "said,",Space,Str "pulling",Space,Str "a",Space,Str "long",Space,Str "face,"]] + ,Div ("",[],[]) + [Plain [Str "It's",Space,Str "them",Space,Str "pills",Space,Str "I",Space,Str "took,",Space,Str "to",Space,Str "bring",Space,Str "it",Space,Str "off,",Space,Str "she",Space,Str "said."]] + ,Div ("",[],[]) + [Plain [Str "(She's",Space,Str "had",Space,Str "five",Space,Str "already,",Space,Str "and",Space,Str "nearly",Space,Str "died",Space,Str "of",Space,Str "young",Space,Str "George.)",Span ("",["lnum"],[]) [Str "160"]]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "chemist",Space,Str "said",Space,Str "it",Space,Str "would",Space,Str "be",Space,Str "all",Space,Str "right,",Space,Str "but",Space,Str "I've",Space,Str "never",Space,Str "been",Space,Str "the",Space,Str "same."]] + ,Div ("",[],[]) + [Plain [Str "You",Space,Emph [Str "are"],Space,Str "a",Space,Str "proper",Space,Str "fool,",Space,Str "I",Space,Str "said."]] + ,Div ("",[],[]) + [Plain [Str "Well,",Space,Str "if",Space,Str "Albert",Space,Str "won't",Space,Str "leave",Space,Str "you",Space,Str "alone,",Space,Str "there",Space,Str "it",Space,Str "is,",Space,Str "I",Space,Str "said,"]] + ,Div ("",[],[]) + [Plain [Str "What",Space,Str "you",Space,Str "get",Space,Str "married",Space,Str "for",Space,Str "if",Space,Str "you",Space,Str "don't",Space,Str "want",Space,Str "children?"]] + ,Div ("",[],[]) + [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]] + ,Div ("",[],[]) + [Plain [Str "Well,",Space,Str "that",Space,Str "Sunday",Space,Str "Albert",Space,Str "was",Space,Str "home,",Space,Str "they",Space,Str "had",Space,Str "a",Space,Str "hot",Space,Str "gammon,"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "they",Space,Str "asked",Space,Str "me",Space,Str "in",Space,Str "to",Space,Str "dinner,",Space,Str "to",Space,Str "get",Space,Str "the",Space,Str "beauty",Space,Str "of",Space,Str "it",Space,Str "hot\8213"]] + ,Div ("",[],[]) + [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]] + ,Div ("",[],[]) + [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]] + ,Div ("",[],[]) + [Plain [Str "Goonight",Space,Str "Bill.",Space,Str "Goonight",Space,Str "Lou.",Space,Str "Goonight",Space,Str "May.",Space,Str "Goonight.",Span ("",["lnum"],[]) [Str "170"]]] + ,Div ("",[],[]) + [Plain [Str "Ta",Space,Str "ta.",Space,Str "Goonight.",Space,Str "Goonight."]] + ,Div ("",[],[]) + [Plain [Str "Good",Space,Str "night,",Space,Str "ladies,",Space,Str "good",Space,Str "night,",Space,Str "sweet",Space,Str "ladies,",Space,Str "good",Space,Str "night,",Space,Str "good",Space,Str "night."]]] + ,RawBlock (Format "html") "</section>" + ,Div ("wasteland-content.xhtml#ch3",["section"],[]) + [Header 2 ("",[],[]) [Str "III.",Space,Str "THE",Space,Str "FIRE",Space,Str "SERMON"] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "The",Space,Str "river's",Space,Str "tent",Space,Str "is",Space,Str "broken:",Space,Str "the",Space,Str "last",Space,Str "fingers",Space,Str "of",Space,Str "leaf"]] + ,Div ("",[],[]) + [Plain [Str "Clutch",Space,Str "and",Space,Str "sink",Space,Str "into",Space,Str "the",Space,Str "wet",Space,Str "bank.",Space,Str "The",Space,Str "wind"]] + ,Div ("",[],[]) + [Plain [Str "Crosses",Space,Str "the",Space,Str "brown",Space,Str "land,",Space,Str "unheard.",Space,Str "The",Space,Str "nymphs",Space,Str "are",Space,Str "departed."]] + ,Div ("wasteland-content.xhtml#ln176",[],[]) + [Plain [Str "Sweet",Space,Str "Thames,",Space,Str "run",Space,Str "softly,",Space,Str "till",Space,Str "I",Space,Str "end",Space,Str "my",Space,Str "song.",Note [Para [Link ("",[],[]) [Str "176."] ("#wasteland-content.xhtml#ln176",""),Space,Str "V.",Space,Str "Spenser,",Space,Str "Prothalamion."]]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "river",Space,Str "bears",Space,Str "no",Space,Str "empty",Space,Str "bottles,",Space,Str "sandwich",Space,Str "papers,"]] + ,Div ("",[],[]) + [Plain [Str "Silk",Space,Str "handkerchiefs,",Space,Str "cardboard",Space,Str "boxes,",Space,Str "cigarette",Space,Str "ends"]] + ,Div ("",[],[]) + [Plain [Str "Or",Space,Str "other",Space,Str "testimony",Space,Str "of",Space,Str "summer",Space,Str "nights.",Space,Str "The",Space,Str "nymphs",Space,Str "are",Space,Str "departed."]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "their",Space,Str "friends,",Space,Str "the",Space,Str "loitering",Space,Str "heirs",Space,Str "of",Space,Str "city",Space,Str "directors;",Span ("",["lnum"],[]) [Str "180"]]] + ,Div ("",[],[]) + [Plain [Str "Departed,",Space,Str "have",Space,Str "left",Space,Str "no",Space,Str "addresses."]] + ,Div ("",[],[]) + [Plain [Str "By",Space,Str "the",Space,Str "waters",Space,Str "of",Space,Str "Leman",Space,Str "I",Space,Str "sat",Space,Str "down",Space,Str "and",Space,Str "wept",Space,Str ".",Space,Str ".",Space,Str "."]] + ,Div ("",[],[]) + [Plain [Str "Sweet",Space,Str "Thames,",Space,Str "run",Space,Str "softly",Space,Str "till",Space,Str "I",Space,Str "end",Space,Str "my",Space,Str "song,"]] + ,Div ("",[],[]) + [Plain [Str "Sweet",Space,Str "Thames,",Space,Str "run",Space,Str "softly,",Space,Str "for",Space,Str "I",Space,Str "speak",Space,Str "not",Space,Str "loud",Space,Str "or",Space,Str "long."]] + ,Div ("",[],[]) + [Plain [Str "But",Space,Str "at",Space,Str "my",Space,Str "back",Space,Str "in",Space,Str "a",Space,Str "cold",Space,Str "blast",Space,Str "I",Space,Str "hear"]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "rattle",Space,Str "of",Space,Str "the",Space,Str "bones,",Space,Str "and",Space,Str "chuckle",Space,Str "spread",Space,Str "from",Space,Str "ear",Space,Str "to",Space,Str "ear."]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "A",Space,Str "rat",Space,Str "crept",Space,Str "softly",Space,Str "through",Space,Str "the",Space,Str "vegetation"]] + ,Div ("",[],[]) + [Plain [Str "Dragging",Space,Str "its",Space,Str "slimy",Space,Str "belly",Space,Str "on",Space,Str "the",Space,Str "bank"]] + ,Div ("",[],[]) + [Plain [Str "While",Space,Str "I",Space,Str "was",Space,Str "fishing",Space,Str "in",Space,Str "the",Space,Str "dull",Space,Str "canal"]] + ,Div ("",[],[]) + [Plain [Str "On",Space,Str "a",Space,Str "winter",Space,Str "evening",Space,Str "round",Space,Str "behind",Space,Str "the",Space,Str "gashouse",Span ("",["lnum"],[]) [Str "190"]]] + ,Div ("",[],[]) + [Plain [Str "Musing",Space,Str "upon",Space,Str "the",Space,Str "king",Space,Str "my",Space,Str "brother's",Space,Str "wreck"]] + ,Div ("wasteland-content.xhtml#ln192",[],[]) + [Plain [Str "And",Space,Str "on",Space,Str "the",Space,Str "king",Space,Str "my",Space,Str "father's",Space,Str "death",Space,Str "before",Space,Str "him.",Note [Para [Link ("",[],[]) [Str "192."] ("#wasteland-content.xhtml#ln192",""),Space,Str "Cf.",Space,Str "The",Space,Str "Tempest,",Space,Str "I.",Space,Str "ii."]]] + ,Div ("",[],[]) + [Plain [Str "White",Space,Str "bodies",Space,Str "naked",Space,Str "on",Space,Str "the",Space,Str "low",Space,Str "damp",Space,Str "ground"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "bones",Space,Str "cast",Space,Str "in",Space,Str "a",Space,Str "little",Space,Str "low",Space,Str "dry",Space,Str "garret,"]] + ,Div ("",[],[]) + [Plain [Str "Rattled",Space,Str "by",Space,Str "the",Space,Str "rat's",Space,Str "foot",Space,Str "only,",Space,Str "year",Space,Str "to",Space,Str "year."]] + ,Div ("wasteland-content.xhtml#ln196",[],[]) + [Plain [Str "But",Space,Str "at",Space,Str "my",Space,Str "back",Space,Str "from",Space,Str "time",Space,Str "to",Space,Str "time",Space,Str "I",Space,Str "hear",Note [Para [Link ("",[],[]) [Str "196."] ("#wasteland-content.xhtml#ln196",""),Space,Str "Cf.",Space,Str "Marvell,",Space,Str "To",Space,Str "His",Space,Str "Coy",Space,Str "Mistress."]]] + ,Div ("wasteland-content.xhtml#ln197",[],[]) + [Plain [Str "The",Space,Str "sound",Space,Str "of",Space,Str "horns",Space,Str "and",Space,Str "motors,",Space,Str "which",Space,Str "shall",Space,Str "bring",Note [Para [Link ("",[],[]) [Str "197."] ("#wasteland-content.xhtml#ln197",""),Space,Str "Cf.",Space,Str "Day,",Space,Str "Parliament",Space,Str "of",Space,Str "Bees:"],BlockQuote [Div ("",[],[]) [Div ("",[],[]) [Plain [Str "\"When",Space,Str "of",Space,Str "the",Space,Str "sudden,",Space,Str "listening,",Space,Str "you",Space,Str "shall",Space,Str "hear,"]],Div ("",[],[]) [Plain [Str "\"A",Space,Str "noise",Space,Str "of",Space,Str "horns",Space,Str "and",Space,Str "hunting,",Space,Str "which",Space,Str "shall",Space,Str "bring"]],Div ("",[],[]) [Plain [Str "\"Actaeon",Space,Str "to",Space,Str "Diana",Space,Str "in",Space,Str "the",Space,Str "spring,"]],Div ("",[],[]) [Plain [Str "\"Where",Space,Str "all",Space,Str "shall",Space,Str "see",Space,Str "her",Space,Str "naked",Space,Str "skin",Space,Str ".",Space,Str ".",Space,Str ".\""]]]]]] + ,Div ("",[],[]) + [Plain [Str "Sweeney",Space,Str "to",Space,Str "Mrs.",Space,Str "Porter",Space,Str "in",Space,Str "the",Space,Str "spring."]] + ,Div ("wasteland-content.xhtml#ln199",[],[]) + [Plain [Str "O",Space,Str "the",Space,Str "moon",Space,Str "shone",Space,Str "bright",Space,Str "on",Space,Str "Mrs.",Space,Str "Porter",Note [Para [Link ("",[],[]) [Str "199."] ("#wasteland-content.xhtml#ln199",""),Space,Str "I",Space,Str "do",Space,Str "not",Space,Str "know",Space,Str "the",Space,Str "origin",Space,Str "of",Space,Str "the",Space,Str "ballad",Space,Str "from",Space,Str "which",Space,Str "these",Space,Str "lines",Space,Str "are",Space,Str "taken:",Space,Str "it",Space,Str "was",Space,Str "reported",Space,Str "to",Space,Str "me",Space,Str "from",Space,Str "Sydney,",Space,Str "Australia."]]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "on",Space,Str "her",Space,Str "daughter",Span ("",["lnum"],[]) [Str "200"]]] + ,Div ("",[],[]) + [Plain [Str "They",Space,Str "wash",Space,Str "their",Space,Str "feet",Space,Str "in",Space,Str "soda",Space,Str "water"]] + ,Div ("wasteland-content.xhtml#ln202",[],[("lang","fr")]) + [Plain [Emph [Str "Et",Space,Str "O",Space,Str "ces",Space,Str "voix",Space,Str "d'enfants,",Space,Str "chantant",Space,Str "dans",Space,Str "la",Space,Str "coupole"],Str "!",Note [Para [Link ("",[],[]) [Str "202."] ("#wasteland-content.xhtml#ln202",""),Space,Str "V.",Space,Str "Verlaine,",Space,Str "Parsifal."]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "Twit",Space,Str "twit",Space,Str "twit"]] + ,Div ("",[],[]) + [Plain [Str "Jug",Space,Str "jug",Space,Str "jug",Space,Str "jug",Space,Str "jug",Space,Str "jug"]] + ,Div ("",[],[]) + [Plain [Str "So",Space,Str "rudely",Space,Str "forc'd."]] + ,Div ("",[],[]) + [Plain [Str "Tereu"]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "Unreal",Space,Str "City"]] + ,Div ("",[],[]) + [Plain [Str "Under",Space,Str "the",Space,Str "brown",Space,Str "fog",Space,Str "of",Space,Str "a",Space,Str "winter",Space,Str "noon"]] + ,Div ("",[],[]) + [Plain [Str "Mr.",Space,Str "Eugenides,",Space,Str "the",Space,Str "Smyrna",Space,Str "merchant"]] + ,Div ("wasteland-content.xhtml#ln210",[],[]) + [Plain [Str "Unshaven,",Space,Str "with",Space,Str "a",Space,Str "pocket",Space,Str "full",Space,Str "of",Space,Str "currants",Note [Para [Link ("",[],[]) [Str "210."] ("#wasteland-content.xhtml#ln210",""),Space,Str "The",Space,Str "currants",Space,Str "were",Space,Str "quoted",Space,Str "at",Space,Str "a",Space,Str "price",Space,Str "\"cost",Space,Str "insurance",Space,Str "and",Space,Str "freight",Space,Str "to",Space,Str "London\";",Space,Str "and",Space,Str "the",Space,Str "Bill",Space,Str "of",Space,Str "Lading",Space,Str "etc.",Space,Str "were",Space,Str "to",Space,Str "be",Space,Str "handed",Space,Str "to",Space,Str "the",Space,Str "buyer",Space,Str "upon",Space,Str "payment",Space,Str "of",Space,Str "the",Space,Str "sight",Space,Str "draft."]]] + ,Div ("",[],[]) + [Plain [Str "C.i.f.",Space,Str "London:",Space,Str "documents",Space,Str "at",Space,Str "sight,"]] + ,Div ("",[],[]) + [Plain [Str "Asked",Space,Str "me",Space,Str "in",Space,Str "demotic",Space,Str "French"]] + ,Div ("",[],[]) + [Plain [Str "To",Space,Str "luncheon",Space,Str "at",Space,Str "the",Space,Str "Cannon",Space,Str "Street",Space,Str "Hotel"]] + ,Div ("",[],[]) + [Plain [Str "Followed",Space,Str "by",Space,Str "a",Space,Str "weekend",Space,Str "at",Space,Str "the",Space,Str "Metropole."]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "At",Space,Str "the",Space,Str "violet",Space,Str "hour,",Space,Str "when",Space,Str "the",Space,Str "eyes",Space,Str "and",Space,Str "back"]] + ,Div ("",[],[]) + [Plain [Str "Turn",Space,Str "upward",Space,Str "from",Space,Str "the",Space,Str "desk,",Space,Str "when",Space,Str "the",Space,Str "human",Space,Str "engine",Space,Str "waits"]] + ,Div ("",[],[]) + [Plain [Str "Like",Space,Str "a",Space,Str "taxi",Space,Str "throbbing",Space,Str "waiting,"]] + ,Div ("wasteland-content.xhtml#ln218",[],[]) + [Plain [Str "I",Space,Str "Tiresias,",Space,Str "though",Space,Str "blind,",Space,Str "throbbing",Space,Str "between",Space,Str "two",Space,Str "lives,",Note [Para [Link ("",[],[]) [Str "218."] ("#wasteland-content.xhtml#ln218",""),Space,Str "Tiresias,",Space,Str "although",Space,Str "a",Space,Str "mere",Space,Str "spectator",Space,Str "and",Space,Str "not",Space,Str "indeed",Space,Str "a",Space,Str "\"character,\"",Space,Str "is",Space,Str "yet",Space,Str "the",Space,Str "most",Space,Str "important",Space,Str "personage",Space,Str "in",Space,Str "the",Space,Str "poem,",Space,Str "uniting",Space,Str "all",Space,Str "the",Space,Str "rest.",Space,Str "Just",Space,Str "as",Space,Str "the",Space,Str "one-eyed",Space,Str "merchant,",Space,Str "seller",Space,Str "of",Space,Str "currants,",Space,Str "melts",Space,Str "into",Space,Str "the",Space,Str "Phoenician",Space,Str "Sailor,",Space,Str "and",Space,Str "the",Space,Str "latter",Space,Str "is",Space,Str "not",Space,Str "wholly",Space,Str "distinct",Space,Str "from",Space,Str "Ferdinand",Space,Str "Prince",Space,Str "of",Space,Str "Naples,",Space,Str "so",Space,Str "all",Space,Str "the",Space,Str "women",Space,Str "are",Space,Str "one",Space,Str "woman,",Space,Str "and",Space,Str "the",Space,Str "two",Space,Str "sexes",Space,Str "meet",Space,Str "in",Space,Str "Tiresias.",Space,Str "What",Space,Str "Tiresias",Space,Str "sees,",Space,Str "in",Space,Str "fact,",Space,Str "is",Space,Str "the",Space,Str "substance",Space,Str "of",Space,Str "the",Space,Str "poem.",Space,Str "The",Space,Str "whole",Space,Str "passage",Space,Str "from",Space,Str "Ovid",Space,Str "is",Space,Str "of",Space,Str "great",Space,Str "anthropological",Space,Str "interest:"],BlockQuote [Para [Str "'.",Space,Str ".",Space,Str ".",Space,Str "Cum",Space,Str "Iunone",Space,Str "iocos",Space,Str "et",Space,Str "maior",Space,Str "vestra",Space,Str "profecto",Space,Str "est",LineBreak,Space,Str "Quam,",Space,Str "quae",Space,Str "contingit",Space,Str "maribus,'",Space,Str "dixisse,",Space,Str "'voluptas.'",LineBreak,Space,Str "Illa",Space,Str "negat;",Space,Str "placuit",Space,Str "quae",Space,Str "sit",Space,Str "sententia",Space,Str "docti",LineBreak,Space,Str "Quaerere",Space,Str "Tiresiae:",Space,Str "venus",Space,Str "huic",Space,Str "erat",Space,Str "utraque",Space,Str "nota.",LineBreak,Space,Str "Nam",Space,Str "duo",Space,Str "magnorum",Space,Str "viridi",Space,Str "coeuntia",Space,Str "silva",LineBreak,Space,Str "Corpora",Space,Str "serpentum",Space,Str "baculi",Space,Str "violaverat",Space,Str "ictu",LineBreak,Space,Str "Deque",Space,Str "viro",Space,Str "factus,",Space,Str "mirabile,",Space,Str "femina",Space,Str "septem",LineBreak,Space,Str "Egerat",Space,Str "autumnos;",Space,Str "octavo",Space,Str "rursus",Space,Str "eosdem",LineBreak,Space,Str "Vidit",Space,Str "et",Space,Str "'est",Space,Str "vestrae",Space,Str "si",Space,Str "tanta",Space,Str "potentia",Space,Str "plagae,'",LineBreak,Space,Str "Dixit",Space,Str "'ut",Space,Str "auctoris",Space,Str "sortem",Space,Str "in",Space,Str "contraria",Space,Str "mutet,",LineBreak,Space,Str "Nunc",Space,Str "quoque",Space,Str "vos",Space,Str "feriam!'",Space,Str "percussis",Space,Str "anguibus",Space,Str "isdem",LineBreak,Space,Str "Forma",Space,Str "prior",Space,Str "rediit",Space,Str "genetivaque",Space,Str "venit",Space,Str "imago.",LineBreak,Space,Str "Arbiter",Space,Str "hic",Space,Str "igitur",Space,Str "sumptus",Space,Str "de",Space,Str "lite",Space,Str "iocosa",LineBreak,Space,Str "Dicta",Space,Str "Iovis",Space,Str "firmat;",Space,Str "gravius",Space,Str "Saturnia",Space,Str "iusto",LineBreak,Space,Str "Nec",Space,Str "pro",Space,Str "materia",Space,Str "fertur",Space,Str "doluisse",Space,Str "suique",LineBreak,Space,Str "Iudicis",Space,Str "aeterna",Space,Str "damnavit",Space,Str "lumina",Space,Str "nocte,",LineBreak,Space,Str "At",Space,Str "pater",Space,Str "omnipotens",Space,Str "(neque",Space,Str "enim",Space,Str "licet",Space,Str "inrita",Space,Str "cuiquam",LineBreak,Space,Str "Facta",Space,Str "dei",Space,Str "fecisse",Space,Str "deo)",Space,Str "pro",Space,Str "lumine",Space,Str "adempto",LineBreak,Space,Str "Scire",Space,Str "futura",Space,Str "dedit",Space,Str "poenamque",Space,Str "levavit",Space,Str "honore.",LineBreak]]]] + ,Div ("",[],[]) + [Plain [Str "Old",Space,Str "man",Space,Str "with",Space,Str "wrinkled",Space,Str "female",Space,Str "breasts,",Space,Str "can",Space,Str "see"]] + ,Div ("",[],[]) + [Plain [Str "At",Space,Str "the",Space,Str "violet",Space,Str "hour,",Space,Str "the",Space,Str "evening",Space,Str "hour",Space,Str "that",Space,Str "strives",Span ("",["lnum"],[]) [Str "220"]]] + ,Div ("wasteland-content.xhtml#ln221",[],[]) + [Plain [Str "Homeward,",Space,Str "and",Space,Str "brings",Space,Str "the",Space,Str "sailor",Space,Str "home",Space,Str "from",Space,Str "sea,",Note [Para [Link ("",[],[]) [Str "221."] ("#wasteland-content.xhtml#ln221",""),Space,Str "This",Space,Str "may",Space,Str "not",Space,Str "appear",Space,Str "as",Space,Str "exact",Space,Str "as",Space,Str "Sappho's",Space,Str "lines,",Space,Str "but",Space,Str "I",Space,Str "had",Space,Str "in",Space,Str "mind",Space,Str "the",Space,Str "\"longshore\"",Space,Str "or",Space,Str "\"dory\"",Space,Str "fisherman,",Space,Str "who",Space,Str "returns",Space,Str "at",Space,Str "nightfall."]]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "typist",Space,Str "home",Space,Str "at",Space,Str "teatime,",Space,Str "clears",Space,Str "her",Space,Str "breakfast,",Space,Str "lights"]] + ,Div ("",[],[]) + [Plain [Str "Her",Space,Str "stove,",Space,Str "and",Space,Str "lays",Space,Str "out",Space,Str "food",Space,Str "in",Space,Str "tins."]] + ,Div ("",[],[]) + [Plain [Str "Out",Space,Str "of",Space,Str "the",Space,Str "window",Space,Str "perilously",Space,Str "spread"]] + ,Div ("",[],[]) + [Plain [Str "Her",Space,Str "drying",Space,Str "combinations",Space,Str "touched",Space,Str "by",Space,Str "the",Space,Str "sun's",Space,Str "last",Space,Str "rays,"]] + ,Div ("",[],[]) + [Plain [Str "On",Space,Str "the",Space,Str "divan",Space,Str "are",Space,Str "piled",Space,Str "(at",Space,Str "night",Space,Str "her",Space,Str "bed)"]] + ,Div ("",[],[]) + [Plain [Str "Stockings,",Space,Str "slippers,",Space,Str "camisoles,",Space,Str "and",Space,Str "stays."]] + ,Div ("",[],[]) + [Plain [Str "I",Space,Str "Tiresias,",Space,Str "old",Space,Str "man",Space,Str "with",Space,Str "wrinkled",Space,Str "dugs"]] + ,Div ("",[],[]) + [Plain [Str "Perceived",Space,Str "the",Space,Str "scene,",Space,Str "and",Space,Str "foretold",Space,Str "the",Space,Str "rest",Space,Str "-"]] + ,Div ("",[],[]) + [Plain [Str "I",Space,Str "too",Space,Str "awaited",Space,Str "the",Space,Str "expected",Space,Str "guest.",Span ("",["lnum"],[]) [Str "230"]]] + ,Div ("",[],[]) + [Plain [Str "He,",Space,Str "the",Space,Str "young",Space,Str "man",Space,Str "carbuncular,",Space,Str "arrives,"]] + ,Div ("",[],[]) + [Plain [Str "A",Space,Str "small",Space,Str "house",Space,Str "agent's",Space,Str "clerk,",Space,Str "with",Space,Str "one",Space,Str "bold",Space,Str "stare,"]] + ,Div ("",[],[]) + [Plain [Str "One",Space,Str "of",Space,Str "the",Space,Str "low",Space,Str "on",Space,Str "whom",Space,Str "assurance",Space,Str "sits"]] + ,Div ("",[],[]) + [Plain [Str "As",Space,Str "a",Space,Str "silk",Space,Str "hat",Space,Str "on",Space,Str "a",Space,Str "Bradford",Space,Str "millionaire."]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "time",Space,Str "is",Space,Str "now",Space,Str "propitious,",Space,Str "as",Space,Str "he",Space,Str "guesses,"]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "meal",Space,Str "is",Space,Str "ended,",Space,Str "she",Space,Str "is",Space,Str "bored",Space,Str "and",Space,Str "tired,"]] + ,Div ("",[],[]) + [Plain [Str "Endeavours",Space,Str "to",Space,Str "engage",Space,Str "her",Space,Str "in",Space,Str "caresses"]] + ,Div ("",[],[]) + [Plain [Str "Which",Space,Str "still",Space,Str "are",Space,Str "unreproved,",Space,Str "if",Space,Str "undesired."]] + ,Div ("",[],[]) + [Plain [Str "Flushed",Space,Str "and",Space,Str "decided,",Space,Str "he",Space,Str "assaults",Space,Str "at",Space,Str "once;"]] + ,Div ("",[],[]) + [Plain [Str "Exploring",Space,Str "hands",Space,Str "encounter",Space,Str "no",Space,Str "defence;",Span ("",["lnum"],[]) [Str "240"]]] + ,Div ("",[],[]) + [Plain [Str "His",Space,Str "vanity",Space,Str "requires",Space,Str "no",Space,Str "response,"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "makes",Space,Str "a",Space,Str "welcome",Space,Str "of",Space,Str "indifference."]] + ,Div ("",[],[]) + [Plain [Str "(And",Space,Str "I",Space,Str "Tiresias",Space,Str "have",Space,Str "foresuffered",Space,Str "all"]] + ,Div ("",[],[]) + [Plain [Str "Enacted",Space,Str "on",Space,Str "this",Space,Str "same",Space,Str "divan",Space,Str "or",Space,Str "bed;"]] + ,Div ("",[],[]) + [Plain [Str "I",Space,Str "who",Space,Str "have",Space,Str "sat",Space,Str "by",Space,Str "Thebes",Space,Str "below",Space,Str "the",Space,Str "wall"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "walked",Space,Str "among",Space,Str "the",Space,Str "lowest",Space,Str "of",Space,Str "the",Space,Str "dead.)"]] + ,Div ("",[],[]) + [Plain [Str "Bestows",Space,Str "one",Space,Str "final",Space,Str "patronising",Space,Str "kiss,"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "gropes",Space,Str "his",Space,Str "way,",Space,Str "finding",Space,Str "the",Space,Str "stairs",Space,Str "unlit",Space,Str ".",Space,Str ".",Space,Str "."]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "She",Space,Str "turns",Space,Str "and",Space,Str "looks",Space,Str "a",Space,Str "moment",Space,Str "in",Space,Str "the",Space,Str "glass,"]] + ,Div ("",[],[]) + [Plain [Str "Hardly",Space,Str "aware",Space,Str "of",Space,Str "her",Space,Str "departed",Space,Str "lover;",Span ("",["lnum"],[]) [Str "250"]]] + ,Div ("",[],[]) + [Plain [Str "Her",Space,Str "brain",Space,Str "allows",Space,Str "one",Space,Str "half-formed",Space,Str "thought",Space,Str "to",Space,Str "pass:"]] + ,Div ("",[],[]) + [Plain [Str "\"Well",Space,Str "now",Space,Str "that's",Space,Str "done:",Space,Str "and",Space,Str "I'm",Space,Str "glad",Space,Str "it's",Space,Str "over.\""]] + ,Div ("wasteland-content.xhtml#ln253",[],[]) + [Plain [Str "When",Space,Str "lovely",Space,Str "woman",Space,Str "stoops",Space,Str "to",Space,Str "folly",Space,Str "and",Note [Para [Link ("",[],[]) [Str "253."] ("#wasteland-content.xhtml#ln253",""),Space,Str "V.",Space,Str "Goldsmith,",Space,Str "the",Space,Str "song",Space,Str "in",Space,Str "The",Space,Str "Vicar",Space,Str "of",Space,Str "Wakefield."]]] + ,Div ("",[],[]) + [Plain [Str "Paces",Space,Str "about",Space,Str "her",Space,Str "room",Space,Str "again,",Space,Str "alone,"]] + ,Div ("",[],[]) + [Plain [Str "She",Space,Str "smoothes",Space,Str "her",Space,Str "hair",Space,Str "with",Space,Str "automatic",Space,Str "hand,"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "puts",Space,Str "a",Space,Str "record",Space,Str "on",Space,Str "the",Space,Str "gramophone."]]] + ,Div ("",["linegroup"],[]) + [Div ("wasteland-content.xhtml#ln257",[],[]) + [Plain [Str "\"This",Space,Str "music",Space,Str "crept",Space,Str "by",Space,Str "me",Space,Str "upon",Space,Str "the",Space,Str "waters\"",Note [Para [Link ("",[],[]) [Str "257."] ("#wasteland-content.xhtml#ln257",""),Space,Str "V.",Space,Str "The",Space,Str "Tempest,",Space,Str "as",Space,Str "above."]]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "along",Space,Str "the",Space,Str "Strand,",Space,Str "up",Space,Str "Queen",Space,Str "Victoria",Space,Str "Street."]] + ,Div ("",[],[]) + [Plain [Str "O",Space,Str "City",Space,Str "city,",Space,Str "I",Space,Str "can",Space,Str "sometimes",Space,Str "hear"]] + ,Div ("",[],[]) + [Plain [Str "Beside",Space,Str "a",Space,Str "public",Space,Str "bar",Space,Str "in",Space,Str "Lower",Space,Str "Thames",Space,Str "Street,",Span ("",["lnum"],[]) [Str "260"]]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "pleasant",Space,Str "whining",Space,Str "of",Space,Str "a",Space,Str "mandoline"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "a",Space,Str "clatter",Space,Str "and",Space,Str "a",Space,Str "chatter",Space,Str "from",Space,Str "within"]] + ,Div ("",[],[]) + [Plain [Str "Where",Space,Str "fishmen",Space,Str "lounge",Space,Str "at",Space,Str "noon:",Space,Str "where",Space,Str "the",Space,Str "walls"]] + ,Div ("wasteland-content.xhtml#ln264",[],[]) + [Plain [Str "Of",Space,Str "Magnus",Space,Str "Martyr",Space,Str "hold",Note [Para [Link ("",[],[]) [Str "264."] ("#wasteland-content.xhtml#ln264",""),Space,Str "The",Space,Str "interior",Space,Str "of",Space,Str "St.",Space,Str "Magnus",Space,Str "Martyr",Space,Str "is",Space,Str "to",Space,Str "my",Space,Str "mind",Space,Str "one",Space,Str "of",Space,Str "the",Space,Str "finest",Space,Str "among",Space,Str "Wren's",Space,Str "interiors.",Space,Str "See",Space,Str "The",Space,Str "Proposed",Space,Str "Demolition",Space,Str "of",Space,Str "Nineteen",Space,Str "City",Space,Str "Churches",Space,Str "(P.",Space,Str "S.",Space,Str "King",Space,Str "&",Space,Str "Son,",Space,Str "Ltd.)."]]] + ,Div ("",[],[]) + [Plain [Str "Inexplicable",Space,Str "splendour",Space,Str "of",Space,Str "Ionian",Space,Str "white",Space,Str "and",Space,Str "gold."]]] + ,Div ("",["linegroup","indent"],[]) + [Div ("wasteland-content.xhtml#ln266",[],[]) + [Plain [Str "The",Space,Str "river",Space,Str "sweats",Note [Para [Link ("",[],[]) [Str "266."] ("#wasteland-content.xhtml#ln266",""),Space,Str "The",Space,Str "Song",Space,Str "of",Space,Str "the",Space,Str "(three)",Space,Str "Thames-daughters",Space,Str "begins",Space,Str "here.",Space,Str "From",Space,Str "line",Space,Str "292",Space,Str "to",Space,Str "306",Space,Str "inclusive",Space,Str "they",Space,Str "speak",Space,Str "in",Space,Str "turn.",Space,Str "V.",Space,Str "Gutterdsammerung,",Space,Str "III.",Space,Str "i:",Space,Str "the",Space,Str "Rhine-daughters."]]] + ,Div ("",[],[]) + [Plain [Str "Oil",Space,Str "and",Space,Str "tar"]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "barges",Space,Str "drift"]] + ,Div ("",[],[]) + [Plain [Str "With",Space,Str "the",Space,Str "turning",Space,Str "tide"]] + ,Div ("",[],[]) + [Plain [Str "Red",Space,Str "sails",Span ("",["lnum"],[]) [Str "270"]]] + ,Div ("",[],[]) + [Plain [Str "Wide"]] + ,Div ("",[],[]) + [Plain [Str "To",Space,Str "leeward,",Space,Str "swing",Space,Str "on",Space,Str "the",Space,Str "heavy",Space,Str "spar."]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "barges",Space,Str "wash"]] + ,Div ("",[],[]) + [Plain [Str "Drifting",Space,Str "logs"]] + ,Div ("",[],[]) + [Plain [Str "Down",Space,Str "Greenwich",Space,Str "reach"]] + ,Div ("",[],[]) + [Plain [Str "Past",Space,Str "the",Space,Str "Isle",Space,Str "of",Space,Str "Dogs."]] + ,Div ("",["indent"],[]) + [Plain [Str "Weialala",Space,Str "leia"]] + ,Div ("",["indent"],[]) + [Plain [Str "Wallala",Space,Str "leialala"]]] + ,Div ("",["linegroup","indent"],[]) + [Div ("wasteland-content.xhtml#ln279",[],[]) + [Plain [Str "Elizabeth",Space,Str "and",Space,Str "Leicester",Note [Para [Link ("",[],[]) [Str "279."] ("#wasteland-content.xhtml#ln279",""),Space,Str "V.",Space,Str "Froude,",Space,Str "Elizabeth,",Space,Str "Vol.",Space,Str "I,",Space,Str "ch.",Space,Str "iv,",Space,Str "letter",Space,Str "of",Space,Str "De",Space,Str "Quadra",Space,Str "to",Space,Str "Philip",Space,Str "of",Space,Str "Spain:"],BlockQuote [Div ("",[],[]) [Div ("",[],[]) [Plain [Str "\"In",Space,Str "the",Space,Str "afternoon",Space,Str "we",Space,Str "were",Space,Str "in",Space,Str "a",Space,Str "barge,",Space,Str "watching",Space,Str "the",Space,Str "games",Space,Str "on",Space,Str "the",Space,Str "river."]],Div ("",[],[]) [Plain [Str "(The",Space,Str "queen)",Space,Str "was",Space,Str "alone",Space,Str "with",Space,Str "Lord",Space,Str "Robert",Space,Str "and",Space,Str "myself",Space,Str "on",Space,Str "the",Space,Str "poop,"]],Div ("",[],[]) [Plain [Str "when",Space,Str "they",Space,Str "began",Space,Str "to",Space,Str "talk",Space,Str "nonsense,",Space,Str "and",Space,Str "went",Space,Str "so",Space,Str "far",Space,Str "that",Space,Str "Lord",Space,Str "Robert"]],Div ("",[],[]) [Plain [Str "at",Space,Str "last",Space,Str "said,",Space,Str "as",Space,Str "I",Space,Str "was",Space,Str "on",Space,Str "the",Space,Str "spot",Space,Str "there",Space,Str "was",Space,Str "no",Space,Str "reason",Space,Str "why",Space,Str "they"]],Div ("",[],[]) [Plain [Str "should",Space,Str "not",Space,Str "be",Space,Str "married",Space,Str "if",Space,Str "the",Space,Str "queen",Space,Str "pleased.\""]]]]]] + ,Div ("",[],[]) + [Plain [Str "Beating",Space,Str "oars",Span ("",["lnum"],[]) [Str "280"]]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "stern",Space,Str "was",Space,Str "formed"]] + ,Div ("",[],[]) + [Plain [Str "A",Space,Str "gilded",Space,Str "shell"]] + ,Div ("",[],[]) + [Plain [Str "Red",Space,Str "and",Space,Str "gold"]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "brisk",Space,Str "swell"]] + ,Div ("",[],[]) + [Plain [Str "Rippled",Space,Str "both",Space,Str "shores"]] + ,Div ("",[],[]) + [Plain [Str "Southwest",Space,Str "wind"]] + ,Div ("",[],[]) + [Plain [Str "Carried",Space,Str "down",Space,Str "stream"]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "peal",Space,Str "of",Space,Str "bells"]] + ,Div ("",[],[]) + [Plain [Str "White",Space,Str "towers"]] + ,Div ("",["indent"],[]) + [Plain [Str "Weialala",Space,Str "leia",Span ("",["lnum"],[]) [Str "290"]]] + ,Div ("",["indent"],[]) + [Plain [Str "Wallala",Space,Str "leialala"]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "\"Trams",Space,Str "and",Space,Str "dusty",Space,Str "trees."]] + ,Div ("wasteland-content.xhtml#ln293",[],[]) + [Plain [Str "Highbury",Space,Str "bore",Space,Str "me.",Space,Str "Richmond",Space,Str "and",Space,Str "Kew",Note [Para [Link ("",[],[]) [Str "293."] ("#wasteland-content.xhtml#ln293",""),Space,Str "Cf.",Space,Str "Purgatorio,",Space,Str "v.",Space,Str "133:"],BlockQuote [Para [Str "\"Ricorditi",Space,Str "di",Space,Str "me,",Space,Str "che",Space,Str "son",Space,Str "la",Space,Str "Pia;",LineBreak,Str "Siena",Space,Str "mi",Space,Str "fe',",Space,Str "disfecemi",Space,Str "Maremma.\""]]]] + ,Div ("",[],[]) + [Plain [Str "Undid",Space,Str "me.",Space,Str "By",Space,Str "Richmond",Space,Str "I",Space,Str "raised",Space,Str "my",Space,Str "knees"]] + ,Div ("",[],[]) + [Plain [Str "Supine",Space,Str "on",Space,Str "the",Space,Str "floor",Space,Str "of",Space,Str "a",Space,Str "narrow",Space,Str "canoe.\""]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "\"My",Space,Str "feet",Space,Str "are",Space,Str "at",Space,Str "Moorgate,",Space,Str "and",Space,Str "my",Space,Str "heart"]] + ,Div ("",[],[]) + [Plain [Str "Under",Space,Str "my",Space,Str "feet.",Space,Str "After",Space,Str "the",Space,Str "event"]] + ,Div ("",[],[]) + [Plain [Str "He",Space,Str "wept.",Space,Str "He",Space,Str "promised",Space,Str "'a",Space,Str "new",Space,Str "start'."]] + ,Div ("",[],[]) + [Plain [Str "I",Space,Str "made",Space,Str "no",Space,Str "comment.",Space,Str "What",Space,Str "should",Space,Str "I",Space,Str "resent?\""]] + ,Div ("",[],[]) + [Plain [Str "\"On",Space,Str "Margate",Space,Str "Sands.",Span ("",["lnum"],[]) [Str "300"]]] + ,Div ("",[],[]) + [Plain [Str "I",Space,Str "can",Space,Str "connect"]] + ,Div ("",[],[]) + [Plain [Str "Nothing",Space,Str "with",Space,Str "nothing."]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "broken",Space,Str "fingernails",Space,Str "of",Space,Str "dirty",Space,Str "hands."]] + ,Div ("",[],[]) + [Plain [Str "My",Space,Str "people",Space,Str "humble",Space,Str "people",Space,Str "who",Space,Str "expect"]] + ,Div ("",[],[]) + [Plain [Str "Nothing.\""]] + ,Div ("",["indent"],[]) + [Plain [Str "la",Space,Str "la"]]] + ,Div ("",["linegroup"],[]) + [Div ("wasteland-content.xhtml#ln307",[],[]) + [Plain [Str "To",Space,Str "Carthage",Space,Str "then",Space,Str "I",Space,Str "came",Note [Para [Link ("",[],[]) [Str "307."] ("#wasteland-content.xhtml#ln307",""),Space,Str "V.",Space,Str "St.",Space,Str "Augustine's",Space,Str "Confessions:",Space,Str "\"to",Space,Str "Carthage",Space,Str "then",Space,Str "I",Space,Str "came,",Space,Str "where",Space,Str "a",Space,Str "cauldron",Space,Str "of",Space,Str "unholy",Space,Str "loves",Space,Str "sang",Space,Str "all",Space,Str "about",Space,Str "mine",Space,Str "ears.\""]]] + ,Div ("",["linegroup"],[]) + [Div ("wasteland-content.xhtml#ln308",[],[]) + [Plain [Str "Burning",Space,Str "burning",Space,Str "burning",Space,Str "burning",Note [Para [Link ("",[],[]) [Str "308."] ("#wasteland-content.xhtml#ln308",""),Space,Str "The",Space,Str "complete",Space,Str "text",Space,Str "of",Space,Str "the",Space,Str "Buddha's",Space,Str "Fire",Space,Str "Sermon",Space,Str "(which",Space,Str "corresponds",Space,Str "in",Space,Str "importance",Space,Str "to",Space,Str "the",Space,Str "Sermon",Space,Str "on",Space,Str "the",Space,Str "Mount)",Space,Str "from",Space,Str "which",Space,Str "these",Space,Str "words",Space,Str "are",Space,Str "taken,",Space,Str "will",Space,Str "be",Space,Str "found",Space,Str "translated",Space,Str "in",Space,Str "the",Space,Str "late",Space,Str "Henry",Space,Str "Clarke",Space,Str "Warren's",Space,Str "Buddhism",Space,Str "in",Space,Str "Translation",Space,Str "(Harvard",Space,Str "Oriental",Space,Str "Series).",Space,Str "Mr.",Space,Str "Warren",Space,Str "was",Space,Str "one",Space,Str "of",Space,Str "the",Space,Str "great",Space,Str "pioneers",Space,Str "of",Space,Str "Buddhist",Space,Str "studies",Space,Str "in",Space,Str "the",Space,Str "Occident."]]] + ,Div ("wasteland-content.xhtml#ln309",[],[]) + [Plain [Str "O",Space,Str "Lord",Space,Str "Thou",Space,Str "pluckest",Space,Str "me",Space,Str "out",Note [Para [Link ("",[],[]) [Str "309."] ("#wasteland-content.xhtml#ln309",""),Space,Str "From",Space,Str "St.",Space,Str "Augustine's",Space,Str "Confessions",Space,Str "again.",Space,Str "The",Space,Str "collocation",Space,Str "of",Space,Str "these",Space,Str "two",Space,Str "representatives",Space,Str "of",Space,Str "eastern",Space,Str "and",Space,Str "western",Space,Str "asceticism,",Space,Str "as",Space,Str "the",Space,Str "culmination",Space,Str "of",Space,Str "this",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "poem,",Space,Str "is",Space,Str "not",Space,Str "an",Space,Str "accident."]]] + ,Div ("",[],[]) + [Plain [Str "O",Space,Str "Lord",Space,Str "Thou",Space,Str "pluckest",Span ("",["lnum"],[]) [Str "310"]]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "burning"]]] + ,RawBlock (Format "html") "</section>" + ,Div ("wasteland-content.xhtml#ch4",["section"],[]) + [Header 2 ("",[],[]) [Str "IV.",Space,Str "DEATH",Space,Str "BY",Space,Str "WATER"] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "Phlebas",Space,Str "the",Space,Str "Phoenician,",Space,Str "a",Space,Str "fortnight",Space,Str "dead,"]] + ,Div ("",[],[]) + [Plain [Str "Forgot",Space,Str "the",Space,Str "cry",Space,Str "of",Space,Str "gulls,",Space,Str "and",Space,Str "the",Space,Str "deep",Space,Str "sea",Space,Str "swell"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "the",Space,Str "profit",Space,Str "and",Space,Str "loss."]]] + ,Div ("",["linegroup"],[]) + [Div ("",["indent2"],[]) + [Plain [Str "A",Space,Str "current",Space,Str "under",Space,Str "sea"]] + ,Div ("",[],[]) + [Plain [Str "Picked",Space,Str "his",Space,Str "bones",Space,Str "in",Space,Str "whispers.",Space,Str "As",Space,Str "he",Space,Str "rose",Space,Str "and",Space,Str "fell"]] + ,Div ("",[],[]) + [Plain [Str "He",Space,Str "passed",Space,Str "the",Space,Str "stages",Space,Str "of",Space,Str "his",Space,Str "age",Space,Str "and",Space,Str "youth"]] + ,Div ("",[],[]) + [Plain [Str "Entering",Space,Str "the",Space,Str "whirlpool."]]] + ,Div ("",["linegroup"],[]) + [Div ("",["indent2"],[]) + [Plain [Str "Gentile",Space,Str "or",Space,Str "Jew"]] + ,Div ("",[],[]) + [Plain [Str "O",Space,Str "you",Space,Str "who",Space,Str "turn",Space,Str "the",Space,Str "wheel",Space,Str "and",Space,Str "look",Space,Str "to",Space,Str "windward,",Span ("",["lnum"],[]) [Str "320"]]] + ,Div ("",[],[]) + [Plain [Str "Consider",Space,Str "Phlebas,",Space,Str "who",Space,Str "was",Space,Str "once",Space,Str "handsome",Space,Str "and",Space,Str "tall",Space,Str "as",Space,Str "you."]]]] + ,Div ("wasteland-content.xhtml#ch5",["section"],[]) + [Header 2 ("",[],[]) [Str "V.",Space,Str "WHAT",Space,Str "THE",Space,Str "THUNDER",Space,Str "SAID"] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "After",Space,Str "the",Space,Str "torchlight",Space,Str "red",Space,Str "on",Space,Str "sweaty",Space,Str "faces"]] + ,Div ("",[],[]) + [Plain [Str "After",Space,Str "the",Space,Str "frosty",Space,Str "silence",Space,Str "in",Space,Str "the",Space,Str "gardens"]] + ,Div ("",[],[]) + [Plain [Str "After",Space,Str "the",Space,Str "agony",Space,Str "in",Space,Str "stony",Space,Str "places"]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "shouting",Space,Str "and",Space,Str "the",Space,Str "crying"]] + ,Div ("",[],[]) + [Plain [Str "Prison",Space,Str "and",Space,Str "palace",Space,Str "and",Space,Str "reverberation"]] + ,Div ("",[],[]) + [Plain [Str "Of",Space,Str "thunder",Space,Str "of",Space,Str "spring",Space,Str "over",Space,Str "distant",Space,Str "mountains"]] + ,Div ("",[],[]) + [Plain [Str "He",Space,Str "who",Space,Str "was",Space,Str "living",Space,Str "is",Space,Str "now",Space,Str "dead"]] + ,Div ("",[],[]) + [Plain [Str "We",Space,Str "who",Space,Str "were",Space,Str "living",Space,Str "are",Space,Str "now",Space,Str "dying"]] + ,Div ("",[],[]) + [Plain [Str "With",Space,Str "a",Space,Str "little",Space,Str "patience",Span ("",["lnum"],[]) [Str "330"]]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "Here",Space,Str "is",Space,Str "no",Space,Str "water",Space,Str "but",Space,Str "only",Space,Str "rock"]] + ,Div ("",[],[]) + [Plain [Str "Rock",Space,Str "and",Space,Str "no",Space,Str "water",Space,Str "and",Space,Str "the",Space,Str "sandy",Space,Str "road"]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "road",Space,Str "winding",Space,Str "above",Space,Str "among",Space,Str "the",Space,Str "mountains"]] + ,Div ("",[],[]) + [Plain [Str "Which",Space,Str "are",Space,Str "mountains",Space,Str "of",Space,Str "rock",Space,Str "without",Space,Str "water"]] + ,Div ("",[],[]) + [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "water",Space,Str "we",Space,Str "should",Space,Str "stop",Space,Str "and",Space,Str "drink"]] + ,Div ("",[],[]) + [Plain [Str "Amongst",Space,Str "the",Space,Str "rock",Space,Str "one",Space,Str "cannot",Space,Str "stop",Space,Str "or",Space,Str "think"]] + ,Div ("",[],[]) + [Plain [Str "Sweat",Space,Str "is",Space,Str "dry",Space,Str "and",Space,Str "feet",Space,Str "are",Space,Str "in",Space,Str "the",Space,Str "sand"]] + ,Div ("",[],[]) + [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "only",Space,Str "water",Space,Str "amongst",Space,Str "the",Space,Str "rock"]] + ,Div ("",[],[]) + [Plain [Str "Dead",Space,Str "mountain",Space,Str "mouth",Space,Str "of",Space,Str "carious",Space,Str "teeth",Space,Str "that",Space,Str "cannot",Space,Str "spit"]] + ,Div ("",[],[]) + [Plain [Str "Here",Space,Str "one",Space,Str "can",Space,Str "neither",Space,Str "stand",Space,Str "nor",Space,Str "lie",Space,Str "nor",Space,Str "sit",Span ("",["lnum"],[]) [Str "340"]]] + ,Div ("",[],[]) + [Plain [Str "There",Space,Str "is",Space,Str "not",Space,Str "even",Space,Str "silence",Space,Str "in",Space,Str "the",Space,Str "mountains"]] + ,Div ("",[],[]) + [Plain [Str "But",Space,Str "dry",Space,Str "sterile",Space,Str "thunder",Space,Str "without",Space,Str "rain"]] + ,Div ("",[],[]) + [Plain [Str "There",Space,Str "is",Space,Str "not",Space,Str "even",Space,Str "solitude",Space,Str "in",Space,Str "the",Space,Str "mountains"]] + ,Div ("",[],[]) + [Plain [Str "But",Space,Str "red",Space,Str "sullen",Space,Str "faces",Space,Str "sneer",Space,Str "and",Space,Str "snarl"]] + ,Div ("",[],[]) + [Plain [Str "From",Space,Str "doors",Space,Str "of",Space,Str "mudcracked",Space,Str "houses"]] + ,Div ("",["linegroup"],[]) + [Div ("",["indent2"],[]) + [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "water"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "no",Space,Str "rock"]] + ,Div ("",[],[]) + [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "rock"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "also",Space,Str "water"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "water",Span ("",["lnum"],[]) [Str "350"]]] + ,Div ("",[],[]) + [Plain [Str "A",Space,Str "spring"]] + ,Div ("",[],[]) + [Plain [Str "A",Space,Str "pool",Space,Str "among",Space,Str "the",Space,Str "rock"]] + ,Div ("",[],[]) + [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "the",Space,Str "sound",Space,Str "of",Space,Str "water",Space,Str "only"]] + ,Div ("",[],[]) + [Plain [Str "Not",Space,Str "the",Space,Str "cicada"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "dry",Space,Str "grass",Space,Str "singing"]] + ,Div ("",[],[]) + [Plain [Str "But",Space,Str "sound",Space,Str "of",Space,Str "water",Space,Str "over",Space,Str "a",Space,Str "rock"]] + ,Div ("wasteland-content.xhtml#ln357",[],[]) + [Plain [Str "Where",Space,Str "the",Space,Str "hermit-thrush",Space,Str "sings",Space,Str "in",Space,Str "the",Space,Str "pine",Space,Str "trees",Note [Para [Link ("",[],[]) [Str "357."] ("#wasteland-content.xhtml#ln357",""),Space,Str "This",Space,Str "is",Space,Str "Turdus",Space,Str "aonalaschkae",Space,Str "pallasii,",Space,Str "the",Space,Str "hermit-thrush",Space,Str "which",Space,Str "I",Space,Str "have",Space,Str "heard",Space,Str "in",Space,Str "Quebec",Space,Str "County.",Space,Str "Chapman",Space,Str "says",Space,Str "(Handbook",Space,Str "of",Space,Str "Birds",Space,Str "of",Space,Str "Eastern",Space,Str "North",Space,Str "America)",Space,Str "\"it",Space,Str "is",Space,Str "most",Space,Str "at",Space,Str "home",Space,Str "in",Space,Str "secluded",Space,Str "woodland",Space,Str "and",Space,Str "thickety",Space,Str "retreats.",Space,Str ".",Space,Str ".",Space,Str ".",Space,Str "Its",Space,Str "notes",Space,Str "are",Space,Str "not",Space,Str "remarkable",Space,Str "for",Space,Str "variety",Space,Str "or",Space,Str "volume,",Space,Str "but",Space,Str "in",Space,Str "purity",Space,Str "and",Space,Str "sweetness",Space,Str "of",Space,Str "tone",Space,Str "and",Space,Str "exquisite",Space,Str "modulation",Space,Str "they",Space,Str "are",Space,Str "unequalled.\"",Space,Str "Its",Space,Str "\"water-dripping",Space,Str "song\"",Space,Str "is",Space,Str "justly",Space,Str "celebrated."]]] + ,Div ("",[],[]) + [Plain [Str "Drip",Space,Str "drop",Space,Str "drip",Space,Str "drop",Space,Str "drop",Space,Str "drop",Space,Str "drop"]] + ,Div ("",[],[]) + [Plain [Str "But",Space,Str "there",Space,Str "is",Space,Str "no",Space,Str "water"]]]] + ,Div ("",["linegroup"],[]) + [Div ("wasteland-content.xhtml#ln360",[],[]) + [Plain [Str "Who",Space,Str "is",Space,Str "the",Space,Str "third",Space,Str "who",Space,Str "walks",Space,Str "always",Space,Str "beside",Space,Str "you?",Note [Para [Link ("",[],[]) [Str "360."] ("#wasteland-content.xhtml#ln360",""),Space,Str "The",Space,Str "following",Space,Str "lines",Space,Str "were",Space,Str "stimulated",Space,Str "by",Space,Str "the",Space,Str "account",Space,Str "of",Space,Str "one",Space,Str "of",Space,Str "the",Space,Str "Antarctic",Space,Str "expeditions",Space,Str "(I",Space,Str "forget",Space,Str "which,",Space,Str "but",Space,Str "I",Space,Str "think",Space,Str "one",Space,Str "of",Space,Str "Shackleton's):",Space,Str "it",Space,Str "was",Space,Str "related",Space,Str "that",Space,Str "the",Space,Str "party",Space,Str "of",Space,Str "explorers,",Space,Str "at",Space,Str "the",Space,Str "extremity",Space,Str "of",Space,Str "their",Space,Str "strength,",Space,Str "had",Space,Str "the",Space,Str "constant",Space,Str "delusion",Space,Str "that",Space,Str "there",Space,Str "was",Space,Str "one",Space,Str "more",Space,Str "member",Space,Str "than",Space,Str "could",Space,Str "actually",Space,Str "be",Space,Str "counted."]]] + ,Div ("",[],[]) + [Plain [Str "When",Space,Str "I",Space,Str "count,",Space,Str "there",Space,Str "are",Space,Str "only",Space,Str "you",Space,Str "and",Space,Str "I",Space,Str "together"]] + ,Div ("",[],[]) + [Plain [Str "But",Space,Str "when",Space,Str "I",Space,Str "look",Space,Str "ahead",Space,Str "up",Space,Str "the",Space,Str "white",Space,Str "road"]] + ,Div ("",[],[]) + [Plain [Str "There",Space,Str "is",Space,Str "always",Space,Str "another",Space,Str "one",Space,Str "walking",Space,Str "beside",Space,Str "you"]] + ,Div ("",[],[]) + [Plain [Str "Gliding",Space,Str "wrapt",Space,Str "in",Space,Str "a",Space,Str "brown",Space,Str "mantle,",Space,Str "hooded"]] + ,Div ("",[],[]) + [Plain [Str "I",Space,Str "do",Space,Str "not",Space,Str "know",Space,Str "whether",Space,Str "a",Space,Str "man",Space,Str "or",Space,Str "a",Space,Str "woman"]] + ,Div ("wasteland-content.xhtml#ln367",[],[]) + [Plain [Str "\8213But",Space,Str "who",Space,Str "is",Space,Str "that",Space,Str "on",Space,Str "the",Space,Str "other",Space,Str "side",Space,Str "of",Space,Str "you?",Note [Para [Link ("",[],[]) [Str "367-77."] ("#wasteland-content.xhtml#ln367",""),Space,Str "Cf.",Space,Str "Hermann",Space,Str "Hesse,",Space,Str "Blick",Space,Str "ins",Space,Str "Chaos:"],BlockQuote [Para [Str "\"Schon",Space,Str "ist",Space,Str "halb",Space,Str "Europa,",Space,Str "schon",Space,Str "ist",Space,Str "zumindest",Space,Str "der",Space,Str "halbe",Space,Str "Osten",Space,Str "Europas",Space,Str "auf",Space,Str "dem",LineBreak,Space,Str "Wege",Space,Str "zum",Space,Str "Chaos,",Space,Str "fhrt",Space,Str "betrunken",Space,Str "im",Space,Str "heiligem",Space,Str "Wahn",Space,Str "am",Space,Str "Abgrund",Space,Str "entlang",LineBreak,Space,Str "und",Space,Str "singt",Space,Str "dazu,",Space,Str "singt",Space,Str "betrunken",Space,Str "und",Space,Str "hymnisch",Space,Str "wie",Space,Str "Dmitri",Space,Str "Karamasoff",Space,Str "sang.",LineBreak,Space,Str "Ueber",Space,Str "diese",Space,Str "Lieder",Space,Str "lacht",Space,Str "der",Space,Str "Bsrger",Space,Str "beleidigt,",Space,Str "der",Space,Str "Heilige",LineBreak,Space,Str "und",Space,Str "Seher",Space,Str "hrt",Space,Str "sie",Space,Str "mit",Space,Str "Trvnen.\""]]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "What",Space,Str "is",Space,Str "that",Space,Str "sound",Space,Str "high",Space,Str "in",Space,Str "the",Space,Str "air"]] + ,Div ("",[],[]) + [Plain [Str "Murmur",Space,Str "of",Space,Str "maternal",Space,Str "lamentation"]] + ,Div ("",[],[]) + [Plain [Str "Who",Space,Str "are",Space,Str "those",Space,Str "hooded",Space,Str "hordes",Space,Str "swarming"]] + ,Div ("",[],[]) + [Plain [Str "Over",Space,Str "endless",Space,Str "plains,",Space,Str "stumbling",Space,Str "in",Space,Str "cracked",Space,Str "earth",Span ("",["lnum"],[]) [Str "370"]]] + ,Div ("",[],[]) + [Plain [Str "Ringed",Space,Str "by",Space,Str "the",Space,Str "flat",Space,Str "horizon",Space,Str "only"]] + ,Div ("",[],[]) + [Plain [Str "What",Space,Str "is",Space,Str "the",Space,Str "city",Space,Str "over",Space,Str "the",Space,Str "mountains"]] + ,Div ("",[],[]) + [Plain [Str "Cracks",Space,Str "and",Space,Str "reforms",Space,Str "and",Space,Str "bursts",Space,Str "in",Space,Str "the",Space,Str "violet",Space,Str "air"]] + ,Div ("",[],[]) + [Plain [Str "Falling",Space,Str "towers"]] + ,Div ("",[],[]) + [Plain [Str "Jerusalem",Space,Str "Athens",Space,Str "Alexandria"]] + ,Div ("",[],[]) + [Plain [Str "Vienna",Space,Str "London"]] + ,Div ("",[],[]) + [Plain [Str "Unreal"]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "A",Space,Str "woman",Space,Str "drew",Space,Str "her",Space,Str "long",Space,Str "black",Space,Str "hair",Space,Str "out",Space,Str "tight"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "fiddled",Space,Str "whisper",Space,Str "music",Space,Str "on",Space,Str "those",Space,Str "strings"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "bats",Space,Str "with",Space,Str "baby",Space,Str "faces",Space,Str "in",Space,Str "the",Space,Str "violet",Space,Str "light",Span ("",["lnum"],[]) [Str "380"]]] + ,Div ("",[],[]) + [Plain [Str "Whistled,",Space,Str "and",Space,Str "beat",Space,Str "their",Space,Str "wings"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "crawled",Space,Str "head",Space,Str "downward",Space,Str "down",Space,Str "a",Space,Str "blackened",Space,Str "wall"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "upside",Space,Str "down",Space,Str "in",Space,Str "air",Space,Str "were",Space,Str "towers"]] + ,Div ("",[],[]) + [Plain [Str "Tolling",Space,Str "reminiscent",Space,Str "bells,",Space,Str "that",Space,Str "kept",Space,Str "the",Space,Str "hours"]] + ,Div ("",[],[]) + [Plain [Str "And",Space,Str "voices",Space,Str "singing",Space,Str "out",Space,Str "of",Space,Str "empty",Space,Str "cisterns",Space,Str "and",Space,Str "exhausted",Space,Str "wells."]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "In",Space,Str "this",Space,Str "decayed",Space,Str "hole",Space,Str "among",Space,Str "the",Space,Str "mountains"]] + ,Div ("",[],[]) + [Plain [Str "In",Space,Str "the",Space,Str "faint",Space,Str "moonlight,",Space,Str "the",Space,Str "grass",Space,Str "is",Space,Str "singing"]] + ,Div ("",[],[]) + [Plain [Str "Over",Space,Str "the",Space,Str "tumbled",Space,Str "graves,",Space,Str "about",Space,Str "the",Space,Str "chapel"]] + ,Div ("",[],[]) + [Plain [Str "There",Space,Str "is",Space,Str "the",Space,Str "empty",Space,Str "chapel,",Space,Str "only",Space,Str "the",Space,Str "wind's",Space,Str "home."]] + ,Div ("",[],[]) + [Plain [Str "It",Space,Str "has",Space,Str "no",Space,Str "windows,",Space,Str "and",Space,Str "the",Space,Str "door",Space,Str "swings,",Span ("",["lnum"],[]) [Str "390"]]] + ,Div ("",[],[]) + [Plain [Str "Dry",Space,Str "bones",Space,Str "can",Space,Str "harm",Space,Str "no",Space,Str "one."]] + ,Div ("",[],[]) + [Plain [Str "Only",Space,Str "a",Space,Str "cock",Space,Str "stood",Space,Str "on",Space,Str "the",Space,Str "rooftree"]] + ,Div ("",[],[]) + [Plain [Str "Co",Space,Str "co",Space,Str "rico",Space,Str "co",Space,Str "co",Space,Str "rico"]] + ,Div ("",[],[]) + [Plain [Str "In",Space,Str "a",Space,Str "flash",Space,Str "of",Space,Str "lightning.",Space,Str "Then",Space,Str "a",Space,Str "damp",Space,Str "gust"]] + ,Div ("",[],[]) + [Plain [Str "Bringing",Space,Str "rain"]]] + ,Div ("",["linegroup"],[]) + [Div ("",[],[]) + [Plain [Str "Ganga",Space,Str "was",Space,Str "sunken,",Space,Str "and",Space,Str "the",Space,Str "limp",Space,Str "leaves"]] + ,Div ("",[],[]) + [Plain [Str "Waited",Space,Str "for",Space,Str "rain,",Space,Str "while",Space,Str "the",Space,Str "black",Space,Str "clouds"]] + ,Div ("",[],[]) + [Plain [Str "Gathered",Space,Str "far",Space,Str "distant,",Space,Str "over",Space,Str "Himavant."]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "jungle",Space,Str "crouched,",Space,Str "humped",Space,Str "in",Space,Str "silence."]] + ,Div ("",[],[]) + [Plain [Str "Then",Space,Str "spoke",Space,Str "the",Space,Str "thunder",Span ("",["lnum"],[]) [Str "400"]]] + ,Div ("",[],[]) + [Plain [Str "DA"]] + ,Div ("wasteland-content.xhtml#ln402",[],[]) + [Plain [Span ("",[],[("lang","sa")]) [Str "Datta"],Str ":",Space,Str "what",Space,Str "have",Space,Str "we",Space,Str "given?",Note [Para [Link ("",[],[]) [Str "402."] ("#wasteland-content.xhtml#ln402",""),Space,Quoted DoubleQuote [Str "\"Datta,",Space,Str "dayadhvam,",Space,Str "damyata\""],Space,Str "(Give,",Space,Str "sympathize,",Space,Str "control).",Space,Str "The",Space,Str "fable",Space,Str "of",Space,Str "the",Space,Str "meaning",Space,Str "of",Space,Str "the",Space,Str "Thunder",Space,Str "is",Space,Str "found",Space,Str "in",Space,Str "the",Space,Str "Brihadaranyaka-Upanishad,",Space,Str "5,",Space,Str "1.",Space,Str "A",Space,Str "translation",Space,Str "is",Space,Str "found",Space,Str "in",Space,Str "Deussen's",Space,Str "Sechzig",Space,Str "Upanishads",Space,Str "des",Space,Str "Veda,",Space,Str "p.",Space,Str "489."]]] + ,Div ("",[],[]) + [Plain [Str "My",Space,Str "friend,",Space,Str "blood",Space,Str "shaking",Space,Str "my",Space,Str "heart"]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "awful",Space,Str "daring",Space,Str "of",Space,Str "a",Space,Str "moment's",Space,Str "surrender"]] + ,Div ("",[],[]) + [Plain [Str "Which",Space,Str "an",Space,Str "age",Space,Str "of",Space,Str "prudence",Space,Str "can",Space,Str "never",Space,Str "retract"]] + ,Div ("",[],[]) + [Plain [Str "By",Space,Str "this,",Space,Str "and",Space,Str "this",Space,Str "only,",Space,Str "we",Space,Str "have",Space,Str "existed"]] + ,Div ("",[],[]) + [Plain [Str "Which",Space,Str "is",Space,Str "not",Space,Str "to",Space,Str "be",Space,Str "found",Space,Str "in",Space,Str "our",Space,Str "obituaries"]] + ,Div ("wasteland-content.xhtml#ln408",[],[]) + [Plain [Str "Or",Space,Str "in",Space,Str "memories",Space,Str "draped",Space,Str "by",Space,Str "the",Space,Str "beneficent",Space,Str "spider",Note [Para [Link ("",[],[]) [Str "408."] ("#wasteland-content.xhtml#ln408",""),Space,Str "Cf.",Space,Str "Webster,",Space,Str "The",Space,Str "White",Space,Str "Devil,",Space,Str "v.",Space,Str "vi:"],BlockQuote [Para [Str "\".",Space,Str ".",Space,Str ".",Space,Str "they'll",Space,Str "remarry",LineBreak,Space,Str "Ere",Space,Str "the",Space,Str "worm",Space,Str "pierce",Space,Str "your",Space,Str "winding-sheet,",Space,Str "ere",Space,Str "the",Space,Str "spider",LineBreak,Space,Str "Make",Space,Str "a",Space,Str "thin",Space,Str "curtain",Space,Str "for",Space,Str "your",Space,Str "epitaphs.\""]]]] + ,Div ("",[],[]) + [Plain [Str "Or",Space,Str "under",Space,Str "seals",Space,Str "broken",Space,Str "by",Space,Str "the",Space,Str "lean",Space,Str "solicitor"]] + ,Div ("",[],[]) + [Plain [Str "In",Space,Str "our",Space,Str "empty",Space,Str "rooms",Span ("",["lnum"],[]) [Str "410"]]] + ,Div ("",[],[]) + [Plain [Str "DA"]] + ,Div ("wasteland-content.xhtml#ln412",[],[]) + [Plain [Span ("",[],[("lang","sa")]) [Str "Dayadhvam"],Str ":",Space,Str "I",Space,Str "have",Space,Str "heard",Space,Str "the",Space,Str "key",Note [Para [Link ("",[],[]) [Str "412."] ("#wasteland-content.xhtml#ln412",""),Space,Str "Cf.",Space,Str "Inferno,",Space,Str "xxxiii.",Space,Str "46:"],BlockQuote [Para [Str "\"ed",Space,Str "io",Space,Str "sentii",Space,Str "chiavar",Space,Str "l'uscio",Space,Str "di",Space,Str "sotto",LineBreak,Space,Str "all'orribile",Space,Str "torre.\""]],Para [Str "Also",Space,Str "F.",Space,Str "H.",Space,Str "Bradley,",Space,Str "Appearance",Space,Str "and",Space,Str "Reality,",Space,Str "p.",Space,Str "346:"],BlockQuote [Para [Str "\"My",Space,Str "external",Space,Str "sensations",Space,Str "are",Space,Str "no",Space,Str "less",Space,Str "private",Space,Str "to",Space,Str "myself",Space,Str "than",Space,Str "are",Space,Str "my",Space,Str "thoughts",Space,Str "or",Space,Str "my",Space,Str "feelings.",Space,Str "In",Space,Str "either",Space,Str "case",Space,Str "my",Space,Str "experience",Space,Str "falls",Space,Str "within",Space,Str "my",Space,Str "own",Space,Str "circle,",Space,Str "a",Space,Str "circle",Space,Str "closed",Space,Str "on",Space,Str "the",Space,Str "outside;",Space,Str "and,",Space,Str "with",Space,Str "all",Space,Str "its",Space,Str "elements",Space,Str "alike,",Space,Str "every",Space,Str "sphere",Space,Str "is",Space,Str "opaque",Space,Str "to",Space,Str "the",Space,Str "others",Space,Str "which",Space,Str "surround",Space,Str "it.",Space,Str ".",Space,Str ".",Space,Str ".",Space,Str "In",Space,Str "brief,",Space,Str "regarded",Space,Str "as",Space,Str "an",Space,Str "existence",Space,Str "which",Space,Str "appears",Space,Str "in",Space,Str "a",Space,Str "soul,",Space,Str "the",Space,Str "whole",Space,Str "world",Space,Str "for",Space,Str "each",Space,Str "is",Space,Str "peculiar",Space,Str "and",Space,Str "private",Space,Str "to",Space,Str "that",Space,Str "soul.\""]]]] + ,Div ("",[],[]) + [Plain [Str "Turn",Space,Str "in",Space,Str "the",Space,Str "door",Space,Str "once",Space,Str "and",Space,Str "turn",Space,Str "once",Space,Str "only"]] + ,Div ("",[],[]) + [Plain [Str "We",Space,Str "think",Space,Str "of",Space,Str "the",Space,Str "key,",Space,Str "each",Space,Str "in",Space,Str "his",Space,Str "prison"]] + ,Div ("",[],[]) + [Plain [Str "Thinking",Space,Str "of",Space,Str "the",Space,Str "key,",Space,Str "each",Space,Str "confirms",Space,Str "a",Space,Str "prison"]] + ,Div ("",[],[]) + [Plain [Str "Only",Space,Str "at",Space,Str "nightfall,",Space,Str "aetherial",Space,Str "rumours"]] + ,Div ("",[],[]) + [Plain [Str "Revive",Space,Str "for",Space,Str "a",Space,Str "moment",Space,Str "a",Space,Str "broken",Space,Str "Coriolanus"]] + ,Div ("",[],[]) + [Plain [Str "DA"]] + ,Div ("",[],[]) + [Plain [Span ("",[],[("lang","sa")]) [Str "Damyata"],Str ":",Space,Str "The",Space,Str "boat",Space,Str "responded"]] + ,Div ("",[],[]) + [Plain [Str "Gaily,",Space,Str "to",Space,Str "the",Space,Str "hand",Space,Str "expert",Space,Str "with",Space,Str "sail",Space,Str "and",Space,Str "oar",Span ("",["lnum"],[]) [Str "420"]]] + ,Div ("",[],[]) + [Plain [Str "The",Space,Str "sea",Space,Str "was",Space,Str "calm,",Space,Str "your",Space,Str "heart",Space,Str "would",Space,Str "have",Space,Str "responded"]] + ,Div ("",[],[]) + [Plain [Str "Gaily,",Space,Str "when",Space,Str "invited,",Space,Str "beating",Space,Str "obedient"]] + ,Div ("",[],[]) + [Plain [Str "To",Space,Str "controlling",Space,Str "hands"]]] + ,Div ("",["linegroup"],[]) + [Div ("",["indent"],[]) + [Plain [Str "I",Space,Str "sat",Space,Str "upon",Space,Str "the",Space,Str "shore"]] + ,Div ("wasteland-content.xhtml#ln425",[],[]) + [Plain [Str "Fishing,",Space,Str "with",Space,Str "the",Space,Str "arid",Space,Str "plain",Space,Str "behind",Space,Str "me",Note [Para [Link ("",[],[]) [Str "425."] ("#wasteland-content.xhtml#ln425",""),Space,Str "V.",Space,Str "Weston,",Space,Str "From",Space,Str "Ritual",Space,Str "to",Space,Str "Romance;",Space,Str "chapter",Space,Str "on",Space,Str "the",Space,Str "Fisher",Space,Str "King."]]] + ,Div ("",[],[]) + [Plain [Str "Shall",Space,Str "I",Space,Str "at",Space,Str "least",Space,Str "set",Space,Str "my",Space,Str "lands",Space,Str "in",Space,Str "order?"]] + ,Div ("",[],[]) + [Plain [Str "London",Space,Str "Bridge",Space,Str "is",Space,Str "falling",Space,Str "down",Space,Str "falling",Space,Str "down",Space,Str "falling",Space,Str "down"]] + ,Div ("wasteland-content.xhtml#ln428",[],[("lang","it")]) + [Plain [Emph [Str "Poi",Space,Str "s'ascose",Space,Str "nel",Space,Str "foco",Space,Str "che",Space,Str "gli",Space,Str "affina"],Space,Note [Para [Link ("",[],[]) [Str "428."] ("#wasteland-content.xhtml#ln428",""),Space,Str "V.",Space,Str "Purgatorio,",Space,Str "xxvi.",Space,Str "148."],BlockQuote [Para [Str "\"'Ara",Space,Str "vos",Space,Str "prec",Space,Str "per",Space,Str "aquella",Space,Str "valor",LineBreak,Space,Str "'que",Space,Str "vos",Space,Str "guida",Space,Str "al",Space,Str "som",Space,Str "de",Space,Str "l'escalina,",LineBreak,Space,Str "'sovegna",Space,Str "vos",Space,Str "a",Space,Str "temps",Space,Str "de",Space,Str "ma",Space,Str "dolor.'",LineBreak,Space,Str "Poi",Space,Str "s'ascose",Space,Str "nel",Space,Str "foco",Space,Str "che",Space,Str "gli",Space,Str "affina.\""]]]] + ,Div ("wasteland-content.xhtml#ln429",[],[]) + [Plain [Span ("",[],[("lang","it")]) [Space,Emph [Str "Quando",Space,Str "fiam",Space,Str "ceu",Space,Str "chelidon"],Space],Space,Str "-",Space,Str "O",Space,Str "swallow",Space,Str "swallow",Note [Para [Link ("",[],[]) [Str "429."] ("#wasteland-content.xhtml#ln429",""),Space,Str "V.",Space,Str "Pervigilium",Space,Str "Veneris.",Space,Str "Cf.",Space,Str "Philomela",Space,Str "in",Space,Str "Parts",Space,Str "II",Space,Str "and",Space,Str "III."]]] + ,Div ("wasteland-content.xhtml#ln430",[],[("lang","fr")]) + [Plain [Emph [Str "Le",Space,Str "Prince",Space,Str "d'Aquitaine",Space,Str "a",Space,Str "la",Space,Str "tour",Space,Str "abolie"],Space,Note [Para [Link ("",[],[]) [Str "430."] ("#wasteland-content.xhtml#ln430",""),Space,Str "V.",Space,Str "Gerard",Space,Str "de",Space,Str "Nerval,",Space,Str "Sonnet",Space,Str "El",Space,Str "Desdichado."]]] + ,Div ("",[],[]) + [Plain [Str "These",Space,Str "fragments",Space,Str "I",Space,Str "have",Space,Str "shored",Space,Str "against",Space,Str "my",Space,Str "ruins"]] + ,Div ("wasteland-content.xhtml#ln432",[],[]) + [Plain [Str "Why",Space,Str "then",Space,Str "Ile",Space,Str "fit",Space,Str "you.",Space,Str "Hieronymo's",Space,Str "mad",Space,Str "againe.",Note [Para [Link ("",[],[]) [Str "432."] ("#wasteland-content.xhtml#ln432",""),Space,Str "V.",Space,Str "Kyd's",Space,Str "Spanish",Space,Str "Tragedy."]]] + ,Div ("",[],[("lang","sa")]) + [Plain [Str "Datta.",Space,Str "Dayadhvam.",Space,Str "Damyata."]] + ,Div ("wasteland-content.xhtml#ln434",["linegroup","indent"],[]) + [Plain [Span ("",[],[("lang","sa")]) [Str "Shantih",Space,Str "shantih",Space,Str "shantih",Note [Para [Link ("",[],[]) [Str "434."] ("#wasteland-content.xhtml#ln434",""),Space,Str "Shantih.",Space,Str "Repeated",Space,Str "as",Space,Str "here,",Space,Str "a",Space,Str "formal",Space,Str "ending",Space,Str "to",Space,Str "an",Space,Str "Upanishad.",Space,Str "'The",Space,Str "Peace",Space,Str "which",Space,Str "passeth",Space,Str "understanding'",Space,Str "is",Space,Str "a",Space,Str "feeble",Space,Str "translation",Space,Str "of",Space,Str "the",Space,Str "content",Space,Str "of",Space,Str "this",Space,Str "word."]]]] + ,Div ("wasteland-content.xhtml#backmatter",["section"],[("type","backmatter")]) + [Div ("wasteland-content.xhtml#rearnotes",["section"],[("type","rearnotes")]) + [Header 2 ("",[],[]) [Str "NOTES",Space,Str "ON",Space,Str "\"THE",Space,Str "WASTE",Space,Str "LAND\""] + ,Para [Str "Not",Space,Str "only",Space,Str "the",Space,Str "title,",Space,Str "but",Space,Str "the",Space,Str "plan",Space,Str "and",Space,Str "a",Space,Str "good",Space,Str "deal",Space,Str "of",Space,Str "the",Space,Str "incidental",Space,Str "symbolism",Space,Str "of",Space,Str "the",Space,Str "poem",Space,Str "were",Space,Str "suggested",Space,Str "by",Space,Str "Miss",Space,Str "Jessie",Space,Str "L.",Space,Str "Weston's",Space,Str "book",Space,Str "on",Space,Str "the",Space,Str "Grail",Space,Str "legend:",Space,Str "From",Space,Str "Ritual",Space,Str "to",Space,Str "Romance"] + ,Para [Str "Indeed,",Space,Str "so",Space,Str "deeply",Space,Str "am",Space,Str "I",Space,Str "indebted,",Space,Str "Miss",Space,Str "Weston's",Space,Str "book",Space,Str "will",Space,Str "elucidate",Space,Str "the",Space,Str "difficulties",Space,Str "of",Space,Str "the",Space,Str "poem",Space,Str "much",Space,Str "better",Space,Str "than",Space,Str "my",Space,Str "notes",Space,Str "can",Space,Str "do;",Space,Str "and",Space,Str "I",Space,Str "recommend",Space,Str "it",Space,Str "(apart",Space,Str "from",Space,Str "the",Space,Str "great",Space,Str "interest",Space,Str "of",Space,Str "the",Space,Str "book",Space,Str "itself)",Space,Str "to",Space,Str "any",Space,Str "who",Space,Str "think",Space,Str "such",Space,Str "elucidation",Space,Str "of",Space,Str "the",Space,Str "poem",Space,Str "worth",Space,Str "the",Space,Str "trouble.",Space,Str "To",Space,Str "another",Space,Str "work",Space,Str "of",Space,Str "anthropology",Space,Str "I",Space,Str "am",Space,Str "indebted",Space,Str "in",Space,Str "general,",Space,Str "one",Space,Str "which",Space,Str "has",Space,Str "influenced",Space,Str "our",Space,Str "generation",Space,Str "profoundly;",Space,Str "I",Space,Str "mean",Space,Str "The",Space,Str "Golden",Space,Str "Bough;",Space,Str "I",Space,Str "have",Space,Str "used",Space,Str "especially",Space,Str "the",Space,Str "two",Space,Str "volumes",Space,Str "Adonis,",Space,Str "Attis,",Space,Str "Osiris.",Space,Str "Anyone",Space,Str "who",Space,Str "is",Space,Str "acquainted",Space,Str "with",Space,Str "these",Space,Str "works",Space,Str "will",Space,Str "immediately",Space,Str "recognise",Space,Str "in",Space,Str "the",Space,Str "poem",Space,Str "certain",Space,Str "references",Space,Str "to",Space,Str "vegetation",Space,Str "ceremonies."] + ,Div ("",["section"],[]) + [Header 3 ("",[],[]) [Str "I.",Space,Str "THE",Space,Str "BURIAL",Space,Str "OF",Space,Str "THE",Space,Str "DEAD"]] + ,Div ("",["section"],[]) + [Header 3 ("",[],[]) [Str "II.",Space,Str "A",Space,Str "GAME",Space,Str "OF",Space,Str "CHESS"]] + ,Div ("",["section"],[]) + [Header 3 ("",[],[]) [Str "III.",Space,Str "THE",Space,Str "FIRE",Space,Str "SERMON"]] + ,Div ("",["section"],[]) + [Header 3 ("",[],[]) [Str "V.",Space,Str "WHAT",Space,Str "THE",Space,Str "THUNDER",Space,Str "SAID"] + ,Para [Str "In",Space,Str "the",Space,Str "first",Space,Str "part",Space,Str "of",Space,Str "Part",Space,Str "V",Space,Str "three",Space,Str "themes",Space,Str "are",Space,Str "employed:",Space,Str "the",Space,Str "journey",Space,Str "to",Space,Str "Emmaus,",Space,Str "the",Space,Str "approach",Space,Str "to",Space,Str "the",Space,Str "Chapel",Space,Str "Perilous",Space,Str "(see",Space,Str "Miss",Space,Str "Weston's",Space,Str "book)",Space,Str "and",Space,Str "the",Space,Str "present",Space,Str "decay",Space,Str "of",Space,Str "eastern",Space,Str "Europe."]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] diff --git a/tests/html-reader.html b/tests/html-reader.html index b6dd50fcc..3bd5e4ce3 100644 --- a/tests/html-reader.html +++ b/tests/html-reader.html @@ -185,6 +185,13 @@ These should not be escaped: \$ \\ \> \[ \{ <li><p>Item 3.</p> </li> </ol> +<p>List styles:</p> +<ol></ol> +<ol type="i"></ol> +<ol class="lower-roman"></ol> +<ol style="lower-roman"></ol> +<ol style="list-style: lower-roman;"></ol> +<ol style="list-style-type: lower-roman;"></ol> <h2>Nested</h2> <ul> <li>Tab<ul> diff --git a/tests/html-reader.native b/tests/html-reader.native index 09a51a7a3..ced8e31ec 100644 --- a/tests/html-reader.native +++ b/tests/html-reader.native @@ -1,25 +1,25 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]}) [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber's",Space,Str "markdown",Space,Str "test",Space,Str "suite."] ,HorizontalRule -,Header 1 ("",[],[]) [Str "Headers"] -,Header 2 ("",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link ("",[],[]) [Str "embedded",Space,Str "link"] ("/url","")] -,Header 3 ("",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]] -,Header 4 ("",[],[]) [Str "Level",Space,Str "4"] -,Header 5 ("",[],[]) [Str "Level",Space,Str "5"] -,Header 1 ("",[],[]) [Str "Level",Space,Str "1"] -,Header 2 ("",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]] -,Header 3 ("",[],[]) [Str "Level",Space,Str "3"] +,Header 1 ("headers",[],[]) [Str "Headers"] +,Header 2 ("level-2-with-an-embedded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link ("",[],[]) [Str "embedded",Space,Str "link"] ("/url","")] +,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]] +,Header 4 ("level-4",[],[]) [Str "Level",Space,Str "4"] +,Header 5 ("level-5",[],[]) [Str "Level",Space,Str "5"] +,Header 1 ("level-1",[],[]) [Str "Level",Space,Str "1"] +,Header 2 ("level-2-with-emphasis",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]] +,Header 3 ("level-3",[],[]) [Str "Level",Space,Str "3"] ,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"] -,Header 2 ("",[],[]) [Str "Level",Space,Str "2"] +,Header 2 ("level-2",[],[]) [Str "Level",Space,Str "2"] ,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"] ,HorizontalRule -,Header 1 ("",[],[]) [Str "Paragraphs"] +,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"] ,Para [Str "Here's",Space,Str "a",Space,Str "regular",Space,Str "paragraph."] ,Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",Space,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",Space,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item."] ,Para [Str "Here's",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."] ,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Space,Str "here."] ,HorizontalRule -,Header 1 ("",[],[]) [Str "Block",Space,Str "Quotes"] +,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"] ,Para [Str "E-mail",Space,Str "style:"] ,BlockQuote [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]] @@ -51,14 +51,14 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl [Para [Str "Don't",Space,Str "quote",Space,Str "me."]]] ,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."] ,HorizontalRule -,Header 1 ("",[],[]) [Str "Code",Space,Str "Blocks"] +,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"] ,Para [Str "Code:"] ,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab" ,Para [Str "And:"] ,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{" ,HorizontalRule -,Header 1 ("",[],[]) [Str "Lists"] -,Header 2 ("",[],[]) [Str "Unordered"] +,Header 1 ("lists",[],[]) [Str "Lists"] +,Header 2 ("unordered",[],[]) [Str "Unordered"] ,Para [Str "Asterisks",Space,Str "tight:"] ,BulletList [[Plain [Str "asterisk",Space,Str "1"]] @@ -89,7 +89,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl [[Para [Str "Minus",Space,Str "1"]] ,[Para [Str "Minus",Space,Str "2"]] ,[Para [Str "Minus",Space,Str "3"]]] -,Header 2 ("",[],[]) [Str "Ordered"] +,Header 2 ("ordered",[],[]) [Str "Ordered"] ,Para [Str "Tight:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "First"]] @@ -116,7 +116,20 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog's",Space,Str "back."]] ,[Para [Str "Item",Space,Str "2."]] ,[Para [Str "Item",Space,Str "3."]]] -,Header 2 ("",[],[]) [Str "Nested"] +,Para [Str "List",Space,Str "styles:"] +,OrderedList (1,DefaultStyle,DefaultDelim) + [] +,OrderedList (1,LowerRoman,DefaultDelim) + [] +,OrderedList (1,LowerRoman,DefaultDelim) + [] +,OrderedList (1,DefaultStyle,DefaultDelim) + [] +,OrderedList (1,LowerRoman,DefaultDelim) + [] +,OrderedList (1,LowerRoman,DefaultDelim) + [] +,Header 2 ("nested",[],[]) [Str "Nested"] ,BulletList [[Plain [Str "Tab"] ,BulletList @@ -141,7 +154,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,[Plain [Str "Fie"]] ,[Plain [Str "Foe"]]]] ,[Para [Str "Third"]]] -,Header 2 ("",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"] +,Header 2 ("tabs-and-spaces",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"] ,BulletList [[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]] ,[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"] @@ -175,7 +188,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "Nested."]]]]] ,HorizontalRule -,Header 2 ("",[],[]) [Str "Definition"] +,Header 2 ("definition",[],[]) [Str "Definition"] ,DefinitionList [([Str "Violin"], [[Plain [Str "Stringed",Space,Str "musical",Space,Str "instrument."]] @@ -183,7 +196,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,([Str "Cello",LineBreak,Str "Violoncello"], [[Plain [Str "Low-voiced",Space,Str "stringed",Space,Str "instrument."]]])] ,HorizontalRule -,Header 1 ("",[],[]) [Str "Inline",Space,Str "Markup"] +,Header 1 ("inline-markup",[],[]) [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 "."] ,Para [Str "Empty",Space,Strong [],Space,Str "and",Space,Emph [],Str "."] @@ -195,7 +208,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."] ,Para [Str "This",Space,Str "is",Space,SmallCaps [Str "small",Space,Str "caps"],Str "."] ,HorizontalRule -,Header 1 ("",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"] +,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"] ,Para [Str "\"Hello,\"",Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Str "\"'Shelob'",Space,Str "is",Space,Str "my",Space,Str "name.\""] ,Para [Str "'A',",Space,Str "'B',",Space,Str "and",Space,Str "'C'",Space,Str "are",Space,Str "letters."] ,Para [Str "'Oak,'",Space,Str "'elm,'",Space,Str "and",Space,Str "'beech'",Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",Space,Str "So",Space,Str "is",Space,Str "'pine.'"] @@ -205,7 +218,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5-7,",Space,Str "255-66,",Space,Str "1987-1999."] ,Para [Str "Ellipses...and.",Space,Str ".",Space,Str ".and",Space,Str ".",Space,Str ".",Space,Str ".",Space,Str "."] ,HorizontalRule -,Header 1 ("",[],[]) [Str "LaTeX"] +,Header 1 ("latex",[],[]) [Str "LaTeX"] ,BulletList [[Plain [Str "\\cite[22-23]{smith.1899}"]] ,[Plain [Str "\\doublespacing"]] @@ -224,7 +237,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,Para [Str "Here's",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"] ,Para [Str "\\begin{tabular}{|l|l|}\\hline",Space,Str "Animal",Space,Str "&",Space,Str "Number",Space,Str "\\\\",Space,Str "\\hline",Space,Str "Dog",Space,Str "&",Space,Str "2",Space,Str "\\\\",Space,Str "Cat",Space,Str "&",Space,Str "1",Space,Str "\\\\",Space,Str "\\hline",Space,Str "\\end{tabular}"] ,HorizontalRule -,Header 1 ("",[],[]) [Str "Special",Space,Str "Characters"] +,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"] ,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"] ,BulletList [[Plain [Str "I",Space,Str "hat:",Space,Str "\206"]] @@ -254,8 +267,8 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,Para [Str "Plus:",Space,Str "+"] ,Para [Str "Minus:",Space,Str "-"] ,HorizontalRule -,Header 1 ("",[],[]) [Str "Links"] -,Header 2 ("",[],[]) [Str "Explicit"] +,Header 1 ("links",[],[]) [Str "Links"] +,Header 2 ("explicit",[],[]) [Str "Explicit"] ,Para [Str "Just",Space,Str "a",Space,Link ("",[],[]) [Str "URL"] ("/url/",""),Str "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title"),Str "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by two spaces"),Str "."] @@ -264,7 +277,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")] ,Para [Str "Email",Space,Str "link",Space,Str "(nobody",Space,Str "[at]",Space,Str "nowhere.net)"] ,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."] -,Header 2 ("",[],[]) [Str "Reference"] +,Header 2 ("reference",[],[]) [Str "Reference"] ,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."] ,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."] ,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."] @@ -277,12 +290,12 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,CodeBlock ("",[],[]) "[not]: /url" ,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/","Title with \"quotes\" inside"),Str "."] ,Para [Str "Foo",Space,Link ("",[],[]) [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."] -,Header 2 ("",[],[]) [Str "With",Space,Str "ampersands"] +,Header 2 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"] ,Para [Str "Here's",Space,Str "a",Space,Link ("",[],[]) [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."] ,Para [Str "Here's",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link ("",[],[]) [Str "AT&T"] ("http://att.com/","AT&T"),Str "."] ,Para [Str "Here's",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."] ,Para [Str "Here's",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."] -,Header 2 ("",[],[]) [Str "Autolinks"] +,Header 2 ("autolinks",[],[]) [Str "Autolinks"] ,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link ("",[],[]) [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")] ,BulletList [[Plain [Str "In",Space,Str "a",Space,Str "list?"]] @@ -294,12 +307,12 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"] ,CodeBlock ("",[],[]) "or here: <http://example.com/>" ,HorizontalRule -,Header 1 ("",[],[]) [Str "Images"] +,Header 1 ("images",[],[]) [Str "Images"] ,Para [Str "From",Space,Str "\"Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune\"",Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"] ,Para [Image ("",[],[]) [Str "lalune"] ("lalune.jpg","Voyage dans la Lune")] ,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image ("",[],[]) [Str "movie"] ("movie.jpg",""),Space,Str "icon."] ,HorizontalRule -,Header 1 ("",[],[]) [Str "Footnotes"] +,Header 1 ("footnotes",[],[]) [Str "Footnotes"] ,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",Link ("",[],[]) [Str "(1)"] ("#note_1",""),Str ",",Space,Str "and",Space,Str "another",Link ("",[],[]) [Str "(longnote)"] ("#note_longnote",""),Str ".",Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space^(my",Space,Str "note)."] ,Para [Link ("",[],[]) [Str "(1)"] ("#ref_1",""),Space,Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "in",Space,Str "the",Space,Str "document,",Space,Str "not",Space,Str "just",Space,Str "at",Space,Str "the",Space,Str "end."] ,Para [Link ("",[],[]) [Str "(longnote)"] ("#ref_longnote",""),Space,Str "Here's",Space,Str "the",Space,Str "other",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."] @@ -310,8 +323,8 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,Para [Emph [Str "Trailing",Space,Str "space"],Space,Str "text"] ,Para [Str "text",Space,Emph [Str "Leading",Space,Str "spaces"]] ,Para [Emph [Str "Trailing",Space,Str "spaces"],Space,Str "text"] -,Header 1 ("",[],[]) [Str "Tables"] -,Header 2 ("",[],[]) [Str "Tables",Space,Str "with",Space,Str "Headers"] +,Header 1 ("tables",[],[]) [Str "Tables"] +,Header 2 ("tables-with-headers",[],[]) [Str "Tables",Space,Str "with",Space,Str "Headers"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[Plain [Str "X"]] ,[Plain [Str "Y"]] @@ -410,7 +423,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] -,Header 2 ("",[],[]) [Str "Tables",Space,Str "without",Space,Str "Headers"] +,Header 2 ("tables-without-headers",[],[]) [Str "Tables",Space,Str "without",Space,Str "Headers"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [] [[[Plain [Str "1"]] @@ -446,5 +459,5 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] -,Header 2 ("",[],[]) [Str "Empty",Space,Str "Tables"] +,Header 2 ("empty-tables",[],[]) [Str "Empty",Space,Str "Tables"] ,Para [Str "This",Space,Str "section",Space,Str "should",Space,Str "be",Space,Str "empty."]] diff --git a/tests/lhs-test.latex b/tests/lhs-test.latex index 626a74cfa..f7b6eb2d7 100644 --- a/tests/lhs-test.latex +++ b/tests/lhs-test.latex @@ -9,11 +9,10 @@ \else % if luatex or xelatex \ifxetex \usepackage{mathspec} - \usepackage{xltxtra,xunicode} \else \usepackage{fontspec} \fi - \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} + \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} \newcommand{\euro}{€} \fi % use upquote if available, for straight quotes in verbatim environments @@ -23,23 +22,11 @@ \usepackage{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} -\ifxetex - \usepackage[setpagesize=false, % page size defined by xetex - unicode=false, % unicode breaks when used with xetex - xetex]{hyperref} -\else - \usepackage[unicode=true]{hyperref} -\fi -\usepackage[usenames,dvipsnames]{color} -\hypersetup{breaklinks=true, - bookmarks=true, - pdfauthor={}, - pdftitle={}, - colorlinks=true, - citecolor=blue, - urlcolor=blue, - linkcolor=magenta, - pdfborder={0 0 0}} +\usepackage{hyperref} +\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref +\hypersetup{unicode=true, + pdfborder={0 0 0}, + breaklinks=true} \urlstyle{same} % don't use monospace font for urls \usepackage{color} \usepackage{fancyvrb} diff --git a/tests/lhs-test.latex+lhs b/tests/lhs-test.latex+lhs index 029789ba8..c9501a2cb 100644 --- a/tests/lhs-test.latex+lhs +++ b/tests/lhs-test.latex+lhs @@ -9,11 +9,10 @@ \else % if luatex or xelatex \ifxetex \usepackage{mathspec} - \usepackage{xltxtra,xunicode} \else \usepackage{fontspec} \fi - \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} + \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} \newcommand{\euro}{€} \fi % use upquote if available, for straight quotes in verbatim environments @@ -23,23 +22,11 @@ \usepackage{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} -\ifxetex - \usepackage[setpagesize=false, % page size defined by xetex - unicode=false, % unicode breaks when used with xetex - xetex]{hyperref} -\else - \usepackage[unicode=true]{hyperref} -\fi -\usepackage[usenames,dvipsnames]{color} -\hypersetup{breaklinks=true, - bookmarks=true, - pdfauthor={}, - pdftitle={}, - colorlinks=true, - citecolor=blue, - urlcolor=blue, - linkcolor=magenta, - pdfborder={0 0 0}} +\usepackage{hyperref} +\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref +\hypersetup{unicode=true, + pdfborder={0 0 0}, + breaklinks=true} \urlstyle{same} % don't use monospace font for urls \usepackage{listings} \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} diff --git a/tests/media/rId25.jpg b/tests/media/rId25.jpg Binary files differindex e69de29bb..277ace7d1 100644 --- a/tests/media/rId25.jpg +++ b/tests/media/rId25.jpg diff --git a/tests/media/rId26.jpg b/tests/media/rId26.jpg Binary files differindex e69de29bb..277ace7d1 100644 --- a/tests/media/rId26.jpg +++ b/tests/media/rId26.jpg diff --git a/tests/media/rId27.jpg b/tests/media/rId27.jpg Binary files differindex e69de29bb..277ace7d1 100644 --- a/tests/media/rId27.jpg +++ b/tests/media/rId27.jpg diff --git a/tests/mediawiki-reader.wiki b/tests/mediawiki-reader.wiki index 2820ed171..862bb3b48 100644 --- a/tests/mediawiki-reader.wiki +++ b/tests/mediawiki-reader.wiki @@ -348,7 +348,7 @@ and cheese | Butter || Ice cream || and more |} -{|width="50%" +{|width=50% ! align="left" width="50%"| Left ! align="right"|Right ! align="center"|Center diff --git a/tests/pipe-tables.native b/tests/pipe-tables.native index eafd21d22..f52175ff0 100644 --- a/tests/pipe-tables.native +++ b/tests/pipe-tables.native @@ -75,4 +75,23 @@ ,Para [Str "Header-less",Space,Str "one-column:"] ,Table [] [AlignCenter] [0.0] [[]] - [[[Plain [Str "hi"]]]]] + [[[Plain [Str "hi"]]]] +,Para [Str "Indented",Space,Str "left",Space,Str "column:"] +,Table [] [AlignRight,AlignLeft] [0.0,0.0] + [[Plain [Str "Number",Space,Str "of",Space,Str "siblings"]] + ,[Plain [Str "Salary"]]] + [[[Plain [Str "3"]] + ,[Plain [Str "33"]]] + ,[[Plain [Str "4"]] + ,[Plain [Str "44"]]]] +,Para [Str "Long",Space,Str "pipe",Space,Str "table",Space,Str "with",Space,Str "relative",Space,Str "widths:"] +,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.125,0.1375,0.5] + [[Plain [Str "Default1"]] + ,[Plain [Str "Default2"]] + ,[Plain [Str "Default3"]]] + [[[Plain [Str "123"]] + ,[Plain [Str "this",Space,Str "is",Space,Str "a",Space,Str "table",Space,Str "cell"]] + ,[Plain [Str "and",Space,Str "this",Space,Str "is",Space,Str "a",Space,Str "really",Space,Str "long",Space,Str "table",Space,Str "cell",Space,Str "that",Space,Str "will",Space,Str "probably",Space,Str "need",Space,Str "wrapping"]]] + ,[[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]]]]] diff --git a/tests/pipe-tables.txt b/tests/pipe-tables.txt index 83debd595..a5984b99b 100644 --- a/tests/pipe-tables.txt +++ b/tests/pipe-tables.txt @@ -52,3 +52,17 @@ Header-less one-column: | | |:-:| |hi| + +Indented left column: + +Number of siblings | Salary +------------------:|:------ + 3 | 33 + 4 | 44 + +Long pipe table with relative widths: + +| Default1 | Default2 | Default3 | + |---------|----------|---------------------------------------| +|123|this is a table cell|and this is a really long table cell that will probably need wrapping| +|123|123|123| diff --git a/tests/rst-reader.native b/tests/rst-reader.native index 6b52c5728..9e373a466 100644 --- a/tests/rst-reader.native +++ b/tests/rst-reader.native @@ -325,7 +325,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa ,Para [Str "And",Space,Str "some",Space,Str "inline",Space,Str "haskell",Space,Code ("",["haskell","sourceCode"],[]) "fmap id [1,2..10]",Str "."] ,Null ,Null -,Para [Str "Indirect",Space,Str "python",Space,Str "role",Space,Code ("",["python","indirect","sourceCode"],[]) "[x*x for x in [1,2,3,4,5]]",Str "."] +,Para [Str "Indirect",Space,Str "python",Space,Str "role",Space,Code ("",["py","python","indirect","sourceCode"],[]) "[x*x for x in [1,2,3,4,5]]",Str "."] ,Null ,Null ,Para [Str "Different",Space,Str "indirect",Space,Str "C",Space,Code ("",["c","different-indirect","sourceCode"],[]) "int x = 15;",Str "."] diff --git a/tests/rst-reader.rst b/tests/rst-reader.rst index 930bf2ed2..ff10abe24 100644 --- a/tests/rst-reader.rst +++ b/tests/rst-reader.rst @@ -611,10 +611,10 @@ And some inline haskell :haskell:`fmap id [1,2..10]`. .. role:: indirect(code) -.. role:: python(indirect) +.. role:: py(indirect) :language: python -Indirect python role :python:`[x*x for x in [1,2,3,4,5]]`. +Indirect python role :py:`[x*x for x in [1,2,3,4,5]]`. .. role:: different-indirect(code) :language: c diff --git a/tests/s5-basic.html b/tests/s5-basic.html index ac153d0f1..6fb57e4aa 100644 --- a/tests/s5-basic.html +++ b/tests/s5-basic.html @@ -4,7 +4,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="generator" content="pandoc" /> + <meta name="version" content="S5 1.1" /> <meta name="author" content="Sam Smith" /> + <meta name="version" content="S5 1.1" /> <meta name="author" content="Jen Jones" /> <meta name="date" content="2006-07-15" /> <title>My S5 Document</title> @@ -32,9 +34,9 @@ </div> <div class="presentation"> <div class="titleslide slide"> - <h1>My S5 Document</h1> - <h2>Sam Smith<br/>Jen Jones</h2> - <h3>July 15, 2006</h3> + <h1 class="title">My S5 Document</h1> + <h3 class="author">Sam Smith<br/>Jen Jones</h3> + <h4 class="date">July 15, 2006</h4> </div> <div id="first-slide" class="slide section level1"> <h1>First slide</h1> diff --git a/tests/s5-fancy.html b/tests/s5-fancy.html index 818cca04a..3a2a602be 100644 --- a/tests/s5-fancy.html +++ b/tests/s5-fancy.html @@ -4,7 +4,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="generator" content="pandoc" /> + <meta name="version" content="S5 1.1" /> <meta name="author" content="Sam Smith" /> + <meta name="version" content="S5 1.1" /> <meta name="author" content="Jen Jones" /> <meta name="date" content="2006-07-15" /> <title>My S5 Document</title> @@ -233,9 +235,9 @@ </div> <div class="presentation"> <div class="titleslide slide"> - <h1>My S5 Document</h1> - <h2>Sam Smith<br/>Jen Jones</h2> - <h3>July 15, 2006</h3> + <h1 class="title">My S5 Document</h1> + <h3 class="author">Sam Smith<br/>Jen Jones</h3> + <h4 class="date">July 15, 2006</h4> </div> <div id="first-slide" class="slide section level1"> <h1>First slide</h1> diff --git a/tests/tables.html b/tests/tables.html index a9b2b247d..f5ddf3bcd 100644 --- a/tests/tables.html +++ b/tests/tables.html @@ -94,7 +94,7 @@ </tbody> </table> <p>Multiline table with caption:</p> -<table> +<table style="width:79%;"> <caption>Here's the caption. It may span multiple lines.</caption> <colgroup> <col width="15%" /> @@ -126,7 +126,7 @@ </tbody> </table> <p>Multiline table without caption:</p> -<table> +<table style="width:79%;"> <colgroup> <col width="15%" /> <col width="13%" /> @@ -180,7 +180,7 @@ </tbody> </table> <p>Multiline table without column headers:</p> -<table> +<table style="width:79%;"> <colgroup> <col width="15%" /> <col width="13%" /> diff --git a/tests/testsuite.native b/tests/testsuite.native index ba0bbb9c8..3501fadcb 100644 --- a/tests/testsuite.native +++ b/tests/testsuite.native @@ -228,9 +228,15 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa ,[Plain [Str "sublist"]]]]])] ,Header 1 ("html-blocks",[],[]) [Str "HTML",Space,Str "Blocks"] ,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"] -,Div ("",[],[]) [Plain [Str "foo"]] +,Div ("",[],[]) + [Plain [Str "foo"]] ,Para [Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"] -,Div ("",[],[]) [Div ("",[],[]) [Div ("",[],[]) [Para [Str "foo"]]],Div ("",[],[]) [Plain [Str "bar"]]] +,Div ("",[],[]) + [Div ("",[],[]) + [Div ("",[],[]) + [Para [Str "foo"]]] + ,Div ("",[],[]) + [Plain [Str "bar"]]] ,Para [Str "Interpreted",Space,Str "markdown",Space,Str "in",Space,Str "a",Space,Str "table:"] ,RawBlock (Format "html") "<table>" ,RawBlock (Format "html") "<tr>" @@ -244,13 +250,17 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa ,RawBlock (Format "html") "</table>" ,RawBlock (Format "html") "<script type=\"text/javascript\">document.write('This *should not* be interpreted as markdown');</script>" ,Para [Str "Here\8217s",Space,Str "a",Space,Str "simple",Space,Str "block:"] -,Div ("",[],[]) [Para [Str "foo"]] +,Div ("",[],[]) + [Para [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:"] -,Div ("",[],[]) [Div ("",[],[]) [Div ("",[],[]) [Plain [Str "foo"]]]] +,Div ("",[],[]) + [Div ("",[],[]) + [Div ("",[],[]) + [Plain [Str "foo"]]]] ,Para [Str "This",Space,Str "should",Space,Str "just",Space,Str "be",Space,Str "an",Space,Str "HTML",Space,Str "comment:"] ,RawBlock (Format "html") "<!-- Comment -->" ,Para [Str "Multiline:"] diff --git a/tests/textile-reader.native b/tests/textile-reader.native index 0b5fceb0e..df727a8bb 100644 --- a/tests/textile-reader.native +++ b/tests/textile-reader.native @@ -1,5 +1,5 @@ Pandoc (Meta {unMeta = fromList []}) -[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Space,Str "Textile",Space,Str "Reader.",Space,Str "Part",Space,Str "of",Space,Str "it",Space,Str "comes",LineBreak,Str "from",Space,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."] +[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Space,Str "Textile",Space,Str "Reader.",Space,Str "Part",Space,Str "of",Space,Str "it",Space,Str "comes",LineBreak,Str "from",Space,Str "John",Space,Str "Gruber's",Space,Str "markdown",Space,Str "test",Space,Str "suite."] ,HorizontalRule ,Header 1 ("headers",[],[]) [Str "Headers"] ,Header 2 ("level-2-with-an-embeded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link ("",[],[]) [Str "embeded",Space,Str "link"] ("http://www.example.com","")] @@ -8,9 +8,9 @@ Pandoc (Meta {unMeta = fromList []}) ,Header 5 ("level-5",[],[]) [Str "Level",Space,Str "5"] ,Header 6 ("level-6",[],[]) [Str "Level",Space,Str "6"] ,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"] -,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."] +,Para [Str "Here's",Space,Str "a",Space,Str "regular",Space,Str "paragraph."] ,Para [Str "Line",Space,Str "breaks",Space,Str "are",Space,Str "preserved",Space,Str "in",Space,Str "textile,",Space,Str "so",Space,Str "you",Space,Str "can",Space,Str "not",Space,Str "wrap",Space,Str "your",Space,Str "very",LineBreak,Str "long",Space,Str "paragraph",Space,Str "with",Space,Str "your",Space,Str "favourite",Space,Str "text",Space,Str "editor",Space,Str "and",Space,Str "have",Space,Str "it",Space,Str "rendered",LineBreak,Str "with",Space,Str "no",Space,Str "break."] -,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet."] +,Para [Str "Here's",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet."] ,BulletList [[Plain [Str "criminey."]]] ,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "paragraph",Space,Str "break",Space,Str "between",Space,Str "here"] @@ -87,9 +87,9 @@ Pandoc (Meta {unMeta = fromList []}) ,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 ".",LineBreak,Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str ".",LineBreak,Str "Hyphenated-words-are-ok,",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "strange_underscore_notation.",LineBreak,Str "A",Space,Link ("",[],[]) [Strong [Str "strong",Space,Str "link"]] ("http://www.foobar.com",""),Str "."] ,Para [Emph [Strong [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]],LineBreak,Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Space,Str "and",Space,Emph [Strong [Str "that",Space,Str "one"]],Str ".",LineBreak,Strikeout [Str "This",Space,Str "is",Space,Str "strikeout",Space,Str "and",Space,Strong [Str "strong"]]] ,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Space,Superscript [Strong [Str "hello"]],Space,Str "a",Superscript [Str "hello",Space,Str "there"],Str ".",LineBreak,Str "Subscripts:",Space,Subscript [Str "here"],Space,Str "H",Space,Subscript [Str "2"],Str "O,",Space,Str "H",Space,Subscript [Str "23"],Str "O,",Space,Str "H",Space,Subscript [Str "many",Space,Str "of",Space,Str "them"],Str "O."] -,Para [Str "Dashes",Space,Str ":",Space,Str "How",Space,Str "cool",Space,Str "\8212",Space,Str "automatic",Space,Str "dashes."] -,Para [Str "Elipses",Space,Str ":",Space,Str "He",Space,Str "thought",Space,Str "and",Space,Str "thought",Space,Str "\8230",Space,Str "and",Space,Str "then",Space,Str "thought",Space,Str "some",Space,Str "more."] -,Para [Str "Quotes",Space,Str "and",Space,Str "apostrophes",Space,Str ":",Space,Quoted DoubleQuote [Str "I\8217d",Space,Str "like",Space,Str "to",Space,Str "thank",Space,Str "you"],Space,Str "for",Space,Str "example."] +,Para [Str "Dashes",Space,Str ":",Space,Str "How",Space,Str "cool",Space,Str "--",Space,Str "automatic",Space,Str "dashes."] +,Para [Str "Elipses",Space,Str ":",Space,Str "He",Space,Str "thought",Space,Str "and",Space,Str "thought",Space,Str "...",Space,Str "and",Space,Str "then",Space,Str "thought",Space,Str "some",Space,Str "more."] +,Para [Str "Quotes",Space,Str "and",Space,Str "apostrophes",Space,Str ":",Space,Str "\"I'd",Space,Str "like",Space,Str "to",Space,Str "thank",Space,Str "you\"",Space,Str "for",Space,Str "example."] ,Header 1 ("links",[],[]) [Str "Links"] ,Header 2 ("explicit",[],[]) [Str "Explicit"] ,Para [Str "Just",Space,Str "a",Space,Link ("",[],[]) [Str "url"] ("http://www.url.com","")] @@ -114,7 +114,7 @@ Pandoc (Meta {unMeta = fromList []}) ,[[Plain [Str "bella"]] ,[Plain [Str "45"]] ,[Plain [Str "f"]]]] -,Para [Str "and",Space,Str "some",Space,Str "text",Space,Str "following",Space,Str "\8230"] +,Para [Str "and",Space,Str "some",Space,Str "text",Space,Str "following",Space,Str "..."] ,Header 2 ("with-headers",[],[]) [Str "With",Space,Str "headers"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[Plain [Str "name"]] @@ -152,7 +152,7 @@ Pandoc (Meta {unMeta = fromList []}) ,RawBlock (Format "html") "</div>" ,Para [Str "Html",Space,Str "blocks",Space,Str "can",Space,Str "be",Space,RawInline (Format "html") "<div>",Str "inlined",RawInline (Format "html") "</div>",Space,Str "as",Space,Str "well."] ,BulletList - [[Plain [Str "this",Space,RawInline (Format "html") "<div>",Space,Str "won\8217t",Space,Str "produce",Space,Str "raw",Space,Str "html",Space,Str "blocks",Space,RawInline (Format "html") "</div>"]] + [[Plain [Str "this",Space,RawInline (Format "html") "<div>",Space,Str "won't",Space,Str "produce",Space,Str "raw",Space,Str "html",Space,Str "blocks",Space,RawInline (Format "html") "</div>"]] ,[Plain [Str "but",Space,Str "this",Space,RawInline (Format "html") "<strong>",Space,Str "will",Space,Str "produce",Space,Str "inline",Space,Str "html",Space,RawInline (Format "html") "</strong>"]]] ,Para [Str "Can",Space,Str "you",Space,Str "prove",Space,Str "that",Space,Str "2",Space,Str "<",Space,Str "3",Space,Str "?"] ,Header 1 ("acronyms-and-marks",[],[]) [Str "Acronyms",Space,Str "and",Space,Str "marks"] diff --git a/tests/writer.asciidoc b/tests/writer.asciidoc index aebc529f0..83869df39 100644 --- a/tests/writer.asciidoc +++ b/tests/writer.asciidoc @@ -1,8 +1,7 @@ Pandoc Test Suite ================= -:author: John MacFarlane -:author: Anonymous -:date: July 17, 2006 +John MacFarlane; Anonymous +July 17, 2006 This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite. diff --git a/tests/writer.context b/tests/writer.context index 29af26dba..1f8c3aff7 100644 --- a/tests/writer.context +++ b/tests/writer.context @@ -1,27 +1,32 @@ -\startmode[*mkii] - \enableregime[utf-8] - \setupcolors[state=start] -\stopmode - % Enable hyperlinks -\setupinteraction[state=start, color=middleblue] - -\setuppapersize [letter][letter] -\setuplayout [width=middle, backspace=1.5in, cutspace=1.5in, - height=middle, topspace=0.75in, bottomspace=0.75in] - -\setuppagenumbering[location={footer,center}] - -\setupbodyfont[11pt] - +\setupinteraction + [state=start, + title={Pandoc Test Suite}, + author={John MacFarlane; Anonymous}, + style=, + color=, + contrastcolor=] +% make chapter, section bookmarks visible when opening document +\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section] +\setupinteractionscreen[option=bookmark] +\setuptagging[state=start] + +% use microtypography +\definefontfeature[default][default][protrusion=quality,expansion=quality,onum=yes,pnum=yes] +\definefontfeature[smallcaps][smallcaps][protrusion=quality,expansion=quality,onum=yes,pnum=yes] +\setupalign[hz,hanging] +\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted +\setupbodyfont[mainfont] \setupwhitespace[medium] -\setuphead[chapter] [style=\tfd] -\setuphead[section] [style=\tfc] -\setuphead[subsection] [style=\tfb] -\setuphead[subsubsection][style=\bf] +\setuphead[chapter] [style=\tfd,header=empty] +\setuphead[section] [style=\tfc] +\setuphead[subsection] [style=\tfb] +\setuphead[subsubsection] [style=\bf] +\setuphead[subsubsubsection] [style=\sc] +\setuphead[subsubsubsubsection][style=\it] -\setuphead[chapter, section, subsection, subsubsection][number=no] +\setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no] \definedescription [description] @@ -35,24 +40,19 @@ \setupthinrules[width=15em] % width of horizontal rules -\setupdelimitedtext - [blockquote] - [before={\blank[medium]}, - after={\blank[medium]}, - indentnext=no, - ] +\setuphead[title][ + style={\tfd\raggedcenter}, + before={\startalignment[middle]}, + after={ + \smallskip + {\tfa John MacFarlane\crlf Anonymous} + \smallskip + {\tfa July 17, 2006} + \bigskip\stopalignment}] \starttext -\startalignment[center] - \blank[2*big] - {\tfd Pandoc Test Suite} - \blank[3*medium] - {\tfa John MacFarlane\crlf Anonymous} - \blank[2*medium] - {\tfa July 17, 2006} - \blank[3*medium] -\stopalignment +\title{Pandoc Test Suite} This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite. @@ -545,11 +545,13 @@ Blank line after term, indented marker, alternate markers: Simple block on one line: foo + And nested without indentation: foo bar + Interpreted markdown in a table: This is {\em emphasized} @@ -575,6 +577,7 @@ As should this: Now, nested: foo + This should just be an HTML comment: Multiline: diff --git a/tests/writer.icml b/tests/writer.icml index c00d485bc..b7444ef22 100644 --- a/tests/writer.icml +++ b/tests/writer.icml @@ -1864,17 +1864,49 @@ These should not be escaped: \$ \\ \> \[ \{</Content> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList"> <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> - <Content>2+2=4</Content> + <Content>2</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>+</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>2</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>=</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>4</Content> </CharacterStyleRange><Br /> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList"> - <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> - <Content>x \in y</Content> + <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>x</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>∈</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>y</Content> </CharacterStyleRange><Br /> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList"> - <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> - <Content>\alpha \wedge \omega</Content> + <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>α</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>∧</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>ω</Content> </CharacterStyleRange><Br /> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList"> @@ -1883,7 +1915,7 @@ These should not be escaped: \$ \\ \> \[ \{</Content> </CharacterStyleRange><Br /> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList"> - <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> <Content>p</Content> </CharacterStyleRange> <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> @@ -1895,15 +1927,33 @@ These should not be escaped: \$ \\ \> \[ \{</Content> <Content>Here’s some display math: </Content> </CharacterStyleRange> <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> - <Content>\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}</Content> + <Content>$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$</Content> </CharacterStyleRange><Br /> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList"> <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> <Content>Here’s one that has a line break in it: </Content> </CharacterStyleRange> - <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> - <Content>\alpha + \omega \times x^2</Content> + <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>α</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>+</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>ω</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>×</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>x</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Superscript"> + <Content>2</Content> </CharacterStyleRange> <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> <Content>.</Content> diff --git a/tests/writer.latex b/tests/writer.latex index 8b34777fa..ceee122a4 100644 --- a/tests/writer.latex +++ b/tests/writer.latex @@ -9,11 +9,10 @@ \else % if luatex or xelatex \ifxetex \usepackage{mathspec} - \usepackage{xltxtra,xunicode} \else \usepackage{fontspec} \fi - \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} + \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} \newcommand{\euro}{€} \fi % use upquote if available, for straight quotes in verbatim environments @@ -23,26 +22,16 @@ \usepackage{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} -\ifxetex - \usepackage[setpagesize=false, % page size defined by xetex - unicode=false, % unicode breaks when used with xetex - xetex]{hyperref} -\else - \usepackage[unicode=true]{hyperref} -\fi -\usepackage[usenames,dvipsnames]{color} -\hypersetup{breaklinks=true, - bookmarks=true, - pdfauthor={John MacFarlane; Anonymous}, +\usepackage{hyperref} +\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref +\hypersetup{unicode=true, pdftitle={Pandoc Test Suite}, - colorlinks=true, - citecolor=blue, - urlcolor=blue, - linkcolor=magenta, - pdfborder={0 0 0}} + pdfauthor={John MacFarlane; Anonymous}, + pdfborder={0 0 0}, + breaklinks=true} \urlstyle{same} % don't use monospace font for urls \usepackage{fancyvrb} -\VerbatimFootnotes +\VerbatimFootnotes % allows verbatim text in footnotes \usepackage{graphicx,grffile} \makeatletter \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} @@ -61,7 +50,6 @@ \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \setcounter{secnumdepth}{0} -\VerbatimFootnotes % allows verbatim text in footnotes \title{Pandoc Test Suite} \author{John MacFarlane \and Anonymous} diff --git a/tests/writer.man b/tests/writer.man index 900dfcdb2..48d907fc0 100644 --- a/tests/writer.man +++ b/tests/writer.man @@ -1,3 +1,4 @@ +.hy .TH "Pandoc Test Suite" "" "July 17, 2006" "" "" .PP This is a set of tests for pandoc. diff --git a/tests/writer.native b/tests/writer.native index ba0bbb9c8..3501fadcb 100644 --- a/tests/writer.native +++ b/tests/writer.native @@ -228,9 +228,15 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa ,[Plain [Str "sublist"]]]]])] ,Header 1 ("html-blocks",[],[]) [Str "HTML",Space,Str "Blocks"] ,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"] -,Div ("",[],[]) [Plain [Str "foo"]] +,Div ("",[],[]) + [Plain [Str "foo"]] ,Para [Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"] -,Div ("",[],[]) [Div ("",[],[]) [Div ("",[],[]) [Para [Str "foo"]]],Div ("",[],[]) [Plain [Str "bar"]]] +,Div ("",[],[]) + [Div ("",[],[]) + [Div ("",[],[]) + [Para [Str "foo"]]] + ,Div ("",[],[]) + [Plain [Str "bar"]]] ,Para [Str "Interpreted",Space,Str "markdown",Space,Str "in",Space,Str "a",Space,Str "table:"] ,RawBlock (Format "html") "<table>" ,RawBlock (Format "html") "<tr>" @@ -244,13 +250,17 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa ,RawBlock (Format "html") "</table>" ,RawBlock (Format "html") "<script type=\"text/javascript\">document.write('This *should not* be interpreted as markdown');</script>" ,Para [Str "Here\8217s",Space,Str "a",Space,Str "simple",Space,Str "block:"] -,Div ("",[],[]) [Para [Str "foo"]] +,Div ("",[],[]) + [Para [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:"] -,Div ("",[],[]) [Div ("",[],[]) [Div ("",[],[]) [Plain [Str "foo"]]]] +,Div ("",[],[]) + [Div ("",[],[]) + [Div ("",[],[]) + [Plain [Str "foo"]]]] ,Para [Str "This",Space,Str "should",Space,Str "just",Space,Str "be",Space,Str "an",Space,Str "HTML",Space,Str "comment:"] ,RawBlock (Format "html") "<!-- Comment -->" ,Para [Str "Multiline:"] diff --git a/tests/writer.plain b/tests/writer.plain index ba476f21d..a8c8f9bf9 100644 --- a/tests/writer.plain +++ b/tests/writer.plain @@ -451,7 +451,7 @@ This is code: >, $, \, \$, <html>. Superscripts: abcd a_hello_ ahello there. -Subscripts: H2O, H23O, Hmany of themO. +Subscripts: H₂O, H₂₃O, Hmany of themO. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. @@ -494,7 +494,7 @@ LATEX - p-Tree - Here’s some display math: $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ -- Here’s one that has a line break in it: α + ω × x2. +- Here’s one that has a line break in it: α + ω × x². These shouldn’t be math: diff --git a/tests/writers-lang-and-dir.context b/tests/writers-lang-and-dir.context new file mode 100644 index 000000000..a324c13f5 --- /dev/null +++ b/tests/writers-lang-and-dir.context @@ -0,0 +1,113 @@ +% Enable hyperlinks +\setupinteraction + [state=start, + style=, + color=, + contrastcolor=] +% make chapter, section bookmarks visible when opening document +\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section] +\setupinteractionscreen[option=bookmark] +\setuptagging[state=start] + +% use microtypography +\definefontfeature[default][default][protrusion=quality,expansion=quality,onum=yes,pnum=yes] +\definefontfeature[smallcaps][smallcaps][protrusion=quality,expansion=quality,onum=yes,pnum=yes] +\setupalign[hz,hanging] +\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted +\setupbodyfont[mainfont] +\setupwhitespace[medium] + +\setuphead[chapter] [style=\tfd,header=empty] +\setuphead[section] [style=\tfc] +\setuphead[subsection] [style=\tfb] +\setuphead[subsubsection] [style=\bf] +\setuphead[subsubsubsection] [style=\sc] +\setuphead[subsubsubsubsection][style=\it] + +\setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no] + +\definedescription + [description] + [headstyle=bold, style=normal, location=hanging, width=broad, margin=1cm, alternative=hanging] + +\setupitemize[autointro] % prevent orphan list intro +\setupitemize[indentnext=no] + +\setupfloat[figure][default={here,nonumber}] +\setupfloat[table][default={here,nonumber}] + +\setupthinrules[width=15em] % width of horizontal rules + +\setuphead[title][ + style={\tfd\raggedcenter}, + before={\startalignment[middle]}, + after={ + \bigskip\stopalignment}] + + +\starttext + +\section[empty-divs-and-spans]{Empty Divs and Spans} + +Some text and + +div contents + +and more text. + +Next paragraph with a span and a word-thatincludesaspanright? + +\section[directionality]{Directionality} + +Some text and + +\startalignment[righttoleft] +rtl div contents + +\stopalignment + +and more text. + +\startalignment[lefttoright] +and a ltr div. with a {\righttoleft rtl span}. + +\stopalignment + +Next paragraph with a {\righttoleft rtl span} and a +word-that-includesa{\lefttoright ltrspan}right? + +\section[languages]{Languages} + +Some text and + +\start\language[de] +German div contents + +\stop + +and more text. + +Next paragraph with a \start\language[en-gb]British span\stop and a +word-that-includesa\start\language[de-ch]Swiss German span\stop right? + +Some \start\language[es]Spanish text\stop . + +\section[combined]{Combined} + +Some text and + +\start\language[fr] +\startalignment[righttoleft] +French rtl div contents + +\stopalignment +\stop + +and more text. + +Next paragraph with a \start\language[en-gb]{\lefttoright British ltr +span}\stop and a +word-that-includesa\start\language[de-ch]{\lefttoright Swiss German ltr +span}\stop right? + +\stoptext diff --git a/tests/writers-lang-and-dir.latex b/tests/writers-lang-and-dir.latex new file mode 100644 index 000000000..3f4ecd5e3 --- /dev/null +++ b/tests/writers-lang-and-dir.latex @@ -0,0 +1,145 @@ +\documentclass[english,]{article} +\usepackage{lmodern} +\usepackage{amssymb,amsmath} +\usepackage{ifxetex,ifluatex} +\usepackage{fixltx2e} % provides \textsubscript +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} +\else % if luatex or xelatex + \ifxetex + \usepackage{mathspec} + \else + \usepackage{fontspec} + \fi + \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} + \newcommand{\euro}{€} +\fi +% use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +% use microtype if available +\IfFileExists{microtype.sty}{% +\usepackage{microtype} +\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts +}{} +\usepackage{hyperref} +\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref +\hypersetup{unicode=true, + pdfborder={0 0 0}, + breaklinks=true} +\urlstyle{same} % don't use monospace font for urls +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[shorthands=off,ngerman,british,ngerman,spanish,french,main=english]{babel} + \newcommand{\textgerman}[2][]{\foreignlanguage{ngerman}{#2}} + \newenvironment{german}[1]{\begin{otherlanguage}{ngerman}}{\end{otherlanguage}} + \newcommand{\textenglish}[2][]{\foreignlanguage{british}{#2}} + \newenvironment{english}[1]{\begin{otherlanguage}{british}}{\end{otherlanguage}} + \let\oritextspanish\textspanish + \AddBabelHook{spanish}{beforeextras}{\renewcommand{\textspanish}{\oritextspanish}} + \AddBabelHook{spanish}{afterextras}{\renewcommand{\textspanish}[2][]{\foreignlanguage{spanish}{##2}}} + \newcommand{\textfrench}[2][]{\foreignlanguage{french}{#2}} + \newenvironment{french}[1]{\begin{otherlanguage}{french}}{\end{otherlanguage}} +\else + \usepackage{polyglossia} + \setmainlanguage[]{english} + \setotherlanguage[]{german} + \setotherlanguage[variant=british]{english} + \setotherlanguage[variant=swiss]{german} + \setotherlanguage[]{spanish} + \setotherlanguage[]{french} +\fi +\setlength{\parindent}{0pt} +\setlength{\parskip}{6pt plus 2pt minus 1pt} +\setlength{\emergencystretch}{3em} % prevent overfull lines +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +\setcounter{secnumdepth}{0} +\ifxetex + % load bidi as late as possible as it modifies e.g. graphicx + \usepackage{bidi} + \fi +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \TeXXeTstate=1 + \newcommand{\RL}[1]{\beginR #1\endR} + \newcommand{\LR}[1]{\beginL #1\endL} + \newenvironment{RTL}{\beginR}{\endR} + \newenvironment{LTR}{\beginL}{\endL} +\fi + +\date{} + +% Redefines (sub)paragraphs to behave more like sections +\ifx\paragraph\undefined\else +\let\oldparagraph\paragraph +\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else +\let\oldsubparagraph\subparagraph +\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} +\fi + +\begin{document} + +\section{Empty Divs and Spans}\label{empty-divs-and-spans} + +Some text and + +div contents + +and more text. + +Next paragraph with a span and a word-thatincludesaspanright? + +\section{Directionality}\label{directionality} + +Some text and + +\begin{RTL} +rtl div contents +\end{RTL} + +and more text. + +\begin{LTR} +and a ltr div. with a \RL{rtl span}. +\end{LTR} + +Next paragraph with a \RL{rtl span} and a +word-that-includesa\LR{ltrspan}right? + +\section{Languages}\label{languages} + +Some text and + +\begin{german} + +German div contents + +\end{german} + +and more text. + +Next paragraph with a \textenglish[variant=british]{British span} and a +word-that-includesa\textgerman[variant=swiss]{Swiss German span}right? + +Some \textspanish{Spanish text}. + +\section{Combined}\label{combined} + +Some text and + +\begin{RTL} +\begin{french} + +French rtl div contents + +\end{french} +\end{RTL} + +and more text. + +Next paragraph with a \LR{\textenglish[variant=british]{British ltr +span}} and a word-that-includesa\LR{\textgerman[variant=swiss]{Swiss +German ltr span}}right? + +\end{document} diff --git a/tests/writers-lang-and-dir.native b/tests/writers-lang-and-dir.native new file mode 100644 index 000000000..504bcf350 --- /dev/null +++ b/tests/writers-lang-and-dir.native @@ -0,0 +1,23 @@ +Pandoc (Meta {unMeta = fromList []}) +[Header 1 ("empty-divs-and-spans",[],[]) [Str "Empty",Space,Str "Divs",Space,Str "and",Space,Str "Spans"] +,Plain [Str "Some",Space,Str "text",Space,Str "and"] +,Div ("",[],[]) [Para [Str "div",Space,Str "contents"]] +,Para [Str "and",Space,Str "more",Space,Str "text."] +,Para [Str "Next",Space,Str "paragraph",Space,Str "with",Space,Str "a",Space,Span ("",[],[]) [Str "span"],Space,Str "and",Space,Str "a",Space,Str "word-thatincludesa",Span ("",[],[]) [Str "span"],Str "right?"] +,Header 1 ("directionality",[],[]) [Str "Directionality"] +,Plain [Str "Some",Space,Str "text",Space,Str "and"] +,Div ("",[],[("dir","rtl")]) [Para [Str "rtl",Space,Str "div",Space,Str "contents"]] +,Para [Str "and",Space,Str "more",Space,Str "text."] +,Div ("",[],[("dir","ltr")]) [Para [Str "and",Space,Str "a",Space,Str "ltr",Space,Str "div.",Space,Str "with",Space,Str "a",Space,Span ("",[],[("dir","rtl")]) [Str "rtl",Space,Str "span"],Str "."]] +,Para [Str "Next",Space,Str "paragraph",Space,Str "with",Space,Str "a",Space,Span ("",[],[("dir","rtl")]) [Str "rtl",Space,Str "span"],Space,Str "and",Space,Str "a",Space,Str "word-that-includesa",Span ("",[],[("dir","ltr")]) [Str "ltrspan"],Str "right?"] +,Header 1 ("languages",[],[]) [Str "Languages"] +,Plain [Str "Some",Space,Str "text",Space,Str "and"] +,Div ("",[],[("lang","de")]) [Para [Str "German",Space,Str "div",Space,Str "contents"]] +,Para [Str "and",Space,Str "more",Space,Str "text."] +,Para [Str "Next",Space,Str "paragraph",Space,Str "with",Space,Str "a",Space,Span ("",[],[("lang","en-GB")]) [Str "British",Space,Str "span"],Space,Str "and",Space,Str "a",Space,Str "word-that-includesa",Span ("",[],[("lang","de-CH")]) [Str "Swiss",Space,Str "German",Space,Str "span"],Str "right?"] +,Para [Str "Some",Space,Span ("",[],[("lang","es")]) [Str "Spanish",Space,Str "text"],Str "."] +,Header 1 ("combined",[],[]) [Str "Combined"] +,Plain [Str "Some",Space,Str "text",Space,Str "and"] +,Div ("",[],[("lang","fr"),("dir","rtl")]) [Para [Str "French",Space,Str "rtl",Space,Str "div",Space,Str "contents"]] +,Para [Str "and",Space,Str "more",Space,Str "text."] +,Para [Str "Next",Space,Str "paragraph",Space,Str "with",Space,Str "a",Space,Span ("",[],[("lang","en-GB"),("dir","ltr")]) [Str "British",Space,Str "ltr",Space,Str "span"],Space,Str "and",Space,Str "a",Space,Str "word-that-includesa",Span ("",[],[("lang","de-CH"),("dir","ltr")]) [Str "Swiss",Space,Str "German",Space,Str "ltr",Space,Str "span"],Str "right?"]] diff --git a/trypandoc/Makefile b/trypandoc/Makefile index 29942ac00..b53758d7f 100644 --- a/trypandoc/Makefile +++ b/trypandoc/Makefile @@ -1,7 +1,7 @@ CGIBIN=/home/website/cgi-bin TRYPANDOC=/home/website/html/pandoc/try/ CGI=${CGIBIN}/trypandoc -BIN=../dist/build/trypandoc/trypandoc +BIN=../.cabal-sandbox/bin/trypandoc install: ${CGI} ${TRYPANDOC}/index.html diff --git a/windows/make-windows-installer.bat b/windows/make-windows-installer.bat index d9c5d3883..c7befe531 100644 --- a/windows/make-windows-installer.bat +++ b/windows/make-windows-installer.bat @@ -1,20 +1,15 @@ @echo off
-cd ..
-cabal update
-cabal sandbox init
-cabal clean
-cabal install hsb2hs
+stack install --test
if %errorlevel% neq 0 exit /b %errorlevel%
-cabal install -v1 --force --reinstall --flags="embed_data_files" . pandoc-citeproc
+for /f "delims=" %%a in ('stack path --local-bin-path') do @set BINPATH=%%a
+strip %BINPATH%\pandoc.exe
+strip %BINPATH%\pandoc-citeproc.exe
+%BINPATH%\pandoc.exe -s -S ..\README -o README.html
if %errorlevel% neq 0 exit /b %errorlevel%
-strip .\.cabal-sandbox\bin\pandoc.exe
-strip .\.cabal-sandbox\bin\pandoc-citeproc.exe
-.\.cabal-sandbox\bin\pandoc.exe -s --template data\templates\default.html -S README -o README.html
+%BINPATH%\pandoc.exe -s ..\COPYING -t rtf -S -o COPYING.rtf
if %errorlevel% neq 0 exit /b %errorlevel%
-.\.cabal-sandbox\bin\pandoc.exe -s --template data\templates\default.rtf COPYING -t rtf -S -o COPYING.rtf
-if %errorlevel% neq 0 exit /b %errorlevel%
-copy COPYRIGHT COPYRIGHT.txt
-for /f "tokens=1-2 delims= " %%a in ('.\.cabal-sandbox\bin\pandoc --version') do (
+copy ..\COPYRIGHT COPYRIGHT.txt
+for /f "tokens=1-2 delims= " %%a in ('%BINPATH%\pandoc.exe --version') do (
@set VERSION=%%b
goto :next
)
@@ -24,11 +19,13 @@ if "%VERSION%" == "" ( exit /b 1
)
echo Detected version %VERSION%
-cd windows
echo Creating msi...
-candle -dVERSION=%VERSION% pandoc.wxs
+candle -dVERSION=%VERSION% -dBINPATH=%BINPATH% pandoc.wxs
if %errorlevel% neq 0 exit /b %errorlevel%
light -sw1076 -ext WixUIExtension -ext WixUtilExtension -out pandoc-%VERSION%-windows.msi pandoc.wixobj
if %errorlevel% neq 0 exit /b %errorlevel%
echo Starting kSign: sign, then quit kSign to complete the build...
kSign
+
+echo Copying to shared drive
+copy pandoc-%VERSION%-windows.msi \\VBOXSVR\WindowsShared\
diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index c1465ffcf..d19ed81e1 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -41,11 +41,11 @@ KeyPath="yes"/> <RemoveFolder Id="APPLICATIONFOLDER" On="uninstall"/> <File Id="pandocEXE" Name="pandoc.exe" - Source="..\.cabal-sandbox\bin\pandoc.exe" /> + Source="$(var.BINPATH)\pandoc.exe" /> <File Id="pandocCOPYRIGHT" Name="COPYRIGHT.txt" - Source="..\COPYRIGHT.txt" /> + Source="COPYRIGHT.txt" /> <File Id="pandocCOPYING" Name="COPYING.rtf" - Source="..\COPYING.rtf" /> + Source="COPYING.rtf" /> </Component> <Component Id="CitationSupport" @@ -55,13 +55,13 @@ Name="Version" Type="string" Value="[ProductVersion]" KeyPath="yes"/> <File Id="pandoc_citeprocEXE" Name="pandoc-citeproc.exe" - Source="..\.cabal-sandbox\bin\pandoc-citeproc.exe" /> + Source="$(var.BINPATH)\pandoc-citeproc.exe" /> </Component> <Component Id="Documentation" Guid="A8D54A76-1A3D-4647-8327-81B69D39D8A3"> <File Id="pandocREADME" Name="Pandoc User's Guide.html" - Source="..\README.html" KeyPath="yes"> + Source="README.html" KeyPath="yes"> <Shortcut Id="ApplicationStartMenuShortcut" Directory="ApplicationProgramsFolder" Name="Pandoc User’s Guide" Advertise="yes" /> @@ -163,7 +163,7 @@ <Property Id="ALLUSERS" Value="2" Secure="yes" /> <Property Id="MSIINSTALLPERUSER" Value="1" /> - <WixVariable Id="WixUILicenseRtf" Value="..\COPYING.rtf" /> + <WixVariable Id="WixUILicenseRtf" Value="COPYING.rtf" /> <UI Id="MyWixUI_Advanced"> <UIRef Id="WixUI_Advanced" /> diff --git a/windows/stack.yaml b/windows/stack.yaml new file mode 100644 index 000000000..4a00e2d38 --- /dev/null +++ b/windows/stack.yaml @@ -0,0 +1,19 @@ +flags: + pandoc: + trypandoc: false + https: true + embed_data_files: true + old-locale: false + network-uri: true + pandoc-citeproc: + bibutils: true + embed_data_files: true + unicode_collation: false + test_citeproc: false + debug: false +packages: +- '..' +- '../../pandoc-citeproc' +extra-deps: +- 'hsb2hs-0.3.1' +resolver: lts-3.13 |