pandoc-1.19.2.4/benchmark/0000755000000000000000000000000013155240142013327 5ustar0000000000000000pandoc-1.19.2.4/data/0000755000000000000000000000000013155256760012323 5ustar0000000000000000pandoc-1.19.2.4/data/docx/0000755000000000000000000000000013155240142013243 5ustar0000000000000000pandoc-1.19.2.4/data/docx/_rels/0000755000000000000000000000000013155240142014347 5ustar0000000000000000pandoc-1.19.2.4/data/docx/docProps/0000755000000000000000000000000013155240142015034 5ustar0000000000000000pandoc-1.19.2.4/data/docx/word/0000755000000000000000000000000013155240142014216 5ustar0000000000000000pandoc-1.19.2.4/data/docx/word/_rels/0000755000000000000000000000000013155240142015322 5ustar0000000000000000pandoc-1.19.2.4/data/docx/word/theme/0000755000000000000000000000000013155240142015320 5ustar0000000000000000pandoc-1.19.2.4/data/dzslides/0000755000000000000000000000000013155240142014127 5ustar0000000000000000pandoc-1.19.2.4/data/odt/0000755000000000000000000000000013155240142013074 5ustar0000000000000000pandoc-1.19.2.4/data/odt/Configurations2/0000755000000000000000000000000013155240142016150 5ustar0000000000000000pandoc-1.19.2.4/data/odt/Configurations2/accelerator/0000755000000000000000000000000013155240142020434 5ustar0000000000000000pandoc-1.19.2.4/data/odt/META-INF/0000755000000000000000000000000013155240142014234 5ustar0000000000000000pandoc-1.19.2.4/data/odt/Thumbnails/0000755000000000000000000000000013155240142015202 5ustar0000000000000000pandoc-1.19.2.4/data/templates/0000755000000000000000000000000013155256771014323 5ustar0000000000000000pandoc-1.19.2.4/man/0000755000000000000000000000000013155240142012150 5ustar0000000000000000pandoc-1.19.2.4/prelude/0000755000000000000000000000000013155240142013035 5ustar0000000000000000pandoc-1.19.2.4/src/0000755000000000000000000000000013155240142012164 5ustar0000000000000000pandoc-1.19.2.4/src/Text/0000755000000000000000000000000013155240142013110 5ustar0000000000000000pandoc-1.19.2.4/src/Text/Pandoc/0000755000000000000000000000000013155240142014314 5ustar0000000000000000pandoc-1.19.2.4/src/Text/Pandoc/Compat/0000755000000000000000000000000013155240142015537 5ustar0000000000000000pandoc-1.19.2.4/src/Text/Pandoc/Readers/0000755000000000000000000000000013155240142015701 5ustar0000000000000000pandoc-1.19.2.4/src/Text/Pandoc/Readers/Docx/0000755000000000000000000000000013155240142016576 5ustar0000000000000000pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/0000755000000000000000000000000013155240142016427 5ustar0000000000000000pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/Arrows/0000755000000000000000000000000013155240142017704 5ustar0000000000000000pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/Generic/0000755000000000000000000000000013155240142020003 5ustar0000000000000000pandoc-1.19.2.4/src/Text/Pandoc/Readers/Org/0000755000000000000000000000000013155240142016430 5ustar0000000000000000pandoc-1.19.2.4/src/Text/Pandoc/Writers/0000755000000000000000000000000013155240142015753 5ustar0000000000000000pandoc-1.19.2.4/tests/0000755000000000000000000000000013155240143012540 5ustar0000000000000000pandoc-1.19.2.4/tests/Tests/0000755000000000000000000000000013155240142013641 5ustar0000000000000000pandoc-1.19.2.4/tests/Tests/Readers/0000755000000000000000000000000013155240142015226 5ustar0000000000000000pandoc-1.19.2.4/tests/Tests/Writers/0000755000000000000000000000000013155240142015300 5ustar0000000000000000pandoc-1.19.2.4/tests/docx/0000755000000000000000000000000013155240142013474 5ustar0000000000000000pandoc-1.19.2.4/tests/epub/0000755000000000000000000000000013155240142013472 5ustar0000000000000000pandoc-1.19.2.4/tests/fb2/0000755000000000000000000000000013155240142013210 5ustar0000000000000000pandoc-1.19.2.4/tests/media/0000755000000000000000000000000013155240142013616 5ustar0000000000000000pandoc-1.19.2.4/tests/odt/0000755000000000000000000000000013155240143013326 5ustar0000000000000000pandoc-1.19.2.4/tests/odt/markdown/0000755000000000000000000000000013155240143015150 5ustar0000000000000000pandoc-1.19.2.4/tests/odt/native/0000755000000000000000000000000013155240143014614 5ustar0000000000000000pandoc-1.19.2.4/tests/odt/odt/0000755000000000000000000000000013155240143014114 5ustar0000000000000000pandoc-1.19.2.4/trypandoc/0000755000000000000000000000000013155240143013401 5ustar0000000000000000pandoc-1.19.2.4/src/Text/Pandoc.hs0000644000000000000000000004017713155240142014661 0ustar0000000000000000{-# LANGUAGE ScopedTypeVariables, FlexibleInstances #-} {- Copyright (C) 2006-2016 John MacFarlane 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 Copyright : Copyright (C) 2006-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable This helper module exports the main writers, readers, and data structure definitions from the Pandoc libraries. A typical application will chain together a reader and a writer to convert strings from one format to another. For example, the following simple program will act as a filter converting markdown fragments to reStructuredText, using reference-style links instead of inline links: > module Main where > import Text.Pandoc > > markdownToRST :: String -> String > markdownToRST = > writeRST def {writerReferenceLinks = True} . > handleError . readMarkdown def > > main = getContents >>= putStrLn . markdownToRST Note: all of the readers assume that the input text has @'\n'@ line endings. So if you get your input text from a web form, you should remove @'\r'@ characters using @filter (/='\r')@. -} module Text.Pandoc ( -- * Definitions module Text.Pandoc.Definition -- * Generics , module Text.Pandoc.Generic -- * Options , module Text.Pandoc.Options -- * Error handling , module Text.Pandoc.Error -- * Lists of readers and writers , readers , writers -- * Readers: converting /to/ Pandoc format , Reader (..) , mkStringReader , readDocx , readOdt , readMarkdown , readCommonMark , readMediaWiki , readRST , readOrg , readLaTeX , readHtml , readTextile , readDocBook , readOPML , readHaddock , readNative , readJSON , readTWiki , readTxt2Tags , readTxt2TagsNoMacros , readEPUB -- * Writers: converting /from/ Pandoc format , Writer (..) , writeNative , writeJSON , writeMarkdown , writePlain , writeRST , writeLaTeX , writeConTeXt , writeTexinfo , writeHtml , writeHtmlString , writeICML , writeDocbook , writeOPML , writeOpenDocument , writeMan , writeMediaWiki , writeDokuWiki , writeZimWiki , writeTextile , writeRTF , writeODT , writeDocx , writeEPUB , writeFB2 , writeOrg , writeAsciiDoc , writeHaddock , writeCommonMark , writeCustom , writeTEI -- * Rendering templates and default templates , module Text.Pandoc.Templates -- * Miscellaneous , getReader , getWriter , getDefaultExtensions , ToJsonFilter(..) , pandocVersion ) where import Text.Pandoc.Definition import Text.Pandoc.Generic import Text.Pandoc.JSON import Text.Pandoc.Readers.Markdown import Text.Pandoc.Readers.CommonMark import Text.Pandoc.Readers.MediaWiki import Text.Pandoc.Readers.RST import Text.Pandoc.Readers.Org import Text.Pandoc.Readers.DocBook import Text.Pandoc.Readers.OPML import Text.Pandoc.Readers.LaTeX import Text.Pandoc.Readers.HTML import Text.Pandoc.Readers.Textile import Text.Pandoc.Readers.Native import Text.Pandoc.Readers.Haddock import Text.Pandoc.Readers.TWiki import Text.Pandoc.Readers.Docx import Text.Pandoc.Readers.Odt import Text.Pandoc.Readers.Txt2Tags import Text.Pandoc.Readers.EPUB import Text.Pandoc.Writers.Native import Text.Pandoc.Writers.Markdown import Text.Pandoc.Writers.RST import Text.Pandoc.Writers.LaTeX import Text.Pandoc.Writers.ConTeXt import Text.Pandoc.Writers.Texinfo import Text.Pandoc.Writers.HTML import Text.Pandoc.Writers.ODT import Text.Pandoc.Writers.Docx import Text.Pandoc.Writers.EPUB import Text.Pandoc.Writers.FB2 import Text.Pandoc.Writers.ICML import Text.Pandoc.Writers.Docbook import Text.Pandoc.Writers.OPML import Text.Pandoc.Writers.OpenDocument import Text.Pandoc.Writers.Man import Text.Pandoc.Writers.RTF import Text.Pandoc.Writers.MediaWiki import Text.Pandoc.Writers.DokuWiki import Text.Pandoc.Writers.ZimWiki import Text.Pandoc.Writers.Textile import Text.Pandoc.Writers.Org import Text.Pandoc.Writers.AsciiDoc import Text.Pandoc.Writers.Haddock import Text.Pandoc.Writers.CommonMark import Text.Pandoc.Writers.Custom import Text.Pandoc.Writers.TEI import Text.Pandoc.Templates import Text.Pandoc.Options 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.Set (Set) import qualified Data.Set as Set import Text.Parsec import Text.Parsec.Error import qualified Text.Pandoc.UTF8 as UTF8 parseFormatSpec :: String -> Either ParseError (String, Set Extension -> Set Extension) parseFormatSpec = parse formatSpec "" where formatSpec = do name <- formatName extMods <- many extMod return (name, \x -> foldl (flip ($)) x extMods) formatName = many1 $ noneOf "-+" extMod = do polarity <- oneOf "-+" name <- many $ noneOf "-+" ext <- case safeRead ("Ext_" ++ name) of Just n -> return n Nothing | name == "lhs" -> return Ext_literate_haskell | otherwise -> fail $ "Unknown extension: " ++ name return $ case polarity of '-' -> Set.delete ext _ -> Set.insert ext data Reader = StringReader (ReaderOptions -> String -> IO (Either PandocError Pandoc)) | ByteStringReader (ReaderOptions -> BL.ByteString -> IO (Either PandocError (Pandoc,MediaBag))) mkStringReader :: (ReaderOptions -> String -> Either PandocError Pandoc) -> Reader mkStringReader r = StringReader (\o s -> return $ r o s) mkStringReaderWithWarnings :: (ReaderOptions -> String -> Either PandocError (Pandoc, [String])) -> Reader mkStringReaderWithWarnings r = StringReader $ \o s -> case r o s of Left err -> return $ Left err Right (doc, warnings) -> do mapM_ warn warnings return (Right doc) mkBSReader :: (ReaderOptions -> BL.ByteString -> Either PandocError (Pandoc, MediaBag)) -> Reader mkBSReader r = ByteStringReader (\o s -> return $ r o s) mkBSReaderWithWarnings :: (ReaderOptions -> BL.ByteString -> Either PandocError (Pandoc, MediaBag, [String])) -> Reader mkBSReaderWithWarnings r = ByteStringReader $ \o s -> case r o s of Left err -> return $ Left err Right (doc, mediaBag, warnings) -> do mapM_ warn warnings return $ Right (doc, mediaBag) -- | Association list of formats and readers. readers :: [(String, Reader)] readers = [ ("native" , StringReader $ \_ s -> return $ readNative s) ,("json" , mkStringReader readJSON ) ,("markdown" , mkStringReaderWithWarnings readMarkdownWithWarnings) ,("markdown_strict" , mkStringReaderWithWarnings readMarkdownWithWarnings) ,("markdown_phpextra" , mkStringReaderWithWarnings readMarkdownWithWarnings) ,("markdown_github" , mkStringReaderWithWarnings readMarkdownWithWarnings) ,("markdown_mmd", mkStringReaderWithWarnings readMarkdownWithWarnings) ,("commonmark" , mkStringReader readCommonMark) ,("rst" , mkStringReaderWithWarnings readRSTWithWarnings ) ,("mediawiki" , mkStringReader readMediaWiki) ,("docbook" , mkStringReader readDocBook) ,("opml" , mkStringReader readOPML) ,("org" , mkStringReader readOrg) ,("textile" , mkStringReader readTextile) -- TODO : textile+lhs ,("html" , mkStringReader readHtml) ,("latex" , mkStringReader readLaTeX) ,("haddock" , mkStringReader readHaddock) ,("twiki" , mkStringReader readTWiki) ,("docx" , mkBSReaderWithWarnings readDocxWithWarnings) ,("odt" , mkBSReader readOdt) ,("t2t" , mkStringReader readTxt2TagsNoMacros) ,("epub" , mkBSReader readEPUB) ] data Writer = PureStringWriter (WriterOptions -> Pandoc -> String) | IOStringWriter (WriterOptions -> Pandoc -> IO String) | IOByteStringWriter (WriterOptions -> Pandoc -> IO BL.ByteString) -- | Association list of formats and writers. writers :: [ ( String, Writer ) ] writers = [ ("native" , PureStringWriter writeNative) ,("json" , PureStringWriter writeJSON) ,("docx" , IOByteStringWriter writeDocx) ,("odt" , IOByteStringWriter writeODT) ,("epub" , IOByteStringWriter $ \o -> writeEPUB o{ writerEpubVersion = Just EPUB2 }) ,("epub3" , IOByteStringWriter $ \o -> writeEPUB o{ writerEpubVersion = Just EPUB3 }) ,("fb2" , IOStringWriter writeFB2) ,("html" , PureStringWriter writeHtmlString) ,("html5" , PureStringWriter $ \o -> writeHtmlString o{ writerHtml5 = True }) ,("icml" , IOStringWriter writeICML) ,("s5" , PureStringWriter $ \o -> writeHtmlString o{ writerSlideVariant = S5Slides , writerTableOfContents = False }) ,("slidy" , PureStringWriter $ \o -> writeHtmlString o{ writerSlideVariant = SlidySlides }) ,("slideous" , PureStringWriter $ \o -> writeHtmlString o{ writerSlideVariant = SlideousSlides }) ,("dzslides" , PureStringWriter $ \o -> writeHtmlString o{ writerSlideVariant = DZSlides , writerHtml5 = True }) ,("revealjs" , PureStringWriter $ \o -> writeHtmlString o{ writerSlideVariant = RevealJsSlides , writerHtml5 = True }) ,("docbook" , PureStringWriter writeDocbook) ,("docbook5" , PureStringWriter $ \o -> writeDocbook o{ writerDocbook5 = True }) ,("opml" , PureStringWriter writeOPML) ,("opendocument" , PureStringWriter writeOpenDocument) ,("latex" , PureStringWriter writeLaTeX) ,("beamer" , PureStringWriter $ \o -> writeLaTeX o{ writerBeamer = True }) ,("context" , PureStringWriter writeConTeXt) ,("texinfo" , PureStringWriter writeTexinfo) ,("man" , PureStringWriter writeMan) ,("markdown" , PureStringWriter writeMarkdown) ,("markdown_strict" , PureStringWriter writeMarkdown) ,("markdown_phpextra" , PureStringWriter writeMarkdown) ,("markdown_github" , PureStringWriter writeMarkdown) ,("markdown_mmd" , PureStringWriter writeMarkdown) ,("plain" , PureStringWriter writePlain) ,("rst" , PureStringWriter writeRST) ,("mediawiki" , PureStringWriter writeMediaWiki) ,("dokuwiki" , PureStringWriter writeDokuWiki) ,("zimwiki" , PureStringWriter writeZimWiki) ,("textile" , PureStringWriter writeTextile) ,("rtf" , IOStringWriter writeRTFWithEmbeddedImages) ,("org" , PureStringWriter writeOrg) ,("asciidoc" , PureStringWriter writeAsciiDoc) ,("haddock" , PureStringWriter writeHaddock) ,("commonmark" , PureStringWriter writeCommonMark) ,("tei" , PureStringWriter writeTEI) ] getDefaultExtensions :: String -> Set Extension getDefaultExtensions "markdown_strict" = strictExtensions getDefaultExtensions "markdown_phpextra" = phpMarkdownExtraExtensions getDefaultExtensions "markdown_mmd" = multimarkdownExtensions getDefaultExtensions "markdown_github" = githubMarkdownExtensions getDefaultExtensions "markdown" = pandocExtensions getDefaultExtensions "plain" = plainExtensions 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_raw_html, Ext_native_divs, Ext_native_spans, Ext_epub_html_exts] getDefaultExtensions _ = Set.fromList [Ext_auto_identifiers] -- | Retrieve reader based on formatSpec (format+extensions). getReader :: String -> Either String Reader getReader s = case parseFormatSpec s of Left e -> Left $ intercalate "\n" [m | Message m <- errorMessages e] Right (readerName, setExts) -> case lookup readerName readers of Nothing -> Left $ "Unknown reader: " ++ readerName Just (StringReader r) -> Right $ StringReader $ \o -> r o{ readerExtensions = setExts $ getDefaultExtensions readerName } Just (ByteStringReader r) -> Right $ ByteStringReader $ \o -> r o{ readerExtensions = setExts $ getDefaultExtensions readerName } -- | Retrieve writer based on formatSpec (format+extensions). getWriter :: String -> Either String Writer getWriter s = case parseFormatSpec s of Left e -> Left $ intercalate "\n" [m | Message m <- errorMessages e] Right (writerName, setExts) -> case lookup writerName writers of Nothing -> Left $ "Unknown writer: " ++ writerName Just (PureStringWriter r) -> Right $ PureStringWriter $ \o -> r o{ writerExtensions = setExts $ getDefaultExtensions writerName } Just (IOStringWriter r) -> Right $ IOStringWriter $ \o -> r o{ writerExtensions = setExts $ getDefaultExtensions writerName } Just (IOByteStringWriter r) -> Right $ IOByteStringWriter $ \o -> r o{ writerExtensions = setExts $ getDefaultExtensions writerName } {-# DEPRECATED toJsonFilter "Use 'toJSONFilter' from 'Text.Pandoc.JSON' instead" #-} -- | Deprecated. Use @toJSONFilter@ from @Text.Pandoc.JSON@ instead. class ToJSONFilter a => ToJsonFilter a where toJsonFilter :: a -> IO () toJsonFilter = toJSONFilter readJSON :: ReaderOptions -> String -> Either PandocError Pandoc readJSON _ = mapLeft ParseFailure . eitherDecode' . UTF8.fromStringLazy writeJSON :: WriterOptions -> Pandoc -> String writeJSON _ = UTF8.toStringLazy . encode pandoc-1.19.2.4/src/Text/Pandoc/Options.hs0000644000000000000000000005177413155240142016321 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-} {- Copyright (C) 2012-2016 John MacFarlane 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.Options Copyright : Copyright (C) 2012-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Data structures and functions for representing parser and writer options. -} module Text.Pandoc.Options ( Extension(..) , pandocExtensions , plainExtensions , strictExtensions , phpMarkdownExtraExtensions , githubMarkdownExtensions , multimarkdownExtensions , ReaderOptions(..) , HTMLMathMethod (..) , CiteMethod (..) , ObfuscationMethod (..) , HTMLSlideVariant (..) , EPUBVersion (..) , WrapOption (..) , TopLevelDivision (..) , WriterOptions (..) , TrackChanges (..) , ReferenceLocation (..) , def , isEnabled ) where import Data.Set (Set) import qualified Data.Set as Set import Data.Default import Text.Pandoc.Highlighting (Style, pygments) import Text.Pandoc.MediaBag (MediaBag) import Data.Data (Data) import Data.Typeable (Typeable) import GHC.Generics (Generic) -- | Individually selectable syntax extensions. data Extension = Ext_footnotes -- ^ Pandoc/PHP/MMD style footnotes | Ext_inline_notes -- ^ Pandoc-style inline notes | Ext_pandoc_title_block -- ^ Pandoc title block | Ext_yaml_metadata_block -- ^ YAML metadata block | Ext_mmd_title_block -- ^ Multimarkdown metadata block | Ext_table_captions -- ^ Pandoc-style table captions | Ext_implicit_figures -- ^ A paragraph with just an image is a figure | Ext_simple_tables -- ^ Pandoc-style simple tables | Ext_multiline_tables -- ^ Pandoc-style multiline tables | Ext_grid_tables -- ^ Grid tables (pandoc, reST) | Ext_pipe_tables -- ^ Pipe tables (as in PHP markdown extra) | Ext_citations -- ^ Pandoc/citeproc citations | Ext_raw_tex -- ^ Allow raw TeX (other than math) | Ext_raw_html -- ^ Allow raw HTML | Ext_tex_math_dollars -- ^ TeX math between $..$ or $$..$$ | Ext_tex_math_single_backslash -- ^ TeX math btw \(..\) \[..\] | Ext_tex_math_double_backslash -- ^ TeX math btw \\(..\\) \\[..\\] | Ext_latex_macros -- ^ Parse LaTeX macro definitions (for math only) | Ext_fenced_code_blocks -- ^ Parse fenced code blocks | Ext_fenced_code_attributes -- ^ Allow attributes on fenced code blocks | Ext_backtick_code_blocks -- ^ GitHub style ``` code blocks | Ext_inline_code_attributes -- ^ Allow attributes on inline code | Ext_markdown_in_html_blocks -- ^ Interpret as markdown inside HTML blocks | Ext_native_divs -- ^ Use Div blocks for contents of
tags | Ext_native_spans -- ^ Use Span inlines for contents of | Ext_bracketed_spans -- ^ Bracketed spans with attributes | Ext_markdown_attribute -- ^ Interpret text inside HTML as markdown -- iff container has attribute 'markdown' | Ext_escaped_line_breaks -- ^ Treat a backslash at EOL as linebreak | Ext_link_attributes -- ^ link and image attributes | Ext_mmd_link_attributes -- ^ MMD style reference link attributes | Ext_autolink_bare_uris -- ^ Make all absolute URIs into links | Ext_fancy_lists -- ^ Enable fancy list numbers and delimiters | Ext_lists_without_preceding_blankline -- ^ Allow lists without preceding blank | Ext_startnum -- ^ Make start number of ordered list significant | Ext_definition_lists -- ^ Definition lists as in pandoc, mmd, php | Ext_compact_definition_lists -- ^ Definition lists without -- space between items, and disallow laziness | Ext_example_lists -- ^ Markdown-style numbered examples | Ext_all_symbols_escapable -- ^ Make all non-alphanumerics escapable | Ext_angle_brackets_escapable -- ^ Make < and > escapable | Ext_intraword_underscores -- ^ Treat underscore inside word as literal | Ext_blank_before_blockquote -- ^ Require blank line before a blockquote | Ext_blank_before_header -- ^ Require blank line before a header | Ext_strikeout -- ^ Strikeout using ~~this~~ syntax | Ext_superscript -- ^ Superscript using ^this^ syntax | Ext_subscript -- ^ Subscript using ~this~ syntax | Ext_hard_line_breaks -- ^ All newlines become hard line breaks | Ext_ignore_line_breaks -- ^ Newlines in paragraphs are ignored | Ext_east_asian_line_breaks -- ^ Newlines in paragraphs are ignored between -- East Asian wide characters | 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} | Ext_mmd_header_identifiers -- ^ Multimarkdown style header identifiers [myid] | Ext_implicit_header_references -- ^ Implicit reference links for headers | 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, Generic) pandocExtensions :: Set Extension pandocExtensions = Set.fromList [ Ext_footnotes , Ext_inline_notes , Ext_pandoc_title_block , Ext_yaml_metadata_block , Ext_table_captions , Ext_implicit_figures , Ext_simple_tables , Ext_multiline_tables , Ext_grid_tables , Ext_pipe_tables , Ext_citations , Ext_raw_tex , Ext_raw_html , Ext_tex_math_dollars , Ext_latex_macros , Ext_fenced_code_blocks , Ext_fenced_code_attributes , Ext_backtick_code_blocks , Ext_inline_code_attributes , Ext_markdown_in_html_blocks , Ext_native_divs , Ext_native_spans , Ext_bracketed_spans , Ext_escaped_line_breaks , Ext_fancy_lists , Ext_startnum , Ext_definition_lists , Ext_example_lists , Ext_all_symbols_escapable , Ext_intraword_underscores , Ext_blank_before_blockquote , Ext_blank_before_header , Ext_strikeout , Ext_superscript , Ext_subscript , Ext_auto_identifiers , Ext_header_attributes , Ext_link_attributes , Ext_implicit_header_references , Ext_line_blocks , Ext_shortcut_reference_links ] plainExtensions :: Set Extension plainExtensions = Set.fromList [ Ext_table_captions , Ext_implicit_figures , Ext_simple_tables , Ext_multiline_tables , Ext_grid_tables , Ext_latex_macros , Ext_fancy_lists , Ext_startnum , Ext_definition_lists , Ext_example_lists , Ext_intraword_underscores , Ext_blank_before_blockquote , Ext_blank_before_header , Ext_strikeout ] phpMarkdownExtraExtensions :: Set Extension phpMarkdownExtraExtensions = Set.fromList [ Ext_footnotes , Ext_pipe_tables , Ext_raw_html , Ext_markdown_attribute , Ext_fenced_code_blocks , Ext_definition_lists , Ext_intraword_underscores , Ext_header_attributes , Ext_link_attributes , Ext_abbreviations , Ext_shortcut_reference_links ] githubMarkdownExtensions :: Set Extension githubMarkdownExtensions = Set.fromList [ Ext_angle_brackets_escapable , Ext_pipe_tables , Ext_raw_html , Ext_fenced_code_blocks , Ext_auto_identifiers , Ext_ascii_identifiers , Ext_backtick_code_blocks , Ext_autolink_bare_uris , Ext_intraword_underscores , Ext_strikeout , Ext_hard_line_breaks , Ext_emoji , Ext_lists_without_preceding_blankline , Ext_shortcut_reference_links ] multimarkdownExtensions :: Set Extension multimarkdownExtensions = Set.fromList [ Ext_pipe_tables , Ext_raw_html , Ext_markdown_attribute , Ext_mmd_link_attributes -- , Ext_raw_tex -- Note: MMD's raw TeX syntax requires raw TeX to be -- enclosed in HTML comment , Ext_tex_math_double_backslash , Ext_intraword_underscores , Ext_mmd_title_block , Ext_footnotes , Ext_definition_lists , Ext_all_symbols_escapable , 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 strictExtensions = Set.fromList [ Ext_raw_html , Ext_shortcut_reference_links ] data ReaderOptions = ReaderOptions{ readerExtensions :: Set Extension -- ^ Syntax extensions , readerSmart :: Bool -- ^ Smart punctuation , readerStandalone :: Bool -- ^ Standalone document with header , readerParseRaw :: Bool -- ^ Parse raw HTML, LaTeX , readerColumns :: Int -- ^ Number of columns in terminal , readerTabStop :: Int -- ^ Tab stop , readerOldDashes :: Bool -- ^ Use pandoc <= 1.8.2.1 behavior -- in parsing dashes; -- is em-dash; -- - before numerial is en-dash , readerApplyMacros :: Bool -- ^ Apply macros to TeX math , readerIndentedCodeClasses :: [String] -- ^ Default classes for -- indented code blocks , readerDefaultImageExtension :: String -- ^ Default extension for images , readerTrace :: Bool -- ^ Print debugging info , readerTrackChanges :: TrackChanges , readerFileScope :: Bool -- ^ Parse before combining } deriving (Show, Read, Data, Typeable, Generic) instance Default ReaderOptions where def = ReaderOptions{ readerExtensions = pandocExtensions , readerSmart = False , readerStandalone = False , readerParseRaw = False , readerColumns = 80 , readerTabStop = 4 , readerOldDashes = False , readerApplyMacros = True , readerIndentedCodeClasses = [] , readerDefaultImageExtension = "" , readerTrace = False , readerTrackChanges = AcceptChanges , readerFileScope = False } -- -- Writer options -- data EPUBVersion = EPUB2 | EPUB3 deriving (Eq, Show, Read, Data, Typeable, Generic) data HTMLMathMethod = PlainMath | LaTeXMathML (Maybe String) -- url of LaTeXMathML.js | JsMath (Maybe String) -- url of jsMath load script | GladTeX | WebTeX String -- url of TeX->image script. | 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, 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, Generic) -- | Methods for obfuscating email addresses in HTML. data ObfuscationMethod = NoObfuscation | ReferenceObfuscation | JavascriptObfuscation deriving (Show, Read, Eq, Data, Typeable, Generic) -- | Varieties of HTML slide shows. data HTMLSlideVariant = S5Slides | SlidySlides | SlideousSlides | DZSlides | RevealJsSlides | NoSlides 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, Generic) -- | Options for wrapping text in the output. data WrapOption = WrapAuto -- ^ Automatically wrap to width | WrapNone -- ^ No non-semantic newlines | WrapPreserve -- ^ Preserve wrapping of input source deriving (Show, Read, Eq, Data, Typeable, Generic) -- | Options defining the type of top-level headers. data TopLevelDivision = TopLevelPart -- ^ Top-level headers become parts | TopLevelChapter -- ^ Top-level headers become chapters | TopLevelSection -- ^ Top-level headers become sections | TopLevelDefault -- ^ Top-level type is determined via -- heuristics deriving (Show, Read, Eq, Data, Typeable, Generic) -- | Locations for footnotes and references in markdown output data ReferenceLocation = EndOfBlock -- ^ End of block | EndOfSection -- ^ prior to next section header (or end of document) | EndOfDocument -- ^ at end of document deriving (Show, Read, Eq, Data, Typeable, Generic) -- | Options for writers data WriterOptions = WriterOptions { writerTemplate :: Maybe String -- ^ Template to use , writerVariables :: [(String, String)] -- ^ Variables to set in template , writerTabStop :: Int -- ^ Tabstop for conversion btw spaces and tabs , writerTableOfContents :: Bool -- ^ Include table of contents , writerSlideVariant :: HTMLSlideVariant -- ^ Are we writing S5, Slidy or Slideous? , writerIncremental :: Bool -- ^ True if lists should be incremental , writerHTMLMathMethod :: HTMLMathMethod -- ^ How to print math in HTML , writerIgnoreNotes :: Bool -- ^ Ignore footnotes (used in making toc) , writerNumberSections :: Bool -- ^ Number sections in LaTeX , writerNumberOffset :: [Int] -- ^ Starting number for section, subsection, ... , writerSectionDivs :: Bool -- ^ Put sections in div tags in HTML , writerExtensions :: Set Extension -- ^ Markdown extensions that can be used , writerReferenceLinks :: Bool -- ^ Use reference links in writing markdown, rst , writerDpi :: Int -- ^ Dpi for pixel to/from inch/cm conversions , writerWrapText :: WrapOption -- ^ Option for wrapping text , writerColumns :: Int -- ^ Characters in a line (for text wrapping) , writerEmailObfuscation :: ObfuscationMethod -- ^ How to obfuscate emails , writerIdentifierPrefix :: String -- ^ Prefix for section & note ids in HTML -- and for footnote marks in markdown , writerSourceURL :: Maybe String -- ^ Absolute URL + directory of 1st source file , writerUserDataDir :: Maybe FilePath -- ^ Path of user data directory , writerCiteMethod :: CiteMethod -- ^ How to print cites , writerDocbook5 :: Bool -- ^ Produce DocBook5 , writerHtml5 :: Bool -- ^ Produce HTML5 , writerHtmlQTags :: Bool -- ^ Use @@ tags for quotes in HTML , writerBeamer :: Bool -- ^ Produce beamer LaTeX slide show , writerSlideLevel :: Maybe Int -- ^ Force header level of slides , writerTopLevelDivision :: TopLevelDivision -- ^ Type of top-level divisions , writerListings :: Bool -- ^ Use listings package for code , writerHighlight :: Bool -- ^ Highlight source code , writerHighlightStyle :: Style -- ^ Style to use for highlighting , writerSetextHeaders :: Bool -- ^ Use setext headers for levels 1-2 in markdown , writerTeXLigatures :: Bool -- ^ Use tex ligatures quotes, dashes in latex , writerEpubVersion :: Maybe EPUBVersion -- ^ Nothing or EPUB version , writerEpubMetadata :: String -- ^ Metadata to include in EPUB , writerEpubStylesheet :: Maybe String -- ^ EPUB stylesheet specified at command line , writerEpubFonts :: [FilePath] -- ^ Paths to fonts to embed , writerEpubChapterLevel :: Int -- ^ Header level for chapters (separate files) , writerTOCDepth :: Int -- ^ Number of levels to include in TOC , writerReferenceODT :: Maybe FilePath -- ^ Path to reference ODT if specified , writerReferenceDocx :: Maybe FilePath -- ^ Path to reference DOCX if specified , writerMediaBag :: MediaBag -- ^ Media collected by docx or epub reader , writerVerbose :: Bool -- ^ Verbose debugging output , writerLaTeXArgs :: [String] -- ^ Flags to pass to latex-engine , writerReferenceLocation :: ReferenceLocation -- ^ Location of footnotes and references for writing markdown } deriving (Show, Data, Typeable, Generic) instance Default WriterOptions where def = WriterOptions { writerTemplate = Nothing , writerVariables = [] , writerTabStop = 4 , writerTableOfContents = False , writerSlideVariant = NoSlides , writerIncremental = False , writerHTMLMathMethod = PlainMath , writerIgnoreNotes = False , writerNumberSections = False , writerNumberOffset = [0,0,0,0,0,0] , writerSectionDivs = False , writerExtensions = pandocExtensions , writerReferenceLinks = False , writerDpi = 96 , writerWrapText = WrapAuto , writerColumns = 72 , writerEmailObfuscation = NoObfuscation , writerIdentifierPrefix = "" , writerSourceURL = Nothing , writerUserDataDir = Nothing , writerCiteMethod = Citeproc , writerDocbook5 = False , writerHtml5 = False , writerHtmlQTags = False , writerBeamer = False , writerSlideLevel = Nothing , writerTopLevelDivision = TopLevelDefault , writerListings = False , writerHighlight = False , writerHighlightStyle = pygments , writerSetextHeaders = True , writerTeXLigatures = True , writerEpubVersion = Nothing , writerEpubMetadata = "" , writerEpubStylesheet = Nothing , writerEpubFonts = [] , writerEpubChapterLevel = 1 , writerTOCDepth = 3 , writerReferenceODT = Nothing , writerReferenceDocx = Nothing , writerMediaBag = mempty , writerVerbose = False , writerLaTeXArgs = [] , writerReferenceLocation = EndOfDocument } -- | Returns True if the given extension is enabled. isEnabled :: Extension -> WriterOptions -> Bool isEnabled ext opts = ext `Set.member` (writerExtensions opts) pandoc-1.19.2.4/src/Text/Pandoc/Pretty.hs0000644000000000000000000004274313155240142016151 0ustar0000000000000000{-# LANGUAGE GeneralizedNewtypeDeriving, CPP #-} {- Copyright (C) 2010-2016 John MacFarlane 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(-1)307 USA -} {- | Module : Text.Pandoc.Pretty Copyright : Copyright (C) 2010-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable A prettyprinting library for the production of text documents, including wrapped text, indentated blocks, and tables. -} module Text.Pandoc.Pretty ( Doc , render , cr , blankline , blanklines , space , text , char , prefixed , flush , nest , hang , beforeNonBlank , nowrap , afterBreak , offset , minOffset , height , lblock , cblock , rblock , (<>) , (<+>) , ($$) , ($+$) , isEmpty , empty , cat , hcat , hsep , vcat , vsep , nestle , chomp , inside , braces , brackets , parens , quotes , doubleQuotes , charWidth , realLength ) where import Data.Sequence (Seq, fromList, (<|), singleton, mapWithIndex, viewl, ViewL(..)) import qualified Data.Sequence as Seq import Data.Foldable (toList) import Data.List (intersperse) import Data.String import Control.Monad.State import Data.Char (isSpace) import Data.Monoid ((<>)) data RenderState a = RenderState{ output :: [a] -- ^ In reverse order , prefix :: String , usePrefix :: Bool , lineLength :: Maybe Int -- ^ 'Nothing' means no wrapping , column :: Int , newlines :: Int -- ^ Number of preceding newlines } type DocState a = State (RenderState a) () data D = Text Int String | Block Int [String] | Prefixed String Doc | BeforeNonBlank Doc | Flush Doc | BreakingSpace | AfterBreak String | CarriageReturn | NewLine | BlankLines Int -- number of blank lines deriving (Show) newtype Doc = Doc { unDoc :: Seq D } deriving (Monoid, Show) instance IsString Doc where fromString = text isBlank :: D -> Bool isBlank BreakingSpace = True isBlank CarriageReturn = True isBlank NewLine = True isBlank (BlankLines _) = True isBlank (Text _ (c:_)) = isSpace c isBlank _ = False -- | True if the document is empty. isEmpty :: Doc -> Bool isEmpty = Seq.null . unDoc -- | The empty document. empty :: Doc empty = mempty -- | Concatenate a list of 'Doc's. cat :: [Doc] -> Doc cat = mconcat -- | Same as 'cat'. hcat :: [Doc] -> Doc hcat = mconcat -- | Concatenate a list of 'Doc's, putting breakable spaces -- between them. infixr 6 <+> (<+>) :: Doc -> Doc -> Doc (<+>) x y = if isEmpty x then y else if isEmpty y then x else x <> space <> y -- | Same as 'cat', but putting breakable spaces between the -- 'Doc's. hsep :: [Doc] -> Doc hsep = foldr (<+>) empty infixr 5 $$ -- | @a $$ b@ puts @a@ above @b@. ($$) :: Doc -> Doc -> Doc ($$) x y = if isEmpty x then y else if isEmpty y then x else x <> cr <> y infixr 5 $+$ -- | @a $+$ b@ puts @a@ above @b@, with a blank line between. ($+$) :: Doc -> Doc -> Doc ($+$) x y = if isEmpty x then y else if isEmpty y then x else x <> blankline <> y -- | List version of '$$'. vcat :: [Doc] -> Doc vcat = foldr ($$) empty -- | List version of '$+$'. vsep :: [Doc] -> Doc vsep = foldr ($+$) empty -- | Removes leading blank lines from a 'Doc'. nestle :: Doc -> Doc nestle (Doc d) = Doc $ go d where go x = case viewl x of (BlankLines _ :< rest) -> go rest (NewLine :< rest) -> go rest _ -> x -- | Chomps trailing blank space off of a 'Doc'. chomp :: Doc -> Doc chomp d = Doc (fromList dl') where dl = toList (unDoc d) dl' = reverse $ go $ reverse dl go [] = [] go (BreakingSpace : xs) = go xs go (CarriageReturn : xs) = go xs go (NewLine : xs) = go xs go (BlankLines _ : xs) = go xs go (Prefixed s d' : xs) = Prefixed s (chomp d') : xs go xs = xs outp :: (IsString a) => Int -> String -> DocState a outp off s | off < 0 = do -- offset < 0 means newline characters st' <- get let rawpref = prefix st' when (column st' == 0 && usePrefix st' && not (null rawpref)) $ do let pref = reverse $ dropWhile isSpace $ reverse rawpref modify $ \st -> st{ output = fromString pref : output st , column = column st + realLength pref } let numnewlines = length $ takeWhile (=='\n') $ reverse s modify $ \st -> st { output = fromString s : output st , column = 0 , newlines = newlines st + numnewlines } outp off s = do -- offset >= 0 (0 might be combining char) st' <- get let pref = prefix st' when (column st' == 0 && usePrefix st' && not (null pref)) $ do modify $ \st -> st{ output = fromString pref : output st , column = column st + realLength pref } modify $ \st -> st{ output = fromString s : output st , column = column st + off , newlines = 0 } -- | Renders a 'Doc'. @render (Just n)@ will use -- a line length of @n@ to reflow text on breakable spaces. -- @render Nothing@ will not reflow text. render :: (IsString a) => Maybe Int -> Doc -> a render linelen doc = fromString . mconcat . reverse . output $ execState (renderDoc doc) startingState where startingState = RenderState{ output = mempty , prefix = "" , usePrefix = True , lineLength = linelen , column = 0 , newlines = 2 } renderDoc :: (IsString a, Monoid a) => Doc -> DocState a renderDoc = renderList . toList . unDoc data IsBlock = IsBlock Int [String] -- This would be nicer with a pattern synonym -- pattern VBlock i s <- mkIsBlock -> Just (IsBlock ..) renderList :: (IsString a, Monoid a) => [D] -> DocState a renderList [] = return () renderList (Text off s : xs) = do outp off s renderList xs renderList (Prefixed pref d : xs) = do st <- get let oldPref = prefix st put st{ prefix = prefix st ++ pref } renderDoc d modify $ \s -> s{ prefix = oldPref } renderList xs renderList (Flush d : xs) = do st <- get let oldUsePrefix = usePrefix st put st{ usePrefix = False } renderDoc d modify $ \s -> s{ usePrefix = oldUsePrefix } renderList xs renderList (BeforeNonBlank d : xs) = case xs of (x:_) | isBlank x -> renderList xs | otherwise -> renderDoc d >> renderList xs [] -> renderList xs renderList [BlankLines _] = return () renderList (BlankLines m : BlankLines n : xs) = renderList (BlankLines (max m n) : xs) renderList (BlankLines num : xs) = do st <- get case output st of _ | newlines st > num -> return () | otherwise -> replicateM_ (1 + num - newlines st) (outp (-1) "\n") renderList xs renderList (CarriageReturn : BlankLines m : xs) = renderList (BlankLines m : xs) renderList (CarriageReturn : xs) = do st <- get if newlines st > 0 || null xs then renderList xs else do outp (-1) "\n" renderList xs renderList (NewLine : xs) = do outp (-1) "\n" renderList xs renderList (BreakingSpace : CarriageReturn : xs) = renderList (CarriageReturn:xs) renderList (BreakingSpace : NewLine : xs) = renderList (NewLine:xs) renderList (BreakingSpace : BlankLines n : xs) = renderList (BlankLines n:xs) renderList (BreakingSpace : BreakingSpace : xs) = renderList (BreakingSpace:xs) renderList (BreakingSpace : xs) = do let isText (Text _ _) = True isText (Block _ _) = True isText (AfterBreak _) = True isText _ = False let isBreakingSpace BreakingSpace = True isBreakingSpace _ = False let xs' = dropWhile isBreakingSpace xs let next = takeWhile isText xs' st <- get let off = sum $ map offsetOf next case lineLength st of Just l | column st + 1 + off > l -> do outp (-1) "\n" renderList xs' _ -> do outp 1 " " renderList xs' renderList (AfterBreak s : xs) = do st <- get if newlines st > 0 then outp (realLength s) s else return () renderList xs renderList (Block i1 s1 : Block i2 s2 : xs) = renderList (mergeBlocks False (IsBlock i1 s1) (IsBlock i2 s2) : xs) renderList (Block i1 s1 : BreakingSpace : Block i2 s2 : xs) = renderList (mergeBlocks True (IsBlock i1 s1) (IsBlock i2 s2) : xs) renderList (Block _width lns : xs) = do st <- get let oldPref = prefix st case column st - realLength oldPref of n | n > 0 -> modify $ \s -> s{ prefix = oldPref ++ replicate n ' ' } _ -> return () renderList $ intersperse CarriageReturn (map (Text 0) lns) modify $ \s -> s{ prefix = oldPref } renderList xs mergeBlocks :: Bool -> IsBlock -> IsBlock -> D mergeBlocks addSpace (IsBlock w1 lns1) (IsBlock w2 lns2) = Block (w1 + w2 + if addSpace then 1 else 0) $ zipWith (\l1 l2 -> pad w1 l1 ++ l2) lns1' (map sp lns2') where (lns1', lns2') = case (length lns1, length lns2) of (x, y) | x > y -> (lns1, lns2 ++ replicate (x - y) "") | x < y -> (lns1 ++ replicate (y - x) "", lns2) | otherwise -> (lns1, lns2) pad n s = s ++ replicate (n - realLength s) ' ' sp "" = "" sp xs = if addSpace then (' ' : xs) else xs offsetOf :: D -> Int offsetOf (Text o _) = o offsetOf (Block w _) = w offsetOf BreakingSpace = 1 offsetOf _ = 0 -- | A literal string. text :: String -> Doc text = Doc . toChunks where toChunks :: String -> Seq D toChunks [] = mempty toChunks s = case break (=='\n') s of ([], _:ys) -> NewLine <| toChunks ys (xs, _:ys) -> Text (realLength xs) xs <| (NewLine <| toChunks ys) (xs, []) -> singleton $ Text (realLength xs) xs -- | A character. char :: Char -> Doc char c = text [c] -- | A breaking (reflowable) space. space :: Doc space = Doc $ singleton BreakingSpace -- | A carriage return. Does nothing if we're at the beginning of -- a line; otherwise inserts a newline. cr :: Doc cr = Doc $ singleton CarriageReturn -- | Inserts a blank line unless one exists already. -- (@blankline <> blankline@ has the same effect as @blankline@. blankline :: Doc blankline = Doc $ singleton (BlankLines 1) -- | Inserts a blank lines unless they exists already. -- (@blanklines m <> blanklines n@ has the same effect as @blankline (max m n)@. blanklines :: Int -> Doc blanklines n = Doc $ singleton (BlankLines n) -- | Uses the specified string as a prefix for every line of -- the inside document (except the first, if not at the beginning -- of the line). prefixed :: String -> Doc -> Doc prefixed pref doc = Doc $ singleton $ Prefixed pref doc -- | Makes a 'Doc' flush against the left margin. flush :: Doc -> Doc flush doc = Doc $ singleton $ Flush doc -- | Indents a 'Doc' by the specified number of spaces. nest :: Int -> Doc -> Doc nest ind = prefixed (replicate ind ' ') -- | A hanging indent. @hang ind start doc@ prints @start@, -- then @doc@, leaving an indent of @ind@ spaces on every -- line but the first. hang :: Int -> Doc -> Doc -> Doc hang ind start doc = start <> nest ind doc -- | @beforeNonBlank d@ conditionally includes @d@ unless it is -- followed by blank space. beforeNonBlank :: Doc -> Doc beforeNonBlank d = Doc $ singleton (BeforeNonBlank d) -- | Makes a 'Doc' non-reflowable. nowrap :: Doc -> Doc nowrap doc = Doc $ mapWithIndex replaceSpace $ unDoc doc where replaceSpace _ BreakingSpace = Text 1 " " replaceSpace _ x = x -- | Content to print only if it comes at the beginning of a line, -- to be used e.g. for escaping line-initial `.` in groff man. afterBreak :: String -> Doc afterBreak s = Doc $ singleton (AfterBreak s) -- | Returns the width of a 'Doc'. offset :: Doc -> Int offset d = case map realLength . lines . render Nothing $ d of [] -> 0 os -> maximum os -- | Returns the minimal width of a 'Doc' when reflowed at breakable spaces. minOffset :: Doc -> Int minOffset d = maximum (0: map realLength (lines $ render (Just 0) d)) -- | @lblock n d@ is a block of width @n@ characters, with -- text derived from @d@ and aligned to the left. lblock :: Int -> Doc -> Doc lblock = block id -- | Like 'lblock' but aligned to the right. rblock :: Int -> Doc -> Doc rblock w = block (\s -> replicate (w - realLength s) ' ' ++ s) w -- | Like 'lblock' but aligned centered. cblock :: Int -> Doc -> Doc cblock w = block (\s -> replicate ((w - realLength s) `div` 2) ' ' ++ s) w -- | Returns the height of a block or other 'Doc'. height :: Doc -> Int height = length . lines . render Nothing block :: (String -> String) -> Int -> Doc -> Doc block filler width d | width < 1 && not (isEmpty d) = error "Text.Pandoc.Pretty.block: width < 1" | otherwise = Doc $ singleton $ Block width $ map filler $ chop width $ render (Just width) d chop :: Int -> String -> [String] chop _ [] = [] chop n cs = case break (=='\n') cs of (xs, ys) -> if len <= n then case ys of [] -> [xs] ['\n'] -> [xs] (_:zs) -> xs : chop n zs else take n xs : chop n (drop n xs ++ ys) where len = realLength xs -- | Encloses a 'Doc' inside a start and end 'Doc'. inside :: Doc -> Doc -> Doc -> Doc inside start end contents = start <> contents <> end -- | Puts a 'Doc' in curly braces. braces :: Doc -> Doc braces = inside (char '{') (char '}') -- | Puts a 'Doc' in square brackets. brackets :: Doc -> Doc brackets = inside (char '[') (char ']') -- | Puts a 'Doc' in parentheses. parens :: Doc -> Doc parens = inside (char '(') (char ')') -- | Wraps a 'Doc' in single quotes. quotes :: Doc -> Doc quotes = inside (char '\'') (char '\'') -- | Wraps a 'Doc' in double quotes. doubleQuotes :: Doc -> Doc doubleQuotes = inside (char '"') (char '"') -- | Returns width of a character in a monospace font: 0 for a combining -- character, 1 for a regular character, 2 for an East Asian wide character. charWidth :: Char -> Int charWidth c = case c of _ | c < '\x0300' -> 1 | c >= '\x0300' && c <= '\x036F' -> 0 -- combining | c >= '\x0370' && c <= '\x10FC' -> 1 | c >= '\x1100' && c <= '\x115F' -> 2 | c >= '\x1160' && c <= '\x11A2' -> 1 | c >= '\x11A3' && c <= '\x11A7' -> 2 | c >= '\x11A8' && c <= '\x11F9' -> 1 | c >= '\x11FA' && c <= '\x11FF' -> 2 | c >= '\x1200' && c <= '\x2328' -> 1 | c >= '\x2329' && c <= '\x232A' -> 2 | c >= '\x232B' && c <= '\x2E31' -> 1 | c >= '\x2E80' && c <= '\x303E' -> 2 | c == '\x303F' -> 1 | c >= '\x3041' && c <= '\x3247' -> 2 | c >= '\x3248' && c <= '\x324F' -> 1 -- ambiguous | c >= '\x3250' && c <= '\x4DBF' -> 2 | c >= '\x4DC0' && c <= '\x4DFF' -> 1 | c >= '\x4E00' && c <= '\xA4C6' -> 2 | c >= '\xA4D0' && c <= '\xA95F' -> 1 | c >= '\xA960' && c <= '\xA97C' -> 2 | c >= '\xA980' && c <= '\xABF9' -> 1 | c >= '\xAC00' && c <= '\xD7FB' -> 2 | c >= '\xD800' && c <= '\xDFFF' -> 1 | c >= '\xE000' && c <= '\xF8FF' -> 1 -- ambiguous | c >= '\xF900' && c <= '\xFAFF' -> 2 | c >= '\xFB00' && c <= '\xFDFD' -> 1 | c >= '\xFE00' && c <= '\xFE0F' -> 1 -- ambiguous | c >= '\xFE10' && c <= '\xFE19' -> 2 | c >= '\xFE20' && c <= '\xFE26' -> 1 | c >= '\xFE30' && c <= '\xFE6B' -> 2 | c >= '\xFE70' && c <= '\xFEFF' -> 1 | c >= '\xFF01' && c <= '\xFF60' -> 2 | c >= '\xFF61' && c <= '\x16A38' -> 1 | c >= '\x1B000' && c <= '\x1B001' -> 2 | c >= '\x1D000' && c <= '\x1F1FF' -> 1 | c >= '\x1F200' && c <= '\x1F251' -> 2 | c >= '\x1F300' && c <= '\x1F773' -> 1 | c >= '\x20000' && c <= '\x3FFFD' -> 2 | otherwise -> 1 -- | Get real length of string, taking into account combining and double-wide -- characters. realLength :: String -> Int realLength = foldr (\a b -> charWidth a + b) 0 pandoc-1.19.2.4/src/Text/Pandoc/Shared.hs0000644000000000000000000012526013155240142016064 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable, CPP, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables, PatternGuards, ViewPatterns #-} {- Copyright (C) 2006-2016 John MacFarlane 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.Shared Copyright : Copyright (C) 2006-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Utility functions and definitions used by the various Pandoc modules. -} module Text.Pandoc.Shared ( -- * List processing splitBy, splitByIndices, splitStringByIndices, substitute, ordNub, -- * Text processing backslashEscapes, escapeStringUsing, stripTrailingNewlines, trim, triml, trimr, stripFirstAndLast, camelCaseToHyphenated, toRomanNumeral, escapeURI, tabFilter, -- * Date/time normalizeDate, -- * Pandoc block and inline list processing orderedListMarkers, normalizeSpaces, extractSpaces, normalize, normalizeInlines, normalizeBlocks, removeFormatting, stringify, capitalize, compactify, compactify', compactify'DL, linesToPara, Element (..), hierarchicalize, uniqueIdent, inlineListToIdentifier, isHeaderBlock, headerShift, isTightList, addMetaField, makeMeta, -- * TagSoup HTML handling renderTags', -- * File handling inDirectory, getDefaultReferenceDocx, getDefaultReferenceODT, readDataFile, readDataFileUTF8, fetchItem, fetchItem', openURL, collapseFilePath, filteredFilesFromArchive, -- * Error handling err, warn, mapLeft, hush, -- * for squashing blocks blocksToInlines, -- * Safe read safeRead, -- * Temp directory withTempDir, -- * Version pandocVersion ) where import Text.Pandoc.Definition import Text.Pandoc.Walk import Text.Pandoc.MediaBag (MediaBag, lookupMedia) import Text.Pandoc.Builder (Inlines, Blocks, ToMetaValue(..)) import qualified Text.Pandoc.Builder as B import qualified Text.Pandoc.UTF8 as UTF8 import System.Environment (getProgName) import System.Exit (exitWith, ExitCode(..)) import Data.Char ( toLower, isLower, isUpper, isAlpha, isLetter, isDigit, isSpace ) import Data.List ( find, stripPrefix, intercalate ) import Data.Maybe (mapMaybe) import Data.Version ( showVersion ) import qualified Data.Map as M import Network.URI ( escapeURIString, nonStrictRelativeTo, unEscapeString, parseURIReference, isAllowedInURI, parseURI, URI(..) ) import qualified Data.Set as Set import System.Directory 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 Control.Monad.Trans (MonadIO (..)) import qualified Control.Exception as E import Control.Monad (msum, unless, MonadPlus(..)) import Text.Pandoc.Pretty (charWidth) 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 Data.Monoid ((<>)) import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as B8 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) #else import Paths_pandoc (getDataFileName) #endif #ifdef HTTP_CLIENT import Network.HTTP.Client (httpLbs, responseBody, responseHeaders, Request(port,host)) import Network.HTTP.Client (parseRequest) import Network.HTTP.Client (newManager) import Network.HTTP.Client.Internal (addProxy) import Network.HTTP.Client.TLS (tlsManagerSettings) import System.Environment (getEnv) import Network.HTTP.Types.Header ( hContentType) import Network (withSocketsDo) #else import Network.URI (parseURI) import Network.HTTP (findHeader, rspBody, RequestMethod(..), HeaderName(..), mkRequest) import Network.Browser (browse, setAllowRedirects, setOutHandler, request) #endif -- | Version number of pandoc library. pandocVersion :: String pandocVersion = showVersion version -- -- List processing -- -- | Split list by groups of one or more sep. splitBy :: (a -> Bool) -> [a] -> [[a]] splitBy _ [] = [] splitBy isSep lst = let (first, rest) = break isSep lst rest' = dropWhile isSep rest in first:(splitBy isSep rest') splitByIndices :: [Int] -> [a] -> [[a]] splitByIndices [] lst = [lst] splitByIndices (x:xs) lst = first:(splitByIndices (map (\y -> y - x) xs) rest) where (first, rest) = splitAt x lst -- | Split string into chunks divided at specified indices. splitStringByIndices :: [Int] -> [Char] -> [[Char]] splitStringByIndices [] lst = [lst] splitStringByIndices (x:xs) lst = let (first, rest) = splitAt' x lst in first : (splitStringByIndices (map (\y -> y - x) xs) rest) splitAt' :: Int -> [Char] -> ([Char],[Char]) splitAt' _ [] = ([],[]) splitAt' n xs | n <= 0 = ([],xs) splitAt' n (x:xs) = (x:ys,zs) where (ys,zs) = splitAt' (n - charWidth x) xs -- | Replace each occurrence of one sublist in a list with another. substitute :: (Eq a) => [a] -> [a] -> [a] -> [a] substitute _ _ [] = [] substitute [] _ xs = xs substitute target replacement lst@(x:xs) = case stripPrefix target lst of Just lst' -> replacement ++ substitute target replacement lst' Nothing -> x : substitute target replacement xs ordNub :: (Ord a) => [a] -> [a] ordNub l = go Set.empty l where go _ [] = [] go s (x:xs) = if x `Set.member` s then go s xs else x : go (Set.insert x s) xs -- -- Text processing -- -- | Returns an association list of backslash escapes for the -- designated characters. backslashEscapes :: [Char] -- ^ list of special characters to escape -> [(Char, String)] backslashEscapes = map (\ch -> (ch, ['\\',ch])) -- | Escape a string of characters, using an association list of -- characters and strings. escapeStringUsing :: [(Char, String)] -> String -> String escapeStringUsing _ [] = "" escapeStringUsing escapeTable (x:xs) = case (lookup x escapeTable) of Just str -> str ++ rest Nothing -> x:rest where rest = escapeStringUsing escapeTable xs -- | Strip trailing newlines from string. stripTrailingNewlines :: String -> String stripTrailingNewlines = reverse . dropWhile (== '\n') . reverse -- | Remove leading and trailing space (including newlines) from string. trim :: String -> String trim = triml . trimr -- | Remove leading space (including newlines) from string. triml :: String -> String triml = dropWhile (`elem` " \r\n\t") -- | Remove trailing space (including newlines) from string. trimr :: String -> String trimr = reverse . triml . reverse -- | Strip leading and trailing characters from string stripFirstAndLast :: String -> String stripFirstAndLast str = drop 1 $ take ((length str) - 1) str -- | Change CamelCase word to hyphenated lowercase (e.g., camel-case). camelCaseToHyphenated :: String -> String camelCaseToHyphenated [] = "" camelCaseToHyphenated (a:b:rest) | isLower a && isUpper b = a:'-':(toLower b):(camelCaseToHyphenated rest) camelCaseToHyphenated (a:rest) = (toLower a):(camelCaseToHyphenated rest) -- | Convert number < 4000 to uppercase roman numeral. toRomanNumeral :: Int -> String toRomanNumeral x = if x >= 4000 || x < 0 then "?" else case x of _ | x >= 1000 -> "M" ++ toRomanNumeral (x - 1000) _ | x >= 900 -> "CM" ++ toRomanNumeral (x - 900) _ | x >= 500 -> "D" ++ toRomanNumeral (x - 500) _ | x >= 400 -> "CD" ++ toRomanNumeral (x - 400) _ | x >= 100 -> "C" ++ toRomanNumeral (x - 100) _ | x >= 90 -> "XC" ++ toRomanNumeral (x - 90) _ | x >= 50 -> "L" ++ toRomanNumeral (x - 50) _ | x >= 40 -> "XL" ++ toRomanNumeral (x - 40) _ | x >= 10 -> "X" ++ toRomanNumeral (x - 10) _ | x == 9 -> "IX" _ | x >= 5 -> "V" ++ toRomanNumeral (x - 5) _ | x == 4 -> "IV" _ | x >= 1 -> "I" ++ toRomanNumeral (x - 1) _ -> "" -- | Escape whitespace and some punctuation characters in URI. escapeURI :: String -> String 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. tabFilter :: Int -- ^ Tab stop -> String -- ^ Input -> String tabFilter tabStop = let go _ [] = "" go _ ('\n':xs) = '\n' : go tabStop xs go _ ('\r':'\n':xs) = '\n' : go tabStop xs go _ ('\r':xs) = '\n' : go tabStop xs go spsToNextStop ('\t':xs) = if tabStop == 0 then '\t' : go tabStop xs else replicate spsToNextStop ' ' ++ go tabStop xs go 1 (x:xs) = x : go tabStop xs go spsToNextStop (x:xs) = x : go (spsToNextStop - 1) xs in go tabStop -- -- Date/time -- -- | Parse a date and convert (if possible) to "YYYY-MM-DD" format. We -- limit years to the range 1601-9999 (ISO 8601 accepts greater than -- or equal to 1583, but MS Word only accepts dates starting 1601). normalizeDate :: String -> Maybe String normalizeDate s = fmap (formatTime defaultTimeLocale "%F") (msum $ map (\fs -> parsetimeWith fs s >>= rejectBadYear) formats :: Maybe Day) where rejectBadYear day = case toGregorian day of (y, _, _) | y >= 1601 && y <= 9999 -> Just day _ -> Nothing 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%m%d", "%Y%m", "%Y"] -- -- Pandoc block and inline list processing -- -- | Generate infinite lazy list of markers for an ordered list, -- depending on list attributes. orderedListMarkers :: (Int, ListNumberStyle, ListNumberDelim) -> [String] orderedListMarkers (start, numstyle, numdelim) = let singleton c = [c] nums = case numstyle of DefaultStyle -> map show [start..] Example -> map show [start..] Decimal -> map show [start..] UpperAlpha -> drop (start - 1) $ cycle $ map singleton ['A'..'Z'] LowerAlpha -> drop (start - 1) $ cycle $ map singleton ['a'..'z'] UpperRoman -> map toRomanNumeral [start..] LowerRoman -> map (map toLower . toRomanNumeral) [start..] inDelim str = case numdelim of DefaultDelim -> str ++ "." Period -> str ++ "." OneParen -> str ++ ")" TwoParens -> "(" ++ str ++ ")" in map inDelim nums -- | Normalize a list of inline elements: remove leading and trailing -- @Space@ elements, collapse double @Space@s into singles, and -- remove empty Str elements. normalizeSpaces :: [Inline] -> [Inline] normalizeSpaces = cleanup . dropWhile isSpaceOrEmpty where cleanup [] = [] cleanup (Space:rest) = case dropWhile isSpaceOrEmpty rest of [] -> [] (x:xs) -> Space : x : cleanup xs cleanup ((Str ""):rest) = cleanup rest cleanup (x:rest) = x : cleanup rest isSpaceOrEmpty :: Inline -> Bool isSpaceOrEmpty Space = True isSpaceOrEmpty (Str "") = True isSpaceOrEmpty _ = False -- | Extract the leading and trailing spaces from inside an inline element -- and place them outside the element. SoftBreaks count as Spaces for -- these purposes. extractSpaces :: (Inlines -> Inlines) -> Inlines -> Inlines extractSpaces f is = let contents = B.unMany is left = case viewl contents of (Space :< _) -> B.space (SoftBreak :< _) -> B.softbreak _ -> mempty right = case viewr contents of (_ :> Space) -> B.space (_ :> SoftBreak) -> B.softbreak _ -> mempty in (left <> f (B.trimInlines . B.Many $ contents) <> right) -- | Normalize @Pandoc@ document, consolidating doubled 'Space's, -- combining adjacent 'Str's and 'Emph's, remove 'Null's and -- empty elements, etc. normalize :: Pandoc -> Pandoc normalize (Pandoc (Meta meta) blocks) = Pandoc (Meta $ M.map go meta) (normalizeBlocks blocks) where go (MetaInlines xs) = MetaInlines $ normalizeInlines xs go (MetaBlocks xs) = MetaBlocks $ normalizeBlocks xs go (MetaList ms) = MetaList $ map go ms go (MetaMap m) = MetaMap $ M.map go m go x = x normalizeBlocks :: [Block] -> [Block] normalizeBlocks (Null : xs) = normalizeBlocks xs normalizeBlocks (Div attr bs : xs) = Div attr (normalizeBlocks bs) : normalizeBlocks xs normalizeBlocks (BlockQuote bs : xs) = case normalizeBlocks bs of [] -> normalizeBlocks xs bs' -> BlockQuote bs' : normalizeBlocks xs normalizeBlocks (BulletList [] : xs) = normalizeBlocks xs normalizeBlocks (BulletList items : xs) = BulletList (map normalizeBlocks items) : normalizeBlocks xs normalizeBlocks (OrderedList _ [] : xs) = normalizeBlocks xs normalizeBlocks (OrderedList attr items : xs) = OrderedList attr (map normalizeBlocks items) : normalizeBlocks xs normalizeBlocks (DefinitionList [] : xs) = normalizeBlocks xs normalizeBlocks (DefinitionList items : xs) = DefinitionList (map go items) : normalizeBlocks xs where go (ils, bs) = (normalizeInlines ils, map normalizeBlocks bs) normalizeBlocks (RawBlock _ "" : xs) = normalizeBlocks xs normalizeBlocks (RawBlock f x : xs) = case normalizeBlocks xs of (RawBlock f' x' : rest) | f' == f -> RawBlock f (x ++ ('\n':x')) : rest rest -> RawBlock f x : rest normalizeBlocks (Para ils : xs) = case normalizeInlines ils of [] -> normalizeBlocks xs ils' -> Para ils' : normalizeBlocks xs normalizeBlocks (Plain ils : xs) = case normalizeInlines ils of [] -> normalizeBlocks xs ils' -> Plain ils' : normalizeBlocks xs normalizeBlocks (Header lev attr ils : xs) = Header lev attr (normalizeInlines ils) : normalizeBlocks xs normalizeBlocks (Table capt aligns widths hdrs rows : xs) = Table (normalizeInlines capt) aligns widths (map normalizeBlocks hdrs) (map (map normalizeBlocks) rows) : normalizeBlocks xs normalizeBlocks (x:xs) = x : normalizeBlocks xs normalizeBlocks [] = [] normalizeInlines :: [Inline] -> [Inline] normalizeInlines (Str x : ys) = case concat (x : map fromStr strs) of "" -> rest n -> Str n : rest where (strs, rest) = span isStr $ normalizeInlines ys isStr (Str _) = True isStr _ = False fromStr (Str z) = z fromStr _ = error "normalizeInlines - fromStr - not a Str" normalizeInlines (Space : SoftBreak : ys) = SoftBreak : normalizeInlines ys normalizeInlines (Space : ys) = if null rest then [] else Space : rest where isSp Space = True isSp _ = False rest = dropWhile isSp $ normalizeInlines ys normalizeInlines (Emph xs : zs) = case normalizeInlines zs of (Emph ys : rest) -> normalizeInlines $ Emph (normalizeInlines $ xs ++ ys) : rest rest -> case normalizeInlines xs of [] -> rest xs' -> Emph xs' : rest normalizeInlines (Strong xs : zs) = case normalizeInlines zs of (Strong ys : rest) -> normalizeInlines $ Strong (normalizeInlines $ xs ++ ys) : rest rest -> case normalizeInlines xs of [] -> rest xs' -> Strong xs' : rest normalizeInlines (Subscript xs : zs) = case normalizeInlines zs of (Subscript ys : rest) -> normalizeInlines $ Subscript (normalizeInlines $ xs ++ ys) : rest rest -> case normalizeInlines xs of [] -> rest xs' -> Subscript xs' : rest normalizeInlines (Superscript xs : zs) = case normalizeInlines zs of (Superscript ys : rest) -> normalizeInlines $ Superscript (normalizeInlines $ xs ++ ys) : rest rest -> case normalizeInlines xs of [] -> rest xs' -> Superscript xs' : rest normalizeInlines (SmallCaps xs : zs) = case normalizeInlines zs of (SmallCaps ys : rest) -> normalizeInlines $ SmallCaps (normalizeInlines $ xs ++ ys) : rest rest -> case normalizeInlines xs of [] -> rest xs' -> SmallCaps xs' : rest normalizeInlines (Strikeout xs : zs) = case normalizeInlines zs of (Strikeout ys : rest) -> normalizeInlines $ Strikeout (normalizeInlines $ xs ++ ys) : rest rest -> case normalizeInlines xs of [] -> rest xs' -> Strikeout xs' : rest normalizeInlines (RawInline _ [] : ys) = normalizeInlines ys normalizeInlines (RawInline f xs : zs) = case normalizeInlines zs of (RawInline f' ys : rest) | f == f' -> normalizeInlines $ RawInline f (xs ++ ys) : rest rest -> RawInline f xs : rest normalizeInlines (Code _ "" : ys) = normalizeInlines ys normalizeInlines (Code attr xs : zs) = case normalizeInlines zs of (Code attr' ys : rest) | attr == attr' -> normalizeInlines $ Code attr (xs ++ ys) : rest rest -> Code attr xs : rest -- allow empty spans, they may carry identifiers etc. -- normalizeInlines (Span _ [] : ys) = normalizeInlines ys normalizeInlines (Span attr xs : zs) = case normalizeInlines zs of (Span attr' ys : rest) | attr == attr' -> normalizeInlines $ Span attr (normalizeInlines $ xs ++ ys) : rest rest -> Span attr (normalizeInlines xs) : rest normalizeInlines (Note bs : ys) = Note (normalizeBlocks bs) : normalizeInlines ys normalizeInlines (Quoted qt ils : ys) = Quoted qt (normalizeInlines ils) : normalizeInlines ys normalizeInlines (Link attr ils t : ys) = Link attr (normalizeInlines ils) t : normalizeInlines ys normalizeInlines (Image attr ils t : ys) = Image attr (normalizeInlines ils) t : normalizeInlines ys normalizeInlines (Cite cs ils : ys) = Cite cs (normalizeInlines ils) : normalizeInlines ys normalizeInlines (x : xs) = x : normalizeInlines xs normalizeInlines [] = [] -- | Extract inlines, removing formatting. removeFormatting :: Walkable Inline a => a -> [Inline] removeFormatting = query go . walk deNote where go :: Inline -> [Inline] go (Str xs) = [Str xs] go Space = [Space] go SoftBreak = [SoftBreak] go (Code _ x) = [Str x] go (Math _ x) = [Str x] go LineBreak = [Space] go _ = [] deNote (Note _) = Str "" deNote x = x -- | Convert pandoc structure to a string with formatting removed. -- Footnotes are skipped (since we don't want their contents in link -- labels). stringify :: Walkable Inline a => a -> String stringify = query go . walk deNote where go :: Inline -> [Char] go Space = " " go SoftBreak = " " 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 "" deNote x = x -- | Bring all regular text in a pandoc structure to uppercase. -- -- This function correctly handles cases where a lowercase character doesn't -- match to a single uppercase character – e.g. “Straße” would be converted -- to “STRASSE”, not “STRAßE”. capitalize :: Walkable Inline a => a -> a capitalize = walk go where go :: Inline -> Inline go (Str s) = Str (T.unpack $ T.toUpper $ T.pack s) go x = x -- | Change final list item from @Para@ to @Plain@ if the list contains -- no other @Para@ blocks. compactify :: [[Block]] -- ^ List of list items (each a list of blocks) -> [[Block]] compactify [] = [] compactify items = case (init items, last items) of (_,[]) -> items (others, final) -> case last final of Para a -> case (filter isPara $ concat items) of -- if this is only Para, change to Plain [_] -> others ++ [init final ++ [Plain a]] _ -> items _ -> items -- | Change final list item from @Para@ to @Plain@ if the list contains -- no other @Para@ blocks. Like compactify, but operates on @Blocks@ rather -- than @[Block]@. compactify' :: [Blocks] -- ^ List of list items (each a list of blocks) -> [Blocks] compactify' [] = [] compactify' items = let (others, final) = (init items, last items) in case reverse (B.toList final) of (Para a:xs) -> case [Para x | Para x <- concatMap B.toList items] of -- if this is only Para, change to Plain [_] -> others ++ [B.fromList (reverse $ Plain a : xs)] _ -> items _ -> items -- | Like @compactify'@, but acts on items of definition lists. compactify'DL :: [(Inlines, [Blocks])] -> [(Inlines, [Blocks])] compactify'DL items = let defs = concatMap snd items in case reverse (concatMap B.toList defs) of (Para x:xs) | not (any isPara xs) -> let (t,ds) = last items lastDef = B.toList $ last ds ds' = init ds ++ if null lastDef then [B.fromList lastDef] else [B.fromList $ init lastDef ++ [Plain x]] in init items ++ [(t, ds')] | otherwise -> items _ -> items -- | Combine a list of lines by adding hard linebreaks. combineLines :: [[Inline]] -> [Inline] combineLines = intercalate [LineBreak] -- | Convert a list of lines into a paragraph with hard line breaks. This is -- useful e.g. for rudimentary support of LineBlock elements in writers. linesToPara :: [[Inline]] -> Block linesToPara = Para . combineLines isPara :: Block -> Bool isPara (Para _) = True isPara _ = False -- | Data structure for defining hierarchical Pandoc documents data Element = Blk Block | Sec Int [Int] Attr [Inline] [Element] -- lvl num attributes label contents deriving (Eq, Read, Show, Typeable, Data) instance Walkable Inline Element where walk f (Blk x) = Blk (walk f x) walk f (Sec lev nums attr ils elts) = Sec lev nums attr (walk f ils) (walk f elts) walkM f (Blk x) = Blk `fmap` walkM f x walkM f (Sec lev nums attr ils elts) = do ils' <- walkM f ils elts' <- walkM f elts return $ Sec lev nums attr ils' elts' query f (Blk x) = query f x query f (Sec _ _ _ ils elts) = query f ils <> query f elts instance Walkable Block Element where walk f (Blk x) = Blk (walk f x) walk f (Sec lev nums attr ils elts) = Sec lev nums attr (walk f ils) (walk f elts) walkM f (Blk x) = Blk `fmap` walkM f x walkM f (Sec lev nums attr ils elts) = do ils' <- walkM f ils elts' <- walkM f elts return $ Sec lev nums attr ils' elts' query f (Blk x) = query f x query f (Sec _ _ _ ils elts) = query f ils <> query f elts -- | Convert Pandoc inline list to plain text identifier. HTML -- identifiers must start with a letter, and may contain only -- letters, digits, and the characters _-. inlineListToIdentifier :: [Inline] -> String inlineListToIdentifier = dropWhile (not . isAlpha) . intercalate "-" . words . map (nbspToSp . toLower) . filter (\c -> isLetter c || isDigit c || c `elem` "_-. ") . stringify where nbspToSp '\160' = ' ' nbspToSp x = x -- | Convert list of Pandoc blocks into (hierarchical) list of Elements hierarchicalize :: [Block] -> [Element] hierarchicalize blocks = S.evalState (hierarchicalizeWithIds blocks) [] hierarchicalizeWithIds :: [Block] -> S.State [Int] [Element] hierarchicalizeWithIds [] = return [] hierarchicalizeWithIds ((Header level attr@(_,classes,_) title'):xs) = do lastnum <- S.get let lastnum' = take level lastnum let newnum = case length lastnum' of x | "unnumbered" `elem` classes -> [] | x >= level -> init lastnum' ++ [last lastnum' + 1] | otherwise -> lastnum ++ replicate (level - length lastnum - 1) 0 ++ [1] unless (null newnum) $ S.put newnum let (sectionContents, rest) = break (headerLtEq level) xs sectionContents' <- hierarchicalizeWithIds sectionContents rest' <- hierarchicalizeWithIds rest return $ Sec level newnum attr title' sectionContents' : rest' hierarchicalizeWithIds ((Div ("",["references"],[]) (Header level (ident,classes,kvs) title' : xs)):ys) = hierarchicalizeWithIds ((Header level (ident,("references":classes),kvs) title') : (xs ++ ys)) hierarchicalizeWithIds (x:rest) = do rest' <- hierarchicalizeWithIds rest return $ (Blk x) : rest' headerLtEq :: Int -> Block -> Bool headerLtEq level (Header l _ _) = l <= level headerLtEq level (Div ("",["references"],[]) (Header l _ _ : _)) = l <= level headerLtEq _ _ = False -- | Generate a unique identifier from a list of inlines. -- Second argument is a list of already used identifiers. uniqueIdent :: [Inline] -> Set.Set String -> String uniqueIdent title' usedIdents = let baseIdent = case inlineListToIdentifier title' of "" -> "section" x -> x numIdent n = baseIdent ++ "-" ++ show n in if baseIdent `Set.member` usedIdents then case find (\x -> not $ numIdent x `Set.member` usedIdents) ([1..60000] :: [Int]) of Just x -> numIdent x Nothing -> baseIdent -- if we have more than 60,000, allow repeats else baseIdent -- | True if block is a Header block. isHeaderBlock :: Block -> Bool isHeaderBlock (Header _ _ _) = True isHeaderBlock _ = False -- | Shift header levels up or down. headerShift :: Int -> Pandoc -> Pandoc headerShift n = walk shift where shift :: Block -> Block shift (Header level attr inner) = Header (level + n) attr inner shift x = x -- | Detect if a list is tight. isTightList :: [[Block]] -> Bool isTightList = all firstIsPlain where firstIsPlain (Plain _ : _) = True firstIsPlain _ = False -- | Set a field of a 'Meta' object. If the field already has a value, -- convert it into a list with the new value appended to the old value(s). addMetaField :: ToMetaValue a => String -> a -> Meta -> Meta addMetaField key val (Meta meta) = Meta $ M.insertWith combine key (toMetaValue val) meta where combine newval (MetaList xs) = MetaList (xs ++ tolist newval) combine newval x = MetaList [x, newval] tolist (MetaList ys) = ys tolist y = [y] -- | Create 'Meta' from old-style title, authors, date. This is -- provided to ease the transition from the old API. makeMeta :: [Inline] -> [[Inline]] -> [Inline] -> Meta makeMeta title authors date = addMetaField "title" (B.fromList title) $ addMetaField "author" (map B.fromList authors) $ addMetaField "date" (B.fromList date) $ nullMeta -- -- TagSoup HTML handling -- -- | Render HTML tags. renderTags' :: [Tag String] -> String renderTags' = renderTagsOptions renderOptions{ optMinimize = matchTags ["hr", "br", "img", "meta", "link"] , optRawTag = matchTags ["script", "style"] } where matchTags = \tags -> flip elem tags . map toLower -- -- File handling -- -- | Perform an IO action in a directory, returning to starting directory. inDirectory :: FilePath -> IO a -> IO a inDirectory path action = E.bracket getCurrentDirectory setCurrentDirectory (const $ setCurrentDirectory path >> action) getDefaultReferenceDocx :: Maybe FilePath -> IO Archive getDefaultReferenceDocx datadir = do let paths = ["[Content_Types].xml", "_rels/.rels", "docProps/app.xml", "docProps/core.xml", "word/document.xml", "word/fontTable.xml", "word/footnotes.xml", "word/numbering.xml", "word/settings.xml", "word/webSettings.xml", "word/styles.xml", "word/_rels/document.xml.rels", "word/_rels/footnotes.xml.rels", "word/theme/theme1.xml"] let toLazy = fromChunks . (:[]) let pathToEntry path = do epochtime <- (floor . utcTimeToPOSIXSeconds) <$> getCurrentTime contents <- toLazy <$> readDataFile datadir ("docx/" ++ path) return $ toEntry path epochtime contents mbArchive <- case datadir of Nothing -> return Nothing Just d -> do exists <- doesFileExist (d "reference.docx") if exists then return (Just (d "reference.docx")) else return Nothing case mbArchive of Just arch -> toArchive <$> BL.readFile arch Nothing -> foldr addEntryToArchive emptyArchive <$> mapM pathToEntry paths getDefaultReferenceODT :: Maybe FilePath -> IO Archive getDefaultReferenceODT datadir = do let paths = ["mimetype", "manifest.rdf", "styles.xml", "content.xml", "meta.xml", "settings.xml", "Configurations2/accelerator/current.xml", "Thumbnails/thumbnail.png", "META-INF/manifest.xml"] let pathToEntry path = do epochtime <- floor `fmap` getPOSIXTime contents <- (fromChunks . (:[])) `fmap` readDataFile datadir ("odt/" ++ path) return $ toEntry path epochtime contents mbArchive <- case datadir of Nothing -> return Nothing Just d -> do exists <- doesFileExist (d "reference.odt") if exists then return (Just (d "reference.odt")) else return Nothing case mbArchive of Just arch -> toArchive <$> BL.readFile arch Nothing -> foldr addEntryToArchive emptyArchive <$> mapM pathToEntry paths readDefaultDataFile :: FilePath -> IO BS.ByteString readDefaultDataFile "reference.docx" = (BS.concat . toChunks . fromArchive) <$> getDefaultReferenceDocx Nothing readDefaultDataFile "reference.odt" = (BS.concat . toChunks . fromArchive) <$> getDefaultReferenceODT Nothing readDefaultDataFile fname = #ifdef EMBED_DATA_FILES case lookup (makeCanonical fname) dataFiles of Nothing -> err 97 $ "Could not find data file " ++ fname Just contents -> return contents where makeCanonical = Posix.joinPath . transformPathParts . splitDirectories transformPathParts = reverse . foldl go [] go as "." = as go (_:as) ".." = as go as x = x : as #else getDataFileName fname' >>= checkExistence >>= BS.readFile where fname' = if fname == "MANUAL.txt" then fname else "data" fname checkExistence :: FilePath -> IO FilePath checkExistence fn = do exists <- doesFileExist fn 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. readDataFile :: Maybe FilePath -> FilePath -> IO BS.ByteString readDataFile Nothing fname = readDefaultDataFile fname readDataFile (Just userDir) fname = do exists <- doesFileExist (userDir fname) if exists then BS.readFile (userDir fname) else readDefaultDataFile fname -- | Same as 'readDataFile' but returns a String instead of a ByteString. readDataFileUTF8 :: Maybe FilePath -> FilePath -> IO String readDataFileUTF8 userDir fname = UTF8.toString `fmap` readDataFile userDir fname -- | Specialized version of parseURIReference that disallows -- single-letter schemes. Reason: these are usually windows absolute -- paths. parseURIReference' :: String -> Maybe URI parseURIReference' s = case parseURIReference s of Just u | length (uriScheme u) > 2 -> Just u | null (uriScheme u) -> Just u -- protocol-relative _ -> Nothing -- | Fetch an image or other item from the local filesystem or the net. -- Returns raw content and maybe mime type. fetchItem :: Maybe String -> String -> IO (Either E.SomeException (BS.ByteString, Maybe MimeType)) fetchItem sourceURL s = case (sourceURL >>= parseURIReference' . ensureEscaped, ensureEscaped s) of (Just u, s') -> -- try fetching from relative path at source case parseURIReference' s' of Just u' -> openURL $ show $ u' `nonStrictRelativeTo` u Nothing -> openURL s' -- will throw error (Nothing, s'@('/':'/':_)) -> -- protocol-relative URI case parseURIReference' s' of Just u' -> openURL $ show $ u' `nonStrictRelativeTo` httpcolon Nothing -> openURL s' -- will throw error (Nothing, s') -> case parseURI s' of -- requires absolute URI -- We don't want to treat C:/ as a scheme: Just u' | length (uriScheme u') > 2 -> openURL (show u') Just u' | uriScheme u' == "file:" -> E.try $ readLocalFile $ dropWhile (=='/') (uriPath u') _ -> E.try $ readLocalFile fp -- get from local file system where readLocalFile f = do cont <- BS.readFile f return (cont, mime) httpcolon = URI{ uriScheme = "http:", uriAuthority = Nothing, uriPath = "", uriQuery = "", uriFragment = "" } dropFragmentAndQuery = takeWhile (\c -> c /= '?' && c /= '#') fp = unEscapeString $ dropFragmentAndQuery s mime = case takeExtension fp of ".gz" -> getMimeType $ dropExtension fp ".svgz" -> getMimeType $ dropExtension fp ++ ".svg" x -> getMimeType x ensureEscaped = escapeURIString isAllowedInURI . map convertSlash convertSlash '\\' = '/' convertSlash x = x -- | Like 'fetchItem', but also looks for items in a 'MediaBag'. fetchItem' :: MediaBag -> Maybe String -> String -> IO (Either E.SomeException (BS.ByteString, Maybe MimeType)) fetchItem' media sourceURL s = do case lookupMedia s media of Nothing -> fetchItem sourceURL s Just (mime, bs) -> return $ Right (BS.concat $ toChunks bs, Just mime) -- | 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'' in return $ Right (decodeLenient contents, Just mime) #ifdef HTTP_CLIENT | otherwise = withSocketsDo $ E.try $ do let parseReq = parseRequest (proxy :: Either E.SomeException String) <- E.try $ getEnv "http_proxy" req <- parseReq u req' <- case proxy of Left _ -> return req Right pr -> (parseReq pr >>= \r -> return $ addProxy (host r) (port r) req) `mplus` return req resp <- newManager tlsManagerSettings >>= httpLbs req' return (BS.concat $ toChunks $ responseBody resp, UTF8.toString `fmap` lookup hContentType (responseHeaders resp)) #else | otherwise = E.try $ getBodyAndMimeType `fmap` browse (do liftIO $ UTF8.hPutStrLn stderr $ "Fetching " ++ u ++ "..." setOutHandler $ const (return ()) setAllowRedirects True request (getRequest' u')) where getBodyAndMimeType (_, r) = (rspBody r, findHeader HdrContentType r) getRequest' uriString = case parseURI uriString of Nothing -> error ("Not a valid URL: " ++ uriString) Just v -> mkRequest GET v u' = escapeURIString (/= '|') u -- pipes are rejected by Network.URI #endif -- -- Error reporting -- err :: Int -> String -> IO a err exitCode msg = do name <- getProgName UTF8.hPutStrLn stderr $ name ++ ": " ++ msg exitWith $ ExitFailure exitCode return undefined warn :: MonadIO m => String -> m () warn msg = liftIO $ do name <- getProgName UTF8.hPutStrLn stderr $ "[" ++ name ++ " warning] " ++ msg mapLeft :: (a -> b) -> Either a c -> Either b c mapLeft f (Left x) = Left (f x) mapLeft _ (Right x) = Right x hush :: Either a b -> Maybe b hush (Left _) = Nothing hush (Right x) = Just x -- | Remove intermediate "." and ".." directories from a path. -- -- > collapseFilePath "./foo" == "foo" -- > collapseFilePath "/bar/../baz" == "/baz" -- > collapseFilePath "/../baz" == "/../baz" -- > collapseFilePath "parent/foo/baz/../bar" == "parent/foo/bar" -- > collapseFilePath "parent/foo/baz/../../bar" == "parent/bar" -- > collapseFilePath "parent/foo/.." == "parent" -- > collapseFilePath "/parent/foo/../../bar" == "/bar" collapseFilePath :: FilePath -> FilePath 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) = [[Posix.pathSeparator]] go rs x = x:rs isSingleton [] = Nothing isSingleton [x] = Just x isSingleton _ = Nothing checkPathSeperator = fmap isPathSeparator . isSingleton -- -- File selection from the archive -- filteredFilesFromArchive :: Archive -> (FilePath -> Bool) -> [(FilePath, BL.ByteString)] filteredFilesFromArchive zf f = mapMaybe (fileAndBinary zf) (filter f (filesInArchive zf)) where fileAndBinary :: Archive -> FilePath -> Maybe (FilePath, BL.ByteString) fileAndBinary a fp = findEntryByPath fp a >>= \e -> Just (fp, fromEntry e) --- --- Squash blocks into inlines --- blockToInlines :: Block -> [Inline] blockToInlines (Plain ils) = ils blockToInlines (Para ils) = ils blockToInlines (LineBlock lns) = combineLines lns blockToInlines (CodeBlock attr str) = [Code attr str] blockToInlines (RawBlock fmt str) = [RawInline fmt str] blockToInlines (BlockQuote blks) = blocksToInlines blks blockToInlines (OrderedList _ blkslst) = concatMap blocksToInlines blkslst blockToInlines (BulletList blkslst) = concatMap blocksToInlines blkslst blockToInlines (DefinitionList pairslst) = concatMap f pairslst where f (ils, blkslst) = ils ++ [Str ":", Space] ++ (concatMap blocksToInlines blkslst) blockToInlines (Header _ _ ils) = ils blockToInlines (HorizontalRule) = [] blockToInlines (Table _ _ _ headers rows) = intercalate [LineBreak] $ map (concatMap blocksToInlines) tbl where tbl = headers : rows blockToInlines (Div _ blks) = blocksToInlines blks blockToInlines Null = [] blocksToInlinesWithSep :: [Inline] -> [Block] -> [Inline] blocksToInlinesWithSep sep blks = intercalate sep $ map blockToInlines blks blocksToInlines :: [Block] -> [Inline] blocksToInlines = blocksToInlinesWithSep [Space, Str "¶", Space] -- -- Safe read -- safeRead :: (MonadPlus m, Read a) => String -> m a safeRead s = case reads s of (d,x):_ | all isSpace x -> return d _ -> mzero -- -- Temp directory -- withTempDir :: String -> (FilePath -> IO a) -> IO a withTempDir = #ifdef _WINDOWS withTempDirectory "." #else withSystemTempDirectory #endif pandoc-1.19.2.4/src/Text/Pandoc/MediaBag.hs0000644000000000000000000001040113155240142016275 0ustar0000000000000000{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-} {- Copyright (C) 2014 John MacFarlane 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.MediaBag Copyright : Copyright (C) 2014 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Definition of a MediaBag object to hold binary resources, and an interface for interacting with it. -} module Text.Pandoc.MediaBag ( MediaBag, lookupMedia, insertMedia, mediaDirectory, 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 Control.Monad (when) import Text.Pandoc.MIME (MimeType, getMimeTypeDef) import qualified Text.Pandoc.UTF8 as UTF8 import Data.Maybe (fromMaybe) import System.IO (stderr) import Data.Data (Data) import Data.Typeable (Typeable) -- | A container for a collection of binary resources, with names and -- mime types. Note that a 'MediaBag' is a Monoid, so 'mempty' -- can be used for an empty 'MediaBag', and '<>' can be used to append -- two 'MediaBag's. newtype MediaBag = MediaBag (M.Map [String] (MimeType, BL.ByteString)) deriving (Monoid, Data, Typeable) instance Show MediaBag where show bag = "MediaBag " ++ show (mediaDirectory bag) -- | Insert a media item into a 'MediaBag', replacing any existing -- value with the same name. insertMedia :: FilePath -- ^ relative path and canonical name of resource -> Maybe MimeType -- ^ mime type (Nothing = determine from extension) -> BL.ByteString -- ^ contents of resource -> MediaBag -> MediaBag insertMedia fp mbMime contents (MediaBag mediamap) = MediaBag (M.insert (splitDirectories fp) (mime, contents) mediamap) where mime = fromMaybe fallback mbMime fallback = case takeExtension fp of ".gz" -> getMimeTypeDef $ dropExtension fp _ -> getMimeTypeDef fp -- | Lookup a media item in a 'MediaBag', returning mime type and contents. lookupMedia :: FilePath -> MediaBag -> Maybe (MimeType, BL.ByteString) 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) -> (((Posix.joinPath fp), mime, fromIntegral $ BL.length contents):)) [] mediamap -- | Extract contents of MediaBag to a given directory. Print informational -- messages if 'verbose' is true. extractMediaBag :: Bool -> FilePath -> MediaBag -> IO () extractMediaBag verbose dir (MediaBag mediamap) = do sequence_ $ M.foldWithKey (\fp (_ ,contents) -> ((writeMedia verbose dir (Posix.joinPath fp, contents)):)) [] mediamap writeMedia :: Bool -> FilePath -> (FilePath, BL.ByteString) -> IO () writeMedia verbose dir (subpath, bs) = do -- we join and split to convert a/b/c to a\b\c on Windows; -- in zip containers all paths use / let fullpath = dir normalise subpath createDirectoryIfMissing True $ takeDirectory fullpath when verbose $ UTF8.hPutStrLn stderr $ "pandoc: extracting " ++ fullpath BL.writeFile fullpath bs pandoc-1.19.2.4/src/Text/Pandoc/Error.hs0000644000000000000000000000452413155240142015746 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-} {- Copyright (C) 2006-2016 John MacFarlane 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.Error Copyright : Copyright (C) 2006-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable This module provides a standard way to deal with possible errors encounted during parsing. -} module Text.Pandoc.Error (PandocError(..), handleError) where import Text.Parsec.Error import Text.Parsec.Pos hiding (Line) import GHC.Generics (Generic) import Data.Generics (Typeable) import Control.Exception (Exception) type Input = String data PandocError = -- | Generic parse failure ParseFailure String -- | Error thrown by a Parsec parser | ParsecError Input ParseError deriving (Show, Typeable, Generic) instance Exception PandocError -- | An unsafe method to handle `PandocError`s. handleError :: Either PandocError a -> a handleError (Right r) = r handleError (Left err) = case err of ParseFailure string -> error string ParsecError input err' -> let errPos = errorPos err' errLine = sourceLine errPos errColumn = sourceColumn errPos ls = lines input ++ [""] errorInFile = if length ls > errLine - 1 then concat ["\n", (ls !! (errLine - 1)) ,"\n", replicate (errColumn - 1) ' ' ,"^"] else "" in error $ "\nError at " ++ show err' ++ errorInFile pandoc-1.19.2.4/src/Text/Pandoc/Readers/HTML.hs0000644000000000000000000011733213155240142017010 0ustar0000000000000000{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, ViewPatterns#-} {- Copyright (C) 2006-2015 John MacFarlane 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.Readers.HTML Copyright : Copyright (C) 2006-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of HTML to 'Pandoc' document. -} module Text.Pandoc.Readers.HTML ( readHtml , htmlTag , htmlInBalanced , isInlineTag , isBlockTag , isTextTag , isCommentTag ) where import Text.HTML.TagSoup import Text.HTML.TagSoup.Match import Text.Pandoc.Definition import qualified Text.Pandoc.Builder as B import Text.Pandoc.Builder (Blocks, Inlines, trimInlines, HasMeta(..)) import Text.Pandoc.Shared ( extractSpaces, renderTags', addMetaField , escapeURI, safeRead, mapLeft ) import Text.Pandoc.Options (ReaderOptions(readerParseRaw, readerTrace) , Extension (Ext_epub_html_exts, 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 ) import Data.Char ( isDigit ) import Control.Monad ( guard, when, mzero, void, unless ) import Control.Arrow ((***)) import Control.Applicative ( (<|>) ) import Data.Monoid (First (..)) import Text.Printf (printf) import Debug.Trace (trace) import Text.TeXMath (readMathML, writeTeX) import Data.Default (Default (..), def) import Control.Monad.Reader (Reader,ask, asks, local, runReader) import Network.URI (URI, parseURIReference, nonStrictRelativeTo) import Text.Pandoc.Error import Text.Pandoc.CSS (foldOrElse, pickStyleAttrProps) import Data.Monoid ((<>)) import Text.Parsec.Error import qualified Data.Set as Set -- | Convert HTML-formatted string to 'Pandoc' document. readHtml :: ReaderOptions -- ^ Reader options -> String -- ^ String to parse (assumes @'\n'@ line endings) -> Either PandocError Pandoc readHtml opts inp = mapLeft (ParseFailure . getError) . flip runReader def $ runParserT parseDoc (HTMLState def{ stateOptions = opts } [] Nothing Set.empty M.empty) "source" tags where tags = stripPrefixes . canonicalizeTags $ parseTagsOptions parseOptions{ optTagPosition = True } inp parseDoc = do blocks <- (fixPlains False) . mconcat <$> manyTill block eof meta <- stateMeta . parserState <$> getState bs' <- replaceNotes (B.toList blocks) return $ Pandoc meta bs' getError (errorMessages -> ms) = case ms of [] -> "" (m:_) -> messageString m replaceNotes :: [Block] -> TagParser [Block] replaceNotes = walkM replaceNotes' replaceNotes' :: Inline -> TagParser Inline replaceNotes' (RawInline (Format "noteref") ref) = maybe (Str "") (Note . B.toList) . lookup ref <$> getNotes where getNotes = noteTable <$> getState replaceNotes' x = return x data HTMLState = HTMLState { parserState :: ParserState, noteTable :: [(String, Blocks)], baseHref :: Maybe URI, identifiers :: Set.Set String, headerMap :: M.Map Inlines String } data HTMLLocal = HTMLLocal { quoteContext :: QuoteContext , inChapter :: Bool -- ^ Set if in chapter section , inPlain :: Bool -- ^ Set if in pPlain } setInChapter :: HTMLParser s a -> HTMLParser s a setInChapter = local (\s -> s {inChapter = True}) setInPlain :: HTMLParser s a -> HTMLParser s a setInPlain = local (\s -> s {inPlain = True}) type HTMLParser s = ParserT s HTMLState (Reader HTMLLocal) type TagParser = HTMLParser [Tag String] pBody :: TagParser Blocks pBody = pInTags "body" block pHead :: TagParser Blocks pHead = pInTags "head" $ pTitle <|> pMetaTag <|> pBaseTag <|> (mempty <$ pAnyTag) where pTitle = pInTags "title" inline >>= setTitle . trimInlines setTitle t = mempty <$ (updateState $ B.setMeta "title" t) pMetaTag = do mt <- pSatisfy (~== TagOpen "meta" []) let name = fromAttrib "name" mt if null name then return mempty else do let content = fromAttrib "content" mt updateState $ \s -> let ps = parserState s in s{ parserState = ps{ stateMeta = addMetaField name (B.text content) (stateMeta ps) } } return mempty pBaseTag = do bt <- pSatisfy (~== TagOpen "base" []) updateState $ \st -> st{ baseHref = parseURIReference $ fromAttrib "href" bt } return mempty block :: TagParser Blocks block = do tr <- getOption readerTrace pos <- getPosition res <- choice [ eSection , eSwitch B.para block , mempty <$ eFootnote , mempty <$ eTOC , mempty <$ eTitlePage , pPara , pHeader , pBlockQuote , pCodeBlock , pList , pHrule , pTable , pHead , pBody , pDiv , pPlain , pRawHtmlBlock ] when tr $ trace (printf "line %d: %s" (sourceLine pos) (take 60 $ show $ B.toList res)) (return ()) return res namespaces :: [(String, TagParser Inlines)] namespaces = [(mathMLNamespace, pMath True)] mathMLNamespace :: String mathMLNamespace = "http://www.w3.org/1998/Math/MathML" eSwitch :: Monoid a => (Inlines -> a) -> TagParser a -> TagParser a eSwitch constructor parser = try $ do guardEnabled Ext_epub_html_exts pSatisfy (~== TagOpen "switch" []) cases <- getFirst . mconcat <$> manyTill (First <$> (eCase <* skipMany pBlank) ) (lookAhead $ try $ pSatisfy (~== TagOpen "default" [])) skipMany pBlank fallback <- pInTags "default" (skipMany pBlank *> parser <* skipMany pBlank) skipMany pBlank pSatisfy (~== TagClose "switch") return $ maybe fallback constructor cases eCase :: TagParser (Maybe Inlines) eCase = do skipMany pBlank TagOpen _ attr <- lookAhead $ pSatisfy $ (~== TagOpen "case" []) case (flip lookup namespaces) =<< lookup "required-namespace" attr of Just p -> Just <$> (pInTags "case" (skipMany pBlank *> p <* skipMany pBlank)) Nothing -> Nothing <$ manyTill pAnyTag (pSatisfy (~== TagClose "case")) eFootnote :: TagParser () eFootnote = try $ do let notes = ["footnote", "rearnote"] guardEnabled Ext_epub_html_exts (TagOpen tag attr) <- lookAhead $ pAnyTag guard (maybe False (flip elem notes) (lookup "type" attr)) let ident = fromMaybe "" (lookup "id" attr) content <- pInTags tag block addNote ident content addNote :: String -> Blocks -> TagParser () addNote uid cont = updateState (\s -> s {noteTable = (uid, cont) : (noteTable s)}) eNoteref :: TagParser Inlines eNoteref = try $ do guardEnabled Ext_epub_html_exts TagOpen tag attr <- lookAhead $ pAnyTag guard (maybe False (== "noteref") (lookup "type" attr)) let ident = maybe "" (dropWhile (== '#')) (lookup "href" attr) guard (not (null ident)) pInTags tag block return $ B.rawInline "noteref" ident -- Strip TOC if there is one, better to generate again eTOC :: TagParser () eTOC = try $ do guardEnabled Ext_epub_html_exts (TagOpen tag attr) <- lookAhead $ pAnyTag guard (maybe False (== "toc") (lookup "type" attr)) void (pInTags tag block) pList :: TagParser Blocks pList = pBulletList <|> pOrderedList <|> pDefinitionList pBulletList :: TagParser Blocks pBulletList = try $ do pSatisfy (~== TagOpen "ul" []) let nonItem = pSatisfy (\t -> not (tagOpen (`elem` ["li","ol","ul","dl"]) (const True) t) && not (t ~== TagClose "ul")) -- note: if they have an
    or
      not in scope of a
    • , -- treat it as a list item, though it's not valid xhtml... skipMany nonItem items <- manyTill (pListItem nonItem) (pCloses "ul") return $ B.bulletList $ map (fixPlains True) items pListItem :: TagParser a -> TagParser Blocks pListItem nonItem = do TagOpen _ attr <- lookAhead $ pSatisfy (~== TagOpen "li" []) 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" []) let (start, style) = (sta', sty') where sta = fromMaybe "1" $ lookup "start" attribs sta' = if all isDigit sta then read sta else 1 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")) -- note: if they have an
        or
          not in scope of a
        • , -- treat it as a list item, though it's not valid xhtml... skipMany nonItem items <- manyTill (pListItem nonItem) (pCloses "ol") return $ B.orderedListWith (start, style, DefaultDelim) $ map (fixPlains True) items pDefinitionList :: TagParser Blocks pDefinitionList = try $ do pSatisfy (~== TagOpen "dl" []) items <- manyTill pDefListItem (pCloses "dl") return $ B.definitionList items pDefListItem :: TagParser (Inlines, [Blocks]) pDefListItem = try $ do let nonItem = pSatisfy (\t -> not (t ~== TagOpen "dt" []) && not (t ~== TagOpen "dd" []) && not (t ~== TagClose "dl")) terms <- many1 (try $ skipMany nonItem >> pInTags "dt" inline) defs <- many1 (try $ skipMany nonItem >> pInTags "dd" block) skipMany nonItem let term = foldl1 (\x y -> x <> B.linebreak <> y) terms return (term, map (fixPlains True) defs) fixPlains :: Bool -> Blocks -> Blocks fixPlains inList bs = if any isParaish bs' then B.fromList $ map plainToPara bs' else bs where isParaish (Para _) = True isParaish (CodeBlock _ _) = True isParaish (Header _ _ _) = True isParaish (BlockQuote _) = True isParaish (BulletList _) = not inList isParaish (OrderedList _ _) = not inList isParaish (DefinitionList _) = not inList isParaish _ = False plainToPara (Plain xs) = Para xs plainToPara x = x bs' = B.toList bs pRawTag :: TagParser String pRawTag = do tag <- pAnyTag let ignorable x = x `elem` ["html","head","body","!DOCTYPE","?xml"] if tagOpen ignorable (const True) tag || tagClose ignorable tag then return [] else return $ renderTags' [tag] pDiv :: TagParser Blocks pDiv = try $ do guardEnabled Ext_native_divs 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 raw <- pHtmlBlock "script" <|> pHtmlBlock "style" <|> pRawTag parseRaw <- getOption readerParseRaw if parseRaw && not (null raw) then return $ B.rawBlock "html" raw else return mempty pHtmlBlock :: String -> TagParser String pHtmlBlock t = try $ do open <- pSatisfy (~== TagOpen t []) contents <- manyTill pAnyTag (pSatisfy (~== TagClose t)) return $ renderTags' $ [open] ++ contents ++ [TagClose t] -- Sets chapter context eSection :: TagParser Blocks eSection = try $ do let matchChapter as = maybe False (isInfixOf "chapter") (lookup "type" as) let sectTag = tagOpen (`elem` sectioningContent) matchChapter TagOpen tag _ <- lookAhead $ pSatisfy sectTag setInChapter (pInTags tag block) headerLevel :: String -> TagParser Int headerLevel tagtype = do let level = read (drop 1 tagtype) (try $ do guardEnabled Ext_epub_html_exts asks inChapter >>= guard return (level - 1)) <|> return level eTitlePage :: TagParser () eTitlePage = try $ do let isTitlePage as = maybe False (isInfixOf "titlepage") (lookup "type" as) let groupTag = tagOpen (\x -> x `elem` groupingContent || x == "section") isTitlePage TagOpen tag _ <- lookAhead $ pSatisfy groupTag () <$ pInTags tag block pHeader :: TagParser Blocks pHeader = try $ do TagOpen tagtype attr <- pSatisfy $ tagOpen (`elem` ["h1","h2","h3","h4","h5","h6"]) (const True) let bodyTitle = TagOpen tagtype attr ~== TagOpen "h1" [("class","title")] level <- headerLevel tagtype contents <- trimInlines . mconcat <$> manyTill inline (pCloses tagtype <|> eof) 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 attr' level contents pHrule :: TagParser Blocks pHrule = do pSelfClosing (=="hr") (const True) return B.horizontalRule pTable :: TagParser Blocks pTable = try $ do TagOpen _ _ <- pSatisfy (~== TagOpen "table" []) skipMany pBlank caption <- option mempty $ pInTags "caption" inline <* skipMany pBlank widths' <- (mconcat <$> many1 pColgroup) <|> many pCol let pTh = option [] $ pInTags "tr" (pCell "th") pTr = try $ skipMany pBlank >> pInTags "tr" (pCell "td" <|> pCell "th") pTBody = do pOptInTag "tbody" $ many1 pTr head'' <- pOptInTag "thead" pTh head' <- pOptInTag "tbody" $ do if null head'' then pTh else return head'' rowsLs <- many pTBody rows' <- pOptInTag "tfoot" $ many pTr TagClose _ <- pSatisfy (~== TagClose "table") let rows'' = (concat rowsLs) ++ rows' -- fail on empty table guard $ not $ null head' && null rows'' let isSinglePlain x = case B.toList x of [] -> True [Plain _] -> True _ -> False let isSimple = all isSinglePlain $ concat (head':rows'') let cols = length $ if null head' then head rows'' else head' -- add empty cells to short rows let addEmpties r = case cols - length r of n | n > 0 -> r ++ replicate n mempty | otherwise -> r let rows = map addEmpties rows'' let aligns = replicate cols AlignDefault let widths = if null widths' then if isSimple then replicate cols 0 else replicate cols (1.0 / fromIntegral cols) else widths' return $ B.table caption (zip aligns widths) head' rows pCol :: TagParser Double pCol = try $ do TagOpen _ attribs <- pSatisfy (~== TagOpen "col" []) skipMany pBlank optional $ pSatisfy (~== TagClose "col") skipMany pBlank return $ case lookup "width" attribs of Nothing -> case lookup "style" attribs of Just ('w':'i':'d':'t':'h':':':xs) | '%' `elem` xs -> fromMaybe 0.0 $ safeRead ('0':'.':filter (`notElem` " \t\r\n%'\";") xs) _ -> 0.0 Just x | not (null x) && last x == '%' -> fromMaybe 0.0 $ safeRead ('0':'.':init x) _ -> 0.0 pColgroup :: TagParser [Double] pColgroup = try $ do pSatisfy (~== TagOpen "colgroup" []) skipMany pBlank manyTill pCol (pCloses "colgroup" <|> eof) <* skipMany pBlank noColOrRowSpans :: Tag String -> Bool noColOrRowSpans t = isNullOrOne "colspan" && isNullOrOne "rowspan" where isNullOrOne x = case fromAttrib x t of "" -> True "1" -> True _ -> False pCell :: String -> TagParser [Blocks] pCell celltype = try $ do skipMany pBlank res <- pInTags' celltype noColOrRowSpans block skipMany pBlank return [res] pBlockQuote :: TagParser Blocks pBlockQuote = do contents <- pInTags "blockquote" block return $ B.blockQuote $ fixPlains False contents pPlain :: TagParser Blocks pPlain = do contents <- setInPlain $ trimInlines . mconcat <$> many1 inline if B.isNull contents then return mempty else return $ B.plain contents pPara :: TagParser Blocks pPara = do contents <- trimInlines <$> pInTags "p" inline return $ B.para contents pCodeBlock :: TagParser Blocks pCodeBlock = try $ do TagOpen _ attr <- pSatisfy (~== TagOpen "pre" []) contents <- manyTill pAnyTag (pCloses "pre" <|> eof) let rawText = concatMap tagToString contents -- drop leading newline if any let result' = case rawText of '\n':xs -> xs _ -> rawText -- drop trailing newline if any let result = case reverse result' of '\n':_ -> init result' _ -> result' return $ B.codeBlockWith (mkAttr attr) result tagToString :: Tag String -> String tagToString (TagText s) = s tagToString (TagOpen "br" _) = "\n" tagToString _ = "" inline :: TagParser Inlines inline = choice [ eNoteref , eSwitch id inline , pTagText , pQ , pEmph , pStrong , pSuperscript , pSubscript , pStrikeout , pLineBreak , pLink , pImage , pCode , pSpan , pMath False , pRawHtmlInline ] pLocation :: TagParser () pLocation = do (TagPosition r c) <- pSat isTagPosition setPosition $ newPos "input" r c pSat :: (Tag String -> Bool) -> TagParser (Tag String) pSat f = do pos <- getPosition token show (const pos) (\x -> if f x then Just x else Nothing) pSatisfy :: (Tag String -> Bool) -> TagParser (Tag String) pSatisfy f = try $ optional pLocation >> pSat f pAnyTag :: TagParser (Tag String) pAnyTag = pSatisfy (const True) pSelfClosing :: (String -> Bool) -> ([Attribute String] -> Bool) -> TagParser (Tag String) pSelfClosing f g = do open <- pSatisfy (tagOpen f g) optional $ pSatisfy (tagClose f) return open pQ :: TagParser Inlines pQ = do context <- asks quoteContext let quoteType = case context of InDoubleQuote -> SingleQuote _ -> DoubleQuote let innerQuoteContext = if quoteType == SingleQuote then InSingleQuote else InDoubleQuote let constructor = case quoteType of SingleQuote -> B.singleQuoted DoubleQuote -> B.doubleQuoted withQuoteContext innerQuoteContext $ pInlinesInTags "q" constructor pEmph :: TagParser Inlines pEmph = pInlinesInTags "em" B.emph <|> pInlinesInTags "i" B.emph pStrong :: TagParser Inlines pStrong = pInlinesInTags "strong" B.strong <|> pInlinesInTags "b" B.strong pSuperscript :: TagParser Inlines pSuperscript = pInlinesInTags "sup" B.superscript pSubscript :: TagParser Inlines pSubscript = pInlinesInTags "sub" B.subscript pStrikeout :: TagParser Inlines pStrikeout = do pInlinesInTags "s" B.strikeout <|> pInlinesInTags "strike" B.strikeout <|> pInlinesInTags "del" B.strikeout <|> try (do pSatisfy (~== TagOpen "span" [("class","strikeout")]) contents <- mconcat <$> manyTill inline (pCloses "span") return $ B.strikeout contents) pLineBreak :: TagParser Inlines pLineBreak = do pSelfClosing (=="br") (const True) return B.linebreak -- Unlike fromAttrib from tagsoup, this distinguishes -- between a missing attribute and an attribute with empty content. maybeFromAttrib :: String -> Tag String -> Maybe String maybeFromAttrib name (TagOpen _ attrs) = lookup name attrs maybeFromAttrib _ _ = Nothing pLink :: TagParser Inlines pLink = try $ do tag <- pSatisfy $ tagOpenLit "a" (const True) let title = fromAttrib "title" tag -- take id from id attribute if present, otherwise name let uid = maybe (fromAttrib "name" tag) id $ maybeFromAttrib "id" tag let cls = words $ fromAttrib "class" tag lab <- trimInlines . mconcat <$> manyTill inline (pCloses "a") -- check for href; if href, then a link, otherwise a span case maybeFromAttrib "href" tag of Nothing -> return $ B.spanWith (uid, cls, []) lab Just url' -> do mbBaseHref <- baseHref <$> getState let url = case (parseURIReference url', mbBaseHref) of (Just rel, Just bs) -> show (rel `nonStrictRelativeTo` bs) _ -> url' return $ B.linkWith (uid, cls, []) (escapeURI url) title lab pImage :: TagParser Inlines pImage = do tag <- pSelfClosing (=="img") (isJust . lookup "src") mbBaseHref <- baseHref <$> getState let url' = fromAttrib "src" tag let url = case (parseURIReference url', mbBaseHref) of (Just rel, Just bs) -> show (rel `nonStrictRelativeTo` bs) _ -> url' let title = fromAttrib "title" tag let alt = fromAttrib "alt" tag let uid = fromAttrib "id" tag let cls = words $ fromAttrib "class" tag let getAtt k = case fromAttrib k tag of "" -> [] v -> [(k, v)] let kvs = concat $ map getAtt ["width", "height", "sizes", "srcset"] return $ B.imageWith (uid, cls, kvs) (escapeURI url) title (B.text alt) pCode :: TagParser Inlines pCode = try $ do (TagOpen open attr) <- pSatisfy $ tagOpen (`elem` ["code","tt"]) (const True) result <- manyTill pAnyTag (pCloses open) return $ B.codeWith (mkAttr attr) $ intercalate " " $ lines $ innerText result pSpan :: TagParser Inlines pSpan = try $ do guardEnabled Ext_native_spans TagOpen _ attr <- lookAhead $ pSatisfy $ tagOpen (=="span") (const True) contents <- pInTags "span" inline 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 inplain <- asks inPlain result <- pSatisfy (tagComment (const True)) <|> if inplain then pSatisfy (not . isBlockTag) else pSatisfy isInlineTag parseRaw <- getOption readerParseRaw if parseRaw then return $ B.rawInline "html" $ renderTags' [result] else return mempty mathMLToTeXMath :: String -> Either String String mathMLToTeXMath s = writeTeX <$> readMathML s pMath :: Bool -> TagParser Inlines pMath inCase = try $ do open@(TagOpen _ attr) <- pSatisfy $ tagOpen (=="math") (const True) -- we'll assume math tags are MathML unless specially marked -- otherwise... unless inCase $ guard (maybe True (== mathMLNamespace) (lookup "xmlns" attr)) contents <- manyTill pAnyTag (pSatisfy (~== TagClose "math")) case mathMLToTeXMath (renderTags $ [open] ++ contents ++ [TagClose "math"]) of Left _ -> return $ B.spanWith ("",["math"],attr) $ B.text $ innerText contents Right [] -> return mempty Right x -> return $ case lookup "display" attr of Just "block" -> B.displayMath x _ -> B.math x pInlinesInTags :: String -> (Inlines -> Inlines) -> TagParser Inlines pInlinesInTags tagtype f = extractSpaces f <$> pInTags tagtype inline pInTags :: (Monoid a) => String -> TagParser a -> TagParser a pInTags tagtype parser = pInTags' tagtype (const True) parser pInTags' :: (Monoid a) => String -> (Tag String -> Bool) -> TagParser a -> TagParser a pInTags' tagtype tagtest parser = try $ do pSatisfy (\t -> t ~== TagOpen tagtype [] && tagtest t) mconcat <$> manyTill parser (pCloses tagtype <|> eof) -- parses p, preceeded by an optional opening tag -- and followed by an optional closing tags pOptInTag :: String -> TagParser a -> TagParser a pOptInTag tagtype p = try $ do skipMany pBlank optional $ pSatisfy (~== TagOpen tagtype []) skipMany pBlank x <- p skipMany pBlank optional $ pSatisfy (~== TagClose tagtype) skipMany pBlank return x pCloses :: String -> TagParser () pCloses tagtype = try $ do t <- lookAhead $ pSatisfy $ \tag -> isTagClose tag || isTagOpen tag case t of (TagClose t') | t' == tagtype -> pAnyTag >> return () (TagOpen t' _) | t' `closes` tagtype -> return () (TagClose "ul") | tagtype == "li" -> return () (TagClose "ol") | tagtype == "li" -> return () (TagClose "dl") | tagtype == "dd" -> return () (TagClose "table") | tagtype == "td" -> return () (TagClose "table") | tagtype == "tr" -> return () _ -> mzero pTagText :: TagParser Inlines pTagText = try $ do (TagText str) <- pSatisfy isTagText st <- getState qu <- ask case flip runReader qu $ runParserT (many pTagContents) st "text" str of Left _ -> fail $ "Could not parse `" ++ str ++ "'" Right result -> return $ mconcat result pBlank :: TagParser () pBlank = try $ do (TagText str) <- pSatisfy isTagText guard $ all isSpace str type InlinesParser = HTMLParser String pTagContents :: InlinesParser Inlines pTagContents = B.displayMath <$> mathDisplay <|> B.math <$> mathInline <|> pStr <|> pSpace <|> smartPunctuation pTagContents <|> pSymbol <|> pBad pStr :: InlinesParser Inlines pStr = do result <- many1 $ satisfy $ \c -> not (isSpace c) && not (isSpecial c) && not (isBad c) updateLastStrPos return $ B.str result isSpecial :: Char -> Bool isSpecial '"' = True isSpecial '\'' = True isSpecial '.' = True isSpecial '-' = True isSpecial '$' = True isSpecial '\8216' = True isSpecial '\8217' = True isSpecial '\8220' = True isSpecial '\8221' = True isSpecial _ = False pSymbol :: InlinesParser Inlines pSymbol = satisfy isSpecial >>= return . B.str . (:[]) isBad :: Char -> Bool isBad c = c >= '\128' && c <= '\159' -- not allowed in HTML pBad :: InlinesParser Inlines pBad = do c <- satisfy isBad let c' = case c of '\128' -> '\8364' '\130' -> '\8218' '\131' -> '\402' '\132' -> '\8222' '\133' -> '\8230' '\134' -> '\8224' '\135' -> '\8225' '\136' -> '\710' '\137' -> '\8240' '\138' -> '\352' '\139' -> '\8249' '\140' -> '\338' '\142' -> '\381' '\145' -> '\8216' '\146' -> '\8217' '\147' -> '\8220' '\148' -> '\8221' '\149' -> '\8226' '\150' -> '\8211' '\151' -> '\8212' '\152' -> '\732' '\153' -> '\8482' '\154' -> '\353' '\155' -> '\8250' '\156' -> '\339' '\158' -> '\382' '\159' -> '\376' _ -> '?' return $ B.str [c'] pSpace :: InlinesParser Inlines pSpace = many1 (satisfy isSpace) >>= \xs -> if '\n' `elem` xs then return B.softbreak else return B.space -- -- Constants -- eitherBlockOrInline :: [String] eitherBlockOrInline = ["audio", "applet", "button", "iframe", "embed", "del", "ins", "progress", "map", "area", "noscript", "script", "object", "svg", "video", "source"] {- inlineHtmlTags :: [[Char]] inlineHtmlTags = ["a", "abbr", "acronym", "b", "basefont", "bdo", "big", "br", "cite", "code", "dfn", "em", "font", "i", "img", "input", "kbd", "label", "q", "s", "samp", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"] -} blockHtmlTags :: [String] blockHtmlTags = ["?xml", "!DOCTYPE", "address", "article", "aside", "blockquote", "body", "button", "canvas", "caption", "center", "col", "colgroup", "dd", "dir", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "isindex", "menu", "noframes", "ol", "output", "p", "pre", "section", "table", "tbody", "textarea", "thead", "tfoot", "ul", "dd", "dt", "frameset", "li", "tbody", "td", "tfoot", "th", "thead", "tr", "script", "style"] -- We want to allow raw docbook in markdown documents, so we -- include docbook block tags here too. blockDocBookTags :: [String] blockDocBookTags = ["calloutlist", "bibliolist", "glosslist", "itemizedlist", "orderedlist", "segmentedlist", "simplelist", "variablelist", "caution", "important", "note", "tip", "warning", "address", "literallayout", "programlisting", "programlistingco", "screen", "screenco", "screenshot", "synopsis", "example", "informalexample", "figure", "informalfigure", "table", "informaltable", "para", "simpara", "formalpara", "equation", "informalequation", "figure", "screenshot", "mediaobject", "qandaset", "procedure", "task", "cmdsynopsis", "funcsynopsis", "classsynopsis", "blockquote", "epigraph", "msgset", "sidebar", "title"] epubTags :: [String] epubTags = ["case", "switch", "default"] blockTags :: [String] blockTags = blockHtmlTags ++ blockDocBookTags ++ epubTags isInlineTag :: Tag String -> Bool isInlineTag t = tagOpen isInlineTagName (const True) t || tagClose isInlineTagName t || tagComment (const True) t where isInlineTagName x = x `notElem` blockTags isBlockTag :: Tag String -> Bool isBlockTag t = tagOpen isBlockTagName (const True) t || tagClose isBlockTagName t || tagComment (const True) t where isBlockTagName ('?':_) = True isBlockTagName ('!':_) = True isBlockTagName x = x `elem` blockTags || x `elem` eitherBlockOrInline isTextTag :: Tag String -> Bool isTextTag = tagText (const True) isCommentTag :: Tag String -> Bool isCommentTag = tagComment (const True) -- taken from HXT and extended -- See http://www.w3.org/TR/html5/syntax.html sec 8.1.2.4 optional tags closes :: String -> String -> Bool _ `closes` "body" = False _ `closes` "html" = False "body" `closes` "head" = True "a" `closes` "a" = True "li" `closes` "li" = True "th" `closes` t | t `elem` ["th","td"] = True "tr" `closes` t | t `elem` ["th","td","tr"] = True "dd" `closes` t | t `elem` ["dt", "dd"] = True "dt" `closes` t | t `elem` ["dt","dd"] = True "rt" `closes` t | t `elem` ["rb", "rt", "rtc"] = True "optgroup" `closes` "optgroup" = True "optgroup" `closes` "option" = True "option" `closes` "option" = True -- http://www.w3.org/TR/html-markup/p.html x `closes` "p" | x `elem` ["address", "article", "aside", "blockquote", "dir", "div", "dl", "fieldset", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hr", "menu", "nav", "ol", "p", "pre", "section", "table", "ul"] = True "meta" `closes` "meta" = True "form" `closes` "form" = True "label" `closes` "label" = True "map" `closes` "map" = True "object" `closes` "object" = True _ `closes` t | t `elem` ["option","style","script","textarea","title"] = True t `closes` "select" | t /= "option" = True "thead" `closes` t | t `elem` ["colgroup"] = True "tfoot" `closes` t | t `elem` ["thead","colgroup"] = True "tbody" `closes` t | t `elem` ["tbody","tfoot","thead","colgroup"] = True t `closes` t2 | t `elem` ["h1","h2","h3","h4","h5","h6","dl","ol","ul","table","div","p"] && t2 `elem` ["h1","h2","h3","h4","h5","h6","p" ] = True -- not "div" t1 `closes` t2 | t1 `elem` blockTags && t2 `notElem` (blockTags ++ eitherBlockOrInline) = True _ `closes` _ = False --- parsers for use in markdown, textile readers -- | Matches a stretch of HTML in balanced tags. htmlInBalanced :: (Monad m) => (Tag String -> Bool) -> ParserT String st m String htmlInBalanced f = try $ do lookAhead (char '<') inp <- getInput let ts = canonicalizeTags $ parseTagsOptions parseOptions{ optTagWarning = True, optTagPosition = True } inp case ts of (TagPosition sr sc : t@(TagOpen tn _) : rest) -> do guard $ f t guard $ not $ hasTagWarning (t : take 1 rest) case htmlInBalanced' tn (t:rest) of [] -> mzero xs -> case reverse xs of (TagClose _ : TagPosition er ec : _) -> do let ls = er - sr let cs = ec - sc lscontents <- unlines <$> count ls anyLine cscontents <- count cs anyChar (_,closetag) <- htmlTag (~== TagClose tn) return (lscontents ++ cscontents ++ closetag) _ -> mzero _ -> mzero htmlInBalanced' :: String -> [Tag String] -> [Tag String] htmlInBalanced' tagname ts = fromMaybe [] $ go 0 ts where go :: Int -> [Tag String] -> Maybe [Tag String] go n (t@(TagOpen tn' _):rest) | tn' == tagname = (t :) <$> go (n + 1) rest go 1 (t@(TagClose tn'):_) | tn' == tagname = return [t] go n (t@(TagClose tn'):rest) | tn' == tagname = (t :) <$> go (n - 1) rest go n (t:ts') = (t :) <$> go n ts' go _ [] = mzero hasTagWarning :: [Tag String] -> Bool hasTagWarning (TagWarning _:_) = True hasTagWarning _ = False -- | Matches a tag meeting a certain condition. htmlTag :: Monad m => (Tag String -> Bool) -> ParserT [Char] st m (Tag String, String) htmlTag f = try $ do lookAhead (char '<') inp <- getInput let (next : _) = canonicalizeTags $ parseTagsOptions parseOptions{ optTagWarning = False } inp guard $ f next let handleTag tagname = do -- -- should NOT be parsed as an HTML tag, see #2277 guard $ not ('.' `elem` tagname) -- should NOT be a tag either. -- tagsoup will parse it as TagOpen "https:" [("example.org","")] guard $ not (null tagname) guard $ last tagname /= ':' rendered <- manyTill anyChar (char '>') return (next, rendered ++ ">") case next of TagComment s | "") | otherwise -> fail "bogus comment mode, HTML5 parse error" TagOpen tagname _attr -> handleTag tagname TagClose tagname -> handleTag tagname _ -> mzero mkAttr :: [(String, String)] -> Attr mkAttr attr = (attribsId, attribsClasses, attribsKV) where attribsId = fromMaybe "" $ lookup "id" attr attribsClasses = (words $ fromMaybe "" $ lookup "class" attr) ++ epubTypes attribsKV = filter (\(k,_) -> k /= "class" && k /= "id") attr epubTypes = words $ fromMaybe "" $ lookup "epub:type" attr -- Strip namespace prefixes stripPrefixes :: [Tag String] -> [Tag String] stripPrefixes = map stripPrefix stripPrefix :: Tag String -> Tag String stripPrefix (TagOpen s as) = TagOpen (stripPrefix' s) (map (stripPrefix' *** id) as) stripPrefix (TagClose s) = TagClose (stripPrefix' s) stripPrefix x = x stripPrefix' :: String -> String stripPrefix' s = case span (/= ':') s of (_, "") -> s (_, (_:ts)) -> ts isSpace :: Char -> Bool isSpace ' ' = True isSpace '\t' = True isSpace '\n' = True isSpace '\r' = True 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 getQuoteContext = asks quoteContext withQuoteContext q = local (\s -> s{quoteContext = q}) instance HasReaderOptions HTMLState where extractReaderOptions = extractReaderOptions . parserState instance HasMeta HTMLState where setMeta s b st = st {parserState = setMeta s b $ parserState st} deleteMeta s st = st {parserState = deleteMeta s $ parserState st} instance Default HTMLLocal where def = HTMLLocal NoQuote False False instance HasLastStrPosition HTMLState where setLastStrPos s st = st {parserState = setLastStrPos s (parserState st)} getLastStrPos = getLastStrPos . parserState -- EPUB Specific -- -- sectioningContent :: [String] sectioningContent = ["article", "aside", "nav", "section"] groupingContent :: [String] groupingContent = ["p", "hr", "pre", "blockquote", "ol" , "ul", "li", "dl", "dt", "dt", "dd" , "figure", "figcaption", "div", "main"] {- types :: [(String, ([String], Int))] types = -- Document divisions map (\s -> (s, (["section", "body"], 0))) ["volume", "part", "chapter", "division"] ++ -- Document section and components [ ("abstract", ([], 0))] -} pandoc-1.19.2.4/src/Text/Pandoc/Readers/LaTeX.hs0000644000000000000000000013741713155240142017227 0ustar0000000000000000{-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-} {- Copyright (C) 2006-2015 John MacFarlane 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.Readers.LaTeX Copyright : Copyright (C) 2006-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of LaTeX to 'Pandoc' document. -} module Text.Pandoc.Readers.LaTeX ( readLaTeX, rawLaTeXInline, rawLaTeXBlock, inlineCommand, handleIncludes ) where import Text.Pandoc.Definition import Text.Pandoc.Walk import Text.Pandoc.Shared import Text.Pandoc.Options import Text.Pandoc.Parsing hiding ((<|>), many, optional, space, mathDisplay, mathInline) import qualified Text.Pandoc.UTF8 as UTF8 import Data.Char ( chr, ord, isLetter, isAlphaNum ) import Control.Monad.Trans (lift) import Control.Monad import Text.Pandoc.Builder import Control.Applicative ((<|>), many, optional) import Data.Maybe (fromMaybe, maybeToList) import System.Environment (getEnv) import System.FilePath (replaceExtension, (), takeExtension, addExtension) import Data.List (intercalate) import qualified Data.Map as M import qualified Control.Exception as E import Text.Pandoc.Highlighting (fromListingsLanguage) import Text.Pandoc.ImageSize (numUnit, showFl) import Text.Pandoc.Error -- | Parse LaTeX from string and return 'Pandoc' document. readLaTeX :: ReaderOptions -- ^ Reader options -> String -- ^ String to parse (assumes @'\n'@ line endings) -> Either PandocError Pandoc readLaTeX opts = readWith parseLaTeX def{ stateOptions = opts } parseLaTeX :: LP Pandoc parseLaTeX = do bs <- blocks eof st <- getState let meta = stateMeta st let (Pandoc _ bs') = doc bs return $ Pandoc meta bs' type LP = Parser String ParserState anyControlSeq :: LP String anyControlSeq = do char '\\' next <- option '\n' anyChar case next of '\n' -> return "" c | isLetter c -> (c:) <$> (many letter <* optional sp) | otherwise -> return [c] controlSeq :: String -> LP String controlSeq name = try $ do char '\\' case name of "" -> mzero [c] | not (isLetter c) -> string [c] cs -> string cs <* notFollowedBy letter <* optional sp return name dimenarg :: LP String dimenarg = try $ do ch <- option "" $ string "=" num <- many1 digit dim <- oneOfStrings ["pt","pc","in","bp","cm","mm","dd","cc","sp"] return $ ch ++ num ++ dim sp :: LP () sp = whitespace <|> endline whitespace :: LP () whitespace = skipMany1 $ satisfy (\c -> c == ' ' || c == '\t') endline :: LP () endline = try (newline >> lookAhead anyChar >> notFollowedBy blankline) isLowerHex :: Char -> Bool isLowerHex x = x >= '0' && x <= '9' || x >= 'a' && x <= 'f' tildeEscape :: LP Char tildeEscape = try $ do string "^^" c <- satisfy (\x -> x >= '\0' && x <= '\128') d <- if isLowerHex c then option "" $ count 1 (satisfy isLowerHex) else return "" if null d then case ord c of x | x >= 64 && x <= 127 -> return $ chr (x - 64) | otherwise -> return $ chr (x + 64) else return $ chr $ read ('0':'x':c:d) comment :: LP () comment = do char '%' skipMany (satisfy (/='\n')) optional newline return () bgroup :: LP () bgroup = try $ do skipMany (spaceChar <|> try (newline <* notFollowedBy blankline)) () <$ char '{' <|> () <$ controlSeq "bgroup" <|> () <$ controlSeq "begingroup" egroup :: LP () egroup = () <$ char '}' <|> () <$ controlSeq "egroup" <|> () <$ controlSeq "endgroup" grouped :: Monoid a => LP a -> LP a grouped parser = try $ bgroup *> (mconcat <$> manyTill parser egroup) braced :: LP String braced = bgroup *> (concat <$> manyTill ( many1 (satisfy (\c -> c /= '\\' && c /= '}' && c /= '{')) <|> try (string "\\}") <|> try (string "\\{") <|> try (string "\\\\") <|> ((\x -> "{" ++ x ++ "}") <$> braced) <|> count 1 anyChar ) egroup) bracketed :: Monoid a => LP a -> LP a bracketed parser = try $ char '[' *> (mconcat <$> manyTill parser (char ']')) mathDisplay :: LP String -> LP Inlines mathDisplay p = displayMath <$> (try p >>= applyMacros' . trim) mathInline :: LP String -> LP Inlines mathInline p = math <$> (try p >>= applyMacros') mathChars :: LP String mathChars = concat <$> many (escapedChar <|> (snd <$> withRaw braced) <|> many1 (satisfy isOrdChar)) where escapedChar = try $ do char '\\' c <- anyChar return ['\\',c] isOrdChar '$' = False isOrdChar '{' = False isOrdChar '}' = False isOrdChar '\\' = False isOrdChar _ = True quoted' :: (Inlines -> Inlines) -> LP String -> LP () -> LP Inlines quoted' f starter ender = do startchs <- starter smart <- getOption readerSmart if smart then do ils <- many (notFollowedBy ender >> inline) (ender >> return (f (mconcat ils))) <|> (<> mconcat ils) <$> lit (case startchs of "``" -> "“" "`" -> "‘" _ -> startchs) else lit startchs doubleQuote :: LP Inlines doubleQuote = do 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 '"') singleQuote :: LP Inlines 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) <|> (space <$ whitespace) <|> (softbreak <$ endline) <|> inlineText <|> inlineCommand <|> inlineEnvironment <|> inlineGroup <|> (char '-' *> option (str "-") (char '-' *> option (str "–") (str "—" <$ char '-'))) <|> doubleQuote <|> singleQuote <|> (str "”" <$ try (string "''")) <|> (str "”" <$ char '”') <|> (str "’" <$ char '\'') <|> (str "’" <$ char '’') <|> (str "\160" <$ char '~') <|> mathDisplay (string "$$" *> mathChars <* string "$$") <|> mathInline (char '$' *> mathChars <* char '$') <|> (guardEnabled Ext_literate_haskell *> char '|' *> doLHSverb) <|> (str . (:[]) <$> tildeEscape) <|> (str . (:[]) <$> oneOf "[]") <|> (str . (:[]) <$> oneOf "#&~^'`\"[]") -- TODO print warning? -- <|> (str <$> count 1 (satisfy (\c -> c /= '\\' && c /='\n' && c /='}' && c /='{'))) -- eat random leftover characters inlines :: LP Inlines inlines = mconcat <$> many (notFollowedBy (char '}') *> inline) inlineGroup :: LP Inlines inlineGroup = do ils <- grouped inline if isNull ils then return mempty else return $ spanWith nullAttr ils -- we need the span so we can detitlecase bibtex entries; -- we need to know when something is {C}apitalized block :: LP Blocks block = (mempty <$ comment) <|> (mempty <$ ((spaceChar <|> newline) *> spaces)) <|> environment <|> macro <|> blockCommand <|> paragraph <|> grouped block <|> (mempty <$ char '&') -- loose & in table environment blocks :: LP Blocks blocks = mconcat <$> many block getRawCommand :: String -> LP String getRawCommand name' = do 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 lookupListDefault d = (fromMaybe d .) . lookupList where lookupList l m = msum $ map (`M.lookup` m) l blockCommand :: LP Blocks blockCommand = try $ do name <- anyControlSeq guard $ name /= "begin" && name /= "end" star <- option "" (string "*" <* optional sp) let name' = name ++ star let raw = do rawcommand <- getRawCommand name' transformed <- applyMacros' rawcommand guard $ transformed /= rawcommand notFollowedBy $ parseFromString inlines transformed parseFromString blocks transformed lookupListDefault raw [name',name] blockCommands inBrackets :: Inlines -> Inlines inBrackets x = str "[" <> x <> str "]" -- eat an optional argument and one or more arguments in braces ignoreInlines :: String -> (String, LP Inlines) ignoreInlines name = (name, doraw <|> (mempty <$ optargs)) where optargs = skipopts *> skipMany (try $ optional sp *> braced) contseq = '\\':name doraw = (rawInline "latex" . (contseq ++) . snd) <$> (getOption readerParseRaw >>= guard >> withRaw optargs) ignoreBlocks :: String -> (String, LP Blocks) ignoreBlocks name = (name, doraw <|> (mempty <$ optargs)) where optargs = skipopts *> skipMany (try $ optional sp *> braced) contseq = '\\':name doraw = (rawBlock "latex" . (contseq ++) . snd) <$> (getOption readerParseRaw >>= guard >> withRaw optargs) blockCommands :: M.Map String (LP Blocks) blockCommands = M.fromList $ [ ("par", mempty <$ skipopts) , ("title", mempty <$ (skipopts *> (grouped inline >>= addMeta "title") <|> (grouped block >>= addMeta "title"))) , ("subtitle", mempty <$ (skipopts *> tok >>= addMeta "subtitle")) , ("author", mempty <$ (skipopts *> authors)) -- -- in letter class, temp. store address & sig as title, author , ("address", mempty <$ (skipopts *> tok >>= addMeta "address")) , ("signature", mempty <$ (skipopts *> authors)) , ("date", mempty <$ (skipopts *> tok >>= addMeta "date")) -- sectioning , ("chapter", updateState (\s -> s{ stateHasChapters = True }) *> section nullAttr 0) , ("chapter*", updateState (\s -> s{ stateHasChapters = True }) *> section ("",["unnumbered"],[]) 0) , ("section", section nullAttr 1) , ("section*", section ("",["unnumbered"],[]) 1) , ("subsection", section nullAttr 2) , ("subsection*", section ("",["unnumbered"],[]) 2) , ("subsubsection", section nullAttr 3) , ("subsubsection*", section ("",["unnumbered"],[]) 3) , ("paragraph", section nullAttr 4) , ("paragraph*", section ("",["unnumbered"],[]) 4) , ("subparagraph", section nullAttr 5) , ("subparagraph*", section ("",["unnumbered"],[]) 5) -- beamer slides , ("frametitle", section nullAttr 3) , ("framesubtitle", section nullAttr 4) -- letters , ("opening", (para . trimInlines) <$> (skipopts *> tok)) , ("closing", skipopts *> closing) -- , ("hrule", pure horizontalRule) , ("strut", pure mempty) , ("rule", skipopts *> tok *> tok *> pure horizontalRule) , ("item", skipopts *> looseItem) , ("documentclass", skipopts *> braced *> preamble) , ("centerline", (para . trimInlines) <$> (skipopts *> tok)) , ("caption", skipopts *> setCaption) , ("PandocStartInclude", startInclude) , ("PandocEndInclude", endInclude) , ("bibliography", mempty <$ (skipopts *> braced >>= addMeta "bibliography" . splitBibs)) , ("addbibresource", mempty <$ (skipopts *> braced >>= addMeta "bibliography" . splitBibs)) ] ++ map ignoreBlocks -- these commands will be ignored unless --parse-raw is specified, -- in which case they will appear as raw latex blocks [ "newcommand", "renewcommand", "newenvironment", "renewenvironment" -- newcommand, etc. should be parsed by macro, but we need this -- here so these aren't parsed as inline commands to ignore , "special", "pdfannot", "pdfstringdef" , "bibliographystyle" , "maketitle", "makeindex", "makeglossary" , "addcontentsline", "addtocontents", "addtocounter" -- \ignore{} is used conventionally in literate haskell for definitions -- that are to be processed by the compiler but not printed. , "ignore" , "hyperdef" , "markboth", "markright", "markleft" , "newpage" ] addMeta :: ToMetaValue a => String -> a -> LP () addMeta field val = updateState $ \st -> st{ stateMeta = addMetaField field val $ stateMeta st } splitBibs :: String -> [Inlines] splitBibs = map (str . flip replaceExtension "bib" . trim) . splitBy (==',') setCaption :: LP Blocks setCaption = do ils <- tok mblabel <- option Nothing $ try $ spaces' >> controlSeq "label" >> (Just <$> tok) let ils' = case mblabel of Just lab -> ils <> spanWith ("",[],[("data-label", stringify lab)]) mempty Nothing -> ils updateState $ \st -> st{ stateCaption = Just ils' } return mempty resetCaption :: LP () resetCaption = updateState $ \st -> st{ stateCaption = Nothing } authors :: LP () authors = try $ do char '{' let oneAuthor = mconcat <$> many1 (notFollowedBy' (controlSeq "and") >> (inline <|> mempty <$ blockCommand)) -- skip e.g. \vspace{10pt} auths <- sepBy oneAuthor (controlSeq "and") char '}' addMeta "author" (map trimInlines auths) section :: Attr -> Int -> LP Blocks section (ident, classes, kvs) lvl = do hasChapters <- stateHasChapters `fmap` getState let lvl' = if hasChapters then lvl + 1 else lvl skipopts contents <- grouped inline lab <- option ident $ try (spaces' >> controlSeq "label" >> spaces' >> braced) attr' <- registerHeader (lab, classes, kvs) contents return $ headerWith attr' lvl' contents inlineCommand :: LP Inlines inlineCommand = try $ do name <- anyControlSeq guard $ name /= "begin" && name /= "end" guard $ not $ isBlockCommand name parseRaw <- getOption readerParseRaw star <- option "" (string "*") let name' = name ++ star let raw = do rawargs <- withRaw (skipangles *> skipopts *> option "" dimenarg *> many braced) let rawcommand = '\\' : name ++ star ++ snd rawargs transformed <- applyMacros' rawcommand if transformed /= rawcommand then parseFromString inlines transformed else if parseRaw then return $ rawInline "latex" rawcommand else return mempty (lookupListDefault mzero [name',name] inlineCommands <* optional (try (string "{}"))) <|> raw unlessParseRaw :: LP () unlessParseRaw = getOption readerParseRaw >>= guard . not isBlockCommand :: String -> Bool isBlockCommand s = s `M.member` blockCommands inlineEnvironments :: M.Map String (LP Inlines) inlineEnvironments = M.fromList [ ("displaymath", mathEnv id Nothing "displaymath") , ("math", math <$> verbEnv "math") , ("equation", mathEnv id Nothing "equation") , ("equation*", mathEnv id Nothing "equation*") , ("gather", mathEnv id (Just "gathered") "gather") , ("gather*", mathEnv id (Just "gathered") "gather*") , ("multline", mathEnv id (Just "gathered") "multline") , ("multline*", mathEnv id (Just "gathered") "multline*") , ("eqnarray", mathEnv id (Just "aligned") "eqnarray") , ("eqnarray*", mathEnv id (Just "aligned") "eqnarray*") , ("align", mathEnv id (Just "aligned") "align") , ("align*", mathEnv id (Just "aligned") "align*") , ("alignat", mathEnv id (Just "aligned") "alignat") , ("alignat*", mathEnv id (Just "aligned") "alignat*") ] inlineCommands :: M.Map String (LP Inlines) inlineCommands = M.fromList $ [ ("emph", extractSpaces emph <$> tok) , ("textit", extractSpaces emph <$> tok) , ("textsl", extractSpaces emph <$> tok) , ("textsc", extractSpaces smallcaps <$> tok) , ("sout", extractSpaces strikeout <$> tok) , ("textsuperscript", extractSpaces superscript <$> tok) , ("textsubscript", extractSpaces subscript <$> tok) , ("textbackslash", lit "\\") , ("backslash", lit "\\") , ("slash", lit "/") , ("textbf", extractSpaces strong <$> tok) , ("textnormal", extractSpaces (spanWith ("",["nodecor"],[])) <$> tok) , ("ldots", lit "…") , ("dots", lit "…") , ("mdots", lit "…") , ("sim", lit "~") , ("label", unlessParseRaw >> (inBrackets <$> tok)) , ("ref", unlessParseRaw >> (inBrackets <$> tok)) , ("noindent", unlessParseRaw >> return mempty) , ("textgreek", tok) , ("sep", lit ",") , ("cref", unlessParseRaw >> (inBrackets <$> tok)) -- from cleveref.sty , ("(", mathInline $ manyTill anyChar (try $ string "\\)")) , ("[", mathDisplay $ manyTill anyChar (try $ string "\\]")) , ("ensuremath", mathInline braced) , ("texorpdfstring", (\_ x -> x) <$> tok <*> tok) , ("P", lit "¶") , ("S", lit "§") , ("$", lit "$") , ("%", lit "%") , ("&", lit "&") , ("#", lit "#") , ("_", lit "_") , ("{", lit "{") , ("}", lit "}") -- old TeX commands , ("em", extractSpaces emph <$> inlines) , ("it", extractSpaces emph <$> inlines) , ("sl", extractSpaces emph <$> inlines) , ("bf", extractSpaces strong <$> inlines) , ("rm", inlines) , ("itshape", extractSpaces emph <$> inlines) , ("slshape", extractSpaces emph <$> inlines) , ("scshape", extractSpaces smallcaps <$> inlines) , ("bfseries", extractSpaces strong <$> inlines) , ("/", pure mempty) -- italic correction , ("aa", lit "å") , ("AA", lit "Å") , ("ss", lit "ß") , ("o", lit "ø") , ("O", lit "Ø") , ("L", lit "Ł") , ("l", lit "ł") , ("ae", lit "æ") , ("AE", lit "Æ") , ("oe", lit "œ") , ("OE", lit "Œ") , ("pounds", lit "£") , ("euro", lit "€") , ("copyright", lit "©") , ("textasciicircum", lit "^") , ("textasciitilde", lit "~") , ("H", try $ tok >>= accent hungarumlaut) , ("`", option (str "`") $ try $ tok >>= accent grave) , ("'", option (str "'") $ try $ tok >>= accent acute) , ("^", option (str "^") $ try $ tok >>= accent circ) , ("~", option (str "~") $ try $ tok >>= accent tilde) , ("\"", option (str "\"") $ try $ tok >>= accent umlaut) , (".", option (str ".") $ try $ tok >>= accent dot) , ("=", option (str "=") $ try $ tok >>= accent macron) , ("c", option (str "c") $ try $ tok >>= accent cedilla) , ("v", option (str "v") $ try $ tok >>= accent hacek) , ("u", option (str "u") $ try $ tok >>= accent breve) , ("i", lit "i") , ("\\", linebreak <$ (optional (bracketed inline) *> spaces')) , (",", pure mempty) , ("@", pure mempty) , (" ", lit "\160") , ("ps", pure $ str "PS." <> space) , ("TeX", lit "TeX") , ("LaTeX", lit "LaTeX") , ("bar", lit "|") , ("textless", lit "<") , ("textgreater", lit ">") , ("thanks", (note . mconcat) <$> (char '{' *> manyTill block (char '}'))) , ("footnote", (note . mconcat) <$> (char '{' *> manyTill block (char '}'))) , ("verb", doverb) , ("lstinline", skipopts *> doverb) , ("Verb", doverb) , ("texttt", (code . stringify . toList) <$> tok) , ("url", (unescapeURL <$> braced) >>= \url -> pure (link url "" (str url))) , ("href", (unescapeURL <$> braced <* optional sp) >>= \url -> tok >>= \lab -> pure (link url "" lab)) , ("includegraphics", do options <- option [] keyvals src <- unescapeURL . removeDoubleQuotes <$> braced mkImage options src) , ("enquote", enquote) , ("cite", citation "cite" NormalCitation False) , ("Cite", citation "Cite" NormalCitation False) , ("citep", citation "citep" NormalCitation False) , ("citep*", citation "citep*" NormalCitation False) , ("citeal", citation "citeal" NormalCitation False) , ("citealp", citation "citealp" NormalCitation False) , ("citealp*", citation "citealp*" NormalCitation False) , ("autocite", citation "autocite" NormalCitation False) , ("smartcite", citation "smartcite" NormalCitation False) , ("footcite", inNote <$> citation "footcite" NormalCitation False) , ("parencite", citation "parencite" NormalCitation False) , ("supercite", citation "supercite" NormalCitation False) , ("footcitetext", inNote <$> citation "footcitetext" NormalCitation False) , ("citeyearpar", citation "citeyearpar" SuppressAuthor False) , ("citeyear", citation "citeyear" SuppressAuthor False) , ("autocite*", citation "autocite*" SuppressAuthor False) , ("cite*", citation "cite*" SuppressAuthor False) , ("parencite*", citation "parencite*" SuppressAuthor False) , ("textcite", citation "textcite" AuthorInText False) , ("citet", citation "citet" AuthorInText False) , ("citet*", citation "citet*" AuthorInText False) , ("citealt", citation "citealt" AuthorInText False) , ("citealt*", citation "citealt*" AuthorInText False) , ("textcites", citation "textcites" AuthorInText True) , ("cites", citation "cites" NormalCitation True) , ("autocites", citation "autocites" NormalCitation True) , ("footcites", inNote <$> citation "footcites" NormalCitation True) , ("parencites", citation "parencites" NormalCitation True) , ("supercites", citation "supercites" NormalCitation True) , ("footcitetexts", inNote <$> citation "footcitetexts" NormalCitation True) , ("Autocite", citation "Autocite" NormalCitation False) , ("Smartcite", citation "Smartcite" NormalCitation False) , ("Footcite", citation "Footcite" NormalCitation False) , ("Parencite", citation "Parencite" NormalCitation False) , ("Supercite", citation "Supercite" NormalCitation False) , ("Footcitetext", inNote <$> citation "Footcitetext" NormalCitation False) , ("Citeyearpar", citation "Citeyearpar" SuppressAuthor False) , ("Citeyear", citation "Citeyear" SuppressAuthor False) , ("Autocite*", citation "Autocite*" SuppressAuthor False) , ("Cite*", citation "Cite*" SuppressAuthor False) , ("Parencite*", citation "Parencite*" SuppressAuthor False) , ("Textcite", citation "Textcite" AuthorInText False) , ("Textcites", citation "Textcites" AuthorInText True) , ("Cites", citation "Cites" NormalCitation True) , ("Autocites", citation "Autocites" NormalCitation True) , ("Footcites", citation "Footcites" NormalCitation True) , ("Parencites", citation "Parencites" NormalCitation True) , ("Supercites", citation "Supercites" NormalCitation True) , ("Footcitetexts", inNote <$> citation "Footcitetexts" NormalCitation True) , ("citetext", complexNatbibCitation NormalCitation) , ("citeauthor", (try (tok *> optional sp *> controlSeq "citetext") *> complexNatbibCitation AuthorInText) <|> citation "citeauthor" AuthorInText False) , ("nocite", mempty <$ (citation "nocite" NormalCitation False >>= addMeta "nocite")) ] ++ map ignoreInlines -- these commands will be ignored unless --parse-raw is specified, -- in which case they will appear as raw latex blocks: [ "index" ] mkImage :: [(String, String)] -> String -> LP Inlines mkImage options src = do let replaceTextwidth (k,v) = case numUnit v of Just (num, "\\textwidth") -> (k, showFl (num * 100) ++ "%") _ -> (k, v) let kvs = map replaceTextwidth $ filter (\(k,_) -> k `elem` ["width", "height"]) options let attr = ("",[], kvs) let alt = str "image" case takeExtension src of "" -> do defaultExt <- getOption readerDefaultImageExtension return $ imageWith attr (addExtension src defaultExt) "" alt _ -> return $ imageWith attr src "" alt inNote :: Inlines -> Inlines inNote ils = note $ para $ ils <> str "." unescapeURL :: String -> String unescapeURL ('\\':x:xs) | isEscapable x = x:unescapeURL xs where isEscapable c = c `elem` ("#$%&~_^\\{}" :: String) unescapeURL (x:xs) = x:unescapeURL xs unescapeURL [] = "" enquote :: LP Inlines enquote = do skipopts context <- stateQuoteContext <$> getState if context == InDoubleQuote then singleQuoted <$> withQuoteContext InSingleQuote tok else doubleQuoted <$> withQuoteContext InDoubleQuote tok doverb :: LP Inlines doverb = do marker <- anyChar code <$> manyTill (satisfy (/='\n')) (char marker) doLHSverb :: LP Inlines doLHSverb = codeWith ("",["haskell"],[]) <$> manyTill (satisfy (/='\n')) (char '|') lit :: String -> LP Inlines lit = pure . str accent :: (Char -> String) -> Inlines -> LP Inlines accent f ils = case toList ils of (Str (x:xs) : ys) -> return $ fromList (Str (f x ++ xs) : ys) [] -> mzero _ -> return ils grave :: Char -> String grave 'A' = "À" grave 'E' = "È" grave 'I' = "Ì" grave 'O' = "Ò" grave 'U' = "Ù" grave 'a' = "à" grave 'e' = "è" grave 'i' = "ì" grave 'o' = "ò" grave 'u' = "ù" grave c = [c] acute :: Char -> String acute 'A' = "Á" acute 'E' = "É" acute 'I' = "Í" acute 'O' = "Ó" acute 'U' = "Ú" acute 'Y' = "Ý" acute 'a' = "á" acute 'e' = "é" acute 'i' = "í" acute 'o' = "ó" acute 'u' = "ú" acute 'y' = "ý" acute 'C' = "Ć" acute 'c' = "ć" acute 'L' = "Ĺ" acute 'l' = "ĺ" acute 'N' = "Ń" acute 'n' = "ń" acute 'R' = "Ŕ" acute 'r' = "ŕ" acute 'S' = "Ś" acute 's' = "ś" acute 'Z' = "Ź" acute 'z' = "ź" acute c = [c] circ :: Char -> String circ 'A' = "Â" circ 'E' = "Ê" circ 'I' = "Î" circ 'O' = "Ô" circ 'U' = "Û" circ 'a' = "â" circ 'e' = "ê" circ 'i' = "î" circ 'o' = "ô" circ 'u' = "û" circ 'C' = "Ĉ" circ 'c' = "ĉ" circ 'G' = "Ĝ" circ 'g' = "ĝ" circ 'H' = "Ĥ" circ 'h' = "ĥ" circ 'J' = "Ĵ" circ 'j' = "ĵ" circ 'S' = "Ŝ" circ 's' = "ŝ" circ 'W' = "Ŵ" circ 'w' = "ŵ" circ 'Y' = "Ŷ" circ 'y' = "ŷ" circ c = [c] tilde :: Char -> String tilde 'A' = "Ã" tilde 'a' = "ã" tilde 'O' = "Õ" tilde 'o' = "õ" tilde 'I' = "Ĩ" tilde 'i' = "ĩ" tilde 'U' = "Ũ" tilde 'u' = "ũ" tilde 'N' = "Ñ" tilde 'n' = "ñ" tilde c = [c] umlaut :: Char -> String umlaut 'A' = "Ä" umlaut 'E' = "Ë" umlaut 'I' = "Ï" umlaut 'O' = "Ö" umlaut 'U' = "Ü" umlaut 'a' = "ä" umlaut 'e' = "ë" umlaut 'i' = "ï" umlaut 'o' = "ö" umlaut 'u' = "ü" umlaut c = [c] hungarumlaut :: Char -> String hungarumlaut 'A' = "A̋" hungarumlaut 'E' = "E̋" hungarumlaut 'I' = "I̋" hungarumlaut 'O' = "Ő" hungarumlaut 'U' = "Ű" hungarumlaut 'Y' = "ӳ" hungarumlaut 'a' = "a̋" hungarumlaut 'e' = "e̋" hungarumlaut 'i' = "i̋" hungarumlaut 'o' = "ő" hungarumlaut 'u' = "ű" hungarumlaut 'y' = "ӳ" hungarumlaut c = [c] dot :: Char -> String dot 'C' = "Ċ" dot 'c' = "ċ" dot 'E' = "Ė" dot 'e' = "ė" dot 'G' = "Ġ" dot 'g' = "ġ" dot 'I' = "İ" dot 'Z' = "Ż" dot 'z' = "ż" dot c = [c] macron :: Char -> String macron 'A' = "Ā" macron 'E' = "Ē" macron 'I' = "Ī" macron 'O' = "Ō" macron 'U' = "Ū" macron 'a' = "ā" macron 'e' = "ē" macron 'i' = "ī" macron 'o' = "ō" macron 'u' = "ū" macron c = [c] cedilla :: Char -> String cedilla 'c' = "ç" cedilla 'C' = "Ç" cedilla 's' = "ş" cedilla 'S' = "Ş" cedilla 't' = "ţ" cedilla 'T' = "Ţ" cedilla 'e' = "ȩ" cedilla 'E' = "Ȩ" cedilla 'h' = "ḩ" cedilla 'H' = "Ḩ" cedilla 'o' = "o̧" cedilla 'O' = "O̧" cedilla c = [c] hacek :: Char -> String hacek 'A' = "Ǎ" hacek 'a' = "ǎ" hacek 'C' = "Č" hacek 'c' = "č" hacek 'D' = "Ď" hacek 'd' = "ď" hacek 'E' = "Ě" hacek 'e' = "ě" hacek 'G' = "Ǧ" hacek 'g' = "ǧ" hacek 'H' = "Ȟ" hacek 'h' = "ȟ" hacek 'I' = "Ǐ" hacek 'i' = "ǐ" hacek 'j' = "ǰ" hacek 'K' = "Ǩ" hacek 'k' = "ǩ" hacek 'L' = "Ľ" hacek 'l' = "ľ" hacek 'N' = "Ň" hacek 'n' = "ň" hacek 'O' = "Ǒ" hacek 'o' = "ǒ" hacek 'R' = "Ř" hacek 'r' = "ř" hacek 'S' = "Š" hacek 's' = "š" hacek 'T' = "Ť" hacek 't' = "ť" hacek 'U' = "Ǔ" hacek 'u' = "ǔ" hacek 'Z' = "Ž" hacek 'z' = "ž" hacek c = [c] breve :: Char -> String breve 'A' = "Ă" breve 'a' = "ă" breve 'E' = "Ĕ" breve 'e' = "ĕ" breve 'G' = "Ğ" breve 'g' = "ğ" breve 'I' = "Ĭ" breve 'i' = "ĭ" breve 'O' = "Ŏ" breve 'o' = "ŏ" breve 'U' = "Ŭ" breve 'u' = "ŭ" breve c = [c] tok :: LP Inlines tok = try $ grouped inline <|> inlineCommand <|> str <$> count 1 inlineChar opt :: LP Inlines opt = bracketed inline rawopt :: LP String rawopt = do contents <- bracketed (many1 (noneOf "[]") <|> try (string "\\]") <|> try (string "\\[") <|> rawopt) optional sp return $ "[" ++ contents ++ "]" skipopts :: LP () skipopts = skipMany rawopt -- opts in angle brackets are used in beamer rawangle :: LP () rawangle = try $ do char '<' skipMany (noneOf ">") char '>' return () skipangles :: LP () skipangles = skipMany rawangle inlineText :: LP Inlines inlineText = str <$> many1 inlineChar inlineChar :: LP Char inlineChar = noneOf "\\$%&~#{}^'`\"‘’“”-[] \t\n" environment :: LP Blocks environment = do controlSeq "begin" name <- braced M.findWithDefault mzero name environments <|> rawEnv name inlineEnvironment :: LP Inlines inlineEnvironment = try $ do controlSeq "begin" name <- braced M.findWithDefault mzero name inlineEnvironments rawEnv :: String -> LP Blocks rawEnv name = do parseRaw <- getOption readerParseRaw rawOptions <- mconcat <$> many rawopt let addBegin x = "\\begin{" ++ name ++ "}" ++ rawOptions ++ x if parseRaw then (rawBlock "latex" . addBegin) <$> (withRaw (env name blocks) >>= applyMacros' . snd) else env name blocks ---- type IncludeParser = ParserT String [String] IO String -- | Replace "include" commands with file contents. handleIncludes :: String -> IO (Either PandocError String) handleIncludes s = mapLeft (ParsecError s) <$> runParserT includeParser' [] "input" s includeParser' :: IncludeParser includeParser' = concat <$> many (comment' <|> escaped' <|> blob' <|> include' <|> startMarker' <|> endMarker' <|> verbCmd' <|> verbatimEnv' <|> backslash') comment' :: IncludeParser comment' = do char '%' xs <- manyTill anyChar newline return ('%':xs ++ "\n") escaped' :: IncludeParser escaped' = try $ string "\\%" <|> string "\\\\" verbCmd' :: IncludeParser verbCmd' = fmap snd <$> withRaw $ try $ do string "\\verb" c <- anyChar manyTill anyChar (char c) verbatimEnv' :: IncludeParser verbatimEnv' = fmap snd <$> withRaw $ try $ do string "\\begin" name <- braced' guard $ name `elem` ["verbatim", "Verbatim", "BVerbatim", "lstlisting", "minted", "alltt", "comment"] manyTill anyChar (try $ string $ "\\end{" ++ name ++ "}") blob' :: IncludeParser blob' = try $ many1 (noneOf "\\%") backslash' :: IncludeParser backslash' = string "\\" braced' :: IncludeParser braced' = try $ char '{' *> manyTill (satisfy (/='}')) (char '}') maybeAddExtension :: String -> FilePath -> FilePath maybeAddExtension ext fp = if null (takeExtension fp) then addExtension fp ext else fp include' :: IncludeParser include' = do fs' <- try $ do char '\\' name <- try (string "include") <|> try (string "input") <|> string "usepackage" -- skip options skipMany $ try $ char '[' *> manyTill anyChar (char ']') fs <- (map trim . splitBy (==',')) <$> braced' return $ if name == "usepackage" then map (maybeAddExtension ".sty") fs else map (maybeAddExtension ".tex") fs pos <- getPosition containers <- getState let fn = case containers of (f':_) -> f' [] -> "input" -- now process each include file in order... rest <- getInput results' <- forM fs' (\f -> do when (f `elem` containers) $ fail "Include file loop!" contents <- lift $ readTeXFile f return $ "\\PandocStartInclude{" ++ f ++ "}" ++ contents ++ "\\PandocEndInclude{" ++ fn ++ "}{" ++ show (sourceLine pos) ++ "}{" ++ show (sourceColumn pos) ++ "}") setInput $ concat results' ++ rest return "" startMarker' :: IncludeParser startMarker' = try $ do string "\\PandocStartInclude" fn <- braced' updateState (fn:) setPosition $ newPos fn 1 1 return $ "\\PandocStartInclude{" ++ fn ++ "}" endMarker' :: IncludeParser endMarker' = try $ do string "\\PandocEndInclude" fn <- braced' ln <- braced' co <- braced' updateState tail setPosition $ newPos fn (fromMaybe 1 $ safeRead ln) (fromMaybe 1 $ safeRead co) return $ "\\PandocEndInclude{" ++ fn ++ "}{" ++ ln ++ "}{" ++ co ++ "}" readTeXFile :: FilePath -> IO String readTeXFile f = do texinputs <- E.catch (getEnv "TEXINPUTS") $ \(_ :: E.SomeException) -> return "." let ds = splitBy (==':') texinputs readFileFromDirs ds f readFileFromDirs :: [FilePath] -> FilePath -> IO String readFileFromDirs [] _ = return "" readFileFromDirs (d:ds) f = E.catch (UTF8.readFile $ d f) $ \(_ :: E.SomeException) -> readFileFromDirs ds f ---- keyval :: LP (String, String) keyval = try $ do key <- many1 alphaNum val <- option "" $ char '=' >> many1 (alphaNum <|> char '.' <|> char '\\') skipMany spaceChar optional (char ',') skipMany spaceChar return (key, val) keyvals :: LP [(String, String)] keyvals = try $ char '[' *> manyTill keyval (char ']') alltt :: String -> LP Blocks alltt t = walk strToCode <$> parseFromString blocks (substitute " " "\\ " $ substitute "%" "\\%" $ intercalate "\\\\\n" $ lines t) where strToCode (Str s) = Code nullAttr s strToCode x = x rawLaTeXBlock :: LP String rawLaTeXBlock = snd <$> try (withRaw (environment <|> blockCommand)) rawLaTeXInline :: LP Inline rawLaTeXInline = do raw <- (snd <$> withRaw inlineCommand) <|> (snd <$> withRaw blockCommand) RawInline "latex" <$> applyMacros' raw addImageCaption :: Blocks -> LP Blocks addImageCaption = walkM go where go (Image attr alt (src,tit)) = do mbcapt <- stateCaption <$> getState return $ case mbcapt of Just ils -> Image attr (toList ils) (src, "fig:") Nothing -> Image attr alt (src,tit) go x = return x addTableCaption :: Blocks -> LP Blocks addTableCaption = walkM go where go (Table c als ws hs rs) = do mbcapt <- stateCaption <$> getState return $ case mbcapt of Just ils -> Table (toList ils) als ws hs rs Nothing -> Table c als ws hs rs go x = return x environments :: M.Map String (LP Blocks) environments = M.fromList [ ("document", env "document" blocks <* skipMany anyChar) , ("abstract", mempty <$ (env "abstract" blocks >>= addMeta "abstract")) , ("letter", env "letter" letterContents) , ("minipage", env "minipage" $ skipopts *> spaces' *> optional braced *> spaces' *> blocks) , ("figure", env "figure" $ resetCaption *> skipopts *> blocks >>= addImageCaption) , ("center", env "center" blocks) , ("longtable", env "longtable" $ resetCaption *> simpTable False >>= addTableCaption) , ("table", env "table" $ resetCaption *> skipopts *> blocks >>= addTableCaption) , ("tabular*", env "tabular" $ simpTable True) , ("tabular", env "tabular" $ simpTable False) , ("quote", blockQuote <$> env "quote" blocks) , ("quotation", blockQuote <$> env "quotation" blocks) , ("verse", blockQuote <$> env "verse" blocks) , ("itemize", bulletList <$> listenv "itemize" (many item)) , ("description", definitionList <$> listenv "description" (many descItem)) , ("enumerate", orderedList') , ("alltt", alltt =<< verbEnv "alltt") , ("code", guardEnabled Ext_literate_haskell *> (codeBlockWith ("",["sourceCode","literate","haskell"],[]) <$> verbEnv "code")) , ("comment", mempty <$ verbEnv "comment") , ("verbatim", codeBlock <$> verbEnv "verbatim") , ("Verbatim", fancyverbEnv "Verbatim") , ("BVerbatim", fancyverbEnv "BVerbatim") , ("lstlisting", do options <- option [] keyvals let kvs = [ (if k == "firstnumber" then "startFrom" else k, v) | (k,v) <- options ] let classes = [ "numberLines" | lookup "numbers" options == Just "left" ] ++ maybeToList (lookup "language" options >>= fromListingsLanguage) let attr = (fromMaybe "" (lookup "label" options),classes,kvs) codeBlockWith attr <$> verbEnv "lstlisting") , ("minted", do options <- option [] keyvals lang <- grouped (many1 $ satisfy (/='}')) let kvs = [ (if k == "firstnumber" then "startFrom" else k, v) | (k,v) <- options ] let classes = [ lang | not (null lang) ] ++ [ "numberLines" | lookup "linenos" options == Just "true" ] let attr = ("",classes,kvs) codeBlockWith attr <$> verbEnv "minted") , ("obeylines", parseFromString (para . trimInlines . mconcat <$> many inline) =<< intercalate "\\\\\n" . lines <$> verbEnv "obeylines") , ("displaymath", mathEnv para Nothing "displaymath") , ("equation", mathEnv para Nothing "equation") , ("equation*", mathEnv para Nothing "equation*") , ("gather", mathEnv para (Just "gathered") "gather") , ("gather*", mathEnv para (Just "gathered") "gather*") , ("multline", mathEnv para (Just "gathered") "multline") , ("multline*", mathEnv para (Just "gathered") "multline*") , ("eqnarray", mathEnv para (Just "aligned") "eqnarray") , ("eqnarray*", mathEnv para (Just "aligned") "eqnarray*") , ("align", mathEnv para (Just "aligned") "align") , ("align*", mathEnv para (Just "aligned") "align*") , ("alignat", mathEnv para (Just "aligned") "alignat") , ("alignat*", mathEnv para (Just "aligned") "alignat*") ] letterContents :: LP Blocks letterContents = do bs <- blocks st <- getState -- add signature (author) and address (title) let addr = case lookupMeta "address" (stateMeta st) of Just (MetaBlocks [Plain xs]) -> para $ trimInlines $ fromList xs _ -> mempty return $ addr <> bs -- sig added by \closing closing :: LP Blocks closing = do contents <- tok st <- getState let extractInlines (MetaBlocks [Plain ys]) = ys extractInlines (MetaBlocks [Para ys ]) = ys extractInlines _ = [] let sigs = case lookupMeta "author" (stateMeta st) of Just (MetaList xs) -> para $ trimInlines $ fromList $ intercalate [LineBreak] $ map extractInlines xs _ -> mempty return $ para (trimInlines contents) <> sigs item :: LP Blocks item = blocks *> controlSeq "item" *> skipopts *> blocks looseItem :: LP Blocks looseItem = do ctx <- stateParserContext `fmap` getState if ctx == ListItemState then mzero else return mempty descItem :: LP (Inlines, [Blocks]) descItem = do blocks -- skip blocks before item controlSeq "item" optional sp ils <- opt bs <- blocks return (ils, [bs]) env :: String -> LP a -> LP a env name p = p <* (try (controlSeq "end" *> braced >>= guard . (== name)) ("\\end{" ++ name ++ "}")) listenv :: String -> LP a -> LP a listenv name p = try $ do oldCtx <- stateParserContext `fmap` getState updateState $ \st -> st{ stateParserContext = ListItemState } res <- env name p updateState $ \st -> st{ stateParserContext = oldCtx } return res mathEnv :: (Inlines -> a) -> Maybe String -> String -> LP a mathEnv f innerEnv name = f <$> mathDisplay (inner <$> verbEnv name) where inner x = case innerEnv of Nothing -> x Just y -> "\\begin{" ++ y ++ "}\n" ++ x ++ "\\end{" ++ y ++ "}" verbEnv :: String -> LP String verbEnv name = do skipopts optional blankline let endEnv = try $ controlSeq "end" *> braced >>= guard . (== name) res <- manyTill anyChar endEnv return $ stripTrailingNewlines res fancyverbEnv :: String -> LP Blocks fancyverbEnv name = do options <- option [] keyvals let kvs = [ (if k == "firstnumber" then "startFrom" else k, v) | (k,v) <- options ] let classes = [ "numberLines" | lookup "numbers" options == Just "left" ] let attr = ("",classes,kvs) codeBlockWith attr <$> verbEnv name orderedList' :: LP Blocks orderedList' = do optional sp (_, style, delim) <- option (1, DefaultStyle, DefaultDelim) $ try $ char '[' *> anyOrderedListMarker <* char ']' spaces optional $ try $ controlSeq "setlength" *> grouped (controlSeq "itemindent") *> braced spaces start <- option 1 $ try $ do controlSeq "setcounter" grouped (string "enum" *> many1 (oneOf "iv")) optional sp num <- grouped (many1 digit) spaces return (read num + 1 :: Int) bs <- listenv "enumerate" (many item) return $ orderedListWith (start, style, delim) bs paragraph :: LP Blocks paragraph = do x <- trimInlines . mconcat <$> many1 inline if x == mempty then return mempty else return $ para x preamble :: LP Blocks preamble = mempty <$> manyTill preambleBlock beginDoc where beginDoc = lookAhead $ try $ controlSeq "begin" *> string "{document}" preambleBlock = void comment <|> void sp <|> void blanklines <|> void macro <|> void blockCommand <|> void anyControlSeq <|> void braced <|> void anyChar ------- -- citations addPrefix :: [Inline] -> [Citation] -> [Citation] addPrefix p (k:ks) = k {citationPrefix = p ++ citationPrefix k} : ks addPrefix _ _ = [] addSuffix :: [Inline] -> [Citation] -> [Citation] addSuffix s ks@(_:_) = let k = last ks in init ks ++ [k {citationSuffix = citationSuffix k ++ s}] addSuffix _ _ = [] simpleCiteArgs :: LP [Citation] simpleCiteArgs = try $ do first <- optionMaybe $ toList <$> opt second <- optionMaybe $ toList <$> opt char '{' optional sp keys <- manyTill citationLabel (char '}') let (pre, suf) = case (first , second ) of (Just s , Nothing) -> (mempty, s ) (Just s , Just t ) -> (s , t ) _ -> (mempty, mempty) conv k = Citation { citationId = k , citationPrefix = [] , citationSuffix = [] , citationMode = NormalCitation , citationHash = 0 , citationNoteNum = 0 } return $ addPrefix pre $ addSuffix suf $ map conv keys citationLabel :: LP String citationLabel = optional sp *> (many1 (satisfy isBibtexKeyChar) <* optional sp <* optional (char ',') <* optional sp) where isBibtexKeyChar c = isAlphaNum c || c `elem` (".:;?!`'()/*@_+=-[]" :: String) cites :: CitationMode -> Bool -> LP [Citation] cites mode multi = try $ do cits <- if multi then many1 simpleCiteArgs else count 1 simpleCiteArgs let cs = concat cits return $ case mode of AuthorInText -> case cs of (c:rest) -> c {citationMode = mode} : rest [] -> [] _ -> map (\a -> a {citationMode = mode}) cs citation :: String -> CitationMode -> Bool -> LP Inlines citation name mode multi = do (c,raw) <- withRaw $ cites mode multi return $ cite c (rawInline "latex" $ "\\" ++ name ++ raw) complexNatbibCitation :: CitationMode -> LP Inlines complexNatbibCitation mode = try $ do let ils = (toList . trimInlines . mconcat) <$> many (notFollowedBy (oneOf "\\};") >> inline) let parseOne = try $ do skipSpaces pref <- ils cit' <- inline -- expect a citation let citlist = toList cit' cits' <- case citlist of [Cite cs _] -> return cs _ -> mzero suff <- ils skipSpaces optional $ char ';' return $ addPrefix pref $ addSuffix suff cits' (c:cits, raw) <- withRaw $ grouped parseOne return $ cite (c{ citationMode = mode }:cits) (rawInline "latex" $ "\\citetext" ++ raw) -- tables parseAligns :: LP [Alignment] parseAligns = try $ do char '{' let maybeBar = skipMany $ sp <|> () <$ char '|' <|> () <$ (char '@' >> braced) maybeBar let cAlign = AlignCenter <$ char 'c' let lAlign = AlignLeft <$ char 'l' let rAlign = AlignRight <$ char 'r' let parAlign = AlignLeft <$ (char 'p' >> braced) let alignChar = cAlign <|> lAlign <|> rAlign <|> parAlign aligns' <- sepEndBy alignChar maybeBar spaces char '}' spaces return aligns' hline :: LP () hline = try $ do spaces' controlSeq "hline" <|> -- booktabs rules: controlSeq "toprule" <|> controlSeq "bottomrule" <|> controlSeq "midrule" <|> controlSeq "endhead" <|> controlSeq "endfirsthead" spaces' optional $ bracketed (many1 (satisfy (/=']'))) return () lbreak :: LP () lbreak = () <$ try (spaces' *> (controlSeq "\\" <|> controlSeq "tabularnewline") <* spaces') amp :: LP () amp = () <$ try (spaces' *> char '&' <* spaces') parseTableRow :: Int -- ^ number of columns -> LP [Blocks] parseTableRow cols = try $ do let tableCellInline = notFollowedBy (amp <|> lbreak) >> inline let minipage = try $ controlSeq "begin" *> string "{minipage}" *> env "minipage" (skipopts *> spaces' *> optional braced *> spaces' *> blocks) let tableCell = minipage <|> ((plain . trimInlines . mconcat) <$> many tableCellInline) cells' <- sepBy1 tableCell amp let numcells = length cells' guard $ numcells <= cols && numcells >= 1 guard $ cells' /= [mempty] -- note: a & b in a three-column table leaves an empty 3rd cell: let cells'' = cells' ++ replicate (cols - numcells) mempty spaces' return cells'' spaces' :: LP () spaces' = spaces *> skipMany (comment *> spaces) simpTable :: Bool -> LP Blocks simpTable hasWidthParameter = try $ do when hasWidthParameter $ () <$ (spaces' >> tok) skipopts aligns <- parseAligns let cols = length aligns optional $ controlSeq "caption" *> skipopts *> setCaption optional lbreak spaces' skipMany hline spaces' header' <- option [] $ try (parseTableRow cols <* lbreak <* many1 hline) spaces' rows <- sepEndBy (parseTableRow cols) (lbreak <* optional (skipMany hline)) spaces' optional $ controlSeq "caption" *> skipopts *> setCaption optional lbreak spaces' let header'' = if null header' then replicate cols mempty else header' lookAhead $ controlSeq "end" -- make sure we're at end return $ table mempty (zip aligns (repeat 0)) header'' rows startInclude :: LP Blocks startInclude = do fn <- braced setPosition $ newPos fn 1 1 return mempty endInclude :: LP Blocks endInclude = do fn <- braced ln <- braced co <- braced setPosition $ newPos fn (fromMaybe 1 $ safeRead ln) (fromMaybe 1 $ safeRead co) return mempty removeDoubleQuotes :: String -> String removeDoubleQuotes ('"':xs) = case reverse xs of '"':ys -> reverse ys _ -> '"':xs removeDoubleQuotes xs = xs pandoc-1.19.2.4/src/Text/Pandoc/Readers/Markdown.hs0000644000000000000000000022620613155240142020027 0ustar0000000000000000{-# LANGUAGE RelaxedPolyRec #-} -- needed for inlinesBetween on GHC < 7 {-# LANGUAGE ScopedTypeVariables #-} {- Copyright (C) 2006-2015 John MacFarlane 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.Readers.Markdown Copyright : Copyright (C) 2006-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of markdown-formatted plain text to 'Pandoc' document. -} module Text.Pandoc.Readers.Markdown ( readMarkdown, readMarkdownWithWarnings ) where import Data.List ( transpose, sortBy, findIndex, intercalate ) import qualified Data.Map as M import Data.Scientific (coefficient, base10Exponent) import Data.Ord ( comparing ) import Data.Char ( isSpace, isAlphaNum, toLower, isPunctuation ) import Data.Maybe import Text.Pandoc.Definition import Text.Pandoc.Emoji (emojis) import Text.Pandoc.Generic (bottomUp) import qualified Data.Text as T import Data.Text (Text) import qualified Data.Yaml as Yaml import Data.Yaml (ParseException(..), YamlException(..), YamlMark(..)) 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.Options import Text.Pandoc.Shared import Text.Pandoc.Pretty (charWidth) import Text.Pandoc.XML (fromEntities) 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 Control.Monad import System.FilePath (takeExtension, addExtension) import Text.HTML.TagSoup import qualified Data.Set as Set import Text.Printf (printf) import Debug.Trace (trace) import Data.Monoid ((<>)) import Text.Pandoc.Error type MarkdownParser = Parser [Char] ParserState -- | Read markdown from an input string and return a Pandoc document. readMarkdown :: ReaderOptions -- ^ Reader options -> String -- ^ String to parse (assuming @'\n'@ line endings) -> Either PandocError Pandoc readMarkdown opts s = (readWith parseMarkdown) def{ stateOptions = opts } (s ++ "\n\n") -- | Read markdown from an input string and return a pair of a Pandoc document -- and a list of warnings. readMarkdownWithWarnings :: ReaderOptions -- ^ Reader options -> String -- ^ String to parse (assuming @'\n'@ line endings) -> Either PandocError (Pandoc, [String]) readMarkdownWithWarnings opts s = (readWithWarnings parseMarkdown) def{ stateOptions = opts } (s ++ "\n\n") trimInlinesF :: F Inlines -> F Inlines trimInlinesF = liftM trimInlines -- -- Constants and data structure definitions -- isBulletListMarker :: Char -> Bool isBulletListMarker '*' = True isBulletListMarker '+' = True isBulletListMarker '-' = True isBulletListMarker _ = False isHruleChar :: Char -> Bool isHruleChar '*' = True isHruleChar '-' = True isHruleChar '_' = True isHruleChar _ = False setextHChars :: String setextHChars = "=-" isBlank :: Char -> Bool isBlank ' ' = True isBlank '\t' = True isBlank '\n' = True isBlank _ = False -- -- auxiliary functions -- -- | Succeeds when we're in list context. inList :: MarkdownParser () inList = do ctx <- stateParserContext <$> getState guard (ctx == ListItemState) spnl :: Parser [Char] st () spnl = try $ do skipSpaces optional newline skipSpaces notFollowedBy (char '\n') indentSpaces :: MarkdownParser String indentSpaces = try $ do tabStop <- getOption readerTabStop count tabStop (char ' ') <|> string "\t" "indentation" nonindentSpaces :: MarkdownParser String nonindentSpaces = do tabStop <- getOption readerTabStop sps <- many (char ' ') if length sps < tabStop then return sps else unexpected "indented line" -- returns number of spaces parsed skipNonindentSpaces :: MarkdownParser Int skipNonindentSpaces = do tabStop <- getOption readerTabStop atMostSpaces (tabStop - 1) <* notFollowedBy (char ' ') atMostSpaces :: Int -> MarkdownParser Int atMostSpaces n | n > 0 = (char ' ' >> (+1) <$> atMostSpaces (n-1)) <|> return 0 | otherwise = return 0 litChar :: MarkdownParser Char litChar = escapedChar' <|> characterReference <|> noneOf "\n" <|> try (newline >> notFollowedBy blankline >> return ' ') -- | Parse a sequence of inline elements between square brackets, -- including inlines between balanced pairs of square brackets. inlinesInBalancedBrackets :: MarkdownParser (F Inlines) inlinesInBalancedBrackets = do char '[' (_, raw) <- withRaw $ charsInBalancedBrackets 1 guard $ not $ null raw parseFromString (trimInlinesF . mconcat <$> many inline) (init raw) charsInBalancedBrackets :: Int -> MarkdownParser () charsInBalancedBrackets 0 = return () charsInBalancedBrackets openBrackets = (char '[' >> charsInBalancedBrackets (openBrackets + 1)) <|> (char ']' >> charsInBalancedBrackets (openBrackets - 1)) <|> (( (() <$ code) <|> (() <$ (escapedChar')) <|> (newline >> notFollowedBy blankline) <|> skipMany1 (noneOf "[]`\n\\") <|> (() <$ count 1 (oneOf "`\\")) ) >> charsInBalancedBrackets openBrackets) -- -- document structure -- rawTitleBlockLine :: MarkdownParser String rawTitleBlockLine = do char '%' skipSpaces first <- anyLine rest <- many $ try $ do spaceChar notFollowedBy blankline skipSpaces anyLine return $ trim $ unlines (first:rest) titleLine :: MarkdownParser (F Inlines) titleLine = try $ do raw <- rawTitleBlockLine res <- parseFromString (many inline) raw return $ trimInlinesF $ mconcat res authorsLine :: MarkdownParser (F [Inlines]) authorsLine = try $ do raw <- rawTitleBlockLine let sep = (char ';' <* spaces) <|> newline let pAuthors = sepEndBy (trimInlinesF . mconcat <$> many (try $ notFollowedBy sep >> inline)) sep sequence <$> parseFromString pAuthors raw dateLine :: MarkdownParser (F Inlines) dateLine = try $ do raw <- rawTitleBlockLine res <- parseFromString (many inline) raw return $ trimInlinesF $ mconcat res titleBlock :: MarkdownParser () titleBlock = pandocTitleBlock <|> mmdTitleBlock pandocTitleBlock :: MarkdownParser () pandocTitleBlock = try $ do guardEnabled Ext_pandoc_title_block lookAhead (char '%') title <- option mempty titleLine author <- option (return []) authorsLine date <- option mempty dateLine optional blanklines let meta' = do title' <- title author' <- author date' <- date return $ (if B.isNull title' then id else B.setMeta "title" title') . (if null author' then id else B.setMeta "author" author') . (if B.isNull date' then id else B.setMeta "date" date') $ nullMeta updateState $ \st -> st{ stateMeta' = stateMeta' st <> meta' } yamlMetaBlock :: MarkdownParser (F Blocks) yamlMetaBlock = try $ do guardEnabled Ext_yaml_metadata_block pos <- getPosition string "---" blankline notFollowedBy blankline -- if --- is followed by a blank it's an HRULE rawYamlLines <- manyTill anyLine stopLine -- by including --- and ..., we allow yaml blocks with just comments: let rawYaml = unlines ("---" : (rawYamlLines ++ ["..."])) optional blanklines opts <- stateOptions <$> getState meta' <- case Yaml.decodeEither' $ UTF8.fromString rawYaml of Right (Yaml.Object hashmap) -> return $ return $ H.foldrWithKey (\k v m -> if ignorable k then m else case yamlToMeta opts v of Left _ -> m Right v' -> B.setMeta (T.unpack k) v' m) nullMeta hashmap Right Yaml.Null -> return $ return nullMeta Right _ -> do addWarning (Just pos) "YAML header is not an object" return $ return nullMeta Left err' -> do case err' of InvalidYaml (Just YamlParseException{ yamlProblem = problem , yamlContext = _ctxt , yamlProblemMark = Yaml.YamlMark { yamlLine = yline , yamlColumn = ycol }}) -> addWarning (Just $ setSourceLine (setSourceColumn pos (sourceColumn pos + ycol)) (sourceLine pos + 1 + yline)) $ "Could not parse YAML header: " ++ problem _ -> addWarning (Just pos) $ "Could not parse YAML header: " ++ show err' return $ return nullMeta updateState $ \st -> st{ stateMeta' = stateMeta' st <> meta' } return mempty -- ignore fields ending with _ ignorable :: Text -> Bool ignorable t = (T.pack "_") `T.isSuffixOf` t toMetaValue :: ReaderOptions -> Text -> Either PandocError MetaValue toMetaValue opts x = toMeta <$> readMarkdown opts' (T.unpack x) where toMeta p = case p of Pandoc _ [Plain xs] -> MetaInlines xs Pandoc _ [Para xs] | endsWithNewline x -> MetaBlocks [Para xs] | otherwise -> MetaInlines xs Pandoc _ bs -> MetaBlocks bs endsWithNewline t = T.pack "\n" `T.isSuffixOf` t opts' = opts{readerExtensions=readerExtensions opts `Set.difference` meta_exts} meta_exts = Set.fromList [ Ext_pandoc_title_block , Ext_mmd_title_block , Ext_yaml_metadata_block ] yamlToMeta :: ReaderOptions -> Yaml.Value -> Either PandocError MetaValue yamlToMeta opts (Yaml.String t) = toMetaValue opts t yamlToMeta _ (Yaml.Number n) -- avoid decimal points for numbers that don't need them: | base10Exponent n >= 0 = return $ MetaString $ show $ coefficient n * (10 ^ base10Exponent n) | otherwise = return $ MetaString $ show n yamlToMeta _ (Yaml.Bool b) = return $ MetaBool b yamlToMeta opts (Yaml.Array xs) = B.toMetaValue <$> mapM (yamlToMeta opts) (V.toList xs) yamlToMeta opts (Yaml.Object o) = MetaMap <$> H.foldrWithKey (\k v m -> if ignorable k then m else (do v' <- yamlToMeta opts v m' <- m return (M.insert (T.unpack k) v' m'))) (return M.empty) o yamlToMeta _ _ = return $ MetaString "" stopLine :: MarkdownParser () stopLine = try $ (string "---" <|> string "...") >> blankline >> return () mmdTitleBlock :: MarkdownParser () mmdTitleBlock = try $ do guardEnabled Ext_mmd_title_block firstPair <- kvPair False restPairs <- many (kvPair True) let kvPairs = firstPair : restPairs blanklines updateState $ \st -> st{ stateMeta' = stateMeta' st <> return (Meta $ M.fromList kvPairs) } kvPair :: Bool -> MarkdownParser (String, MetaValue) kvPair allowEmpty = try $ do key <- many1Till (alphaNum <|> oneOf "_- ") (char ':') val <- trim <$> manyTill anyChar (try $ newline >> lookAhead (blankline <|> nonspaceChar)) guard $ allowEmpty || not (null val) let key' = concat $ words $ map toLower key let val' = MetaBlocks $ B.toList $ B.plain $ B.text $ val return (key',val') parseMarkdown :: MarkdownParser Pandoc parseMarkdown = do -- markdown allows raw HTML updateState $ \state -> state { stateOptions = let oldOpts = stateOptions state in oldOpts{ readerParseRaw = True } } optional titleBlock blocks <- parseBlocks st <- getState let meta = runF (stateMeta' st) st let Pandoc _ bs = B.doc $ runF blocks st eastAsianLineBreaks <- option False $ True <$ guardEnabled Ext_east_asian_line_breaks return $ (if eastAsianLineBreaks then bottomUp softBreakFilter else id) $ Pandoc meta bs softBreakFilter :: [Inline] -> [Inline] softBreakFilter (x:SoftBreak:y:zs) = case (stringify x, stringify y) of (xs@(_:_), (c:_)) | charWidth (last xs) == 2 && charWidth c == 2 -> x:y:zs _ -> x:SoftBreak:y:zs softBreakFilter xs = xs referenceKey :: MarkdownParser (F Blocks) referenceKey = try $ do pos <- getPosition skipNonindentSpaces (_,raw) <- reference char ':' skipSpaces >> optional newline >> skipSpaces >> notFollowedBy (char '[') let sourceURL = liftM unwords $ many $ try $ do skipMany spaceChar notFollowedBy' referenceTitle notFollowedBy' $ guardEnabled Ext_link_attributes >> attributes notFollowedBy' (() <$ reference) many1 $ notFollowedBy space >> litChar let betweenAngles = try $ char '<' >> manyTill litChar (char '>') src <- try betweenAngles <|> sourceURL tit <- option "" referenceTitle attr <- option nullAttr $ try $ guardEnabled Ext_link_attributes >> skipSpaces >> attributes addKvs <- option [] $ guardEnabled Ext_mmd_link_attributes >> many (try $ spnl >> keyValAttr) blanklines let attr' = extractIdClass $ foldl (\x f -> f x) attr addKvs target = (escapeURI $ trimr src, tit) st <- getState let oldkeys = stateKeys st let key = toKey raw case M.lookup key oldkeys of Just _ -> addWarning (Just pos) $ "Duplicate link reference `" ++ raw ++ "'" Nothing -> return () updateState $ \s -> s { stateKeys = M.insert key (target, attr') oldkeys } return $ return mempty referenceTitle :: MarkdownParser String referenceTitle = try $ do skipSpaces >> optional newline >> skipSpaces quotedTitle '"' <|> quotedTitle '\'' <|> charsInBalanced '(' ')' litChar -- A link title in quotes quotedTitle :: Char -> MarkdownParser String quotedTitle c = try $ do char c notFollowedBy spaces let pEnder = try $ char c >> notFollowedBy (satisfy isAlphaNum) let regChunk = many1 (noneOf ['\\','\n','&',c]) <|> count 1 litChar let nestedChunk = (\x -> [c] ++ x ++ [c]) <$> quotedTitle c unwords . words . concat <$> manyTill (nestedChunk <|> regChunk) pEnder -- | PHP Markdown Extra style abbreviation key. Currently -- we just skip them, since Pandoc doesn't have an element for -- an abbreviation. abbrevKey :: MarkdownParser (F Blocks) abbrevKey = do guardEnabled Ext_abbreviations try $ do char '*' reference char ':' skipMany (satisfy (/= '\n')) blanklines return $ return mempty noteMarker :: MarkdownParser String noteMarker = string "[^" >> many1Till (satisfy $ not . isBlank) (char ']') rawLine :: MarkdownParser String rawLine = try $ do notFollowedBy blankline notFollowedBy' $ try $ skipNonindentSpaces >> noteMarker optional indentSpaces anyLine rawLines :: MarkdownParser String rawLines = do first <- anyLine rest <- many rawLine return $ unlines (first:rest) noteBlock :: MarkdownParser (F Blocks) noteBlock = try $ do pos <- getPosition skipNonindentSpaces ref <- noteMarker char ':' optional blankline optional indentSpaces first <- rawLines rest <- many $ try $ blanklines >> indentSpaces >> rawLines let raw = unlines (first:rest) ++ "\n" optional blanklines parsed <- parseFromString parseBlocks raw let newnote = (ref, parsed) oldnotes <- stateNotes' <$> getState case lookup ref oldnotes of Just _ -> addWarning (Just pos) $ "Duplicate note reference `" ++ ref ++ "'" Nothing -> return () updateState $ \s -> s { stateNotes' = newnote : oldnotes } return mempty -- -- parsing blocks -- parseBlocks :: MarkdownParser (F Blocks) parseBlocks = mconcat <$> manyTill block eof block :: MarkdownParser (F Blocks) block = do tr <- getOption readerTrace pos <- getPosition res <- choice [ mempty <$ blanklines , codeBlockFenced , yamlMetaBlock -- note: bulletList needs to be before header because of -- the possibility of empty list items: - , bulletList , header , lhsCodeBlock , divHtml , htmlBlock , table , codeBlockIndented , guardEnabled Ext_latex_macros *> (macro >>= return . return) , rawTeXBlock , lineBlock , blockQuote , hrule , orderedList , definitionList , noteBlock , referenceKey , abbrevKey , para , plain ] "block" when tr $ do st <- getState trace (printf "line %d: %s" (sourceLine pos) (take 60 $ show $ B.toList $ runF res st)) (return ()) return res -- -- header blocks -- 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 <- atxChar >>= many1 . char >>= return . length notFollowedBy $ guardEnabled Ext_fancy_lists >> (char '.' <|> char ')') -- this would be a list skipSpaces (text, raw) <- withRaw $ trimInlinesF . mconcat <$> many (notFollowedBy atxClosing >> inline) attr <- atxClosing attr' <- registerHeader attr (runF text defaultParserState) guardDisabled Ext_implicit_header_references <|> registerImplicitHeader raw attr' return $ B.headerWith attr' level <$> text atxClosing :: MarkdownParser Attr atxClosing = try $ do attr' <- option nullAttr (guardEnabled Ext_mmd_header_identifiers >> mmdHeaderIdentifier) skipMany . char =<< atxChar skipSpaces attr <- option attr' (guardEnabled Ext_header_attributes >> attributes) blanklines return attr setextHeaderEnd :: MarkdownParser Attr setextHeaderEnd = try $ do attr <- option nullAttr $ (guardEnabled Ext_mmd_header_identifiers >> mmdHeaderIdentifier) <|> (guardEnabled Ext_header_attributes >> attributes) blanklines return attr mmdHeaderIdentifier :: MarkdownParser Attr mmdHeaderIdentifier = do ident <- stripFirstAndLast . snd <$> reference skipSpaces return (ident,[],[]) setextHeader :: MarkdownParser (F Blocks) setextHeader = try $ do -- This lookahead prevents us from wasting time parsing Inlines -- unless necessary -- it gives a significant performance boost. lookAhead $ anyLine >> many1 (oneOf setextHChars) >> blankline skipSpaces (text, raw) <- withRaw $ trimInlinesF . mconcat <$> many1 (notFollowedBy setextHeaderEnd >> inline) attr <- setextHeaderEnd underlineChar <- oneOf setextHChars many (char underlineChar) blanklines let level = (fromMaybe 0 $ findIndex (== underlineChar) setextHChars) + 1 attr' <- registerHeader attr (runF text defaultParserState) guardDisabled Ext_implicit_header_references <|> registerImplicitHeader raw attr' return $ B.headerWith attr' level <$> text registerImplicitHeader :: String -> Attr -> MarkdownParser () registerImplicitHeader raw attr@(ident, _, _) = do let key = toKey $ "[" ++ raw ++ "]" updateState (\s -> s { stateHeaderKeys = M.insert key (('#':ident,""), attr) (stateHeaderKeys s) }) -- -- hrule block -- hrule :: Parser [Char] st (F Blocks) hrule = try $ do skipSpaces start <- satisfy isHruleChar count 2 (skipSpaces >> char start) skipMany (spaceChar <|> char start) newline optional blanklines return $ return B.horizontalRule -- -- code blocks -- indentedLine :: MarkdownParser String indentedLine = indentSpaces >> anyLine >>= return . (++ "\n") blockDelimiter :: (Char -> Bool) -> Maybe Int -> Parser [Char] st Int blockDelimiter f len = try $ do c <- lookAhead (satisfy f) case len of Just l -> count l (char c) >> many (char c) >> return l Nothing -> count 3 (char c) >> many (char c) >>= return . (+ 3) . length attributes :: MarkdownParser Attr attributes = try $ do char '{' spnl attrs <- many (attribute <* spnl) char '}' return $ foldl (\x f -> f x) nullAttr attrs attribute :: MarkdownParser (Attr -> Attr) attribute = identifierAttr <|> classAttr <|> keyValAttr <|> specialAttr identifier :: MarkdownParser String identifier = do first <- letter rest <- many $ alphaNum <|> oneOf "-_:." return (first:rest) identifierAttr :: MarkdownParser (Attr -> Attr) identifierAttr = try $ do char '#' result <- identifier return $ \(_,cs,kvs) -> (result,cs,kvs) classAttr :: MarkdownParser (Attr -> Attr) classAttr = try $ do char '.' result <- identifier return $ \(id',cs,kvs) -> (id',cs ++ [result],kvs) keyValAttr :: MarkdownParser (Attr -> Attr) keyValAttr = try $ do key <- identifier char '=' val <- enclosed (char '"') (char '"') litChar <|> enclosed (char '\'') (char '\'') litChar <|> many (escapedChar' <|> noneOf " \t\n\r}") 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 char '-' return $ \(id',cs,kvs) -> (id',cs ++ ["unnumbered"],kvs) codeBlockFenced :: MarkdownParser (F Blocks) codeBlockFenced = try $ do c <- try (guardEnabled Ext_fenced_code_blocks >> lookAhead (char '~')) <|> (guardEnabled Ext_backtick_code_blocks >> lookAhead (char '`')) size <- blockDelimiter (== c) Nothing skipMany spaceChar attr <- option ([],[],[]) $ try (guardEnabled Ext_fenced_code_attributes >> attributes) <|> ((\x -> ("",[toLanguageId x],[])) <$> many1 nonspaceChar) blankline contents <- manyTill anyLine (blockDelimiter (== c) (Just size)) blanklines return $ return $ B.codeBlockWith attr $ intercalate "\n" contents -- correctly handle github language identifiers toLanguageId :: String -> String toLanguageId = map toLower . go where go "c++" = "cpp" go "objective-c" = "objectivec" go x = x codeBlockIndented :: MarkdownParser (F Blocks) codeBlockIndented = do contents <- many1 (indentedLine <|> try (do b <- blanklines l <- indentedLine return $ b ++ l)) optional blanklines classes <- getOption readerIndentedCodeClasses return $ return $ B.codeBlockWith ("", classes, []) $ stripTrailingNewlines $ concat contents lhsCodeBlock :: MarkdownParser (F Blocks) lhsCodeBlock = do guardEnabled Ext_literate_haskell (return . B.codeBlockWith ("",["sourceCode","literate","haskell"],[]) <$> (lhsCodeBlockBird <|> lhsCodeBlockLaTeX)) <|> (return . B.codeBlockWith ("",["sourceCode","haskell"],[]) <$> lhsCodeBlockInverseBird) lhsCodeBlockLaTeX :: MarkdownParser String lhsCodeBlockLaTeX = try $ do string "\\begin{code}" manyTill spaceChar newline contents <- many1Till anyChar (try $ string "\\end{code}") blanklines return $ stripTrailingNewlines contents lhsCodeBlockBird :: MarkdownParser String lhsCodeBlockBird = lhsCodeBlockBirdWith '>' lhsCodeBlockInverseBird :: MarkdownParser String lhsCodeBlockInverseBird = lhsCodeBlockBirdWith '<' lhsCodeBlockBirdWith :: Char -> MarkdownParser String lhsCodeBlockBirdWith c = try $ do pos <- getPosition when (sourceColumn pos /= 1) $ fail "Not in first column" lns <- many1 $ birdTrackLine c -- if (as is normal) there is always a space after >, drop it let lns' = if all (\ln -> null ln || take 1 ln == " ") lns then map (drop 1) lns else lns blanklines return $ intercalate "\n" lns' birdTrackLine :: Char -> Parser [Char] st String birdTrackLine c = try $ do char c -- allow html tags on left margin: when (c == '<') $ notFollowedBy letter anyLine -- -- block quotes -- emailBlockQuoteStart :: MarkdownParser Char emailBlockQuoteStart = try $ skipNonindentSpaces >> char '>' <* optional (char ' ') emailBlockQuote :: MarkdownParser [String] emailBlockQuote = try $ do emailBlockQuoteStart let emailLine = many $ nonEndline <|> try (endline >> notFollowedBy emailBlockQuoteStart >> return '\n') let emailSep = try (newline >> emailBlockQuoteStart) first <- emailLine rest <- many $ try $ emailSep >> emailLine let raw = first:rest newline <|> (eof >> return '\n') optional blanklines return raw blockQuote :: MarkdownParser (F Blocks) blockQuote = do raw <- emailBlockQuote -- parse the extracted block, which may contain various block elements: contents <- parseFromString parseBlocks $ (intercalate "\n" raw) ++ "\n\n" return $ B.blockQuote <$> contents -- -- list blocks -- bulletListStart :: MarkdownParser () bulletListStart = try $ do optional newline -- if preceded by a Plain block in a list context startpos <- sourceColumn <$> getPosition skipNonindentSpaces notFollowedBy' (() <$ hrule) -- because hrules start out just like lists satisfy isBulletListMarker endpos <- sourceColumn <$> getPosition tabStop <- getOption readerTabStop lookAhead (newline <|> spaceChar) () <$ atMostSpaces (tabStop - (endpos - startpos)) anyOrderedListStart :: MarkdownParser (Int, ListNumberStyle, ListNumberDelim) anyOrderedListStart = try $ do optional newline -- if preceded by a Plain block in a list context startpos <- sourceColumn <$> getPosition skipNonindentSpaces notFollowedBy $ string "p." >> spaceChar >> digit -- page number res <- do guardDisabled Ext_fancy_lists start <- many1 digit >>= safeRead char '.' return (start, DefaultStyle, DefaultDelim) <|> do (num, style, delim) <- anyOrderedListMarker -- if it could be an abbreviated first name, -- insist on more than one space when (delim == Period && (style == UpperAlpha || (style == UpperRoman && num `elem` [1, 5, 10, 50, 100, 500, 1000]))) $ () <$ spaceChar return (num, style, delim) endpos <- sourceColumn <$> getPosition tabStop <- getOption readerTabStop lookAhead (newline <|> spaceChar) atMostSpaces (tabStop - (endpos - startpos)) return res listStart :: MarkdownParser () listStart = bulletListStart <|> (anyOrderedListStart >> return ()) listLine :: MarkdownParser String listLine = try $ do notFollowedBy' (do indentSpaces many spaceChar listStart) notFollowedByHtmlCloser optional (() <$ indentSpaces) listLineCommon listLineCommon :: MarkdownParser String listLineCommon = concat <$> manyTill ( many1 (satisfy $ \c -> c /= '\n' && c /= '<') <|> liftM snd (htmlTag isCommentTag) <|> count 1 anyChar ) newline -- parse raw text for one list item, excluding start marker and continuations rawListItem :: MarkdownParser a -> MarkdownParser String rawListItem start = try $ do start first <- listLineCommon rest <- many (notFollowedBy listStart >> notFollowedBy blankline >> listLine) blanks <- many blankline return $ unlines (first:rest) ++ blanks -- continuation of a list item - indented and separated by blankline -- or (in compact lists) endline. -- note: nested lists are parsed as continuations listContinuation :: MarkdownParser String listContinuation = try $ do lookAhead indentSpaces result <- many1 listContinuationLine blanks <- many blankline return $ concat result ++ blanks notFollowedByHtmlCloser :: MarkdownParser () notFollowedByHtmlCloser = do inHtmlBlock <- stateInHtmlBlock <$> getState case inHtmlBlock of Just t -> notFollowedBy' $ htmlTag (~== TagClose t) Nothing -> return () listContinuationLine :: MarkdownParser String listContinuationLine = try $ do notFollowedBy blankline notFollowedBy' listStart notFollowedByHtmlCloser optional indentSpaces result <- anyLine return $ result ++ "\n" listItem :: MarkdownParser a -> MarkdownParser (F Blocks) listItem start = try $ do first <- rawListItem start continuations <- many listContinuation -- parsing with ListItemState forces markers at beginning of lines to -- count as list item markers, even if not separated by blank space. -- see definition of "endline" state <- getState let oldContext = stateParserContext state setState $ state {stateParserContext = ListItemState} -- parse the extracted block, which may contain various block elements: let raw = concat (first:continuations) contents <- parseFromString parseBlocks raw updateState (\st -> st {stateParserContext = oldContext}) return contents orderedList :: MarkdownParser (F Blocks) orderedList = try $ do (start, style, delim) <- lookAhead anyOrderedListStart unless (style `elem` [DefaultStyle, Decimal, Example] && delim `elem` [DefaultDelim, Period]) $ guardEnabled Ext_fancy_lists when (style == Example) $ guardEnabled Ext_example_lists items <- fmap sequence $ many1 $ listItem ( try $ do optional newline -- if preceded by Plain block in a list startpos <- sourceColumn <$> getPosition skipNonindentSpaces res <- orderedListMarker style delim endpos <- sourceColumn <$> getPosition tabStop <- getOption readerTabStop lookAhead (newline <|> spaceChar) atMostSpaces (tabStop - (endpos - startpos)) return res ) start' <- option 1 $ guardEnabled Ext_startnum >> return start return $ B.orderedListWith (start', style, delim) <$> fmap compactify' items bulletList :: MarkdownParser (F Blocks) bulletList = do items <- fmap sequence $ many1 $ listItem bulletListStart return $ B.bulletList <$> fmap compactify' items -- definition lists defListMarker :: MarkdownParser () defListMarker = do sps <- nonindentSpaces char ':' <|> char '~' tabStop <- getOption readerTabStop let remaining = tabStop - (length sps + 1) if remaining > 0 then try (count remaining (char ' ')) <|> string "\t" <|> many1 spaceChar else mzero return () definitionListItem :: Bool -> MarkdownParser (F (Inlines, [Blocks])) definitionListItem compact = try $ do rawLine' <- anyLine raw <- many1 $ defRawBlock compact term <- parseFromString (trimInlinesF . mconcat <$> many inline) rawLine' contents <- mapM (parseFromString parseBlocks . (++"\n")) raw optional blanklines return $ liftM2 (,) term (sequence contents) defRawBlock :: Bool -> MarkdownParser String defRawBlock compact = try $ do hasBlank <- option False $ blankline >> return True defListMarker firstline <- anyLine let dline = try ( do notFollowedBy blankline notFollowedByHtmlCloser if compact -- laziness not compatible with compact then () <$ indentSpaces else (() <$ indentSpaces) <|> notFollowedBy defListMarker anyLine ) rawlines <- many dline cont <- liftM concat $ many $ try $ do trailing <- option "" blanklines ln <- indentSpaces >> notFollowedBy blankline >> anyLine lns <- many dline return $ trailing ++ unlines (ln:lns) return $ trimr (firstline ++ "\n" ++ unlines rawlines ++ cont) ++ if hasBlank || not (null cont) then "\n\n" else "" definitionList :: MarkdownParser (F Blocks) definitionList = try $ do lookAhead (anyLine >> optional (blankline >> notFollowedBy (table >> return ())) >> -- don't capture table caption as def list! defListMarker) compactDefinitionList <|> normalDefinitionList compactDefinitionList :: MarkdownParser (F Blocks) compactDefinitionList = do guardEnabled Ext_compact_definition_lists items <- fmap sequence $ many1 $ definitionListItem True return $ B.definitionList <$> fmap compactify'DL items normalDefinitionList :: MarkdownParser (F Blocks) normalDefinitionList = do guardEnabled Ext_definition_lists items <- fmap sequence $ many1 $ definitionListItem False return $ B.definitionList <$> items -- -- paragraph block -- para :: MarkdownParser (F Blocks) para = try $ do exts <- getOption readerExtensions result <- trimInlinesF . mconcat <$> many1 inline option (B.plain <$> result) $ try $ do newline (blanklines >> return mempty) <|> (guardDisabled Ext_blank_before_blockquote >> () <$ lookAhead blockQuote) <|> (guardEnabled Ext_backtick_code_blocks >> () <$ lookAhead codeBlockFenced) <|> (guardDisabled Ext_blank_before_header >> () <$ lookAhead header) <|> (guardEnabled Ext_lists_without_preceding_blankline >> -- Avoid creating a paragraph in a nested list. notFollowedBy' inList >> () <$ lookAhead listStart) <|> do guardEnabled Ext_native_divs inHtmlBlock <- stateInHtmlBlock <$> getState case inHtmlBlock of Just "div" -> () <$ lookAhead (htmlTag (~== TagClose "div")) _ -> mzero return $ do result' <- result case B.toList result' of [Image attr alt (src,tit)] | Ext_implicit_figures `Set.member` exts -> -- the fig: at beginning of title indicates a figure return $ B.para $ B.singleton $ Image attr alt (src,'f':'i':'g':':':tit) _ -> return $ B.para result' plain :: MarkdownParser (F Blocks) plain = fmap B.plain . trimInlinesF . mconcat <$> many1 inline -- -- raw html -- htmlElement :: MarkdownParser String htmlElement = rawVerbatimBlock <|> strictHtmlBlock <|> liftM snd (htmlTag isBlockTag) htmlBlock :: MarkdownParser (F Blocks) htmlBlock = do guardEnabled Ext_raw_html try (do (TagOpen t attrs) <- lookAhead $ fst <$> htmlTag isBlockTag (guard (t `elem` ["pre","style","script"]) >> (return . B.rawBlock "html") <$> rawVerbatimBlock) <|> (do guardEnabled Ext_markdown_attribute oldMarkdownAttribute <- stateMarkdownAttribute <$> getState markdownAttribute <- case lookup "markdown" attrs of Just "0" -> False <$ updateState (\st -> st{ stateMarkdownAttribute = False }) Just _ -> True <$ updateState (\st -> st{ stateMarkdownAttribute = True }) Nothing -> return oldMarkdownAttribute res <- if markdownAttribute then rawHtmlBlocks else htmlBlock' updateState $ \st -> st{ stateMarkdownAttribute = oldMarkdownAttribute } return res) <|> (guardEnabled Ext_markdown_in_html_blocks >> rawHtmlBlocks)) <|> htmlBlock' htmlBlock' :: MarkdownParser (F Blocks) htmlBlock' = try $ do first <- htmlElement skipMany spaceChar optional blanklines return $ return $ B.rawBlock "html" first strictHtmlBlock :: MarkdownParser String strictHtmlBlock = htmlInBalanced (not . isInlineTag) rawVerbatimBlock :: MarkdownParser String rawVerbatimBlock = htmlInBalanced isVerbTag where isVerbTag (TagOpen "pre" _) = True isVerbTag (TagOpen "style" _) = True isVerbTag (TagOpen "script" _) = True isVerbTag _ = False rawTeXBlock :: MarkdownParser (F Blocks) rawTeXBlock = do guardEnabled Ext_raw_tex result <- (B.rawBlock "latex" . concat <$> rawLaTeXBlock `sepEndBy1` blankline) <|> (B.rawBlock "context" . concat <$> rawConTeXtEnvironment `sepEndBy1` blankline) spaces return $ return result rawHtmlBlocks :: MarkdownParser (F Blocks) rawHtmlBlocks = do (TagOpen tagtype _, raw) <- htmlTag isBlockTag -- try to find closing tag -- we set stateInHtmlBlock so that closing tags that can be either block or -- inline will not be parsed as inline tags oldInHtmlBlock <- stateInHtmlBlock <$> getState updateState $ \st -> st{ stateInHtmlBlock = Just tagtype } let closer = htmlTag (\x -> x ~== TagClose tagtype) contents <- mconcat <$> many (notFollowedBy' closer >> block) result <- (closer >>= \(_, rawcloser) -> return ( return (B.rawBlock "html" $ stripMarkdownAttribute raw) <> contents <> return (B.rawBlock "html" rawcloser))) <|> return (return (B.rawBlock "html" raw) <> contents) updateState $ \st -> st{ stateInHtmlBlock = oldInHtmlBlock } return result -- remove markdown="1" attribute stripMarkdownAttribute :: String -> String stripMarkdownAttribute s = renderTags' $ map filterAttrib $ parseTags s where filterAttrib (TagOpen t as) = TagOpen t [(k,v) | (k,v) <- as, k /= "markdown"] filterAttrib x = x -- -- line block -- lineBlock :: MarkdownParser (F Blocks) lineBlock = try $ do guardEnabled Ext_line_blocks lines' <- lineBlockLines >>= mapM (parseFromString (trimInlinesF . mconcat <$> many inline)) return $ B.lineBlock <$> sequence lines' -- -- Tables -- -- Parse a dashed line with optional trailing spaces; return its length -- and the length including trailing space. dashedLine :: Char -> Parser [Char] st (Int, Int) dashedLine ch = do dashes <- many1 (char ch) sp <- many spaceChar let lengthDashes = length dashes lengthSp = length sp return (lengthDashes, lengthDashes + lengthSp) -- Parse a table header with dashed lines of '-' preceded by -- one (or zero) line of text. simpleTableHeader :: Bool -- ^ Headerless table -> MarkdownParser (F [Blocks], [Alignment], [Int]) simpleTableHeader headless = try $ do rawContent <- if headless then return "" else anyLine initSp <- nonindentSpaces dashes <- many1 (dashedLine '-') newline let (lengths, lines') = unzip dashes let indices = scanl (+) (length initSp) lines' -- If no header, calculate alignment on basis of first row of text rawHeads <- liftM (tail . splitStringByIndices (init indices)) $ if headless then lookAhead anyLine else return rawContent let aligns = zipWith alignType (map (\a -> [a]) rawHeads) lengths let rawHeads' = if headless then replicate (length dashes) "" else rawHeads heads <- fmap sequence $ mapM (parseFromString (mconcat <$> many plain)) $ map trim rawHeads' return (heads, aligns, indices) -- Returns an alignment type for a table, based on a list of strings -- (the rows of the column header) and a number (the length of the -- dashed line under the rows. alignType :: [String] -> Int -> Alignment alignType [] _ = AlignDefault alignType strLst len = let nonempties = filter (not . null) $ map trimr strLst (leftSpace, rightSpace) = case sortBy (comparing length) nonempties of (x:_) -> (head x `elem` " \t", length x < len) [] -> (False, False) in case (leftSpace, rightSpace) of (True, False) -> AlignRight (False, True) -> AlignLeft (True, True) -> AlignCenter (False, False) -> AlignDefault -- Parse a table footer - dashed lines followed by blank line. tableFooter :: MarkdownParser String tableFooter = try $ skipNonindentSpaces >> many1 (dashedLine '-') >> blanklines -- Parse a table separator - dashed line. tableSep :: MarkdownParser Char tableSep = try $ skipNonindentSpaces >> many1 (dashedLine '-') >> char '\n' -- Parse a raw line and split it into chunks by indices. rawTableLine :: [Int] -> MarkdownParser [String] rawTableLine indices = do notFollowedBy' (blanklines <|> tableFooter) line <- many1Till anyChar newline return $ map trim $ tail $ splitStringByIndices (init indices) line -- Parse a table line and return a list of lists of blocks (columns). tableLine :: [Int] -> MarkdownParser (F [Blocks]) tableLine indices = rawTableLine indices >>= fmap sequence . mapM (parseFromString (mconcat <$> many plain)) -- Parse a multiline table row and return a list of blocks (columns). multilineRow :: [Int] -> MarkdownParser (F [Blocks]) multilineRow indices = do colLines <- many1 (rawTableLine indices) let cols = map unlines $ transpose colLines fmap sequence $ mapM (parseFromString (mconcat <$> many plain)) cols -- Parses a table caption: inlines beginning with 'Table:' -- and followed by blank lines. tableCaption :: MarkdownParser (F Inlines) tableCaption = try $ do guardEnabled Ext_table_captions skipNonindentSpaces string ":" <|> string "Table:" trimInlinesF . mconcat <$> many1 inline <* blanklines -- Parse a simple table with '---' header and one line per row. simpleTable :: Bool -- ^ Headerless table -> MarkdownParser ([Alignment], [Double], F [Blocks], F [[Blocks]]) simpleTable headless = do (aligns, _widths, heads', lines') <- tableWith (simpleTableHeader headless) tableLine (return ()) (if headless then tableFooter else tableFooter <|> blanklines) -- Simple tables get 0s for relative column widths (i.e., use default) return (aligns, replicate (length aligns) 0, heads', lines') -- Parse a multiline table: starts with row of '-' on top, then header -- (which may be multiline), then the rows, -- which may be multiline, separated by blank lines, and -- ending with a footer (dashed line followed by blank line). multilineTable :: Bool -- ^ Headerless table -> MarkdownParser ([Alignment], [Double], F [Blocks], F [[Blocks]]) multilineTable headless = tableWith (multilineTableHeader headless) multilineRow blanklines tableFooter multilineTableHeader :: Bool -- ^ Headerless table -> MarkdownParser (F [Blocks], [Alignment], [Int]) multilineTableHeader headless = try $ do unless headless $ tableSep >> notFollowedBy blankline rawContent <- if headless then return $ repeat "" else many1 $ notFollowedBy tableSep >> anyLine initSp <- nonindentSpaces dashes <- many1 (dashedLine '-') newline let (lengths, lines') = unzip dashes let indices = scanl (+) (length initSp) lines' rawHeadsList <- if headless then liftM (map (:[]) . tail . splitStringByIndices (init indices)) $ lookAhead anyLine else return $ transpose $ map (tail . splitStringByIndices (init indices)) rawContent let aligns = zipWith alignType rawHeadsList lengths let rawHeads = if headless then replicate (length dashes) "" else map (unlines . map trim) rawHeadsList heads <- fmap sequence $ mapM (parseFromString (mconcat <$> many plain)) $ map trim rawHeads return (heads, aligns, indices) -- Parse a grid table: starts with row of '-' on top, then header -- (which may be grid), then the rows, -- which may be grid, separated by blank lines, and -- ending with a footer (dashed line followed by blank line). gridTable :: Bool -- ^ Headerless table -> MarkdownParser ([Alignment], [Double], F [Blocks], F [[Blocks]]) gridTable headless = tableWith (gridTableHeader headless) gridTableRow (gridTableSep '-') gridTableFooter gridTableSplitLine :: [Int] -> String -> [String] gridTableSplitLine indices line = map removeFinalBar $ tail $ splitStringByIndices (init indices) $ trimr line gridPart :: Char -> Parser [Char] st ((Int, Int), Alignment) gridPart ch = do leftColon <- option False (True <$ char ':') dashes <- many1 (char ch) rightColon <- option False (True <$ char ':') char '+' let lengthDashes = length dashes + (if leftColon then 1 else 0) + (if rightColon then 1 else 0) let alignment = case (leftColon, rightColon) of (True, True) -> AlignCenter (True, False) -> AlignLeft (False, True) -> AlignRight (False, False) -> AlignDefault return ((lengthDashes, lengthDashes + 1), alignment) gridDashedLines :: Char -> Parser [Char] st [((Int, Int), Alignment)] gridDashedLines ch = try $ char '+' >> many1 (gridPart ch) <* blankline removeFinalBar :: String -> String removeFinalBar = reverse . dropWhile (`elem` " \t") . dropWhile (=='|') . reverse -- | Separator between rows of grid table. gridTableSep :: Char -> MarkdownParser Char gridTableSep ch = try $ gridDashedLines ch >> return '\n' -- | Parse header for a grid table. gridTableHeader :: Bool -- ^ Headerless table -> MarkdownParser (F [Blocks], [Alignment], [Int]) gridTableHeader headless = try $ do optional blanklines dashes <- gridDashedLines '-' rawContent <- if headless then return [] else many1 (try (char '|' >> anyLine)) underDashes <- if headless then return dashes else gridDashedLines '=' guard $ length dashes == length underDashes let lines' = map (snd . fst) underDashes let indices = scanl (+) 0 lines' let aligns = map snd underDashes let rawHeads = if headless then replicate (length underDashes) "" else map (unlines . map trim) $ transpose $ map (gridTableSplitLine indices) rawContent heads <- fmap sequence $ mapM (parseFromString parseBlocks . trim) rawHeads return (heads, aligns, indices) gridTableRawLine :: [Int] -> MarkdownParser [String] gridTableRawLine indices = do char '|' line <- anyLine return (gridTableSplitLine indices line) -- | Parse row of grid table. gridTableRow :: [Int] -> MarkdownParser (F [Blocks]) gridTableRow indices = do colLines <- many1 (gridTableRawLine indices) let cols = map ((++ "\n") . unlines . removeOneLeadingSpace) $ transpose colLines fmap compactify' <$> fmap sequence (mapM (parseFromString parseBlocks) cols) removeOneLeadingSpace :: [String] -> [String] removeOneLeadingSpace xs = if all startsWithSpace xs then map (drop 1) xs else xs where startsWithSpace "" = True startsWithSpace (y:_) = y == ' ' -- | Parse footer for a grid table. gridTableFooter :: MarkdownParser [Char] gridTableFooter = blanklines pipeBreak :: MarkdownParser ([Alignment], [Int]) pipeBreak = try $ do nonindentSpaces openPipe <- (True <$ char '|') <|> return False first <- pipeTableHeaderPart rest <- many $ sepPipe *> pipeTableHeaderPart -- surrounding pipes needed for a one-column table: guard $ not (null rest && not openPipe) optional (char '|') blankline return $ unzip (first:rest) pipeTable :: MarkdownParser ([Alignment], [Double], F [Blocks], F [[Blocks]]) pipeTable = try $ do nonindentSpaces lookAhead nonspaceChar (heads,(aligns, seplengths)) <- (,) <$> pipeTableRow <*> pipeBreak let heads' = take (length aligns) <$> heads lines' <- many pipeTableRow let lines'' = map (take (length aligns) <$>) lines' let maxlength = maximum $ map (\x -> length . stringify $ runF x def) (heads' : lines'') 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 char '|' <|> char '+' notFollowedBy blankline -- parse a row, also returning probable alignments for org-table cells pipeTableRow :: MarkdownParser (F [Blocks]) pipeTableRow = try $ do scanForPipe skipMany spaceChar openPipe <- (True <$ char '|') <|> return False -- split into cells let chunk = void (code <|> rawHtmlInline <|> escapedChar <|> rawLaTeXInline') <|> void (noneOf "|\n\r") let cellContents = ((trim . snd) <$> withRaw (many chunk)) >>= parseFromString pipeTableCell cells <- cellContents `sepEndBy1` (char '|') -- surrounding pipes needed for a one-column table: guard $ not (length cells == 1 && not openPipe) blankline return $ sequence cells pipeTableCell :: MarkdownParser (F Blocks) pipeTableCell = do result <- many inline if null result then return mempty else return $ B.plain . mconcat <$> sequence result pipeTableHeaderPart :: Parser [Char] st (Alignment, Int) pipeTableHeaderPart = try $ do skipMany spaceChar left <- optionMaybe (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), len) -- Succeed only if current line contains a pipe. scanForPipe :: Parser [Char] st () scanForPipe = do inp <- getInput case break (\c -> c == '\n' || c == '|') inp of (_,'|':_) -> return () _ -> mzero -- | Parse a table using 'headerParser', 'rowParser', -- 'lineParser', and 'footerParser'. Variant of the version in -- Text.Pandoc.Parsing. tableWith :: MarkdownParser (F [Blocks], [Alignment], [Int]) -> ([Int] -> MarkdownParser (F [Blocks])) -> MarkdownParser sep -> MarkdownParser end -> MarkdownParser ([Alignment], [Double], F [Blocks], F [[Blocks]]) tableWith headerParser rowParser lineParser footerParser = try $ do (heads, aligns, indices) <- headerParser lines' <- fmap sequence $ rowParser indices `sepEndBy1` lineParser footerParser numColumns <- getOption readerColumns let widths = if (indices == []) then replicate (length aligns) 0.0 else widthsFromIndices numColumns indices return $ (aligns, widths, heads, lines') table :: MarkdownParser (F Blocks) table = try $ do frontCaption <- option Nothing (Just <$> tableCaption) (aligns, widths, heads, lns) <- try (guardEnabled Ext_pipe_tables >> scanForPipe >> pipeTable) <|> try (guardEnabled Ext_multiline_tables >> multilineTable False) <|> try (guardEnabled Ext_simple_tables >> (simpleTable True <|> simpleTable False)) <|> try (guardEnabled Ext_multiline_tables >> multilineTable True) <|> try (guardEnabled Ext_grid_tables >> (gridTable False <|> gridTable True)) "table" optional blanklines caption <- case frontCaption of Nothing -> option (return mempty) tableCaption Just c -> return c -- renormalize widths if greater than 100%: let totalWidth = sum widths let widths' = if totalWidth < 1 then widths else map (/ totalWidth) widths return $ do caption' <- caption heads' <- heads lns' <- lns return $ B.table caption' (zip aligns widths') heads' lns' -- -- inline -- inline :: MarkdownParser (F Inlines) inline = choice [ whitespace , bareURL , str , endline , code , strongOrEmph , note , cite , bracketedSpan , link , image , math , strikeout , subscript , superscript , inlineNote -- after superscript because of ^[link](/foo)^ , autoLink , spanHtml , rawHtmlInline , escapedChar , rawLaTeXInline' , exampleRef , smart , return . B.singleton <$> charRef , emoji , symbol , ltSign ] "inline" escapedChar' :: MarkdownParser Char escapedChar' = try $ do char '\\' (guardEnabled Ext_all_symbols_escapable >> satisfy (not . isAlphaNum)) <|> (guardEnabled Ext_angle_brackets_escapable >> oneOf "\\`*_{}[]()>#+-.!~\"<>") <|> (guardEnabled Ext_escaped_line_breaks >> char '\n') <|> oneOf "\\`*_{}[]()>#+-.!~\"" escapedChar :: MarkdownParser (F Inlines) escapedChar = do result <- escapedChar' case result of ' ' -> return $ return $ B.str "\160" -- "\ " is a nonbreaking space '\n' -> guardEnabled Ext_escaped_line_breaks >> return (return B.linebreak) -- "\[newline]" is a linebreak _ -> return $ return $ B.str [result] ltSign :: MarkdownParser (F Inlines) ltSign = do guardDisabled Ext_raw_html <|> (notFollowedByHtmlCloser >> notFollowedBy' (htmlTag isBlockTag)) char '<' return $ return $ B.str "<" exampleRef :: MarkdownParser (F Inlines) exampleRef = try $ do guardEnabled Ext_example_lists char '@' lab <- many1 (alphaNum <|> oneOf "-_") return $ do st <- askF return $ case M.lookup lab (stateExamples st) of Just n -> B.str (show n) Nothing -> B.str ('@':lab) symbol :: MarkdownParser (F Inlines) symbol = do result <- noneOf "<\\\n\t " <|> try (do lookAhead $ char '\\' notFollowedBy' (() <$ rawTeXBlock) char '\\') return $ return $ B.str [result] -- parses inline code, between n `s and n `s code :: MarkdownParser (F Inlines) code = try $ do starts <- many1 (char '`') skipSpaces result <- many1Till (many1 (noneOf "`\n") <|> many1 (char '`') <|> (char '\n' >> notFollowedBy' blankline >> return " ")) (try (skipSpaces >> count (length starts) (char '`') >> notFollowedBy (char '`'))) attr <- option ([],[],[]) (try $ guardEnabled Ext_inline_code_attributes >> attributes) return $ return $ B.codeWith attr $ trim $ concat result math :: MarkdownParser (F Inlines) math = (return . B.displayMath <$> (mathDisplay >>= applyMacros')) <|> (return . B.math <$> (mathInline >>= applyMacros')) <+?> ((getOption readerSmart >>= guard) *> (return <$> apostrophe) <* notFollowedBy (space <|> satisfy isPunctuation)) -- Parses material enclosed in *s, **s, _s, or __s. -- Designed to avoid backtracking. enclosure :: Char -> MarkdownParser (F Inlines) enclosure c = do -- we can't start an enclosure with _ if after a string and -- the intraword_underscores extension is enabled: guardDisabled Ext_intraword_underscores <|> guard (c == '*') <|> (guard =<< notAfterString) cs <- many1 (char c) (return (B.str cs) <>) <$> whitespace <|> do case length cs of 3 -> three c 2 -> two c mempty 1 -> one c mempty _ -> return (return $ B.str cs) ender :: Char -> Int -> MarkdownParser () ender c n = try $ do count n (char c) guard (c == '*') <|> guardDisabled Ext_intraword_underscores <|> notFollowedBy alphaNum -- Parse inlines til you hit one c or a sequence of two cs. -- If one c, emit emph and then parse two. -- If two cs, emit strong and then parse one. -- Otherwise, emit ccc then the results. three :: Char -> MarkdownParser (F Inlines) three c = do contents <- mconcat <$> many (notFollowedBy (ender c 1) >> inline) (ender c 3 >> return ((B.strong . B.emph) <$> contents)) <|> (ender c 2 >> one c (B.strong <$> contents)) <|> (ender c 1 >> two c (B.emph <$> contents)) <|> return (return (B.str [c,c,c]) <> contents) -- Parse inlines til you hit two c's, and emit strong. -- If you never do hit two cs, emit ** plus inlines parsed. two :: Char -> F Inlines -> MarkdownParser (F Inlines) two c prefix' = do contents <- mconcat <$> many (try $ notFollowedBy (ender c 2) >> inline) (ender c 2 >> return (B.strong <$> (prefix' <> contents))) <|> return (return (B.str [c,c]) <> (prefix' <> contents)) -- Parse inlines til you hit a c, and emit emph. -- If you never hit a c, emit * plus inlines parsed. one :: Char -> F Inlines -> MarkdownParser (F Inlines) one c prefix' = do contents <- mconcat <$> many ( (notFollowedBy (ender c 1) >> inline) <|> try (string [c,c] >> notFollowedBy (ender c 1) >> two c mempty) ) (ender c 1 >> return (B.emph <$> (prefix' <> contents))) <|> return (return (B.str [c]) <> (prefix' <> contents)) strongOrEmph :: MarkdownParser (F Inlines) strongOrEmph = enclosure '*' <|> enclosure '_' -- | Parses a list of inlines between start and end delimiters. inlinesBetween :: (Show b) => MarkdownParser a -> MarkdownParser b -> MarkdownParser (F Inlines) inlinesBetween start end = (trimInlinesF . mconcat) <$> try (start >> many1Till inner end) where inner = innerSpace <|> (notFollowedBy' (() <$ whitespace) >> inline) innerSpace = try $ whitespace <* notFollowedBy' end strikeout :: MarkdownParser (F Inlines) strikeout = fmap B.strikeout <$> (guardEnabled Ext_strikeout >> inlinesBetween strikeStart strikeEnd) where strikeStart = string "~~" >> lookAhead nonspaceChar >> notFollowedBy (char '~') strikeEnd = try $ string "~~" superscript :: MarkdownParser (F Inlines) superscript = fmap B.superscript <$> try (do guardEnabled Ext_superscript char '^' mconcat <$> many1Till (notFollowedBy spaceChar >> inline) (char '^')) subscript :: MarkdownParser (F Inlines) subscript = fmap B.subscript <$> try (do guardEnabled Ext_subscript char '~' mconcat <$> many1Till (notFollowedBy spaceChar >> inline) (char '~')) whitespace :: MarkdownParser (F Inlines) whitespace = spaceChar >> return <$> (lb <|> regsp) "whitespace" where lb = spaceChar >> skipMany spaceChar >> option B.space (endline >> return B.linebreak) regsp = skipMany spaceChar >> return B.space nonEndline :: Parser [Char] st Char nonEndline = satisfy (/='\n') str :: MarkdownParser (F Inlines) str = do result <- many1 alphaNum updateLastStrPos let spacesToNbr = map (\c -> if c == ' ' then '\160' else c) isSmart <- getOption readerSmart if isSmart then case likelyAbbrev result of [] -> return $ return $ B.str result xs -> choice (map (\x -> try (string x >> oneOf " \n" >> lookAhead alphaNum >> return (return $ B.str $ result ++ spacesToNbr x ++ "\160"))) xs) <|> (return $ return $ B.str result) else return $ return $ B.str result -- | if the string matches the beginning of an abbreviation (before -- the first period, return strings that would finish the abbreviation. likelyAbbrev :: String -> [String] likelyAbbrev x = let abbrevs = [ "Mr.", "Mrs.", "Ms.", "Capt.", "Dr.", "Prof.", "Gen.", "Gov.", "e.g.", "i.e.", "Sgt.", "St.", "vol.", "vs.", "Sen.", "Rep.", "Pres.", "Hon.", "Rev.", "Ph.D.", "M.D.", "M.A.", "p.", "pp.", "ch.", "sec.", "cf.", "cp."] abbrPairs = map (break (=='.')) abbrevs in map snd $ filter (\(y,_) -> y == x) abbrPairs -- an endline character that can be treated as a space, not a structural break endline :: MarkdownParser (F Inlines) endline = try $ do newline notFollowedBy blankline -- parse potential list-starts differently if in a list: 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 =<< atxChar) -- atx header guardDisabled Ext_backtick_code_blocks <|> notFollowedBy (() <$ (lookAhead (char '`') >> codeBlockFenced)) notFollowedByHtmlCloser (eof >> return mempty) <|> (guardEnabled Ext_hard_line_breaks >> return (return B.linebreak)) <|> (guardEnabled Ext_ignore_line_breaks >> return mempty) <|> (skipMany spaceChar >> return (return B.softbreak)) -- -- links -- -- a reference label for a link reference :: MarkdownParser (F Inlines, String) reference = do notFollowedBy' (string "[^") -- footnote reference withRaw $ trimInlinesF <$> inlinesInBalancedBrackets parenthesizedChars :: MarkdownParser [Char] parenthesizedChars = do result <- charsInBalanced '(' ')' litChar return $ '(' : result ++ ")" -- source for a link, with optional title source :: MarkdownParser (String, String) source = do char '(' skipSpaces let urlChunk = try parenthesizedChars <|> (notFollowedBy (oneOf " )") >> (count 1 litChar)) <|> try (many1 spaceChar <* notFollowedBy (oneOf "\"')")) let sourceURL = (unwords . words . concat) <$> many urlChunk let betweenAngles = try $ char '<' >> manyTill litChar (char '>') src <- try betweenAngles <|> sourceURL tit <- option "" $ try $ spnl >> linkTitle skipSpaces char ')' return (escapeURI $ trimr src, tit) linkTitle :: MarkdownParser String linkTitle = quotedTitle '"' <|> quotedTitle '\'' link :: MarkdownParser (F Inlines) link = try $ do st <- getState guard $ stateAllowLinks st setState $ st{ stateAllowLinks = False } (lab,raw) <- reference setState $ st{ stateAllowLinks = True } regLink B.linkWith lab <|> referenceLink B.linkWith (lab,raw) bracketedSpan :: MarkdownParser (F Inlines) bracketedSpan = try $ do guardEnabled Ext_bracketed_spans (lab,_) <- reference attr <- attributes let (ident,classes,keyvals) = attr case lookup "style" keyvals of Just s | null ident && null classes && map toLower (filter (`notElem` " \t;") s) == "font-variant:small-caps" -> return $ B.smallcaps <$> lab _ -> return $ B.spanWith attr <$> lab regLink :: (Attr -> String -> String -> Inlines -> Inlines) -> F Inlines -> MarkdownParser (F Inlines) regLink constructor lab = try $ do (src, tit) <- source attr <- option nullAttr $ guardEnabled Ext_link_attributes >> attributes return $ constructor attr src tit <$> lab -- a link like [this][ref] or [this][] or [this] referenceLink :: (Attr -> String -> String -> Inlines -> Inlines) -> (F Inlines, String) -> MarkdownParser (F Inlines) referenceLink constructor (lab, raw) = do sp <- (True <$ lookAhead (char ' ')) <|> return False (_,raw') <- option (mempty, "") $ lookAhead (try (guardEnabled Ext_citations >> spnl >> normalCite >> return (mempty, ""))) <|> try (spnl >> reference) when (raw' == "") $ guardEnabled Ext_shortcut_reference_links let labIsRef = raw' == "" || raw' == "[]" let key = toKey $ if labIsRef then raw else raw' parsedRaw <- parseFromString (mconcat <$> many inline) raw' fallback <- parseFromString (mconcat <$> many inline) $ dropBrackets raw implicitHeaderRefs <- option False $ True <$ guardEnabled Ext_implicit_header_references let makeFallback = do parsedRaw' <- parsedRaw fallback' <- fallback return $ B.str "[" <> fallback' <> B.str "]" <> (if sp && not (null raw) then B.space else mempty) <> parsedRaw' return $ do keys <- asksF stateKeys case M.lookup key keys of Nothing -> if implicitHeaderRefs then do headerKeys <- asksF stateHeaderKeys case M.lookup key headerKeys of Just ((src, tit), _) -> constructor nullAttr src tit <$> lab Nothing -> makeFallback else makeFallback Just ((src,tit), attr) -> constructor attr src tit <$> lab dropBrackets :: String -> String dropBrackets = reverse . dropRB . reverse . dropLB where dropRB (']':xs) = xs dropRB xs = xs dropLB ('[':xs) = xs dropLB xs = xs bareURL :: MarkdownParser (F Inlines) bareURL = try $ do guardEnabled Ext_autolink_bare_uris getState >>= guard . stateAllowLinks (orig, src) <- uri <|> emailAddress notFollowedBy $ try $ spaces >> htmlTag (~== TagClose "a") return $ return $ B.link src "" (B.str orig) autoLink :: MarkdownParser (F Inlines) autoLink = try $ do getState >>= guard . stateAllowLinks char '<' (orig, src) <- uri <|> emailAddress -- in rare cases, something may remain after the uri parser -- is finished, because the uri parser tries to avoid parsing -- final punctuation. for example: in ``, -- the URI parser will stop before the dashes. extra <- fromEntities <$> manyTill nonspaceChar (char '>') attr <- option nullAttr $ try $ guardEnabled Ext_link_attributes >> attributes return $ return $ B.linkWith attr (src ++ escapeURI extra) "" (B.str $ orig ++ extra) image :: MarkdownParser (F Inlines) image = try $ do char '!' (lab,raw) <- reference defaultExt <- getOption readerDefaultImageExtension 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) note = try $ do guardEnabled Ext_footnotes ref <- noteMarker return $ do notes <- asksF stateNotes' case lookup ref notes of Nothing -> return $ B.str $ "[^" ++ ref ++ "]" Just contents -> do st <- askF -- process the note in a context that doesn't resolve -- notes, to avoid infinite looping with notes inside -- notes: let contents' = runF contents st{ stateNotes' = [] } return $ B.note contents' inlineNote :: MarkdownParser (F Inlines) inlineNote = try $ do guardEnabled Ext_inline_notes char '^' contents <- inlinesInBalancedBrackets return $ B.note . B.para <$> contents rawLaTeXInline' :: MarkdownParser (F Inlines) rawLaTeXInline' = try $ do guardEnabled Ext_raw_tex lookAhead $ char '\\' >> notFollowedBy' (string "start") -- context env RawInline _ s <- rawLaTeXInline return $ return $ B.rawInline "tex" s -- "tex" because it might be context or latex rawConTeXtEnvironment :: Parser [Char] st String rawConTeXtEnvironment = try $ do string "\\start" completion <- inBrackets (letter <|> digit <|> spaceChar) <|> (many1 letter) contents <- manyTill (rawConTeXtEnvironment <|> (count 1 anyChar)) (try $ string "\\stop" >> string completion) return $ "\\start" ++ completion ++ concat contents ++ "\\stop" ++ completion inBrackets :: (Parser [Char] st Char) -> Parser [Char] st String inBrackets parser = do char '[' contents <- many parser char ']' return $ "[" ++ contents ++ "]" spanHtml :: MarkdownParser (F Inlines) spanHtml = try $ do guardEnabled Ext_native_spans (TagOpen _ attrs, _) <- htmlTag (~== TagOpen "span" []) contents <- mconcat <$> manyTill inline (htmlTag (~== TagClose "span")) let ident = fromMaybe "" $ lookup "id" attrs let classes = maybe [] words $ lookup "class" attrs let keyvals = [(k,v) | (k,v) <- attrs, k /= "id" && k /= "class"] case lookup "style" keyvals of Just s | null ident && null classes && map toLower (filter (`notElem` " \t;") s) == "font-variant:small-caps" -> return $ B.smallcaps <$> contents _ -> return $ B.spanWith (ident, classes, keyvals) <$> contents divHtml :: MarkdownParser (F Blocks) divHtml = try $ do guardEnabled Ext_native_divs (TagOpen _ attrs, rawtag) <- htmlTag (~== TagOpen "div" []) -- we set stateInHtmlBlock so that closing tags that can be either block or -- inline will not be parsed as inline tags oldInHtmlBlock <- stateInHtmlBlock <$> getState updateState $ \st -> st{ stateInHtmlBlock = Just "div" } bls <- option "" (blankline >> option "" blanklines) contents <- mconcat <$> many (notFollowedBy' (htmlTag (~== TagClose "div")) >> block) closed <- option False (True <$ htmlTag (~== TagClose "div")) if closed then do updateState $ \st -> st{ stateInHtmlBlock = oldInHtmlBlock } let ident = fromMaybe "" $ lookup "id" attrs let classes = maybe [] words $ lookup "class" attrs let keyvals = [(k,v) | (k,v) <- attrs, k /= "id" && k /= "class"] return $ B.divWith (ident, classes, keyvals) <$> contents else -- avoid backtracing return $ return (B.rawBlock "html" (rawtag <> bls)) <> contents rawHtmlInline :: MarkdownParser (F Inlines) rawHtmlInline = do guardEnabled Ext_raw_html inHtmlBlock <- stateInHtmlBlock <$> getState let isCloseBlockTag t = case inHtmlBlock of Just t' -> t ~== TagClose t' Nothing -> False mdInHtml <- option False $ ( guardEnabled Ext_markdown_in_html_blocks <|> guardEnabled Ext_markdown_attribute ) >> return True (_,result) <- htmlTag $ if mdInHtml then (\x -> isInlineTag x && not (isCloseBlockTag x)) 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) cite = do guardEnabled Ext_citations citations <- textualCite <|> do (cs, raw) <- withRaw normalCite return $ (flip B.cite (B.text raw)) <$> cs return citations textualCite :: MarkdownParser (F Inlines) textualCite = try $ do (_, key) <- citeKey let first = Citation{ citationId = key , citationPrefix = [] , citationSuffix = [] , citationMode = AuthorInText , citationNoteNum = 0 , citationHash = 0 } mbrest <- option Nothing $ try $ spnl >> Just <$> withRaw normalCite case mbrest of Just (rest, raw) -> return $ (flip B.cite (B.text $ '@':key ++ " " ++ raw) . (first:)) <$> rest Nothing -> (do (cs, raw) <- withRaw $ bareloc first let (spaces',raw') = span isSpace raw spc | null spaces' = mempty | otherwise = B.space lab <- parseFromString (mconcat <$> many inline) $ dropBrackets raw' fallback <- referenceLink B.linkWith (lab,raw') return $ do fallback' <- fallback cs' <- cs return $ case B.toList fallback' of Link{}:_ -> B.cite [first] (B.str $ '@':key) <> spc <> fallback' _ -> B.cite cs' (B.text $ '@':key ++ " " ++ raw)) <|> return (do st <- askF return $ case M.lookup key (stateExamples st) of Just n -> B.str (show n) _ -> B.cite [first] $ B.str $ '@':key) bareloc :: Citation -> MarkdownParser (F [Citation]) bareloc c = try $ do spnl char '[' notFollowedBy $ char '^' suff <- suffix rest <- option (return []) $ try $ char ';' >> citeList spnl char ']' notFollowedBy $ oneOf "[(" return $ do suff' <- suff rest' <- rest return $ c{ citationSuffix = B.toList suff' } : rest' normalCite :: MarkdownParser (F [Citation]) normalCite = try $ do char '[' spnl citations <- citeList spnl char ']' return citations suffix :: MarkdownParser (F Inlines) suffix = try $ do hasSpace <- option False (notFollowedBy nonspaceChar >> return True) spnl rest <- trimInlinesF . mconcat <$> many (notFollowedBy (oneOf ";]") >> inline) return $ if hasSpace then (B.space <>) <$> rest else rest prefix :: MarkdownParser (F Inlines) prefix = trimInlinesF . mconcat <$> manyTill inline (char ']' <|> liftM (const ']') (lookAhead citeKey)) citeList :: MarkdownParser (F [Citation]) citeList = fmap sequence $ sepBy1 citation (try $ char ';' >> spnl) citation :: MarkdownParser (F Citation) citation = try $ do pref <- prefix (suppress_author, key) <- citeKey suff <- suffix return $ do x <- pref y <- suff return $ Citation{ citationId = key , citationPrefix = B.toList x , citationSuffix = B.toList y , citationMode = if suppress_author then SuppressAuthor else NormalCitation , citationNoteNum = 0 , citationHash = 0 } smart :: MarkdownParser (F Inlines) smart = do getOption readerSmart >>= guard doubleQuoted <|> singleQuoted <|> choice (map (return <$>) [apostrophe, dash, ellipses]) singleQuoted :: MarkdownParser (F Inlines) singleQuoted = try $ do singleQuoteStart withQuoteContext InSingleQuote $ fmap B.singleQuoted . trimInlinesF . mconcat <$> many1Till inline singleQuoteEnd -- doubleQuoted will handle regular double-quoted sections, as well -- as dialogues with an open double-quote without a close double-quote -- in the same paragraph. doubleQuoted :: MarkdownParser (F Inlines) doubleQuoted = try $ do doubleQuoteStart contents <- mconcat <$> many (try $ notFollowedBy doubleQuoteEnd >> inline) (withQuoteContext InDoubleQuote $ doubleQuoteEnd >> return (fmap B.doubleQuoted . trimInlinesF $ contents)) <|> (return $ return (B.str "\8220") <> contents) pandoc-1.19.2.4/src/Text/Pandoc/Readers/CommonMark.hs0000644000000000000000000001104413155240142020300 0ustar0000000000000000{- Copyright (C) 2015 John MacFarlane 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.Readers.CommonMark Copyright : Copyright (C) 2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of CommonMark-formatted plain text to 'Pandoc' document. CommonMark is a strongly specified variant of Markdown: http://commonmark.org. -} module Text.Pandoc.Readers.CommonMark (readCommonMark) where import CMark import Data.Text (unpack, pack) import Data.List (groupBy) import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Error -- | Parse a CommonMark formatted string into a 'Pandoc' structure. readCommonMark :: ReaderOptions -> String -> Either PandocError Pandoc readCommonMark opts = Right . nodeToPandoc . commonmarkToNode opts' . pack where opts' = if readerSmart opts then [optNormalize, optSmart] else [optNormalize] nodeToPandoc :: Node -> Pandoc nodeToPandoc (Node _ DOCUMENT nodes) = Pandoc nullMeta $ foldr addBlock [] nodes nodeToPandoc n = -- shouldn't happen Pandoc nullMeta $ foldr addBlock [] [n] addBlocks :: [Node] -> [Block] addBlocks = foldr addBlock [] addBlock :: Node -> [Block] -> [Block] addBlock (Node _ PARAGRAPH nodes) = (Para (addInlines nodes) :) addBlock (Node _ THEMATIC_BREAK _) = (HorizontalRule :) addBlock (Node _ BLOCK_QUOTE nodes) = (BlockQuote (addBlocks nodes) :) addBlock (Node _ (HTML_BLOCK t) _) = (RawBlock (Format "html") (unpack t) :) -- Note: the cmark parser will never generate CUSTOM_BLOCK, -- so we don't need to handle it: addBlock (Node _ (CUSTOM_BLOCK _onEnter _onExit) _nodes) = id addBlock (Node _ (CODE_BLOCK info t) _) = (CodeBlock ("", take 1 (words (unpack info)), []) (unpack t) :) addBlock (Node _ (HEADING lev) nodes) = (Header lev ("",[],[]) (addInlines nodes) :) addBlock (Node _ (LIST listAttrs) nodes) = (constructor (map (setTightness . addBlocks . children) nodes) :) where constructor = case listType listAttrs of BULLET_LIST -> BulletList ORDERED_LIST -> OrderedList (start, DefaultStyle, delim) start = listStart listAttrs setTightness = if listTight listAttrs then map paraToPlain else id paraToPlain (Para xs) = Plain (xs) paraToPlain x = x delim = case listDelim listAttrs of PERIOD_DELIM -> Period PAREN_DELIM -> OneParen addBlock (Node _ ITEM _) = id -- handled in LIST addBlock _ = id children :: Node -> [Node] children (Node _ _ ns) = ns addInlines :: [Node] -> [Inline] addInlines = foldr addInline [] addInline :: Node -> [Inline] -> [Inline] addInline (Node _ (TEXT t) _) = (map toinl clumps ++) where raw = unpack t clumps = groupBy samekind raw samekind ' ' ' ' = True samekind ' ' _ = False samekind _ ' ' = False samekind _ _ = True toinl (' ':_) = Space toinl xs = Str xs addInline (Node _ LINEBREAK _) = (LineBreak :) addInline (Node _ SOFTBREAK _) = (SoftBreak :) addInline (Node _ (HTML_INLINE t) _) = (RawInline (Format "html") (unpack t) :) -- Note: the cmark parser will never generate CUSTOM_BLOCK, -- so we don't need to handle it: addInline (Node _ (CUSTOM_INLINE _onEnter _onExit) _nodes) = id addInline (Node _ (CODE t) _) = (Code ("",[],[]) (unpack t) :) addInline (Node _ EMPH nodes) = (Emph (addInlines nodes) :) addInline (Node _ STRONG nodes) = (Strong (addInlines nodes) :) addInline (Node _ (LINK url title) nodes) = (Link nullAttr (addInlines nodes) (unpack url, unpack title) :) addInline (Node _ (IMAGE url title) nodes) = (Image nullAttr (addInlines nodes) (unpack url, unpack title) :) addInline _ = id pandoc-1.19.2.4/src/Text/Pandoc/Readers/MediaWiki.hs0000644000000000000000000005644313155240142020114 0ustar0000000000000000{-# LANGUAGE RelaxedPolyRec, FlexibleInstances, TypeSynonymInstances #-} -- RelaxedPolyRec needed for inlinesBetween on GHC < 7 {- Copyright (C) 2012-2015 John MacFarlane 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.Readers.MediaWiki Copyright : Copyright (C) 2012-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of mediawiki text to 'Pandoc' document. -} {- TODO: _ correctly handle tables within tables _ parse templates? -} 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 Data.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 Control.Monad import Data.List (intersperse, intercalate, isPrefixOf ) import Text.HTML.TagSoup import Data.Sequence (viewl, ViewL(..), (<|)) import qualified Data.Foldable as F import qualified Data.Map as M import qualified Data.Set as Set import Data.Char (isDigit, isSpace) import Data.Maybe (fromMaybe) import Text.Printf (printf) import Debug.Trace (trace) import Text.Pandoc.Error -- | Read mediawiki from an input string and return a Pandoc document. readMediaWiki :: ReaderOptions -- ^ Reader options -> String -- ^ String to parse (assuming @'\n'@ line endings) -> Either PandocError Pandoc readMediaWiki opts s = readWith parseMediaWiki MWState{ mwOptions = opts , mwMaxNestingLevel = 4 , mwNextLinkNumber = 1 , mwCategoryLinks = [] , mwHeaderMap = M.empty , mwIdentifierList = Set.empty } (s ++ "\n") data MWState = MWState { mwOptions :: ReaderOptions , mwMaxNestingLevel :: Int , mwNextLinkNumber :: Int , mwCategoryLinks :: [Inlines] , mwHeaderMap :: M.Map Inlines String , mwIdentifierList :: Set.Set String } type MWParser = Parser [Char] MWState instance HasReaderOptions MWState where extractReaderOptions = mwOptions instance HasHeaderMap MWState where extractHeaderMap = mwHeaderMap updateHeaderMap f st = st{ mwHeaderMap = f $ mwHeaderMap st } instance HasIdentifierList MWState where extractIdentifierList = mwIdentifierList updateIdentifierList f st = st{ mwIdentifierList = f $ mwIdentifierList st } -- -- auxiliary functions -- -- This is used to prevent exponential blowups for things like: -- ''a'''a''a'''a''a'''a''a'''a nested :: MWParser a -> MWParser a nested p = do nestlevel <- mwMaxNestingLevel `fmap` getState guard $ nestlevel > 0 updateState $ \st -> st{ mwMaxNestingLevel = mwMaxNestingLevel st - 1 } res <- p updateState $ \st -> st{ mwMaxNestingLevel = nestlevel } return res specialChars :: [Char] specialChars = "'[]<=&*{}|\":\\" spaceChars :: [Char] spaceChars = " \n\t" sym :: String -> MWParser () sym s = () <$ try (string s) newBlockTags :: [String] newBlockTags = ["haskell","syntaxhighlight","source","gallery","references"] isBlockTag' :: Tag String -> Bool isBlockTag' tag@(TagOpen t _) = (isBlockTag tag || t `elem` newBlockTags) && t `notElem` eitherBlockOrInline isBlockTag' tag@(TagClose t) = (isBlockTag tag || t `elem` newBlockTags) && t `notElem` eitherBlockOrInline isBlockTag' tag = isBlockTag tag isInlineTag' :: Tag String -> Bool isInlineTag' (TagComment _) = True isInlineTag' t = not (isBlockTag' t) eitherBlockOrInline :: [String] eitherBlockOrInline = ["applet", "button", "del", "iframe", "ins", "map", "area", "object"] htmlComment :: MWParser () htmlComment = () <$ htmlTag isCommentTag inlinesInTags :: String -> MWParser Inlines inlinesInTags tag = try $ do (_,raw) <- htmlTag (~== TagOpen tag []) if '/' `elem` raw -- self-closing tag then return mempty else trimInlines . mconcat <$> manyTill inline (htmlTag (~== TagClose tag)) blocksInTags :: String -> MWParser Blocks blocksInTags tag = try $ do (_,raw) <- htmlTag (~== TagOpen tag []) let closer = if tag == "li" then htmlTag (~== TagClose "li") <|> lookAhead ( htmlTag (~== TagOpen "li" []) <|> htmlTag (~== TagClose "ol") <|> htmlTag (~== TagClose "ul")) else htmlTag (~== TagClose tag) if '/' `elem` raw -- self-closing tag then return mempty else mconcat <$> manyTill block closer charsInTags :: String -> MWParser [Char] charsInTags tag = try $ do (_,raw) <- htmlTag (~== TagOpen tag []) if '/' `elem` raw -- self-closing tag then return "" else manyTill anyChar (htmlTag (~== TagClose tag)) -- -- main parser -- parseMediaWiki :: MWParser Pandoc parseMediaWiki = do bs <- mconcat <$> many block spaces eof categoryLinks <- reverse . mwCategoryLinks <$> getState let categories = if null categoryLinks then mempty else B.para $ mconcat $ intersperse B.space categoryLinks return $ B.doc $ bs <> categories -- -- block parsers -- block :: MWParser Blocks block = do tr <- getOption readerTrace pos <- getPosition res <- mempty <$ skipMany1 blankline <|> table <|> header <|> hrule <|> orderedList <|> bulletList <|> definitionList <|> mempty <$ try (spaces *> htmlComment) <|> preformatted <|> blockTag <|> (B.rawBlock "mediawiki" <$> template) <|> para when tr $ trace (printf "line %d: %s" (sourceLine pos) (take 60 $ show $ B.toList res)) (return ()) return res para :: MWParser Blocks para = do contents <- trimInlines . mconcat <$> many1 inline if F.all (==Space) contents then return mempty else return $ B.para contents table :: MWParser Blocks table = do tableStart styles <- option [] parseAttrs <* blankline let tableWidth = case lookup "width" styles of Just w -> fromMaybe 1.0 $ parseWidth w Nothing -> 1.0 caption <- option mempty tableCaption optional rowsep hasheader <- option False $ True <$ (lookAhead (skipSpaces *> char '!')) (cellspecs',hdr) <- unzip <$> tableRow let widths = map ((tableWidth *) . snd) cellspecs' let restwidth = tableWidth - sum widths let zerocols = length $ filter (==0.0) widths let defaultwidth = if zerocols == 0 || zerocols == length widths then 0.0 else restwidth / fromIntegral zerocols let widths' = map (\w -> if w == 0 then defaultwidth else w) widths let cellspecs = zip (map fst cellspecs') widths' rows' <- many $ try $ rowsep *> (map snd <$> tableRow) optional blanklines tableEnd let cols = length hdr let (headers,rows) = if hasheader then (hdr, rows') else (replicate cols mempty, hdr:rows') return $ B.table caption cellspecs headers rows parseAttrs :: MWParser [(String,String)] parseAttrs = many1 parseAttr parseAttr :: MWParser (String, String) parseAttr = try $ do skipMany spaceChar k <- many1 letter char '=' v <- (char '"' >> many1Till (satisfy (/='\n')) (char '"')) <|> many1 (satisfy $ \c -> not (isSpace c) && c /= '|') return (k,v) tableStart :: MWParser () tableStart = try $ guardColumnOne *> skipSpaces *> sym "{|" tableEnd :: MWParser () tableEnd = try $ guardColumnOne *> skipSpaces *> sym "|}" rowsep :: MWParser () rowsep = try $ guardColumnOne *> skipSpaces *> sym "|-" <* optional parseAttr <* blanklines cellsep :: MWParser () cellsep = try $ (guardColumnOne *> skipSpaces <* ( (char '|' <* notFollowedBy (oneOf "-}+")) <|> (char '!') ) ) <|> (() <$ try (string "||")) <|> (() <$ try (string "!!")) tableCaption :: MWParser Inlines tableCaption = try $ do guardColumnOne skipSpaces sym "|+" optional (try $ parseAttr *> skipSpaces *> char '|' *> skipSpaces) (trimInlines . mconcat) <$> many (notFollowedBy (cellsep <|> rowsep) *> inline) tableRow :: MWParser [((Alignment, Double), Blocks)] tableRow = try $ skipMany htmlComment *> many tableCell tableCell :: MWParser ((Alignment, Double), Blocks) tableCell = try $ do cellsep skipMany spaceChar attrs <- option [] $ try $ parseAttrs <* skipSpaces <* char '|' <* notFollowedBy (char '|') skipMany spaceChar ls <- concat <$> many (notFollowedBy (cellsep <|> rowsep <|> tableEnd) *> ((snd <$> withRaw table) <|> count 1 anyChar)) bs <- parseFromString (mconcat <$> many block) ls let align = case lookup "align" attrs of Just "left" -> AlignLeft Just "right" -> AlignRight Just "center" -> AlignCenter _ -> AlignDefault let width = case lookup "width" attrs of Just xs -> fromMaybe 0.0 $ parseWidth xs Nothing -> 0.0 return ((align, width), bs) parseWidth :: String -> Maybe Double parseWidth s = case reverse s of ('%':ds) | all isDigit ds -> safeRead ('0':'.':reverse ds) _ -> Nothing template :: MWParser String template = try $ do string "{{" notFollowedBy (char '{') lookAhead $ letter <|> digit <|> char ':' let chunk = template <|> variable <|> many1 (noneOf "{}") <|> count 1 anyChar contents <- manyTill chunk (try $ string "}}") return $ "{{" ++ concat contents ++ "}}" blockTag :: MWParser Blocks blockTag = do (tag, _) <- lookAhead $ htmlTag isBlockTag' case tag of TagOpen "blockquote" _ -> B.blockQuote <$> blocksInTags "blockquote" TagOpen "pre" _ -> B.codeBlock . trimCode <$> charsInTags "pre" TagOpen "syntaxhighlight" attrs -> syntaxhighlight "syntaxhighlight" attrs TagOpen "source" attrs -> syntaxhighlight "source" attrs TagOpen "haskell" _ -> B.codeBlockWith ("",["haskell"],[]) . trimCode <$> charsInTags "haskell" TagOpen "gallery" _ -> blocksInTags "gallery" TagOpen "p" _ -> mempty <$ htmlTag (~== tag) TagClose "p" -> mempty <$ htmlTag (~== tag) _ -> B.rawBlock "html" . snd <$> htmlTag (~== tag) trimCode :: String -> String trimCode ('\n':xs) = stripTrailingNewlines xs trimCode xs = stripTrailingNewlines xs syntaxhighlight :: String -> [Attribute String] -> MWParser Blocks syntaxhighlight tag attrs = try $ do let mblang = lookup "lang" attrs let mbstart = lookup "start" attrs let mbline = lookup "line" attrs let classes = maybe [] (:[]) mblang ++ maybe [] (const ["numberLines"]) mbline let kvs = maybe [] (\x -> [("startFrom",x)]) mbstart contents <- charsInTags tag return $ B.codeBlockWith ("",classes,kvs) $ trimCode contents hrule :: MWParser Blocks hrule = B.horizontalRule <$ try (string "----" *> many (char '-') *> newline) guardColumnOne :: MWParser () guardColumnOne = getPosition >>= \pos -> guard (sourceColumn pos == 1) preformatted :: MWParser Blocks preformatted = try $ do guardColumnOne char ' ' let endline' = B.linebreak <$ (try $ newline <* char ' ') let whitespace' = B.str <$> many1 ('\160' <$ spaceChar) let spToNbsp ' ' = '\160' spToNbsp x = x let nowiki' = mconcat . intersperse B.linebreak . map B.str . lines . fromEntities . map spToNbsp <$> try (htmlTag (~== TagOpen "nowiki" []) *> manyTill anyChar (htmlTag (~== TagClose "nowiki"))) let inline' = whitespace' <|> endline' <|> nowiki' <|> (try $ notFollowedBy newline *> inline) contents <- mconcat <$> many1 inline' let spacesStr (Str xs) = all isSpace xs spacesStr _ = False if F.all spacesStr contents then return mempty else return $ B.para $ encode contents encode :: Inlines -> Inlines encode = B.fromList . normalizeCode . B.toList . walk strToCode where strToCode (Str s) = Code ("",[],[]) s strToCode Space = Code ("",[],[]) " " strToCode x = x normalizeCode [] = [] normalizeCode (Code a1 x : Code a2 y : zs) | a1 == a2 = normalizeCode $ (Code a1 (x ++ y)) : zs normalizeCode (x:xs) = x : normalizeCode xs header :: MWParser Blocks header = try $ do guardColumnOne eqs <- many1 (char '=') let lev = length eqs guard $ lev <= 6 contents <- trimInlines . mconcat <$> manyTill inline (count lev $ char '=') attr <- registerHeader nullAttr contents return $ B.headerWith attr lev contents bulletList :: MWParser Blocks bulletList = B.bulletList <$> ( many1 (listItem '*') <|> (htmlTag (~== TagOpen "ul" []) *> spaces *> many (listItem '*' <|> li) <* optional (htmlTag (~== TagClose "ul"))) ) orderedList :: MWParser Blocks orderedList = (B.orderedList <$> many1 (listItem '#')) <|> try (do (tag,_) <- htmlTag (~== TagOpen "ol" []) spaces items <- many (listItem '#' <|> li) optional (htmlTag (~== TagClose "ol")) let start = fromMaybe 1 $ safeRead $ fromAttrib "start" tag return $ B.orderedListWith (start, DefaultStyle, DefaultDelim) items) definitionList :: MWParser Blocks definitionList = B.definitionList <$> many1 defListItem defListItem :: MWParser (Inlines, [Blocks]) defListItem = try $ do terms <- mconcat . intersperse B.linebreak <$> many defListTerm -- we allow dd with no dt, or dt with no dd defs <- if B.isNull terms then notFollowedBy (try $ skipMany1 (char ':') >> string "") *> many1 (listItem ':') else many (listItem ':') return (terms, defs) defListTerm :: MWParser Inlines defListTerm = char ';' >> skipMany spaceChar >> anyLine >>= parseFromString (trimInlines . mconcat <$> many inline) listStart :: Char -> MWParser () listStart c = char c *> notFollowedBy listStartChar listStartChar :: MWParser Char listStartChar = oneOf "*#;:" anyListStart :: MWParser Char anyListStart = char '*' <|> char '#' <|> char ':' <|> char ';' li :: MWParser Blocks li = lookAhead (htmlTag (~== TagOpen "li" [])) *> (firstParaToPlain <$> blocksInTags "li") <* spaces listItem :: Char -> MWParser Blocks listItem c = try $ do extras <- many (try $ char c <* lookAhead listStartChar) if null extras then listItem' c else do skipMany spaceChar first <- concat <$> manyTill listChunk newline rest <- many (try $ string extras *> lookAhead listStartChar *> (concat <$> manyTill listChunk newline)) contents <- parseFromString (many1 $ listItem' c) (unlines (first : rest)) case c of '*' -> return $ B.bulletList contents '#' -> return $ B.orderedList contents ':' -> return $ B.definitionList [(mempty, contents)] _ -> mzero -- The point of this is to handle stuff like -- * {{cite book -- | blah -- | blah -- }} -- * next list item -- which seems to be valid mediawiki. listChunk :: MWParser String listChunk = template <|> count 1 anyChar listItem' :: Char -> MWParser Blocks listItem' c = try $ do listStart c skipMany spaceChar first <- concat <$> manyTill listChunk newline rest <- many (try $ char c *> lookAhead listStartChar *> (concat <$> manyTill listChunk newline)) parseFromString (firstParaToPlain . mconcat <$> many1 block) $ unlines $ first : rest firstParaToPlain :: Blocks -> Blocks firstParaToPlain contents = case viewl (B.unMany contents) of (Para xs) :< ys -> B.Many $ (Plain xs) <| ys _ -> contents -- -- inline parsers -- inline :: MWParser Inlines inline = whitespace <|> url <|> str <|> doubleQuotes <|> strong <|> emph <|> image <|> internalLink <|> externalLink <|> math <|> inlineTag <|> B.singleton <$> charRef <|> inlineHtml <|> (B.rawInline "mediawiki" <$> variable) <|> (B.rawInline "mediawiki" <$> template) <|> special str :: MWParser Inlines str = B.str <$> many1 (noneOf $ specialChars ++ spaceChars) math :: MWParser Inlines math = (B.displayMath . trim <$> try (many1 (char ':') >> charsInTags "math")) <|> (B.math . trim <$> charsInTags "math") <|> (B.displayMath . trim <$> try (dmStart *> manyTill anyChar dmEnd)) <|> (B.math . trim <$> try (mStart *> manyTill (satisfy (/='\n')) mEnd)) where dmStart = string "\\[" dmEnd = try (string "\\]") mStart = string "\\(" mEnd = try (string "\\)") variable :: MWParser String variable = try $ do string "{{{" contents <- manyTill anyChar (try $ string "}}}") return $ "{{{" ++ contents ++ "}}}" inlineTag :: MWParser Inlines inlineTag = do (tag, _) <- lookAhead $ htmlTag isInlineTag' case tag of TagOpen "ref" _ -> B.note . B.plain <$> inlinesInTags "ref" TagOpen "nowiki" _ -> try $ do (_,raw) <- htmlTag (~== tag) if '/' `elem` raw then return mempty else B.text . fromEntities <$> manyTill anyChar (htmlTag (~== TagClose "nowiki")) TagOpen "br" _ -> B.linebreak <$ (htmlTag (~== TagOpen "br" []) -- will get /> too *> optional blankline) TagOpen "strike" _ -> B.strikeout <$> inlinesInTags "strike" TagOpen "del" _ -> B.strikeout <$> inlinesInTags "del" TagOpen "sub" _ -> B.subscript <$> inlinesInTags "sub" TagOpen "sup" _ -> B.superscript <$> inlinesInTags "sup" TagOpen "code" _ -> encode <$> inlinesInTags "code" TagOpen "tt" _ -> encode <$> inlinesInTags "tt" TagOpen "hask" _ -> B.codeWith ("",["haskell"],[]) <$> charsInTags "hask" _ -> B.rawInline "html" . snd <$> htmlTag (~== tag) special :: MWParser Inlines special = B.str <$> count 1 (notFollowedBy' (htmlTag isBlockTag') *> oneOf specialChars) inlineHtml :: MWParser Inlines inlineHtml = B.rawInline "html" . snd <$> htmlTag isInlineTag' whitespace :: MWParser Inlines whitespace = B.space <$ (skipMany1 spaceChar <|> htmlComment) <|> B.softbreak <$ endline endline :: MWParser () endline = () <$ try (newline <* notFollowedBy spaceChar <* notFollowedBy newline <* notFollowedBy' hrule <* notFollowedBy tableStart <* notFollowedBy' header <* notFollowedBy anyListStart) imageIdentifiers :: [MWParser ()] imageIdentifiers = [sym (identifier ++ ":") | identifier <- identifiers] where identifiers = ["File", "Image", "Archivo", "Datei", "Fichier", "Bild"] image :: MWParser Inlines image = try $ do sym "[[" choice imageIdentifiers fname <- addUnderscores <$> many1 (noneOf "|]") _ <- many imageOption dims <- try (char '|' *> (sepBy (many digit) (char 'x')) <* string "px") <|> return [] _ <- many imageOption let kvs = case dims of w:[] -> [("width", w)] w:(h:[]) -> [("width", w), ("height", h)] _ -> [] let attr = ("", [], kvs) caption <- (B.str fname <$ sym "]]") <|> try (char '|' *> (mconcat <$> manyTill inline (sym "]]"))) return $ B.imageWith attr fname ("fig:" ++ stringify caption) caption imageOption :: MWParser String imageOption = try $ char '|' *> opt where opt = try (oneOfStrings [ "border", "thumbnail", "frameless" , "thumb", "upright", "left", "right" , "center", "none", "baseline", "sub" , "super", "top", "text-top", "middle" , "bottom", "text-bottom" ]) <|> try (string "frame") <|> try (oneOfStrings ["link=","alt=","page=","class="] <* many (noneOf "|]")) collapseUnderscores :: String -> String collapseUnderscores [] = [] collapseUnderscores ('_':'_':xs) = collapseUnderscores ('_':xs) collapseUnderscores (x:xs) = x : collapseUnderscores xs addUnderscores :: String -> String addUnderscores = collapseUnderscores . intercalate "_" . words internalLink :: MWParser Inlines internalLink = try $ do sym "[[" pagename <- unwords . words <$> many (noneOf "|]") label <- option (B.text pagename) $ char '|' *> ( (mconcat <$> many1 (notFollowedBy (char ']') *> inline)) -- the "pipe trick" -- [[Help:Contents|] -> "Contents" <|> (return $ B.text $ drop 1 $ dropWhile (/=':') pagename) ) sym "]]" linktrail <- B.text <$> many letter let link = B.link (addUnderscores pagename) "wikilink" (label <> linktrail) if "Category:" `isPrefixOf` pagename then do updateState $ \st -> st{ mwCategoryLinks = link : mwCategoryLinks st } return mempty else return link externalLink :: MWParser Inlines externalLink = try $ do char '[' (_, src) <- uri lab <- try (trimInlines . mconcat <$> (skipMany1 spaceChar *> manyTill inline (char ']'))) <|> do char ']' num <- mwNextLinkNumber <$> getState updateState $ \st -> st{ mwNextLinkNumber = num + 1 } return $ B.str $ show num return $ B.link src "" lab url :: MWParser Inlines url = do (orig, src) <- uri return $ B.link src "" (B.str orig) -- | Parses a list of inlines between start and end delimiters. inlinesBetween :: (Show b) => MWParser a -> MWParser b -> MWParser Inlines inlinesBetween start end = (trimInlines . mconcat) <$> try (start >> many1Till inner end) where inner = innerSpace <|> (notFollowedBy' (() <$ whitespace) >> inline) innerSpace = try $ whitespace <* notFollowedBy' end emph :: MWParser Inlines emph = B.emph <$> nested (inlinesBetween start end) where start = sym "''" >> lookAhead nonspaceChar end = try $ notFollowedBy' (() <$ strong) >> sym "''" strong :: MWParser Inlines strong = B.strong <$> nested (inlinesBetween start end) where start = sym "'''" >> lookAhead nonspaceChar end = try $ sym "'''" doubleQuotes :: MWParser Inlines doubleQuotes = B.doubleQuoted <$> nested (inlinesBetween openDoubleQuote closeDoubleQuote) where openDoubleQuote = sym "\"" >> lookAhead nonspaceChar closeDoubleQuote = try $ sym "\"" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/RST.hs������������������������������������������������������0000644�0000000�0000000�00000130513�13155240142�016710� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {- Copyright (C) 2006-2015 John MacFarlane 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.Readers.RST Copyright : Copyright (C) 2006-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion from reStructuredText to 'Pandoc' document. -} module Text.Pandoc.Readers.RST ( readRST, readRSTWithWarnings ) where import Text.Pandoc.Definition import Text.Pandoc.Builder (setMeta, fromList) import Text.Pandoc.Shared import Text.Pandoc.Parsing import Text.Pandoc.Options import Control.Monad ( when, liftM, guard, mzero ) import Data.List ( findIndex, intercalate, transpose, sort, deleteFirstsBy, isSuffixOf , nub, union) import Data.Maybe (fromMaybe) import qualified Data.Map as M import Text.Printf ( printf ) import Text.Pandoc.Builder (Inlines, Blocks, trimInlines) import qualified Text.Pandoc.Builder as B import Data.Sequence (viewr, ViewR(..)) import Data.Char (toLower, isHexDigit, isSpace) import Data.Monoid ((<>)) import Text.Pandoc.Error -- | Parse reStructuredText string and return Pandoc document. readRST :: ReaderOptions -- ^ Reader options -> String -- ^ String to parse (assuming @'\n'@ line endings) -> Either PandocError Pandoc readRST opts s = (readWith parseRST) def{ stateOptions = opts } (s ++ "\n\n") readRSTWithWarnings :: ReaderOptions -> String -> Either PandocError (Pandoc, [String]) readRSTWithWarnings opts s = (readWithWarnings parseRST) def{ stateOptions = opts } (s ++ "\n\n") type RSTParser = Parser [Char] ParserState -- -- Constants and data structure definitions --- bulletListMarkers :: [Char] bulletListMarkers = "*+-" underlineChars :: [Char] underlineChars = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" -- treat these as potentially non-text when parsing inline: specialChars :: [Char] specialChars = "\\`|*_<>$:/[]{}()-.\"'\8216\8217\8220\8221" -- -- parsing documents -- isHeader :: Int -> Block -> Bool isHeader n (Header x _ _) = x == n isHeader _ _ = False -- | Promote all headers in a list of blocks. (Part of -- title transformation for RST.) promoteHeaders :: Int -> [Block] -> [Block] promoteHeaders num ((Header level attr text):rest) = (Header (level - num) attr text):(promoteHeaders num rest) promoteHeaders num (other:rest) = other:(promoteHeaders num rest) promoteHeaders _ [] = [] -- | If list of blocks starts with a header (or a header and subheader) -- of level that are not found elsewhere, return it as a title and -- promote all the other headers. Also process a definition list right -- after the title block as metadata. titleTransform :: ([Block], Meta) -- ^ list of blocks, metadata -> ([Block], Meta) -- ^ modified list of blocks, metadata titleTransform (bs, meta) = let (bs', meta') = case bs of ((Header 1 _ head1):(Header 2 _ head2):rest) | not (any (isHeader 1) rest || any (isHeader 2) rest) -> -- tit/sub (promoteHeaders 2 rest, setMeta "title" (fromList head1) $ setMeta "subtitle" (fromList head2) meta) ((Header 1 _ head1):rest) | not (any (isHeader 1) rest) -> -- title only (promoteHeaders 1 rest, setMeta "title" (fromList head1) meta) _ -> (bs, meta) in case bs' of (DefinitionList ds : rest) -> (rest, metaFromDefList ds meta') _ -> (bs', meta') metaFromDefList :: [([Inline], [[Block]])] -> Meta -> Meta metaFromDefList ds meta = adjustAuthors $ foldr f meta ds where f (k,v) = setMeta (map toLower $ stringify k) (mconcat $ map fromList v) adjustAuthors (Meta metamap) = Meta $ M.adjust splitAuthors "author" $ M.adjust toPlain "date" $ M.adjust toPlain "title" $ M.mapKeys (\k -> if k == "authors" then "author" else k) $ metamap toPlain (MetaBlocks [Para xs]) = MetaInlines xs toPlain x = x splitAuthors (MetaBlocks [Para xs]) = MetaList $ map MetaInlines $ splitAuthors' xs splitAuthors x = x splitAuthors' = map normalizeSpaces . splitOnSemi . concatMap factorSemi splitOnSemi = splitBy (==Str ";") factorSemi (Str []) = [] factorSemi (Str s) = case break (==';') s of (xs,[]) -> [Str xs] (xs,';':ys) -> Str xs : Str ";" : factorSemi (Str ys) (xs,ys) -> Str xs : factorSemi (Str ys) factorSemi x = [x] parseRST :: RSTParser Pandoc parseRST = do optional blanklines -- skip blank lines at beginning of file startPos <- getPosition -- go through once just to get list of reference keys and notes -- docMinusKeys is the raw document with blanks where the keys were... docMinusKeys <- concat <$> manyTill (referenceKey <|> noteBlock <|> lineClump) eof setInput docMinusKeys setPosition startPos st' <- getState let reversedNotes = stateNotes st' updateState $ \s -> s { stateNotes = reverse reversedNotes } -- now parse it for real... blocks <- B.toList <$> parseBlocks standalone <- getOption readerStandalone state <- getState let meta = stateMeta state let (blocks', meta') = if standalone then titleTransform (blocks, meta) else (blocks, meta) return $ Pandoc meta' blocks' -- -- parsing blocks -- parseBlocks :: RSTParser Blocks parseBlocks = mconcat <$> manyTill block eof block :: RSTParser Blocks block = choice [ codeBlock , blockQuote , fieldList , directive , comment , header , hrule , lineBlock -- must go before definitionList , table , list , lhsCodeBlock , para , mempty <$ blanklines ] "block" -- -- field list -- rawFieldListItem :: Int -> RSTParser (String, String) rawFieldListItem minIndent = try $ do indent <- length <$> many (char ' ') guard $ indent >= minIndent char ':' name <- many1Till (noneOf "\n") (char ':') (() <$ lookAhead newline) <|> skipMany1 spaceChar first <- anyLine rest <- option "" $ try $ do lookAhead (count indent (char ' ') >> spaceChar) indentedBlock let raw = (if null first then "" else (first ++ "\n")) ++ rest ++ "\n" return (name, raw) fieldListItem :: Int -> RSTParser (Inlines, [Blocks]) fieldListItem minIndent = try $ do (name, raw) <- rawFieldListItem minIndent term <- parseInlineFromString name contents <- parseFromString parseBlocks raw optional blanklines return (term, [contents]) fieldList :: RSTParser Blocks fieldList = try $ do indent <- length <$> lookAhead (many spaceChar) items <- many1 $ fieldListItem indent case items of [] -> return mempty items' -> return $ B.definitionList items' -- -- line block -- lineBlock :: RSTParser Blocks lineBlock = try $ do lines' <- lineBlockLines lines'' <- mapM parseInlineFromString lines' return $ B.lineBlock lines'' -- -- paragraph block -- -- note: paragraph can end in a :: starting a code block para :: RSTParser Blocks para = try $ do result <- trimInlines . mconcat <$> many1 inline option (B.plain result) $ try $ do newline blanklines case viewr (B.unMany result) of ys :> (Str xs) | "::" `isSuffixOf` xs -> do raw <- option mempty codeBlockBody return $ B.para (B.Many ys <> B.str (take (length xs - 1) xs)) <> raw _ -> return (B.para result) plain :: RSTParser Blocks plain = B.plain . trimInlines . mconcat <$> many1 inline -- -- header blocks -- header :: RSTParser Blocks header = doubleHeader <|> singleHeader "header" -- a header with lines on top and bottom doubleHeader :: RSTParser Blocks doubleHeader = try $ do c <- oneOf underlineChars rest <- many (char c) -- the top line let lenTop = length (c:rest) skipSpaces newline txt <- trimInlines . mconcat <$> many1 (notFollowedBy blankline >> inline) pos <- getPosition let len = (sourceColumn pos) - 1 if (len > lenTop) then fail "title longer than border" else return () blankline -- spaces and newline count lenTop (char c) -- the bottom line blanklines -- check to see if we've had this kind of header before. -- if so, get appropriate level. if not, add to list. state <- getState let headerTable = stateHeaderTable state let (headerTable',level) = case findIndex (== DoubleHeader c) headerTable of Just ind -> (headerTable, ind + 1) Nothing -> (headerTable ++ [DoubleHeader c], (length headerTable) + 1) setState (state { stateHeaderTable = headerTable' }) attr <- registerHeader nullAttr txt return $ B.headerWith attr level txt -- a header with line on the bottom only singleHeader :: RSTParser Blocks singleHeader = try $ do notFollowedBy' whitespace txt <- trimInlines . mconcat <$> many1 (do {notFollowedBy blankline; inline}) pos <- getPosition let len = (sourceColumn pos) - 1 blankline c <- oneOf underlineChars count (len - 1) (char c) many (char c) blanklines state <- getState let headerTable = stateHeaderTable state let (headerTable',level) = case findIndex (== SingleHeader c) headerTable of Just ind -> (headerTable, ind + 1) Nothing -> (headerTable ++ [SingleHeader c], (length headerTable) + 1) setState (state { stateHeaderTable = headerTable' }) attr <- registerHeader nullAttr txt return $ B.headerWith attr level txt -- -- hrule block -- hrule :: Parser [Char] st Blocks hrule = try $ do chr <- oneOf underlineChars count 3 (char chr) skipMany (char chr) blankline blanklines return B.horizontalRule -- -- code blocks -- -- read a line indented by a given string indentedLine :: String -> Parser [Char] st [Char] indentedLine indents = try $ do string indents anyLine -- one or more indented lines, possibly separated by blank lines. -- any amount of indentation will work. indentedBlock :: Parser [Char] st [Char] indentedBlock = try $ do indents <- lookAhead $ many1 spaceChar lns <- many1 $ try $ do b <- option "" blanklines l <- indentedLine indents return (b ++ l) optional blanklines return $ unlines lns quotedBlock :: Parser [Char] st [Char] quotedBlock = try $ do quote <- lookAhead $ oneOf "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" lns <- many1 $ lookAhead (char quote) >> anyLine optional blanklines return $ unlines lns codeBlockStart :: Parser [Char] st Char codeBlockStart = string "::" >> blankline >> blankline codeBlock :: Parser [Char] st Blocks codeBlock = try $ codeBlockStart >> codeBlockBody codeBlockBody :: Parser [Char] st Blocks codeBlockBody = try $ B.codeBlock . stripTrailingNewlines <$> (indentedBlock <|> quotedBlock) lhsCodeBlock :: RSTParser Blocks lhsCodeBlock = try $ do getPosition >>= guard . (==1) . sourceColumn guardEnabled Ext_literate_haskell optional codeBlockStart lns <- latexCodeBlock <|> birdCodeBlock blanklines return $ B.codeBlockWith ("", ["sourceCode", "literate", "haskell"], []) $ intercalate "\n" lns latexCodeBlock :: Parser [Char] st [[Char]] latexCodeBlock = try $ do try (latexBlockLine "\\begin{code}") many1Till anyLine (try $ latexBlockLine "\\end{code}") where latexBlockLine s = skipMany spaceChar >> string s >> blankline birdCodeBlock :: Parser [Char] st [[Char]] birdCodeBlock = filterSpace <$> many1 birdTrackLine where filterSpace lns = -- if (as is normal) there is always a space after >, drop it if all (\ln -> null ln || take 1 ln == " ") lns then map (drop 1) lns else lns birdTrackLine :: Parser [Char] st [Char] birdTrackLine = char '>' >> anyLine -- -- block quotes -- blockQuote :: RSTParser Blocks blockQuote = do raw <- indentedBlock -- parse the extracted block, which may contain various block elements: contents <- parseFromString parseBlocks $ raw ++ "\n\n" return $ B.blockQuote contents -- -- list blocks -- list :: RSTParser Blocks list = choice [ bulletList, orderedList, definitionList ] "list" definitionListItem :: RSTParser (Inlines, [Blocks]) definitionListItem = try $ do -- avoid capturing a directive or comment notFollowedBy (try $ char '.' >> char '.') term <- trimInlines . mconcat <$> many1Till inline endline raw <- indentedBlock -- parse the extracted block, which may contain various block elements: contents <- parseFromString parseBlocks $ raw ++ "\n" return (term, [contents]) definitionList :: RSTParser Blocks definitionList = B.definitionList <$> many1 definitionListItem -- parses bullet list start and returns its length (inc. following whitespace) bulletListStart :: Parser [Char] st Int bulletListStart = try $ do notFollowedBy' hrule -- because hrules start out just like lists marker <- oneOf bulletListMarkers white <- many1 spaceChar return $ length (marker:white) -- parses ordered list start and returns its length (inc following whitespace) orderedListStart :: ListNumberStyle -> ListNumberDelim -> RSTParser Int orderedListStart style delim = try $ do (_, markerLen) <- withHorizDisplacement (orderedListMarker style delim) white <- many1 spaceChar return $ markerLen + length white -- parse a line of a list item listLine :: Int -> RSTParser [Char] listLine markerLength = try $ do notFollowedBy blankline indentWith markerLength line <- anyLine return $ line ++ "\n" -- indent by specified number of spaces (or equiv. tabs) indentWith :: Int -> RSTParser [Char] indentWith num = do tabStop <- getOption readerTabStop if (num < tabStop) then count num (char ' ') else choice [ try (count num (char ' ')), (try (char '\t' >> count (num - tabStop) (char ' '))) ] -- parse raw text for one list item, excluding start marker and continuations rawListItem :: RSTParser Int -> RSTParser (Int, [Char]) rawListItem start = try $ do markerLength <- start firstLine <- anyLine restLines <- many (listLine markerLength) return (markerLength, (firstLine ++ "\n" ++ (concat restLines))) -- continuation of a list item - indented and separated by blankline or -- (in compact lists) endline. -- Note: nested lists are parsed as continuations. listContinuation :: Int -> RSTParser [Char] listContinuation markerLength = try $ do blanks <- many1 blankline result <- many1 (listLine markerLength) return $ blanks ++ concat result listItem :: RSTParser Int -> RSTParser Blocks listItem start = try $ do (markerLength, first) <- rawListItem start rest <- many (listContinuation markerLength) blanks <- choice [ try (many blankline <* lookAhead start), many1 blankline ] -- whole list must end with blank. -- parsing with ListItemState forces markers at beginning of lines to -- count as list item markers, even if not separated by blank space. -- see definition of "endline" state <- getState let oldContext = stateParserContext state setState $ state {stateParserContext = ListItemState} -- parse the extracted block, which may itself contain block elements parsed <- parseFromString parseBlocks $ concat (first:rest) ++ blanks updateState (\st -> st {stateParserContext = oldContext}) return $ case B.toList parsed of [Para xs] -> B.singleton $ Plain xs [Para xs, BulletList ys] -> B.fromList [Plain xs, BulletList ys] [Para xs, OrderedList s ys] -> B.fromList [Plain xs, OrderedList s ys] [Para xs, DefinitionList ys] -> B.fromList [Plain xs, DefinitionList ys] _ -> parsed orderedList :: RSTParser Blocks orderedList = try $ do (start, style, delim) <- lookAhead (anyOrderedListMarker <* spaceChar) items <- many1 (listItem (orderedListStart style delim)) let items' = compactify' items return $ B.orderedListWith (start, style, delim) items' bulletList :: RSTParser Blocks bulletList = B.bulletList . compactify' <$> many1 (listItem bulletListStart) -- -- directive (e.g. comment, container, compound-paragraph) -- comment :: RSTParser Blocks comment = try $ do string ".." skipMany1 spaceChar <|> (() <$ lookAhead newline) notFollowedBy' directiveLabel manyTill anyChar blanklines optional indentedBlock return mempty directiveLabel :: RSTParser String directiveLabel = map toLower <$> many1Till (letter <|> char '-') (try $ string "::") directive :: RSTParser Blocks directive = try $ do string ".." directive' -- TODO: line-block, parsed-literal, table, csv-table, list-table -- date -- include -- title directive' :: RSTParser Blocks directive' = do skipMany1 spaceChar label <- directiveLabel skipMany spaceChar top <- many $ satisfy (/='\n') <|> try (char '\n' <* notFollowedBy' (rawFieldListItem 3) <* count 3 (char ' ') <* notFollowedBy blankline) newline fields <- many $ rawFieldListItem 3 body <- option "" $ try $ blanklines >> indentedBlock optional blanklines let body' = body ++ "\n\n" imgAttr cl = ("", classes, getAtt "width" ++ getAtt "height") where classes = words $ maybe "" trim $ lookup cl fields getAtt k = case lookup k fields of Just v -> [(k, filter (not . isSpace) v)] Nothing -> [] case label of "raw" -> return $ B.rawBlock (trim top) (stripTrailingNewlines body) "role" -> addNewRole top $ map (\(k,v) -> (k, trim v)) fields "container" -> parseFromString parseBlocks body' "replace" -> B.para <$> -- consumed by substKey parseInlineFromString (trim top) "unicode" -> B.para <$> -- consumed by substKey parseInlineFromString (trim $ unicodeTransform top) "compound" -> parseFromString parseBlocks body' "pull-quote" -> B.blockQuote <$> parseFromString parseBlocks body' "epigraph" -> B.blockQuote <$> parseFromString parseBlocks body' "highlights" -> B.blockQuote <$> parseFromString parseBlocks body' "rubric" -> B.para . B.strong <$> parseInlineFromString top _ | label `elem` ["attention","caution","danger","error","hint", "important","note","tip","warning"] -> do bod <- parseFromString parseBlocks $ top ++ "\n\n" ++ body' return $ B.divWith ("",["admonition", label],[]) bod "admonition" -> do bod <- parseFromString parseBlocks $ top ++ "\n\n" ++ body' return $ B.divWith ("",["admonition"],[]) bod "sidebar" -> do let subtit = maybe "" trim $ lookup "subtitle" fields tit <- B.para . B.strong <$> parseInlineFromString (trim top ++ if null subtit then "" else (": " ++ subtit)) bod <- parseFromString parseBlocks body' return $ B.divWith ("",["sidebar"],[]) $ tit <> bod "topic" -> do tit <- B.para . B.strong <$> parseInlineFromString top bod <- parseFromString parseBlocks body' return $ B.divWith ("",["topic"],[]) $ tit <> bod "default-role" -> mempty <$ updateState (\s -> s { stateRstDefaultRole = case trim top of "" -> stateRstDefaultRole def role -> role }) x | x == "code" || x == "code-block" -> codeblock (words $ fromMaybe [] $ lookup "class" fields) (lookup "number-lines" fields) (trim top) body "aafig" -> do let attribs = ("", ["aafig"], map (\(k,v) -> (k, trimr v)) fields) return $ B.codeBlockWith attribs $ stripTrailingNewlines body "math" -> return $ B.para $ mconcat $ map B.displayMath $ toChunks $ top ++ "\n\n" ++ body "figure" -> do (caption, legend) <- parseFromString extractCaption body' let src = escapeURI $ trim top return $ B.para (B.imageWith (imgAttr "figclass") src "fig:" caption) <> legend "image" -> do let src = escapeURI $ trim top let alt = B.str $ maybe "image" trim $ lookup "alt" fields let attr = imgAttr "class" return $ B.para $ case lookup "target" fields of Just t -> B.link (escapeURI $ trim t) "" $ B.imageWith attr src "" alt Nothing -> B.imageWith attr src "" alt "class" -> do let attrs = ("", (splitBy isSpace $ trim top), map (\(k,v) -> (k, trimr v)) fields) -- directive content or the first immediately following element children <- case body of "" -> block _ -> parseFromString parseBlocks body' return $ B.divWith attrs children other -> do pos <- getPosition addWarning (Just pos) $ "ignoring unknown directive: " ++ other return mempty -- TODO: -- - 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 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 baseRole == "code" then lookup "language" fields else Nothing attr = let (ident, classes, keyValues) = baseAttr -- nub in case role name & language class are the same in (ident, nub . (role :) . annotate $ classes, keyValues) -- warn about syntax we ignore flip mapM_ fields $ \(key, _) -> case key of "language" -> when (baseRole /= "code") $ addWarning Nothing $ "ignoring :language: field because the parent of role :" ++ role ++ ": is :" ++ baseRole ++ ": not :code:" "format" -> when (baseRole /= "raw") $ addWarning Nothing $ "ignoring :format: field because the parent of role :" ++ role ++ ": is :" ++ baseRole ++ ": not :raw:" _ -> addWarning Nothing $ "ignoring unknown field :" ++ key ++ ": in definition of role :" ++ role ++ ": in" when (parentRole == "raw" && countKeys "format" > 1) $ addWarning Nothing $ "ignoring :format: fields after the first in the definition of role :" ++ role ++": in" when (parentRole == "code" && countKeys "language" > 1) $ addWarning Nothing $ "ignoring :language: fields after the first in the definition of role :" ++ role ++": in" updateState $ \s -> s { stateRstCustomRoles = M.insert role (baseRole, fmt, attr) customRoles } return $ B.singleton Null where countKeys k = length . filter (== k) . map fst $ fields inheritedRole = (,) <$> roleName <*> ((char '(' *> roleName <* char ')') <|> pure "span") -- Can contain character codes as decimal numbers or -- hexadecimal numbers, prefixed by 0x, x, \x, U+, u, or \u -- or as XML-style hexadecimal character entities, e.g. ᨫ -- or text, which is used as-is. Comments start with .. unicodeTransform :: String -> String unicodeTransform t = case t of ('.':'.':xs) -> unicodeTransform $ dropWhile (/='\n') xs -- comment ('0':'x':xs) -> go "0x" xs ('x':xs) -> go "x" xs ('\\':'x':xs) -> go "\\x" xs ('U':'+':xs) -> go "U+" xs ('u':xs) -> go "u" xs ('\\':'u':xs) -> go "\\u" xs ('&':'#':'x':xs) -> maybe ("&#x" ++ unicodeTransform xs) -- drop semicolon (\(c,s) -> c : unicodeTransform (drop 1 s)) $ extractUnicodeChar xs (x:xs) -> x : unicodeTransform xs [] -> [] where go pref zs = maybe (pref ++ unicodeTransform zs) (\(c,s) -> c : unicodeTransform s) $ extractUnicodeChar zs extractUnicodeChar :: String -> Maybe (Char, String) extractUnicodeChar s = maybe Nothing (\c -> Just (c,rest)) mbc where (ds,rest) = span isHexDigit s mbc = safeRead ('\'':'\\':'x':ds ++ "'") extractCaption :: RSTParser (Inlines, Blocks) extractCaption = do capt <- trimInlines . mconcat <$> many inline legend <- optional blanklines >> (mconcat <$> many block) return (capt,legend) -- divide string by blanklines toChunks :: String -> [String] toChunks = dropWhile null . map (trim . unlines) . splitBy (all (`elem` (" \t" :: String))) . lines codeblock :: [String] -> Maybe String -> String -> String -> RSTParser Blocks codeblock classes numberLines lang body = return $ B.codeBlockWith attribs $ stripTrailingNewlines body where attribs = ("", classes', kvs) classes' = "sourceCode" : lang : maybe [] (\_ -> ["numberLines"]) numberLines ++ classes kvs = case numberLines of Just "" -> [] Nothing -> [] Just n -> [("startFrom",trim n)] --- --- note block --- noteBlock :: RSTParser [Char] noteBlock = try $ do startPos <- getPosition string ".." spaceChar >> skipMany spaceChar ref <- noteMarker first <- (spaceChar >> skipMany spaceChar >> anyLine) <|> (newline >> return "") blanks <- option "" blanklines rest <- option "" indentedBlock endPos <- getPosition let raw = first ++ "\n" ++ blanks ++ rest ++ "\n" let newnote = (ref, raw) st <- getState let oldnotes = stateNotes st updateState $ \s -> s { stateNotes = newnote : oldnotes } -- return blanks so line count isn't affected return $ replicate (sourceLine endPos - sourceLine startPos) '\n' noteMarker :: RSTParser [Char] noteMarker = do char '[' res <- many1 digit <|> (try $ char '#' >> liftM ('#':) simpleReferenceName') <|> count 1 (oneOf "#*") char ']' return res -- -- reference key -- quotedReferenceName :: RSTParser Inlines quotedReferenceName = try $ do char '`' >> notFollowedBy (char '`') -- `` means inline code! label' <- trimInlines . mconcat <$> many1Till inline (char '`') return label' unquotedReferenceName :: RSTParser Inlines unquotedReferenceName = try $ do label' <- trimInlines . mconcat <$> many1Till inline (lookAhead $ char ':') return label' -- Simple reference names are single words consisting of alphanumerics -- plus isolated (no two adjacent) internal hyphens, underscores, -- periods, colons and plus signs; no whitespace or other characters -- are allowed. simpleReferenceName' :: Parser [Char] st String simpleReferenceName' = do x <- alphaNum xs <- many $ alphaNum <|> (try $ oneOf "-_:+." <* lookAhead alphaNum) return (x:xs) simpleReferenceName :: Parser [Char] st Inlines simpleReferenceName = do raw <- simpleReferenceName' return $ B.str raw referenceName :: RSTParser Inlines referenceName = quotedReferenceName <|> (try $ simpleReferenceName <* lookAhead (char ':')) <|> unquotedReferenceName referenceKey :: RSTParser [Char] referenceKey = do startPos <- getPosition choice [substKey, anonymousKey, regularKey] optional blanklines endPos <- getPosition -- return enough blanks to replace key return $ replicate (sourceLine endPos - sourceLine startPos) '\n' targetURI :: Parser [Char] st [Char] targetURI = do skipSpaces optional newline contents <- many1 (try (many spaceChar >> newline >> many1 spaceChar >> noneOf " \t\n") <|> noneOf "\n") blanklines return $ escapeURI $ trim $ contents substKey :: RSTParser () substKey = try $ do string ".." skipMany1 spaceChar (alt,ref) <- withRaw $ trimInlines . mconcat <$> enclosed (char '|') (char '|') inline res <- B.toList <$> directive' il <- case res of -- use alt unless :alt: attribute on image: [Para [Image attr [Str "image"] (src,tit)]] -> return $ B.imageWith attr src tit alt [Para [Link _ [Image attr [Str "image"] (src,tit)] (src',tit')]] -> return $ B.link src' tit' (B.imageWith attr src tit alt) [Para ils] -> return $ B.fromList ils _ -> mzero let key = toKey $ stripFirstAndLast ref updateState $ \s -> s{ stateSubstitutions = M.insert key il $ stateSubstitutions s } anonymousKey :: RSTParser () anonymousKey = try $ do oneOfStrings [".. __:", "__"] src <- targetURI pos <- getPosition let key = toKey $ "_" ++ printf "%09d" (sourceLine pos) --TODO: parse width, height, class and name attributes updateState $ \s -> s { stateKeys = M.insert key ((src,""), nullAttr) $ stateKeys s } stripTicks :: String -> String stripTicks = reverse . stripTick . reverse . stripTick where stripTick ('`':xs) = xs stripTick xs = xs regularKey :: RSTParser () regularKey = try $ do string ".. _" (_,ref) <- withRaw referenceName char ':' src <- targetURI let key = toKey $ stripTicks ref --TODO: parse width, height, class and name attributes updateState $ \s -> s { stateKeys = M.insert key ((src,""), nullAttr) $ stateKeys s } -- -- tables -- -- General tables TODO: -- - figure out if leading spaces are acceptable and if so, add -- support for them -- -- Simple tables TODO: -- - column spans -- - multiline support -- - ensure that rightmost column span does not need to reach end -- - require at least 2 columns -- -- Grid tables TODO: -- - column spans dashedLine :: Char -> Parser [Char] st (Int, Int) dashedLine ch = do dashes <- many1 (char ch) sp <- many (char ' ') return (length dashes, length $ dashes ++ sp) simpleDashedLines :: Char -> Parser [Char] st [(Int,Int)] simpleDashedLines ch = try $ many1 (dashedLine ch) -- Parse a table row separator simpleTableSep :: Char -> RSTParser Char simpleTableSep ch = try $ simpleDashedLines ch >> newline -- Parse a table footer simpleTableFooter :: RSTParser [Char] simpleTableFooter = try $ simpleTableSep '=' >> blanklines -- Parse a raw line and split it into chunks by indices. simpleTableRawLine :: [Int] -> RSTParser [String] simpleTableRawLine indices = do line <- many1Till anyChar newline return (simpleTableSplitLine indices line) -- Parse a table row and return a list of blocks (columns). simpleTableRow :: [Int] -> RSTParser [[Block]] simpleTableRow indices = do notFollowedBy' simpleTableFooter firstLine <- simpleTableRawLine indices colLines <- return [] -- TODO let cols = map unlines . transpose $ firstLine : colLines mapM (parseFromString (B.toList . mconcat <$> many plain)) cols simpleTableSplitLine :: [Int] -> String -> [String] simpleTableSplitLine indices line = map trim $ tail $ splitByIndices (init indices) line simpleTableHeader :: Bool -- ^ Headerless table -> RSTParser ([[Block]], [Alignment], [Int]) simpleTableHeader headless = try $ do optional blanklines rawContent <- if headless then return "" else simpleTableSep '=' >> anyLine dashes <- simpleDashedLines '=' <|> simpleDashedLines '-' newline let lines' = map snd dashes let indices = scanl (+) 0 lines' let aligns = replicate (length lines') AlignDefault let rawHeads = if headless then replicate (length dashes) "" else simpleTableSplitLine indices rawContent heads <- mapM (parseFromString (B.toList . mconcat <$> many plain)) $ map trim rawHeads return (heads, aligns, indices) -- Parse a simple table. simpleTable :: Bool -- ^ Headerless table -> RSTParser Blocks simpleTable headless = do Table c a _w h l <- tableWith (simpleTableHeader headless) simpleTableRow sep simpleTableFooter -- Simple tables get 0s for relative column widths (i.e., use default) return $ B.singleton $ Table c a (replicate (length a) 0) h l where sep = return () -- optional (simpleTableSep '-') gridTable :: Bool -- ^ Headerless table -> RSTParser Blocks gridTable headerless = B.singleton <$> gridTableWith (B.toList <$> parseBlocks) headerless table :: RSTParser Blocks table = gridTable False <|> simpleTable False <|> gridTable True <|> simpleTable True "table" -- -- inline -- inline :: RSTParser Inlines inline = choice [ note -- can start with whitespace, so try before ws , whitespace , link , str , endline , strong , emph , code , subst , interpretedRole , smart , hyphens , escapedChar , symbol ] "inline" parseInlineFromString :: String -> RSTParser Inlines parseInlineFromString = parseFromString (trimInlines . mconcat <$> many inline) hyphens :: RSTParser Inlines hyphens = do result <- many1 (char '-') optional endline -- don't want to treat endline after hyphen or dash as a space return $ B.str result escapedChar :: Parser [Char] st Inlines escapedChar = do c <- escaped anyChar return $ if c == ' ' -- '\ ' is null in RST then mempty else B.str [c] symbol :: RSTParser Inlines symbol = do result <- oneOf specialChars return $ B.str [result] -- parses inline code, between codeStart and codeEnd code :: RSTParser Inlines code = try $ do string "``" result <- manyTill anyChar (try (string "``")) return $ B.code $ trim $ unwords $ lines result -- succeeds only if we're not right after a str (ie. in middle of word) atStart :: RSTParser a -> RSTParser a atStart p = do pos <- getPosition st <- getState -- single quote start can't be right after str guard $ stateLastStrPos st /= Just pos p emph :: RSTParser Inlines emph = B.emph . trimInlines . mconcat <$> enclosed (atStart $ char '*') (char '*') inline strong :: RSTParser Inlines strong = B.strong . trimInlines . mconcat <$> enclosed (atStart $ string "**") (try $ string "**") inline -- Note, this doesn't precisely implement the complex rule in -- http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules -- but it should be good enough for most purposes -- -- TODO: -- - Classes are silently discarded in addNewRole -- - Lacks sensible implementation for title-reference (which is the default) -- - Allows direct use of the :raw: role, rST only allows inherited use. interpretedRole :: RSTParser Inlines interpretedRole = try $ do (role, contents) <- roleBefore <|> roleAfter renderRole contents Nothing role nullAttr renderRole :: String -> Maybe String -> String -> Attr -> RSTParser Inlines renderRole contents fmt role attr = case role of "sup" -> return $ B.superscript $ B.str contents "superscript" -> return $ B.superscript $ B.str contents "sub" -> return $ B.subscript $ B.str contents "subscript" -> return $ B.subscript $ B.str contents "emphasis" -> return $ B.emph $ B.str contents "strong" -> return $ B.strong $ B.str contents "rfc-reference" -> return $ rfcLink contents "RFC" -> return $ rfcLink contents "pep-reference" -> return $ pepLink contents "PEP" -> return $ pepLink contents "literal" -> return $ B.codeWith attr contents "math" -> return $ B.math contents "title-reference" -> titleRef contents "title" -> titleRef contents "t" -> titleRef contents "code" -> return $ B.codeWith (addClass "sourceCode" attr) contents "span" -> return $ B.spanWith attr $ B.str contents "raw" -> return $ B.rawInline (fromMaybe "" fmt) contents custom -> do customRoles <- stateRstCustomRoles <$> getState case M.lookup custom customRoles of Just (newRole, newFmt, newAttr) -> renderRole contents newFmt newRole newAttr Nothing -> do pos <- getPosition addWarning (Just pos) $ "ignoring unknown role :" ++ custom ++ ": in" return $ B.str contents -- Undefined role where titleRef ref = return $ B.str ref -- FIXME: Not a sensible behaviour rfcLink rfcNo = B.link rfcUrl ("RFC " ++ rfcNo) $ B.str ("RFC " ++ rfcNo) where rfcUrl = "http://www.faqs.org/rfcs/rfc" ++ rfcNo ++ ".html" pepLink pepNo = B.link pepUrl ("PEP " ++ pepNo) $ B.str ("PEP " ++ pepNo) where padNo = replicate (4 - length pepNo) '0' ++ pepNo pepUrl = "http://www.python.org/dev/peps/pep-" ++ padNo ++ "/" addClass :: String -> Attr -> Attr addClass c (ident, classes, keyValues) = (ident, union classes [c], keyValues) roleName :: RSTParser String roleName = many1 (letter <|> char '-') roleMarker :: RSTParser String roleMarker = char ':' *> roleName <* char ':' roleBefore :: RSTParser (String,String) roleBefore = try $ do role <- roleMarker contents <- unmarkedInterpretedText return (role,contents) roleAfter :: RSTParser (String,String) roleAfter = try $ do contents <- unmarkedInterpretedText role <- roleMarker <|> (stateRstDefaultRole <$> getState) return (role,contents) unmarkedInterpretedText :: RSTParser [Char] unmarkedInterpretedText = enclosed (atStart $ char '`') (char '`') anyChar whitespace :: RSTParser Inlines whitespace = B.space <$ skipMany1 spaceChar "whitespace" str :: RSTParser Inlines str = do let strChar = noneOf ("\t\n " ++ specialChars) result <- many1 strChar updateLastStrPos return $ B.str result -- an endline character that can be treated as a space, not a structural break endline :: RSTParser Inlines endline = try $ do newline notFollowedBy blankline -- parse potential list-starts at beginning of line differently in a list: st <- getState if (stateParserContext st) == ListItemState then notFollowedBy (anyOrderedListMarker >> spaceChar) >> notFollowedBy' bulletListStart else return () return B.softbreak -- -- links -- link :: RSTParser Inlines link = choice [explicitLink, referenceLink, autoLink] "link" explicitLink :: RSTParser Inlines explicitLink = try $ do char '`' notFollowedBy (char '`') -- `` marks start of inline code label' <- trimInlines . mconcat <$> manyTill (notFollowedBy (char '`') >> inline) (char '<') src <- trim <$> manyTill (noneOf ">\n") (char '>') skipSpaces string "`_" optional $ char '_' -- anonymous form let label'' = if label' == mempty then B.str src else label' -- `link ` is a reference link to _google! (src',tit,attr) <- case reverse src of '_':xs -> do keyTable <- stateKeys <$> getState let key = toKey $ reverse xs case M.lookup key keyTable of Nothing -> do pos <- getPosition addWarning (Just pos) $ "Could not find reference for " ++ show key return ("","",nullAttr) Just ((s,t),a) -> return (s,t,a) _ -> return (src, "", nullAttr) return $ B.linkWith attr (escapeURI src') tit label'' referenceLink :: RSTParser Inlines referenceLink = try $ do (label',ref) <- withRaw (quotedReferenceName <|> simpleReferenceName) <* char '_' state <- getState let keyTable = stateKeys state let isAnonKey (Key ('_':_)) = True isAnonKey _ = False key <- option (toKey $ stripTicks ref) $ do char '_' let anonKeys = sort $ filter isAnonKey $ M.keys keyTable if null anonKeys then mzero else return (head anonKeys) ((src,tit), attr) <- case M.lookup key keyTable of Nothing -> do pos <- getPosition addWarning (Just pos) $ "Could not find reference for " ++ show key return (("",""),nullAttr) 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 attr src tit label' autoURI :: RSTParser Inlines autoURI = do (orig, src) <- uri return $ B.link src "" $ B.str orig autoEmail :: RSTParser Inlines autoEmail = do (orig, src) <- emailAddress return $ B.link src "" $ B.str orig autoLink :: RSTParser Inlines autoLink = autoURI <|> autoEmail subst :: RSTParser Inlines subst = try $ do (_,ref) <- withRaw $ enclosed (char '|') (char '|') inline state <- getState let substTable = stateSubstitutions state let key = toKey $ stripFirstAndLast ref case M.lookup key substTable of Nothing -> do pos <- getPosition addWarning (Just pos) $ "Could not find reference for " ++ show key return mempty Just target -> return target note :: RSTParser Inlines note = try $ do optional whitespace ref <- noteMarker char '_' state <- getState let notes = stateNotes state case lookup ref notes of Nothing -> do pos <- getPosition addWarning (Just pos) $ "Could not find note for " ++ show ref return mempty Just raw -> do -- We temporarily empty the note list while parsing the note, -- so that we don't get infinite loops with notes inside notes... -- Note references inside other notes are allowed in reST, but -- not yet in this implementation. updateState $ \st -> st{ stateNotes = [] } contents <- parseFromString parseBlocks raw let newnotes = if (ref == "*" || ref == "#") -- auto-numbered -- delete the note so the next auto-numbered note -- doesn't get the same contents: then deleteFirstsBy (==) notes [(ref,raw)] else notes updateState $ \st -> st{ stateNotes = newnotes } return $ B.note contents smart :: RSTParser Inlines smart = do getOption readerSmart >>= guard doubleQuoted <|> singleQuoted <|> choice [apostrophe, dash, ellipses] singleQuoted :: RSTParser Inlines singleQuoted = try $ do singleQuoteStart withQuoteContext InSingleQuote $ B.singleQuoted . trimInlines . mconcat <$> many1Till inline singleQuoteEnd doubleQuoted :: RSTParser Inlines doubleQuoted = try $ do doubleQuoteStart withQuoteContext InDoubleQuote $ B.doubleQuoted . trimInlines . mconcat <$> many1Till inline doubleQuoteEnd �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Org.hs������������������������������������������������������0000644�0000000�0000000�00000003630�13155240142�016766� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2014-2016 Albert Krewinkel 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.Readers.Org Copyright : Copyright (C) 2014-2016 Albert Krewinkel License : GNU GPL, version 2 or above Maintainer : Albert Krewinkel Conversion of org-mode formatted plain text to 'Pandoc' document. -} module Text.Pandoc.Readers.Org ( readOrg ) where import Text.Pandoc.Readers.Org.Blocks ( blockList, meta ) import Text.Pandoc.Readers.Org.Parsing ( OrgParser, readWithM ) import Text.Pandoc.Readers.Org.ParserState ( optionsToParserState ) import Text.Pandoc.Definition import Text.Pandoc.Error import Text.Pandoc.Options import Control.Monad.Reader ( runReader ) -- | Parse org-mode string and return a Pandoc document. readOrg :: ReaderOptions -- ^ Reader options -> String -- ^ String to parse (assuming @'\n'@ line endings) -> Either PandocError Pandoc readOrg opts s = flip runReader def $ readWithM parseOrg (optionsToParserState opts) (s ++ "\n\n") -- -- Parser -- parseOrg :: OrgParser Pandoc parseOrg = do blocks' <- blockList meta' <- meta return $ Pandoc meta' blocks' ��������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/DocBook.hs��������������������������������������������������0000644�0000000�0000000�00000150265�13155240142�017566� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������module Text.Pandoc.Readers.DocBook ( readDocBook ) where import Data.Char (toUpper) import Text.Pandoc.Shared (safeRead) import Text.Pandoc.Options import Text.Pandoc.Definition import Text.Pandoc.Builder import Text.XML.Light import Text.HTML.TagSoup.Entity (lookupEntity) import Data.Either (rights) import Data.Generics import Data.Char (isSpace) import Control.Monad.State import Data.List (intersperse) import Data.Maybe (fromMaybe) import Text.TeXMath (readMathML, writeTeX) import Text.Pandoc.Error (PandocError) import Control.Monad.Except import Data.Default import Data.Foldable (asum) {- List of all DocBook tags, with [x] indicating implemented, [o] meaning intentionally left unimplemented (pass through): [o] abbrev - An abbreviation, especially one followed by a period [x] abstract - A summary [o] accel - A graphical user interface (GUI) keyboard shortcut [x] ackno - Acknowledgements in an Article [o] acronym - An often pronounceable word made from the initial [o] action - A response to a user event [o] address - A real-world address, generally a postal address [ ] affiliation - The institutional affiliation of an individual [ ] alt - Text representation for a graphical element [o] anchor - A spot in the document [x] answer - An answer to a question posed in a QandASet [x] appendix - An appendix in a Book or Article [x] appendixinfo - Meta-information for an Appendix [o] application - The name of a software program [x] area - A region defined for a Callout in a graphic or code example [x] areaset - A set of related areas in a graphic or code example [x] areaspec - A collection of regions in a graphic or code example [ ] arg - An argument in a CmdSynopsis [x] article - An article [x] articleinfo - Meta-information for an Article [ ] artpagenums - The page numbers of an article as published [x] attribution - The source of a block quote or epigraph [ ] audiodata - Pointer to external audio data [ ] audioobject - A wrapper for audio data and its associated meta-information [x] author - The name of an individual author [ ] authorblurb - A short description or note about an author [x] authorgroup - Wrapper for author information when a document has multiple authors or collabarators [x] authorinitials - The initials or other short identifier for an author [o] beginpage - The location of a page break in a print version of the document [ ] bibliocoverage - The spatial or temporal coverage of a document [x] bibliodiv - A section of a Bibliography [x] biblioentry - An entry in a Bibliography [x] bibliography - A bibliography [ ] bibliographyinfo - Meta-information for a Bibliography [ ] biblioid - An identifier for a document [o] bibliolist - A wrapper for a set of bibliography entries [ ] bibliomisc - Untyped bibliographic information [x] bibliomixed - An entry in a Bibliography [ ] bibliomset - A cooked container for related bibliographic information [ ] biblioref - A cross reference to a bibliographic entry [ ] bibliorelation - The relationship of a document to another [ ] biblioset - A raw container for related bibliographic information [ ] bibliosource - The source of a document [ ] blockinfo - Meta-information for a block element [x] blockquote - A quotation set off from the main text [x] book - A book [x] bookinfo - Meta-information for a Book [x] bridgehead - A free-floating heading [x] callout - A “called out” description of a marked Area [x] calloutlist - A list of Callouts [x] caption - A caption [x] caution - A note of caution [x] chapter - A chapter, as of a book [x] chapterinfo - Meta-information for a Chapter [ ] citation - An inline bibliographic reference to another published work [ ] citebiblioid - A citation of a bibliographic identifier [ ] citerefentry - A citation to a reference page [ ] citetitle - The title of a cited work [ ] city - The name of a city in an address [x] classname - The name of a class, in the object-oriented programming sense [ ] classsynopsis - The syntax summary for a class definition [ ] classsynopsisinfo - Information supplementing the contents of a ClassSynopsis [ ] cmdsynopsis - A syntax summary for a software command [ ] co - The location of a callout embedded in text [x] code - An inline code fragment [x] col - Specifications for a column in an HTML table [x] colgroup - A group of columns in an HTML table [ ] collab - Identifies a collaborator [ ] collabname - The name of a collaborator [ ] colophon - Text at the back of a book describing facts about its production [x] colspec - Specifications for a column in a table [x] command - The name of an executable program or other software command [x] computeroutput - Data, generally text, displayed or presented by a computer [ ] confdates - The dates of a conference for which a document was written [ ] confgroup - A wrapper for document meta-information about a conference [ ] confnum - An identifier, frequently numerical, associated with a conference for which a document was written [ ] confsponsor - The sponsor of a conference for which a document was written [ ] conftitle - The title of a conference for which a document was written [x] constant - A programming or system constant [ ] constraint - A constraint in an EBNF production [ ] constraintdef - The definition of a constraint in an EBNF production [ ] constructorsynopsis - A syntax summary for a constructor [ ] contractnum - The contract number of a document [ ] contractsponsor - The sponsor of a contract [ ] contrib - A summary of the contributions made to a document by a credited source [ ] copyright - Copyright information about a document [ ] coref - A cross reference to a co [ ] corpauthor - A corporate author, as opposed to an individual [ ] corpcredit - A corporation or organization credited in a document [ ] corpname - The name of a corporation [ ] country - The name of a country [ ] database - The name of a database, or part of a database [x] date - The date of publication or revision of a document [ ] dedication - A wrapper for the dedication section of a book [ ] destructorsynopsis - A syntax summary for a destructor [ ] edition - The name or number of an edition of a document [ ] editor - The name of the editor of a document [x] email - An email address [x] emphasis - Emphasized text [x] entry - A cell in a table [ ] entrytbl - A subtable appearing in place of an Entry in a table [ ] envar - A software environment variable [x] epigraph - A short inscription at the beginning of a document or component note: also handle embedded attribution tag [x] equation - A displayed mathematical equation [ ] errorcode - An error code [ ] errorname - An error name [ ] errortext - An error message. [ ] errortype - The classification of an error message [ ] example - A formal example, with a title [ ] exceptionname - The name of an exception [ ] fax - A fax number [ ] fieldsynopsis - The name of a field in a class definition [x] figure - A formal figure, generally an illustration, with a title [x] filename - The name of a file [ ] firstname - The first name of a person [ ] firstterm - The first occurrence of a term [x] footnote - A footnote [ ] footnoteref - A cross reference to a footnote (a footnote mark) [x] foreignphrase - A word or phrase in a language other than the primary language of the document [x] formalpara - A paragraph with a title [ ] funcdef - A function (subroutine) name and its return type [ ] funcparams - Parameters for a function referenced through a function pointer in a synopsis [ ] funcprototype - The prototype of a function [ ] funcsynopsis - The syntax summary for a function definition [ ] funcsynopsisinfo - Information supplementing the FuncDefs of a FuncSynopsis [x] function - The name of a function or subroutine, as in a programming language [x] glossary - A glossary [x] glossaryinfo - Meta-information for a Glossary [x] glossdef - A definition in a GlossEntry [x] glossdiv - A division in a Glossary [x] glossentry - An entry in a Glossary or GlossList [x] glosslist - A wrapper for a set of GlossEntrys [x] glosssee - A cross-reference from one GlossEntry to another [x] glossseealso - A cross-reference from one GlossEntry to another [x] glossterm - A glossary term [ ] graphic - A displayed graphical object (not an inline) Note: in DocBook v5 `graphic` is discarded [ ] graphicco - A graphic that contains callout areas Note: in DocBook v5 `graphicco` is discarded [ ] group - A group of elements in a CmdSynopsis [ ] guibutton - The text on a button in a GUI [ ] guiicon - Graphic and/or text appearing as a icon in a GUI [ ] guilabel - The text of a label in a GUI [x] guimenu - The name of a menu in a GUI [x] guimenuitem - The name of a terminal menu item in a GUI [x] guisubmenu - The name of a submenu in a GUI [ ] hardware - A physical part of a computer system [ ] highlights - A summary of the main points of the discussed component [ ] holder - The name of the individual or organization that holds a copyright [o] honorific - The title of a person [ ] html:form - An HTML form [x] imagedata - Pointer to external image data (only `fileref` attribute implemented but not `entityref` which would require parsing of the DTD) [x] imageobject - A wrapper for image data and its associated meta-information [ ] imageobjectco - A wrapper for an image object with callouts [x] important - An admonition set off from the text [x] index - An index [x] indexdiv - A division in an index [x] indexentry - An entry in an index [x] indexinfo - Meta-information for an Index [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 [x] informalexample - A displayed example without a title [ ] informalfigure - A untitled figure [ ] informaltable - A table without a title [ ] initializer - The initializer for a FieldSynopsis [x] inlineequation - A mathematical equation or expression occurring inline [ ] inlinegraphic - An object containing or pointing to graphical data that will be rendered inline [x] inlinemediaobject - An inline media object (video, audio, image, and so on) [ ] interface - An element of a GUI [ ] interfacename - The name of an interface [ ] invpartnumber - An inventory part number [ ] isbn - The International Standard Book Number of a document [ ] issn - The International Standard Serial Number of a periodical [ ] issuenum - The number of an issue of a journal [x] itemizedlist - A list in which each entry is marked with a bullet or other dingbat [ ] itermset - A set of index terms in the meta-information of a document [ ] jobtitle - The title of an individual in an organization [x] keycap - The text printed on a key on a keyboard [ ] keycode - The internal, frequently numeric, identifier for a key on a keyboard [x] keycombo - A combination of input actions [ ] keysym - The symbolic name of a key on a keyboard [ ] keyword - One of a set of keywords describing the content of a document [ ] keywordset - A set of keywords describing the content of a document [ ] label - A label on a Question or Answer [ ] legalnotice - A statement of legal obligations or requirements [ ] lhs - The left-hand side of an EBNF production [ ] lineage - The portion of a person's name indicating a relationship to ancestors [ ] lineannotation - A comment on a line in a verbatim listing [x] link - A hypertext link [x] listitem - A wrapper for the elements of a list item [x] literal - Inline text that is some literal value [x] literallayout - A block of text in which line breaks and white space are to be reproduced faithfully [ ] lot - A list of the titles of formal objects (as tables or figures) in a document [ ] lotentry - An entry in a list of titles [ ] manvolnum - A reference volume number [x] markup - A string of formatting markup in text that is to be represented literally [ ] mathphrase - A mathematical phrase, an expression that can be represented with ordinary text and a small amount of markup [ ] medialabel - A name that identifies the physical medium on which some information resides [x] mediaobject - A displayed media object (video, audio, image, etc.) [ ] mediaobjectco - A media object that contains callouts [x] member - An element of a simple list [x] menuchoice - A selection or series of selections from a menu [ ] methodname - The name of a method [ ] methodparam - Parameters to a method [ ] methodsynopsis - A syntax summary for a method [x] mml:math - A MathML equation [ ] modespec - Application-specific information necessary for the completion of an OLink [ ] modifier - Modifiers in a synopsis [ ] mousebutton - The conventional name of a mouse button [ ] msg - A message in a message set [ ] msgaud - The audience to which a message in a message set is relevant [ ] msgentry - A wrapper for an entry in a message set [ ] msgexplan - Explanatory material relating to a message in a message set [ ] msginfo - Information about a message in a message set [ ] msglevel - The level of importance or severity of a message in a message set [ ] msgmain - The primary component of a message in a message set [ ] msgorig - The origin of a message in a message set [ ] msgrel - A related component of a message in a message set [ ] msgset - A detailed set of messages, usually error messages [ ] msgsub - A subcomponent of a message in a message set [ ] msgtext - The actual text of a message component in a message set [ ] nonterminal - A non-terminal in an EBNF production [x] note - A message set off from the text [ ] objectinfo - Meta-information for an object [ ] olink - A link that addresses its target indirectly, through an entity [ ] ooclass - A class in an object-oriented programming language [ ] ooexception - An exception in an object-oriented programming language [ ] oointerface - An interface in an object-oriented programming language [x] option - An option for a software command [x] optional - Optional information [x] orderedlist - A list in which each entry is marked with a sequentially incremented label [ ] orgdiv - A division of an organization [ ] orgname - The name of an organization other than a corporation [ ] otheraddr - Uncategorized information in address [ ] othercredit - A person or entity, other than an author or editor, credited in a document [ ] othername - A component of a persons name that is not a first name, surname, or lineage [ ] package - A package [ ] pagenums - The numbers of the pages in a book, for use in a bibliographic entry [x] para - A paragraph [ ] paramdef - Information about a function parameter in a programming language [x] parameter - A value or a symbolic reference to a value [ ] part - A division in a book [ ] partinfo - Meta-information for a Part [ ] partintro - An introduction to the contents of a part [ ] personblurb - A short description or note about a person [ ] personname - The personal name of an individual [ ] phone - A telephone number [ ] phrase - A span of text [ ] pob - A post office box in an address [ ] postcode - A postal code in an address [x] preface - Introductory matter preceding the first chapter of a book [ ] prefaceinfo - Meta-information for a Preface [ ] primary - The primary word or phrase under which an index term should be sorted [ ] primaryie - A primary term in an index entry, not in the text [ ] printhistory - The printing history of a document [ ] procedure - A list of operations to be performed in a well-defined sequence [ ] production - A production in a set of EBNF productions [ ] productionrecap - A cross-reference to an EBNF production [ ] productionset - A set of EBNF productions [ ] productname - The formal name of a product [ ] productnumber - A number assigned to a product [x] programlisting - A literal listing of all or part of a program [ ] programlistingco - A program listing with associated areas used in callouts [x] prompt - A character or string indicating the start of an input field in a computer display [ ] property - A unit of data associated with some part of a computer system [ ] pubdate - The date of publication of a document [ ] publisher - The publisher of a document [ ] publishername - The name of the publisher of a document [ ] pubsnumber - A number assigned to a publication other than an ISBN or ISSN or inventory part number [x] qandadiv - A titled division in a QandASet [o] qandaentry - A question/answer set within a QandASet [o] qandaset - A question-and-answer set [x] question - A question in a QandASet [x] quote - An inline quotation [ ] refclass - The scope or other indication of applicability of a reference entry [ ] refdescriptor - A description of the topic of a reference page [ ] refentry - A reference page (originally a UNIX man-style reference page) [ ] refentryinfo - Meta-information for a Refentry [ ] refentrytitle - The title of a reference page [ ] reference - A collection of reference entries [ ] referenceinfo - Meta-information for a Reference [ ] refmeta - Meta-information for a reference entry [ ] refmiscinfo - Meta-information for a reference entry other than the title and volume number [ ] refname - The name of (one of) the subject(s) of a reference page [ ] refnamediv - The name, purpose, and classification of a reference page [ ] refpurpose - A short (one sentence) synopsis of the topic of a reference page [x] refsect1 - A major subsection of a reference entry [x] refsect1info - Meta-information for a RefSect1 [x] refsect2 - A subsection of a RefSect1 [x] refsect2info - Meta-information for a RefSect2 [x] refsect3 - A subsection of a RefSect2 [x] refsect3info - Meta-information for a RefSect3 [x] refsection - A recursive section in a refentry [x] refsectioninfo - Meta-information for a refsection [ ] refsynopsisdiv - A syntactic synopsis of the subject of the reference page [ ] refsynopsisdivinfo - Meta-information for a RefSynopsisDiv [x] releaseinfo - Information about a particular release of a document [ ] remark - A remark (or comment) intended for presentation in a draft manuscript [ ] replaceable - Content that may or must be replaced by the user [ ] returnvalue - The value returned by a function [ ] revdescription - A extended description of a revision to a document [ ] revhistory - A history of the revisions to a document [ ] revision - An entry describing a single revision in the history of the revisions to a document [ ] revnumber - A document revision number [ ] revremark - A description of a revision to a document [ ] rhs - The right-hand side of an EBNF production [x] row - A row in a table [ ] sbr - An explicit line break in a command synopsis [x] screen - Text that a user sees or might see on a computer screen [o] screenco - A screen with associated areas used in callouts [o] screeninfo - Information about how a screen shot was produced [ ] screenshot - A representation of what the user sees or might see on a computer screen [ ] secondary - A secondary word or phrase in an index term [ ] secondaryie - A secondary term in an index entry, rather than in the text [x] sect1 - A top-level section of document [x] sect1info - Meta-information for a Sect1 [x] sect2 - A subsection within a Sect1 [x] sect2info - Meta-information for a Sect2 [x] sect3 - A subsection within a Sect2 [x] sect3info - Meta-information for a Sect3 [x] sect4 - A subsection within a Sect3 [x] sect4info - Meta-information for a Sect4 [x] sect5 - A subsection within a Sect4 [x] sect5info - Meta-information for a Sect5 [x] section - A recursive section [x] sectioninfo - Meta-information for a recursive section [x] see - Part of an index term directing the reader instead to another entry in the index [x] seealso - Part of an index term directing the reader also to another entry in the index [ ] seealsoie - A See also entry in an index, rather than in the text [ ] seeie - A See entry in an index, rather than in the text [x] seg - An element of a list item in a segmented list [x] seglistitem - A list item in a segmented list [x] segmentedlist - A segmented list, a list of sets of elements [x] segtitle - The title of an element of a list item in a segmented list [ ] seriesvolnums - Numbers of the volumes in a series of books [ ] set - A collection of books [ ] setindex - An index to a set of books [ ] setindexinfo - Meta-information for a SetIndex [ ] setinfo - Meta-information for a Set [ ] sgmltag - A component of SGML markup [ ] shortaffil - A brief description of an affiliation [ ] shortcut - A key combination for an action that is also accessible through a menu [ ] sidebar - A portion of a document that is isolated from the main narrative flow [ ] sidebarinfo - Meta-information for a Sidebar [x] simpara - A paragraph that contains only text and inline markup, no block elements [x] simplelist - An undecorated list of single words or short phrases [ ] simplemsgentry - A wrapper for a simpler entry in a message set [ ] simplesect - A section of a document with no subdivisions [ ] spanspec - Formatting information for a spanned column in a table [ ] state - A state or province in an address [ ] step - A unit of action in a procedure [ ] stepalternatives - Alternative steps in a procedure [ ] street - A street address in an address [ ] structfield - A field in a structure (in the programming language sense) [ ] structname - The name of a structure (in the programming language sense) [ ] subject - One of a group of terms describing the subject matter of a document [ ] subjectset - A set of terms describing the subject matter of a document [ ] subjectterm - A term in a group of terms describing the subject matter of a document [x] subscript - A subscript (as in H2O, the molecular formula for water) [ ] substeps - A wrapper for steps that occur within steps in a procedure [x] subtitle - The subtitle of a document [x] superscript - A superscript (as in x2, the mathematical notation for x multiplied by itself) [ ] surname - A family name; in western cultures the last name [ ] svg:svg - An SVG graphic [x] symbol - A name that is replaced by a value before processing [ ] synopfragment - A portion of a CmdSynopsis broken out from the main body of the synopsis [ ] synopfragmentref - A reference to a fragment of a command synopsis [ ] synopsis - A general-purpose element for representing the syntax of commands or functions [ ] systemitem - A system-related item or term [ ] table - A formal table in a document [ ] task - A task to be completed [ ] taskprerequisites - The prerequisites for a task [ ] taskrelated - Information related to a task [ ] tasksummary - A summary of a task [x] tbody - A wrapper for the rows of a table or informal table [x] td - A table entry in an HTML table [x] term - The word or phrase being defined or described in a variable list [ ] termdef - An inline term definition [ ] tertiary - A tertiary word or phrase in an index term [ ] tertiaryie - A tertiary term in an index entry, rather than in the text [ ] textdata - Pointer to external text data [ ] textobject - A wrapper for a text description of an object and its associated meta-information [ ] tfoot - A table footer consisting of one or more rows [x] tgroup - A wrapper for the main content of a table, or part of a table [x] th - A table header entry in an HTML table [x] thead - A table header consisting of one or more rows [x] tip - A suggestion to the user, set off from the text [x] title - The text of the title of a section of a document or of a formal block-level element [x] titleabbrev - The abbreviation of a Title [x] toc - A table of contents [x] tocback - An entry in a table of contents for a back matter component [x] tocchap - An entry in a table of contents for a component in the body of a document [x] tocentry - A component title in a table of contents [x] tocfront - An entry in a table of contents for a front matter component [x] toclevel1 - A top-level entry within a table of contents entry for a chapter-like component [x] toclevel2 - A second-level entry within a table of contents entry for a chapter-like component [x] toclevel3 - A third-level entry within a table of contents entry for a chapter-like component [x] toclevel4 - A fourth-level entry within a table of contents entry for a chapter-like component [x] toclevel5 - A fifth-level entry within a table of contents entry for a chapter-like component [x] tocpart - An entry in a table of contents for a part of a book [ ] token - A unit of information [x] tr - A row in an HTML table [ ] trademark - A trademark [x] type - The classification of a value [x] ulink - A link that addresses its target by means of a URL (Uniform Resource Locator) [x] uri - A Uniform Resource Identifier [x] userinput - Data entered by the user [x] varargs - An empty element in a function synopsis indicating a variable number of arguments [x] variablelist - A list in which each entry is composed of a set of one or more terms and an associated description [x] varlistentry - A wrapper for a set of terms and the associated description in a variable list [x] varname - The name of a variable [ ] videodata - Pointer to external video data [ ] videoobject - A wrapper for video data and its associated meta-information [ ] void - An empty element in a function synopsis indicating that the function in question takes no arguments [ ] volumenum - The volume number of a document in a set (as of books in a set or articles in a journal) [x] warning - An admonition set off from the text [x] wordasword - A word meant specifically as a word and not representing anything else [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 -} type DB = ExceptT PandocError (State DBState) data DBState = DBState{ dbSectionLevel :: Int , dbQuoteType :: QuoteType , dbMeta :: Meta , dbAcceptsMeta :: Bool , dbBook :: Bool , dbFigureTitle :: Inlines , dbContent :: [Content] } deriving Show instance Default DBState where def = DBState{ dbSectionLevel = 0 , dbQuoteType = DoubleQuote , dbMeta = mempty , dbAcceptsMeta = False , dbBook = False , 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{ dbContent = tree }) . runExceptT . mapM parseBlock $ tree tree = normalizeTree . parseXML . handleInstructions $ inp -- We treat specially (issue #1236), converting it -- to
          , since xml-light doesn't parse the instruction correctly. -- Other xml instructions are simply removed from the input stream. handleInstructions :: String -> String handleInstructions ('<':'?':'a':'s':'c':'i':'i':'d':'o':'c':'-':'b':'r':'?':'>':xs) = '<':'b':'r':'/':'>': handleInstructions xs handleInstructions xs = case break (=='<') xs of (ys, []) -> ys ([], '<':zs) -> '<' : handleInstructions zs (ys, zs) -> ys ++ handleInstructions zs getFigure :: Element -> DB Blocks getFigure e = do tit <- case filterChild (named "title") e of Just t -> getInlines t Nothing -> return mempty modify $ \st -> st{ dbFigureTitle = tit } res <- getBlocks e modify $ \st -> st{ dbFigureTitle = mempty } return res -- normalize input, consolidating adjacent Text and CRef elements normalizeTree :: [Content] -> [Content] normalizeTree = everywhere (mkT go) where go :: [Content] -> [Content] go (Text (CData CDataRaw _ _):xs) = xs go (Text (CData CDataText s1 z):Text (CData CDataText s2 _):xs) = Text (CData CDataText (s1 ++ s2) z):xs go (Text (CData CDataText s1 z):CRef r:xs) = Text (CData CDataText (s1 ++ convertEntity r) z):xs go (CRef r:Text (CData CDataText s1 z):xs) = Text (CData CDataText (convertEntity r ++ s1) z):xs go (CRef r1:CRef r2:xs) = Text (CData CDataText (convertEntity r1 ++ convertEntity r2) Nothing):xs go xs = xs convertEntity :: String -> String convertEntity e = maybe (map toUpper e) id (lookupEntity e) -- convenience function to get an attribute value, defaulting to "" attrValue :: String -> Element -> String attrValue attr elt = case lookupAttrBy (\x -> qName x == attr) (elAttribs elt) of Just z -> z Nothing -> "" -- convenience function named :: String -> Element -> Bool named s e = qName (elName e) == s -- acceptingMetadata :: DB a -> DB a acceptingMetadata p = do modify (\s -> s { dbAcceptsMeta = True } ) res <- p modify (\s -> s { dbAcceptsMeta = False }) return res checkInMeta :: Monoid a => DB () -> DB a checkInMeta p = do accepts <- dbAcceptsMeta <$> get when accepts p return mempty addMeta :: ToMetaValue a => String -> a -> DB () addMeta field val = modify (setMeta field val) instance HasMeta DBState where setMeta field v s = s {dbMeta = setMeta field v (dbMeta s)} deleteMeta field s = s {dbMeta = deleteMeta field (dbMeta s)} isBlockElement :: Content -> Bool isBlockElement (Elem e) = qName (elName e) `elem` blocktags where blocktags = ["toc","index","para","formalpara","simpara", "ackno","epigraph","blockquote","bibliography","bibliodiv", "biblioentry","glossee","glosseealso","glossary", "glossdiv","glosslist","chapter","appendix","preface", "bridgehead","sect1","sect2","sect3","sect4","sect5","section", "refsect1","refsect2","refsect3","refsection", "important","caution","note","tip","warning","qandadiv", "question","answer","abstract","itemizedlist","orderedlist", "variablelist","article","book","table","informaltable", "informalexample", "linegroup", "screen","programlisting","example","calloutlist"] isBlockElement _ = False -- Trim leading and trailing newline characters trimNl :: String -> String trimNl = reverse . go . reverse . go where go ('\n':xs) = xs go xs = xs -- meld text into beginning of first paragraph of Blocks. -- assumes Blocks start with a Para; if not, does nothing. addToStart :: Inlines -> Blocks -> Blocks addToStart toadd bs = case toList bs of (Para xs : rest) -> para (toadd <> fromList xs) <> fromList rest _ -> bs -- function that is used by both mediaobject (in parseBlock) -- and inlinemediaobject (in parseInline) -- A DocBook mediaobject is a wrapper around a set of alternative presentations getMediaobject :: Element -> DB Inlines getMediaobject e = do (imageUrl, attr) <- case filterChild (named "imageobject") e of Nothing -> return (mempty, nullAttr) Just z -> case filterChild (named "imagedata") z of Nothing -> return (mempty, nullAttr) Just i -> let atVal a = attrValue a i w = case atVal "width" of "" -> [] d -> [("width", d)] h = case atVal "depth" of "" -> [] d -> [("height", d)] atr = (atVal "id", words $ atVal "role", w ++ h) in return (atVal "fileref", atr) let getCaption el = case filterChild (\x -> named "caption" x || named "textobject" x || named "alt" x) el of Nothing -> return mempty Just z -> mconcat <$> (mapM parseInline $ elContent z) figTitle <- gets dbFigureTitle let (caption, title) = if isNull figTitle then (getCaption e, "") else (return figTitle, "fig:") liftM (imageWith attr imageUrl title) caption getBlocks :: Element -> DB Blocks getBlocks e = mconcat <$> (mapM parseBlock $ elContent e) parseBlock :: Content -> DB Blocks parseBlock (Text (CData CDataRaw _ _)) = return mempty -- DOCTYPE parseBlock (Text (CData _ s _)) = if all isSpace s then return mempty else return $ plain $ trimInlines $ text s parseBlock (CRef x) = return $ plain $ str $ map toUpper x parseBlock (Elem e) = case qName (elName e) of "toc" -> return mempty -- skip TOC, since in pandoc it's autogenerated "index" -> return mempty -- skip index, since page numbers meaningless "para" -> parseMixed para (elContent e) "formalpara" -> do tit <- case filterChild (named "title") e of Just t -> (para . strong . (<> str ".")) <$> getInlines t Nothing -> return mempty (tit <>) <$> parseMixed para (elContent e) "simpara" -> parseMixed para (elContent e) "ackno" -> parseMixed para (elContent e) "epigraph" -> parseBlockquote "blockquote" -> parseBlockquote "attribution" -> return mempty "titleabbrev" -> return mempty "authorinitials" -> return mempty "title" -> checkInMeta getTitle "author" -> checkInMeta getAuthor "authorgroup" -> checkInMeta getAuthorGroup "releaseinfo" -> checkInMeta (getInlines e >>= addMeta "release") "date" -> checkInMeta getDate "bibliography" -> sect 0 "bibliodiv" -> sect 1 "biblioentry" -> parseMixed para (elContent e) "bibliomixed" -> parseMixed para (elContent e) "glosssee" -> para . (\ils -> text "See " <> ils <> str ".") <$> getInlines e "glossseealso" -> para . (\ils -> text "See also " <> ils <> str ".") <$> getInlines e "glossary" -> sect 0 "glossdiv" -> definitionList <$> mapM parseGlossEntry (filterChildren (named "glossentry") e) "glosslist" -> definitionList <$> mapM parseGlossEntry (filterChildren (named "glossentry") e) "chapter" -> sect 0 "appendix" -> sect 0 "preface" -> sect 0 "bridgehead" -> para . strong <$> getInlines e "sect1" -> sect 1 "sect2" -> sect 2 "sect3" -> sect 3 "sect4" -> sect 4 "sect5" -> sect 5 "section" -> gets dbSectionLevel >>= sect . (+1) "refsect1" -> sect 1 "refsect2" -> sect 2 "refsect3" -> sect 3 "refsection" -> gets dbSectionLevel >>= sect . (+1) "important" -> blockQuote . (para (strong $ str "Important") <>) <$> getBlocks e "caution" -> blockQuote . (para (strong $ str "Caution") <>) <$> getBlocks e "note" -> blockQuote . (para (strong $ str "Note") <>) <$> getBlocks e "tip" -> blockQuote . (para (strong $ str "Tip") <>) <$> getBlocks e "warning" -> blockQuote . (para (strong $ str "Warning") <>) <$> getBlocks e "area" -> return mempty "areaset" -> return mempty "areaspec" -> return mempty "qandadiv" -> gets dbSectionLevel >>= sect . (+1) "question" -> addToStart (strong (str "Q:") <> str " ") <$> getBlocks e "answer" -> addToStart (strong (str "A:") <> str " ") <$> getBlocks e "abstract" -> blockQuote <$> getBlocks e "calloutlist" -> bulletList <$> callouts "itemizedlist" -> bulletList <$> listitems "orderedlist" -> do let listStyle = case attrValue "numeration" e of "arabic" -> Decimal "loweralpha" -> LowerAlpha "upperalpha" -> UpperAlpha "lowerroman" -> LowerRoman "upperroman" -> UpperRoman _ -> Decimal let start = fromMaybe 1 $ (attrValue "override" <$> filterElement (named "listitem") e) >>= safeRead orderedListWith (start,listStyle,DefaultDelim) <$> listitems "variablelist" -> definitionList <$> deflistitems "figure" -> getFigure e "mediaobject" -> para <$> getMediaobject e "caption" -> return mempty "info" -> metaBlock "articleinfo" -> metaBlock "sectioninfo" -> return mempty -- keywords & other metadata "refsectioninfo" -> return mempty -- keywords & other metadata "refsect1info" -> return mempty -- keywords & other metadata "refsect2info" -> return mempty -- keywords & other metadata "refsect3info" -> return mempty -- keywords & other metadata "sect1info" -> return mempty -- keywords & other metadata "sect2info" -> return mempty -- keywords & other metadata "sect3info" -> return mempty -- keywords & other metadata "sect4info" -> return mempty -- keywords & other metadata "sect5info" -> return mempty -- keywords & other metadata "chapterinfo" -> return mempty -- keywords & other metadata "glossaryinfo" -> return mempty -- keywords & other metadata "appendixinfo" -> return mempty -- keywords & other metadata "bookinfo" -> metaBlock "article" -> modify (\st -> st{ dbBook = False }) >> getBlocks e "book" -> modify (\st -> st{ dbBook = True }) >> getBlocks e "table" -> parseTable "informaltable" -> parseTable "informalexample" -> divWith ("", ["informalexample"], []) <$> getBlocks e "linegroup" -> lineBlock <$> lineItems "literallayout" -> codeBlockWithLang "screen" -> codeBlockWithLang "programlisting" -> codeBlockWithLang "?xml" -> return mempty _ -> getBlocks e where parseMixed container conts = do let (ils,rest) = break isBlockElement conts ils' <- (trimInlines . mconcat) <$> mapM parseInline ils let p = if ils' == mempty then mempty else container ils' case rest of [] -> return p (r:rs) -> do b <- parseBlock r x <- parseMixed container rs return $ p <> b <> x codeBlockWithLang = do let classes' = case attrValue "language" e of "" -> [] x -> [x] return $ codeBlockWith (attrValue "id" e, classes', []) $ trimNl $ strContentRecursive e parseBlockquote = do attrib <- case filterChild (named "attribution") e of Nothing -> return mempty Just z -> (para . (str "— " <>) . mconcat) <$> (mapM parseInline $ elContent z) contents <- getBlocks e return $ blockQuote (contents <> attrib) listitems = mapM getBlocks $ filterChildren (named "listitem") e callouts = mapM getBlocks $ filterChildren (named "callout") e deflistitems = mapM parseVarListEntry $ filterChildren (named "varlistentry") e parseVarListEntry e' = do let terms = filterChildren (named "term") e' let items = filterChildren (named "listitem") e' terms' <- mapM getInlines terms items' <- mapM getBlocks items return (mconcat $ intersperse (str "; ") terms', items') parseGlossEntry e' = do let terms = filterChildren (named "glossterm") e' let items = filterChildren (named "glossdef") e' terms' <- mapM getInlines terms items' <- mapM getBlocks items return (mconcat $ intersperse (str "; ") terms', items') getTitle = do tit <- getInlines e subtit <- case filterChild (named "subtitle") e of Just s -> (text ": " <>) <$> getInlines s Nothing -> return mempty addMeta "title" (tit <> subtit) getAuthor = (:[]) <$> getInlines e >>= addMeta "author" getAuthorGroup = do let terms = filterChildren (named "author") e mapM getInlines terms >>= addMeta "author" getDate = getInlines e >>= addMeta "date" parseTable = do let isCaption x = named "title" x || named "caption" x caption <- case filterChild isCaption e of Just t -> getInlines t Nothing -> return mempty let e' = fromMaybe e $ filterChild (named "tgroup") e let isColspec x = named "colspec" x || named "col" x let colspecs = case filterChild (named "colgroup") e' of Just c -> filterChildren isColspec c _ -> filterChildren isColspec e' let isRow x = named "row" x || named "tr" x headrows <- case filterChild (named "thead") e' of Just h -> case filterChild isRow h of Just x -> parseRow x Nothing -> return [] Nothing -> return [] bodyrows <- case filterChild (named "tbody") e' of Just b -> mapM parseRow $ filterChildren isRow b Nothing -> mapM parseRow $ filterChildren isRow e' let toAlignment c = case findAttr (unqual "align") c of Just "left" -> AlignLeft Just "right" -> AlignRight Just "center" -> AlignCenter _ -> AlignDefault let toWidth c = case findAttr (unqual "colwidth") c of Just w -> fromMaybe 0 $ safeRead $ '0': filter (\x -> (x >= '0' && x <= '9') || x == '.') w Nothing -> 0 :: Double let numrows = case bodyrows of [] -> 0 xs -> maximum $ map length xs let aligns = case colspecs of [] -> replicate numrows AlignDefault cs -> map toAlignment cs let widths = case colspecs of [] -> replicate numrows 0 cs -> let ws = map toWidth cs tot = sum ws in if all (> 0) ws then map (/ tot) ws else replicate numrows 0 let headrows' = if null headrows then replicate numrows mempty else headrows return $ table caption (zip aligns widths) headrows' bodyrows isEntry x = named "entry" x || named "td" x || named "th" x parseRow = mapM (parseMixed plain . elContent) . filterChildren isEntry sect n = do isbook <- gets dbBook let n' = if isbook || n == 0 then n + 1 else n headerText <- case filterChild (named "title") e `mplus` (filterChild (named "info") e >>= filterChild (named "title")) of Just t -> getInlines t Nothing -> return mempty modify $ \st -> st{ dbSectionLevel = n } b <- getBlocks e let ident = attrValue "id" e modify $ \st -> st{ dbSectionLevel = n - 1 } return $ headerWith (ident,[],[]) n' headerText <> b lineItems = mapM getInlines $ filterChildren (named "line") e metaBlock = acceptingMetadata (getBlocks e) >> return mempty getInlines :: Element -> DB Inlines getInlines e' = (trimInlines . mconcat) <$> (mapM parseInline $ elContent e') strContentRecursive :: Element -> String strContentRecursive = strContent . (\e' -> e'{ elContent = map elementToStr $ elContent e' }) elementToStr :: Content -> Content elementToStr (Elem e') = Text $ CData CDataText (strContentRecursive e') Nothing elementToStr x = x parseInline :: Content -> DB Inlines parseInline (Text (CData _ s _)) = return $ text s parseInline (CRef ref) = return $ maybe (text $ map toUpper ref) (text) $ lookupEntity ref parseInline (Elem e) = case qName (elName e) of "equation" -> equation displayMath "informalequation" -> equation displayMath "inlineequation" -> equation math "subscript" -> subscript <$> innerInlines "superscript" -> superscript <$> innerInlines "inlinemediaobject" -> getMediaobject e "quote" -> do qt <- gets dbQuoteType let qt' = if qt == SingleQuote then DoubleQuote else SingleQuote modify $ \st -> st{ dbQuoteType = qt' } contents <- innerInlines modify $ \st -> st{ dbQuoteType = qt } return $ if qt == SingleQuote then singleQuoted contents else doubleQuoted contents "simplelist" -> simpleList "segmentedlist" -> segmentedList "classname" -> codeWithLang "code" -> codeWithLang "filename" -> codeWithLang "literal" -> codeWithLang "computeroutput" -> codeWithLang "prompt" -> codeWithLang "parameter" -> codeWithLang "option" -> codeWithLang "optional" -> do x <- getInlines e return $ str "[" <> x <> str "]" "markup" -> codeWithLang "wordasword" -> emph <$> innerInlines "command" -> codeWithLang "varname" -> codeWithLang "function" -> codeWithLang "type" -> codeWithLang "symbol" -> codeWithLang "constant" -> codeWithLang "userinput" -> codeWithLang "varargs" -> return $ code "(...)" "keycap" -> return (str $ strContent e) "keycombo" -> keycombo <$> (mapM parseInline $ elContent e) "menuchoice" -> menuchoice <$> (mapM parseInline $ filter isGuiMenu $ elContent e) "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) "" (text title) "email" -> return $ link ("mailto:" ++ strContent e) "" $ str $ strContent e "uri" -> return $ link (strContent e) "" $ str $ strContent e "ulink" -> link (attrValue "url" e) "" <$> innerInlines "link" -> do ils <- innerInlines let href = case findAttr (QName "href" (Just "http://www.w3.org/1999/xlink") Nothing) e of Just h -> h _ -> ('#' : attrValue "linkend" e) let ils' = if ils == mempty then str href else ils let attr = (attrValue "id" e, words $ attrValue "role" e, []) return $ linkWith attr href "" ils' "foreignphrase" -> emph <$> innerInlines "emphasis" -> case attrValue "role" e of "bold" -> strong <$> innerInlines "strong" -> strong <$> innerInlines "strikethrough" -> strikeout <$> innerInlines _ -> emph <$> innerInlines "footnote" -> (note . mconcat) <$> (mapM parseBlock $ elContent e) "title" -> return mempty "affiliation" -> return mempty -- Note: this isn't a real docbook tag; it's what we convert -- to in handleInstructions, above. A kludge to -- work around xml-light's inability to parse an instruction. "br" -> return linebreak _ -> innerInlines where innerInlines = (trimInlines . mconcat) <$> (mapM parseInline $ elContent e) equation constructor = return $ mconcat $ map (constructor . writeTeX) $ rights $ map (readMathML . showElement . everywhere (mkT removePrefix)) $ filterChildren (\x -> qName (elName x) == "math" && qPrefix (elName x) == Just "mml") e removePrefix elname = elname { qPrefix = Nothing } codeWithLang = do let classes' = case attrValue "language" e of "" -> [] l -> [l] return $ codeWith (attrValue "id" e,classes',[]) $ strContentRecursive e simpleList = (mconcat . intersperse (str "," <> space)) <$> mapM getInlines (filterChildren (named "member") e) segmentedList = do tit <- maybe (return mempty) getInlines $ filterChild (named "title") e segtits <- mapM getInlines $ filterChildren (named "segtitle") e segitems <- mapM (mapM getInlines . filterChildren (named "seg")) $ filterChildren (named "seglistitem") e let toSeg = mconcat . zipWith (\x y -> strong (x <> str ":") <> space <> y <> linebreak) segtits let segs = mconcat $ map toSeg segitems let tit' = if tit == mempty then mempty else strong tit <> linebreak return $ linebreak <> tit' <> segs keycombo = spanWith ("",["keycombo"],[]) . mconcat . intersperse (str "+") menuchoice = spanWith ("",["menuchoice"],[]) . mconcat . intersperse (text " > ") 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 . filterElementName (\n -> qName n == name) pandoc-1.19.2.4/src/Text/Pandoc/Readers/OPML.hs0000644000000000000000000001012713155240142017005 0ustar0000000000000000{-# LANGUAGE FlexibleContexts #-} module Text.Pandoc.Readers.OPML ( readOPML ) where import Data.Char (toUpper) import Text.Pandoc.Options import Text.Pandoc.Definition import Text.Pandoc.Builder import Text.Pandoc.Readers.HTML (readHtml) import Text.Pandoc.Readers.Markdown (readMarkdown) import Text.XML.Light import Text.HTML.TagSoup.Entity (lookupEntity) import Data.Generics import Control.Monad.State import Data.Default import Control.Monad.Except import Text.Pandoc.Error type OPML = ExceptT PandocError (State OPMLState) data OPMLState = OPMLState{ opmlSectionLevel :: Int , opmlDocTitle :: Inlines , opmlDocAuthors :: [Inlines] , opmlDocDate :: Inlines } deriving Show instance Default OPMLState where def = OPMLState{ opmlSectionLevel = 0 , opmlDocTitle = mempty , opmlDocAuthors = [] , opmlDocDate = mempty } readOPML :: ReaderOptions -> String -> Either PandocError Pandoc readOPML _ inp = setTitle (opmlDocTitle st') . setAuthors (opmlDocAuthors st') . setDate (opmlDocDate st') . doc . mconcat <$> bs where (bs, st') = flip runState def . runExceptT $ (mapM parseBlock $ normalizeTree $ parseXML inp) -- normalize input, consolidating adjacent Text and CRef elements normalizeTree :: [Content] -> [Content] normalizeTree = everywhere (mkT go) where go :: [Content] -> [Content] go (Text (CData CDataRaw _ _):xs) = xs go (Text (CData CDataText s1 z):Text (CData CDataText s2 _):xs) = Text (CData CDataText (s1 ++ s2) z):xs go (Text (CData CDataText s1 z):CRef r:xs) = Text (CData CDataText (s1 ++ convertEntity r) z):xs go (CRef r:Text (CData CDataText s1 z):xs) = Text (CData CDataText (convertEntity r ++ s1) z):xs go (CRef r1:CRef r2:xs) = Text (CData CDataText (convertEntity r1 ++ convertEntity r2) Nothing):xs go xs = xs convertEntity :: String -> String convertEntity e = maybe (map toUpper e) id (lookupEntity e) -- convenience function to get an attribute value, defaulting to "" attrValue :: String -> Element -> String attrValue attr elt = case lookupAttrBy (\x -> qName x == attr) (elAttribs elt) of Just z -> z Nothing -> "" exceptT :: Either PandocError a -> OPML a exceptT = either throwError return asHtml :: String -> OPML Inlines asHtml s = (\(Pandoc _ bs) -> case bs of [Plain ils] -> fromList ils _ -> mempty) <$> exceptT (readHtml def s) asMarkdown :: String -> OPML Blocks asMarkdown s = (\(Pandoc _ bs) -> fromList bs) <$> exceptT (readMarkdown def s) getBlocks :: Element -> OPML Blocks getBlocks e = mconcat <$> (mapM parseBlock $ elContent e) parseBlock :: Content -> OPML Blocks parseBlock (Elem e) = case qName (elName e) of "ownerName" -> mempty <$ modify (\st -> st{opmlDocAuthors = [text $ strContent e]}) "dateModified" -> mempty <$ modify (\st -> st{opmlDocDate = text $ strContent e}) "title" -> mempty <$ modify (\st -> st{opmlDocTitle = text $ strContent e}) "outline" -> gets opmlSectionLevel >>= sect . (+1) "?xml" -> return mempty _ -> getBlocks e where sect n = do headerText <- asHtml $ attrValue "text" e noteBlocks <- asMarkdown $ attrValue "_note" e modify $ \st -> st{ opmlSectionLevel = n } bs <- getBlocks e modify $ \st -> st{ opmlSectionLevel = n - 1 } let headerText' = case map toUpper (attrValue "type" e) of "LINK" -> link (attrValue "url" e) "" headerText _ -> headerText return $ header n headerText' <> noteBlocks <> bs parseBlock _ = return mempty pandoc-1.19.2.4/src/Text/Pandoc/Readers/TeXMath.hs0000644000000000000000000000341113155240142017546 0ustar0000000000000000{- Copyright (C) 2007-2015 John MacFarlane 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.Readers.TeXMath Copyright : Copyright (C) 2007-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of TeX math to a list of 'Pandoc' inline elements. -} module Text.Pandoc.Readers.TeXMath ( texMathToInlines ) where import Text.Pandoc.Definition import Text.TeXMath -- | Converts a raw TeX math formula to a list of 'Pandoc' inlines. -- Defaults to raw formula between @$@ or @$$@ characters if entire formula -- can't be converted. texMathToInlines :: MathType -> String -- ^ String to parse (assumes @'\n'@ line endings) -> [Inline] texMathToInlines mt inp = case writePandoc dt `fmap` readTeX inp of Right (Just ils) -> ils _ -> [Str (delim ++ inp ++ delim)] where (dt, delim) = case mt of DisplayMath -> (DisplayBlock, "$$") InlineMath -> (DisplayInline, "$") pandoc-1.19.2.4/src/Text/Pandoc/Readers/Textile.hs0000644000000000000000000006072513155240142017665 0ustar0000000000000000{- Copyright (C) 2010-2015 Paul Rivier | tr '*#' '.@' and John MacFarlane 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.Readers.Textile Copyright : Copyright (C) 2010-2015 Paul Rivier and John MacFarlane License : GNU GPL, version 2 or above Maintainer : Paul Rivier Stability : alpha Portability : portable Conversion from Textile to 'Pandoc' document, based on the spec available at http://redcloth.org/textile. Implemented and parsed: - Paragraphs - Code blocks - Lists - blockquote - Inlines : strong, emph, cite, code, deleted, superscript, subscript, links - footnotes - HTML-specific and CSS-specific attributes on headers Left to be implemented: - dimension sign - all caps - continued blocks (ex bq..) TODO : refactor common patterns across readers : - more ... -} module Text.Pandoc.Readers.Textile ( readTextile) where import Text.Pandoc.CSS import Text.Pandoc.Definition import Text.Pandoc.Builder (Inlines, Blocks, trimInlines) import qualified Text.Pandoc.Builder as B import Text.Pandoc.Options import Text.Pandoc.Parsing import Text.Pandoc.Readers.HTML ( htmlTag, isBlockTag, isInlineTag ) import Text.Pandoc.Shared (trim) import Text.Pandoc.Readers.LaTeX ( rawLaTeXInline, rawLaTeXBlock ) import Text.HTML.TagSoup (fromAttrib, Tag(..)) import Text.HTML.TagSoup.Match import Data.List ( intercalate, transpose, intersperse ) import Data.Char ( digitToInt, isUpper ) import Control.Monad ( guard, liftM, when ) import Data.Monoid ((<>)) import Text.Printf import Debug.Trace (trace) import Text.Pandoc.Error -- | Parse a Textile text and return a Pandoc document. readTextile :: ReaderOptions -- ^ Reader options -> String -- ^ String to parse (assuming @'\n'@ line endings) -> Either PandocError Pandoc readTextile opts s = (readWith parseTextile) def{ stateOptions = opts } (s ++ "\n\n") -- | 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, -- 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{ readerParseRaw = True , readerOldDashes = True } } many blankline startPos <- getPosition -- go through once just to get list of reference keys and notes -- docMinusKeys is the raw document with blanks where the keys/notes were... let firstPassParser = noteBlock <|> lineClump manyTill firstPassParser eof >>= setInput . concat setPosition startPos st' <- getState let reversedNotes = stateNotes st' updateState $ \s -> s { stateNotes = reverse reversedNotes } -- now parse it for real... blocks <- parseBlocks return $ Pandoc nullMeta (B.toList blocks) -- FIXME noteMarker :: Parser [Char] ParserState [Char] noteMarker = skipMany spaceChar >> string "fn" >> manyTill digit (char '.') noteBlock :: Parser [Char] ParserState [Char] noteBlock = try $ do startPos <- getPosition ref <- noteMarker optional blankline contents <- liftM unlines $ many1Till anyLine (blanklines <|> noteBlock) endPos <- getPosition let newnote = (ref, contents ++ "\n") st <- getState let oldnotes = stateNotes st updateState $ \s -> s { stateNotes = newnote : oldnotes } -- return blanks so line count isn't affected return $ replicate (sourceLine endPos - sourceLine startPos) '\n' -- | Parse document blocks parseBlocks :: Parser [Char] ParserState Blocks parseBlocks = mconcat <$> manyTill block eof -- | Block parsers list tried in definition order blockParsers :: [Parser [Char] ParserState Blocks] blockParsers = [ codeBlock , header , blockQuote , hrule , commentBlock , anyList , rawHtmlBlock , rawLaTeXBlock' , table , maybeExplicitBlock "p" para , mempty <$ blanklines ] -- | Any block in the order of definition of blockParsers block :: Parser [Char] ParserState Blocks block = do res <- choice blockParsers "block" pos <- getPosition tr <- getOption readerTrace when tr $ trace (printf "line %d: %s" (sourceLine pos) (take 60 $ show $ B.toList res)) (return ()) return res commentBlock :: Parser [Char] ParserState Blocks commentBlock = try $ do string "###." manyTill anyLine blanklines return mempty codeBlock :: Parser [Char] ParserState Blocks codeBlock = codeBlockBc <|> codeBlockPre codeBlockBc :: Parser [Char] ParserState Blocks codeBlockBc = try $ do string "bc." extended <- option False (True <$ char '.') char ' ' let starts = ["p", "table", "bq", "bc", "h1", "h2", "h3", "h4", "h5", "h6", "pre", "###", "notextile"] let ender = choice $ map explicitBlockStart starts contents <- if extended then do f <- anyLine rest <- many (notFollowedBy ender *> anyLine) return (f:rest) else manyTill anyLine blanklines return $ B.codeBlock (trimTrailingNewlines (unlines contents)) trimTrailingNewlines :: String -> String trimTrailingNewlines = reverse . dropWhile (=='\n') . reverse -- | Code Blocks in Textile are between
           and 
          codeBlockPre :: Parser [Char] ParserState Blocks codeBlockPre = try $ do (t@(TagOpen _ attrs),_) <- htmlTag (tagOpen (=="pre") (const True)) result' <- manyTill anyChar (htmlTag (tagClose (=="pre"))) optional blanklines -- drop leading newline if any let result'' = case result' of '\n':xs -> xs _ -> result' -- drop trailing newline if any let result''' = case reverse result'' of '\n':_ -> init result'' _ -> result'' let classes = words $ fromAttrib "class" t let ident = fromAttrib "id" t let kvs = [(k,v) | (k,v) <- attrs, k /= "id" && k /= "class"] return $ B.codeBlockWith (ident,classes,kvs) result''' -- | Header of the form "hN. content" with N in 1..6 header :: Parser [Char] ParserState Blocks header = try $ do char 'h' level <- digitToInt <$> oneOf "123456" attr <- attributes char '.' lookAhead whitespace name <- trimInlines . mconcat <$> many inline attr' <- registerHeader attr name return $ B.headerWith attr' level name -- | Blockquote of the form "bq. content" blockQuote :: Parser [Char] ParserState Blocks blockQuote = try $ do string "bq" >> attributes >> char '.' >> whitespace B.blockQuote <$> para -- Horizontal rule hrule :: Parser [Char] st Blocks hrule = try $ do skipSpaces start <- oneOf "-*" count 2 (skipSpaces >> char start) skipMany (spaceChar <|> char start) newline optional blanklines return B.horizontalRule -- Lists handling -- | Can be a bullet list or an ordered list. This implementation is -- strict in the nesting, sublist must start at exactly "parent depth -- plus one" anyList :: Parser [Char] ParserState Blocks anyList = try $ anyListAtDepth 1 <* blanklines -- | This allow one type of list to be nested into an other type, -- provided correct nesting anyListAtDepth :: Int -> Parser [Char] ParserState Blocks anyListAtDepth depth = choice [ bulletListAtDepth depth, orderedListAtDepth depth, definitionList ] -- | Bullet List of given depth, depth being the number of leading '*' bulletListAtDepth :: Int -> Parser [Char] ParserState Blocks bulletListAtDepth depth = try $ B.bulletList <$> many1 (bulletListItemAtDepth depth) -- | Bullet List Item of given depth, depth being the number of -- leading '*' bulletListItemAtDepth :: Int -> Parser [Char] ParserState Blocks bulletListItemAtDepth = genericListItemAtDepth '*' -- | Ordered List of given depth, depth being the number of -- leading '#' orderedListAtDepth :: Int -> Parser [Char] ParserState Blocks orderedListAtDepth depth = try $ do items <- many1 (orderedListItemAtDepth depth) return $ B.orderedList items -- | Ordered List Item of given depth, depth being the number of -- leading '#' orderedListItemAtDepth :: Int -> Parser [Char] ParserState Blocks orderedListItemAtDepth = genericListItemAtDepth '#' -- | Common implementation of list items genericListItemAtDepth :: Char -> Int -> Parser [Char] ParserState Blocks genericListItemAtDepth c depth = try $ do count depth (char c) >> attributes >> whitespace p <- mconcat <$> many listInline newline sublist <- option mempty (anyListAtDepth (depth + 1)) return $ (B.plain p) <> sublist -- | A definition list is a set of consecutive definition items definitionList :: Parser [Char] ParserState Blocks definitionList = try $ B.definitionList <$> many1 definitionListItem -- | List start character. listStart :: Parser [Char] ParserState () listStart = genericListStart '*' <|> () <$ genericListStart '#' <|> () <$ definitionListStart genericListStart :: Char -> Parser [Char] st () genericListStart c = () <$ try (many1 (char c) >> whitespace) basicDLStart :: Parser [Char] ParserState () basicDLStart = do char '-' whitespace notFollowedBy newline definitionListStart :: Parser [Char] ParserState Inlines definitionListStart = try $ do basicDLStart trimInlines . mconcat <$> many1Till inline ( try (newline *> lookAhead basicDLStart) <|> try (lookAhead (() <$ string ":=")) ) listInline :: Parser [Char] ParserState Inlines listInline = try (notFollowedBy newline >> inline) <|> try (endline <* notFollowedBy listStart) -- | A definition list item in textile begins with '- ', followed by -- the term defined, then spaces and ":=". The definition follows, on -- the same single line, or spaned on multiple line, after a line -- break. definitionListItem :: Parser [Char] ParserState (Inlines, [Blocks]) definitionListItem = try $ do term <- (mconcat . intersperse B.linebreak) <$> many1 definitionListStart def' <- string ":=" *> optional whitespace *> (multilineDef <|> inlineDef) return (term, def') where inlineDef :: Parser [Char] ParserState [Blocks] inlineDef = liftM (\d -> [B.plain d]) $ optional whitespace >> (trimInlines . mconcat <$> many listInline) <* newline multilineDef :: Parser [Char] ParserState [Blocks] multilineDef = try $ do optional whitespace >> newline s <- many1Till anyChar (try (string "=:" >> newline)) -- this ++ "\n\n" does not look very good ds <- parseFromString parseBlocks (s ++ "\n\n") return [ds] -- raw content -- | A raw Html Block, optionally followed by blanklines rawHtmlBlock :: Parser [Char] ParserState Blocks rawHtmlBlock = try $ do skipMany spaceChar (_,b) <- htmlTag isBlockTag optional blanklines return $ B.rawBlock "html" b -- | Raw block of LaTeX content rawLaTeXBlock' :: Parser [Char] ParserState Blocks rawLaTeXBlock' = do guardEnabled Ext_raw_tex B.rawBlock "latex" <$> (rawLaTeXBlock <* spaces) -- | In textile, paragraphs are separated by blank lines. para :: Parser [Char] ParserState Blocks para = B.para . trimInlines . mconcat <$> many1 inline -- Tables toAlignment :: Char -> Alignment toAlignment '<' = AlignLeft toAlignment '>' = AlignRight toAlignment '=' = AlignCenter toAlignment _ = AlignDefault cellAttributes :: Parser [Char] ParserState (Bool, Alignment) cellAttributes = try $ do isHeader <- option False (True <$ char '_') -- we just ignore colspan and rowspan markers: optional $ try $ oneOf "/\\" >> many1 digit -- we pay attention to alignments: alignment <- option AlignDefault $ toAlignment <$> oneOf "<>=" -- ignore other attributes for now: _ <- attributes char '.' return (isHeader, alignment) -- | A table cell spans until a pipe | tableCell :: Parser [Char] ParserState ((Bool, Alignment), Blocks) tableCell = try $ do char '|' (isHeader, alignment) <- option (False, AlignDefault) $ cellAttributes notFollowedBy blankline raw <- trim <$> many (noneOf "|\n" <|> try (char '\n' <* notFollowedBy blankline)) content <- mconcat <$> parseFromString (many inline) raw return ((isHeader, alignment), B.plain content) -- | A table row is made of many table cells tableRow :: Parser [Char] ParserState [((Bool, Alignment), Blocks)] tableRow = try $ do -- skip optional row attributes optional $ try $ do _ <- attributes char '.' many1 spaceChar many1 tableCell <* char '|' <* blankline -- | A table with an optional header. table :: Parser [Char] ParserState Blocks table = try $ do -- ignore table attributes caption <- option mempty $ try $ do string "table" _ <- attributes char '.' rawcapt <- trim <$> anyLine parseFromString (mconcat <$> many inline) rawcapt rawrows <- many1 $ (skipMany ignorableRow) >> tableRow skipMany ignorableRow blanklines let (headers, rows) = case rawrows of (toprow:rest) | any (fst . fst) toprow -> (toprow, rest) _ -> (mempty, rawrows) let nbOfCols = max (length headers) (length $ head rows) let aligns = map minimum $ transpose $ map (map (snd . fst)) (headers:rows) return $ B.table caption (zip aligns (replicate nbOfCols 0.0)) (map snd headers) (map (map snd) rows) -- | Ignore markers for cols, thead, tfoot. ignorableRow :: Parser [Char] ParserState () ignorableRow = try $ do char '|' oneOf ":^-~" _ <- attributes char '.' _ <- anyLine return () explicitBlockStart :: String -> Parser [Char] ParserState () explicitBlockStart name = try $ do string name attributes char '.' optional whitespace optional endline -- | Blocks like 'p' and 'table' do not need explicit block tag. -- However, they can be used to set HTML/CSS attributes when needed. maybeExplicitBlock :: String -- ^ block tag name -> Parser [Char] ParserState Blocks -- ^ implicit block -> Parser [Char] ParserState Blocks maybeExplicitBlock name blk = try $ do optional $ explicitBlockStart name blk ---------- -- Inlines ---------- -- | Any inline element inline :: Parser [Char] ParserState Inlines inline = do choice inlineParsers "inline" -- | Inline parsers tried in order inlineParsers :: [Parser [Char] ParserState Inlines] inlineParsers = [ str , whitespace , endline , code , escapedInline , inlineMarkup , groupedInlineMarkup , rawHtmlInline , rawLaTeXInline' , note , link , image , mark , (B.str . (:[])) <$> characterReference , smartPunctuation inline , symbol ] -- | Inline markups inlineMarkup :: Parser [Char] ParserState Inlines inlineMarkup = choice [ simpleInline (string "??") (B.cite []) , simpleInline (string "**") B.strong , simpleInline (string "__") B.emph , simpleInline (char '*') B.strong , simpleInline (char '_') B.emph , simpleInline (char '+') B.emph -- approximates underline , simpleInline (char '-' <* notFollowedBy (char '-')) B.strikeout , simpleInline (char '^') B.superscript , simpleInline (char '~') B.subscript , simpleInline (char '%') id ] -- | Trademark, registered, copyright mark :: Parser [Char] st Inlines mark = try $ char '(' >> (try tm <|> try reg <|> copy) reg :: Parser [Char] st Inlines reg = do oneOf "Rr" char ')' return $ B.str "\174" tm :: Parser [Char] st Inlines tm = do oneOf "Tt" oneOf "Mm" char ')' return $ B.str "\8482" copy :: Parser [Char] st Inlines copy = do oneOf "Cc" char ')' return $ B.str "\169" note :: Parser [Char] ParserState Inlines note = try $ do ref <- (char '[' *> many1 digit <* char ']') notes <- stateNotes <$> getState case lookup ref notes of Nothing -> fail "note not found" Just raw -> B.note <$> parseFromString parseBlocks raw -- | Special chars markupChars :: [Char] markupChars = "\\*#_@~-+^|%=[]&" -- | Break strings on following chars. Space tab and newline break for -- inlines breaking. Open paren breaks for mark. Quote, dash and dot -- break for smart punctuation. Punctuation breaks for regular -- punctuation. Double quote breaks for named links. > and < break -- for inline html. stringBreakers :: [Char] stringBreakers = " \t\n\r.,\"'?!;:<>«»„“”‚‘’()[]" wordBoundaries :: [Char] wordBoundaries = markupChars ++ stringBreakers -- | Parse a hyphened sequence of words hyphenedWords :: Parser [Char] ParserState String hyphenedWords = do x <- wordChunk xs <- many (try $ char '-' >> wordChunk) return $ intercalate "-" (x:xs) wordChunk :: Parser [Char] ParserState String wordChunk = try $ do hd <- noneOf wordBoundaries tl <- many ( (noneOf wordBoundaries) <|> try (notFollowedBy' note *> oneOf markupChars <* lookAhead (noneOf wordBoundaries) ) ) return $ hd:tl -- | Any string str :: Parser [Char] ParserState Inlines str = do baseStr <- hyphenedWords -- RedCloth compliance : if parsed word is uppercase and immediatly -- followed by parens, parens content is unconditionally word acronym fullStr <- option baseStr $ try $ do guard $ all isUpper baseStr acro <- enclosed (char '(') (char ')') anyChar' return $ concat [baseStr, " (", acro, ")"] updateLastStrPos return $ B.str fullStr -- | Some number of space chars whitespace :: Parser [Char] st Inlines whitespace = many1 spaceChar >> return B.space "whitespace" -- | In Textile, an isolated endline character is a line break endline :: Parser [Char] ParserState Inlines endline = try $ do newline notFollowedBy blankline notFollowedBy listStart notFollowedBy rawHtmlBlock return B.linebreak rawHtmlInline :: Parser [Char] ParserState Inlines rawHtmlInline = B.rawInline "html" . snd <$> htmlTag isInlineTag -- | Raw LaTeX Inline rawLaTeXInline' :: Parser [Char] ParserState Inlines rawLaTeXInline' = try $ do guardEnabled Ext_raw_tex B.singleton <$> rawLaTeXInline -- | Textile standard link syntax is "label":target. But we -- can also have ["label":target]. link :: Parser [Char] ParserState Inlines link = try $ do bracketed <- (True <$ char '[') <|> return False char '"' *> notFollowedBy (oneOf " \t\n\r") attr <- attributes name <- trimInlines . mconcat <$> withQuoteContext InDoubleQuote (many1Till inline (char '"')) char ':' let stop = if bracketed then char ']' else lookAhead $ space <|> try (oneOf "!.,;:" *> (space <|> newline)) url <- many1Till nonspaceChar stop let name' = if B.toList name == [Str "$"] then B.str url else name return $ if attr == nullAttr then B.link url "" name' else B.spanWith attr $ B.link url "" name' -- | image embedding image :: Parser [Char] ParserState Inlines image = try $ do char '!' >> notFollowedBy space (ident, cls, kvs) <- attributes let attr = case lookup "style" kvs of Just stls -> (ident, cls, pickStylesToKVs ["width", "height"] stls) Nothing -> (ident, cls, kvs) src <- many1 (noneOf " \t\n\r!(") alt <- option "" $ try $ char '(' *> manyTill anyChar (char ')') char '!' return $ B.imageWith attr src alt (B.str alt) escapedInline :: Parser [Char] ParserState Inlines escapedInline = escapedEqs <|> escapedTag escapedEqs :: Parser [Char] ParserState Inlines escapedEqs = B.str <$> (try $ string "==" *> manyTill anyChar' (try $ string "==")) -- | literal text escaped btw tags escapedTag :: Parser [Char] ParserState Inlines escapedTag = B.str <$> (try $ string "" *> manyTill anyChar' (try $ string "")) -- | Any special symbol defined in wordBoundaries symbol :: Parser [Char] ParserState Inlines symbol = B.str . singleton <$> (notFollowedBy newline *> notFollowedBy rawHtmlBlock *> oneOf wordBoundaries) -- | Inline code code :: Parser [Char] ParserState Inlines code = code1 <|> code2 -- any character except a newline before a blank line anyChar' :: Parser [Char] ParserState Char anyChar' = satisfy (/='\n') <|> (try $ char '\n' <* notFollowedBy blankline) code1 :: Parser [Char] ParserState Inlines code1 = B.code <$> surrounded (char '@') anyChar' code2 :: Parser [Char] ParserState Inlines code2 = do htmlTag (tagOpen (=="tt") null) B.code <$> manyTill anyChar' (try $ htmlTag $ tagClose (=="tt")) -- | Html / CSS attributes attributes :: Parser [Char] ParserState Attr attributes = (foldl (flip ($)) ("",[],[])) <$> try (do special <- option id specialAttribute attrs <- many attribute return (special : attrs)) specialAttribute :: Parser [Char] ParserState (Attr -> Attr) specialAttribute = do alignStr <- ("center" <$ char '=') <|> ("justify" <$ try (string "<>")) <|> ("right" <$ char '>') <|> ("left" <$ char '<') notFollowedBy spaceChar return $ addStyle ("text-align:" ++ alignStr) attribute :: Parser [Char] ParserState (Attr -> Attr) attribute = try $ (classIdAttr <|> styleAttr <|> langAttr) <* notFollowedBy spaceChar classIdAttr :: Parser [Char] ParserState (Attr -> Attr) classIdAttr = try $ do -- (class class #id) char '(' ws <- words `fmap` manyTill anyChar' (char ')') case reverse ws of [] -> return $ \(_,_,keyvals) -> ("",[],keyvals) (('#':ident'):classes') -> return $ \(_,_,keyvals) -> (ident',classes',keyvals) classes' -> return $ \(_,_,keyvals) -> ("",classes',keyvals) styleAttr :: Parser [Char] ParserState (Attr -> Attr) styleAttr = do style <- try $ enclosed (char '{') (char '}') anyChar' return $ addStyle style addStyle :: String -> Attr -> Attr addStyle style (id',classes,keyvals) = (id',classes,keyvals') where keyvals' = ("style", style') : [(k,v) | (k,v) <- keyvals, k /= "style"] style' = style ++ ";" ++ concat [v | ("style",v) <- keyvals] langAttr :: Parser [Char] ParserState (Attr -> Attr) langAttr = do lang <- try $ enclosed (char '[') (char ']') alphaNum return $ \(id',classes,keyvals) -> (id',classes,("lang",lang):keyvals) -- | Parses material surrounded by a parser. surrounded :: Parser [Char] st t -- ^ surrounding parser -> Parser [Char] st a -- ^ content parser (to be used repeatedly) -> Parser [Char] st [a] surrounded border = enclosed (border *> notFollowedBy (oneOf " \t\n\r")) (try border) simpleInline :: Parser [Char] ParserState t -- ^ surrounding parser -> (Inlines -> Inlines) -- ^ Inline constructor -> Parser [Char] ParserState Inlines -- ^ content parser (to be used repeatedly) simpleInline border construct = try $ do notAfterString border *> notFollowedBy (oneOf " \t\n\r") attr <- attributes body <- trimInlines . mconcat <$> withQuoteContext InSingleQuote (manyTill (notFollowedBy newline >> inline) (try border <* notFollowedBy alphaNum)) return $ construct $ if attr == nullAttr then body else B.spanWith attr body groupedInlineMarkup :: Parser [Char] ParserState Inlines groupedInlineMarkup = try $ do char '[' sp1 <- option mempty $ B.space <$ whitespace result <- withQuoteContext InSingleQuote inlineMarkup sp2 <- option mempty $ B.space <$ whitespace char ']' return $ sp1 <> result <> sp2 -- | Create a singleton list singleton :: a -> [a] singleton x = [x] pandoc-1.19.2.4/src/Text/Pandoc/Readers/Native.hs0000644000000000000000000000431113155240142017462 0ustar0000000000000000{- Copyright (C) 2011-2015 John MacFarlane 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.Readers.Native Copyright : Copyright (C) 2011-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of a string representation of a pandoc type (@Pandoc@, @[Block]@, @Block@, @[Inline]@, or @Inline@) to a @Pandoc@ document. -} module Text.Pandoc.Readers.Native ( readNative ) where import Text.Pandoc.Definition import Text.Pandoc.Shared (safeRead) import Text.Pandoc.Error -- | Read native formatted text and return a Pandoc document. -- The input may be a full pandoc document, a block list, a block, -- an inline list, or an inline. Thus, for example, -- -- > Str "hi" -- -- will be treated as if it were -- -- > Pandoc nullMeta [Plain [Str "hi"]] -- readNative :: String -- ^ String to parse (assuming @'\n'@ line endings) -> Either PandocError Pandoc readNative s = maybe (Pandoc nullMeta <$> readBlocks s) Right (safeRead s) readBlocks :: String -> Either PandocError [Block] readBlocks s = maybe ((:[]) <$> readBlock s) Right (safeRead s) readBlock :: String -> Either PandocError Block readBlock s = maybe (Plain <$> readInlines s) Right (safeRead s) readInlines :: String -> Either PandocError [Inline] readInlines s = maybe ((:[]) <$> readInline s) Right (safeRead s) readInline :: String -> Either PandocError Inline readInline s = maybe (Left . ParseFailure $ "Could not read: " ++ s) Right (safeRead s) pandoc-1.19.2.4/src/Text/Pandoc/Readers/Haddock.hs0000644000000000000000000001401113155240142017567 0ustar0000000000000000{-# LANGUAGE CPP #-} {- | Module : Text.Pandoc.Readers.Haddock Copyright : Copyright (C) 2013 David Lazar License : GNU GPL, version 2 or above Maintainer : David Lazar , John MacFarlane Stability : alpha Conversion of Haddock markup to 'Pandoc' document. -} module Text.Pandoc.Readers.Haddock ( readHaddock ) where import Text.Pandoc.Builder (Blocks, Inlines) import qualified Text.Pandoc.Builder as B import Data.Monoid ((<>)) import Text.Pandoc.Shared (trim, splitBy) import Data.List (intersperse, stripPrefix) import Data.Maybe (fromMaybe) import Text.Pandoc.Definition import Text.Pandoc.Options import Documentation.Haddock.Parser import Documentation.Haddock.Types import Debug.Trace (trace) import Text.Pandoc.Error -- | Parse Haddock markup and return a 'Pandoc' document. readHaddock :: ReaderOptions -- ^ Reader options -> String -- ^ String to parse -> Either PandocError Pandoc readHaddock opts = #if MIN_VERSION_haddock_library(1,2,0) Right . B.doc . docHToBlocks . trace' . _doc . parseParas #else Right . B.doc . docHToBlocks . trace' . parseParas #endif where trace' x = if readerTrace opts then trace (show x) x else x docHToBlocks :: DocH String Identifier -> Blocks docHToBlocks d' = case d' of DocEmpty -> mempty DocAppend (DocParagraph (DocHeader h)) (DocParagraph (DocAName ident)) -> B.headerWith (ident,[],[]) (headerLevel h) (docHToInlines False $ headerTitle h) DocAppend d1 d2 -> mappend (docHToBlocks d1) (docHToBlocks d2) DocString _ -> inlineFallback DocParagraph (DocAName h) -> B.plain $ docHToInlines False $ DocAName h DocParagraph x -> B.para $ docHToInlines False x DocIdentifier _ -> inlineFallback DocIdentifierUnchecked _ -> inlineFallback DocModule s -> B.plain $ docHToInlines False $ DocModule s DocWarning _ -> mempty -- TODO DocEmphasis _ -> inlineFallback DocMonospaced _ -> inlineFallback DocBold _ -> inlineFallback #if MIN_VERSION_haddock_library(1,4,0) DocMathInline _ -> inlineFallback DocMathDisplay _ -> inlineFallback #endif DocHeader h -> B.header (headerLevel h) (docHToInlines False $ headerTitle h) DocUnorderedList items -> B.bulletList (map docHToBlocks items) DocOrderedList items -> B.orderedList (map docHToBlocks items) DocDefList items -> B.definitionList (map (\(d,t) -> (docHToInlines False d, [consolidatePlains $ docHToBlocks t])) items) DocCodeBlock (DocString s) -> B.codeBlockWith ("",[],[]) s DocCodeBlock d -> B.para $ docHToInlines True d DocHyperlink _ -> inlineFallback DocPic _ -> inlineFallback DocAName _ -> inlineFallback DocProperty s -> B.codeBlockWith ("",["property","haskell"],[]) (trim s) DocExamples es -> mconcat $ map (\e -> makeExample ">>>" (exampleExpression e) (exampleResult e)) es where inlineFallback = B.plain $ docHToInlines False d' consolidatePlains = B.fromList . consolidatePlains' . B.toList consolidatePlains' zs@(Plain _ : _) = let (xs, ys) = span isPlain zs in Para (concatMap extractContents xs) : consolidatePlains' ys consolidatePlains' (x : xs) = x : consolidatePlains' xs consolidatePlains' [] = [] isPlain (Plain _) = True isPlain _ = False extractContents (Plain xs) = xs extractContents _ = [] docHToInlines :: Bool -> DocH String Identifier -> Inlines docHToInlines isCode d' = case d' of DocEmpty -> mempty DocAppend d1 d2 -> mappend (docHToInlines isCode d1) (docHToInlines isCode d2) DocString s | isCode -> mconcat $ intersperse B.linebreak $ map B.code $ splitBy (=='\n') s | otherwise -> B.text s DocParagraph _ -> mempty DocIdentifier (_,s,_) -> B.codeWith ("",["haskell","identifier"],[]) s DocIdentifierUnchecked s -> B.codeWith ("",["haskell","identifier"],[]) s DocModule s -> B.codeWith ("",["haskell","module"],[]) s DocWarning _ -> mempty -- TODO DocEmphasis d -> B.emph (docHToInlines isCode d) DocMonospaced (DocString s) -> B.code s DocMonospaced d -> docHToInlines True d DocBold d -> B.strong (docHToInlines isCode d) #if MIN_VERSION_haddock_library(1,4,0) DocMathInline s -> B.math s DocMathDisplay s -> B.displayMath s #endif DocHeader _ -> mempty DocUnorderedList _ -> mempty DocOrderedList _ -> mempty DocDefList _ -> mempty DocCodeBlock _ -> mempty DocHyperlink h -> B.link (hyperlinkUrl h) (hyperlinkUrl h) (maybe (B.text $ hyperlinkUrl h) B.text $ hyperlinkLabel h) DocPic p -> B.image (pictureUri p) (fromMaybe (pictureUri p) $ pictureTitle p) (maybe mempty B.text $ pictureTitle p) DocAName s -> B.spanWith (s,["anchor"],[]) mempty DocProperty _ -> mempty DocExamples _ -> mempty -- | Create an 'Example', stripping superfluous characters as appropriate makeExample :: String -> String -> [String] -> Blocks makeExample prompt expression result = B.para $ B.codeWith ("",["prompt"],[]) prompt <> B.space <> B.codeWith ([], ["haskell","expr"], []) (trim expression) <> B.linebreak <> (mconcat $ intersperse B.linebreak $ map coder result') where -- 1. drop trailing whitespace from the prompt, remember the prefix prefix = takeWhile (`elem` " \t") prompt -- 2. drop, if possible, the exact same sequence of whitespace -- characters from each result line -- -- 3. interpret lines that only contain the string "" as an -- empty line result' = map (substituteBlankLine . tryStripPrefix prefix) result where tryStripPrefix xs ys = fromMaybe ys $ stripPrefix xs ys substituteBlankLine "" = "" substituteBlankLine line = line coder = B.codeWith ([], ["result"], []) pandoc-1.19.2.4/src/Text/Pandoc/Readers/TWiki.hs0000644000000000000000000004420013155240142017264 0ustar0000000000000000{-# LANGUAGE RelaxedPolyRec, FlexibleInstances, TypeSynonymInstances, FlexibleContexts #-} -- RelaxedPolyRec needed for inlinesBetween on GHC < 7 {- Copyright (C) 2014 Alexander Sulfrian 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.Readers.TWiki Copyright : Copyright (C) 2014 Alexander Sulfrian License : GNU GPL, version 2 or above Maintainer : Alexander Sulfrian Stability : alpha Portability : portable Conversion of twiki text to 'Pandoc' document. -} module Text.Pandoc.Readers.TWiki ( readTWiki , readTWikiWithWarnings ) where import Text.Pandoc.Definition 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 Control.Monad import Text.Printf (printf) import Debug.Trace (trace) import Text.Pandoc.XML (fromEntities) import Data.Maybe (fromMaybe) import Text.HTML.TagSoup import Data.Char (isAlphaNum) import qualified Data.Foldable as F import Text.Pandoc.Error -- | Read twiki from an input string and return a Pandoc document. readTWiki :: ReaderOptions -- ^ Reader options -> String -- ^ String to parse (assuming @'\n'@ line endings) -> Either PandocError Pandoc readTWiki opts s = (readWith parseTWiki) def{ stateOptions = opts } (s ++ "\n\n") readTWikiWithWarnings :: ReaderOptions -- ^ Reader options -> String -- ^ String to parse (assuming @'\n'@ line endings) -> Either PandocError (Pandoc, [String]) readTWikiWithWarnings opts s = (readWith parseTWikiWithWarnings) def{ stateOptions = opts } (s ++ "\n\n") where parseTWikiWithWarnings = do doc <- parseTWiki warnings <- stateWarnings <$> getState return (doc, warnings) type TWParser = Parser [Char] ParserState -- -- utility functions -- tryMsg :: String -> TWParser a -> TWParser a tryMsg msg p = try p msg skip :: TWParser a -> TWParser () skip parser = parser >> return () nested :: TWParser a -> TWParser a nested p = do nestlevel <- stateMaxNestingLevel <$> getState guard $ nestlevel > 0 updateState $ \st -> st{ stateMaxNestingLevel = stateMaxNestingLevel st - 1 } res <- p updateState $ \st -> st{ stateMaxNestingLevel = nestlevel } return res htmlElement :: String -> TWParser (Attr, String) htmlElement tag = tryMsg tag $ do (TagOpen _ attr, _) <- htmlTag (~== TagOpen tag []) content <- manyTill anyChar (endtag <|> endofinput) return (htmlAttrToPandoc attr, trim content) where endtag = skip $ htmlTag (~== TagClose tag) endofinput = lookAhead $ try $ skipMany blankline >> skipSpaces >> eof trim = dropWhile (=='\n') . reverse . dropWhile (=='\n') . reverse htmlAttrToPandoc :: [Attribute String] -> Attr htmlAttrToPandoc attrs = (ident, classes, keyvals) where ident = fromMaybe "" $ lookup "id" attrs classes = maybe [] words $ lookup "class" attrs keyvals = [(k,v) | (k,v) <- attrs, k /= "id" && k /= "class"] parseHtmlContentWithAttrs :: String -> TWParser a -> TWParser (Attr, [a]) parseHtmlContentWithAttrs tag parser = do (attr, content) <- htmlElement tag parsedContent <- try $ parseContent content return (attr, parsedContent) where parseContent = parseFromString $ nested $ manyTill parser endOfContent endOfContent = try $ skipMany blankline >> skipSpaces >> eof parseHtmlContent :: String -> TWParser a -> TWParser [a] parseHtmlContent tag p = parseHtmlContentWithAttrs tag p >>= return . snd -- -- main parser -- parseTWiki :: TWParser Pandoc parseTWiki = do bs <- mconcat <$> many block spaces eof return $ B.doc bs -- -- block parsers -- block :: TWParser B.Blocks block = do tr <- getOption readerTrace pos <- getPosition res <- mempty <$ skipMany1 blankline <|> blockElements <|> para skipMany blankline when tr $ trace (printf "line %d: %s" (sourceLine pos) (take 60 $ show $ B.toList res)) (return ()) return res blockElements :: TWParser B.Blocks blockElements = choice [ separator , header , verbatim , literal , list "" , table , blockQuote , noautolink ] separator :: TWParser B.Blocks separator = tryMsg "separator" $ string "---" >> newline >> return B.horizontalRule header :: TWParser B.Blocks header = tryMsg "header" $ do string "---" level <- many1 (char '+') >>= return . length guard $ level <= 6 classes <- option [] $ string "!!" >> return ["unnumbered"] skipSpaces content <- B.trimInlines . mconcat <$> manyTill inline newline attr <- registerHeader ("", classes, []) content return $ B.headerWith attr level $ content verbatim :: TWParser B.Blocks verbatim = (htmlElement "verbatim" <|> htmlElement "pre") >>= return . (uncurry B.codeBlockWith) literal :: TWParser B.Blocks literal = htmlElement "literal" >>= return . rawBlock where format (_, _, kvs) = fromMaybe "html" $ lookup "format" kvs rawBlock (attrs, content) = B.rawBlock (format attrs) content list :: String -> TWParser B.Blocks list prefix = choice [ bulletList prefix , orderedList prefix , definitionList prefix] definitionList :: String -> TWParser B.Blocks definitionList prefix = tryMsg "definitionList" $ do indent <- lookAhead $ string prefix *> (many1 $ string " ") <* string "$ " elements <- many $ parseDefinitionListItem (prefix ++ concat indent) return $ B.definitionList elements where parseDefinitionListItem :: String -> TWParser (B.Inlines, [B.Blocks]) parseDefinitionListItem indent = do string (indent ++ "$ ") >> skipSpaces term <- many1Till inline $ string ": " line <- listItemLine indent $ string "$ " return $ (mconcat term, [line]) bulletList :: String -> TWParser B.Blocks bulletList prefix = tryMsg "bulletList" $ parseList prefix (char '*') (char ' ') orderedList :: String -> TWParser B.Blocks orderedList prefix = tryMsg "orderedList" $ parseList prefix (oneOf "1iIaA") (string ". ") parseList :: String -> TWParser Char -> TWParser a -> TWParser B.Blocks parseList prefix marker delim = do (indent, style) <- lookAhead $ string prefix *> listStyle <* delim blocks <- many $ parseListItem (prefix ++ indent) (char style <* delim) return $ case style of '1' -> B.orderedListWith (1, DefaultStyle, DefaultDelim) blocks 'i' -> B.orderedListWith (1, LowerRoman, DefaultDelim) blocks 'I' -> B.orderedListWith (1, UpperRoman, DefaultDelim) blocks 'a' -> B.orderedListWith (1, LowerAlpha, DefaultDelim) blocks 'A' -> B.orderedListWith (1, UpperAlpha, DefaultDelim) blocks _ -> B.bulletList blocks where listStyle = do indent <- many1 $ string " " style <- marker return (concat indent, style) parseListItem :: Show a => String -> TWParser a -> TWParser B.Blocks parseListItem prefix marker = string prefix >> marker >> listItemLine prefix marker listItemLine :: Show a => String -> TWParser a -> TWParser B.Blocks listItemLine prefix marker = lineContent >>= parseContent >>= return . mconcat where lineContent = do content <- anyLine continuation <- optionMaybe listContinuation return $ filterSpaces content ++ "\n" ++ (maybe "" (" " ++) continuation) filterSpaces = reverse . dropWhile (== ' ') . reverse listContinuation = notFollowedBy (string prefix >> marker) >> string " " >> lineContent parseContent = parseFromString $ many1 $ nestedList <|> parseInline parseInline = many1Till inline (lastNewline <|> newlineBeforeNestedList) >>= return . B.plain . mconcat nestedList = list prefix lastNewline = try $ char '\n' <* eof newlineBeforeNestedList = try $ char '\n' <* lookAhead nestedList table :: TWParser B.Blocks table = try $ do tableHead <- optionMaybe $ many1Till tableParseHeader newline >>= return . unzip rows <- many1 tableParseRow return $ buildTable mempty rows $ fromMaybe (align rows, columns rows) tableHead where buildTable caption rows (aligns, heads) = B.table caption aligns heads rows align rows = replicate (columCount rows) (AlignDefault, 0) columns rows = replicate (columCount rows) mempty columCount rows = length $ head rows tableParseHeader :: TWParser ((Alignment, Double), B.Blocks) tableParseHeader = try $ do char '|' leftSpaces <- many spaceChar >>= return . length char '*' content <- tableColumnContent (char '*' >> skipSpaces >> char '|') char '*' rightSpaces <- many spaceChar >>= return . length optional tableEndOfRow return (tableAlign leftSpaces rightSpaces, content) where tableAlign left right | left >= 2 && left == right = (AlignCenter, 0) | left > right = (AlignRight, 0) | otherwise = (AlignLeft, 0) tableParseRow :: TWParser [B.Blocks] tableParseRow = many1Till tableParseColumn newline tableParseColumn :: TWParser B.Blocks tableParseColumn = char '|' *> skipSpaces *> tableColumnContent (skipSpaces >> char '|') <* skipSpaces <* optional tableEndOfRow tableEndOfRow :: TWParser Char tableEndOfRow = lookAhead (try $ char '|' >> char '\n') >> char '|' tableColumnContent :: TWParser a -> TWParser B.Blocks tableColumnContent end = manyTill content (lookAhead $ try end) >>= return . B.plain . mconcat where content = continuation <|> inline continuation = try $ char '\\' >> newline >> return mempty blockQuote :: TWParser B.Blocks blockQuote = parseHtmlContent "blockquote" block >>= return . B.blockQuote . mconcat noautolink :: TWParser B.Blocks noautolink = do (_, content) <- htmlElement "noautolink" st <- getState setState $ st{ stateAllowLinks = False } blocks <- try $ parseContent content setState $ st{ stateAllowLinks = True } return $ mconcat blocks where parseContent = parseFromString $ many $ block para :: TWParser B.Blocks para = many1Till inline endOfParaElement >>= return . result . mconcat where endOfParaElement = lookAhead $ endOfInput <|> endOfPara <|> newBlockElement endOfInput = try $ skipMany blankline >> skipSpaces >> eof endOfPara = try $ blankline >> skipMany1 blankline newBlockElement = try $ blankline >> skip blockElements result content = if F.all (==Space) content then mempty else B.para $ B.trimInlines content -- -- inline parsers -- inline :: TWParser B.Inlines inline = choice [ whitespace , br , macro , strong , strongHtml , strongAndEmph , emph , emphHtml , boldCode , smart , link , htmlComment , code , codeHtml , nop , autoLink , str , symbol ] "inline" whitespace :: TWParser B.Inlines whitespace = (lb <|> regsp) >>= return where lb = try $ skipMany spaceChar >> linebreak >> return B.space regsp = try $ skipMany1 spaceChar >> return B.space br :: TWParser B.Inlines br = try $ string "%BR%" >> return B.linebreak linebreak :: TWParser B.Inlines linebreak = newline >> notFollowedBy newline >> (lastNewline <|> innerNewline) where lastNewline = eof >> return mempty innerNewline = return B.space between :: (Monoid c) => TWParser a -> TWParser b -> (TWParser b -> TWParser c) -> TWParser c between start end p = mconcat <$> try (start >> notFollowedBy whitespace >> many1Till (p end) end) enclosed :: (Monoid b) => TWParser a -> (TWParser a -> TWParser b) -> TWParser b enclosed sep p = between sep (try $ sep <* endMarker) p where endMarker = lookAhead $ skip endSpace <|> skip (oneOf ".,!?:)|") <|> eof endSpace = (spaceChar <|> newline) >> return B.space macro :: TWParser B.Inlines macro = macroWithParameters <|> withoutParameters where withoutParameters = enclosed (char '%') (\_ -> macroName) >>= return . emptySpan emptySpan name = buildSpan name [] mempty macroWithParameters :: TWParser B.Inlines macroWithParameters = try $ do char '%' name <- macroName (content, kvs) <- attributes char '%' return $ buildSpan name kvs $ B.str content buildSpan :: String -> [(String, String)] -> B.Inlines -> B.Inlines buildSpan className kvs = B.spanWith attrs where attrs = ("", ["twiki-macro", className] ++ additionalClasses, kvsWithoutClasses) additionalClasses = maybe [] words $ lookup "class" kvs kvsWithoutClasses = [(k,v) | (k,v) <- kvs, k /= "class"] macroName :: TWParser String macroName = do first <- letter rest <- many $ alphaNum <|> char '_' return (first:rest) attributes :: TWParser (String, [(String, String)]) attributes = char '{' *> spnl *> many (attribute <* spnl) <* char '}' >>= return . foldr (either mkContent mkKvs) ([], []) where spnl = skipMany (spaceChar <|> newline) mkContent c ([], kvs) = (c, kvs) mkContent c (rest, kvs) = (c ++ " " ++ rest, kvs) mkKvs kv (cont, rest) = (cont, (kv : rest)) attribute :: TWParser (Either String (String, String)) attribute = withKey <|> withoutKey where withKey = try $ do key <- macroName char '=' parseValue False >>= return . (curry Right key) withoutKey = try $ parseValue True >>= return . Left parseValue allowSpaces = (withQuotes <|> withoutQuotes allowSpaces) >>= return . fromEntities withQuotes = between (char '"') (char '"') (\_ -> count 1 $ noneOf ['"']) withoutQuotes allowSpaces | allowSpaces == True = many1 $ noneOf "}" | otherwise = many1 $ noneOf " }" nestedInlines :: Show a => TWParser a -> TWParser B.Inlines nestedInlines end = innerSpace <|> nestedInline where innerSpace = try $ whitespace <* (notFollowedBy end) nestedInline = notFollowedBy whitespace >> nested inline strong :: TWParser B.Inlines strong = try $ enclosed (char '*') nestedInlines >>= return . B.strong strongHtml :: TWParser B.Inlines strongHtml = (parseHtmlContent "strong" inline <|> parseHtmlContent "b" inline) >>= return . B.strong . mconcat strongAndEmph :: TWParser B.Inlines strongAndEmph = try $ enclosed (string "__") nestedInlines >>= return . B.emph . B.strong emph :: TWParser B.Inlines emph = try $ enclosed (char '_') nestedInlines >>= return . B.emph emphHtml :: TWParser B.Inlines emphHtml = (parseHtmlContent "em" inline <|> parseHtmlContent "i" inline) >>= return . B.emph . mconcat nestedString :: Show a => TWParser a -> TWParser String nestedString end = innerSpace <|> (count 1 nonspaceChar) where innerSpace = try $ many1 spaceChar <* notFollowedBy end boldCode :: TWParser B.Inlines boldCode = try $ enclosed (string "==") nestedString >>= return . B.strong . B.code . fromEntities htmlComment :: TWParser B.Inlines htmlComment = htmlTag isCommentTag >> return mempty code :: TWParser B.Inlines code = try $ enclosed (char '=') nestedString >>= return . B.code . fromEntities codeHtml :: TWParser B.Inlines codeHtml = do (attrs, content) <- parseHtmlContentWithAttrs "code" anyChar return $ B.codeWith attrs $ fromEntities content autoLink :: TWParser B.Inlines autoLink = try $ do state <- getState guard $ stateAllowLinks state (text, url) <- parseLink guard $ checkLink (head $ reverse url) return $ makeLink (text, url) where parseLink = notFollowedBy nop >> (uri <|> emailAddress) makeLink (text, url) = B.link url "" $ B.str text checkLink c | c == '/' = True | otherwise = isAlphaNum c str :: TWParser B.Inlines str = (many1 alphaNum <|> count 1 characterReference) >>= return . B.str nop :: TWParser B.Inlines nop = try $ (skip exclamation <|> skip nopTag) >> followContent where exclamation = char '!' nopTag = stringAnyCase "" followContent = many1 nonspaceChar >>= return . B.str . fromEntities symbol :: TWParser B.Inlines symbol = count 1 nonspaceChar >>= return . B.str smart :: TWParser B.Inlines smart = do getOption readerSmart >>= guard doubleQuoted <|> singleQuoted <|> choice [ apostrophe , dash , ellipses ] singleQuoted :: TWParser B.Inlines singleQuoted = try $ do singleQuoteStart withQuoteContext InSingleQuote $ many1Till inline singleQuoteEnd >>= (return . B.singleQuoted . B.trimInlines . mconcat) doubleQuoted :: TWParser B.Inlines doubleQuoted = try $ do doubleQuoteStart contents <- mconcat <$> many (try $ notFollowedBy doubleQuoteEnd >> inline) (withQuoteContext InDoubleQuote $ doubleQuoteEnd >> return (B.doubleQuoted $ B.trimInlines contents)) <|> (return $ (B.str "\8220") B.<> contents) link :: TWParser B.Inlines link = try $ do st <- getState guard $ stateAllowLinks st setState $ st{ stateAllowLinks = False } (url, title, content) <- linkText setState $ st{ stateAllowLinks = True } return $ B.link url title content linkText :: TWParser (String, String, B.Inlines) linkText = do string "[[" url <- many1Till anyChar (char ']') content <- option [B.str url] linkContent char ']' return (url, "", mconcat content) where linkContent = (char '[') >> many1Till anyChar (char ']') >>= parseLinkContent parseLinkContent = parseFromString $ many1 inline pandoc-1.19.2.4/src/Text/Pandoc/Readers/Txt2Tags.hs0000644000000000000000000004254113155240142017723 0ustar0000000000000000{-# LANGUAGE ViewPatterns #-} {- Copyright (C) 2014 Matthew Pickering 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.Readers.Txt2Tags Copyright : Copyright (C) 2014 Matthew Pickering License : GNU GPL, version 2 or above Maintainer : Matthew Pickering Conversion of txt2tags formatted plain text to 'Pandoc' document. -} module Text.Pandoc.Readers.Txt2Tags ( readTxt2Tags , getT2TMeta , T2TMeta (..) , readTxt2TagsNoMacros) where import qualified Text.Pandoc.Builder as B import Text.Pandoc.Builder ( Inlines, Blocks, trimInlines ) import Data.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 Data.Char (toLower) import Data.List (transpose, intersperse, intercalate) import Data.Maybe (fromMaybe) --import Network.URI (isURI) -- Not sure whether to use this function import Control.Monad (void, guard, when) import Data.Default import Control.Monad.Reader (Reader, runReader, asks) import Text.Pandoc.Error import Data.Time.LocalTime (getZonedTime) import System.Directory(getModificationTime) import Data.Time.Format (formatTime) import Text.Pandoc.Compat.Time (defaultTimeLocale) import System.IO.Error (catchIOError) type T2T = ParserT String ParserState (Reader T2TMeta) -- | An object for the T2T macros meta information -- the contents of each field is simply substituted verbatim into the file data T2TMeta = T2TMeta { date :: String -- ^ Current date , mtime :: String -- ^ Last modification time of infile , infile :: FilePath -- ^ Input file , outfile :: FilePath -- ^ Output file } deriving Show instance Default T2TMeta where def = T2TMeta "" "" "" "" -- | Get the meta information required by Txt2Tags macros getT2TMeta :: [FilePath] -> FilePath -> IO T2TMeta getT2TMeta inps out = do curDate <- formatTime defaultTimeLocale "%F" <$> getZonedTime let getModTime = fmap (formatTime defaultTimeLocale "%T") . getModificationTime curMtime <- case inps of [] -> formatTime defaultTimeLocale "%T" <$> getZonedTime _ -> catchIOError (maximum <$> mapM getModTime inps) (const (return "")) return $ T2TMeta curDate curMtime (intercalate ", " inps) out -- | Read Txt2Tags from an input string returning a Pandoc document readTxt2Tags :: T2TMeta -> ReaderOptions -> String -> Either PandocError Pandoc readTxt2Tags t opts s = flip runReader t $ readWithM parseT2T (def {stateOptions = opts}) (s ++ "\n\n") -- | Read Txt2Tags (ignoring all macros) from an input string returning -- a Pandoc document readTxt2TagsNoMacros :: ReaderOptions -> String -> Either PandocError Pandoc readTxt2TagsNoMacros = readTxt2Tags def parseT2T :: T2T Pandoc parseT2T = do -- Parse header if standalone flag is set standalone <- getOption readerStandalone when standalone parseHeader body <- mconcat <$> manyTill block eof meta' <- stateMeta <$> getState return $ Pandoc meta' (B.toList body) parseHeader :: T2T () parseHeader = do () <$ try blankline <|> header meta <- stateMeta <$> getState optional blanklines config <- manyTill setting (notFollowedBy setting) -- TODO: Handle settings better let settings = foldr (\(k,v) -> B.setMeta k (MetaString v)) meta config updateState (\s -> s {stateMeta = settings}) <* optional blanklines header :: T2T () header = titleline >> authorline >> dateline headerline :: B.ToMetaValue a => String -> T2T a -> T2T () headerline field p = (() <$ try blankline) <|> (p >>= updateState . B.setMeta field) titleline :: T2T () titleline = headerline "title" (trimInlines . mconcat <$> manyTill inline newline) authorline :: T2T () authorline = headerline "author" (sepBy author (char ';') <* newline) where author = trimInlines . mconcat <$> many (notFollowedBy (char ';' <|> newline) >> inline) dateline :: T2T () dateline = headerline "date" (trimInlines . mconcat <$> manyTill inline newline) type Keyword = String type Value = String setting :: T2T (Keyword, Value) setting = do string "%!" keyword <- ignoreSpacesCap (many1 alphaNum) char ':' value <- ignoreSpacesCap (manyTill anyChar (newline)) return (keyword, value) -- Blocks parseBlocks :: T2T Blocks parseBlocks = mconcat <$> manyTill block eof block :: T2T Blocks block = do choice [ mempty <$ blanklines , quote , hrule -- hrule must go above title , title , commentBlock , verbatim , rawBlock , taggedBlock , list , table , para ] title :: T2T Blocks title = try $ balancedTitle '+' <|> balancedTitle '=' balancedTitle :: Char -> T2T Blocks balancedTitle c = try $ do spaces level <- length <$> many1 (char c) guard (level <= 5) -- Max header level 5 heading <- manyTill (noneOf "\n\r") (count level (char c)) label <- optionMaybe (enclosed (char '[') (char ']') (alphaNum <|> oneOf "_-")) many spaceChar *> newline let attr = maybe nullAttr (\x -> (x, [], [])) label return $ B.headerWith attr level (trimInlines $ B.text heading) para :: T2T Blocks para = try $ do ils <- parseInlines nl <- option False (True <$ newline) option (B.plain ils) (guard nl >> notFollowedBy listStart >> return (B.para ils)) where listStart = try bulletListStart <|> orderedListStart commentBlock :: T2T Blocks commentBlock = try (blockMarkupArea (anyLine) (const mempty) "%%%") <|> comment -- Seperator and Strong line treated the same hrule :: T2T Blocks hrule = try $ do spaces line <- many1 (oneOf "=-_") guard (length line >= 20) B.horizontalRule <$ blankline quote :: T2T Blocks quote = try $ do lookAhead tab rawQuote <- many1 (tab *> optional spaces *> anyLine) contents <- parseFromString parseBlocks (intercalate "\n" rawQuote ++ "\n\n") return $ B.blockQuote contents commentLine :: T2T Inlines commentLine = comment -- List Parsing code from Org Reader list :: T2T Blocks list = choice [bulletList, orderedList, definitionList] bulletList :: T2T Blocks bulletList = B.bulletList . compactify' <$> many1 (listItem bulletListStart parseBlocks) orderedList :: T2T Blocks orderedList = B.orderedList . compactify' <$> many1 (listItem orderedListStart parseBlocks) definitionList :: T2T Blocks definitionList = try $ do B.definitionList . compactify'DL <$> many1 (listItem definitionListStart definitionListEnd) definitionListEnd :: T2T (Inlines, [Blocks]) definitionListEnd = (,) <$> (mconcat <$> manyTill inline newline) <*> ((:[]) <$> parseBlocks) genericListStart :: T2T Char -> T2T Int genericListStart listMarker = try $ (2+) <$> (length <$> many spaceChar <* listMarker <* space <* notFollowedBy space) -- parses bullet list \start and returns its length (excl. following whitespace) bulletListStart :: T2T Int bulletListStart = genericListStart (char '-') orderedListStart :: T2T Int orderedListStart = genericListStart (char '+' ) definitionListStart :: T2T Int definitionListStart = genericListStart (char ':') -- parse raw text for one list item, excluding start marker and continuations listItem :: T2T Int -> T2T a -> T2T a listItem start end = try $ do markerLength <- try start firstLine <- anyLineNewline blank <- option "" ("\n" <$ blankline) rest <- concat <$> many (listContinuation markerLength) parseFromString end $ firstLine ++ blank ++ rest -- continuation of a list item - indented and separated by blankline or endline. -- Note: nested lists are parsed as continuations. listContinuation :: Int -> T2T String listContinuation markerLength = try $ notFollowedBy' (blankline >> blankline) *> (mappend <$> (concat <$> many1 listLine) <*> many blankline) where listLine = try $ indentWith markerLength *> anyLineNewline anyLineNewline :: T2T String anyLineNewline = (++ "\n") <$> anyLine indentWith :: Int -> T2T String indentWith n = count n space -- Table table :: T2T Blocks table = try $ do tableHeader <- fmap snd <$> option mempty (try headerRow) rows <- many1 (many commentLine *> tableRow) let columns = transpose rows let ncolumns = length columns let aligns = map (foldr1 findAlign) (map (map fst) columns) let rows' = map (map snd) rows let size = maximum (map length rows') let rowsPadded = map (pad size) rows' let headerPadded = if (not (null tableHeader)) then pad size tableHeader else mempty return $ B.table mempty (zip aligns (replicate ncolumns 0.0)) headerPadded rowsPadded pad :: (Monoid a) => Int -> [a] -> [a] pad n xs = xs ++ (replicate (n - length xs) mempty) findAlign :: Alignment -> Alignment -> Alignment findAlign x y | x == y = x | otherwise = AlignDefault headerRow :: T2T [(Alignment, Blocks)] headerRow = genericRow (string "||") tableRow :: T2T [(Alignment, Blocks)] tableRow = genericRow (char '|') genericRow :: T2T a -> T2T [(Alignment, Blocks)] genericRow start = try $ do spaces *> start manyTill tableCell newline "genericRow" tableCell :: T2T (Alignment, Blocks) tableCell = try $ do leftSpaces <- length <$> lookAhead (many1 space) -- Case of empty cell means we must lookAhead content <- (manyTill inline (try $ lookAhead (cellEnd))) rightSpaces <- length <$> many space let align = case compare leftSpaces rightSpaces of LT -> AlignLeft EQ -> AlignCenter GT -> AlignRight endOfCell return $ (align, B.plain (B.trimInlines $ mconcat content)) where cellEnd = (void newline <|> (many1 space *> endOfCell)) endOfCell :: T2T () endOfCell = try (skipMany1 $ char '|') <|> ( () <$ lookAhead newline) -- Raw area verbatim :: T2T Blocks verbatim = genericBlock anyLineNewline B.codeBlock "```" rawBlock :: T2T Blocks rawBlock = genericBlock anyLineNewline (B.para . B.str) "\"\"\"" taggedBlock :: T2T Blocks taggedBlock = do target <- getTarget genericBlock anyLineNewline (B.rawBlock target) "'''" -- Generic genericBlock :: Monoid a => T2T a -> (a -> Blocks) -> String -> T2T Blocks genericBlock p f s = blockMarkupArea p f s <|> blockMarkupLine p f s blockMarkupArea :: Monoid a => (T2T a) -> (a -> Blocks) -> String -> T2T Blocks blockMarkupArea p f s = try $ (do string s *> blankline f . mconcat <$> (manyTill p (eof <|> void (string s *> blankline)))) blockMarkupLine :: T2T a -> (a -> Blocks) -> String -> T2T Blocks blockMarkupLine p f s = try (f <$> (string s *> space *> p)) -- Can be in either block or inline position comment :: Monoid a => T2T a comment = try $ do atStart notFollowedBy macro mempty <$ (char '%' *> anyLine) -- Inline parseInlines :: T2T Inlines parseInlines = trimInlines . mconcat <$> many1 inline inline :: T2T Inlines inline = do choice [ endline , macro , commentLine , whitespace , url , link , image , bold , underline , code , raw , tagged , strike , italic , code , str , symbol ] bold :: T2T Inlines bold = inlineMarkup inline B.strong '*' (B.str) underline :: T2T Inlines underline = inlineMarkup inline B.emph '_' (B.str) strike :: T2T Inlines strike = inlineMarkup inline B.strikeout '-' (B.str) italic :: T2T Inlines italic = inlineMarkup inline B.emph '/' (B.str) code :: T2T Inlines code = inlineMarkup ((:[]) <$> anyChar) B.code '`' id raw :: T2T Inlines raw = inlineMarkup ((:[]) <$> anyChar) B.text '"' id tagged :: T2T Inlines tagged = do target <- getTarget inlineMarkup ((:[]) <$> anyChar) (B.rawInline target) '\'' id -- Parser for markup indicated by a double character. -- Inline markup is greedy and glued -- Greedy meaning ***a*** = Bold [Str "*a*"] -- Glued meaning that markup must be tight to content -- Markup can't pass newlines inlineMarkup :: Monoid a => (T2T a) -- Content parser -> (a -> Inlines) -- Constructor -> Char -- Fence -> (String -> a) -- Special Case to handle ****** -> T2T Inlines inlineMarkup p f c special = try $ do start <- many1 (char c) let l = length start guard (l >= 2) when (l == 2) (void $ notFollowedBy space) -- We must make sure that there is no space before the start of the -- closing tags body <- optionMaybe (try $ manyTill (noneOf "\n\r") $ (try $ lookAhead (noneOf " " >> string [c,c] ))) case body of Just middle -> do lastChar <- anyChar end <- many1 (char c) let parser inp = parseFromString (mconcat <$> many p) inp let start' = special (drop 2 start) body' <- parser (middle ++ [lastChar]) let end' = special (drop 2 end) return $ f (start' <> body' <> end') Nothing -> do -- Either bad or case such as ***** guard (l >= 5) let body' = (replicate (l - 4) c) return $ f (special body') link :: T2T Inlines link = try imageLink <|> titleLink -- Link with title titleLink :: T2T Inlines titleLink = try $ do char '[' notFollowedBy space tokens <- sepBy1 (many $ noneOf " ]") space guard (length tokens >= 2) char ']' let link' = last tokens guard (length link' > 0) let tit = concat (intersperse " " (init tokens)) return $ B.link link' "" (B.text tit) -- Link with image imageLink :: T2T Inlines imageLink = try $ do char '[' body <- image many1 space l <- manyTill (noneOf "\n\r ") (char ']') return (B.link l "" body) macro :: T2T Inlines macro = try $ do name <- string "%%" *> oneOfStringsCI (map fst commands) optional (try $ enclosed (char '(') (char ')') anyChar) lookAhead (spaceChar <|> oneOf specialChars <|> newline) maybe (return mempty) (\f -> B.str <$> asks f) (lookup name commands) where commands = [ ("date", date), ("mtime", mtime) , ("infile", infile), ("outfile", outfile)] -- raw URLs in text are automatically linked url :: T2T Inlines url = try $ do (rawUrl, escapedUrl) <- (try uri <|> emailAddress) return $ B.link rawUrl "" (B.str escapedUrl) uri :: T2T (String, String) uri = try $ do address <- t2tURI return (address, escapeURI address) -- The definition of a URI in the T2T source differs from the -- actual definition. This is a transcription of the definition in -- the source of v2.6 --isT2TURI :: String -> Bool --isT2TURI (parse t2tURI "" -> Right _) = True --isT2TURI _ = False t2tURI :: T2T String t2tURI = do start <- try ((++) <$> proto <*> urlLogin) <|> guess domain <- many1 chars sep <- many (char '/') form' <- option mempty ((:) <$> char '?' <*> many1 form) anchor' <- option mempty ((:) <$> char '#' <*> many anchor) return (start ++ domain ++ sep ++ form' ++ anchor') where protos = ["http", "https", "ftp", "telnet", "gopher", "wais"] proto = (++) <$> oneOfStrings protos <*> string "://" guess = (++) <$> (((++) <$> stringAnyCase "www" <*> option mempty ((:[]) <$> oneOf "23")) <|> stringAnyCase "ftp") <*> ((:[]) <$> char '.') login = alphaNum <|> oneOf "_.-" pass = many (noneOf " @") chars = alphaNum <|> oneOf "%._/~:,=$@&+-" anchor = alphaNum <|> oneOf "%._0" form = chars <|> oneOf ";*" urlLogin = option mempty $ try ((\x y z -> x ++ y ++ [z]) <$> many1 login <*> option mempty ((:) <$> char ':' <*> pass) <*> char '@') image :: T2T Inlines image = try $ do -- List taken from txt2tags source let extensions = [".jpg", ".jpeg", ".gif", ".png", ".eps", ".bmp"] char '[' path <- manyTill (noneOf "\n\t\r ") (try $ lookAhead (oneOfStrings extensions)) ext <- oneOfStrings extensions char ']' return $ B.image (path ++ ext) "" mempty -- Characters used in markup specialChars :: String specialChars = "%*-_/|:+;" tab :: T2T Char tab = char '\t' space :: T2T Char space = char ' ' spaces :: T2T String spaces = many space endline :: T2T Inlines endline = try $ do newline notFollowedBy blankline notFollowedBy hrule notFollowedBy title notFollowedBy verbatim notFollowedBy rawBlock notFollowedBy taggedBlock notFollowedBy quote notFollowedBy list notFollowedBy table return $ B.softbreak str :: T2T Inlines str = try $ do B.str <$> many1 (noneOf $ specialChars ++ "\n\r ") whitespace :: T2T Inlines whitespace = try $ B.space <$ spaceChar symbol :: T2T Inlines symbol = B.str . (:[]) <$> oneOf specialChars -- Utility getTarget :: T2T String getTarget = do mv <- lookupMeta "target" . stateMeta <$> getState let MetaString target = fromMaybe (MetaString "html") mv return target atStart :: T2T () atStart = (sourceColumn <$> getPosition) >>= guard . (== 1) ignoreSpacesCap :: T2T String -> T2T String ignoreSpacesCap p = map toLower <$> (spaces *> p <* spaces) pandoc-1.19.2.4/src/Text/Pandoc/Readers/Docx.hs0000644000000000000000000005521013155240142017135 0ustar0000000000000000{-# LANGUAGE PatternGuards, OverloadedStrings, CPP #-} {- Copyright (C) 2014-2016 Jesse Rosenthal 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.Readers.Docx Copyright : Copyright (C) 2014-2016 Jesse Rosenthal License : GNU GPL, version 2 or above Maintainer : Jesse Rosenthal Stability : alpha Portability : portable Conversion of Docx type (defined in Text.Pandoc.Readers.Docx.Parse) to 'Pandoc' document. -} {- Current state of implementation of Docx entities ([x] means implemented, [-] means partially implemented): * Blocks - [X] Para - [X] CodeBlock (styled with `SourceCode`) - [X] BlockQuote (styled with `Quote`, `BlockQuote`, or, optionally, indented) - [X] OrderedList - [X] BulletList - [X] DefinitionList (styled with adjacent `DefinitionTerm` and `Definition`) - [X] Header (styled with `Heading#`) - [ ] HorizontalRule - [-] Table (column widths and alignments not yet implemented) * Inlines - [X] Str - [X] Emph (italics and underline both read as Emph) - [X] Strong - [X] Strikeout - [X] Superscript - [X] Subscript - [X] SmallCaps - [ ] Quoted - [ ] Cite - [X] Code (styled with `VerbatimChar`) - [X] Space - [X] LineBreak (these are invisible in Word: entered with Shift-Return) - [X] Math - [X] Link (links to an arbitrary bookmark create a span with the target as id and "anchor" class) - [X] Image - [X] Note (Footnotes and Endnotes are silently combined.) -} module Text.Pandoc.Readers.Docx ( readDocxWithWarnings , readDocx ) where import Codec.Archive.Zip import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Builder import Text.Pandoc.Walk import Text.Pandoc.Readers.Docx.Parse import Text.Pandoc.Readers.Docx.Lists import Text.Pandoc.Readers.Docx.Combine import Text.Pandoc.Shared import Text.Pandoc.MediaBag (insertMedia, MediaBag) import Data.List (delete, intersect) import Text.TeXMath (writeTeX) import Data.Default (Default) import qualified Data.ByteString.Lazy as B import qualified Data.Map as M import qualified Data.Set as Set import Control.Monad.Reader import Control.Monad.State import Data.Sequence (ViewL(..), viewl) import qualified Data.Sequence as Seq (null) #if !(MIN_VERSION_base(4,8,0)) import Data.Traversable (traverse) #endif import Text.Pandoc.Error import Control.Monad.Except readDocxWithWarnings :: ReaderOptions -> B.ByteString -> Either PandocError (Pandoc, MediaBag, [String]) readDocxWithWarnings opts bytes | Right archive <- toArchiveOrFail bytes , Right (docx, parserWarnings) <- archiveToDocxWithWarnings archive = do (meta, blks, mediaBag, warnings) <- docxToOutput opts docx return (Pandoc meta blks, mediaBag, parserWarnings ++ warnings) readDocxWithWarnings _ _ = Left (ParseFailure "couldn't parse docx file") readDocx :: ReaderOptions -> B.ByteString -> Either PandocError (Pandoc, MediaBag) readDocx opts bytes = do (pandoc, mediaBag, _) <- readDocxWithWarnings opts bytes return (pandoc, mediaBag) data DState = DState { docxAnchorMap :: M.Map String String , docxMediaBag :: MediaBag , docxDropCap :: Inlines , docxWarnings :: [String] } instance Default DState where def = DState { docxAnchorMap = M.empty , docxMediaBag = mempty , docxDropCap = mempty , docxWarnings = [] } data DEnv = DEnv { docxOptions :: ReaderOptions , docxInHeaderBlock :: Bool } instance Default DEnv where def = DEnv def False type DocxContext = ExceptT PandocError (ReaderT DEnv (State DState)) evalDocxContext :: DocxContext a -> DEnv -> DState -> Either PandocError a evalDocxContext ctx env st = flip evalState st . flip runReaderT env . runExceptT $ ctx addDocxWarning :: String -> DocxContext () addDocxWarning msg = do warnings <- gets docxWarnings modify $ \s -> s {docxWarnings = msg : warnings} -- This is empty, but we put it in for future-proofing. spansToKeep :: [String] spansToKeep = [] divsToKeep :: [String] divsToKeep = ["list-item", "Definition", "DefinitionTerm"] metaStyles :: M.Map String String metaStyles = M.fromList [ ("Title", "title") , ("Subtitle", "subtitle") , ("Author", "author") , ("Date", "date") , ("Abstract", "abstract")] sepBodyParts :: [BodyPart] -> ([BodyPart], [BodyPart]) sepBodyParts = span (\bp -> (isMetaPar bp || isEmptyPar bp)) isMetaPar :: BodyPart -> Bool isMetaPar (Paragraph pPr _) = not $ null $ intersect (pStyle pPr) (M.keys metaStyles) isMetaPar _ = False isEmptyPar :: BodyPart -> Bool isEmptyPar (Paragraph _ parParts) = all isEmptyParPart parParts where isEmptyParPart (PlainRun (Run _ runElems)) = all isEmptyElem runElems isEmptyParPart _ = False isEmptyElem (TextRun s) = trim s == "" isEmptyElem _ = True isEmptyPar _ = False bodyPartsToMeta' :: [BodyPart] -> DocxContext (M.Map String MetaValue) bodyPartsToMeta' [] = return M.empty bodyPartsToMeta' (bp : bps) | (Paragraph pPr parParts) <- bp , (c : _)<- intersect (pStyle pPr) (M.keys metaStyles) , (Just metaField) <- M.lookup c metaStyles = do inlines <- smushInlines <$> mapM parPartToInlines parParts remaining <- bodyPartsToMeta' bps let f (MetaInlines ils) (MetaInlines ils') = MetaBlocks [Para ils, Para ils'] f (MetaInlines ils) (MetaBlocks blks) = MetaBlocks ((Para ils) : blks) f m (MetaList mv) = MetaList (m : mv) f m n = MetaList [m, n] return $ M.insertWith f metaField (MetaInlines (toList inlines)) remaining bodyPartsToMeta' (_ : bps) = bodyPartsToMeta' bps bodyPartsToMeta :: [BodyPart] -> DocxContext Meta bodyPartsToMeta bps = do mp <- bodyPartsToMeta' bps let mp' = case M.lookup "author" mp of Just mv -> M.insert "author" (fixAuthors mv) mp Nothing -> mp return $ Meta mp' fixAuthors :: MetaValue -> MetaValue fixAuthors (MetaBlocks blks) = MetaList $ map g $ filter f blks where f (Para _) = True f _ = False g (Para ils) = MetaInlines ils g _ = MetaInlines [] fixAuthors mv = mv codeStyles :: [String] codeStyles = ["VerbatimChar"] codeDivs :: [String] codeDivs = ["SourceCode"] 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 runToString _ = "" parPartToString :: ParPart -> String parPartToString (PlainRun run) = runToString run parPartToString (InternalHyperLink _ runs) = concatMap runToString runs parPartToString (ExternalHyperLink _ runs) = concatMap runToString runs parPartToString _ = "" blacklistedCharStyles :: [String] blacklistedCharStyles = ["Hyperlink"] resolveDependentRunStyle :: RunStyle -> RunStyle resolveDependentRunStyle rPr | Just (s, _) <- rStyle rPr, s `elem` blacklistedCharStyles = rPr | Just (_, cs) <- rStyle rPr = let rPr' = resolveDependentRunStyle cs in RunStyle { isBold = case isBold rPr of Just bool -> Just bool Nothing -> isBold rPr' , isItalic = case isItalic rPr of Just bool -> Just bool Nothing -> isItalic rPr' , isSmallCaps = case isSmallCaps rPr of Just bool -> Just bool Nothing -> isSmallCaps rPr' , isStrike = case isStrike rPr of Just bool -> Just bool Nothing -> isStrike rPr' , rVertAlign = case rVertAlign rPr of Just valign -> Just valign Nothing -> rVertAlign rPr' , rUnderline = case rUnderline rPr of Just ulstyle -> Just ulstyle Nothing -> rUnderline rPr' , rStyle = rStyle rPr } | otherwise = rPr runStyleToTransform :: RunStyle -> (Inlines -> Inlines) runStyleToTransform rPr | Just (s, _) <- rStyle rPr , s `elem` spansToKeep = let rPr' = rPr{rStyle = Nothing} in (spanWith ("", [s], [])) . (runStyleToTransform rPr') | Just True <- isItalic rPr = emph . (runStyleToTransform rPr {isItalic = Nothing}) | Just True <- isBold rPr = strong . (runStyleToTransform rPr {isBold = Nothing}) | Just True <- isSmallCaps rPr = smallcaps . (runStyleToTransform rPr {isSmallCaps = Nothing}) | Just True <- isStrike rPr = strikeout . (runStyleToTransform rPr {isStrike = Nothing}) | Just SupScrpt <- rVertAlign rPr = superscript . (runStyleToTransform rPr {rVertAlign = Nothing}) | Just SubScrpt <- rVertAlign rPr = subscript . (runStyleToTransform rPr {rVertAlign = Nothing}) | Just "single" <- rUnderline rPr = emph . (runStyleToTransform rPr {rUnderline = Nothing}) | otherwise = id runToInlines :: Run -> DocxContext Inlines runToInlines (Run rs runElems) | Just (s, _) <- rStyle rs , s `elem` codeStyles = let rPr = resolveDependentRunStyle rs codeString = code $ concatMap runElemToString runElems in return $ case rVertAlign rPr of Just SupScrpt -> superscript codeString Just SubScrpt -> subscript codeString _ -> codeString | otherwise = do let ils = smushInlines (map runElemToInlines runElems) return $ (runStyleToTransform $ resolveDependentRunStyle rs) ils runToInlines (Footnote bps) = do blksList <- smushBlocks <$> (mapM bodyPartToBlocks bps) return $ note blksList runToInlines (Endnote bps) = do blksList <- smushBlocks <$> (mapM bodyPartToBlocks bps) return $ note blksList runToInlines (InlineDrawing fp title alt bs ext) = do mediaBag <- gets docxMediaBag modify $ \s -> s { docxMediaBag = insertMedia fp Nothing bs mediaBag } return $ imageWith (extentToAttr ext) fp title $ text alt runToInlines InlineChart = return $ spanWith ("", ["chart"], []) $ text "[CHART]" extentToAttr :: Extent -> Attr extentToAttr (Just (w, h)) = ("", [], [("width", showDim w), ("height", showDim h)] ) where showDim d = show (d / 914400) ++ "in" extentToAttr _ = nullAttr blocksToInlinesWarn :: String -> Blocks -> DocxContext Inlines blocksToInlinesWarn cmtId blks = do let blkList = toList blks notParaOrPlain :: Block -> Bool notParaOrPlain (Para _) = False notParaOrPlain (Plain _) = False notParaOrPlain _ = True when (not $ null $ filter notParaOrPlain blkList) (addDocxWarning $ "Docx comment " ++ cmtId ++ " will not retain formatting") return $ fromList $ blocksToInlines blkList parPartToInlines :: ParPart -> DocxContext Inlines parPartToInlines (PlainRun r) = runToInlines r parPartToInlines (Insertion _ author date runs) = do opts <- asks docxOptions case readerTrackChanges opts of AcceptChanges -> smushInlines <$> mapM runToInlines runs RejectChanges -> return mempty AllChanges -> do ils <- smushInlines <$> mapM runToInlines runs let attr = ("", ["insertion"], [("author", author), ("date", date)]) return $ spanWith attr ils parPartToInlines (Deletion _ author date runs) = do opts <- asks docxOptions case readerTrackChanges opts of AcceptChanges -> return mempty RejectChanges -> smushInlines <$> mapM runToInlines runs AllChanges -> do ils <- smushInlines <$> mapM runToInlines runs let attr = ("", ["deletion"], [("author", author), ("date", date)]) return $ spanWith attr ils parPartToInlines (CommentStart cmtId author date bodyParts) = do opts <- asks docxOptions case readerTrackChanges opts of AllChanges -> do blks <- smushBlocks <$> mapM bodyPartToBlocks bodyParts ils <- blocksToInlinesWarn cmtId blks let attr = ("", ["comment-start"], [("id", cmtId), ("author", author), ("date", date)]) return $ spanWith attr ils _ -> return mempty parPartToInlines (CommentEnd cmtId) = do opts <- asks docxOptions case readerTrackChanges opts of AllChanges -> do let attr = ("", ["comment-end"], [("id", cmtId)]) return $ spanWith attr mempty _ -> return mempty parPartToInlines (BookMark _ anchor) | anchor `elem` dummyAnchors = return mempty parPartToInlines (BookMark _ anchor) = -- We record these, so we can make sure not to overwrite -- user-defined anchor links with header auto ids. do -- get whether we're in a header. inHdrBool <- asks docxInHeaderBlock -- Get the anchor map. anchorMap <- gets docxAnchorMap -- We don't want to rewrite if we're in a header, since we'll take -- care of that later, when we make the header anchor. If the -- bookmark were already in uniqueIdent form, this would lead to a -- duplication. Otherwise, we check to see if the id is already in -- there. Rewrite if necessary. This will have the possible effect -- of rewriting user-defined anchor links. However, since these -- are not defined in pandoc, it seems like a necessary evil to -- avoid an extra pass. let newAnchor = if not inHdrBool && anchor `elem` (M.elems anchorMap) then uniqueIdent [Str anchor] (Set.fromList $ M.elems anchorMap) else anchor unless inHdrBool (modify $ \s -> s { docxAnchorMap = M.insert anchor newAnchor anchorMap}) return $ spanWith (newAnchor, ["anchor"], []) mempty parPartToInlines (Drawing fp title alt bs ext) = do mediaBag <- gets docxMediaBag modify $ \s -> s { docxMediaBag = insertMedia fp Nothing bs mediaBag } return $ imageWith (extentToAttr ext) fp title $ text alt parPartToInlines Chart = do return $ spanWith ("", ["chart"], []) $ text "[CHART]" parPartToInlines (InternalHyperLink anchor runs) = do ils <- smushInlines <$> mapM runToInlines runs return $ link ('#' : anchor) "" ils parPartToInlines (ExternalHyperLink target runs) = do ils <- smushInlines <$> mapM runToInlines runs return $ link target "" ils parPartToInlines (PlainOMath exps) = do return $ math $ writeTeX exps isAnchorSpan :: Inline -> Bool isAnchorSpan (Span (_, classes, kvs) _) = classes == ["anchor"] && null kvs isAnchorSpan _ = False dummyAnchors :: [String] dummyAnchors = ["_GoBack"] makeHeaderAnchor :: Blocks -> DocxContext Blocks makeHeaderAnchor bs = traverse makeHeaderAnchor' bs makeHeaderAnchor' :: Block -> DocxContext Block -- If there is an anchor already there (an anchor span in the header, -- to be exact), we rename and associate the new id with the old one. makeHeaderAnchor' (Header n (ident, classes, kvs) ils) | (c:_) <- filter isAnchorSpan ils , (Span (anchIdent, ["anchor"], _) cIls) <- c = do hdrIDMap <- gets docxAnchorMap let newIdent = if null ident then uniqueIdent ils (Set.fromList $ M.elems hdrIDMap) else ident newIls = concatMap f ils where f il | il == c = cIls | otherwise = [il] modify $ \s -> s {docxAnchorMap = M.insert anchIdent newIdent hdrIDMap} makeHeaderAnchor' $ Header n (newIdent, classes, kvs) newIls -- Otherwise we just give it a name, and register that name (associate -- it with itself.) makeHeaderAnchor' (Header n (ident, classes, kvs) ils) = do hdrIDMap <- gets docxAnchorMap let newIdent = if null ident then uniqueIdent ils (Set.fromList $ M.elems hdrIDMap) else ident modify $ \s -> s {docxAnchorMap = M.insert newIdent newIdent hdrIDMap} return $ Header n (newIdent, classes, kvs) ils makeHeaderAnchor' blk = return blk -- Rewrite a standalone paragraph block as a plain singleParaToPlain :: Blocks -> Blocks singleParaToPlain blks | (Para (ils) :< seeq) <- viewl $ unMany blks , Seq.null seeq = singleton $ Plain ils singleParaToPlain blks = blks cellToBlocks :: Cell -> DocxContext Blocks cellToBlocks (Cell bps) = do blks <- smushBlocks <$> mapM bodyPartToBlocks bps return $ fromList $ blocksToDefinitions $ blocksToBullets $ toList blks rowToBlocksList :: Row -> DocxContext [Blocks] rowToBlocksList (Row cells) = do blksList <- mapM cellToBlocks cells return $ map singleParaToPlain blksList trimLineBreaks :: [Inline] -> [Inline] trimLineBreaks [] = [] trimLineBreaks (LineBreak : ils) = trimLineBreaks ils trimLineBreaks ils | (LineBreak : ils') <- reverse ils = trimLineBreaks (reverse ils') trimLineBreaks ils = ils parStyleToTransform :: ParagraphStyle -> (Blocks -> Blocks) parStyleToTransform pPr | (c:cs) <- pStyle pPr , c `elem` divsToKeep = let pPr' = pPr { pStyle = cs } in (divWith ("", [c], [])) . (parStyleToTransform pPr') | (c:cs) <- pStyle pPr, c `elem` listParagraphDivs = let pPr' = pPr { pStyle = cs, indentation = Nothing} in (divWith ("", [c], [])) . (parStyleToTransform pPr') | (_:cs) <- pStyle pPr , Just True <- pBlockQuote pPr = let pPr' = pPr { pStyle = cs } in blockQuote . (parStyleToTransform pPr') | (_:cs) <- pStyle pPr = let pPr' = pPr { pStyle = cs} in parStyleToTransform pPr' | null (pStyle pPr) , Just left <- indentation pPr >>= leftParIndent , Just hang <- indentation pPr >>= hangingParIndent = let pPr' = pPr { indentation = Nothing } in case (left - hang) > 0 of True -> blockQuote . (parStyleToTransform pPr') False -> parStyleToTransform pPr' | null (pStyle pPr), Just left <- indentation pPr >>= leftParIndent = let pPr' = pPr { indentation = Nothing } in case left > 0 of True -> blockQuote . (parStyleToTransform pPr') False -> parStyleToTransform pPr' parStyleToTransform _ = id bodyPartToBlocks :: BodyPart -> DocxContext Blocks bodyPartToBlocks (Paragraph pPr parparts) | not $ null $ codeDivs `intersect` (pStyle pPr) = return $ parStyleToTransform pPr $ codeBlock $ concatMap parPartToString parparts | Just (style, n) <- pHeading pPr = do ils <- local (\s-> s{docxInHeaderBlock=True}) $ (smushInlines <$> mapM parPartToInlines parparts) makeHeaderAnchor $ headerWith ("", delete style (pStyle pPr), []) n ils | otherwise = do ils <- smushInlines <$> mapM parPartToInlines parparts >>= (return . fromList . trimLineBreaks . normalizeSpaces . toList) dropIls <- gets docxDropCap let ils' = dropIls <> ils if dropCap pPr then do modify $ \s -> s { docxDropCap = ils' } return mempty else do modify $ \s -> s { docxDropCap = mempty } return $ case isNull ils' of True -> mempty _ -> parStyleToTransform pPr $ para ils' bodyPartToBlocks (ListItem pPr numId lvl (Just levelInfo) parparts) = do let kvs = case levelInfo of (_, fmt, txt, Just start) -> [ ("level", lvl) , ("num-id", numId) , ("format", fmt) , ("text", txt) , ("start", (show start)) ] (_, fmt, txt, Nothing) -> [ ("level", lvl) , ("num-id", numId) , ("format", fmt) , ("text", txt) ] blks <- bodyPartToBlocks (Paragraph pPr parparts) return $ divWith ("", ["list-item"], kvs) blks bodyPartToBlocks (ListItem 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 let caption = text cap (hdr, rows) = case firstRowFormatting look of True | null rs -> (Nothing, [r]) | otherwise -> (Just r, rs) False -> (Nothing, r:rs) cells <- mapM rowToBlocksList rows let width = case cells of r':_ -> length r' -- shouldn't happen [] -> 0 hdrCells <- case hdr of Just r' -> rowToBlocksList r' Nothing -> return $ replicate width mempty -- The two following variables (horizontal column alignment and -- relative column widths) go to the default at the -- moment. Width information is in the TblGrid field of the Tbl, -- so should be possible. Alignment might be more difficult, -- since there doesn't seem to be a column entity in docx. let alignments = replicate width AlignDefault widths = replicate width 0 :: [Double] return $ table caption (zip alignments widths) hdrCells cells bodyPartToBlocks (OMathPara e) = do return $ para $ displayMath (writeTeX e) -- replace targets with generated anchors. rewriteLink' :: Inline -> DocxContext Inline rewriteLink' l@(Link attr ils ('#':target, title)) = do anchorMap <- gets docxAnchorMap return $ case M.lookup target anchorMap of Just newTarget -> (Link attr ils ('#':newTarget, title)) Nothing -> l rewriteLink' il = return il rewriteLinks :: [Block] -> DocxContext [Block] rewriteLinks = mapM (walkM rewriteLink') bodyToOutput :: Body -> DocxContext (Meta, [Block], MediaBag, [String]) bodyToOutput (Body bps) = do let (metabps, blkbps) = sepBodyParts bps meta <- bodyPartsToMeta metabps blks <- smushBlocks <$> mapM bodyPartToBlocks blkbps blks' <- rewriteLinks $ blocksToDefinitions $ blocksToBullets $ toList blks mediaBag <- gets docxMediaBag warnings <- gets docxWarnings return $ (meta, blks', mediaBag, warnings) docxToOutput :: ReaderOptions -> Docx -> Either PandocError (Meta, [Block], MediaBag, [String]) docxToOutput opts (Docx (Document _ body)) = let dEnv = def { docxOptions = opts} in evalDocxContext (bodyToOutput body) dEnv def pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt.hs0000644000000000000000000000675313155240142016776 0ustar0000000000000000{-# LANGUAGE PatternGuards #-} {- Copyright (C) 2015 Martin Linnemann 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.Reader.Odt Copyright : Copyright (C) 2015 Martin Linnemann License : GNU GPL, version 2 or above Maintainer : Martin Linnemann Stability : alpha Portability : portable Entry point to the odt reader. -} module Text.Pandoc.Readers.Odt ( readOdt ) where import Codec.Archive.Zip import qualified Text.XML.Light as XML import qualified Data.ByteString.Lazy as B import System.FilePath import Text.Pandoc.Definition import Text.Pandoc.Error import Text.Pandoc.Options import Text.Pandoc.MediaBag import qualified Text.Pandoc.UTF8 as UTF8 import Text.Pandoc.Readers.Odt.ContentReader import Text.Pandoc.Readers.Odt.StyleReader import Text.Pandoc.Readers.Odt.Generic.XMLConverter import Text.Pandoc.Readers.Odt.Generic.Fallible import Text.Pandoc.Shared (filteredFilesFromArchive) -- readOdt :: ReaderOptions -> B.ByteString -> Either PandocError (Pandoc, MediaBag) readOdt _ bytes = bytesToOdt bytes-- of -- Right (pandoc, mediaBag) -> Right (pandoc , mediaBag) -- Left err -> Left err -- bytesToOdt :: B.ByteString -> Either PandocError (Pandoc, MediaBag) bytesToOdt bytes = case toArchiveOrFail bytes of Right archive -> archiveToOdt archive Left _ -> Left $ ParseFailure "Couldn't parse odt file." -- archiveToOdt :: Archive -> Either PandocError (Pandoc, MediaBag) archiveToOdt archive | Just contentEntry <- findEntryByPath "content.xml" archive , Just stylesEntry <- findEntryByPath "styles.xml" archive , Just contentElem <- entryToXmlElem contentEntry , Just stylesElem <- entryToXmlElem stylesEntry , Right styles <- chooseMax (readStylesAt stylesElem ) (readStylesAt contentElem) , media <- filteredFilesFromArchive archive filePathIsOdtMedia , startState <- readerState styles media , Right pandocWithMedia <- runConverter' read_body startState contentElem = Right pandocWithMedia | otherwise -- Not very detailed, but I don't think more information would be helpful = Left $ ParseFailure "Couldn't parse odt file." where filePathIsOdtMedia :: FilePath -> Bool filePathIsOdtMedia fp = let (dir, _) = splitFileName fp in (dir == "Pictures/") -- entryToXmlElem :: Entry -> Maybe XML.Element entryToXmlElem = XML.parseXMLDoc . UTF8.toStringLazy . fromEntry pandoc-1.19.2.4/src/Text/Pandoc/Readers/EPUB.hs0000644000000000000000000002415113155240142016773 0ustar0000000000000000{-# LANGUAGE ViewPatterns , StandaloneDeriving , TupleSections , FlexibleContexts #-} module Text.Pandoc.Readers.EPUB (readEPUB) where import Text.XML.Light import Text.Pandoc.Definition hiding (Attr) import Text.Pandoc.Readers.HTML (readHtml) import Text.Pandoc.Error import Text.Pandoc.Walk (walk, query) import Text.Pandoc.Options ( ReaderOptions(..), readerTrace) import Text.Pandoc.Shared (escapeURI, collapseFilePath, addMetaField) import Network.URI (unEscapeString) import Text.Pandoc.MediaBag (MediaBag, insertMedia) import Control.Monad.Except (MonadError, throwError, runExcept, Except) import Text.Pandoc.MIME (MimeType) import qualified Text.Pandoc.Builder as B import Codec.Archive.Zip ( Archive (..), toArchiveOrFail, fromEntry , findEntryByPath, Entry) import qualified Data.ByteString.Lazy as BL (ByteString) import System.FilePath ( takeFileName, (), dropFileName, normalise , dropFileName , splitFileName ) import qualified Text.Pandoc.UTF8 as UTF8 (toStringLazy) import Control.Monad (guard, liftM, when) import Data.List (isPrefixOf, isInfixOf) import Data.Maybe (mapMaybe, fromMaybe) import qualified Data.Map as M (Map, lookup, fromList, elems) import Data.Monoid ((<>)) import Control.DeepSeq (deepseq, NFData) import Debug.Trace (trace) type Items = M.Map String (FilePath, MimeType) readEPUB :: ReaderOptions -> BL.ByteString -> Either PandocError (Pandoc, MediaBag) readEPUB opts bytes = case toArchiveOrFail bytes of Right archive -> runEPUB $ archiveToEPUB opts $ archive Left _ -> Left $ ParseFailure "Couldn't extract ePub file" runEPUB :: Except PandocError a -> Either PandocError a runEPUB = runExcept -- Note that internal reference are aggresively normalised so that all ids -- are of the form "filename#id" -- archiveToEPUB :: (MonadError PandocError m) => ReaderOptions -> Archive -> m (Pandoc, MediaBag) archiveToEPUB os archive = do -- root is path to folder with manifest file in (root, content) <- getManifest archive meta <- parseMeta content (cover, items) <- parseManifest content -- No need to collapse here as the image path is from the manifest file let coverDoc = fromMaybe mempty (imageToPandoc <$> cover) spine <- parseSpine items content let escapedSpine = map (escapeURI . takeFileName . fst) spine Pandoc _ bs <- foldM' (\a b -> ((a <>) . walk (prependHash escapedSpine)) `liftM` parseSpineElem root b) mempty spine let ast = coverDoc <> (Pandoc meta bs) let mediaBag = fetchImages (M.elems items) root archive ast return $ (ast, mediaBag) where os' = os {readerParseRaw = True} parseSpineElem :: MonadError PandocError m => FilePath -> (FilePath, MimeType) -> m Pandoc parseSpineElem (normalise -> r) (normalise -> path, mime) = do when (readerTrace os) (traceM path) doc <- mimeToReader mime r path let docSpan = B.doc $ B.para $ B.spanWith (takeFileName path, [], []) mempty return $ docSpan <> doc mimeToReader :: MonadError PandocError m => MimeType -> FilePath -> FilePath -> m Pandoc mimeToReader "application/xhtml+xml" (unEscapeString -> root) (unEscapeString -> path) = do fname <- findEntryByPathE (root path) archive html <- either throwError return . readHtml os' . UTF8.toStringLazy $ fromEntry fname return $ fixInternalReferences path html mimeToReader s _ (unEscapeString -> path) | s `elem` imageMimes = return $ imageToPandoc path | otherwise = return $ mempty -- paths should be absolute when this function is called -- renameImages should do this fetchImages :: [(FilePath, MimeType)] -> FilePath -- ^ Root -> Archive -> Pandoc -> MediaBag fetchImages mimes root arc (query iq -> links) = foldr (uncurry3 insertMedia) mempty (mapMaybe getEntry links) where getEntry link = let abslink = normalise (root link) in (link , lookup link mimes, ) . fromEntry <$> findEntryByPath abslink arc iq :: Inline -> [FilePath] iq (Image _ _ (url, _)) = [url] iq _ = [] -- Remove relative paths renameImages :: FilePath -> Inline -> Inline renameImages root img@(Image attr a (url, b)) | "data:" `isPrefixOf` url = img | otherwise = Image attr a (collapseFilePath (root url), b) renameImages _ x = x imageToPandoc :: FilePath -> Pandoc imageToPandoc s = B.doc . B.para $ B.image s "" mempty imageMimes :: [MimeType] imageMimes = ["image/gif", "image/jpeg", "image/png"] type CoverImage = FilePath parseManifest :: (MonadError PandocError m) => Element -> m (Maybe CoverImage, Items) parseManifest content = do manifest <- findElementE (dfName "manifest") content let items = findChildren (dfName "item") manifest r <- mapM parseItem items let cover = findAttr (emptyName "href") =<< filterChild findCover manifest return (cover, (M.fromList r)) where findCover e = maybe False (isInfixOf "cover-image") (findAttr (emptyName "properties") e) parseItem e = do uid <- findAttrE (emptyName "id") e href <- findAttrE (emptyName "href") e mime <- findAttrE (emptyName "media-type") e return (uid, (href, mime)) parseSpine :: MonadError PandocError m => Items -> Element -> m [(FilePath, MimeType)] parseSpine is e = do spine <- findElementE (dfName "spine") e let itemRefs = findChildren (dfName "itemref") spine mapM (mkE "parseSpine" . (flip M.lookup is)) $ mapMaybe parseItemRef itemRefs where parseItemRef ref = do let linear = maybe True (== "yes") (findAttr (emptyName "linear") ref) guard linear findAttr (emptyName "idref") ref parseMeta :: MonadError PandocError m => Element -> m Meta parseMeta content = do meta <- findElementE (dfName "metadata") content let dcspace (QName _ (Just "http://purl.org/dc/elements/1.1/") (Just "dc")) = True dcspace _ = False let dcs = filterChildrenName dcspace meta let r = foldr parseMetaItem nullMeta dcs return r -- http://www.idpf.org/epub/30/spec/epub30-publications.html#sec-metadata-elem parseMetaItem :: Element -> Meta -> Meta parseMetaItem e@(stripNamespace . elName -> field) meta = addMetaField (renameMeta field) (B.str $ strContent e) meta renameMeta :: String -> String renameMeta "creator" = "author" renameMeta s = s getManifest :: MonadError PandocError m => Archive -> m (String, Element) getManifest archive = do metaEntry <- findEntryByPathE ("META-INF" "container.xml") archive docElem <- (parseXMLDocE . UTF8.toStringLazy . fromEntry) metaEntry let namespaces = mapMaybe attrToNSPair (elAttribs docElem) ns <- mkE "xmlns not in namespaces" (lookup "xmlns" namespaces) as <- liftM ((map attrToPair) . elAttribs) (findElementE (QName "rootfile" (Just ns) Nothing) docElem) manifestFile <- mkE "Root not found" (lookup "full-path" as) let rootdir = dropFileName manifestFile --mime <- lookup "media-type" as manifest <- findEntryByPathE manifestFile archive liftM ((,) rootdir) (parseXMLDocE . UTF8.toStringLazy . fromEntry $ manifest) -- Fixup fixInternalReferences :: FilePath -> Pandoc -> Pandoc fixInternalReferences pathToFile = (walk $ renameImages root) . (walk $ fixBlockIRs filename) . (walk $ fixInlineIRs filename) where (root, escapeURI -> filename) = splitFileName pathToFile fixInlineIRs :: String -> Inline -> Inline fixInlineIRs s (Span as v) = Span (fixAttrs s as) v fixInlineIRs s (Code as code) = Code (fixAttrs s as) code fixInlineIRs s (Link as is ('#':url, tit)) = Link (fixAttrs s as) is (addHash s url, tit) fixInlineIRs s (Link as is t) = Link (fixAttrs s as) is t fixInlineIRs _ v = v prependHash :: [String] -> Inline -> Inline prependHash ps l@(Link attr is (url, tit)) | or [s `isPrefixOf` url | s <- ps] = Link attr is ('#':url, tit) | otherwise = l prependHash _ i = i fixBlockIRs :: String -> Block -> Block fixBlockIRs s (Div as b) = Div (fixAttrs s as) b fixBlockIRs s (Header i as b) = Header i (fixAttrs s as) b fixBlockIRs s (CodeBlock as code) = CodeBlock (fixAttrs s as) code fixBlockIRs _ b = b fixAttrs :: FilePath -> B.Attr -> B.Attr fixAttrs s (ident, cs, kvs) = (addHash s ident, filter (not . null) cs, removeEPUBAttrs kvs) addHash :: String -> String -> String addHash _ "" = "" addHash s ident = takeFileName s ++ "#" ++ ident removeEPUBAttrs :: [(String, String)] -> [(String, String)] removeEPUBAttrs kvs = filter (not . isEPUBAttr) kvs isEPUBAttr :: (String, String) -> Bool isEPUBAttr (k, _) = "epub:" `isPrefixOf` k -- Library -- Strict version of foldM foldM' :: (Monad m, NFData a) => (a -> b -> m a) -> a -> [b] -> m a foldM' _ z [] = return z foldM' f z (x:xs) = do z' <- f z x z' `deepseq` foldM' f z' xs uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d uncurry3 f (a, b, c) = f a b c traceM :: Monad m => String -> m () traceM = flip trace (return ()) -- Utility stripNamespace :: QName -> String stripNamespace (QName v _ _) = v attrToNSPair :: Attr -> Maybe (String, String) attrToNSPair (Attr (QName "xmlns" _ _) val) = Just ("xmlns", val) attrToNSPair _ = Nothing attrToPair :: Attr -> (String, String) attrToPair (Attr (QName name _ _) val) = (name, val) defaultNameSpace :: Maybe String defaultNameSpace = Just "http://www.idpf.org/2007/opf" dfName :: String -> QName dfName s = QName s defaultNameSpace Nothing emptyName :: String -> QName emptyName s = QName s Nothing Nothing -- Convert Maybe interface to Either findAttrE :: MonadError PandocError m => QName -> Element -> m String findAttrE q e = mkE "findAttr" $ findAttr q e findEntryByPathE :: MonadError PandocError m => FilePath -> Archive -> m Entry findEntryByPathE (normalise -> path) a = mkE ("No entry on path: " ++ path) $ findEntryByPath path a parseXMLDocE :: MonadError PandocError m => String -> m Element parseXMLDocE doc = mkE "Unable to parse XML doc" $ parseXMLDoc doc findElementE :: MonadError PandocError m => QName -> Element -> m Element findElementE e x = mkE ("Unable to find element: " ++ show e) $ findElement e x mkE :: MonadError PandocError m => String -> Maybe a -> m a mkE s = maybe (throwError . ParseFailure $ s) return pandoc-1.19.2.4/src/Text/Pandoc/Writers/Native.hs0000644000000000000000000000612513155240142017541 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2006-2015 John MacFarlane 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.Writers.Native Copyright : Copyright (C) 2006-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of a 'Pandoc' document to a string representation. -} module Text.Pandoc.Writers.Native ( writeNative ) where import Text.Pandoc.Options ( WriterOptions(..), WrapOption(..) ) import Data.List ( intersperse ) import Text.Pandoc.Definition import Text.Pandoc.Pretty prettyList :: [Doc] -> Doc prettyList ds = "[" <> (cat $ intersperse (cr <> ",") $ map (nest 1) ds) <> "]" -- | Prettyprint Pandoc block element. prettyBlock :: Block -> Doc prettyBlock (LineBlock lines') = "LineBlock" $$ prettyList (map (text . show) lines') prettyBlock (BlockQuote blocks) = "BlockQuote" $$ prettyList (map prettyBlock blocks) prettyBlock (OrderedList attribs blockLists) = "OrderedList" <> space <> text (show attribs) $$ (prettyList $ map (prettyList . map prettyBlock) blockLists) prettyBlock (BulletList blockLists) = "BulletList" $$ (prettyList $ map (prettyList . map prettyBlock) blockLists) prettyBlock (DefinitionList items) = "DefinitionList" $$ (prettyList $ map deflistitem items) where deflistitem (term, defs) = "(" <> text (show term) <> "," <> cr <> nest 1 (prettyList $ map (prettyList . map prettyBlock) defs) <> ")" prettyBlock (Table caption aligns widths header rows) = "Table " <> text (show caption) <> " " <> text (show aligns) <> " " <> text (show widths) $$ 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. writeNative :: WriterOptions -> Pandoc -> String writeNative opts (Pandoc meta blocks) = let colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing withHead = case writerTemplate opts of Just _ -> \bs -> text ("Pandoc (" ++ show meta ++ ")") $$ bs $$ cr Nothing -> id in render colwidth $ withHead $ prettyList $ map prettyBlock blocks pandoc-1.19.2.4/src/Text/Pandoc/Writers/Docbook.hs0000644000000000000000000004317013155240142017674 0ustar0000000000000000{-# LANGUAGE OverloadedStrings, PatternGuards #-} {- Copyright (C) 2006-2015 John MacFarlane 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.Writers.Docbook Copyright : Copyright (C) 2006-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to Docbook XML. -} module Text.Pandoc.Writers.Docbook ( writeDocbook) where import Text.Pandoc.Definition import Text.Pandoc.XML import Text.Pandoc.Shared import Text.Pandoc.Walk import Text.Pandoc.Writers.Shared import Text.Pandoc.Options import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.Readers.TeXMath import Data.List ( stripPrefix, isPrefixOf, intercalate, isSuffixOf ) import Data.Char ( toLower ) import Data.Monoid ( Any(..) ) import Text.Pandoc.Highlighting ( languages, languagesByExtension ) import Text.Pandoc.Pretty import Text.Pandoc.ImageSize import qualified Text.Pandoc.Builder as B import Text.TeXMath import qualified Text.XML.Light as Xml import Data.Generics (everywhere, mkT) -- | Convert list of authors to a docbook section authorToDocbook :: WriterOptions -> [Inline] -> B.Inlines authorToDocbook opts name' = let name = render Nothing $ inlinesToDocbook opts name' colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing in B.rawInline "docbook" $ render colwidth $ if ',' `elem` name then -- last name first let (lastname, rest) = break (==',') name firstname = triml rest in inTagsSimple "firstname" (text $ escapeStringForXML firstname) <> inTagsSimple "surname" (text $ escapeStringForXML lastname) else -- last name last let namewords = words name lengthname = length namewords (firstname, lastname) = case lengthname of 0 -> ("","") 1 -> ("", name) n -> (intercalate " " (take (n-1) namewords), last namewords) in inTagsSimple "firstname" (text $ escapeStringForXML firstname) $$ inTagsSimple "surname" (text $ escapeStringForXML lastname) -- | Convert Pandoc document to string in Docbook format. writeDocbook :: WriterOptions -> Pandoc -> String writeDocbook opts (Pandoc meta blocks) = let elements = hierarchicalize blocks colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing render' = render colwidth opts' = if (maybe False (("/book>" `isSuffixOf`) . trimr) (writerTemplate opts) && TopLevelDefault == writerTopLevelDivision opts) then opts{ writerTopLevelDivision = TopLevelChapter } else opts -- The numbering here follows LaTeX's internal numbering startLvl = case writerTopLevelDivision opts' of TopLevelPart -> -1 TopLevelChapter -> 0 TopLevelSection -> 1 TopLevelDefault -> 1 auths' = map (authorToDocbook opts) $ docAuthors meta meta' = B.setMeta "author" auths' meta Just metadata = metaToJSON opts (Just . render colwidth . (vcat . (map (elementToDocbook opts' startLvl)) . hierarchicalize)) (Just . render colwidth . inlinesToDocbook opts') meta' main = render' $ vcat (map (elementToDocbook opts' startLvl) elements) context = defField "body" main $ defField "mathml" (case writerHTMLMathMethod opts of MathML _ -> True _ -> False) $ metadata in case writerTemplate opts of Nothing -> main Just tpl -> renderTemplate' tpl context -- | Convert an Element to Docbook. elementToDocbook :: WriterOptions -> Int -> Element -> Doc elementToDocbook opts _ (Blk block) = blockToDocbook opts block elementToDocbook opts lvl (Sec _ _num (id',_,_) title elements) = -- Docbook doesn't allow sections with no content, so insert some if needed let elements' = if null elements then [Blk (Para [])] else elements tag = case lvl of -1 -> "part" 0 -> "chapter" n | n >= 1 && n <= 5 -> if writerDocbook5 opts then "section" else "sect" ++ show n _ -> "simplesect" idName = if writerDocbook5 opts then "xml:id" else "id" idAttr = [(idName, writerIdentifierPrefix opts ++ id') | not (null id')] nsAttr = if writerDocbook5 opts && lvl == 0 then [("xmlns", "http://docbook.org/ns/docbook"),("xmlns:xlink", "http://www.w3.org/1999/xlink")] else [] attribs = nsAttr ++ idAttr in inTags True tag attribs $ inTagsSimple "title" (inlinesToDocbook opts title) $$ vcat (map (elementToDocbook opts (lvl + 1)) elements') -- | Convert a list of Pandoc blocks to Docbook. blocksToDocbook :: WriterOptions -> [Block] -> Doc blocksToDocbook opts = vcat . map (blockToDocbook opts) -- | Auxiliary function to convert Plain block to Para. plainToPara :: Block -> Block plainToPara (Plain x) = Para x plainToPara x = x -- | Convert a list of pairs of terms and definitions into a list of -- Docbook varlistentrys. deflistItemsToDocbook :: WriterOptions -> [([Inline],[[Block]])] -> Doc deflistItemsToDocbook opts items = vcat $ map (\(term, defs) -> deflistItemToDocbook opts term defs) items -- | Convert a term and a list of blocks into a Docbook varlistentry. deflistItemToDocbook :: WriterOptions -> [Inline] -> [[Block]] -> Doc deflistItemToDocbook opts term defs = let def' = concatMap (map plainToPara) defs in inTagsIndented "varlistentry" $ inTagsIndented "term" (inlinesToDocbook opts term) $$ inTagsIndented "listitem" (blocksToDocbook opts def') -- | Convert a list of lists of blocks to a list of Docbook list items. listItemsToDocbook :: WriterOptions -> [[Block]] -> Doc listItemsToDocbook opts items = vcat $ map (listItemToDocbook opts) items -- | Convert a list of blocks into a Docbook list item. listItemToDocbook :: WriterOptions -> [Block] -> Doc listItemToDocbook opts item = inTagsIndented "listitem" $ blocksToDocbook opts $ map plainToPara item imageToDocbook :: WriterOptions -> Attr -> String -> Doc imageToDocbook _ attr src = selfClosingTag "imagedata" $ ("fileref", src) : idAndRole attr ++ dims where dims = go Width "width" ++ go Height "depth" go dir dstr = case (dimension dir attr) of Just a -> [(dstr, show a)] Nothing -> [] -- | Convert a Pandoc block element to Docbook. blockToDocbook :: WriterOptions -> Block -> Doc blockToDocbook _ Null = empty -- Add ids to paragraphs in divs with ids - this is needed for -- pandoc-citeproc to get link anchors in bibliographies: blockToDocbook opts (Div (ident,_,_) [Para lst]) = let attribs = [("id", ident) | not (null ident)] in if hasLineBreaks lst then flush $ nowrap $ inTags False "literallayout" attribs $ inlinesToDocbook opts lst else inTags True "para" attribs $ inlinesToDocbook opts lst blockToDocbook opts (Div (ident,_,_) bs) = (if null ident then mempty else selfClosingTag "anchor" [("id", ident)]) $$ blocksToDocbook opts (map plainToPara bs) blockToDocbook _ (Header _ _ _) = empty -- should not occur after hierarchicalize blockToDocbook opts (Plain lst) = inlinesToDocbook opts lst -- title beginning with fig: indicates that the image is a figure blockToDocbook opts (Para [Image attr txt (src,'f':'i':'g':':':_)]) = let alt = inlinesToDocbook opts txt capt = if null txt then empty else inTagsSimple "title" alt in inTagsIndented "figure" $ capt $$ (inTagsIndented "mediaobject" $ (inTagsIndented "imageobject" (imageToDocbook opts attr src)) $$ inTagsSimple "textobject" (inTagsSimple "phrase" alt)) blockToDocbook opts (Para lst) | hasLineBreaks lst = flush $ nowrap $ inTagsSimple "literallayout" $ inlinesToDocbook opts lst | otherwise = inTagsIndented "para" $ inlinesToDocbook opts lst blockToDocbook opts (LineBlock lns) = blockToDocbook opts $ linesToPara lns blockToDocbook opts (BlockQuote blocks) = inTagsIndented "blockquote" $ blocksToDocbook opts blocks blockToDocbook _ (CodeBlock (_,classes,_) str) = text ("") <> cr <> flush (text (escapeStringForXML str) <> cr <> text "") where lang = if null langs then "" else " language=\"" ++ escapeStringForXML (head langs) ++ "\"" isLang l = map toLower l `elem` map (map toLower) languages langsFrom s = if isLang s then [s] else languagesByExtension . map toLower $ s langs = concatMap langsFrom classes blockToDocbook opts (BulletList lst) = let attribs = [("spacing", "compact") | isTightList lst] in inTags True "itemizedlist" attribs $ listItemsToDocbook opts lst blockToDocbook _ (OrderedList _ []) = empty blockToDocbook opts (OrderedList (start, numstyle, _) (first:rest)) = let numeration = case numstyle of DefaultStyle -> [] Decimal -> [("numeration", "arabic")] Example -> [("numeration", "arabic")] UpperAlpha -> [("numeration", "upperalpha")] LowerAlpha -> [("numeration", "loweralpha")] UpperRoman -> [("numeration", "upperroman")] LowerRoman -> [("numeration", "lowerroman")] spacing = [("spacing", "compact") | isTightList (first:rest)] attribs = numeration ++ spacing items = if start == 1 then listItemsToDocbook opts (first:rest) else (inTags True "listitem" [("override",show start)] (blocksToDocbook opts $ map plainToPara first)) $$ listItemsToDocbook opts rest in inTags True "orderedlist" attribs items blockToDocbook opts (DefinitionList lst) = let attribs = [("spacing", "compact") | isTightList $ concatMap snd lst] in inTags True "variablelist" attribs $ deflistItemsToDocbook opts lst blockToDocbook opts (RawBlock f str) | f == "docbook" = text str -- raw XML block | f == "html" = if writerDocbook5 opts then empty -- No html in Docbook5 else text str -- allow html for backwards compatibility | otherwise = empty blockToDocbook _ HorizontalRule = empty -- not semantic blockToDocbook opts (Table caption aligns widths headers rows) = let captionDoc = if null caption then empty else inTagsIndented "title" (inlinesToDocbook opts caption) tableType = if isEmpty captionDoc then "informaltable" else "table" percent w = show (truncate (100*w) :: Integer) ++ "*" coltags = vcat $ zipWith (\w al -> selfClosingTag "colspec" ([("colwidth", percent w) | w > 0] ++ [("align", alignmentToString al)])) widths aligns head' = if all null headers then empty else inTagsIndented "thead" $ tableRowToDocbook opts headers body' = inTagsIndented "tbody" $ vcat $ map (tableRowToDocbook opts) rows in inTagsIndented tableType $ captionDoc $$ (inTags True "tgroup" [("cols", show (length headers))] $ coltags $$ head' $$ body') hasLineBreaks :: [Inline] -> Bool hasLineBreaks = getAny . query isLineBreak . walk removeNote where removeNote :: Inline -> Inline removeNote (Note _) = Str "" removeNote x = x isLineBreak :: Inline -> Any isLineBreak LineBreak = Any True isLineBreak _ = Any False alignmentToString :: Alignment -> [Char] alignmentToString alignment = case alignment of AlignLeft -> "left" AlignRight -> "right" AlignCenter -> "center" AlignDefault -> "left" tableRowToDocbook :: WriterOptions -> [[Block]] -> Doc tableRowToDocbook opts cols = inTagsIndented "row" $ vcat $ map (tableItemToDocbook opts) cols tableItemToDocbook :: WriterOptions -> [Block] -> Doc tableItemToDocbook opts item = inTags True "entry" [] $ vcat $ map (blockToDocbook opts) item -- | Convert a list of inline elements to Docbook. inlinesToDocbook :: WriterOptions -> [Inline] -> Doc inlinesToDocbook opts lst = hcat $ map (inlineToDocbook opts) lst -- | Convert an inline element to Docbook. inlineToDocbook :: WriterOptions -> Inline -> Doc inlineToDocbook _ (Str str) = text $ escapeStringForXML str inlineToDocbook opts (Emph lst) = inTagsSimple "emphasis" $ inlinesToDocbook opts lst inlineToDocbook opts (Strong lst) = inTags False "emphasis" [("role", "strong")] $ inlinesToDocbook opts lst inlineToDocbook opts (Strikeout lst) = inTags False "emphasis" [("role", "strikethrough")] $ inlinesToDocbook opts lst inlineToDocbook opts (Superscript lst) = inTagsSimple "superscript" $ inlinesToDocbook opts lst inlineToDocbook opts (Subscript lst) = inTagsSimple "subscript" $ inlinesToDocbook opts lst inlineToDocbook opts (SmallCaps lst) = inTags False "emphasis" [("role", "smallcaps")] $ inlinesToDocbook opts lst inlineToDocbook opts (Quoted _ lst) = inTagsSimple "quote" $ inlinesToDocbook opts lst inlineToDocbook opts (Cite _ lst) = inlinesToDocbook opts lst inlineToDocbook opts (Span (ident,_,_) ils) = (if null ident then mempty else selfClosingTag "anchor" [("id", ident)]) <> inlinesToDocbook opts ils inlineToDocbook _ (Code _ str) = inTagsSimple "literal" $ text (escapeStringForXML str) inlineToDocbook opts (Math t str) | isMathML (writerHTMLMathMethod opts) = case writeMathML dt <$> readTeX str of Right r -> inTagsSimple tagtype $ text $ Xml.ppcElement conf $ fixNS $ removeAttr r Left _ -> inlinesToDocbook opts $ texMathToInlines t str | otherwise = inlinesToDocbook opts $ texMathToInlines t str where (dt, tagtype) = case t of InlineMath -> (DisplayInline,"inlineequation") DisplayMath -> (DisplayBlock,"informalequation") conf = Xml.useShortEmptyTags (const False) Xml.defaultConfigPP removeAttr e = e{ Xml.elAttribs = [] } fixNS' qname = qname{ Xml.qPrefix = Just "mml" } fixNS = everywhere (mkT fixNS') inlineToDocbook _ (RawInline f x) | f == "html" || f == "docbook" = text x | otherwise = empty inlineToDocbook _ LineBreak = text "\n" inlineToDocbook _ Space = space -- because we use \n for LineBreak, we can't do soft breaks: inlineToDocbook _ SoftBreak = space inlineToDocbook opts (Link attr txt (src, _)) | Just email <- stripPrefix "mailto:" src = let emailLink = inTagsSimple "email" $ text $ escapeStringForXML $ email in case txt of [Str s] | escapeURI s == email -> emailLink _ -> inlinesToDocbook opts txt <+> char '(' <> emailLink <> char ')' | otherwise = (if isPrefixOf "#" src then inTags False "link" $ ("linkend", drop 1 src) : idAndRole attr else if writerDocbook5 opts then inTags False "link" $ ("xlink:href", src) : idAndRole attr else inTags False "ulink" $ ("url", src) : idAndRole attr ) $ inlinesToDocbook opts txt inlineToDocbook opts (Image attr _ (src, tit)) = let titleDoc = if null tit then empty else inTagsIndented "objectinfo" $ inTagsIndented "title" (text $ escapeStringForXML tit) in inTagsIndented "inlinemediaobject" $ inTagsIndented "imageobject" $ titleDoc $$ imageToDocbook opts attr src inlineToDocbook opts (Note contents) = inTagsIndented "footnote" $ blocksToDocbook opts contents isMathML :: HTMLMathMethod -> Bool isMathML (MathML _) = True isMathML _ = False idAndRole :: Attr -> [(String, String)] idAndRole (id',cls,_) = ident ++ role where ident = if null id' then [] else [("id", id')] role = if null cls then [] else [("role", unwords cls)] pandoc-1.19.2.4/src/Text/Pandoc/Writers/OPML.hs0000644000000000000000000000672313155240142017066 0ustar0000000000000000{-# LANGUAGE CPP #-} {- Copyright (C) 2013-2015 John MacFarlane 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.Writers.OPML Copyright : Copyright (C) 2013-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to OPML XML. -} module Text.Pandoc.Writers.OPML ( writeOPML) where import Text.Pandoc.Definition import Text.Pandoc.XML import Text.Pandoc.Writers.Shared import Text.Pandoc.Shared import Text.Pandoc.Options import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.Writers.HTML (writeHtmlString) import Text.Pandoc.Writers.Markdown (writeMarkdown) import Text.Pandoc.Pretty import Text.Pandoc.Compat.Time import qualified Text.Pandoc.Builder as B -- | Convert Pandoc document to string in OPML format. writeOPML :: WriterOptions -> Pandoc -> String writeOPML opts (Pandoc meta blocks) = let elements = hierarchicalize blocks colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing meta' = B.setMeta "date" (B.str $ convertDate $ docDate meta) meta Just metadata = metaToJSON opts (Just . writeMarkdown def . Pandoc nullMeta) (Just . trimr . writeMarkdown def . Pandoc nullMeta . (\ils -> [Plain ils])) meta' main = render colwidth $ vcat (map (elementToOPML opts) elements) context = defField "body" main metadata in case writerTemplate opts of Nothing -> main Just tpl -> renderTemplate' tpl context writeHtmlInlines :: [Inline] -> String writeHtmlInlines ils = trim $ writeHtmlString def $ Pandoc nullMeta [Plain ils] -- date format: RFC 822: Thu, 14 Jul 2005 23:41:05 GMT showDateTimeRFC822 :: UTCTime -> String showDateTimeRFC822 = formatTime defaultTimeLocale "%a, %d %b %Y %X %Z" convertDate :: [Inline] -> String 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 elementToOPML _ (Blk _) = empty elementToOPML opts (Sec _ _num _ title elements) = let isBlk (Blk _) = True isBlk _ = False fromBlk (Blk x) = x fromBlk _ = error "fromBlk called on non-block" (blocks, rest) = span isBlk elements attrs = [("text", writeHtmlInlines title)] ++ [("_note", writeMarkdown def (Pandoc nullMeta (map fromBlk blocks))) | not (null blocks)] in inTags True "outline" attrs $ vcat (map (elementToOPML opts) rest) pandoc-1.19.2.4/src/Text/Pandoc/Writers/HTML.hs0000644000000000000000000013014213155240142017054 0ustar0000000000000000{-# LANGUAGE OverloadedStrings, CPP, ViewPatterns, ScopedTypeVariables #-} {- Copyright (C) 2006-2015 John MacFarlane 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.Writers.HTML Copyright : Copyright (C) 2006-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to HTML. -} module Text.Pandoc.Writers.HTML ( writeHtml , writeHtmlString ) where import Text.Pandoc.Definition import Data.Monoid ((<>)) import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Options import Text.Pandoc.ImageSize import Text.Pandoc.Templates import Text.Pandoc.Readers.TeXMath import Text.Pandoc.Slides import Text.Pandoc.Highlighting ( highlight, styleToCss, formatHtmlInline, formatHtmlBlock ) import Text.Pandoc.XML (fromEntities, escapeStringForXML) import Network.URI ( parseURIReference, URI(..), unEscapeString ) import Network.HTTP ( urlEncode ) import Numeric ( showHex ) import Data.Char ( ord, toLower ) import Data.List ( isPrefixOf, intersperse ) import Data.String ( fromString ) import Data.Maybe ( catMaybes, fromMaybe, isJust ) import Control.Monad.State import Text.Blaze.Html hiding(contents) #if MIN_VERSION_blaze_markup(0,6,3) #else import Text.Blaze.Internal(preEscapedString) #endif #if MIN_VERSION_blaze_html(0,5,1) import qualified Text.Blaze.XHtml5 as H5 #else import qualified Text.Blaze.Html5 as H5 #endif import qualified Text.Blaze.XHtml1.Transitional as H import qualified Text.Blaze.XHtml1.Transitional.Attributes as A import Text.Blaze.Html.Renderer.String (renderHtml) import Text.TeXMath 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.Aeson (Value) data WriterState = WriterState { stNotes :: [Html] -- ^ List of notes , stMath :: Bool -- ^ Math is used in document , stQuotes :: Bool -- ^ tag is used , stHighlighting :: Bool -- ^ Syntax highlighting is used , stSecNum :: [Int] -- ^ Number of current section , stElement :: Bool -- ^ Processing an Element } defaultWriterState :: WriterState defaultWriterState = WriterState {stNotes= [], stMath = False, stQuotes = False, stHighlighting = False, stSecNum = [], stElement = False} -- Helpers to render HTML with the appropriate function. strToHtml :: String -> Html strToHtml ('\'':xs) = preEscapedString "\'" `mappend` strToHtml xs strToHtml xs@(_:_) = case break (=='\'') xs of (_ ,[]) -> toHtml xs (ys,zs) -> toHtml ys `mappend` strToHtml zs strToHtml [] = "" -- | Hard linebreak. nl :: WriterOptions -> Html nl opts = if writerWrapText opts == WrapNone then mempty else preEscapedString "\n" -- | Convert Pandoc document to Html string. writeHtmlString :: WriterOptions -> Pandoc -> String writeHtmlString opts d = let (body, context) = evalState (pandocToHtml opts d) defaultWriterState in case writerTemplate opts of Nothing -> renderHtml body Just tpl -> renderTemplate' tpl $ defField "body" (renderHtml body) context -- | Convert Pandoc document to Html structure. writeHtml :: WriterOptions -> Pandoc -> Html writeHtml opts d = let (body, context) = evalState (pandocToHtml opts d) defaultWriterState in case writerTemplate opts of Nothing -> body Just tpl -> renderTemplate' tpl $ defField "body" (renderHtml body) context -- result is (title, authors, date, toc, body, new variables) pandocToHtml :: WriterOptions -> Pandoc -> State WriterState (Html, Value) pandocToHtml opts (Pandoc meta blocks) = do metadata <- metaToJSON opts (fmap renderHtml . blockListToHtml opts) (fmap renderHtml . inlineListToHtml opts) meta let stringifyHTML = escapeStringForXML . stringify let authsMeta = map stringifyHTML $ docAuthors meta let dateMeta = stringifyHTML $ docDate meta let slideLevel = fromMaybe (getSlideLevel blocks) $ writerSlideLevel opts let sects = hierarchicalize $ if writerSlideVariant opts == NoSlides then blocks else prepSlides slideLevel blocks toc <- if writerTableOfContents opts then tableOfContents opts sects else return Nothing blocks' <- liftM (mconcat . intersperse (nl opts)) $ mapM (elementToHtml slideLevel opts) sects st <- get let notes = reverse (stNotes st) let thebody = blocks' >> footnoteSection opts notes let math = case writerHTMLMathMethod opts of LaTeXMathML (Just url) -> H.script ! A.src (toValue url) ! A.type_ "text/javascript" $ mempty MathML (Just url) -> H.script ! A.src (toValue url) ! A.type_ "text/javascript" $ mempty MathJax url -> H.script ! A.src (toValue url) ! A.type_ "text/javascript" $ case writerSlideVariant opts of SlideousSlides -> preEscapedString "MathJax.Hub.Queue([\"Typeset\",MathJax.Hub]);" _ -> mempty JsMath (Just url) -> H.script ! A.src (toValue url) ! A.type_ "text/javascript" $ mempty KaTeX js css -> (H.script ! A.src (toValue js) $ mempty) <> (H.link ! A.rel "stylesheet" ! A.href (toValue css)) <> (H.script ! A.type_ "text/javascript" $ toHtml renderKaTeX) _ -> case lookup "mathml-script" (writerVariables opts) of Just s | not (writerHtml5 opts) -> H.script ! A.type_ "text/javascript" $ preEscapedString ("/**/\n") | otherwise -> mempty Nothing -> mempty let context = (if stHighlighting st then defField "highlighting-css" (styleToCss $ writerHighlightStyle opts) else id) $ (if stMath st then defField "math" (renderHtml math) else id) $ defField "quotes" (stQuotes st) $ maybe id (defField "toc" . renderHtml) toc $ defField "author-meta" authsMeta $ maybe id (defField "date-meta") (normalizeDate dateMeta) $ defField "pagetitle" (stringifyHTML $ docTitle meta) $ defField "idprefix" (writerIdentifierPrefix opts) $ -- these should maybe be set in pandoc.hs defField "slidy-url" ("http://www.w3.org/Talks/Tools/Slidy2" :: String) $ defField "slideous-url" ("slideous" :: String) $ defField "revealjs-url" ("reveal.js" :: String) $ defField "s5-url" ("s5/default" :: String) $ defField "html5" (writerHtml5 opts) $ metadata return (thebody, context) -- | Like Text.XHtml's identifier, but adds the writerIdentifierPrefix prefixedId :: WriterOptions -> String -> Attribute prefixedId opts s = case s of "" -> mempty _ -> A.id $ toValue $ writerIdentifierPrefix opts ++ s toList :: (Html -> Html) -> WriterOptions -> ([Html] -> Html) toList listop opts items = do if (writerIncremental opts) then if (writerSlideVariant opts /= RevealJsSlides) then (listop $ mconcat items) ! A.class_ "incremental" else listop $ mconcat $ map (! A.class_ "fragment") items else listop $ mconcat items unordList :: WriterOptions -> [Html] -> Html unordList opts = toList H.ul opts . toListItems opts ordList :: WriterOptions -> [Html] -> Html ordList opts = toList H.ol opts . toListItems opts defList :: WriterOptions -> [Html] -> Html defList opts items = toList H.dl opts (items ++ [nl opts]) -- | Construct table of contents from list of elements. tableOfContents :: WriterOptions -> [Element] -> State WriterState (Maybe Html) tableOfContents _ [] = return Nothing tableOfContents opts sects = do let opts' = opts { writerIgnoreNotes = True } contents <- mapM (elementToListItem opts') sects let tocList = catMaybes contents return $ if null tocList then Nothing else Just $ unordList opts tocList -- | Convert section number to string showSecNum :: [Int] -> String showSecNum = concat . intersperse "." . map show -- | Converts an Element to a list item for a table of contents, -- retrieving the appropriate identifier from state. elementToListItem :: WriterOptions -> Element -> State WriterState (Maybe Html) -- Don't include the empty headers created in slide shows -- shows when an hrule is used to separate slides without a new title: elementToListItem _ (Sec _ _ _ [Str "\0"] _) = return Nothing elementToListItem opts (Sec lev num (id',classes,_) headerText subsecs) | lev <= writerTOCDepth opts = do let num' = zipWith (+) num (writerNumberOffset opts ++ repeat 0) let sectnum = if writerNumberSections opts && not (null num) && "unnumbered" `notElem` classes then (H.span ! A.class_ "toc-section-number" $ toHtml $ showSecNum num') >> preEscapedString " " else mempty txt <- liftM (sectnum >>) $ inlineListToHtml opts headerText subHeads <- mapM (elementToListItem opts) subsecs >>= return . catMaybes let subList = if null subHeads then mempty else unordList opts subHeads -- in reveal.js, we need #/apples, not #apples: let revealSlash = ['/' | writerSlideVariant opts == RevealJsSlides] return $ Just $ if null id' then (H.a $ toHtml txt) >> subList else (H.a ! A.href (toValue $ "#" ++ revealSlash ++ writerIdentifierPrefix opts ++ id') $ toHtml txt) >> subList elementToListItem _ _ = return Nothing -- | Convert an Element to Html. elementToHtml :: Int -> WriterOptions -> Element -> State WriterState Html elementToHtml _slideLevel opts (Blk block) = blockToHtml opts block elementToHtml slideLevel opts (Sec level num (id',classes,keyvals) title' elements) = do let slide = writerSlideVariant opts /= NoSlides && level <= slideLevel let num' = zipWith (+) num (writerNumberOffset opts ++ repeat 0) modify $ \st -> st{stSecNum = num'} -- update section number let titleSlide = slide && level < slideLevel header' <- if title' == [Str "\0"] -- marker for hrule then return mempty else do modify (\st -> st{ stElement = True}) res <- blockToHtml opts (Header level (id',classes,keyvals) title') modify (\st -> st{ stElement = False}) return res let isSec (Sec _ _ _ _ _) = True isSec (Blk _) = False let isPause (Blk x) = x == Para [Str ".",Space,Str ".",Space,Str "."] isPause _ = False let fragmentClass = case writerSlideVariant opts of RevealJsSlides -> "fragment" _ -> "incremental" let inDiv xs = Blk (RawBlock (Format "html") ("
          ")) : (xs ++ [Blk (RawBlock (Format "html") "
          ")]) innerContents <- mapM (elementToHtml slideLevel opts) $ if titleSlide -- title slides have no content of their own then filter isSec 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) && not (writerHtml5 opts) ] ++ ["level" ++ show level | slide || writerSectionDivs opts ] ++ classes let secttag = if writerHtml5 opts then H5.section else H.div let attr = (id',classes',keyvals) return $ if titleSlide then (if writerSlideVariant opts == RevealJsSlides then H5.section else id) $ mconcat $ (addAttrs opts attr $ secttag $ header') : innerContents else if writerSectionDivs opts || slide then addAttrs opts attr $ secttag $ inNl $ header' : innerContents else mconcat $ intersperse (nl opts) $ addAttrs opts attr header' : innerContents -- | Convert list of Note blocks to a footnote
          . -- Assumes notes are sorted. footnoteSection :: WriterOptions -> [Html] -> Html footnoteSection opts notes = if null notes then mempty else nl opts >> (container $ nl opts >> hrtag >> nl opts >> H.ol (mconcat notes >> nl opts) >> nl opts) where container x = if writerHtml5 opts then H5.section ! A.class_ "footnotes" $ x else if writerSlideVariant opts /= NoSlides then H.div ! A.class_ "footnotes slide" $ x else H.div ! A.class_ "footnotes" $ x hrtag = if writerHtml5 opts then H5.hr else H.hr -- | Parse a mailto link; return Just (name, domain) or Nothing. parseMailto :: String -> Maybe (String, String) parseMailto s = do case break (==':') s of (xs,':':addr) | map toLower xs == "mailto" -> do let (name', rest) = span (/='@') addr let domain = drop 1 rest return (name', domain) _ -> fail "not a mailto: URL" -- | Obfuscate a "mailto:" link. obfuscateLink :: WriterOptions -> Attr -> Html -> String -> Html obfuscateLink opts attr txt s | writerEmailObfuscation opts == NoObfuscation = addAttrs opts attr $ H.a ! A.href (toValue s) $ txt obfuscateLink opts attr (renderHtml -> txt) s = let meth = writerEmailObfuscation opts s' = map toLower (take 7 s) ++ drop 7 s in case parseMailto s' of (Just (name', domain)) -> let domain' = substitute "." " dot " domain at' = obfuscateChar '@' (linkText, altText) = if txt == drop 7 s' -- autolink then ("e", name' ++ " at " ++ domain') else ("'" ++ obfuscateString txt ++ "'", txt ++ " (" ++ name' ++ " at " ++ domain' ++ ")") in case meth of ReferenceObfuscation -> -- need to use preEscapedString or &'s are escaped to & in URL preEscapedString $ "" ++ (obfuscateString txt) ++ "" JavascriptObfuscation -> (H.script ! A.type_ "text/javascript" $ preEscapedString ("\n\n")) >> H.noscript (preEscapedString $ obfuscateString altText) _ -> error $ "Unknown obfuscation method: " ++ show meth _ -> addAttrs opts attr $ H.a ! A.href (toValue s) $ toHtml txt -- malformed email -- | Obfuscate character as entity. obfuscateChar :: Char -> String obfuscateChar char = let num = ord char numstr = if even num then show num else "x" ++ showHex num "" in "&#" ++ numstr ++ ";" -- | Obfuscate string using entities. obfuscateString :: String -> String obfuscateString = concatMap obfuscateChar . fromEntities addAttrs :: WriterOptions -> Attr -> Html -> Html addAttrs opts attr h = foldl (!) h (attrsToHtml opts attr) toAttrs :: [(String, String)] -> [Attribute] toAttrs kvs = map (\(x,y) -> customAttribute (fromString x) (toValue y)) kvs attrsToHtml :: WriterOptions -> Attr -> [Attribute] attrsToHtml opts (id',classes',keyvals) = [prefixedId opts id' | not (null id')] ++ [A.class_ (toValue $ unwords classes') | not (null classes')] ++ toAttrs keyvals imgAttrsToHtml :: WriterOptions -> Attr -> [Attribute] imgAttrsToHtml opts attr = attrsToHtml opts (ident,cls,kvs') ++ toAttrs (dimensionsToAttrList opts attr) where (ident,cls,kvs) = attr kvs' = filter isNotDim kvs isNotDim ("width", _) = False isNotDim ("height", _) = False isNotDim _ = True dimensionsToAttrList :: WriterOptions -> Attr -> [(String, String)] dimensionsToAttrList opts attr = (go Width) ++ (go Height) where go dir = case (dimension dir attr) of (Just (Percent a)) -> [("style", show dir ++ ":" ++ show (Percent a))] (Just dim) -> [(show dir, showInPixel opts dim)] _ -> [] imageExts :: [String] imageExts = [ "art", "bmp", "cdr", "cdt", "cpt", "cr2", "crw", "djvu", "erf", "gif", "ico", "ief", "jng", "jpg", "jpeg", "nef", "orf", "pat", "pbm", "pcx", "pgm", "png", "pnm", "ppm", "psd", "ras", "rgb", "svg", "tiff", "wbmp", "xbm", "xpm", "xwd" ] treatAsImage :: FilePath -> Bool treatAsImage fp = let path = case uriPath `fmap` parseURIReference fp of Nothing -> fp Just up -> up ext = map toLower $ drop 1 $ takeExtension path in null ext || ext `elem` imageExts -- | Convert Pandoc block element to HTML. blockToHtml :: WriterOptions -> Block -> State WriterState Html blockToHtml _ Null = return mempty blockToHtml opts (Plain lst) = inlineListToHtml opts lst -- title beginning with fig: indicates that the image is a figure blockToHtml opts (Para [Image attr txt (s,'f':'i':'g':':':tit)]) = do img <- inlineToHtml opts (Image attr txt (s,tit)) let tocapt = if writerHtml5 opts then H5.figcaption else H.p ! A.class_ "caption" capt <- if null txt then return mempty else tocapt `fmap` inlineListToHtml opts txt return $ if writerHtml5 opts then H5.figure $ mconcat [nl opts, img, capt, nl opts] else H.div ! A.class_ "figure" $ mconcat [nl opts, img, nl opts, capt, nl opts] blockToHtml opts (Para lst) | isEmptyRaw lst = return mempty | otherwise = do contents <- inlineListToHtml opts lst return $ H.p contents where isEmptyRaw [RawInline f _] = f /= (Format "html") isEmptyRaw _ = False blockToHtml opts (LineBlock lns) = if writerWrapText opts == WrapNone then blockToHtml opts $ linesToPara lns else do let lf = preEscapedString "\n" htmlLines <- mconcat . intersperse lf <$> mapM (inlineListToHtml opts) lns return $ H.div ! A.style "white-space: pre-line;" $ htmlLines 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 RevealJsSlides -> addAttrs opts' attr $ H5.aside $ contents' DZSlides -> (addAttrs opts' attr $ H5.div $ contents') ! (H5.customAttribute "role" "note") NoSlides -> addAttrs opts' attr $ H.div $ contents' _ -> mempty else addAttrs opts (ident, classes', kvs) $ divtag $ contents' blockToHtml opts (RawBlock f str) | f == Format "html" = return $ preEscapedString str | (f == Format "latex" || f == Format "tex") && allowsMathEnvironments (writerHTMLMathMethod opts) && isMathEnvironment str = blockToHtml opts $ Plain [Math DisplayMath str] | otherwise = return mempty blockToHtml opts (HorizontalRule) = return $ if writerHtml5 opts then H5.hr else H.hr blockToHtml opts (CodeBlock (id',classes,keyvals) rawCode) = do let tolhs = isEnabled Ext_literate_haskell opts && any (\c -> map toLower c == "haskell") classes && any (\c -> map toLower c == "literate") classes classes' = if tolhs then map (\c -> if map toLower c == "haskell" then "literatehaskell" else c) classes else classes adjCode = if tolhs then unlines . map ("> " ++) . lines $ rawCode else rawCode hlCode = if writerHighlight opts -- check highlighting options then highlight formatHtmlBlock (id',classes',keyvals) adjCode else Nothing case hlCode of Nothing -> return $ addAttrs opts (id',classes,keyvals) $ H.pre $ H.code $ toHtml adjCode Just h -> modify (\st -> st{ stHighlighting = True }) >> return (addAttrs opts (id',[],keyvals) h) blockToHtml opts (BlockQuote blocks) = -- in S5, treat list in blockquote specially -- if default is incremental, make it nonincremental; -- otherwise incremental if writerSlideVariant opts /= NoSlides then let inc = not (writerIncremental opts) in case blocks of [BulletList lst] -> blockToHtml (opts {writerIncremental = inc}) (BulletList lst) [OrderedList attribs lst] -> blockToHtml (opts {writerIncremental = inc}) (OrderedList attribs lst) [DefinitionList lst] -> blockToHtml (opts {writerIncremental = inc}) (DefinitionList lst) _ -> do contents <- blockListToHtml opts blocks return $ H.blockquote $ nl opts >> contents >> nl opts else do contents <- blockListToHtml opts blocks return $ H.blockquote $ nl opts >> contents >> nl opts blockToHtml opts (Header level attr@(_,classes,_) lst) = do contents <- inlineListToHtml opts lst secnum <- liftM stSecNum get let contents' = if writerNumberSections opts && not (null secnum) && "unnumbered" `notElem` classes then (H.span ! A.class_ "header-section-number" $ toHtml $ showSecNum secnum) >> strToHtml " " >> contents else contents inElement <- gets stElement return $ (if inElement then id else addAttrs opts attr) $ case level of 1 -> H.h1 contents' 2 -> H.h2 contents' 3 -> H.h3 contents' 4 -> H.h4 contents' 5 -> H.h5 contents' 6 -> H.h6 contents' _ -> H.p contents' blockToHtml opts (BulletList lst) = do contents <- mapM (blockListToHtml opts) lst return $ unordList opts contents blockToHtml opts (OrderedList (startnum, numstyle, _) lst) = do contents <- mapM (blockListToHtml opts) lst let numstyle' = case numstyle of Example -> "decimal" _ -> camelCaseToHyphenated $ show numstyle 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_ $ case numstyle of Decimal -> "1" LowerAlpha -> "a" UpperAlpha -> "A" LowerRoman -> "i" UpperRoman -> "I" _ -> "1"] else [A.style $ toValue $ "list-style-type: " ++ numstyle'] else []) return $ foldl (!) (ordList opts contents) attribs blockToHtml opts (DefinitionList lst) = do contents <- mapM (\(term, defs) -> do term' <- if null term then return mempty else liftM H.dt $ inlineListToHtml opts term defs' <- mapM ((liftM (\x -> H.dd $ (x >> nl opts))) . blockListToHtml opts) defs return $ mconcat $ nl opts : term' : nl opts : intersperse (nl opts) defs') lst return $ defList opts contents blockToHtml opts (Table capt aligns widths headers rows') = do captionDoc <- if null capt then return mempty else do cs <- inlineListToHtml opts capt return $ H.caption cs >> nl opts let percent w = show (truncate (100*w) :: Integer) ++ "%" let coltags = if all (== 0.0) widths then mempty else do H.colgroup $ do nl opts mapM_ (\w -> do if writerHtml5 opts then H.col ! A.style (toValue $ "width: " ++ percent w) else H.col ! A.width (toValue $ percent w) nl opts) widths nl opts head' <- if all null headers then return mempty else do contents <- tableRowToHtml opts aligns 0 headers return $ H.thead (nl opts >> contents) >> nl opts body' <- liftM (\x -> H.tbody (nl opts >> mconcat x)) $ zipWithM (tableRowToHtml opts aligns) [1..] rows' 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] -> Int -> [[Block]] -> State WriterState Html tableRowToHtml opts aligns rownum cols' = do let mkcell = if rownum == 0 then H.th else H.td let rowclass = case rownum of 0 -> "header" x | x `rem` 2 == 1 -> "odd" _ -> "even" cols'' <- sequence $ zipWith (\alignment item -> tableItemToHtml opts mkcell alignment item) aligns cols' return $ (H.tr ! A.class_ rowclass $ nl opts >> mconcat cols'') >> nl opts alignmentToString :: Alignment -> [Char] alignmentToString alignment = case alignment of AlignLeft -> "left" AlignRight -> "right" AlignCenter -> "center" AlignDefault -> "" tableItemToHtml :: WriterOptions -> (Html -> Html) -> Alignment -> [Block] -> State WriterState Html tableItemToHtml opts tag' align' item = do contents <- blockListToHtml opts item let alignStr = alignmentToString align' let attribs = if writerHtml5 opts then A.style (toValue $ "text-align: " ++ alignStr ++ ";") else A.align (toValue alignStr) let tag'' = if null alignStr then tag' else tag' ! attribs return $ (tag'' $ contents) >> nl opts toListItems :: WriterOptions -> [Html] -> [Html] toListItems opts items = map (toListItem opts) items ++ [nl opts] toListItem :: WriterOptions -> Html -> Html toListItem opts item = nl opts >> H.li item blockListToHtml :: WriterOptions -> [Block] -> State WriterState Html blockListToHtml opts lst = fmap (mconcat . intersperse (nl opts)) $ mapM (blockToHtml opts) lst -- | Convert list of Pandoc inline elements to HTML. inlineListToHtml :: WriterOptions -> [Inline] -> State WriterState Html inlineListToHtml opts lst = mapM (inlineToHtml opts) lst >>= return . mconcat -- | Annotates a MathML expression with the tex source annotateMML :: XML.Element -> String -> XML.Element annotateMML e tex = math (unode "semantics" [cs, unode "annotation" (annotAttrs, tex)]) where cs = case elChildren e of [] -> unode "mrow" () [x] -> x xs -> unode "mrow" xs math childs = XML.Element q as [XML.Elem childs] l where (XML.Element q as _ l) = e annotAttrs = [XML.Attr (unqual "encoding") "application/x-tex"] -- | Convert Pandoc inline element to HTML. inlineToHtml :: WriterOptions -> Inline -> State WriterState Html inlineToHtml opts inline = case inline of (Str str) -> return $ strToHtml str (Space) -> return $ strToHtml " " (SoftBreak) -> return $ case writerWrapText opts of WrapNone -> preEscapedString " " WrapAuto -> preEscapedString " " WrapPreserve -> preEscapedString "\n" (LineBreak) -> return $ (if writerHtml5 opts then H5.br else H.br) <> strToHtml "\n" (Span (id',classes,kvs) ils) -> inlineListToHtml opts ils >>= return . addAttrs opts attr' . H.span where attr' = (id',classes',kvs') classes' = filter (`notElem` ["csl-no-emph", "csl-no-strong", "csl-no-smallcaps"]) classes kvs' = if null styles then kvs else (("style", concat styles) : kvs) styles = ["font-style:normal;" | "csl-no-emph" `elem` classes] ++ ["font-weight:normal;" | "csl-no-strong" `elem` classes] ++ ["font-variant:normal;" | "csl-no-smallcaps" `elem` classes] (Emph lst) -> inlineListToHtml opts lst >>= return . H.em (Strong lst) -> inlineListToHtml opts lst >>= return . H.strong (Code attr str) -> case hlCode of Nothing -> return $ addAttrs opts attr $ H.code $ strToHtml str Just h -> do modify $ \st -> st{ stHighlighting = True } return $ addAttrs opts (id',[],keyvals) h where (id',_,keyvals) = attr hlCode = if writerHighlight opts then highlight formatHtmlInline attr str else Nothing (Strikeout lst) -> inlineListToHtml opts lst >>= return . H.del (SmallCaps lst) -> inlineListToHtml opts lst >>= return . (H.span ! A.style "font-variant: small-caps;") (Superscript lst) -> inlineListToHtml opts lst >>= return . H.sup (Subscript lst) -> inlineListToHtml opts lst >>= return . H.sub (Quoted quoteType lst) -> let (leftQuote, rightQuote) = case quoteType of SingleQuote -> (strToHtml "‘", strToHtml "’") DoubleQuote -> (strToHtml "“", strToHtml "”") in if writerHtmlQTags opts then do modify $ \st -> st{ stQuotes = True } H.q `fmap` inlineListToHtml opts lst else (\x -> leftQuote >> x >> rightQuote) `fmap` inlineListToHtml opts lst (Math t str) -> do modify (\st -> st {stMath = True}) let mathClass = toValue $ ("math " :: String) ++ if t == InlineMath then "inline" else "display" case writerHTMLMathMethod opts of LaTeXMathML _ -> -- putting LaTeXMathML in container with class "LaTeX" prevents -- non-math elements on the page from being treated as math by -- the javascript return $ H.span ! A.class_ "LaTeX" $ case t of InlineMath -> toHtml ("$" ++ str ++ "$") DisplayMath -> toHtml ("$$" ++ str ++ "$$") JsMath _ -> do let m = preEscapedString str return $ case t of InlineMath -> H.span ! A.class_ mathClass $ m DisplayMath -> H.div ! A.class_ mathClass $ m WebTeX url -> do let imtag = if writerHtml5 opts then H5.img else H.img let m = imtag ! A.style "vertical-align:middle" ! A.src (toValue $ url ++ urlEncode str) ! A.alt (toValue str) ! A.title (toValue str) let brtag = if writerHtml5 opts then H5.br else H.br return $ case t of InlineMath -> m DisplayMath -> brtag >> m >> brtag GladTeX -> return $ case t of InlineMath -> preEscapedString $ "" ++ str ++ "" DisplayMath -> preEscapedString $ "" ++ str ++ "" MathML _ -> do let dt = if t == InlineMath then DisplayInline else DisplayBlock let conf = useShortEmptyTags (const False) defaultConfigPP case writeMathML dt <$> readTeX str of Right r -> return $ preEscapedString $ ppcElement conf (annotateMML r str) Left _ -> inlineListToHtml opts (texMathToInlines t str) >>= return . (H.span ! A.class_ mathClass) MathJax _ -> return $ H.span ! A.class_ mathClass $ toHtml $ case t of InlineMath -> "\\(" ++ str ++ "\\)" DisplayMath -> "\\[" ++ str ++ "\\]" KaTeX _ _ -> return $ H.span ! A.class_ mathClass $ toHtml (case t of InlineMath -> str DisplayMath -> "\\displaystyle " ++ str) PlainMath -> do x <- inlineListToHtml opts (texMathToInlines t str) let m = H.span ! A.class_ mathClass $ x let brtag = if writerHtml5 opts then H5.br else H.br return $ case t of InlineMath -> m DisplayMath -> brtag >> m >> brtag (RawInline f str) | f == Format "html" -> return $ preEscapedString str | otherwise -> return mempty (Link attr txt (s,_)) | "mailto:" `isPrefixOf` s -> do linkText <- inlineListToHtml opts txt return $ obfuscateLink opts attr linkText s (Link attr txt (s,tit)) -> do linkText <- inlineListToHtml opts txt let s' = case s of '#':xs | writerSlideVariant opts == RevealJsSlides -> '#':'/':xs _ -> s let link = H.a ! A.href (toValue s') $ linkText let link' = if txt == [Str (unEscapeString s)] then link ! A.class_ "uri" else link let link'' = addAttrs opts attr link' return $ if null tit then link'' else link'' ! A.title (toValue tit) (Image attr txt (s,tit)) | treatAsImage s -> do let alternate' = stringify txt let attributes = [A.src $ toValue s] ++ [A.title $ toValue tit | not (null tit)] ++ [A.alt $ toValue alternate' | not (null txt)] ++ imgAttrsToHtml opts attr let tag = if writerHtml5 opts then H5.img else H.img return $ foldl (!) tag attributes -- note: null title included, as in Markdown.pl (Image attr _ (s,tit)) -> do let attributes = [A.src $ toValue s] ++ [A.title $ toValue tit | not (null tit)] ++ imgAttrsToHtml opts attr return $ foldl (!) H5.embed attributes -- note: null title included, as in Markdown.pl (Note contents) | writerIgnoreNotes opts -> return mempty | otherwise -> do notes <- gets stNotes let number = (length notes) + 1 let ref = show number htmlContents <- blockListToNote opts ref contents -- push contents onto front of notes modify $ \st -> st {stNotes = (htmlContents:notes)} let revealSlash = ['/' | writerSlideVariant opts == RevealJsSlides] let link = H.a ! A.href (toValue $ "#" ++ revealSlash ++ writerIdentifierPrefix opts ++ "fn" ++ ref) ! A.class_ "footnoteRef" ! prefixedId opts ("fnref" ++ ref) $ (if isJust (writerEpubVersion opts) then id else H.sup) $ toHtml ref return $ case writerEpubVersion opts of Just EPUB3 -> link ! customAttribute "epub:type" "noteref" _ -> link (Cite cits il)-> do contents <- inlineListToHtml opts il let citationIds = unwords $ map citationId cits let result = H.span ! A.class_ "citation" $ contents return $ if writerHtml5 opts then result ! customAttribute "data-cites" (toValue citationIds) else result blockListToNote :: WriterOptions -> String -> [Block] -> State WriterState Html blockListToNote opts ref blocks = -- If last block is Para or Plain, include the backlink at the end of -- that block. Otherwise, insert a new Plain block with the backlink. let backlink = [Link nullAttr [Str "↩"] ("#" ++ writerIdentifierPrefix opts ++ "fnref" ++ ref,[])] blocks' = if null blocks then [] else let lastBlock = last blocks otherBlocks = init blocks in case lastBlock of (Para lst) -> otherBlocks ++ [Para (lst ++ backlink)] (Plain lst) -> otherBlocks ++ [Plain (lst ++ backlink)] _ -> otherBlocks ++ [lastBlock, Plain backlink] in do contents <- blockListToHtml opts blocks' let noteItem = H.li ! (prefixedId opts ("fn" ++ ref)) $ contents let noteItem' = case writerEpubVersion opts of Just EPUB3 -> noteItem ! customAttribute "epub:type" "footnote" _ -> noteItem return $ nl opts >> noteItem' -- Javascript snippet to render all KaTeX elements renderKaTeX :: String renderKaTeX = unlines [ "window.onload = function(){var mathElements = document.getElementsByClassName(\"math\");" , "for (var i=0; i < mathElements.length; i++)" , "{" , " var texText = mathElements[i].firstChild" , " katex.render(texText.data, mathElements[i])" , "}}" ] isMathEnvironment :: String -> Bool isMathEnvironment s = "\\begin{" `isPrefixOf` s && envName `elem` mathmlenvs where envName = takeWhile (/= '}') (drop 7 s) mathmlenvs = [ "align" , "align*" , "alignat" , "alignat*" , "aligned" , "alignedat" , "array" , "Bmatrix" , "bmatrix" , "cases" , "CD" , "eqnarray" , "eqnarray*" , "equation" , "equation*" , "gather" , "gather*" , "gathered" , "matrix" , "multline" , "multline*" , "pmatrix" , "smallmatrix" , "split" , "subarray" , "Vmatrix" , "vmatrix" ] allowsMathEnvironments :: HTMLMathMethod -> Bool allowsMathEnvironments (MathJax _) = True allowsMathEnvironments (MathML _) = True allowsMathEnvironments (WebTeX _) = True allowsMathEnvironments _ = False pandoc-1.19.2.4/src/Text/Pandoc/Writers/ICML.hs0000644000000000000000000006443213155240142017044 0ustar0000000000000000{-# LANGUAGE OverloadedStrings, FlexibleContexts #-} {- | Module : Text.Pandoc.Writers.ICML Copyright : Copyright (C) 2013-2016 github.com/mb21 License : GNU GPL, version 2 or above Stability : alpha Conversion of 'Pandoc' documents to Adobe InCopy ICML, a stand-alone XML format which is a subset of the zipped IDML format for which the documentation is available here: http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/indesign/sdk/cs6/idml/idml-specification.pdf InCopy is the companion word-processor to Adobe InDesign and ICML documents can be integrated 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 (linesToPara, splitBy, fetchItem, warn) import Text.Pandoc.Options import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.Pretty import Text.Pandoc.ImageSize import Data.List (isPrefixOf, isInfixOf, stripPrefix, intersperse) import Data.Text as Text (breakOnAll, pack) import Control.Monad.State import Network.URI (isURI) import qualified Data.Set as Set type Style = [String] type Hyperlink = [(Int, String)] data WriterState = WriterState{ blockStyles :: Set.Set String , inlineStyles :: Set.Set String , links :: Hyperlink , listDepth :: Int , maxListDepth :: Int } type WS a = StateT WriterState IO a defaultWriterState :: WriterState defaultWriterState = WriterState{ blockStyles = Set.empty , inlineStyles = Set.empty , links = [] , listDepth = 1 , maxListDepth = 0 } -- inline names (appear in InDesign's character styles pane) emphName :: String strongName :: String strikeoutName :: String superscriptName :: String subscriptName :: String smallCapsName :: String codeName :: String linkName :: String emphName = "Italic" strongName = "Bold" strikeoutName = "Strikeout" superscriptName = "Superscript" subscriptName = "Subscript" smallCapsName = "SmallCaps" codeName = "Code" linkName = "Link" -- block element names (appear in InDesign's paragraph styles pane) paragraphName :: String figureName :: String imgCaptionName :: String codeBlockName :: String blockQuoteName :: String orderedListName :: String bulletListName :: String defListTermName :: String defListDefName :: String headerName :: String tableName :: String tableHeaderName :: String tableCaptionName :: String alignLeftName :: String alignRightName :: String alignCenterName :: String firstListItemName :: String beginsWithName :: String lowerRomanName :: String upperRomanName :: String lowerAlphaName :: String upperAlphaName :: String subListParName :: String footnoteName :: String citeName :: String paragraphName = "Paragraph" figureName = "Figure" imgCaptionName = "Caption" codeBlockName = "CodeBlock" blockQuoteName = "Blockquote" orderedListName = "NumList" bulletListName = "BulList" defListTermName = "DefListTerm" defListDefName = "DefListDef" headerName = "Header" tableName = "TablePar" tableHeaderName = "TableHeader" tableCaptionName = "TableCaption" alignLeftName = "LeftAlign" alignRightName = "RightAlign" alignCenterName = "CenterAlign" firstListItemName = "first" beginsWithName = "beginsWith-" lowerRomanName = "lowerRoman" upperRomanName = "upperRoman" lowerAlphaName = "lowerAlpha" upperAlphaName = "upperAlpha" subListParName = "subParagraph" footnoteName = "Footnote" citeName = "Cite" -- | Convert Pandoc document to string in ICML format. writeICML :: WriterOptions -> Pandoc -> IO String writeICML opts (Pandoc meta blocks) = do let colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing render' = render colwidth renderMeta f s = liftM (render' . fst) $ runStateT (f opts [] s) defaultWriterState metadata <- metaToJSON opts (renderMeta blocksToICML) (renderMeta inlinesToICML) meta (doc, st) <- runStateT (blocksToICML opts [] blocks) defaultWriterState let main = render' doc context = defField "body" main $ defField "charStyles" (render' $ charStylesToDoc st) $ defField "parStyles" (render' $ parStylesToDoc st) $ defField "hyperlinks" (render' $ hyperlinksToDoc $ links st) $ metadata return $ case writerTemplate opts of Nothing -> main Just tpl -> renderTemplate' tpl context -- | Auxilary functions for parStylesToDoc and charStylesToDoc. contains :: String -> (String, (String, String)) -> [(String, String)] contains s rule = if isInfixOf (fst rule) s then [snd rule] else [] -- | The monospaced font to use as default. monospacedFont :: Doc monospacedFont = inTags False "AppliedFont" [("type", "string")] $ text "Courier New" -- | How much to indent blockquotes etc. defaultIndent :: Int defaultIndent = 20 -- | How much to indent numbered lists before the number. defaultListIndent :: Int defaultListIndent = 10 -- other constants lineSeparator :: String lineSeparator = "
" -- | Convert a WriterState with its block styles to the ICML listing of Paragraph Styles. parStylesToDoc :: WriterState -> Doc parStylesToDoc st = vcat $ map makeStyle $ Set.toAscList $ blockStyles st where makeStyle s = let countSubStrs sub str = length $ Text.breakOnAll (Text.pack sub) (Text.pack str) attrs = concat $ map (contains s) $ [ (defListTermName, ("BulletsAndNumberingListType", "BulletList")) , (defListTermName, ("FontStyle", "Bold")) , (tableHeaderName, ("FontStyle", "Bold")) , (alignLeftName, ("Justification", "LeftAlign")) , (alignRightName, ("Justification", "RightAlign")) , (alignCenterName, ("Justification", "CenterAlign")) , (headerName++"1", ("PointSize", "36")) , (headerName++"2", ("PointSize", "30")) , (headerName++"3", ("PointSize", "24")) , (headerName++"4", ("PointSize", "18")) , (headerName++"5", ("PointSize", "14")) ] -- what is the most nested list type, if any? (isBulletList, isOrderedList) = findList $ reverse $ splitBy (==' ') s where findList [] = (False, False) findList (x:xs) | x == bulletListName = (True, False) | x == orderedListName = (False, True) | otherwise = findList xs nBuls = countSubStrs bulletListName s nOrds = countSubStrs orderedListName s attrs' = numbering ++ listType ++ indent ++ attrs where numbering | isOrderedList = [("NumberingExpression", "^#.^t"), ("NumberingLevel", show nOrds)] | otherwise = [] listType | isOrderedList && (not $ isInfixOf subListParName s) = [("BulletsAndNumberingListType", "NumberedList")] | isBulletList && (not $ isInfixOf subListParName s) = [("BulletsAndNumberingListType", "BulletList")] | otherwise = [] indent = [("LeftIndent", show indt)] where nBlockQuotes = countSubStrs blockQuoteName s nDefLists = countSubStrs defListDefName s indt = max 0 $ defaultListIndent*(nBuls + nOrds - 1) + defaultIndent*(nBlockQuotes + nDefLists) props = inTags True "Properties" [] $ (basedOn $$ tabList $$ numbForm) where font = if isInfixOf codeBlockName s then monospacedFont else empty basedOn = inTags False "BasedOn" [("type", "object")] (text "$ID/NormalParagraphStyle") $$ font tabList = if isBulletList then inTags True "TabList" [("type","list")] $ inTags True "ListItem" [("type","record")] $ vcat [ inTags False "Alignment" [("type","enumeration")] $ text "LeftAlign" , inTags False "AlignmentCharacter" [("type","string")] $ text "." , selfClosingTag "Leader" [("type","string")] , inTags False "Position" [("type","unit")] $ text $ show $ defaultListIndent * (nBuls + nOrds) ] else empty makeNumb name = inTags False "NumberingFormat" [("type", "string")] (text name) numbForm | isInfixOf lowerRomanName s = makeNumb "i, ii, iii, iv..." | isInfixOf upperRomanName s = makeNumb "I, II, III, IV..." | isInfixOf lowerAlphaName s = makeNumb "a, b, c, d..." | isInfixOf upperAlphaName s = makeNumb "A, B, C, D..." | otherwise = empty in inTags True "ParagraphStyle" ([("Self", "ParagraphStyle/"++s), ("Name", s)] ++ attrs') props -- | Convert a WriterState with its inline styles to the ICML listing of Character Styles. charStylesToDoc :: WriterState -> Doc charStylesToDoc st = vcat $ map makeStyle $ Set.toAscList $ inlineStyles st where makeStyle s = let attrs = concat $ map (contains s) [ (strikeoutName, ("StrikeThru", "true")) , (superscriptName, ("Position", "Superscript")) , (subscriptName, ("Position", "Subscript")) , (smallCapsName, ("Capitalization", "SmallCaps")) ] attrs' | isInfixOf emphName s && isInfixOf strongName s = ("FontStyle", "Bold Italic") : attrs | isInfixOf strongName s = ("FontStyle", "Bold") : attrs | isInfixOf emphName s = ("FontStyle", "Italic") : attrs | otherwise = attrs props = inTags True "Properties" [] $ inTags False "BasedOn" [("type", "object")] (text "$ID/NormalCharacterStyle") $$ font where font = if isInfixOf codeName s then monospacedFont else empty in inTags True "CharacterStyle" ([("Self", "CharacterStyle/"++s), ("Name", s)] ++ attrs') props -- | Escape colon characters as %3a escapeColons :: String -> String escapeColons (x:xs) | x == ':' = "%3a" ++ escapeColons xs | otherwise = x : escapeColons xs escapeColons [] = [] -- | Convert a list of (identifier, url) pairs to the ICML listing of hyperlinks. hyperlinksToDoc :: Hyperlink -> Doc hyperlinksToDoc [] = empty hyperlinksToDoc (x:xs) = hyp x $$ hyperlinksToDoc xs where hyp (ident, url) = hdest $$ hlink where hdest = selfClosingTag "HyperlinkURLDestination" [("Self", "HyperlinkURLDestination/"++(escapeColons url)), ("Name","link"), ("DestinationURL",url), ("DestinationUniqueKey","1")] -- HyperlinkURLDestination with more than one colon crashes CS6 hlink = inTags True "Hyperlink" [("Self","uf-"++show ident), ("Name",url), ("Source","htss-"++show ident), ("Visible","true"), ("DestinationUniqueKey","1")] $ inTags True "Properties" [] $ inTags False "BorderColor" [("type","enumeration")] (text "Black") $$ (inTags False "Destination" [("type","object")] $ text $ "HyperlinkURLDestination/"++(escapeColons (escapeStringForXML url))) -- HyperlinkURLDestination with more than one colon crashes CS6 -- | Convert a list of Pandoc blocks to ICML. blocksToICML :: WriterOptions -> Style -> [Block] -> WS Doc blocksToICML opts style lst = do docs <- mapM (blockToICML opts style) lst return $ intersperseBrs docs -- | Convert a Pandoc block element to ICML. blockToICML :: WriterOptions -> Style -> Block -> WS Doc blockToICML opts style (Plain lst) = parStyle opts style lst -- title beginning with fig: indicates that the image is a figure blockToICML opts style (Para img@[Image _ txt (_,'f':'i':'g':':':_)]) = do figure <- parStyle opts (figureName:style) img caption <- parStyle opts (imgCaptionName:style) txt return $ intersperseBrs [figure, caption] blockToICML opts style (Para lst) = parStyle opts (paragraphName:style) lst blockToICML opts style (LineBlock lns) = blockToICML opts style $ linesToPara lns blockToICML opts style (CodeBlock _ str) = parStyle opts (codeBlockName:style) $ [Str str] blockToICML _ _ (RawBlock f str) | f == Format "icml" = return $ text str | otherwise = return empty blockToICML opts style (BlockQuote blocks) = blocksToICML opts (blockQuoteName:style) blocks blockToICML opts style (OrderedList attribs lst) = listItemsToICML opts orderedListName style (Just attribs) lst blockToICML opts style (BulletList lst) = listItemsToICML opts bulletListName style Nothing lst blockToICML opts style (DefinitionList lst) = intersperseBrs `fmap` mapM (definitionListItemToICML opts style) lst blockToICML opts style (Header lvl _ lst) = let stl = (headerName ++ show lvl):style in parStyle opts stl lst blockToICML _ _ HorizontalRule = return empty -- we could insert a page break instead blockToICML opts style (Table caption aligns widths headers rows) = let style' = tableName : style noHeader = all null headers nrHeaders = if noHeader then "0" else "1" nrRows = length rows nrCols = if null rows then 0 else length $ head rows rowsToICML [] _ = return empty rowsToICML (col:rest) rowNr = liftM2 ($$) (colsToICML col aligns rowNr (0::Int)) $ rowsToICML rest (rowNr+1) colsToICML [] _ _ _ = return empty colsToICML _ [] _ _ = return empty colsToICML (cell:rest) (alig:restAligns) rowNr colNr = do let stl = if rowNr == 0 && not noHeader then tableHeaderName:style' else style' stl' | alig == AlignLeft = alignLeftName : stl | alig == AlignRight = alignRightName : stl | alig == AlignCenter = alignCenterName : stl | otherwise = stl c <- blocksToICML opts stl' cell let cl = return $ inTags True "Cell" [("Name", show colNr ++":"++ show rowNr), ("AppliedCellStyle","CellStyle/Cell")] c liftM2 ($$) cl $ colsToICML rest restAligns rowNr (colNr+1) in do let tabl = if noHeader then rows else headers:rows cells <- rowsToICML tabl (0::Int) let colWidths w = if w > 0 then [("SingleColumnWidth",show $ 500 * w)] else [] let tupToDoc tup = selfClosingTag "Column" $ [("Name",show $ fst tup)] ++ (colWidths $ snd tup) let colDescs = vcat $ map tupToDoc $ zip [0..nrCols-1] widths let tableDoc = return $ inTags True "Table" [ ("AppliedTableStyle","TableStyle/Table") , ("HeaderRowCount", nrHeaders) , ("BodyRowCount", show nrRows) , ("ColumnCount", show nrCols) ] (colDescs $$ cells) liftM2 ($$) tableDoc $ parStyle opts (tableCaptionName:style) caption blockToICML opts style (Div _ lst) = blocksToICML opts style lst blockToICML _ _ Null = return empty -- | Convert a list of lists of blocks to ICML list items. listItemsToICML :: WriterOptions -> String -> Style -> Maybe ListAttributes -> [[Block]] -> WS Doc listItemsToICML _ _ _ _ [] = return empty listItemsToICML opts listType style attribs (first:rest) = do st <- get put st{ listDepth = 1 + listDepth st} let stl = listType:style let f = listItemToICML opts stl True attribs first let r = map (listItemToICML opts stl False attribs) rest docs <- sequence $ f:r s <- get let maxD = max (maxListDepth s) (listDepth s) put s{ listDepth = 1, maxListDepth = maxD } return $ intersperseBrs docs -- | Convert a list of blocks to ICML list items. listItemToICML :: WriterOptions -> Style -> Bool-> Maybe ListAttributes -> [Block] -> WS Doc listItemToICML opts style isFirst attribs item = let makeNumbStart (Just (beginsWith, numbStl, _)) = let doN DefaultStyle = [] doN LowerRoman = [lowerRomanName] doN UpperRoman = [upperRomanName] doN LowerAlpha = [lowerAlphaName] doN UpperAlpha = [upperAlphaName] doN _ = [] bw = if beginsWith > 1 then [beginsWithName ++ show beginsWith] else [] in doN numbStl ++ bw makeNumbStart Nothing = [] stl = if isFirst then firstListItemName:style else style stl' = makeNumbStart attribs ++ stl in if length item > 1 then do let insertTab (Para lst) = blockToICML opts (subListParName:style) $ Para $ (Str "\t"):lst insertTab block = blockToICML opts style block f <- blockToICML opts stl' $ head item r <- mapM insertTab $ tail item return $ intersperseBrs (f : r) else blocksToICML opts stl' item definitionListItemToICML :: WriterOptions -> Style -> ([Inline],[[Block]]) -> WS Doc definitionListItemToICML opts style (term,defs) = do term' <- parStyle opts (defListTermName:style) term defs' <- mapM (blocksToICML opts (defListDefName:style)) defs return $ intersperseBrs $ (term' : defs') -- | Convert a list of inline elements to ICML. inlinesToICML :: WriterOptions -> Style -> [Inline] -> WS Doc inlinesToICML opts style lst = vcat `fmap` mapM (inlineToICML opts style) (mergeSpaces lst) -- | Convert an inline element to ICML. inlineToICML :: WriterOptions -> Style -> Inline -> WS Doc inlineToICML _ style (Str str) = charStyle style $ text $ escapeStringForXML str inlineToICML opts style (Emph lst) = inlinesToICML opts (emphName:style) lst inlineToICML opts style (Strong lst) = inlinesToICML opts (strongName:style) lst inlineToICML opts style (Strikeout lst) = inlinesToICML opts (strikeoutName:style) lst inlineToICML opts style (Superscript lst) = inlinesToICML opts (superscriptName:style) lst inlineToICML opts style (Subscript lst) = inlinesToICML opts (subscriptName:style) lst inlineToICML opts style (SmallCaps lst) = inlinesToICML opts (smallCapsName:style) lst inlineToICML opts style (Quoted SingleQuote lst) = inlinesToICML opts style $ [Str "‘"] ++ lst ++ [Str "’"] inlineToICML opts style (Quoted DoubleQuote lst) = inlinesToICML opts style $ [Str "“"] ++ lst ++ [Str "”"] 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 opts style SoftBreak = case writerWrapText opts of WrapAuto -> charStyle style space WrapNone -> charStyle style space WrapPreserve -> charStyle style cr inlineToICML _ style LineBreak = charStyle style $ text lineSeparator 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 inlineToICML opts style (Link _ lst (url, title)) = do content <- inlinesToICML opts (linkName:style) lst state $ \st -> let ident = if null $ links st then 1::Int else 1 + (fst $ head $ links st) newst = st{ links = (ident, url):(links st) } cont = inTags True "HyperlinkTextSource" [("Self","htss-"++show ident), ("Name",title), ("Hidden","false")] content in (cont, newst) inlineToICML opts style (Image attr _ target) = imageICML opts style attr target inlineToICML opts style (Note lst) = footnoteToICML opts style lst inlineToICML opts style (Span _ lst) = inlinesToICML opts style lst -- | Convert a list of block elements to an ICML footnote. footnoteToICML :: WriterOptions -> Style -> [Block] -> WS Doc footnoteToICML opts style lst = let insertTab (Para ls) = blockToICML opts (footnoteName:style) $ Para $ (Str "\t"):ls insertTab block = blockToICML opts (footnoteName:style) block in do contents <- mapM insertTab lst let number = inTags True "ParagraphStyleRange" [] $ inTags True "CharacterStyleRange" [] $ inTagsSimple "Content" "" return $ inTags True "CharacterStyleRange" [("AppliedCharacterStyle","$ID/NormalCharacterStyle"), ("Position","Superscript")] $ inTags True "Footnote" [] $ number $$ intersperseBrs contents -- | Auxiliary function to merge Space elements into the adjacent Strs. mergeSpaces :: [Inline] -> [Inline] mergeSpaces ((Str s):(x:((Str s'):xs))) | isSp x = mergeSpaces $ Str(s++" "++s') : xs mergeSpaces (x:((Str s):xs)) | isSp x = mergeSpaces $ Str (" "++s) : xs mergeSpaces ((Str s):(x:xs)) | isSp x = mergeSpaces $ Str (s++" ") : xs mergeSpaces (x:xs) = x : (mergeSpaces xs) mergeSpaces [] = [] isSp :: Inline -> Bool isSp Space = True isSp SoftBreak = True isSp _ = False -- | Intersperse line breaks intersperseBrs :: [Doc] -> Doc intersperseBrs = vcat . intersperse (selfClosingTag "Br" []) . filter (not . isEmpty) -- | Wrap a list of inline elements in an ICML Paragraph Style parStyle :: WriterOptions -> Style -> [Inline] -> WS Doc parStyle opts style lst = let slipIn x y = if null y then x else x ++ " > " ++ y stlStr = foldr slipIn [] $ reverse style stl = if null stlStr then "" else "ParagraphStyle/" ++ stlStr attrs = ("AppliedParagraphStyle", stl) attrs' = if firstListItemName `elem` style then let ats = attrs : [("NumberingContinue", "false")] begins = filter (isPrefixOf beginsWithName) style in if null begins then ats else let i = maybe "" id $ stripPrefix beginsWithName $ head begins in ("NumberingStartAt", i) : ats else [attrs] in do content <- inlinesToICML opts [] lst let cont = inTags True "ParagraphStyleRange" attrs' content state $ \st -> (cont, st{ blockStyles = Set.insert stlStr $ blockStyles st }) -- | Wrap a Doc in an ICML Character Style. charStyle :: Style -> Doc -> WS Doc charStyle style content = let (stlStr, attrs) = styleToStrAttr style doc = inTags True "CharacterStyleRange" attrs $ inTagsSimple "Content" $ flush content in do state $ \st -> let styles = if null stlStr then st else st{ inlineStyles = Set.insert stlStr $ inlineStyles st } in (doc, styles) -- | Transform a Style to a tuple of String (eliminating duplicates and ordered) and corresponding attribute. styleToStrAttr :: Style -> (String, [(String, String)]) styleToStrAttr style = let stlStr = unwords $ Set.toAscList $ Set.fromList style stl = if null style then "$ID/NormalCharacterStyle" else "CharacterStyle/" ++ stlStr attrs = [("AppliedCharacterStyle", stl)] in (stlStr, attrs) -- | Assemble an ICML Image. imageICML :: WriterOptions -> Style -> Attr -> Target -> WS Doc imageICML opts style attr (src, _) = do res <- liftIO $ fetchItem (writerSourceURL opts) src imgS <- case res of Left (_) -> do warn $ "Could not find image `" ++ src ++ "', skipping..." return def Right (img, _) -> do case imageSize img of Right size -> return size Left msg -> do warn $ "Could not determine image size in `" ++ src ++ "': " ++ msg return def let (ow, oh) = sizeInPoints imgS (imgWidth, imgHeight) = desiredSizeInPoints opts attr imgS hw = showFl $ ow / 2 hh = showFl $ oh / 2 scale = showFl (imgWidth / ow) ++ " 0 0 " ++ showFl (imgHeight / oh) src' = if isURI src then src else "file:" ++ src (stlStr, attrs) = styleToStrAttr style props = inTags True "Properties" [] $ inTags True "PathGeometry" [] $ inTags True "GeometryPathType" [("PathOpen","false")] $ inTags True "PathPointArray" [] $ vcat [ selfClosingTag "PathPointType" [("Anchor", "-"++hw++" -"++hh), ("LeftDirection", "-"++hw++" -"++hh), ("RightDirection", "-"++hw++" -"++hh)] , selfClosingTag "PathPointType" [("Anchor", "-"++hw++" "++hh), ("LeftDirection", "-"++hw++" "++hh), ("RightDirection", "-"++hw++" "++hh)] , selfClosingTag "PathPointType" [("Anchor", hw++" "++hh), ("LeftDirection", hw++" "++hh), ("RightDirection", hw++" "++hh)] , selfClosingTag "PathPointType" [("Anchor", hw++" -"++hh), ("LeftDirection", hw++" -"++hh), ("RightDirection", hw++" -"++hh)] ] image = inTags True "Image" [("Self","ue6"), ("ItemTransform", scale++" -"++hw++" -"++hh)] $ vcat [ inTags True "Properties" [] $ inTags True "Profile" [("type","string")] $ text "$ID/Embedded" , selfClosingTag "Link" [("Self", "ueb"), ("LinkResourceURI", src')] ] doc = inTags True "CharacterStyleRange" attrs $ inTags True "Rectangle" [("Self","uec"), ("StrokeWeight", "0"), ("ItemTransform", scale++" "++hw++" -"++hh)] $ (props $$ image) state $ \st -> (doc, st{ inlineStyles = Set.insert stlStr $ inlineStyles st } ) pandoc-1.19.2.4/src/Text/Pandoc/Writers/LaTeX.hs0000644000000000000000000016411613155240142017275 0ustar0000000000000000{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, PatternGuards #-} {- Copyright (C) 2006-2015 John MacFarlane 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.Writers.LaTeX Copyright : Copyright (C) 2006-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' format into LaTeX. -} module Text.Pandoc.Writers.LaTeX ( writeLaTeX ) where import Text.Pandoc.Definition import Text.Pandoc.Walk import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Options import Text.Pandoc.Templates import Text.Printf ( printf ) import Network.URI ( isURI, unEscapeString ) import Data.Aeson (object, (.=), FromJSON) import Data.List ( (\\), isInfixOf, stripPrefix, intercalate, intersperse, nub, nubBy, foldl' ) import Data.Char ( toLower, isPunctuation, isAscii, isLetter, isDigit, ord, isAlphaNum ) import Data.Maybe ( fromMaybe, isJust, catMaybes ) import qualified Data.Text as T import Control.Applicative ((<|>)) import Control.Monad.State import qualified Text.Parsec as P import Text.Pandoc.Pretty import Text.Pandoc.ImageSize import Text.Pandoc.Slides import Text.Pandoc.Highlighting (highlight, styleToLaTeX, formatLaTeXInline, formatLaTeXBlock, toListingsLanguage) data WriterState = WriterState { stInNote :: Bool -- true if we're in a note , stInQuote :: Bool -- true if in a blockquote , stInMinipage :: Bool -- true if in minipage , stInHeading :: Bool -- true if in a section heading , stNotes :: [Doc] -- notes in a minipage , stOLLevel :: Int -- level of ordered list nesting , stOptions :: WriterOptions -- writer options, so they don't have to be parameter , stVerbInNote :: Bool -- true if document has verbatim text in note , stTable :: Bool -- true if document has a table , stStrikeout :: Bool -- true if document has strikeout , stUrl :: Bool -- true if document has visible URL link , stGraphics :: Bool -- true if document contains images , stLHS :: Bool -- true if document has literate haskell code , stBook :: Bool -- true if document uses book or memoir class , stCsquotes :: Bool -- true if document uses csquotes , stHighlighting :: Bool -- true if document has highlighted code , stIncremental :: Bool -- true if beamer lists should be displayed bit by bit , stInternalLinks :: [String] -- list of internal link targets , stUsesEuro :: Bool -- true if euro symbol used } -- | Convert Pandoc to LaTeX. writeLaTeX :: WriterOptions -> Pandoc -> String writeLaTeX options document = evalState (pandocToLaTeX options document) $ WriterState { stInNote = False, stInQuote = False, stInMinipage = False, stInHeading = False, stNotes = [], stOLLevel = 1, stOptions = options, stVerbInNote = False, stTable = False, stStrikeout = False, stUrl = False, stGraphics = False, stLHS = False, stBook = (case writerTopLevelDivision options of TopLevelPart -> True TopLevelChapter -> True _ -> False), stCsquotes = False, stHighlighting = False, stIncremental = writerIncremental options, stInternalLinks = [], stUsesEuro = False } pandocToLaTeX :: WriterOptions -> Pandoc -> State WriterState String pandocToLaTeX options (Pandoc meta blocks) = do -- Strip off final 'references' header if --natbib or --biblatex let method = writerCiteMethod options let blocks' = if method == Biblatex || method == Natbib then case reverse blocks of (Div (_,["references"],_) _):xs -> reverse xs _ -> blocks else blocks -- see if there are internal links let isInternalLink (Link _ _ ('#':xs,_)) = [xs] isInternalLink _ = [] modify $ \s -> s{ stInternalLinks = query isInternalLink blocks' } let template = maybe "" id $ writerTemplate options -- set stBook depending on documentclass let colwidth = if writerWrapText options == WrapAuto then Just $ writerColumns options else Nothing metadata <- metaToJSON options (fmap (render colwidth) . blockListToLaTeX) (fmap (render colwidth) . inlineListToLaTeX) meta let bookClasses = ["memoir","book","report","scrreprt","scrbook"] let documentClass = case P.parse pDocumentClass "template" template of Right r -> r Left _ -> "" case lookup "documentclass" (writerVariables options) `mplus` fmap stringify (lookupMeta "documentclass" meta) of Just x | x `elem` bookClasses -> modify $ \s -> s{stBook = True} | otherwise -> return () Nothing | documentClass `elem` bookClasses -> modify $ \s -> s{stBook = True} | otherwise -> return () -- check for \usepackage...{csquotes}; if present, we'll use -- \enquote{...} for smart quotes: let headerIncludesField :: FromJSON a => Maybe a headerIncludesField = getField "header-includes" metadata let headerIncludes = fromMaybe [] $ mplus (fmap return headerIncludesField) headerIncludesField when (any (isInfixOf "{csquotes}") (template : headerIncludes)) $ modify $ \s -> s{stCsquotes = True} let (blocks'', lastHeader) = if writerCiteMethod options == Citeproc then (blocks', []) else case last blocks' of Header 1 _ il -> (init blocks', il) _ -> (blocks', []) blocks''' <- if writerBeamer options then toSlides blocks'' else return blocks'' body <- mapM (elementToLaTeX options) $ hierarchicalize blocks''' (biblioTitle :: String) <- liftM (render colwidth) $ inlineListToLaTeX lastHeader let main = render colwidth $ vsep body st <- get titleMeta <- stringToLaTeX TextString $ stringify $ docTitle meta authorsMeta <- mapM (stringToLaTeX TextString . stringify) $ docAuthors meta let docLangs = nub $ query (extract "lang") blocks let hasStringValue x = isJust (getField x metadata :: Maybe String) let geometryFromMargins = intercalate [','] $ catMaybes $ map (\(x,y) -> ((x ++ "=") ++) <$> getField y metadata) [("lmargin","margin-left") ,("rmargin","margin-right") ,("tmargin","margin-top") ,("bmargin","margin-bottom") ] let context = defField "toc" (writerTableOfContents options) $ defField "toc-depth" (show (writerTOCDepth options - if stBook st then 1 else 0)) $ defField "body" main $ defField "title-meta" titleMeta $ defField "author-meta" (intercalate "; " authorsMeta) $ defField "documentclass" (if writerBeamer options then ("beamer" :: String) else if stBook st then "book" else "article") $ defField "verbatim-in-note" (stVerbInNote st) $ defField "tables" (stTable st) $ defField "strikeout" (stStrikeout st) $ defField "url" (stUrl st) $ defField "numbersections" (writerNumberSections options) $ defField "lhs" (stLHS st) $ defField "graphics" (stGraphics st) $ defField "book-class" (stBook st) $ defField "euro" (stUsesEuro st) $ defField "listings" (writerListings options || stLHS st) $ defField "beamer" (writerBeamer options) $ (if stHighlighting st then defField "highlighting-macros" (styleToLaTeX $ writerHighlightStyle options ) else id) $ (case writerCiteMethod options of Natbib -> defField "biblio-title" biblioTitle . defField "natbib" True 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") $ defField "section-titles" True $ defField "geometry" geometryFromMargins $ 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 ++ "}[2][]{\\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 $ case writerTemplate options of Nothing -> main Just tpl -> renderTemplate' tpl context' -- | Convert Elements to LaTeX elementToLaTeX :: WriterOptions -> Element -> State WriterState Doc elementToLaTeX _ (Blk block) = blockToLaTeX block elementToLaTeX opts (Sec level _ (id',classes,_) title' elements) = do modify $ \s -> s{stInHeading = True} header' <- sectionHeader ("unnumbered" `elem` classes) id' level title' modify $ \s -> s{stInHeading = False} innerContents <- mapM (elementToLaTeX opts) elements return $ vsep (header' : innerContents) data StringContext = TextString | URLString | CodeString deriving (Eq) -- escape things as needed for LaTeX stringToLaTeX :: StringContext -> String -> State WriterState String stringToLaTeX _ [] = return "" stringToLaTeX ctx (x:xs) = do opts <- gets stOptions rest <- stringToLaTeX ctx xs let ligatures = writerTeXLigatures opts && ctx == TextString let isUrl = ctx == URLString when (x == '€') $ modify $ \st -> st{ stUsesEuro = True } return $ case x of '€' -> "\\euro{}" ++ rest '{' -> "\\{" ++ rest '}' -> "\\}" ++ rest '`' | ctx == CodeString -> "\\textasciigrave{}" ++ rest '$' | not isUrl -> "\\$" ++ rest '%' -> "\\%" ++ rest '&' -> "\\&" ++ rest '_' | not isUrl -> "\\_" ++ rest '#' -> "\\#" ++ rest '-' | not isUrl -> case xs of -- prevent adjacent hyphens from forming ligatures ('-':_) -> "-\\/" ++ rest _ -> '-' : rest '~' | not isUrl -> "\\textasciitilde{}" ++ rest '^' -> "\\^{}" ++ rest '\\'| isUrl -> '/' : rest -- NB. / works as path sep even on Windows | otherwise -> "\\textbackslash{}" ++ rest '|' | not isUrl -> "\\textbar{}" ++ rest '<' -> "\\textless{}" ++ rest '>' -> "\\textgreater{}" ++ rest '[' -> "{[}" ++ rest -- to avoid interpretation as ']' -> "{]}" ++ rest -- optional arguments '\'' | ctx == CodeString -> "\\textquotesingle{}" ++ rest '\160' -> "~" ++ rest '\x202F' -> "\\," ++ rest '\x2026' -> "\\ldots{}" ++ rest '\x2018' | ligatures -> "`" ++ rest '\x2019' | ligatures -> "'" ++ rest '\x201C' | ligatures -> "``" ++ rest '\x201D' | ligatures -> "''" ++ rest '\x2014' | ligatures -> "---" ++ rest '\x2013' | ligatures -> "--" ++ rest _ -> x : rest toLabel :: String -> State WriterState String toLabel z = go `fmap` stringToLaTeX URLString z where go [] = "" go (x:xs) | (isLetter x || isDigit x) && isAscii x = x:go xs | elem x ("_-+=:;." :: String) = x:go xs | otherwise = "ux" ++ printf "%x" (ord x) ++ go xs -- | Puts contents into LaTeX command. inCmd :: String -> Doc -> Doc inCmd cmd contents = char '\\' <> text cmd <> braces contents toSlides :: [Block] -> State WriterState [Block] toSlides bs = do opts <- gets stOptions let slideLevel = fromMaybe (getSlideLevel bs) $ writerSlideLevel opts let bs' = prepSlides slideLevel bs concat `fmap` (mapM (elementToBeamer slideLevel) $ hierarchicalize bs') elementToBeamer :: Int -> Element -> State WriterState [Block] elementToBeamer _slideLevel (Blk b) = return [b] elementToBeamer slideLevel (Sec lvl _num (ident,classes,kvs) tit elts) | lvl > slideLevel = do bs <- concat `fmap` mapM (elementToBeamer slideLevel) elts return $ Para ( RawInline "latex" "\\begin{block}{" : tit ++ [RawInline "latex" "}"] ) : bs ++ [RawBlock "latex" "\\end{block}"] | lvl < slideLevel = do bs <- concat `fmap` mapM (elementToBeamer slideLevel) elts return $ (Header lvl (ident,classes,kvs) tit) : bs | otherwise = do -- lvl == slideLevel -- note: [fragile] is required or verbatim breaks let hasCodeBlock (CodeBlock _ _) = [True] hasCodeBlock _ = [] let hasCode (Code _ _) = [True] hasCode _ = [] let fragile = "fragile" `elem` classes || not (null $ query hasCodeBlock elts ++ query hasCode elts) let frameoptions = ["allowdisplaybreaks", "allowframebreaks", "b", "c", "t", "environment", "label", "plain", "shrink", "standout"] let optionslist = ["fragile" | fragile] ++ [k | k <- classes, k `elem` frameoptions] ++ [k ++ "=" ++ v | (k,v) <- kvs, k `elem` frameoptions] let options = if null optionslist then "" else "[" ++ intercalate "," optionslist ++ "]" let slideStart = Para $ RawInline "latex" ("\\begin{frame}" ++ options) : if tit == [Str "\0"] -- marker for hrule then [] else (RawInline "latex" "{") : tit ++ [RawInline "latex" "}"] let slideEnd = RawBlock "latex" "\\end{frame}" -- now carve up slide into blocks if there are sections inside bs <- concat `fmap` mapM (elementToBeamer slideLevel) elts return $ slideStart : bs ++ [slideEnd] isListBlock :: Block -> Bool isListBlock (BulletList _) = True isListBlock (OrderedList _ _) = True isListBlock (DefinitionList _) = True isListBlock _ = False isLineBreakOrSpace :: Inline -> Bool isLineBreakOrSpace LineBreak = True isLineBreakOrSpace SoftBreak = True isLineBreakOrSpace Space = True isLineBreakOrSpace _ = False -- | Convert Pandoc block element to LaTeX. blockToLaTeX :: Block -- ^ Block to convert -> State WriterState Doc blockToLaTeX Null = return empty blockToLaTeX (Div (identifier,classes,kvs) bs) = do beamer <- writerBeamer `fmap` gets stOptions ref <- toLabel identifier let linkAnchor = if null identifier then empty 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@(ident, _, _) 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 footnotes = notesToLaTeX notes lab <- labelFor ident let caption = "\\caption" <> captForLof <> braces capt <> lab figure <- hypertarget ident (cr <> "\\begin{figure}" $$ "\\centering" $$ img $$ caption $$ "\\end{figure}" <> cr) return $ if inNote -- can't have figures in notes then "\\begin{center}" $$ img $+$ capt $$ "\\end{center}" else figure $$ footnotes -- . . . indicates pause in beamer slides blockToLaTeX (Para [Str ".",Space,Str ".",Space,Str "."]) = do beamer <- writerBeamer `fmap` gets stOptions if beamer then blockToLaTeX (RawBlock "latex" "\\pause") else inlineListToLaTeX [Str ".",Space,Str ".",Space,Str "."] blockToLaTeX (Para lst) = inlineListToLaTeX $ dropWhile isLineBreakOrSpace lst blockToLaTeX (LineBlock lns) = do blockToLaTeX $ linesToPara lns blockToLaTeX (BlockQuote lst) = do beamer <- writerBeamer `fmap` gets stOptions case lst of [b] | beamer && isListBlock b -> do oldIncremental <- gets stIncremental modify $ \s -> s{ stIncremental = not oldIncremental } result <- blockToLaTeX b modify $ \s -> s{ stIncremental = oldIncremental } return result _ -> do oldInQuote <- gets stInQuote modify (\s -> s{stInQuote = True}) contents <- blockListToLaTeX lst modify (\s -> s{stInQuote = oldInQuote}) return $ "\\begin{quote}" $$ contents $$ "\\end{quote}" blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do opts <- gets stOptions ref <- toLabel identifier let linkAnchor = if null identifier then empty else "\\hypertarget" <> braces (text ref) <> braces ("\\label" <> braces (text ref)) let lhsCodeBlock = do modify $ \s -> s{ stLHS = True } return $ flush (linkAnchor $$ "\\begin{code}" $$ text str $$ "\\end{code}") $$ cr let rawCodeBlock = do st <- get env <- if stInNote st then modify (\s -> s{ stVerbInNote = True }) >> return "Verbatim" else return "verbatim" return $ flush (linkAnchor $$ text ("\\begin{" ++ env ++ "}") $$ text str $$ text ("\\end{" ++ env ++ "}")) <> cr let listingsCodeBlock = do st <- get let params = if writerListings (stOptions st) then (case getListingsLanguage classes of Just l -> [ "language=" ++ mbBraced l ] Nothing -> []) ++ [ "numbers=left" | "numberLines" `elem` classes || "number" `elem` classes || "number-lines" `elem` classes ] ++ [ (if key == "startFrom" then "firstnumber" else key) ++ "=" ++ mbBraced attr | (key,attr) <- keyvalAttr ] ++ (if identifier == "" then [] else [ "label=" ++ ref ]) else [] mbBraced x = if not (all isAlphaNum x) then "{" <> x <> "}" else x printParams | null params = empty | otherwise = brackets $ hcat (intersperse ", " (map text params)) return $ flush ("\\begin{lstlisting}" <> printParams $$ text str $$ "\\end{lstlisting}") $$ cr let highlightedCodeBlock = case highlight formatLaTeXBlock ("",classes,keyvalAttr) str of Nothing -> rawCodeBlock Just h -> modify (\st -> st{ stHighlighting = True }) >> return (flush $ linkAnchor $$ text (T.unpack h)) case () of _ | isEnabled Ext_literate_haskell opts && "haskell" `elem` classes && "literate" `elem` classes -> lhsCodeBlock | writerListings opts -> listingsCodeBlock | writerHighlight opts && not (null classes) -> highlightedCodeBlock | otherwise -> rawCodeBlock blockToLaTeX (RawBlock f x) | f == Format "latex" || f == Format "tex" = return $ text x | otherwise = return empty blockToLaTeX (BulletList []) = return empty -- otherwise latex error blockToLaTeX (BulletList lst) = do incremental <- gets stIncremental beamer <- writerBeamer `fmap` gets stOptions let inc = if beamer && incremental then "[<+->]" else "" items <- mapM listItemToLaTeX lst let spacing = if isTightList lst then text "\\tightlist" else empty return $ text ("\\begin{itemize}" ++ inc) $$ spacing $$ vcat items $$ "\\end{itemize}" blockToLaTeX (OrderedList _ []) = return empty -- otherwise latex error blockToLaTeX (OrderedList (start, numstyle, numdelim) lst) = do st <- get let inc = if stIncremental st then "[<+->]" else "" let oldlevel = stOLLevel st put $ st {stOLLevel = oldlevel + 1} items <- mapM listItemToLaTeX lst modify (\s -> s {stOLLevel = oldlevel}) let tostyle x = case numstyle of Decimal -> "\\arabic" <> braces x UpperRoman -> "\\Roman" <> braces x LowerRoman -> "\\roman" <> braces x UpperAlpha -> "\\Alph" <> braces x LowerAlpha -> "\\alph" <> braces x Example -> "\\arabic" <> braces x DefaultStyle -> "\\arabic" <> braces x let todelim x = case numdelim of OneParen -> x <> ")" TwoParens -> parens x Period -> x <> "." _ -> x <> "." let enum = text $ "enum" ++ map toLower (toRomanNumeral oldlevel) let stylecommand = if numstyle == DefaultStyle && numdelim == DefaultDelim then empty else "\\def" <> "\\label" <> enum <> braces (todelim $ tostyle enum) let resetcounter = if start == 1 || oldlevel > 4 then empty else "\\setcounter" <> braces enum <> braces (text $ show $ start - 1) let spacing = if isTightList lst then text "\\tightlist" else empty return $ text ("\\begin{enumerate}" ++ inc) $$ stylecommand $$ resetcounter $$ spacing $$ vcat items $$ "\\end{enumerate}" blockToLaTeX (DefinitionList []) = return empty blockToLaTeX (DefinitionList lst) = do incremental <- gets stIncremental let inc = if incremental then "[<+->]" else "" items <- mapM defListItemToLaTeX lst let spacing = if all isTightList (map snd lst) then text "\\tightlist" else empty return $ text ("\\begin{description}" ++ inc) $$ spacing $$ vcat items $$ "\\end{description}" blockToLaTeX HorizontalRule = return $ "\\begin{center}\\rule{0.5\\linewidth}{\\linethickness}\\end{center}" blockToLaTeX (Header level (id',classes,_) lst) = do modify $ \s -> s{stInHeading = True} hdr <- sectionHeader ("unnumbered" `elem` classes) id' level lst modify $ \s -> s{stInHeading = False} return hdr blockToLaTeX (Table caption aligns widths heads rows) = do headers <- if all null heads then return empty else do contents <- (tableRowToLaTeX True aligns widths) heads return ("\\toprule" $$ contents $$ "\\midrule") let endhead = if all null heads then empty else text "\\endhead" let endfirsthead = if all null heads then empty else text "\\endfirsthead" captionText <- inlineListToLaTeX caption let capt = if isEmpty captionText then empty else text "\\caption" <> braces captionText <> "\\tabularnewline" $$ headers $$ endfirsthead rows' <- mapM (tableRowToLaTeX False aligns widths) rows let colDescriptors = text $ concat $ map toColDescriptor aligns modify $ \s -> s{ stTable = True } return $ "\\begin{longtable}[]" <> braces ("@{}" <> colDescriptors <> "@{}") -- the @{} removes extra space at beginning and end $$ capt $$ (if all null heads then "\\toprule" else empty) $$ headers $$ endhead $$ vcat rows' $$ "\\bottomrule" $$ "\\end{longtable}" toColDescriptor :: Alignment -> String toColDescriptor align = case align of AlignLeft -> "l" AlignRight -> "r" AlignCenter -> "c" AlignDefault -> "l" blockListToLaTeX :: [Block] -> State WriterState Doc blockListToLaTeX lst = vsep `fmap` mapM blockToLaTeX lst tableRowToLaTeX :: Bool -> [Alignment] -> [Double] -> [[Block]] -> State WriterState Doc tableRowToLaTeX header aligns widths cols = do -- scale factor compensates for extra space between columns -- so the whole table isn't larger than columnwidth let scaleFactor = 0.97 ** fromIntegral (length aligns) let isSimple [Plain _] = True isSimple [Para _] = True isSimple [] = True isSimple _ = False -- simple tables have to have simple cells: let widths' = if not (all isSimple cols) then replicate (length aligns) (0.97 / fromIntegral (length aligns)) else map (scaleFactor *) widths cells <- mapM (tableCellToLaTeX header) $ zip3 widths' aligns cols return $ hsep (intersperse "&" cells) <> "\\tabularnewline" -- For simple latex tables (without minipages or parboxes), -- we need to go to some lengths to get line breaks working: -- as LineBreak bs = \vtop{\hbox{\strut as}\hbox{\strut bs}}. fixLineBreaks :: Block -> Block fixLineBreaks (Para ils) = Para $ fixLineBreaks' ils fixLineBreaks (Plain ils) = Plain $ fixLineBreaks' ils fixLineBreaks x = x fixLineBreaks' :: [Inline] -> [Inline] fixLineBreaks' ils = case splitBy (== LineBreak) ils of [] -> [] [xs] -> xs chunks -> RawInline "tex" "\\vtop{" : concatMap tohbox chunks ++ [RawInline "tex" "}"] where tohbox ys = RawInline "tex" "\\hbox{\\strut " : ys ++ [RawInline "tex" "}"] -- We also change display math to inline math, since display -- math breaks in simple tables. displayMathToInline :: Inline -> Inline displayMathToInline (Math DisplayMath x) = Math InlineMath x displayMathToInline x = x tableCellToLaTeX :: Bool -> (Double, Alignment, [Block]) -> State WriterState Doc tableCellToLaTeX _ (0, _, blocks) = blockListToLaTeX $ walk fixLineBreaks $ walk displayMathToInline blocks tableCellToLaTeX header (width, align, blocks) = do modify $ \st -> st{ stInMinipage = True, stNotes = [] } cellContents <- blockListToLaTeX blocks notes <- gets stNotes modify $ \st -> st{ stInMinipage = False, stNotes = [] } let valign = text $ if header then "[b]" else "[t]" let halign = case align of AlignLeft -> "\\raggedright" AlignRight -> "\\raggedleft" AlignCenter -> "\\centering" AlignDefault -> "\\raggedright" return $ ("\\begin{minipage}" <> valign <> braces (text (printf "%.2f\\columnwidth" width)) <> (halign <> "\\strut" <> cr <> cellContents <> "\\strut" <> cr) <> "\\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) listItemToLaTeX :: [Block] -> State WriterState Doc listItemToLaTeX lst -- we need to put some text before a header if it's the first -- element in an item. This will look ugly in LaTeX regardless, but -- this will keep the typesetter from throwing an error. | ((Header _ _ _) :_) <- lst = blockListToLaTeX lst >>= return . (text "\\item ~" $$) . (nest 2) | otherwise = blockListToLaTeX lst >>= return . (text "\\item" $$) . (nest 2) defListItemToLaTeX :: ([Inline], [[Block]]) -> State WriterState Doc defListItemToLaTeX (term, defs) = do term' <- inlineListToLaTeX term -- put braces around term if it contains an internal link, -- since otherwise we get bad bracket interactions: \item[\hyperref[..] let isInternalLink (Link _ _ ('#':_,_)) = True isInternalLink _ = False let term'' = if any isInternalLink term then braces term' else term' def' <- liftM vsep $ mapM blockListToLaTeX defs return $ case defs of (((Header _ _ _) : _) : _) -> "\\item" <> brackets term'' <> " ~ " $$ def' _ -> "\\item" <> brackets term'' $$ def' -- | Craft the section header, inserting the secton reference, if supplied. sectionHeader :: Bool -- True for unnumbered -> [Char] -> Int -> [Inline] -> State WriterState Doc sectionHeader unnumbered ident level lst = do txt <- inlineListToLaTeX lst plain <- stringToLaTeX TextString $ concatMap stringify lst let removeInvalidInline (Note _) = [] removeInvalidInline (Span (id', _, _) _) | not (null id') = [] removeInvalidInline (Image _ _ _) = [] removeInvalidInline x = [x] let lstNoNotes = foldr (mappend . (\x -> walkM removeInvalidInline x)) mempty lst txtNoNotes <- inlineListToLaTeX lstNoNotes -- footnotes in sections don't work (except for starred variants) -- unless you specify an optional argument: -- \section[mysec]{mysec\footnote{blah}} optional <- if unnumbered || lstNoNotes == lst || lstNoNotes == [] then return empty else do return $ brackets txtNoNotes let contents = if render Nothing txt == plain then braces txt else braces (text "\\texorpdfstring" <> braces txt <> braces (text plain)) book <- gets stBook opts <- gets stOptions let topLevelDivision = if book && writerTopLevelDivision opts == TopLevelDefault then TopLevelChapter else writerTopLevelDivision opts let level' = if writerBeamer opts && topLevelDivision `elem` [TopLevelPart, TopLevelChapter] -- beamer has parts but no chapters then if level == 1 then -1 else level - 1 else case topLevelDivision of TopLevelPart -> level - 2 TopLevelChapter -> level - 1 TopLevelSection -> level TopLevelDefault -> level let sectionType = case level' of -1 -> "part" 0 -> "chapter" 1 -> "section" 2 -> "subsection" 3 -> "subsubsection" 4 -> "paragraph" 5 -> "subparagraph" _ -> "" inQuote <- gets stInQuote let prefix = if inQuote && level' >= 4 then text "\\mbox{}%" -- needed for \paragraph, \subparagraph in quote environment -- see http://tex.stackexchange.com/questions/169830/ else empty lab <- labelFor ident let star = if unnumbered && level' < 4 then text "*" else empty let stuffing = star <> optional <> contents stuffing' <- hypertarget ident $ text ('\\':sectionType) <> stuffing <> lab return $ if level' > 5 then txt else prefix $$ stuffing' $$ if unnumbered then "\\addcontentsline{toc}" <> braces (text sectionType) <> braces txtNoNotes else empty hypertarget :: String -> Doc -> State WriterState Doc hypertarget ident x = do ref <- text `fmap` toLabel ident internalLinks <- gets stInternalLinks return $ if ident `elem` internalLinks then text "\\hypertarget" <> braces ref <> braces x else x labelFor :: String -> State WriterState Doc labelFor "" = return empty labelFor ident = do ref <- text `fmap` toLabel ident return $ text "\\label" <> braces ref -- | Convert list of inline elements to LaTeX. inlineListToLaTeX :: [Inline] -- ^ Inlines to convert -> State WriterState Doc inlineListToLaTeX lst = mapM inlineToLaTeX (fixBreaks $ fixLineInitialSpaces lst) >>= return . hcat -- nonbreaking spaces (~) in LaTeX don't work after line breaks, -- so we turn nbsps after hard breaks to \hspace commands. -- this is mostly used in verse. where fixLineInitialSpaces [] = [] fixLineInitialSpaces (LineBreak : Str s@('\160':_) : xs) = LineBreak : fixNbsps s ++ fixLineInitialSpaces xs fixLineInitialSpaces (x:xs) = x : fixLineInitialSpaces xs fixNbsps s = let (ys,zs) = span (=='\160') s in replicate (length ys) hspace ++ [Str zs] hspace = RawInline "latex" "\\hspace*{0.333em}" -- linebreaks after blank lines cause problems: fixBreaks [] = [] fixBreaks ys@(LineBreak : LineBreak : _) = case span (== LineBreak) ys of (lbs, rest) -> RawInline "latex" ("\\\\[" ++ show (length lbs) ++ "\\baselineskip]") : fixBreaks rest fixBreaks (y:ys) = y : fixBreaks ys isQuoted :: Inline -> Bool isQuoted (Quoted _ _) = True isQuoted _ = False -- | Convert inline element to LaTeX inlineToLaTeX :: Inline -- ^ Inline to convert -> State WriterState Doc inlineToLaTeX (Span (id',classes,kvs) ils) = do ref <- toLabel id' let linkAnchor = if null id' then empty else "\\protect\\hypertarget" <> braces (text ref) <> braces empty let cmds = ["textup" | "csl-no-emph" `elem` classes] ++ ["textnormal" | "csl-no-strong" `elem` classes || "csl-no-smallcaps" `elem` classes] ++ ["RL" | ("dir", "rtl") `elem` kvs] ++ ["LR" | ("dir", "ltr") `elem` kvs] ++ (case lookup "lang" kvs of Just lng -> let (l, o) = toPolyglossia $ splitBy (=='-') lng ops = if null o then "" else ("[" ++ o ++ "]") in ["text" ++ l ++ ops] Nothing -> []) contents <- inlineListToLaTeX ils return $ linkAnchor <> if null cmds then braces contents else foldr inCmd contents cmds inlineToLaTeX (Emph lst) = inlineListToLaTeX lst >>= return . inCmd "emph" inlineToLaTeX (Strong lst) = inlineListToLaTeX lst >>= return . inCmd "textbf" inlineToLaTeX (Strikeout lst) = do -- we need to protect VERB in an mbox or we get an error -- see #1294 contents <- inlineListToLaTeX $ protectCode lst modify $ \s -> s{ stStrikeout = True } return $ inCmd "sout" contents inlineToLaTeX (Superscript lst) = inlineListToLaTeX lst >>= return . inCmd "textsuperscript" inlineToLaTeX (Subscript lst) = do inlineListToLaTeX lst >>= return . inCmd "textsubscript" inlineToLaTeX (SmallCaps lst) = inlineListToLaTeX lst >>= return . inCmd "textsc" inlineToLaTeX (Cite cits lst) = do st <- get let opts = stOptions st case writerCiteMethod opts of Natbib -> citationsToNatbib cits Biblatex -> citationsToBiblatex cits _ -> inlineListToLaTeX lst inlineToLaTeX (Code (_,classes,_) str) = do opts <- gets stOptions inHeading <- gets stInHeading case () of _ | writerListings opts && not inHeading -> listingsCode | writerHighlight opts && not (null classes) -> highlightCode | otherwise -> rawCode where listingsCode = do inNote <- gets stInNote when inNote $ modify $ \s -> s{ stVerbInNote = True } let chr = case "!\"&'()*,-./:;?@_" \\ str of (c:_) -> c [] -> '!' return $ text $ "\\lstinline" ++ [chr] ++ str ++ [chr] highlightCode = do case highlight formatLaTeXInline ("",classes,[]) str of Nothing -> rawCode Just h -> modify (\st -> st{ stHighlighting = True }) >> return (text (T.unpack h)) rawCode = liftM (text . (\s -> "\\texttt{" ++ escapeSpaces s ++ "}")) $ stringToLaTeX CodeString str where escapeSpaces = concatMap (\c -> if c == ' ' then "\\ " else [c]) inlineToLaTeX (Quoted qt lst) = do contents <- inlineListToLaTeX lst csquotes <- liftM stCsquotes get opts <- gets stOptions if csquotes then return $ "\\enquote" <> braces contents else do let s1 = if (not (null lst)) && (isQuoted (head lst)) then "\\," else empty let s2 = if (not (null lst)) && (isQuoted (last lst)) then "\\," else empty let inner = s1 <> contents <> s2 return $ case qt of DoubleQuote -> if writerTeXLigatures opts then text "``" <> inner <> text "''" else char '\x201C' <> inner <> char '\x201D' SingleQuote -> if writerTeXLigatures opts then char '`' <> inner <> char '\'' else char '\x2018' <> inner <> char '\x2019' inlineToLaTeX (Str str) = liftM text $ stringToLaTeX TextString str inlineToLaTeX (Math InlineMath str) = return $ "\\(" <> text str <> "\\)" inlineToLaTeX (Math DisplayMath str) = return $ "\\[" <> text str <> "\\]" inlineToLaTeX (RawInline f str) | f == Format "latex" || f == Format "tex" = return $ text str | otherwise = return empty inlineToLaTeX (LineBreak) = return $ "\\\\" <> cr inlineToLaTeX SoftBreak = do wrapText <- gets (writerWrapText . stOptions) case wrapText of WrapAuto -> return space WrapNone -> return space WrapPreserve -> return cr inlineToLaTeX Space = return space inlineToLaTeX (Link _ txt ('#':ident, _)) = do contents <- inlineListToLaTeX txt lab <- toLabel ident 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 (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 (escapeURI src) contents <- inlineListToLaTeX txt return $ "\\href" <> braces (text src') <> braces ("\\nolinkurl" <> braces contents) _ -> do contents <- inlineListToLaTeX txt src' <- stringToLaTeX URLString (escapeURI src) return $ text ("\\href{" ++ src' ++ "}{") <> contents <> char '}' inlineToLaTeX (Image attr _ (source, _)) = do modify $ \s -> s{ stGraphics = True } opts <- gets stOptions let showDim dir = let d = text (show dir) <> "=" in case (dimension dir attr) of Just (Pixel a) -> [d <> text (showInInch opts (Pixel a)) <> "in"] Just (Percent a) -> [d <> text (showFl (a / 100)) <> "\\textwidth"] Just dim -> [d <> text (show dim)] Nothing -> [] dimList = showDim Width ++ showDim Height dims = if null dimList then empty else brackets $ cat (intersperse "," dimList) source' = if isURI source then source else unEscapeString source source'' <- stringToLaTeX URLString source' inHeading <- gets stInHeading return $ (if inHeading then "\\protect\\includegraphics" else "\\includegraphics") <> dims <> braces (text source'') inlineToLaTeX (Note contents) = do inMinipage <- gets stInMinipage modify (\s -> s{stInNote = True}) contents' <- blockListToLaTeX contents modify (\s -> s {stInNote = False}) let optnl = case reverse contents of (CodeBlock _ _ : _) -> cr _ -> empty let noteContents = nest 2 contents' <> optnl opts <- gets stOptions -- in beamer slides, display footnote from current overlay forward let beamerMark = if writerBeamer opts then text "<.->" else empty modify $ \st -> st{ stNotes = noteContents : stNotes st } return $ if inMinipage then "\\footnotemark{}" -- note: a \n before } needed when note ends with a Verbatim environment else "\\footnote" <> beamerMark <> braces noteContents protectCode :: [Inline] -> [Inline] protectCode [] = [] protectCode (x@(Code ("",[],[]) _) : xs) = x : protectCode xs protectCode (x@(Code _ _) : xs) = ltx "\\mbox{" : x : ltx "}" : xs where ltx = RawInline (Format "latex") protectCode (x : xs) = x : protectCode xs citationsToNatbib :: [Citation] -> State WriterState Doc citationsToNatbib (one:[]) = citeCommand c p s k where Citation { citationId = k , citationPrefix = p , citationSuffix = s , citationMode = m } = one c = case m of AuthorInText -> "citet" SuppressAuthor -> "citeyearpar" NormalCitation -> "citep" citationsToNatbib cits | noPrefix (tail cits) && noSuffix (init cits) && ismode NormalCitation cits = citeCommand "citep" p s ks where noPrefix = all (null . citationPrefix) noSuffix = all (null . citationSuffix) ismode m = all (((==) m) . citationMode) p = citationPrefix $ head $ cits s = citationSuffix $ last $ cits ks = intercalate ", " $ map citationId cits citationsToNatbib (c:cs) | citationMode c == AuthorInText = do author <- citeCommand "citeauthor" [] [] (citationId c) cits <- citationsToNatbib (c { citationMode = SuppressAuthor } : cs) return $ author <+> cits citationsToNatbib cits = do cits' <- mapM convertOne cits return $ text "\\citetext{" <> foldl' combineTwo empty cits' <> text "}" where combineTwo a b | isEmpty a = b | otherwise = a <> text "; " <> b convertOne Citation { citationId = k , citationPrefix = p , citationSuffix = s , citationMode = m } = case m of AuthorInText -> citeCommand "citealt" p s k SuppressAuthor -> citeCommand "citeyear" p s k NormalCitation -> citeCommand "citealp" p s k citeCommand :: String -> [Inline] -> [Inline] -> String -> State WriterState Doc citeCommand c p s k = do args <- citeArguments p s k return $ text ("\\" ++ c) <> args citeArguments :: [Inline] -> [Inline] -> String -> State WriterState Doc citeArguments p s k = do let s' = case s of (Str (x:[]) : r) | isPunctuation x -> dropWhile (== Space) r (Str (x:xs) : r) | isPunctuation x -> Str xs : r _ -> s pdoc <- inlineListToLaTeX p sdoc <- inlineListToLaTeX s' let optargs = case (isEmpty pdoc, isEmpty sdoc) of (True, True ) -> empty (True, False) -> brackets sdoc (_ , _ ) -> brackets pdoc <> brackets sdoc return $ optargs <> braces (text k) citationsToBiblatex :: [Citation] -> State WriterState Doc citationsToBiblatex (one:[]) = citeCommand cmd p s k where Citation { citationId = k , citationPrefix = p , citationSuffix = s , citationMode = m } = one cmd = case m of SuppressAuthor -> "autocite*" AuthorInText -> "textcite" NormalCitation -> "autocite" citationsToBiblatex (c:cs) = do args <- mapM convertOne (c:cs) return $ text cmd <> foldl' (<>) empty args where cmd = case citationMode c of SuppressAuthor -> "\\autocites*" AuthorInText -> "\\textcites" NormalCitation -> "\\autocites" convertOne Citation { citationId = k , citationPrefix = p , citationSuffix = s } = citeArguments p s k citationsToBiblatex _ = return empty -- Determine listings language from list of class attributes. 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.ctan.org/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 ("la":"x":"classic":_) = ("latin", "variant=classic") 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.ctan.org/macros/latex/required/babel/base/babel.pdf -- List of supported languages (slightly outdated): -- http://tug.ctan.org/language/hyph-utf8/doc/generic/hyph-utf8/hyphenation.pdf toBabel :: [String] -> String toBabel ("de":"1901":_) = "german" toBabel ("de":"AT":"1901":_) = "austrian" toBabel ("de":"AT":_) = "naustrian" toBabel ("de":"CH":"1901":_) = "swissgerman" toBabel ("de":"CH":_) = "nswissgerman" 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 ("la":"x":"classic":_) = "classiclatin" 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":_) = "brazil" -- Note: documentation says "brazilian" works too, but it doesn't seem to work -- on some systems. See #2953. commonFromBcp47 ("sr":"Cyrl":_) = "serbianc" commonFromBcp47 ("zh":"Latn":"pinyin":_) = "pinyin" commonFromBcp47 x = fromIso $ head x where fromIso "af" = "afrikaans" fromIso "am" = "amharic" fromIso "ar" = "arabic" fromIso "as" = "assamese" fromIso "ast" = "asturian" fromIso "bg" = "bulgarian" fromIso "bn" = "bengali" fromIso "bo" = "tibetan" fromIso "br" = "breton" fromIso "ca" = "catalan" fromIso "cy" = "welsh" fromIso "cs" = "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 "gez" = "ethiopic" fromIso "gl" = "galician" fromIso "he" = "hebrew" fromIso "hi" = "hindi" fromIso "hr" = "croatian" fromIso "hu" = "magyar" fromIso "hy" = "armenian" fromIso "ia" = "interlingua" fromIso "id" = "indonesian" fromIso "ie" = "interlingua" fromIso "is" = "icelandic" fromIso "it" = "italian" fromIso "jp" = "japanese" fromIso "km" = "khmer" fromIso "kmr" = "kurmanji" 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 "pa" = "panjabi" 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 "ti" = "ethiopic" 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 pDocumentOptions :: P.Parsec String () [String] pDocumentOptions = do P.char '[' opts <- P.sepBy (P.many $ P.spaces *> P.noneOf (" ,]" :: String) <* P.spaces) (P.char ',') P.char ']' return opts pDocumentClass :: P.Parsec String () String pDocumentClass = do P.skipMany (P.satisfy (/='\\')) P.string "\\documentclass" classOptions <- pDocumentOptions <|> return [] if ("article" :: String) `elem` classOptions then return "article" else do P.skipMany (P.satisfy (/='{')) P.char '{' P.manyTill P.letter (P.char '}') pandoc-1.19.2.4/src/Text/Pandoc/Writers/ConTeXt.hs0000644000000000000000000005012613155240142017637 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2007-2015 John MacFarlane 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.Writers.ConTeXt Copyright : Copyright (C) 2007-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' format into ConTeXt. -} module Text.Pandoc.Writers.ConTeXt ( writeConTeXt ) where import Text.Pandoc.Definition import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Options import Text.Pandoc.Walk (query) import Text.Printf ( printf ) import Data.List ( intercalate, intersperse ) import Data.Char ( ord ) import Data.Maybe ( catMaybes ) import Control.Monad.State import Text.Pandoc.Pretty import Text.Pandoc.ImageSize import Text.Pandoc.Templates ( renderTemplate' ) import Network.URI ( isURI, unEscapeString ) data WriterState = WriterState { stNextRef :: Int -- number of next URL reference , stOrderedListLevel :: Int -- level of ordered list , stOptions :: WriterOptions -- writer options } orderedListStyles :: [Char] orderedListStyles = cycle "narg" -- | Convert Pandoc to ConTeXt. writeConTeXt :: WriterOptions -> Pandoc -> String writeConTeXt options document = let defaultWriterState = WriterState { stNextRef = 1 , stOrderedListLevel = 0 , stOptions = options } in evalState (pandocToConTeXt options document) defaultWriterState pandocToConTeXt :: WriterOptions -> Pandoc -> State WriterState String pandocToConTeXt options (Pandoc meta blocks) = do let colwidth = if writerWrapText options == WrapAuto then Just $ writerColumns options else Nothing metadata <- metaToJSON options (fmap (render colwidth) . blockListToConTeXt) (fmap (render colwidth) . inlineListToConTeXt) meta body <- mapM (elementToConTeXt options) $ hierarchicalize blocks let main = (render colwidth . vcat) body let layoutFromMargins = intercalate [','] $ catMaybes $ map (\(x,y) -> ((x ++ "=") ++) <$> getField y metadata) [("leftmargin","margin-left") ,("rightmargin","margin-right") ,("top","margin-top") ,("bottom","margin-bottom") ] let context = defField "toc" (writerTableOfContents options) $ defField "placelist" (intercalate ("," :: String) $ take (writerTOCDepth options + case writerTopLevelDivision options of TopLevelPart -> 0 TopLevelChapter -> 0 _ -> 1) ["chapter","section","subsection","subsubsection", "subsubsubsection","subsubsubsubsection"]) $ defField "body" main $ defField "layout" layoutFromMargins $ defField "number-sections" (writerNumberSections options) $ metadata let context' = defField "context-lang" (maybe "" (fromBcp47 . splitBy (=='-')) $ getField "lang" context) $ defField "context-dir" (toContextDir $ getField "dir" context) $ context return $ case writerTemplate options of Nothing -> main Just tpl -> renderTemplate' tpl 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 case ch of '{' -> "\\{" '}' -> "\\}" '\\' -> "\\letterbackslash{}" '$' -> "\\$" '|' -> "\\letterbar{}" '%' -> "\\letterpercent{}" '~' -> "\\lettertilde{}" '#' -> "\\#" '[' -> "{[}" ']' -> "{]}" '\160' -> "~" '\x2014' | ligatures -> "---" '\x2013' | ligatures -> "--" '\x2019' | ligatures -> "'" '\x2026' -> "\\ldots{}" x -> [x] -- | Escape string for ConTeXt stringToConTeXt :: WriterOptions -> String -> String stringToConTeXt opts = concatMap (escapeCharForConTeXt opts) -- | Sanitize labels toLabel :: String -> String toLabel z = concatMap go z where go x | elem x ("\\#[]\",{}%()|=" :: String) = "ux" ++ printf "%x" (ord x) | otherwise = [x] -- | Convert Elements to ConTeXt elementToConTeXt :: WriterOptions -> Element -> State WriterState Doc elementToConTeXt _ (Blk block) = blockToConTeXt block elementToConTeXt opts (Sec level _ attr title' elements) = do header' <- sectionHeader attr level title' innerContents <- mapM (elementToConTeXt opts) elements return $ vcat (header' : innerContents) -- | Convert Pandoc block element to ConTeXt. blockToConTeXt :: Block -> State WriterState Doc blockToConTeXt Null = return empty blockToConTeXt (Plain lst) = inlineListToConTeXt lst -- title beginning with fig: indicates that the image is a figure blockToConTeXt (Para [Image attr txt (src,'f':'i':'g':':':_)]) = do capt <- inlineListToConTeXt txt img <- inlineToConTeXt (Image attr txt (src, "")) let (ident, _, _) = attr label = if null ident then empty else "[]" <> brackets (text $ toLabel ident) return $ blankline $$ "\\placefigure" <> label <> braces capt <> img <> blankline blockToConTeXt (Para lst) = do contents <- inlineListToConTeXt lst return $ contents <> blankline blockToConTeXt (LineBlock lns) = do doclines <- nowrap . vcat <$> mapM inlineListToConTeXt lns return $ "\\startlines" $$ doclines $$ "\\stoplines" <> blankline blockToConTeXt (BlockQuote lst) = do contents <- blockListToConTeXt lst return $ "\\startblockquote" $$ nest 0 contents $$ "\\stopblockquote" <> blankline blockToConTeXt (CodeBlock _ str) = return $ flush ("\\starttyping" <> cr <> text str <> cr <> "\\stoptyping") $$ blankline -- 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,_,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 then brackets "packed" else empty) $$ vcat contents $$ text "\\stopitemize" <> blankline blockToConTeXt (OrderedList (start, style', delim) lst) = do st <- get let level = stOrderedListLevel st put $ st {stOrderedListLevel = level + 1} contents <- mapM listItemToConTeXt lst put $ st {stOrderedListLevel = level} let start' = if start == 1 then "" else "start=" ++ show start let delim' = case delim of DefaultDelim -> "" Period -> "stopper=." OneParen -> "stopper=)" TwoParens -> "left=(,stopper=)" let width = maximum $ map length $ take (length contents) (orderedListMarkers (start, style', delim)) let width' = (toEnum width + 1) / 2 let width'' = if width' > (1.5 :: Double) then "width=" ++ show width' ++ "em" else "" let specs2Items = filter (not . null) [start', delim', width''] let specs2 = if null specs2Items then "" else "[" ++ intercalate "," specs2Items ++ "]" let style'' = '[': (case style' of DefaultStyle -> orderedListStyles !! level Decimal -> 'n' Example -> 'n' LowerRoman -> 'r' UpperRoman -> 'R' LowerAlpha -> 'a' UpperAlpha -> 'A') : if isTightList lst then ",packed]" else "]" let specs = style'' ++ specs2 return $ "\\startitemize" <> text specs $$ vcat contents $$ "\\stopitemize" <> blankline blockToConTeXt (DefinitionList lst) = liftM vcat $ mapM defListItemToConTeXt lst blockToConTeXt HorizontalRule = return $ "\\thinrule" <> blankline -- If this is ever executed, provide a default for the reference identifier. blockToConTeXt (Header level attr lst) = sectionHeader attr level lst blockToConTeXt (Table caption aligns widths heads rows) = do let colDescriptor colWidth alignment = (case alignment of AlignLeft -> 'l' AlignRight -> 'r' AlignCenter -> 'c' AlignDefault -> 'l'): if colWidth == 0 then "|" else ("p(" ++ printf "%.2f" colWidth ++ "\\textwidth)|") let colDescriptors = "|" ++ (concat $ zipWith colDescriptor widths aligns) headers <- if all null heads then return empty else liftM ($$ "\\HL") $ tableRowToConTeXt heads captionText <- inlineListToConTeXt caption rows' <- mapM tableRowToConTeXt rows return $ "\\placetable" <> (if null caption then brackets "none" else empty) <> braces captionText $$ "\\starttable" <> brackets (text colDescriptors) $$ "\\HL" $$ headers $$ vcat rows' $$ "\\HL" $$ "\\stoptable" <> blankline tableRowToConTeXt :: [[Block]] -> State WriterState Doc tableRowToConTeXt cols = do cols' <- mapM blockListToConTeXt cols return $ (vcat (map ("\\NC " <>) cols')) $$ "\\NC\\AR" listItemToConTeXt :: [Block] -> State WriterState Doc listItemToConTeXt list = blockListToConTeXt list >>= return . ("\\item" $$) . (nest 2) defListItemToConTeXt :: ([Inline], [[Block]]) -> State WriterState Doc defListItemToConTeXt (term, defs) = do term' <- inlineListToConTeXt term def' <- liftM vsep $ mapM blockListToConTeXt defs return $ "\\startdescription" <> braces term' $$ nest 2 def' $$ "\\stopdescription" <> blankline -- | Convert list of block elements to ConTeXt. blockListToConTeXt :: [Block] -> State WriterState Doc blockListToConTeXt lst = liftM vcat $ mapM blockToConTeXt lst -- | Convert list of inline elements to ConTeXt. inlineListToConTeXt :: [Inline] -- ^ Inlines to convert -> State WriterState Doc inlineListToConTeXt lst = liftM hcat $ mapM inlineToConTeXt $ addStruts lst -- We add a \strut after a line break that precedes a space, -- or the space gets swallowed where addStruts (LineBreak : s : xs) | isSpacey s = LineBreak : RawInline (Format "context") "\\strut " : s : addStruts xs addStruts (x:xs) = x : addStruts xs addStruts [] = [] isSpacey Space = True isSpacey (Str ('\160':_)) = True isSpacey _ = False -- | Convert inline element to ConTeXt inlineToConTeXt :: Inline -- ^ Inline to convert -> State WriterState Doc inlineToConTeXt (Emph lst) = do contents <- inlineListToConTeXt lst return $ braces $ "\\em " <> contents inlineToConTeXt (Strong lst) = do contents <- inlineListToConTeXt lst return $ braces $ "\\bf " <> contents inlineToConTeXt (Strikeout lst) = do contents <- inlineListToConTeXt lst return $ "\\overstrikes" <> braces contents inlineToConTeXt (Superscript lst) = do contents <- inlineListToConTeXt lst return $ "\\high" <> braces contents inlineToConTeXt (Subscript lst) = do contents <- inlineListToConTeXt lst return $ "\\low" <> braces contents inlineToConTeXt (SmallCaps lst) = do contents <- inlineListToConTeXt lst return $ braces $ "\\sc " <> contents inlineToConTeXt (Code _ str) | not ('{' `elem` str || '}' `elem` str) = return $ "\\type" <> braces (text str) inlineToConTeXt (Code _ str) = do opts <- gets stOptions return $ "\\mono" <> braces (text $ stringToConTeXt opts str) inlineToConTeXt (Quoted SingleQuote lst) = do contents <- inlineListToConTeXt lst return $ "\\quote" <> braces contents inlineToConTeXt (Quoted DoubleQuote lst) = do contents <- inlineListToConTeXt lst return $ "\\quotation" <> braces contents inlineToConTeXt (Cite _ lst) = inlineListToConTeXt lst inlineToConTeXt (Str str) = do opts <- gets stOptions return $ text $ stringToConTeXt opts str inlineToConTeXt (Math InlineMath str) = return $ char '$' <> text str <> char '$' inlineToConTeXt (Math DisplayMath str) = return $ text "\\startformula " <> text str <> text " \\stopformula" <> space inlineToConTeXt (RawInline "context" str) = return $ text str inlineToConTeXt (RawInline "tex" str) = return $ text str inlineToConTeXt (RawInline _ _) = return empty inlineToConTeXt (LineBreak) = return $ text "\\crlf" <> cr inlineToConTeXt SoftBreak = do wrapText <- gets (writerWrapText . stOptions) return $ case wrapText of WrapAuto -> space WrapNone -> space WrapPreserve -> cr inlineToConTeXt Space = return space -- Handle HTML-like internal document references to sections inlineToConTeXt (Link _ txt (('#' : ref), _)) = do opts <- gets stOptions contents <- inlineListToConTeXt txt let ref' = toLabel $ stringToConTeXt opts ref return $ text "\\goto" <> braces contents <> brackets (text ref') inlineToConTeXt (Link _ txt (src, _)) = do let isAutolink = txt == [Str (unEscapeString src)] st <- get let next = stNextRef st put $ st {stNextRef = next + 1} let ref = "url" ++ show next contents <- inlineListToConTeXt txt return $ "\\useURL" <> brackets (text ref) <> brackets (text $ escapeStringUsing [('#',"\\#"),('%',"\\%")] src) <> (if isAutolink then empty else brackets empty <> brackets contents) <> "\\from" <> brackets (text ref) inlineToConTeXt (Image attr@(_,cls,_) _ (src, _)) = do opts <- gets stOptions let showDim dir = let d = text (show dir) <> "=" in case (dimension dir attr) of Just (Pixel a) -> [d <> text (showInInch opts (Pixel a)) <> "in"] Just (Percent a) -> [d <> text (showFl (a / 100)) <> "\\textwidth"] Just dim -> [d <> text (show dim)] Nothing -> [] dimList = showDim Width ++ showDim Height dims = if null dimList then empty else brackets $ cat (intersperse "," dimList) clas = if null cls then empty else brackets $ text $ toLabel $ head cls src' = if isURI src then src else unEscapeString src return $ braces $ "\\externalfigure" <> brackets (text src') <> dims <> clas inlineToConTeXt (Note contents) = do contents' <- blockListToConTeXt contents let codeBlock x@(CodeBlock _ _) = [x] codeBlock _ = [] let codeBlocks = query codeBlock contents return $ if null codeBlocks then text "\\footnote{" <> nest 2 contents' <> char '}' else text "\\startbuffer " <> nest 2 contents' <> text "\\stopbuffer\\footnote{\\getbuffer}" 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 section reference, if supplied. sectionHeader :: Attr -> Int -> [Inline] -> State WriterState Doc sectionHeader (ident,classes,_) hdrLevel lst = do contents <- inlineListToConTeXt lst st <- get let opts = stOptions st let level' = case writerTopLevelDivision opts of TopLevelPart -> hdrLevel - 2 TopLevelChapter -> hdrLevel - 1 TopLevelSection -> hdrLevel TopLevelDefault -> hdrLevel let ident' = toLabel ident let (section, chapter) = if "unnumbered" `elem` classes then (text "subject", text "title") else (text "section", text "chapter") return $ case level' of -1 -> text "\\part" <> braces contents 0 -> char '\\' <> chapter <> braces contents n | n >= 1 && n <= 5 -> char '\\' <> text (concat (replicate (n - 1) "sub")) <> section <> (if (not . null) ident' then brackets (text ident') else empty) <> braces contents <> blankline _ -> 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 "el" = "gr" fromIso "eu" = "ba" fromIso "he" = "il" fromIso "jp" = "ja" fromIso "uk" = "ua" fromIso "vi" = "vn" fromIso "zh" = "cn" fromIso l = l pandoc-1.19.2.4/src/Text/Pandoc/Writers/OpenDocument.hs0000644000000000000000000006676113155240142020727 0ustar0000000000000000{-# LANGUAGE PatternGuards, OverloadedStrings, FlexibleContexts #-} {- Copyright (C) 2008-2015 Andrea Rossato and John MacFarlane. 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.Writers.OpenDocument Copyright : Copyright (C) 2008-2015 Andrea Rossato and John MacFarlane License : GNU GPL, version 2 or above Maintainer : Andrea Rossato Stability : alpha Portability : portable Conversion of 'Pandoc' documents to OpenDocument XML. -} module Text.Pandoc.Writers.OpenDocument ( writeOpenDocument ) where import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.XML import Text.Pandoc.Shared (linesToPara) import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.Readers.TeXMath import Text.Pandoc.Pretty import Text.Printf ( printf ) import Control.Arrow ( (***), (>>>) ) import Control.Monad.State hiding ( when ) import Data.Char (chr) import qualified Data.Set as Set import qualified Data.Map as Map import Text.Pandoc.Writers.Shared import Data.List (sortBy) import Data.Ord (comparing) -- | Auxiliary function to convert Plain block to Para. plainToPara :: Block -> Block plainToPara (Plain x) = Para x plainToPara x = x -- -- OpenDocument writer -- data WriterState = WriterState { stNotes :: [Doc] , stTableStyles :: [Doc] , stParaStyles :: [Doc] , stListStyles :: [(Int, [Doc])] , stTextStyles :: Map.Map (Set.Set TextStyle) (String, Doc) , stTextStyleAttr :: Set.Set TextStyle , stIndentPara :: Int , stInDefinition :: Bool , stTight :: Bool , stFirstPara :: Bool , stImageId :: Int } defaultWriterState :: WriterState defaultWriterState = WriterState { stNotes = [] , stTableStyles = [] , stParaStyles = [] , stListStyles = [] , stTextStyles = Map.empty , stTextStyleAttr = Set.empty , stIndentPara = 0 , stInDefinition = False , stTight = False , stFirstPara = False , stImageId = 1 } when :: Bool -> Doc -> Doc when p a = if p then a else empty addTableStyle :: Doc -> State WriterState () addTableStyle i = modify $ \s -> s { stTableStyles = i : stTableStyles s } addNote :: Doc -> State WriterState () addNote i = modify $ \s -> s { stNotes = i : stNotes s } addParaStyle :: Doc -> State WriterState () addParaStyle i = modify $ \s -> s { stParaStyles = i : stParaStyles s } addTextStyle :: Set.Set TextStyle -> (String, Doc) -> State WriterState () addTextStyle attrs i = modify $ \s -> s { stTextStyles = Map.insert attrs i (stTextStyles s) } addTextStyleAttr :: TextStyle -> State WriterState () addTextStyleAttr t = modify $ \s -> s { stTextStyleAttr = Set.insert t (stTextStyleAttr s) } increaseIndent :: State WriterState () increaseIndent = modify $ \s -> s { stIndentPara = 1 + stIndentPara s } resetIndent :: State WriterState () resetIndent = modify $ \s -> s { stIndentPara = (stIndentPara s) - 1 } inTightList :: State WriterState a -> State WriterState a inTightList f = modify (\s -> s { stTight = True }) >> f >>= \r -> modify (\s -> s { stTight = False }) >> return r setInDefinitionList :: Bool -> State WriterState () setInDefinitionList b = modify $ \s -> s { stInDefinition = b } setFirstPara :: State WriterState () setFirstPara = modify $ \s -> s { stFirstPara = True } inParagraphTags :: Doc -> State WriterState Doc inParagraphTags d | isEmpty d = return empty inParagraphTags d = do b <- gets stFirstPara a <- if b then do modify $ \st -> st { stFirstPara = False } return $ [("text:style-name", "First_20_paragraph")] else return [("text:style-name", "Text_20_body")] return $ inTags False "text:p" a d inParagraphTagsWithStyle :: String -> Doc -> Doc inParagraphTagsWithStyle sty = inTags False "text:p" [("text:style-name", sty)] inSpanTags :: String -> Doc -> Doc inSpanTags s = inTags False "text:span" [("text:style-name",s)] withTextStyle :: TextStyle -> State WriterState a -> State WriterState a withTextStyle s f = do oldTextStyleAttr <- gets stTextStyleAttr addTextStyleAttr s res <- f modify $ \st -> st{ stTextStyleAttr = oldTextStyleAttr } return res inTextStyle :: Doc -> State WriterState Doc inTextStyle d = do at <- gets stTextStyleAttr if Set.null at then return d else do styles <- gets stTextStyles case Map.lookup at styles of Just (styleName, _) -> return $ inTags False "text:span" [("text:style-name",styleName)] d Nothing -> do let styleName = "T" ++ show (Map.size styles + 1) addTextStyle at (styleName, inTags False "style:style" [("style:name", styleName) ,("style:family", "text")] $ selfClosingTag "style:text-properties" (concatMap textStyleAttr (Set.toList at))) return $ inTags False "text:span" [("text:style-name",styleName)] d inHeaderTags :: Int -> Doc -> State WriterState Doc inHeaderTags i d = return $ inTags False "text:h" [ ("text:style-name", "Heading_20_" ++ show i) , ("text:outline-level", show i)] d inQuotes :: QuoteType -> Doc -> Doc inQuotes SingleQuote s = char '\8216' <> s <> char '\8217' inQuotes DoubleQuote s = char '\8220' <> s <> char '\8221' handleSpaces :: String -> Doc handleSpaces s | ( ' ':_) <- s = genTag s | ('\t':x) <- s = selfClosingTag "text:tab" [] <> rm x | otherwise = rm s where genTag = span (==' ') >>> tag . length *** rm >>> uncurry (<>) tag n = when (n /= 0) $ selfClosingTag "text:s" [("text:c", show n)] rm ( ' ':xs) = char ' ' <> genTag xs rm ('\t':xs) = selfClosingTag "text:tab" [] <> genTag xs rm ( x:xs) = char x <> rm xs rm [] = empty -- | Convert Pandoc document to string in OpenDocument format. writeOpenDocument :: WriterOptions -> Pandoc -> String writeOpenDocument opts (Pandoc meta blocks) = let colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing render' = render colwidth ((body, metadata),s) = flip runState defaultWriterState $ do m <- metaToJSON opts (fmap (render colwidth) . blocksToOpenDocument opts) (fmap (render colwidth) . inlinesToOpenDocument opts) meta b <- render' `fmap` blocksToOpenDocument opts blocks return (b, m) styles = stTableStyles s ++ stParaStyles s ++ map snd (reverse $ sortBy (comparing fst) $ Map.elems (stTextStyles s)) listStyle (n,l) = inTags True "text:list-style" [("style:name", "L" ++ show n)] (vcat l) listStyles = map listStyle (stListStyles s) automaticStyles = vcat $ reverse $ styles ++ listStyles context = defField "body" body $ defField "automatic-styles" (render' automaticStyles) $ metadata in case writerTemplate opts of Nothing -> body Just tpl -> renderTemplate' tpl context withParagraphStyle :: WriterOptions -> String -> [Block] -> State WriterState Doc withParagraphStyle o s (b:bs) | Para l <- b = go =<< inParagraphTagsWithStyle s <$> inlinesToOpenDocument o l | otherwise = go =<< blockToOpenDocument o b where go i = (<>) i <$> withParagraphStyle o s bs withParagraphStyle _ _ [] = return empty inPreformattedTags :: String -> State WriterState Doc inPreformattedTags s = do n <- paraStyle [("style:parent-style-name","Preformatted_20_Text")] return . inParagraphTagsWithStyle ("P" ++ show n) . handleSpaces $ s orderedListToOpenDocument :: WriterOptions -> Int -> [[Block]] -> State WriterState Doc orderedListToOpenDocument o pn bs = vcat . map (inTagsIndented "text:list-item") <$> mapM (orderedItemToOpenDocument o pn . map plainToPara) bs orderedItemToOpenDocument :: WriterOptions -> Int -> [Block] -> State WriterState Doc orderedItemToOpenDocument o n (b:bs) | OrderedList a l <- b = newLevel a l | Para l <- b = go =<< inParagraphTagsWithStyle ("P" ++ show n) <$> inlinesToOpenDocument o l | otherwise = go =<< blockToOpenDocument o b where go i = ($$) i <$> orderedItemToOpenDocument o n bs newLevel a l = do nn <- length <$> gets stParaStyles ls <- head <$> gets stListStyles modify $ \s -> s { stListStyles = orderedListLevelStyle a ls : tail (stListStyles s) } inTagsIndented "text:list" <$> orderedListToOpenDocument o nn l orderedItemToOpenDocument _ _ [] = return empty isTightList :: [[Block]] -> Bool isTightList [] = False isTightList (b:_) | Plain {} : _ <- b = True | otherwise = False newOrderedListStyle :: Bool -> ListAttributes -> State WriterState (Int,Int) newOrderedListStyle b a = do ln <- (+) 1 . length <$> gets stListStyles let nbs = orderedListLevelStyle a (ln, []) pn <- if b then inTightList (paraListStyle ln) else paraListStyle ln modify $ \s -> s { stListStyles = nbs : stListStyles s } return (ln,pn) bulletListToOpenDocument :: WriterOptions -> [[Block]] -> State WriterState Doc bulletListToOpenDocument o b = do ln <- (+) 1 . length <$> gets stListStyles (pn,ns) <- if isTightList b then inTightList (bulletListStyle ln) else bulletListStyle ln modify $ \s -> s { stListStyles = ns : stListStyles s } is <- listItemsToOpenDocument ("P" ++ show pn) o b return $ inTags True "text:list" [("text:style-name", "L" ++ show ln)] is listItemsToOpenDocument :: String -> WriterOptions -> [[Block]] -> State WriterState Doc listItemsToOpenDocument s o is = vcat . map (inTagsIndented "text:list-item") <$> mapM (withParagraphStyle o s . map plainToPara) is deflistItemToOpenDocument :: WriterOptions -> ([Inline],[[Block]]) -> State WriterState Doc deflistItemToOpenDocument o (t,d) = do let ts = if isTightList d then "Definition_20_Term_20_Tight" else "Definition_20_Term" ds = if isTightList d then "Definition_20_Definition_20_Tight" else "Definition_20_Definition" t' <- withParagraphStyle o ts [Para t] d' <- liftM vcat $ mapM (withParagraphStyle o ds . (map plainToPara)) d return $ t' $$ d' inBlockQuote :: WriterOptions -> Int -> [Block] -> State WriterState Doc inBlockQuote o i (b:bs) | BlockQuote l <- b = do increaseIndent ni <- paraStyle [("style:parent-style-name","Quotations")] go =<< inBlockQuote o ni (map plainToPara l) | Para l <- b = do go =<< inParagraphTagsWithStyle ("P" ++ show i) <$> inlinesToOpenDocument o l | otherwise = do go =<< blockToOpenDocument o b where go block = ($$) block <$> inBlockQuote o i bs inBlockQuote _ _ [] = resetIndent >> return empty -- | Convert a list of Pandoc blocks to OpenDocument. blocksToOpenDocument :: WriterOptions -> [Block] -> State WriterState Doc blocksToOpenDocument o b = vcat <$> mapM (blockToOpenDocument o) b -- | Convert a Pandoc block element to OpenDocument. blockToOpenDocument :: WriterOptions -> Block -> State WriterState Doc blockToOpenDocument o bs | Plain b <- bs = if null b then return empty else inParagraphTags =<< inlinesToOpenDocument o b | Para [Image attr c (s,'f':'i':'g':':':t)] <- bs = figure attr c s t | Para b <- bs = if null b then return empty else inParagraphTags =<< inlinesToOpenDocument o b | LineBlock b <- bs = blockToOpenDocument o $ linesToPara b | Div _ xs <- bs = blocksToOpenDocument o xs | Header i _ b <- bs = setFirstPara >> (inHeaderTags i =<< inlinesToOpenDocument o b) | BlockQuote b <- bs = setFirstPara >> mkBlockQuote b | DefinitionList b <- bs = setFirstPara >> defList b | BulletList b <- bs = setFirstPara >> bulletListToOpenDocument o b | OrderedList a b <- bs = setFirstPara >> orderedList a b | CodeBlock _ s <- bs = setFirstPara >> preformatted s | Table c a w h r <- bs = setFirstPara >> table c a w h r | HorizontalRule <- bs = setFirstPara >> return (selfClosingTag "text:p" [ ("text:style-name", "Horizontal_20_Line") ]) | RawBlock f s <- bs = if f == Format "opendocument" then return $ text s else return empty | Null <- bs = return empty | otherwise = return empty where defList b = do setInDefinitionList True r <- vcat <$> mapM (deflistItemToOpenDocument o) b setInDefinitionList False return r preformatted s = (flush . vcat) <$> mapM (inPreformattedTags . escapeStringForXML) (lines s) mkBlockQuote b = do increaseIndent i <- paraStyle [("style:parent-style-name","Quotations")] inBlockQuote o i (map plainToPara b) orderedList a b = do (ln,pn) <- newOrderedListStyle (isTightList b) a inTags True "text:list" [ ("text:style-name", "L" ++ show ln)] <$> orderedListToOpenDocument o pn b table c a w h r = do tn <- length <$> gets stTableStyles pn <- length <$> gets stParaStyles let genIds = map chr [65..] name = "Table" ++ show (tn + 1) columnIds = zip genIds w mkColumn n = selfClosingTag "table:table-column" [("table:style-name", name ++ "." ++ [fst n])] columns = map mkColumn columnIds paraHStyles = paraTableStyles "Heading" pn a paraStyles = paraTableStyles "Contents" (pn + length (newPara paraHStyles)) a newPara = map snd . filter (not . isEmpty . snd) addTableStyle $ tableStyle tn columnIds mapM_ addParaStyle . newPara $ paraHStyles ++ paraStyles captionDoc <- if null c then return empty else withParagraphStyle o "Table" [Para c] th <- if all null h then return empty else colHeadsToOpenDocument o name (map fst paraHStyles) h tr <- mapM (tableRowToOpenDocument o name (map fst paraStyles)) r return $ inTags True "table:table" [ ("table:name" , name) , ("table:style-name", name) ] (vcat columns $$ th $$ vcat tr) $$ captionDoc figure attr caption source title | null caption = withParagraphStyle o "Figure" [Para [Image attr caption (source,title)]] | otherwise = do imageDoc <- withParagraphStyle o "FigureWithCaption" [Para [Image attr caption (source,title)]] captionDoc <- withParagraphStyle o "FigureCaption" [Para caption] return $ imageDoc $$ captionDoc colHeadsToOpenDocument :: WriterOptions -> String -> [String] -> [[Block]] -> State WriterState Doc colHeadsToOpenDocument o tn ns hs = inTagsIndented "table:table-header-rows" . inTagsIndented "table:table-row" . vcat <$> mapM (tableItemToOpenDocument o tn) (zip ns hs) tableRowToOpenDocument :: WriterOptions -> String -> [String] -> [[Block]] -> State WriterState Doc tableRowToOpenDocument o tn ns cs = inTagsIndented "table:table-row" . vcat <$> mapM (tableItemToOpenDocument o tn) (zip ns cs) tableItemToOpenDocument :: WriterOptions -> String -> (String,[Block])-> State WriterState Doc tableItemToOpenDocument o tn (n,i) = let a = [ ("table:style-name" , tn ++ ".A1" ) , ("office:value-type", "string" ) ] in inTags True "table:table-cell" a <$> withParagraphStyle o n (map plainToPara i) -- | Convert a list of inline elements to OpenDocument. inlinesToOpenDocument :: WriterOptions -> [Inline] -> State WriterState Doc inlinesToOpenDocument o l = hcat <$> toChunks o l toChunks :: WriterOptions -> [Inline] -> State WriterState [Doc] toChunks _ [] = return [] toChunks o (x : xs) | isChunkable x = do contents <- (inTextStyle . hcat) =<< mapM (inlineToOpenDocument o) (x:ys) rest <- toChunks o zs return (contents : rest) | otherwise = do contents <- inlineToOpenDocument o x rest <- toChunks o xs return (contents : rest) where (ys, zs) = span isChunkable xs isChunkable :: Inline -> Bool isChunkable (Str _) = True isChunkable Space = True isChunkable SoftBreak = True isChunkable _ = False -- | Convert an inline element to OpenDocument. inlineToOpenDocument :: WriterOptions -> Inline -> State WriterState Doc inlineToOpenDocument o ils = case ils of Space -> return space SoftBreak | writerWrapText o == WrapPreserve -> return $ preformatted "\n" | otherwise -> return $ space Span _ xs -> inlinesToOpenDocument o xs LineBreak -> return $ selfClosingTag "text:line-break" [] Str s -> return $ handleSpaces $ escapeStringForXML s Emph l -> withTextStyle Italic $ inlinesToOpenDocument o l Strong l -> withTextStyle Bold $ inlinesToOpenDocument o l Strikeout l -> withTextStyle Strike $ inlinesToOpenDocument o l Superscript l -> withTextStyle Sup $ inlinesToOpenDocument o l Subscript l -> withTextStyle Sub $ inlinesToOpenDocument o l SmallCaps l -> withTextStyle SmallC $ inlinesToOpenDocument o l Quoted t l -> inQuotes t <$> inlinesToOpenDocument o l Code _ s -> inlinedCode $ preformatted s Math t s -> inlinesToOpenDocument o (texMathToInlines t s) Cite _ l -> inlinesToOpenDocument o l RawInline f s -> if f == Format "opendocument" then return $ text s else return empty Link _ l (s,t) -> mkLink s t <$> inlinesToOpenDocument o l Image attr _ (s,t) -> mkImg attr s t Note l -> mkNote l where preformatted s = handleSpaces $ escapeStringForXML s inlinedCode s = return $ inTags False "text:span" [("text:style-name", "Source_Text")] s mkLink s t = inTags False "text:a" [ ("xlink:type" , "simple") , ("xlink:href" , s ) , ("office:name", t ) ] . inSpanTags "Definition" mkImg (_, _, kvs) s _ = do id' <- gets stImageId modify (\st -> st{ stImageId = id' + 1 }) let getDims [] = [] getDims (("width", w) :xs) = ("svg:width", w) : getDims xs getDims (("height", h):xs) = ("svg:height", h) : getDims xs getDims (x@("style:rel-width", _) :xs) = x : getDims xs getDims (x@("style:rel-height", _):xs) = x : getDims xs getDims (_:xs) = getDims xs return $ inTags False "draw:frame" (("draw:name", "img" ++ show id') : getDims kvs) $ selfClosingTag "draw:image" [ ("xlink:href" , s ) , ("xlink:type" , "simple") , ("xlink:show" , "embed" ) , ("xlink:actuate", "onLoad")] mkNote l = do n <- length <$> gets stNotes let footNote t = inTags False "text:note" [ ("text:id" , "ftn" ++ show n) , ("text:note-class", "footnote" )] $ inTagsSimple "text:note-citation" (text . show $ n + 1) <> inTagsSimple "text:note-body" t nn <- footNote <$> withParagraphStyle o "Footnote" l addNote nn return nn bulletListStyle :: Int -> State WriterState (Int,(Int,[Doc])) bulletListStyle l = let doStyles i = inTags True "text:list-level-style-bullet" [ ("text:level" , show (i + 1) ) , ("text:style-name" , "Bullet_20_Symbols") , ("style:num-suffix", "." ) , ("text:bullet-char", [bulletList !! i] ) ] (listLevelStyle (1 + i)) bulletList = map chr $ cycle [8226,8227,8259] listElStyle = map doStyles [0..9] in do pn <- paraListStyle l return (pn, (l, listElStyle)) orderedListLevelStyle :: ListAttributes -> (Int, [Doc]) -> (Int,[Doc]) orderedListLevelStyle (s,n, d) (l,ls) = let suffix = case d of OneParen -> [("style:num-suffix", ")")] TwoParens -> [("style:num-prefix", "(") ,("style:num-suffix", ")")] _ -> [("style:num-suffix", ".")] format = case n of UpperAlpha -> "A" LowerAlpha -> "a" UpperRoman -> "I" LowerRoman -> "i" _ -> "1" listStyle = inTags True "text:list-level-style-number" ([ ("text:level" , show $ 1 + length ls ) , ("text:style-name" , "Numbering_20_Symbols") , ("style:num-format", format ) , ("text:start-value", show s ) ] ++ suffix) (listLevelStyle (1 + length ls)) in (l, ls ++ [listStyle]) listLevelStyle :: Int -> Doc listLevelStyle i = let indent = show (0.25 * fromIntegral i :: Double) in selfClosingTag "style:list-level-properties" [ ("text:space-before" , indent ++ "in") , ("text:min-label-width", "0.25in")] tableStyle :: Int -> [(Char,Double)] -> Doc tableStyle num wcs = let tableId = "Table" ++ show (num + 1) table = inTags True "style:style" [("style:name", tableId) ,("style:family", "table")] $ selfClosingTag "style:table-properties" [("table:align" , "center")] colStyle (c,0) = selfClosingTag "style:style" [ ("style:name" , tableId ++ "." ++ [c]) , ("style:family", "table-column" )] colStyle (c,w) = inTags True "style:style" [ ("style:name" , tableId ++ "." ++ [c]) , ("style:family", "table-column" )] $ selfClosingTag "style:table-column-properties" [("style:rel-column-width", printf "%d*" $ (floor $ w * 65535 :: Integer))] cellStyle = inTags True "style:style" [ ("style:name" , tableId ++ ".A1") , ("style:family", "table-cell" )] $ selfClosingTag "style:table-cell-properties" [ ("fo:border", "none")] columnStyles = map colStyle wcs in table $$ vcat columnStyles $$ cellStyle paraStyle :: [(String,String)] -> State WriterState Int paraStyle attrs = do pn <- (+) 1 . length <$> gets stParaStyles i <- (*) 0.5 . fromIntegral <$> gets stIndentPara :: State WriterState Double b <- gets stInDefinition t <- gets stTight let styleAttr = [ ("style:name" , "P" ++ show pn) , ("style:family" , "paragraph" )] indentVal = flip (++) "in" . show $ if b then (max 0.5 i) else i tight = if t then [ ("fo:margin-top" , "0in" ) , ("fo:margin-bottom" , "0in" )] else [] indent = if (i /= 0 || b) then [ ("fo:margin-left" , indentVal) , ("fo:margin-right" , "0in" ) , ("fo:text-indent" , "0in" ) , ("style:auto-text-indent" , "false" )] else [] attributes = indent ++ tight paraProps = when (not $ null attributes) $ selfClosingTag "style:paragraph-properties" attributes addParaStyle $ inTags True "style:style" (styleAttr ++ attrs) paraProps return pn paraListStyle :: Int -> State WriterState Int paraListStyle l = paraStyle [("style:parent-style-name","Text_20_body") ,("style:list-style-name", "L" ++ show l )] paraTableStyles :: String -> Int -> [Alignment] -> [(String, Doc)] paraTableStyles _ _ [] = [] paraTableStyles t s (a:xs) | AlignRight <- a = ( pName s, res s "end" ) : paraTableStyles t (s + 1) xs | AlignCenter <- a = ( pName s, res s "center") : paraTableStyles t (s + 1) xs | otherwise = ("Table_20_" ++ t, empty ) : paraTableStyles t s xs where pName sn = "P" ++ show (sn + 1) res sn x = inTags True "style:style" [ ("style:name" , pName sn ) , ("style:family" , "paragraph" ) , ("style:parent-style-name", "Table_20_" ++ t)] $ selfClosingTag "style:paragraph-properties" [ ("fo:text-align", x) , ("style:justify-single-word", "false")] data TextStyle = Italic | Bold | Strike | Sub | Sup | SmallC | Pre deriving ( Eq,Ord ) textStyleAttr :: TextStyle -> [(String,String)] textStyleAttr s | Italic <- s = [("fo:font-style" ,"italic" ) ,("style:font-style-asian" ,"italic" ) ,("style:font-style-complex" ,"italic" )] | Bold <- s = [("fo:font-weight" ,"bold" ) ,("style:font-weight-asian" ,"bold" ) ,("style:font-weight-complex" ,"bold" )] | Strike <- s = [("style:text-line-through-style", "solid" )] | Sub <- s = [("style:text-position" ,"sub 58%" )] | Sup <- s = [("style:text-position" ,"super 58%" )] | SmallC <- s = [("fo:font-variant" ,"small-caps")] | Pre <- s = [("style:font-name" ,"Courier New") ,("style:font-name-asian" ,"Courier New") ,("style:font-name-complex" ,"Courier New")] | otherwise = [] pandoc-1.19.2.4/src/Text/Pandoc/Writers/Texinfo.hs0000644000000000000000000004170313155240142017730 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2008-2015 John MacFarlane and Peter Wang 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.Writers.Texinfo Copyright : Copyright (C) 2008-2015 John MacFarlane and Peter Wang License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' format into Texinfo. -} module Text.Pandoc.Writers.Texinfo ( writeTexinfo ) where import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Templates (renderTemplate') import Text.Printf ( printf ) import Data.List ( transpose, maximumBy ) import Data.Ord ( comparing ) import Data.Char ( chr, ord ) import Control.Monad.State import Text.Pandoc.Pretty import Text.Pandoc.ImageSize import Network.URI ( isURI, unEscapeString ) import System.FilePath import qualified Data.Set as Set data WriterState = WriterState { stStrikeout :: Bool -- document contains strikeout , stSuperscript :: Bool -- document contains superscript , stSubscript :: Bool -- document contains subscript , stEscapeComma :: Bool -- in a context where we need @comma , stIdentifiers :: Set.Set String -- header ids used already , stOptions :: WriterOptions -- writer options } {- TODO: - internal cross references a la HTML - generated .texi files don't work when run through texi2dvi -} -- | Convert Pandoc to Texinfo. writeTexinfo :: WriterOptions -> Pandoc -> String writeTexinfo options document = evalState (pandocToTexinfo options $ wrapTop document) $ WriterState { stStrikeout = False, stSuperscript = False, stEscapeComma = False, stSubscript = False, stIdentifiers = Set.empty, stOptions = options} -- | Add a "Top" node around the document, needed by Texinfo. wrapTop :: Pandoc -> Pandoc wrapTop (Pandoc meta blocks) = Pandoc meta (Header 0 nullAttr (docTitle meta) : blocks) pandocToTexinfo :: WriterOptions -> Pandoc -> State WriterState String pandocToTexinfo options (Pandoc meta blocks) = do let titlePage = not $ all null $ docTitle meta : docDate meta : docAuthors meta let colwidth = if writerWrapText options == WrapAuto then Just $ writerColumns options else Nothing metadata <- metaToJSON options (fmap (render colwidth) . blockListToTexinfo) (fmap (render colwidth) . inlineListToTexinfo) meta main <- blockListToTexinfo blocks st <- get let body = render colwidth main let context = defField "body" body $ defField "toc" (writerTableOfContents options) $ defField "titlepage" titlePage $ defField "subscript" (stSubscript st) $ defField "superscript" (stSuperscript st) $ defField "strikeout" (stStrikeout st) $ metadata case writerTemplate options of Nothing -> return body Just tpl -> return $ renderTemplate' tpl context -- | Escape things as needed for Texinfo. stringToTexinfo :: String -> String stringToTexinfo = escapeStringUsing texinfoEscapes where texinfoEscapes = [ ('{', "@{") , ('}', "@}") , ('@', "@@") , ('\160', "@ ") , ('\x2014', "---") , ('\x2013', "--") , ('\x2026', "@dots{}") , ('\x2019', "'") ] escapeCommas :: State WriterState Doc -> State WriterState Doc escapeCommas parser = do oldEscapeComma <- gets stEscapeComma modify $ \st -> st{ stEscapeComma = True } res <- parser modify $ \st -> st{ stEscapeComma = oldEscapeComma } return res -- | Puts contents into Texinfo command. inCmd :: String -> Doc -> Doc inCmd cmd contents = char '@' <> text cmd <> braces contents -- | Convert Pandoc block element to Texinfo. blockToTexinfo :: Block -- ^ Block to convert -> State WriterState Doc blockToTexinfo Null = return empty blockToTexinfo (Div _ bs) = blockListToTexinfo bs blockToTexinfo (Plain lst) = inlineListToTexinfo lst -- title beginning with fig: indicates that the image is a figure blockToTexinfo (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do capt <- if null txt then return empty else (\c -> text "@caption" <> braces c) `fmap` inlineListToTexinfo txt img <- inlineToTexinfo (Image attr txt (src,tit)) return $ text "@float" $$ img $$ capt $$ text "@end float" blockToTexinfo (Para lst) = inlineListToTexinfo lst -- this is handled differently from Plain in blockListToTexinfo blockToTexinfo (LineBlock lns) = blockToTexinfo $ linesToPara lns blockToTexinfo (BlockQuote lst) = do contents <- blockListToTexinfo lst return $ text "@quotation" $$ contents $$ text "@end quotation" blockToTexinfo (CodeBlock _ str) = do return $ blankline $$ text "@verbatim" $$ flush (text str) $$ text "@end verbatim" <> blankline blockToTexinfo (RawBlock f str) | f == "texinfo" = return $ text str | f == "latex" || f == "tex" = return $ text "@tex" $$ text str $$ text "@end tex" | otherwise = return empty blockToTexinfo (BulletList lst) = do items <- mapM listItemToTexinfo lst return $ text "@itemize" $$ vcat items $$ text "@end itemize" <> blankline blockToTexinfo (OrderedList (start, numstyle, _) lst) = do items <- mapM listItemToTexinfo lst return $ text "@enumerate " <> exemplar $$ vcat items $$ text "@end enumerate" <> blankline where exemplar = case numstyle of DefaultStyle -> decimal Decimal -> decimal Example -> decimal UpperRoman -> decimal -- Roman numerals not supported LowerRoman -> decimal UpperAlpha -> upperAlpha LowerAlpha -> lowerAlpha decimal = if start == 1 then empty else text (show start) upperAlpha = text [chr $ ord 'A' + start - 1] lowerAlpha = text [chr $ ord 'a' + start - 1] blockToTexinfo (DefinitionList lst) = do items <- mapM defListItemToTexinfo lst return $ text "@table @asis" $$ vcat items $$ text "@end table" <> blankline blockToTexinfo HorizontalRule = -- XXX can't get the equivalent from LaTeX.hs to work return $ text "@iftex" $$ text "@bigskip@hrule@bigskip" $$ text "@end iftex" $$ text "@ifnottex" $$ text (take 72 $ repeat '-') $$ text "@end ifnottex" blockToTexinfo (Header 0 _ lst) = do txt <- if null lst then return $ text "Top" else inlineListToTexinfo lst return $ text "@node Top" $$ text "@top " <> txt <> blankline blockToTexinfo (Header level _ lst) = do node <- inlineListForNode lst txt <- inlineListToTexinfo lst idsUsed <- gets stIdentifiers let id' = uniqueIdent lst idsUsed modify $ \st -> st{ stIdentifiers = Set.insert id' idsUsed } return $ if (level > 0) && (level <= 4) then blankline <> text "@node " <> node $$ text (seccmd level) <> txt $$ text "@anchor" <> braces (text $ '#':id') else txt where seccmd 1 = "@chapter " seccmd 2 = "@section " seccmd 3 = "@subsection " seccmd 4 = "@subsubsection " seccmd _ = error "illegal seccmd level" blockToTexinfo (Table caption aligns widths heads rows) = do headers <- if all null heads then return empty else tableHeadToTexinfo aligns heads captionText <- inlineListToTexinfo caption rowsText <- mapM (tableRowToTexinfo aligns) rows colDescriptors <- if all (== 0) widths then do -- use longest entry instead of column widths cols <- mapM (mapM (liftM (render Nothing . hcat) . mapM blockToTexinfo)) $ transpose $ heads : rows return $ concatMap ((\x -> "{"++x++"} ") . maximumBy (comparing length)) cols else return $ "@columnfractions " ++ concatMap (printf "%.2f ") widths let tableBody = text ("@multitable " ++ colDescriptors) $$ headers $$ vcat rowsText $$ text "@end multitable" return $ if isEmpty captionText then tableBody <> blankline else text "@float" $$ tableBody $$ inCmd "caption" captionText $$ text "@end float" tableHeadToTexinfo :: [Alignment] -> [[Block]] -> State WriterState Doc tableHeadToTexinfo = tableAnyRowToTexinfo "@headitem " tableRowToTexinfo :: [Alignment] -> [[Block]] -> State WriterState Doc tableRowToTexinfo = tableAnyRowToTexinfo "@item " tableAnyRowToTexinfo :: String -> [Alignment] -> [[Block]] -> State WriterState Doc tableAnyRowToTexinfo itemtype aligns cols = zipWithM alignedBlock aligns cols >>= return . (text itemtype $$) . foldl (\row item -> row $$ (if isEmpty row then empty else text " @tab ") <> item) empty alignedBlock :: Alignment -> [Block] -> State WriterState Doc -- XXX @flushleft and @flushright text won't get word wrapped. Since word -- wrapping is more important than alignment, we ignore the alignment. alignedBlock _ = blockListToTexinfo {- alignedBlock AlignLeft col = do b <- blockListToTexinfo col return $ text "@flushleft" $$ b $$ text "@end flushleft" alignedBlock AlignRight col = do b <- blockListToTexinfo col return $ text "@flushright" $$ b $$ text "@end flushright" alignedBlock _ col = blockListToTexinfo col -} -- | Convert Pandoc block elements to Texinfo. blockListToTexinfo :: [Block] -> State WriterState Doc blockListToTexinfo [] = return empty blockListToTexinfo (x:xs) = do x' <- blockToTexinfo x case x of Header level _ _ -> do -- We need need to insert a menu for this node. let (before, after) = break isHeaderBlock xs before' <- blockListToTexinfo before let menu = if level < 4 then collectNodes (level + 1) after else [] lines' <- mapM makeMenuLine menu let menu' = if null lines' then empty else text "@menu" $$ vcat lines' $$ text "@end menu" after' <- blockListToTexinfo after return $ x' $$ before' $$ menu' $$ after' Para _ -> do xs' <- blockListToTexinfo xs case xs of ((CodeBlock _ _):_) -> return $ x' $$ xs' _ -> return $ x' $+$ xs' _ -> do xs' <- blockListToTexinfo xs return $ x' $$ xs' collectNodes :: Int -> [Block] -> [Block] collectNodes _ [] = [] collectNodes level (x:xs) = case x of (Header hl _ _) -> if hl < level then [] else if hl == level then x : collectNodes level xs else collectNodes level xs _ -> collectNodes level xs makeMenuLine :: Block -> State WriterState Doc makeMenuLine (Header _ _ lst) = do txt <- inlineListForNode lst return $ text "* " <> txt <> text "::" makeMenuLine _ = error "makeMenuLine called with non-Header block" listItemToTexinfo :: [Block] -> State WriterState Doc listItemToTexinfo lst = do contents <- blockListToTexinfo lst let spacer = case reverse lst of (Para{}:_) -> blankline _ -> empty return $ text "@item" $$ contents <> spacer defListItemToTexinfo :: ([Inline], [[Block]]) -> State WriterState Doc defListItemToTexinfo (term, defs) = do term' <- inlineListToTexinfo term let defToTexinfo bs = do d <- blockListToTexinfo bs case reverse bs of (Para{}:_) -> return $ d <> blankline _ -> return d defs' <- mapM defToTexinfo defs return $ text "@item " <> term' $+$ vcat defs' -- | Convert list of inline elements to Texinfo. inlineListToTexinfo :: [Inline] -- ^ Inlines to convert -> State WriterState Doc inlineListToTexinfo lst = mapM inlineToTexinfo lst >>= return . hcat -- | Convert list of inline elements to Texinfo acceptable for a node name. inlineListForNode :: [Inline] -- ^ Inlines to convert -> State WriterState Doc inlineListForNode = return . text . stringToTexinfo . filter (not . disallowedInNode) . stringify -- periods, commas, colons, and parentheses are disallowed in node names disallowedInNode :: Char -> Bool disallowedInNode c = c `elem` (".,:()" :: String) -- | Convert inline element to Texinfo inlineToTexinfo :: Inline -- ^ Inline to convert -> State WriterState Doc inlineToTexinfo (Span _ lst) = inlineListToTexinfo lst inlineToTexinfo (Emph lst) = inlineListToTexinfo lst >>= return . inCmd "emph" inlineToTexinfo (Strong lst) = inlineListToTexinfo lst >>= return . inCmd "strong" inlineToTexinfo (Strikeout lst) = do modify $ \st -> st{ stStrikeout = True } contents <- inlineListToTexinfo lst return $ text "@textstrikeout{" <> contents <> text "}" inlineToTexinfo (Superscript lst) = do modify $ \st -> st{ stSuperscript = True } contents <- inlineListToTexinfo lst return $ text "@textsuperscript{" <> contents <> char '}' inlineToTexinfo (Subscript lst) = do modify $ \st -> st{ stSubscript = True } contents <- inlineListToTexinfo lst return $ text "@textsubscript{" <> contents <> char '}' inlineToTexinfo (SmallCaps lst) = inlineListToTexinfo lst >>= return . inCmd "sc" inlineToTexinfo (Code _ str) = do return $ text $ "@code{" ++ stringToTexinfo str ++ "}" inlineToTexinfo (Quoted SingleQuote lst) = do contents <- inlineListToTexinfo lst return $ char '`' <> contents <> char '\'' inlineToTexinfo (Quoted DoubleQuote lst) = do contents <- inlineListToTexinfo lst return $ text "``" <> contents <> text "''" inlineToTexinfo (Cite _ lst) = inlineListToTexinfo lst inlineToTexinfo (Str str) = return $ text (stringToTexinfo str) inlineToTexinfo (Math _ str) = return $ inCmd "math" $ text str inlineToTexinfo (RawInline f str) | f == "latex" || f == "tex" = return $ text "@tex" $$ text str $$ text "@end tex" | f == "texinfo" = return $ text str | otherwise = return empty inlineToTexinfo (LineBreak) = return $ text "@*" <> cr inlineToTexinfo SoftBreak = do wrapText <- gets (writerWrapText . stOptions) case wrapText of WrapAuto -> return space WrapNone -> return space WrapPreserve -> return cr inlineToTexinfo Space = return space inlineToTexinfo (Link _ txt (src@('#':_), _)) = do contents <- escapeCommas $ inlineListToTexinfo txt return $ text "@ref" <> braces (text (stringToTexinfo src) <> text "," <> contents) inlineToTexinfo (Link _ txt (src, _)) = do case txt of [Str x] | escapeURI x == src -> -- autolink do return $ text $ "@url{" ++ x ++ "}" _ -> do contents <- escapeCommas $ inlineListToTexinfo txt let src1 = stringToTexinfo src return $ text ("@uref{" ++ src1 ++ ",") <> contents <> char '}' inlineToTexinfo (Image attr alternate (source, _)) = do content <- escapeCommas $ inlineListToTexinfo alternate opts <- gets stOptions let showDim dim = case (dimension dim attr) of (Just (Pixel a)) -> showInInch opts (Pixel a) ++ "in" (Just (Percent _)) -> "" (Just d) -> show d Nothing -> "" return $ text ("@image{" ++ base ++ ',':(showDim Width) ++ ',':(showDim Height) ++ ",") <> content <> text "," <> text (ext ++ "}") where ext = drop 1 $ takeExtension source' base = dropExtension source' source' = if isURI source then source else unEscapeString source inlineToTexinfo (Note contents) = do contents' <- blockListToTexinfo contents return $ text "@footnote" <> braces contents' pandoc-1.19.2.4/src/Text/Pandoc/Writers/Man.hs0000644000000000000000000003641613155240142017034 0ustar0000000000000000{- Copyright (C) 2007-2015 John MacFarlane 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.Writers.Man Copyright : Copyright (C) 2007-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to groff man page format. -} module Text.Pandoc.Writers.Man ( writeMan) where import Text.Pandoc.Definition import Text.Pandoc.Templates import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Options import Text.Pandoc.Readers.TeXMath import Text.Printf ( printf ) import Data.List ( stripPrefix, intersperse, intercalate ) import Data.Maybe (fromMaybe) import Text.Pandoc.Pretty import Text.Pandoc.Builder (deleteMeta) import Control.Monad.State type Notes = [[Block]] data WriterState = WriterState { stNotes :: Notes , stHasTables :: Bool } -- | Convert Pandoc to Man. writeMan :: WriterOptions -> Pandoc -> String writeMan opts document = evalState (pandocToMan opts document) (WriterState [] False) -- | Return groff man representation of document. pandocToMan :: WriterOptions -> Pandoc -> State WriterState String pandocToMan opts (Pandoc meta blocks) = do let colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing let render' = render colwidth titleText <- inlineListToMan opts $ docTitle meta let title' = render' titleText let setFieldsFromTitle = case break (== ' ') title' of (cmdName, rest) -> case break (=='(') cmdName of (xs, '(':ys) | not (null ys) && last ys == ')' -> defField "title" xs . defField "section" (init ys) . case splitBy (=='|') rest of (ft:hds) -> defField "footer" (trim ft) . defField "header" (trim $ concat hds) [] -> id _ -> defField "title" title' metadata <- metaToJSON opts (fmap (render colwidth) . blockListToMan opts) (fmap (render colwidth) . inlineListToMan opts) $ deleteMeta "title" meta body <- blockListToMan opts blocks notes <- liftM stNotes get notes' <- notesToMan opts (reverse notes) let main = render' $ body $$ notes' $$ text "" hasTables <- liftM stHasTables get let context = defField "body" main $ setFieldsFromTitle $ defField "has-tables" hasTables $ defField "hyphenate" True $ defField "pandoc-version" pandocVersion $ metadata case writerTemplate opts of Nothing -> return main Just tpl -> return $ renderTemplate' tpl context -- | Return man representation of notes. notesToMan :: WriterOptions -> [[Block]] -> State WriterState Doc notesToMan opts notes = if null notes then return empty else mapM (\(num, note) -> noteToMan opts num note) (zip [1..] notes) >>= return . (text ".SH NOTES" $$) . vcat -- | Return man representation of a note. noteToMan :: WriterOptions -> Int -> [Block] -> State WriterState Doc noteToMan opts num note = do contents <- blockListToMan opts note let marker = cr <> text ".SS " <> brackets (text (show num)) return $ marker $$ contents -- | Association list of characters to escape. manEscapes :: [(Char, String)] manEscapes = [ ('\160', "\\ ") , ('\'', "\\[aq]") , ('’', "'") , ('\x2014', "\\[em]") , ('\x2013', "\\[en]") , ('\x2026', "\\&...") ] ++ backslashEscapes "-@\\" -- | Escape special characters for Man. escapeString :: String -> String escapeString = escapeStringUsing manEscapes -- | Escape a literal (code) section for Man. escapeCode :: String -> String escapeCode = concat . intersperse "\n" . map escapeLine . lines where escapeLine codeline = case escapeStringUsing (manEscapes ++ backslashEscapes "\t ") codeline of a@('.':_) -> "\\&" ++ a b -> b -- We split inline lists into sentences, and print one sentence per -- line. groff/troff treats the line-ending period differently. -- See http://code.google.com/p/pandoc/issues/detail?id=148. -- | Returns the first sentence in a list of inlines, and the rest. breakSentence :: [Inline] -> ([Inline], [Inline]) breakSentence [] = ([],[]) breakSentence xs = let isSentenceEndInline (Str ys@(_:_)) | last ys == '.' = True isSentenceEndInline (Str ys@(_:_)) | last ys == '?' = True isSentenceEndInline (LineBreak) = True isSentenceEndInline _ = False (as, bs) = break isSentenceEndInline xs in case bs of [] -> (as, []) [c] -> (as ++ [c], []) (c:Space:cs) -> (as ++ [c], cs) (c:SoftBreak:cs) -> (as ++ [c], cs) (Str ".":Str (')':ys):cs) -> (as ++ [Str ".", Str (')':ys)], cs) (x@(Str ('.':')':_)):cs) -> (as ++ [x], cs) (LineBreak:x@(Str ('.':_)):cs) -> (as ++[LineBreak], x:cs) (c:cs) -> (as ++ [c] ++ ds, es) where (ds, es) = breakSentence cs -- | Split a list of inlines into sentences. splitSentences :: [Inline] -> [[Inline]] splitSentences xs = let (sent, rest) = breakSentence xs in if null rest then [sent] else sent : splitSentences rest -- | Convert Pandoc block element to man. blockToMan :: WriterOptions -- ^ Options -> Block -- ^ Block element -> State WriterState Doc blockToMan _ Null = return empty blockToMan opts (Div _ bs) = blockListToMan opts bs blockToMan opts (Plain inlines) = liftM vcat $ mapM (inlineListToMan opts) $ splitSentences inlines blockToMan opts (Para inlines) = do contents <- liftM vcat $ mapM (inlineListToMan opts) $ splitSentences inlines return $ text ".PP" $$ contents blockToMan opts (LineBlock lns) = blockToMan opts $ linesToPara lns blockToMan _ (RawBlock f str) | f == Format "man" = return $ text str | otherwise = return empty blockToMan _ HorizontalRule = return $ text ".PP" $$ text " * * * * *" blockToMan opts (Header level _ inlines) = do contents <- inlineListToMan opts inlines let heading = case level of 1 -> ".SH " _ -> ".SS " return $ text heading <> contents blockToMan _ (CodeBlock _ str) = return $ text ".IP" $$ text ".nf" $$ text "\\f[C]" $$ text (escapeCode str) $$ text "\\f[]" $$ text ".fi" blockToMan opts (BlockQuote blocks) = do contents <- blockListToMan opts blocks return $ text ".RS" $$ contents $$ text ".RE" blockToMan opts (Table caption alignments widths headers rows) = let aligncode AlignLeft = "l" aligncode AlignRight = "r" aligncode AlignCenter = "c" aligncode AlignDefault = "l" in do caption' <- inlineListToMan opts caption modify $ \st -> st{ stHasTables = True } let iwidths = if all (== 0) widths then repeat "" else map (printf "w(%0.1fn)" . (70 *)) widths -- 78n default width - 8n indent = 70n let coldescriptions = text $ intercalate " " (zipWith (\align width -> aligncode align ++ width) alignments iwidths) ++ "." colheadings <- mapM (blockListToMan opts) headers let makeRow cols = text "T{" $$ (vcat $ intersperse (text "T}@T{") cols) $$ text "T}" let colheadings' = if all null headers then empty else makeRow colheadings $$ char '_' body <- mapM (\row -> do cols <- mapM (blockListToMan opts) row return $ makeRow cols) rows return $ text ".PP" $$ caption' $$ text ".TS" $$ text "tab(@);" $$ coldescriptions $$ colheadings' $$ vcat body $$ text ".TE" blockToMan opts (BulletList items) = do contents <- mapM (bulletListItemToMan opts) items return (vcat contents) blockToMan opts (OrderedList attribs items) = do let markers = take (length items) $ orderedListMarkers attribs let indent = 1 + (maximum $ map length markers) contents <- mapM (\(num, item) -> orderedListItemToMan opts num indent item) $ zip markers items return (vcat contents) blockToMan opts (DefinitionList items) = do contents <- mapM (definitionListItemToMan opts) items return (vcat contents) -- | Convert bullet list item (list of blocks) to man. bulletListItemToMan :: WriterOptions -> [Block] -> State WriterState Doc bulletListItemToMan _ [] = return empty bulletListItemToMan opts ((Para first):rest) = bulletListItemToMan opts ((Plain first):rest) bulletListItemToMan opts ((Plain first):rest) = do first' <- blockToMan opts (Plain first) rest' <- blockListToMan opts rest let first'' = text ".IP \\[bu] 2" $$ first' let rest'' = if null rest then empty else text ".RS 2" $$ rest' $$ text ".RE" return (first'' $$ rest'') bulletListItemToMan opts (first:rest) = do first' <- blockToMan opts first rest' <- blockListToMan opts rest return $ text "\\[bu] .RS 2" $$ first' $$ rest' $$ text ".RE" -- | Convert ordered list item (a list of blocks) to man. orderedListItemToMan :: WriterOptions -- ^ options -> String -- ^ order marker for list item -> Int -- ^ number of spaces to indent -> [Block] -- ^ list item (list of blocks) -> State WriterState Doc orderedListItemToMan _ _ _ [] = return empty orderedListItemToMan opts num indent ((Para first):rest) = orderedListItemToMan opts num indent ((Plain first):rest) orderedListItemToMan opts num indent (first:rest) = do first' <- blockToMan opts first rest' <- blockListToMan opts rest let num' = printf ("%" ++ show (indent - 1) ++ "s") num let first'' = text (".IP \"" ++ num' ++ "\" " ++ show indent) $$ first' let rest'' = if null rest then empty else text ".RS 4" $$ rest' $$ text ".RE" return $ first'' $$ rest'' -- | Convert definition list item (label, list of blocks) to man. definitionListItemToMan :: WriterOptions -> ([Inline],[[Block]]) -> State WriterState Doc definitionListItemToMan opts (label, defs) = do labelText <- inlineListToMan opts label contents <- if null defs then return empty else liftM vcat $ forM defs $ \blocks -> do let (first, rest) = case blocks of ((Para x):y) -> (Plain x,y) (x:y) -> (x,y) [] -> error "blocks is null" rest' <- liftM vcat $ mapM (\item -> blockToMan opts item) rest first' <- blockToMan opts first return $ first' $$ text ".RS" $$ rest' $$ text ".RE" return $ text ".TP" $$ nowrap (text ".B " <> labelText) $$ contents -- | Convert list of Pandoc block elements to man. blockListToMan :: WriterOptions -- ^ Options -> [Block] -- ^ List of block elements -> State WriterState Doc blockListToMan opts blocks = mapM (blockToMan opts) blocks >>= (return . vcat) -- | Convert list of Pandoc inline elements to man. inlineListToMan :: WriterOptions -> [Inline] -> State WriterState Doc inlineListToMan opts lst = mapM (inlineToMan opts) lst >>= (return . hcat) -- | Convert Pandoc inline element to man. inlineToMan :: WriterOptions -> Inline -> State WriterState Doc inlineToMan opts (Span _ ils) = inlineListToMan opts ils inlineToMan opts (Emph lst) = do contents <- inlineListToMan opts lst return $ text "\\f[I]" <> contents <> text "\\f[]" inlineToMan opts (Strong lst) = do contents <- inlineListToMan opts lst return $ text "\\f[B]" <> contents <> text "\\f[]" inlineToMan opts (Strikeout lst) = do contents <- inlineListToMan opts lst return $ text "[STRIKEOUT:" <> contents <> char ']' inlineToMan opts (Superscript lst) = do contents <- inlineListToMan opts lst return $ char '^' <> contents <> char '^' inlineToMan opts (Subscript lst) = do contents <- inlineListToMan opts lst return $ char '~' <> contents <> char '~' inlineToMan opts (SmallCaps lst) = inlineListToMan opts lst -- not supported inlineToMan opts (Quoted SingleQuote lst) = do contents <- inlineListToMan opts lst return $ char '`' <> contents <> char '\'' inlineToMan opts (Quoted DoubleQuote lst) = do contents <- inlineListToMan opts lst return $ text "\\[lq]" <> contents <> text "\\[rq]" inlineToMan opts (Cite _ lst) = inlineListToMan opts lst inlineToMan _ (Code _ str) = return $ text $ "\\f[C]" ++ escapeCode str ++ "\\f[]" inlineToMan _ (Str str@('.':_)) = return $ afterBreak "\\&" <> text (escapeString str) inlineToMan _ (Str str) = return $ text $ escapeString str inlineToMan opts (Math InlineMath str) = inlineListToMan opts $ texMathToInlines InlineMath str inlineToMan opts (Math DisplayMath str) = do contents <- inlineListToMan opts $ texMathToInlines DisplayMath str return $ cr <> text ".RS" $$ contents $$ text ".RE" inlineToMan _ (RawInline f str) | f == Format "man" = return $ text str | otherwise = return empty inlineToMan _ (LineBreak) = return $ cr <> text ".PD 0" $$ text ".P" $$ text ".PD" <> cr inlineToMan _ SoftBreak = return space inlineToMan _ Space = return space inlineToMan opts (Link _ txt (src, _)) = do linktext <- inlineListToMan opts txt let srcSuffix = fromMaybe src (stripPrefix "mailto:" src) return $ case txt of [Str s] | escapeURI s == srcSuffix -> char '<' <> text srcSuffix <> char '>' _ -> linktext <> text " (" <> text src <> char ')' inlineToMan opts (Image attr alternate (source, tit)) = do let txt = if (null alternate) || (alternate == [Str ""]) || (alternate == [Str source]) -- to prevent autolinks then [Str "image"] else alternate linkPart <- inlineToMan opts (Link attr txt (source, tit)) return $ char '[' <> text "IMAGE: " <> linkPart <> char ']' inlineToMan _ (Note contents) = do -- add to notes in state modify $ \st -> st{ stNotes = contents : stNotes st } notes <- liftM stNotes get let ref = show $ (length notes) return $ char '[' <> text ref <> char ']' pandoc-1.19.2.4/src/Text/Pandoc/Writers/Markdown.hs0000644000000000000000000014312513155240142020077 0ustar0000000000000000{-# LANGUAGE OverloadedStrings, TupleSections, ScopedTypeVariables, MultiWayIf #-} {- Copyright (C) 2006-2015 John MacFarlane 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.Writers.Markdown Copyright : Copyright (C) 2006-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to markdown-formatted plain text. Markdown: -} module Text.Pandoc.Writers.Markdown (writeMarkdown, writePlain) where import Text.Pandoc.Definition import Text.Pandoc.Walk import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Options import Text.Pandoc.Parsing hiding (blankline, blanklines, char, space) import Data.Maybe (fromMaybe) import Data.Monoid (Any(..)) import Data.List ( group, stripPrefix, find, intersperse, transpose, sortBy ) import Data.Char ( isSpace, isPunctuation, ord, chr ) import Data.Ord ( comparing ) import Text.Pandoc.Pretty import Control.Monad.Reader import Control.Monad.State import Text.Pandoc.Writers.HTML (writeHtmlString) import Text.Pandoc.Readers.TeXMath (texMathToInlines) import Text.HTML.TagSoup (parseTags, isTagText, Tag(..)) import Network.URI (isURI) import Data.Default import Data.Yaml (Value(Object,String,Array,Bool,Number)) import qualified Data.HashMap.Strict as H import qualified Data.Vector as V import qualified Data.Text as T import qualified Data.Set as Set import Network.HTTP ( urlEncode ) type Notes = [[Block]] type Ref = ([Inline], Target, Attr) type Refs = [Ref] type MD = ReaderT WriterEnv (State WriterState) evalMD :: MD a -> WriterEnv -> WriterState -> a evalMD md env st = evalState (runReaderT md env) st data WriterEnv = WriterEnv { envInList :: Bool , envPlain :: Bool , envRefShortcutable :: Bool , envBlockLevel :: Int , envEscapeSpaces :: Bool } instance Default WriterEnv where def = WriterEnv { envInList = False , envPlain = False , envRefShortcutable = True , envBlockLevel = 0 , envEscapeSpaces = False } data WriterState = WriterState { stNotes :: Notes , stRefs :: Refs , stIds :: Set.Set String , stNoteNum :: Int } instance Default WriterState where def = WriterState{ stNotes = [] , stRefs = [] , stIds = Set.empty , stNoteNum = 1 } -- | Convert Pandoc to Markdown. writeMarkdown :: WriterOptions -> Pandoc -> String writeMarkdown opts document = evalMD (pandocToMarkdown opts{ writerWrapText = if isEnabled Ext_hard_line_breaks opts then WrapNone else writerWrapText opts } document) def def -- | Convert Pandoc to plain text (like markdown, but without links, -- pictures, or inline formatting). writePlain :: WriterOptions -> Pandoc -> String writePlain opts document = evalMD (pandocToMarkdown opts document) def{ envPlain = True } def pandocTitleBlock :: Doc -> [Doc] -> Doc -> Doc pandocTitleBlock tit auths dat = hang 2 (text "% ") tit <> cr <> hang 2 (text "% ") (vcat $ map nowrap auths) <> cr <> hang 2 (text "% ") dat <> cr mmdTitleBlock :: Value -> Doc mmdTitleBlock (Object hashmap) = vcat $ map go $ sortBy (comparing fst) $ H.toList hashmap where go (k,v) = case (text (T.unpack k), v) of (k', Array vec) | V.null vec -> empty | otherwise -> k' <> ":" <> space <> hcat (intersperse "; " (map fromstr $ V.toList vec)) (_, String "") -> empty (k', x) -> k' <> ":" <> space <> nest 2 (fromstr x) fromstr (String s) = text (removeBlankLines $ T.unpack s) fromstr (Bool b) = text (show b) fromstr (Number n) = text (show n) fromstr _ = empty -- blank lines not allowed in MMD metadata - we replace with . removeBlankLines = trimr . unlines . map (\x -> if all isSpace x then "." else x) . lines mmdTitleBlock _ = empty plainTitleBlock :: Doc -> [Doc] -> Doc -> Doc plainTitleBlock tit auths dat = tit <> cr <> (hcat (intersperse (text "; ") auths)) <> cr <> dat <> cr yamlMetadataBlock :: Value -> Doc yamlMetadataBlock v = "---" $$ (jsonToYaml v) $$ "---" jsonToYaml :: Value -> Doc jsonToYaml (Object hashmap) = vcat $ map (\(k,v) -> case (text (T.unpack k), v, jsonToYaml v) of (k', Array vec, x) | V.null vec -> empty | otherwise -> (k' <> ":") $$ x (k', Object _, x) -> (k' <> ":") $$ nest 2 x (_, String "", _) -> empty (k', _, x) | k == "meta-json" -> empty | otherwise -> k' <> ":" <> space <> hang 2 "" x) $ sortBy (comparing fst) $ H.toList hashmap jsonToYaml (Array vec) = vcat $ map (\v -> hang 2 "- " (jsonToYaml v)) $ V.toList vec jsonToYaml (String "") = empty jsonToYaml (String s) = case T.unpack s of x | '\n' `elem` x -> hang 2 ("|" <> cr) $ text x | not (any isPunctuation x) -> text x | otherwise -> text $ "'" ++ substitute "'" "''" x ++ "'" jsonToYaml (Bool b) = text $ show b jsonToYaml (Number n) = text $ show n jsonToYaml _ = empty -- | Return markdown representation of document. pandocToMarkdown :: WriterOptions -> Pandoc -> MD String pandocToMarkdown opts (Pandoc meta blocks) = do let colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing isPlain <- asks envPlain metadata <- metaToJSON opts (fmap (render colwidth) . blockListToMarkdown opts) (fmap (render colwidth) . inlineListToMarkdown opts) meta let title' = maybe empty text $ getField "title" metadata let authors' = maybe [] (map text) $ getField "author" metadata let date' = maybe empty text $ getField "date" metadata let titleblock = case writerTemplate opts of Just _ | isPlain -> plainTitleBlock title' authors' date' | isEnabled Ext_yaml_metadata_block opts -> yamlMetadataBlock metadata | isEnabled Ext_pandoc_title_block opts -> pandocTitleBlock title' authors' date' | isEnabled Ext_mmd_title_block opts -> mmdTitleBlock metadata | otherwise -> empty Nothing -> empty let headerBlocks = filter isHeaderBlock blocks let toc = if writerTableOfContents opts then tableOfContents opts headerBlocks else empty -- Strip off final 'references' header if markdown citations enabled let blocks' = if isEnabled Ext_citations opts then case reverse blocks of (Div (_,["references"],_) _):xs -> reverse xs _ -> blocks else blocks body <- blockListToMarkdown opts blocks' notesAndRefs' <- notesAndRefs opts let render' :: Doc -> String render' = render colwidth let main = render' $ body <> notesAndRefs' let context = defField "toc" (render' toc) $ defField "body" main $ (if isNullMeta meta then id else defField "titleblock" (render' titleblock)) $ metadata case writerTemplate opts of Nothing -> return main Just tpl -> return $ renderTemplate' tpl context -- | Return markdown representation of reference key table. refsToMarkdown :: WriterOptions -> Refs -> MD Doc refsToMarkdown opts refs = mapM (keyToMarkdown opts) refs >>= return . vcat -- | Return markdown representation of a reference key. keyToMarkdown :: WriterOptions -> Ref -> MD Doc keyToMarkdown opts (label, (src, tit), attr) = do label' <- inlineListToMarkdown opts label let tit' = if null tit then empty else space <> "\"" <> text tit <> "\"" return $ nest 2 $ hang 2 ("[" <> label' <> "]:" <> space) (text src <> tit') <> linkAttributes opts attr -- | Return markdown representation of notes. notesToMarkdown :: WriterOptions -> [[Block]] -> MD Doc notesToMarkdown opts notes = do n <- gets stNoteNum notes' <- mapM (\(num, note) -> noteToMarkdown opts num note) (zip [n..] notes) modify $ \st -> st { stNoteNum = stNoteNum st + length notes } return $ vsep notes' -- | Return markdown representation of a note. noteToMarkdown :: WriterOptions -> Int -> [Block] -> MD Doc noteToMarkdown opts num blocks = do contents <- blockListToMarkdown opts blocks let num' = text $ writerIdentifierPrefix opts ++ show num let marker = if isEnabled Ext_footnotes opts then text "[^" <> num' <> text "]:" else text "[" <> num' <> text "]" let markerSize = 4 + offset num' let spacer = case writerTabStop opts - markerSize of n | n > 0 -> text $ replicate n ' ' _ -> text " " return $ if isEnabled Ext_footnotes opts then hang (writerTabStop opts) (marker <> spacer) contents else marker <> spacer <> contents -- | Escape special characters for Markdown. escapeString :: WriterOptions -> String -> String escapeString opts = escapeStringUsing markdownEscapes where markdownEscapes = ('<', "<") : ('>', ">") : backslashEscapes specialChars specialChars = (if isEnabled Ext_superscript opts then ('^':) else id) . (if isEnabled Ext_subscript opts then ('~':) else id) . (if isEnabled Ext_tex_math_dollars opts then ('$':) else id) $ "\\`*_[]#" -- | Construct table of contents from list of header blocks. tableOfContents :: WriterOptions -> [Block] -> Doc tableOfContents opts headers = let opts' = opts { writerIgnoreNotes = True } contents = BulletList $ map (elementToListItem opts) $ hierarchicalize headers in evalMD (blockToMarkdown opts' contents) def def -- | Converts an Element to a list item for a table of contents, elementToListItem :: WriterOptions -> Element -> [Block] 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 attrsToMarkdown attribs = braces $ hsep [attribId, attribClasses, attribKeys] where attribId = case attribs of ([],_,_) -> empty (i,_,_) -> "#" <> text i attribClasses = case attribs of (_,[],_) -> empty (_,cs,_) -> hsep $ map (text . ('.':)) cs attribKeys = case attribs of (_,_,[]) -> empty (_,_,ks) -> hsep $ map (\(k,v) -> text k <> "=\"" <> text v <> "\"") ks linkAttributes :: WriterOptions -> Attr -> Doc linkAttributes opts attr = if isEnabled Ext_link_attributes opts && attr /= nullAttr then attrsToMarkdown attr else empty -- | Ordered list start parser for use in Para below. olMarker :: Parser [Char] ParserState Char olMarker = do (start, style', delim) <- anyOrderedListMarker if delim == Period && (style' == UpperAlpha || (style' == UpperRoman && start `elem` [1, 5, 10, 50, 100, 500, 1000])) then spaceChar >> spaceChar else spaceChar -- | True if string begins with an ordered list marker beginsWithOrderedListMarker :: String -> Bool beginsWithOrderedListMarker str = case runParser olMarker defaultParserState "para start" (take 10 str) of Left _ -> False Right _ -> True notesAndRefs :: WriterOptions -> MD Doc notesAndRefs opts = do notes' <- reverse <$> gets stNotes >>= notesToMarkdown opts modify $ \s -> s { stNotes = [] } refs' <- reverse <$> gets stRefs >>= refsToMarkdown opts modify $ \s -> s { stRefs = [] } let endSpacing = if | writerReferenceLocation opts == EndOfDocument -> empty | isEmpty notes' && isEmpty refs' -> empty | otherwise -> blankline return $ (if isEmpty notes' then empty else blankline <> notes') <> (if isEmpty refs' then empty else blankline <> refs') <> endSpacing -- | Convert Pandoc block element to markdown. blockToMarkdown :: WriterOptions -- ^ Options -> Block -- ^ Block element -> MD Doc blockToMarkdown opts blk = local (\env -> env {envBlockLevel = envBlockLevel env + 1}) $ do doc <- blockToMarkdown' opts blk blkLevel <- asks envBlockLevel if writerReferenceLocation opts == EndOfBlock && blkLevel == 1 then notesAndRefs opts >>= (\d -> return $ doc <> d) else return doc blockToMarkdown' :: WriterOptions -- ^ Options -> Block -- ^ Block element -> MD Doc blockToMarkdown' _ Null = return empty blockToMarkdown' opts (Div attrs ils) = do contents <- blockListToMarkdown opts ils return $ if isEnabled Ext_raw_html opts && isEnabled Ext_markdown_in_html_blocks opts then tagWithAttrs "div" attrs <> blankline <> contents <> blankline <> "
          " <> blankline else contents <> blankline blockToMarkdown' opts (Plain inlines) = do contents <- inlineListToMarkdown opts inlines -- escape if para starts with ordered list marker isPlain <- asks envPlain let colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing let rendered = render colwidth contents let escapeDelimiter (x:xs) | x `elem` (".()" :: String) = '\\':x:xs | otherwise = x : escapeDelimiter xs escapeDelimiter [] = [] let contents' = if isEnabled Ext_all_symbols_escapable opts && not isPlain && beginsWithOrderedListMarker rendered then text $ escapeDelimiter rendered else contents return $ contents' <> cr -- title beginning with fig: indicates figure blockToMarkdown' opts (Para [Image attr alt (src,'f':'i':'g':':':tit)]) = blockToMarkdown opts (Para [Image attr alt (src,tit)]) blockToMarkdown' opts (Para inlines) = (<> blankline) `fmap` blockToMarkdown opts (Plain inlines) blockToMarkdown' opts (LineBlock lns) = if isEnabled Ext_line_blocks opts then do mdLines <- mapM (inlineListToMarkdown opts) lns return $ (vcat $ map (hang 2 (text "| ")) mdLines) <> blankline else blockToMarkdown opts $ linesToPara lns blockToMarkdown' opts (RawBlock f str) | f == "markdown" = return $ text str <> text "\n" | f == "html" && isEnabled Ext_raw_html opts = do plain <- asks envPlain return $ if plain then empty else if isEnabled Ext_markdown_attribute opts then text (addMarkdownAttribute str) <> text "\n" else text str <> text "\n" | f `elem` ["latex", "tex"] && isEnabled Ext_raw_tex opts = do plain <- asks envPlain return $ if plain then empty else text str <> text "\n" | otherwise = return empty blockToMarkdown' opts HorizontalRule = do return $ blankline <> text (replicate (writerColumns opts) '-') <> blankline blockToMarkdown' opts (Header level attr inlines) = do -- first, if we're putting references at the end of a section, we -- put them here. blkLevel <- asks envBlockLevel refs <- if writerReferenceLocation opts == EndOfSection && blkLevel == 1 then notesAndRefs opts else return empty plain <- asks envPlain -- we calculate the id that would be used by auto_identifiers -- so we know whether to print an explicit identifier ids <- gets stIds let autoId = uniqueIdent inlines ids modify $ \st -> st{ stIds = Set.insert autoId ids } let attr' = case attr of ("",[],[]) -> empty (id',[],[]) | isEnabled Ext_auto_identifiers opts && id' == autoId -> empty (id',_,_) | isEnabled Ext_mmd_header_identifiers opts -> space <> brackets (text id') _ | isEnabled Ext_header_attributes opts -> space <> attrsToMarkdown attr | otherwise -> empty contents <- inlineListToMarkdown opts $ if level == 1 && plain then capitalize inlines else inlines let setext = writerSetextHeaders opts hdr = nowrap $ case level of 1 | plain -> blanklines 3 <> contents <> blanklines 2 | setext -> contents <> attr' <> cr <> text (replicate (offset contents) '=') <> blankline 2 | plain -> blanklines 2 <> contents <> blankline | setext -> contents <> attr' <> cr <> text (replicate (offset contents) '-') <> blankline -- ghc interprets '#' characters in column 1 as linenum specifiers. _ | plain || isEnabled Ext_literate_haskell opts -> contents <> blankline _ -> text (replicate level '#') <> space <> contents <> attr' <> blankline return $ refs <> hdr blockToMarkdown' opts (CodeBlock (_,classes,_) str) | "haskell" `elem` classes && "literate" `elem` classes && isEnabled Ext_literate_haskell opts = return $ prefixed "> " (text str) <> blankline blockToMarkdown' opts (CodeBlock attribs str) = return $ case attribs == nullAttr of False | isEnabled Ext_backtick_code_blocks opts -> backticks <> attrs <> cr <> text str <> cr <> backticks <> blankline | isEnabled Ext_fenced_code_blocks opts -> tildes <> attrs <> cr <> text str <> cr <> tildes <> blankline _ -> nest (writerTabStop opts) (text str) <> blankline where tildes = text $ case [ln | ln <- lines str, all (=='~') ln] of [] -> "~~~~" xs -> case maximum $ map length xs of n | n < 3 -> "~~~~" | otherwise -> replicate (n+1) '~' backticks = text $ case [ln | ln <- lines str, all (=='`') ln] of [] -> "```" xs -> case maximum $ map length xs of n | n < 3 -> "```" | otherwise -> replicate (n+1) '`' attrs = if isEnabled Ext_fenced_code_attributes opts then nowrap $ " " <> attrsToMarkdown attribs else case attribs of (_,(cls:_),_) -> " " <> text cls _ -> empty blockToMarkdown' opts (BlockQuote blocks) = do plain <- asks envPlain -- if we're writing literate haskell, put a space before the bird tracks -- so they won't be interpreted as lhs... let leader = if isEnabled Ext_literate_haskell opts then " > " else if plain then " " else "> " contents <- blockListToMarkdown opts blocks return $ (prefixed leader contents) <> blankline blockToMarkdown' opts t@(Table caption aligns widths headers rows) = do caption' <- inlineListToMarkdown opts caption let caption'' = if null caption || not (isEnabled Ext_table_captions opts) then empty else blankline <> ": " <> caption' <> blankline rawHeaders <- mapM (blockListToMarkdown opts) headers rawRows <- mapM (mapM (blockListToMarkdown opts)) rows let isLineBreak LineBreak = Any True isLineBreak _ = Any False let isSimple = all (==0) widths && not ( getAny (query isLineBreak (headers:rows)) ) let isPlainBlock (Plain _) = True isPlainBlock _ = False let hasBlocks = not (all isPlainBlock $ concat . concat $ headers:rows) (nst,tbl) <- case True of _ | isSimple && isEnabled Ext_simple_tables opts -> fmap (nest 2,) $ pandocTable opts (all null headers) aligns widths rawHeaders rawRows | isSimple && isEnabled Ext_pipe_tables opts -> fmap (id,) $ pipeTable (all null headers) aligns rawHeaders rawRows | not hasBlocks && isEnabled Ext_multiline_tables opts -> fmap (nest 2,) $ pandocTable opts (all null headers) aligns widths rawHeaders rawRows | isEnabled Ext_grid_tables opts -> fmap (id,) $ gridTable opts (all null headers) aligns widths rawHeaders rawRows | isEnabled Ext_raw_html opts -> fmap (id,) $ return $ text $ writeHtmlString def $ Pandoc nullMeta [t] | otherwise -> return $ (id, text "[TABLE]") return $ nst $ tbl $$ blankline $$ caption'' $$ blankline blockToMarkdown' opts (BulletList items) = do contents <- inList $ mapM (bulletListItemToMarkdown opts) items return $ cat contents <> blankline blockToMarkdown' opts (OrderedList (start,sty,delim) items) = do let start' = if isEnabled Ext_startnum opts then start else 1 let sty' = if isEnabled Ext_fancy_lists opts then sty else DefaultStyle let delim' = if isEnabled Ext_fancy_lists opts then delim else DefaultDelim let attribs = (start', sty', delim') let markers = orderedListMarkers attribs let markers' = map (\m -> if length m < 3 then m ++ replicate (3 - length m) ' ' else m) markers contents <- inList $ mapM (\(item, num) -> orderedListItemToMarkdown opts item num) $ zip markers' items return $ cat contents <> blankline blockToMarkdown' opts (DefinitionList items) = do contents <- inList $ mapM (definitionListItemToMarkdown opts) items return $ cat contents <> blankline inList :: MD a -> MD a inList p = local (\env -> env {envInList = True}) p addMarkdownAttribute :: String -> String addMarkdownAttribute s = case span isTagText $ reverse $ parseTags s of (xs,(TagOpen t attrs:rest)) -> renderTags' $ reverse rest ++ (TagOpen t attrs' : reverse xs) where attrs' = ("markdown","1"):[(x,y) | (x,y) <- attrs, x /= "markdown"] _ -> s pipeTable :: Bool -> [Alignment] -> [Doc] -> [[Doc]] -> MD Doc pipeTable headless aligns rawHeaders rawRows = do let sp = text " " let blockFor AlignLeft x y = lblock (x + 2) (sp <> y) <> lblock 0 empty blockFor AlignCenter x y = cblock (x + 2) (sp <> y) <> lblock 0 empty blockFor AlignRight x y = rblock (x + 2) (sp <> y) <> lblock 0 empty blockFor _ x y = lblock (x + 2) (sp <> y) <> lblock 0 empty let widths = map (max 3 . maximum . map offset) $ transpose (rawHeaders : rawRows) let torow cs = nowrap $ text "|" <> hcat (intersperse (text "|") $ zipWith3 blockFor aligns widths (map chomp cs)) <> text "|" let toborder (a, w) = text $ case a of AlignLeft -> ':':replicate (w + 1) '-' AlignCenter -> ':':replicate w '-' ++ ":" AlignRight -> replicate (w + 1) '-' ++ ":" AlignDefault -> replicate (w + 2) '-' -- note: pipe tables can't completely lack a -- header; for a headerless table, we need a header of empty cells. -- see jgm/pandoc#1996. let header = if headless then torow (replicate (length aligns) empty) else torow rawHeaders let border = nowrap $ text "|" <> hcat (intersperse (text "|") $ map toborder $ zip aligns widths) <> text "|" let body = vcat $ map torow rawRows return $ header $$ border $$ body pandocTable :: WriterOptions -> Bool -> [Alignment] -> [Double] -> [Doc] -> [[Doc]] -> MD Doc pandocTable opts headless aligns widths rawHeaders rawRows = do let isSimple = all (==0) widths let alignHeader alignment = case alignment of AlignLeft -> lblock AlignCenter -> cblock AlignRight -> rblock AlignDefault -> lblock -- Number of characters per column necessary to output every cell -- without requiring a line break. -- The @+2@ is needed for specifying the alignment. let numChars = (+ 2) . maximum . map offset -- Number of characters per column necessary to output every cell -- without requiring a line break *inside a word*. -- The @+2@ is needed for specifying the alignment. let minNumChars = (+ 2) . maximum . map minOffset let columns = transpose (rawHeaders : rawRows) -- minimal column width without wrapping a single word let noWordWrapWidth | writerWrapText opts == WrapAuto = fromIntegral $ maximum (map minNumChars columns) | otherwise = fromIntegral $ maximum (map numChars columns) let relWidth w = floor $ max (fromIntegral (writerColumns opts) * w) (noWordWrapWidth * w / minimum widths) let widthsInChars | isSimple = map numChars columns | otherwise = map relWidth widths let makeRow = hcat . intersperse (lblock 1 (text " ")) . (zipWith3 alignHeader aligns widthsInChars) let rows' = map makeRow rawRows let head' = makeRow rawHeaders let maxRowHeight = maximum $ map height (head':rows') let underline = cat $ intersperse (text " ") $ map (\width -> text (replicate width '-')) widthsInChars let border = if maxRowHeight > 1 then text (replicate (sum widthsInChars + length widthsInChars - 1) '-') else if headless then underline else empty let head'' = if headless then empty else border <> cr <> head' let body = if maxRowHeight > 1 then vsep rows' else vcat rows' let bottom = if headless then underline else border return $ head'' $$ underline $$ body $$ bottom gridTable :: WriterOptions -> Bool -> [Alignment] -> [Double] -> [Doc] -> [[Doc]] -> MD Doc gridTable opts headless aligns widths headers' rawRows = do let numcols = length headers' let widths' = if all (==0) widths then replicate numcols (1.0 / fromIntegral numcols) else widths let widthsInChars = map ((\x -> x - 3) . floor . (fromIntegral (writerColumns opts) *)) widths' let hpipeBlocks blocks = hcat [beg, middle, end] where h = maximum (1 : map height blocks) sep' = lblock 3 $ vcat (map text $ replicate h " | ") beg = lblock 2 $ vcat (map text $ replicate h "| ") end = lblock 2 $ vcat (map text $ replicate h " |") middle = chomp $ hcat $ intersperse sep' blocks let makeRow = hpipeBlocks . zipWith lblock widthsInChars let head' = makeRow headers' let rows' = map (makeRow . map chomp) rawRows let borderpart ch align widthInChars = let widthInChars' = if widthInChars < 1 then 1 else widthInChars in (if (align == AlignLeft || align == AlignCenter) then char ':' else char ch) <> text (replicate widthInChars' ch) <> (if (align == AlignRight || align == AlignCenter) then char ':' else char ch) let border ch aligns' widthsInChars' = char '+' <> hcat (intersperse (char '+') (zipWith (borderpart ch) aligns' widthsInChars')) <> char '+' let body = vcat $ intersperse (border '-' (repeat AlignDefault) widthsInChars) rows' let head'' = if headless then empty else head' $$ border '=' aligns widthsInChars if headless then return $ border '-' aligns widthsInChars $$ body $$ border '-' (repeat AlignDefault) widthsInChars else return $ border '-' (repeat AlignDefault) widthsInChars $$ head'' $$ body $$ border '-' (repeat AlignDefault) widthsInChars itemEndsWithTightList :: [Block] -> Bool itemEndsWithTightList bs = case bs of [Plain _, BulletList xs] -> isTightList xs [Plain _, OrderedList _ xs] -> isTightList xs _ -> False -- | Convert bullet list item (list of blocks) to markdown. bulletListItemToMarkdown :: WriterOptions -> [Block] -> MD Doc bulletListItemToMarkdown opts bs = do contents <- blockListToMarkdown opts bs let sps = replicate (writerTabStop opts - 2) ' ' let start = text ('-' : ' ' : sps) -- remove trailing blank line if item ends with a tight list let contents' = if itemEndsWithTightList bs then chomp contents <> cr else contents return $ hang (writerTabStop opts) start $ contents' <> cr -- | Convert ordered list item (a list of blocks) to markdown. orderedListItemToMarkdown :: WriterOptions -- ^ options -> String -- ^ list item marker -> [Block] -- ^ list item (list of blocks) -> MD Doc orderedListItemToMarkdown opts marker bs = do contents <- blockListToMarkdown opts bs let sps = case length marker - writerTabStop opts of n | n > 0 -> text $ replicate n ' ' _ -> text " " let start = text marker <> sps -- remove trailing blank line if item ends with a tight list let contents' = if itemEndsWithTightList bs then chomp contents <> cr else contents return $ hang (writerTabStop opts) start $ contents' <> cr -- | Convert definition list item (label, list of blocks) to markdown. definitionListItemToMarkdown :: WriterOptions -> ([Inline],[[Block]]) -> MD Doc definitionListItemToMarkdown opts (label, defs) = do labelText <- inlineListToMarkdown opts label defs' <- mapM (mapM (blockToMarkdown opts)) defs if isEnabled Ext_definition_lists opts then do let tabStop = writerTabStop opts isPlain <- asks envPlain let leader = if isPlain then " " else ": " let sps = case writerTabStop opts - 3 of n | n > 0 -> text $ replicate n ' ' _ -> text " " if isEnabled Ext_compact_definition_lists opts then do let contents = vcat $ map (\d -> hang tabStop (leader <> sps) $ vcat d <> cr) defs' return $ nowrap labelText <> cr <> contents <> cr else do let contents = vcat $ map (\d -> hang tabStop (leader <> sps) $ vcat d <> cr) defs' let isTight = case defs of ((Plain _ : _): _) -> True _ -> False return $ blankline <> nowrap labelText <> (if isTight then cr else blankline) <> contents <> blankline else do return $ nowrap labelText <> text " " <> cr <> vsep (map vsep defs') <> blankline -- | Convert list of Pandoc block elements to markdown. blockListToMarkdown :: WriterOptions -- ^ Options -> [Block] -- ^ List of block elements -> MD Doc blockListToMarkdown opts blocks = mapM (blockToMarkdown opts) (fixBlocks blocks) >>= return . cat -- insert comment between list and indented code block, or the -- code block will be treated as a list continuation paragraph where fixBlocks (b : CodeBlock attr x : rest) | (not (isEnabled Ext_fenced_code_blocks opts) || attr == nullAttr) && isListBlock b = b : commentSep : CodeBlock attr x : fixBlocks rest fixBlocks (b1@(BulletList _) : b2@(BulletList _) : bs) = b1 : commentSep : fixBlocks (b2:bs) fixBlocks (b1@(OrderedList _ _) : b2@(OrderedList _ _) : bs) = b1 : commentSep : fixBlocks (b2:bs) fixBlocks (b1@(DefinitionList _) : b2@(DefinitionList _) : bs) = b1 : commentSep : fixBlocks (b2:bs) fixBlocks (x : xs) = x : fixBlocks xs fixBlocks [] = [] isListBlock (BulletList _) = True isListBlock (OrderedList _ _) = True isListBlock (DefinitionList _) = True isListBlock _ = False commentSep = if isEnabled Ext_raw_html opts then RawBlock "html" "\n" else RawBlock "markdown" " " -- | Get reference for target; if none exists, create unique one and return. -- Prefer label if possible; otherwise, generate a unique key. getReference :: Attr -> [Inline] -> Target -> MD [Inline] getReference attr label target = do st <- get case find (\(_,t,a) -> t == target && a == attr) (stRefs st) of Just (ref, _, _) -> return ref Nothing -> do let label' = case find (\(l,_,_) -> l == label) (stRefs st) of Just _ -> -- label is used; generate numerical label case find (\n -> notElem [Str (show n)] (map (\(l,_,_) -> l) (stRefs st))) [1..(10000 :: Integer)] of Just x -> [Str (show x)] Nothing -> error "no unique label" Nothing -> label modify (\s -> s{ stRefs = (label', target, attr) : stRefs st }) return label' -- | Convert list of Pandoc inline elements to markdown. inlineListToMarkdown :: WriterOptions -> [Inline] -> MD Doc inlineListToMarkdown opts lst = do inlist <- asks envInList go (if inlist then avoidBadWrapsInList lst else lst) where go [] = return empty go (i:is) = case i of (Link _ _ _) -> case is of -- If a link is followed by another link or '[' we don't shortcut (Link _ _ _):_ -> unshortcutable Space:(Link _ _ _):_ -> unshortcutable Space:(Str('[':_)):_ -> unshortcutable Space:(RawInline _ ('[':_)):_ -> unshortcutable Space:(Cite _ _):_ -> unshortcutable SoftBreak:(Link _ _ _):_ -> unshortcutable SoftBreak:(Str('[':_)):_ -> unshortcutable SoftBreak:(RawInline _ ('[':_)):_ -> unshortcutable SoftBreak:(Cite _ _):_ -> unshortcutable (Cite _ _):_ -> unshortcutable Str ('[':_):_ -> unshortcutable (RawInline _ ('[':_)):_ -> unshortcutable (RawInline _ (' ':'[':_)):_ -> unshortcutable _ -> shortcutable _ -> shortcutable where shortcutable = liftM2 (<>) (inlineToMarkdown opts i) (go is) unshortcutable = do iMark <- local (\env -> env { envRefShortcutable = False }) (inlineToMarkdown opts i) fmap (iMark <>) (go is) isSp :: Inline -> Bool isSp Space = True isSp SoftBreak = True isSp _ = False avoidBadWrapsInList :: [Inline] -> [Inline] avoidBadWrapsInList [] = [] avoidBadWrapsInList (s:Str ('>':cs):xs) | isSp s = Str (' ':'>':cs) : avoidBadWrapsInList xs avoidBadWrapsInList (s:Str [c]:[]) | isSp s && c `elem` ['-','*','+'] = Str [' ', c] : [] avoidBadWrapsInList (s:Str [c]:Space:xs) | isSp s && c `elem` ['-','*','+'] = Str [' ', c] : Space : avoidBadWrapsInList xs avoidBadWrapsInList (s:Str cs:Space:xs) | isSp s && isOrderedListMarker cs = Str (' ':cs) : Space : avoidBadWrapsInList xs avoidBadWrapsInList (s:Str cs:[]) | isSp s && isOrderedListMarker cs = Str (' ':cs) : [] avoidBadWrapsInList (x:xs) = x : avoidBadWrapsInList xs isOrderedListMarker :: String -> Bool isOrderedListMarker xs = (last xs `elem` ['.',')']) && isRight (runParser (anyOrderedListMarker >> eof) defaultParserState "" xs) isRight :: Either a b -> Bool isRight (Right _) = True isRight (Left _) = False -- | Convert Pandoc inline element to markdown. inlineToMarkdown :: WriterOptions -> Inline -> MD Doc inlineToMarkdown opts (Span attrs ils) = do plain <- asks envPlain contents <- inlineListToMarkdown opts ils return $ case plain of True -> contents False | isEnabled Ext_bracketed_spans opts -> "[" <> contents <> "]" <> if attrs == nullAttr then "{}" else linkAttributes opts attrs | isEnabled Ext_raw_html opts || isEnabled Ext_native_spans opts -> tagWithAttrs "span" attrs <> contents <> text "" | otherwise -> contents inlineToMarkdown opts (Emph lst) = do plain <- asks envPlain contents <- inlineListToMarkdown opts lst return $ if plain then "_" <> contents <> "_" else "*" <> contents <> "*" inlineToMarkdown opts (Strong lst) = do plain <- asks envPlain if plain then inlineListToMarkdown opts $ capitalize lst else do contents <- inlineListToMarkdown opts lst return $ "**" <> contents <> "**" inlineToMarkdown opts (Strikeout lst) = do contents <- inlineListToMarkdown opts lst return $ if isEnabled Ext_strikeout opts then "~~" <> contents <> "~~" else if isEnabled Ext_raw_html opts then "" <> contents <> "" else contents inlineToMarkdown opts (Superscript lst) = local (\env -> env {envEscapeSpaces = True}) $ do contents <- inlineListToMarkdown opts lst return $ if isEnabled Ext_superscript opts then "^" <> contents <> "^" else if isEnabled Ext_raw_html opts then "" <> 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) = local (\env -> env {envEscapeSpaces = True}) $ do contents <- inlineListToMarkdown opts lst return $ if isEnabled Ext_subscript opts then "~" <> contents <> "~" else if isEnabled Ext_raw_html opts then "" <> 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 <- asks envPlain if not plain && (isEnabled Ext_raw_html opts || isEnabled Ext_native_spans opts) then do contents <- inlineListToMarkdown opts lst return $ tagWithAttrs "span" ("",[],[("style","font-variant:small-caps;")]) <> contents <> text "" else inlineListToMarkdown opts $ capitalize lst inlineToMarkdown opts (Quoted SingleQuote lst) = do contents <- inlineListToMarkdown opts lst return $ "‘" <> contents <> "’" inlineToMarkdown opts (Quoted DoubleQuote lst) = do contents <- inlineListToMarkdown opts lst return $ "“" <> contents <> "”" inlineToMarkdown opts (Code attr str) = do let tickGroups = filter (\s -> '`' `elem` s) $ group str let longest = if null tickGroups then 0 else maximum $ map length tickGroups let marker = replicate (longest + 1) '`' let spacer = if (longest == 0) then "" else " " let attrs = if isEnabled Ext_inline_code_attributes opts && attr /= nullAttr then attrsToMarkdown attr else empty plain <- asks envPlain if plain then return $ text str else return $ text (marker ++ spacer ++ str ++ spacer ++ marker) <> attrs inlineToMarkdown opts (Str str) = do isPlain <- asks envPlain if isPlain then return $ text str else return $ text $ escapeString opts str inlineToMarkdown opts (Math InlineMath str) = case writerHTMLMathMethod opts of WebTeX url -> inlineToMarkdown opts (Image nullAttr [Str str] (url ++ urlEncode str, str)) _ | isEnabled Ext_tex_math_dollars opts -> return $ "$" <> text str <> "$" | isEnabled Ext_tex_math_single_backslash opts -> return $ "\\(" <> text str <> "\\)" | isEnabled Ext_tex_math_double_backslash opts -> return $ "\\\\(" <> text str <> "\\\\)" | otherwise -> do plain <- asks envPlain inlineListToMarkdown opts $ (if plain then makeMathPlainer else id) $ texMathToInlines InlineMath str inlineToMarkdown opts (Math DisplayMath str) = case writerHTMLMathMethod opts of WebTeX url -> (\x -> blankline <> x <> blankline) `fmap` inlineToMarkdown opts (Image nullAttr [Str str] (url ++ urlEncode str, str)) _ | isEnabled Ext_tex_math_dollars opts -> return $ "$$" <> text str <> "$$" | isEnabled Ext_tex_math_single_backslash opts -> return $ "\\[" <> text str <> "\\]" | isEnabled Ext_tex_math_double_backslash opts -> return $ "\\\\[" <> text str <> "\\\\]" | otherwise -> (\x -> cr <> x <> cr) `fmap` inlineListToMarkdown opts (texMathToInlines DisplayMath str) inlineToMarkdown opts (RawInline f str) = do plain <- asks envPlain if not plain && ( f == "markdown" || (isEnabled Ext_raw_tex opts && (f == "latex" || f == "tex")) || (isEnabled Ext_raw_html opts && f == "html") ) then return $ text str else return empty inlineToMarkdown opts (LineBreak) = do plain <- asks envPlain if plain || isEnabled Ext_hard_line_breaks opts then return cr else return $ if isEnabled Ext_escaped_line_breaks opts then "\\" <> cr else " " <> cr inlineToMarkdown _ Space = do escapeSpaces <- asks envEscapeSpaces return $ if escapeSpaces then "\\ " else space inlineToMarkdown opts SoftBreak = do escapeSpaces <- asks envEscapeSpaces let space' = if escapeSpaces then "\\ " else space return $ case writerWrapText opts of WrapNone -> space' WrapAuto -> space' WrapPreserve -> cr inlineToMarkdown opts (Cite [] lst) = inlineListToMarkdown opts lst inlineToMarkdown opts (Cite (c:cs) lst) | not (isEnabled Ext_citations opts) = inlineListToMarkdown opts lst | otherwise = if citationMode c == AuthorInText then do suffs <- inlineListToMarkdown opts $ citationSuffix c rest <- mapM convertOne cs let inbr = suffs <+> joincits rest br = if isEmpty inbr then empty else char '[' <> inbr <> char ']' return $ text ("@" ++ citationId c) <+> br else do cits <- mapM convertOne (c:cs) return $ text "[" <> joincits cits <> text "]" where joincits = hcat . intersperse (text "; ") . filter (not . isEmpty) convertOne Citation { citationId = k , citationPrefix = pinlines , citationSuffix = sinlines , citationMode = m } = do pdoc <- inlineListToMarkdown opts pinlines sdoc <- inlineListToMarkdown opts sinlines let k' = text (modekey m ++ "@" ++ k) r = case sinlines of Str (y:_):_ | y `elem` (",;]@" :: String) -> k' <> sdoc _ -> k' <+> sdoc return $ pdoc <+> r modekey SuppressAuthor = "-" modekey _ = "" inlineToMarkdown opts lnk@(Link attr txt (src, tit)) | isEnabled Ext_raw_html opts && not (isEnabled Ext_link_attributes opts) && attr /= nullAttr = -- use raw HTML return $ text $ trim $ writeHtmlString def $ Pandoc nullMeta [Plain [lnk]] | otherwise = do plain <- asks envPlain linktext <- inlineListToMarkdown opts txt let linktitle = if null tit then empty else text $ " \"" ++ tit ++ "\"" let srcSuffix = fromMaybe src (stripPrefix "mailto:" src) let useAuto = isURI src && case txt of [Str s] | escapeURI s == srcSuffix -> True _ -> False let useRefLinks = writerReferenceLinks opts && not useAuto shortcutable <- asks envRefShortcutable let useShortcutRefLinks = shortcutable && isEnabled Ext_shortcut_reference_links opts ref <- if useRefLinks then getReference attr txt (src, tit) else return [] reftext <- inlineListToMarkdown opts ref return $ if useAuto then if plain then text srcSuffix else "<" <> text srcSuffix <> ">" else if useRefLinks then let first = "[" <> linktext <> "]" second = if txt == ref then if useShortcutRefLinks then "" else "[]" else "[" <> reftext <> "]" in first <> second else if plain then linktext else "[" <> linktext <> "](" <> text src <> linktitle <> ")" <> linkAttributes opts attr inlineToMarkdown opts img@(Image attr alternate (source, tit)) | isEnabled Ext_raw_html opts && not (isEnabled Ext_link_attributes opts) && attr /= nullAttr = -- use raw HTML return $ text $ trim $ writeHtmlString def $ Pandoc nullMeta [Plain [img]] | otherwise = do plain <- asks envPlain let txt = if null alternate || alternate == [Str source] -- to prevent autolinks then [Str ""] else alternate linkPart <- inlineToMarkdown opts (Link attr txt (source, tit)) return $ if plain then "[" <> linkPart <> "]" else "!" <> linkPart inlineToMarkdown opts (Note contents) = do modify (\st -> st{ stNotes = contents : stNotes st }) st <- get let ref = text $ writerIdentifierPrefix opts ++ show (stNoteNum st + (length $ stNotes st) - 1) if isEnabled Ext_footnotes opts then return $ "[^" <> ref <> "]" else return $ "[" <> ref <> "]" makeMathPlainer :: [Inline] -> [Inline] makeMathPlainer = walk go where go (Emph xs) = Span nullAttr xs go x = x pandoc-1.19.2.4/src/Text/Pandoc/Writers/CommonMark.hs0000644000000000000000000001712613155240142020361 0ustar0000000000000000{- Copyright (C) 2015 John MacFarlane 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.Writers.CommonMark Copyright : Copyright (C) 2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to CommonMark. CommonMark: -} module Text.Pandoc.Writers.CommonMark (writeCommonMark) where import Text.Pandoc.Writers.HTML (writeHtmlString) import Text.Pandoc.Definition import Text.Pandoc.Shared (isTightList, linesToPara) import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.Writers.Shared import Text.Pandoc.Options import CMark import qualified Data.Text as T import Control.Monad.Identity (runIdentity, Identity) import Control.Monad.State (runState, State, modify, get) import Text.Pandoc.Walk (walkM) -- | Convert Pandoc to CommonMark. writeCommonMark :: WriterOptions -> Pandoc -> String writeCommonMark opts (Pandoc meta blocks) = rendered where main = runIdentity $ blocksToCommonMark opts (blocks' ++ notes') (blocks', notes) = runState (walkM processNotes blocks) [] notes' = if null notes then [] else [OrderedList (1, Decimal, Period) $ reverse notes] metadata = runIdentity $ metaToJSON opts (blocksToCommonMark opts) (inlinesToCommonMark opts) meta context = defField "body" main $ metadata rendered = case writerTemplate opts of Nothing -> main Just tpl -> renderTemplate' tpl context processNotes :: Inline -> State [[Block]] Inline processNotes (Note bs) = do modify (bs :) notes <- get return $ Str $ "[" ++ show (length notes) ++ "]" processNotes x = return x node :: NodeType -> [Node] -> Node node = Node Nothing blocksToCommonMark :: WriterOptions -> [Block] -> Identity String blocksToCommonMark opts bs = return $ T.unpack $ nodeToCommonmark cmarkOpts colwidth $ node DOCUMENT (blocksToNodes bs) where cmarkOpts = [optHardBreaks | isEnabled Ext_hard_line_breaks opts] colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing inlinesToCommonMark :: WriterOptions -> [Inline] -> Identity String inlinesToCommonMark opts ils = return $ T.unpack $ nodeToCommonmark cmarkOpts colwidth $ node PARAGRAPH (inlinesToNodes ils) where cmarkOpts = [optHardBreaks | isEnabled Ext_hard_line_breaks opts] colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing blocksToNodes :: [Block] -> [Node] blocksToNodes = foldr blockToNodes [] blockToNodes :: Block -> [Node] -> [Node] blockToNodes (Plain xs) = (node PARAGRAPH (inlinesToNodes xs) :) blockToNodes (Para xs) = (node PARAGRAPH (inlinesToNodes xs) :) blockToNodes (LineBlock lns) = blockToNodes $ linesToPara lns blockToNodes (CodeBlock (_,classes,_) xs) = (node (CODE_BLOCK (T.pack (unwords classes)) (T.pack xs)) [] :) blockToNodes (RawBlock fmt xs) | fmt == Format "html" = (node (HTML_BLOCK (T.pack xs)) [] :) | otherwise = (node (CUSTOM_BLOCK (T.pack xs) (T.empty)) [] :) blockToNodes (BlockQuote bs) = (node BLOCK_QUOTE (blocksToNodes bs) :) blockToNodes (BulletList items) = (node (LIST ListAttributes{ listType = BULLET_LIST, listDelim = PERIOD_DELIM, listTight = isTightList items, listStart = 1 }) (map (node ITEM . blocksToNodes) items) :) blockToNodes (OrderedList (start, _sty, delim) items) = (node (LIST ListAttributes{ listType = ORDERED_LIST, listDelim = case delim of OneParen -> PAREN_DELIM TwoParens -> PAREN_DELIM _ -> PERIOD_DELIM, listTight = isTightList items, listStart = start }) (map (node ITEM . blocksToNodes) items) :) blockToNodes HorizontalRule = (node THEMATIC_BREAK [] :) blockToNodes (Header lev _ ils) = (node (HEADING lev) (inlinesToNodes ils) :) blockToNodes (Div _ bs) = (blocksToNodes bs ++) blockToNodes (DefinitionList items) = blockToNodes (BulletList items') where items' = map dlToBullet items dlToBullet (term, ((Para xs : ys) : zs)) = Para (term ++ [LineBreak] ++ xs) : ys ++ concat zs dlToBullet (term, ((Plain xs : ys) : zs)) = Plain (term ++ [LineBreak] ++ xs) : ys ++ concat zs dlToBullet (term, xs) = Para term : concat xs blockToNodes t@(Table _ _ _ _ _) = (node (HTML_BLOCK (T.pack $! writeHtmlString def $! Pandoc nullMeta [t])) [] :) blockToNodes Null = id inlinesToNodes :: [Inline] -> [Node] inlinesToNodes = foldr inlineToNodes [] inlineToNodes :: Inline -> [Node] -> [Node] inlineToNodes (Str s) = (node (TEXT (T.pack s)) [] :) inlineToNodes Space = (node (TEXT (T.pack " ")) [] :) inlineToNodes LineBreak = (node LINEBREAK [] :) inlineToNodes SoftBreak = (node SOFTBREAK [] :) inlineToNodes (Emph xs) = (node EMPH (inlinesToNodes xs) :) inlineToNodes (Strong xs) = (node STRONG (inlinesToNodes xs) :) inlineToNodes (Strikeout xs) = ((node (HTML_INLINE (T.pack "")) [] : inlinesToNodes xs ++ [node (HTML_INLINE (T.pack "")) []]) ++ ) inlineToNodes (Superscript xs) = ((node (HTML_INLINE (T.pack "")) [] : inlinesToNodes xs ++ [node (HTML_INLINE (T.pack "")) []]) ++ ) inlineToNodes (Subscript xs) = ((node (HTML_INLINE (T.pack "")) [] : inlinesToNodes xs ++ [node (HTML_INLINE (T.pack "")) []]) ++ ) inlineToNodes (SmallCaps xs) = ((node (HTML_INLINE (T.pack "")) [] : inlinesToNodes xs ++ [node (HTML_INLINE (T.pack "")) []]) ++ ) inlineToNodes (Link _ ils (url,tit)) = (node (LINK (T.pack url) (T.pack tit)) (inlinesToNodes ils) :) inlineToNodes (Image _ ils (url,tit)) = (node (IMAGE (T.pack url) (T.pack tit)) (inlinesToNodes ils) :) inlineToNodes (RawInline fmt xs) | fmt == Format "html" = (node (HTML_INLINE (T.pack xs)) [] :) | otherwise = (node (CUSTOM_INLINE (T.pack xs) (T.empty)) [] :) inlineToNodes (Quoted qt ils) = ((node (TEXT start) [] : inlinesToNodes ils ++ [node (TEXT end) []]) ++) where (start, end) = case qt of SingleQuote -> (T.pack "‘", T.pack "’") DoubleQuote -> (T.pack "“", T.pack "”") inlineToNodes (Code _ str) = (node (CODE (T.pack str)) [] :) inlineToNodes (Math mt str) = case mt of InlineMath -> (node (HTML_INLINE (T.pack ("\\(" ++ str ++ "\\)"))) [] :) DisplayMath -> (node (HTML_INLINE (T.pack ("\\[" ++ str ++ "\\]"))) [] :) inlineToNodes (Span _ ils) = (inlinesToNodes ils ++) inlineToNodes (Cite _ ils) = (inlinesToNodes ils ++) inlineToNodes (Note _) = id -- should not occur -- we remove Note elements in preprocessing pandoc-1.19.2.4/src/Text/Pandoc/Writers/Haddock.hs0000644000000000000000000003625613155240142017660 0ustar0000000000000000{-# LANGUAGE OverloadedStrings, TupleSections, ScopedTypeVariables #-} {- Copyright (C) 2014 John MacFarlane 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.Writers.Haddock Copyright : Copyright (C) 2014 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to haddock markup. Haddock: -} module Text.Pandoc.Writers.Haddock (writeHaddock) where import Text.Pandoc.Definition import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Options import Data.List ( intersperse, transpose ) import Text.Pandoc.Pretty import Control.Monad.State import Text.Pandoc.Readers.TeXMath (texMathToInlines) import Network.URI (isURI) import Data.Default type Notes = [[Block]] data WriterState = WriterState { stNotes :: Notes } instance Default WriterState where def = WriterState{ stNotes = [] } -- | Convert Pandoc to Haddock. writeHaddock :: WriterOptions -> Pandoc -> String writeHaddock opts document = evalState (pandocToHaddock opts{ writerWrapText = writerWrapText opts } document) def -- | Return haddock representation of document. pandocToHaddock :: WriterOptions -> Pandoc -> State WriterState String pandocToHaddock opts (Pandoc meta blocks) = do let colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing body <- blockListToHaddock opts blocks st <- get notes' <- notesToHaddock opts (reverse $ stNotes st) let render' :: Doc -> String render' = render colwidth let main = render' $ body <> (if isEmpty notes' then empty else blankline <> notes') metadata <- metaToJSON opts (fmap (render colwidth) . blockListToHaddock opts) (fmap (render colwidth) . inlineListToHaddock opts) meta let context = defField "body" main $ metadata case writerTemplate opts of Nothing -> return main Just tpl -> return $ renderTemplate' tpl context -- | Return haddock representation of notes. notesToHaddock :: WriterOptions -> [[Block]] -> State WriterState Doc notesToHaddock opts notes = if null notes then return empty else do contents <- blockToHaddock opts $ OrderedList (1,DefaultStyle,DefaultDelim) notes return $ text "#notes#" <> blankline <> contents -- | Escape special characters for Haddock. escapeString :: String -> String escapeString = escapeStringUsing haddockEscapes where haddockEscapes = backslashEscapes "\\/'`\"@<" -- | Convert Pandoc block element to haddock. blockToHaddock :: WriterOptions -- ^ Options -> Block -- ^ Block element -> State WriterState Doc blockToHaddock _ Null = return empty blockToHaddock opts (Div _ ils) = do contents <- blockListToHaddock opts ils return $ contents <> blankline blockToHaddock opts (Plain inlines) = do contents <- inlineListToHaddock opts inlines return $ contents <> cr -- title beginning with fig: indicates figure blockToHaddock opts (Para [Image attr alt (src,'f':'i':'g':':':tit)]) = blockToHaddock opts (Para [Image attr alt (src,tit)]) blockToHaddock opts (Para inlines) = -- TODO: if it contains linebreaks, we need to use a @...@ block (<> blankline) `fmap` blockToHaddock opts (Plain inlines) blockToHaddock opts (LineBlock lns) = blockToHaddock opts $ linesToPara lns blockToHaddock _ (RawBlock f str) | f == "haddock" = do return $ text str <> text "\n" | otherwise = return empty blockToHaddock opts HorizontalRule = return $ blankline <> text (replicate (writerColumns opts) '_') <> blankline blockToHaddock opts (Header level (ident,_,_) inlines) = do contents <- inlineListToHaddock opts inlines let attr' = if null ident then empty else cr <> text "#" <> text ident <> text "#" return $ nowrap (text (replicate level '=') <> space <> contents) <> attr' <> blankline blockToHaddock _ (CodeBlock (_,_,_) str) = return $ prefixed "> " (text str) <> blankline -- Nothing in haddock corresponds to block quotes: blockToHaddock opts (BlockQuote blocks) = blockListToHaddock opts blocks -- Haddock doesn't have tables. Use haddock tables in code. blockToHaddock opts (Table caption aligns widths headers rows) = do caption' <- inlineListToHaddock opts caption let caption'' = if null caption then empty else blankline <> caption' <> blankline rawHeaders <- mapM (blockListToHaddock opts) headers rawRows <- mapM (mapM (blockListToHaddock opts)) rows let isSimple = all (==0) widths let isPlainBlock (Plain _) = True isPlainBlock _ = False let hasBlocks = not (all isPlainBlock $ concat . concat $ headers:rows) (nst,tbl) <- case True of _ | isSimple -> fmap (nest 2,) $ pandocTable opts (all null headers) aligns widths rawHeaders rawRows | not hasBlocks -> fmap (nest 2,) $ pandocTable opts (all null headers) aligns widths rawHeaders rawRows | otherwise -> fmap (id,) $ gridTable opts (all null headers) aligns widths rawHeaders rawRows return $ (prefixed "> " $ nst $ tbl $$ blankline $$ caption'') $$ blankline blockToHaddock opts (BulletList items) = do contents <- mapM (bulletListItemToHaddock opts) items return $ cat contents <> blankline blockToHaddock opts (OrderedList (start,_,delim) items) = do let attribs = (start, Decimal, delim) let markers = orderedListMarkers attribs let markers' = map (\m -> if length m < 3 then m ++ replicate (3 - length m) ' ' else m) markers contents <- mapM (\(item, num) -> orderedListItemToHaddock opts item num) $ zip markers' items return $ cat contents <> blankline blockToHaddock opts (DefinitionList items) = do contents <- mapM (definitionListItemToHaddock opts) items return $ cat contents <> blankline pandocTable :: WriterOptions -> Bool -> [Alignment] -> [Double] -> [Doc] -> [[Doc]] -> State WriterState Doc pandocTable opts headless aligns widths rawHeaders rawRows = do let isSimple = all (==0) widths let alignHeader alignment = case alignment of AlignLeft -> lblock AlignCenter -> cblock AlignRight -> rblock AlignDefault -> lblock let numChars = maximum . map offset let widthsInChars = if isSimple then map ((+2) . numChars) $ transpose (rawHeaders : rawRows) else map (floor . (fromIntegral (writerColumns opts) *)) widths let makeRow = hcat . intersperse (lblock 1 (text " ")) . (zipWith3 alignHeader aligns widthsInChars) let rows' = map makeRow rawRows let head' = makeRow rawHeaders let maxRowHeight = maximum $ map height (head':rows') let underline = cat $ intersperse (text " ") $ map (\width -> text (replicate width '-')) widthsInChars let border = if maxRowHeight > 1 then text (replicate (sum widthsInChars + length widthsInChars - 1) '-') else if headless then underline else empty let head'' = if headless then empty else border <> cr <> head' let body = if maxRowHeight > 1 then vsep rows' else vcat rows' let bottom = if headless then underline else border return $ head'' $$ underline $$ body $$ bottom gridTable :: WriterOptions -> Bool -> [Alignment] -> [Double] -> [Doc] -> [[Doc]] -> State WriterState Doc gridTable opts headless _aligns widths headers' rawRows = do let numcols = length headers' let widths' = if all (==0) widths then replicate numcols (1.0 / fromIntegral numcols) else widths let widthsInChars = map (floor . (fromIntegral (writerColumns opts) *)) widths' let hpipeBlocks blocks = hcat [beg, middle, end] where h = maximum (map height blocks) sep' = lblock 3 $ vcat (map text $ replicate h " | ") beg = lblock 2 $ vcat (map text $ replicate h "| ") end = lblock 2 $ vcat (map text $ replicate h " |") middle = chomp $ hcat $ intersperse sep' blocks let makeRow = hpipeBlocks . zipWith lblock widthsInChars let head' = makeRow headers' let rows' = map (makeRow . map chomp) rawRows let border ch = char '+' <> char ch <> (hcat $ intersperse (char ch <> char '+' <> char ch) $ map (\l -> text $ replicate l ch) widthsInChars) <> char ch <> char '+' let body = vcat $ intersperse (border '-') rows' let head'' = if headless then empty else head' $$ border '=' return $ border '-' $$ head'' $$ body $$ border '-' -- | Convert bullet list item (list of blocks) to haddock bulletListItemToHaddock :: WriterOptions -> [Block] -> State WriterState Doc bulletListItemToHaddock opts items = do contents <- blockListToHaddock opts items let sps = replicate (writerTabStop opts - 2) ' ' let start = text ('-' : ' ' : sps) -- remove trailing blank line if it is a tight list let contents' = case reverse items of (BulletList xs:_) | isTightList xs -> chomp contents <> cr (OrderedList _ xs:_) | isTightList xs -> chomp contents <> cr _ -> contents return $ hang (writerTabStop opts) start $ contents' <> cr -- | Convert ordered list item (a list of blocks) to haddock orderedListItemToHaddock :: WriterOptions -- ^ options -> String -- ^ list item marker -> [Block] -- ^ list item (list of blocks) -> State WriterState Doc orderedListItemToHaddock opts marker items = do contents <- blockListToHaddock opts items let sps = case length marker - writerTabStop opts of n | n > 0 -> text $ replicate n ' ' _ -> text " " let start = text marker <> sps return $ hang (writerTabStop opts) start $ contents <> cr -- | Convert definition list item (label, list of blocks) to haddock definitionListItemToHaddock :: WriterOptions -> ([Inline],[[Block]]) -> State WriterState Doc definitionListItemToHaddock opts (label, defs) = do labelText <- inlineListToHaddock opts label defs' <- mapM (mapM (blockToHaddock opts)) defs let contents = vcat $ map (\d -> hang 4 empty $ vcat d <> cr) defs' return $ nowrap (brackets labelText) <> cr <> contents <> cr -- | Convert list of Pandoc block elements to haddock blockListToHaddock :: WriterOptions -- ^ Options -> [Block] -- ^ List of block elements -> State WriterState Doc blockListToHaddock opts blocks = mapM (blockToHaddock opts) blocks >>= return . cat -- | Convert list of Pandoc inline elements to haddock. inlineListToHaddock :: WriterOptions -> [Inline] -> State WriterState Doc inlineListToHaddock opts lst = mapM (inlineToHaddock opts) lst >>= return . cat -- | Convert Pandoc inline element to haddock. inlineToHaddock :: WriterOptions -> Inline -> State WriterState Doc inlineToHaddock opts (Span (ident,_,_) ils) = do contents <- inlineListToHaddock opts ils if not (null ident) && null ils then return $ "#" <> text ident <> "#" else return contents inlineToHaddock opts (Emph lst) = do contents <- inlineListToHaddock opts lst return $ "/" <> contents <> "/" inlineToHaddock opts (Strong lst) = do contents <- inlineListToHaddock opts lst return $ "__" <> contents <> "__" inlineToHaddock opts (Strikeout lst) = do contents <- inlineListToHaddock opts lst -- not supported in haddock, but we fake it: return $ "~~" <> contents <> "~~" -- not supported in haddock: inlineToHaddock opts (Superscript lst) = inlineListToHaddock opts lst -- not supported in haddock: inlineToHaddock opts (Subscript lst) = inlineListToHaddock opts lst -- not supported in haddock: inlineToHaddock opts (SmallCaps lst) = inlineListToHaddock opts lst inlineToHaddock opts (Quoted SingleQuote lst) = do contents <- inlineListToHaddock opts lst return $ "‘" <> contents <> "’" inlineToHaddock opts (Quoted DoubleQuote lst) = do contents <- inlineListToHaddock opts lst return $ "“" <> contents <> "”" inlineToHaddock _ (Code _ str) = return $ "@" <> text (escapeString str) <> "@" inlineToHaddock _ (Str str) = do return $ text $ escapeString str inlineToHaddock opts (Math mt str) = do let adjust x = case mt of DisplayMath -> cr <> x <> cr InlineMath -> x adjust `fmap` (inlineListToHaddock opts $ texMathToInlines mt str) inlineToHaddock _ (RawInline f str) | f == "haddock" = return $ text str | otherwise = return empty -- no line break in haddock (see above on CodeBlock) inlineToHaddock _ (LineBreak) = return cr inlineToHaddock opts SoftBreak = case writerWrapText opts of WrapAuto -> return space WrapNone -> return space WrapPreserve -> return cr inlineToHaddock _ Space = return space inlineToHaddock opts (Cite _ lst) = inlineListToHaddock opts lst inlineToHaddock _ (Link _ txt (src, _)) = do let linktext = text $ escapeString $ stringify txt let useAuto = isURI src && case txt of [Str s] | escapeURI s == src -> True _ -> False return $ nowrap $ "<" <> text src <> (if useAuto then empty else space <> linktext) <> ">" inlineToHaddock opts (Image attr alternate (source, tit)) = do linkhaddock <- inlineToHaddock opts (Link attr alternate (source, tit)) return $ "<" <> linkhaddock <> ">" -- haddock doesn't have notes, but we can fake it: inlineToHaddock opts (Note contents) = do modify (\st -> st{ stNotes = contents : stNotes st }) st <- get let ref = text $ writerIdentifierPrefix opts ++ show (length $ stNotes st) return $ "<#notes [" <> ref <> "]>" pandoc-1.19.2.4/src/Text/Pandoc/Writers/RST.hs0000644000000000000000000005356113155240142016771 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2006-2015 John MacFarlane 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.Writers.RST Copyright : Copyright (C) 2006-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to reStructuredText. reStructuredText: -} module Text.Pandoc.Writers.RST ( writeRST ) where import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.ImageSize import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.Builder (deleteMeta) import Data.Maybe (fromMaybe) import Data.List ( isPrefixOf, stripPrefix, intersperse, transpose ) import Network.URI (isURI) import Text.Pandoc.Pretty import Control.Monad.State import Data.Char (isSpace, toLower) type Refs = [([Inline], Target)] data WriterState = WriterState { stNotes :: [[Block]] , stLinks :: Refs , stImages :: [([Inline], (Attr, String, String, Maybe String))] , stHasMath :: Bool , stHasRawTeX :: Bool , stOptions :: WriterOptions , stTopLevel :: Bool } -- | Convert Pandoc to RST. writeRST :: WriterOptions -> Pandoc -> String writeRST opts document = let st = WriterState { stNotes = [], stLinks = [], stImages = [], stHasMath = False, stHasRawTeX = False, stOptions = opts, stTopLevel = True} in evalState (pandocToRST document) st -- | Return RST representation of document. pandocToRST :: Pandoc -> State WriterState String pandocToRST (Pandoc meta blocks) = do opts <- liftM stOptions get let colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing let subtit = case lookupMeta "subtitle" meta of Just (MetaBlocks [Plain xs]) -> xs _ -> [] title <- titleToRST (docTitle meta) subtit metadata <- metaToJSON opts (fmap (render colwidth) . blockListToRST) (fmap (trimr . render colwidth) . inlineListToRST) $ deleteMeta "title" $ deleteMeta "subtitle" meta body <- blockListToRST' True $ case writerTemplate opts of Just _ -> normalizeHeadings 1 blocks Nothing -> 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 pics <- liftM (reverse . stImages) get >>= pictRefsToRST hasMath <- liftM stHasMath get rawTeX <- liftM stHasRawTeX get let main = render colwidth $ foldl ($+$) empty $ [body, notes, refs, pics] let context = defField "body" main $ defField "toc" (writerTableOfContents opts) $ defField "toc-depth" (show $ writerTOCDepth opts) $ defField "math" hasMath $ defField "title" (render Nothing title :: String) $ defField "math" hasMath $ defField "rawtex" rawTeX $ metadata case writerTemplate opts of Nothing -> return main Just tpl -> return $ renderTemplate' tpl context where 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 normalizeHeadings lev (b:bs) = b:normalizeHeadings lev bs normalizeHeadings _ [] = [] -- | Return RST representation of reference key table. refsToRST :: Refs -> State WriterState Doc refsToRST refs = mapM keyToRST refs >>= return . vcat -- | Return RST representation of a reference key. keyToRST :: ([Inline], (String, String)) -> State WriterState Doc keyToRST (label, (src, _)) = do label' <- inlineListToRST label let label'' = if ':' `elem` ((render Nothing label') :: String) then char '`' <> label' <> char '`' else label' return $ nowrap $ ".. _" <> label'' <> ": " <> text src -- | Return RST representation of notes. notesToRST :: [[Block]] -> State WriterState Doc notesToRST notes = mapM (\(num, note) -> noteToRST num note) (zip [1..] notes) >>= return . vsep -- | Return RST representation of a note. noteToRST :: Int -> [Block] -> State WriterState Doc noteToRST num note = do contents <- blockListToRST note let marker = ".. [" <> text (show num) <> "]" return $ nowrap $ marker $$ nest 3 contents -- | Return RST representation of picture reference table. pictRefsToRST :: [([Inline], (Attr, String, String, Maybe String))] -> State WriterState Doc pictRefsToRST refs = mapM pictToRST refs >>= return . vcat -- | Return RST representation of a picture substitution reference. pictToRST :: ([Inline], (Attr, String, String, Maybe String)) -> State WriterState Doc pictToRST (label, (attr, src, _, mbtarget)) = do label' <- inlineListToRST label dims <- imageDimsToRST attr let (_, cls, _) = attr classes = if null cls then empty else ":class: " <> text (unwords cls) return $ nowrap $ ".. |" <> label' <> "| image:: " <> text src $$ hang 3 empty (classes $$ dims) $$ case mbtarget of Nothing -> empty Just t -> " :target: " <> text t -- | Escape special characters for RST. escapeString :: String -> String escapeString = escapeStringUsing (backslashEscapes "`\\|*_") titleToRST :: [Inline] -> [Inline] -> State WriterState Doc titleToRST [] _ = return empty titleToRST tit subtit = do title <- inlineListToRST tit subtitle <- inlineListToRST subtit return $ bordered title '=' $$ bordered subtitle '-' bordered :: Doc -> Char -> Doc bordered contents c = if len > 0 then border $$ contents $$ border else empty where len = offset contents border = text (replicate len c) -- | Convert Pandoc block element to RST. blockToRST :: Block -- ^ Block element -> State WriterState Doc blockToRST Null = return empty blockToRST (Div attr bs) = do contents <- blockListToRST bs let startTag = ".. raw:: html" $+$ nest 3 (tagWithAttrs "div" attr) let endTag = ".. raw:: html" $+$ nest 3 "
" return $ blankline <> startTag $+$ contents $+$ endTag $$ blankline blockToRST (Plain inlines) = inlineListToRST inlines -- title beginning with fig: indicates that the image is a figure blockToRST (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do capt <- inlineListToRST txt dims <- imageDimsToRST attr let fig = "figure:: " <> text src alt = ":alt: " <> if null tit then capt else text tit (_,cls,_) = attr classes = if null cls then empty else ":figclass: " <> text (unwords cls) return $ hang 3 ".. " (fig $$ alt $$ classes $$ dims $+$ capt) $$ blankline blockToRST (Para inlines) | LineBreak `elem` inlines = do -- use line block if LineBreaks linesToLineBlock $ splitBy (==LineBreak) inlines | otherwise = do contents <- inlineListToRST inlines return $ contents <> blankline blockToRST (LineBlock lns) = linesToLineBlock lns blockToRST (RawBlock f@(Format f') str) | f == "rst" = return $ text str | otherwise = return $ blankline <> ".. raw:: " <> text (map toLower f') $+$ (nest 3 $ text str) $$ blankline blockToRST HorizontalRule = return $ blankline $$ "--------------" $$ blankline blockToRST (Header level (name,classes,_) inlines) = do contents <- inlineListToRST inlines isTopLevel <- gets stTopLevel if isTopLevel then do let headerChar = if level > 5 then ' ' else "=-~^'" !! (level - 1) let border = text $ replicate (offset contents) headerChar return $ nowrap $ contents $$ border $$ blankline else do let rub = "rubric:: " <> contents let name' | null name = empty | otherwise = ":name: " <> text name let cls | null classes = empty | otherwise = ":class: " <> text (unwords classes) return $ nowrap $ hang 3 ".. " (rub $$ name' $$ cls) $$ blankline blockToRST (CodeBlock (_,classes,kvs) str) = do opts <- stOptions <$> get let tabstop = writerTabStop opts let startnum = maybe "" (\x -> " " <> text x) $ lookup "startFrom" kvs let numberlines = if "numberLines" `elem` classes then " :number-lines:" <> startnum else empty if "haskell" `elem` classes && "literate" `elem` classes && isEnabled Ext_literate_haskell opts then return $ prefixed "> " (text str) $$ blankline else return $ (case [c | c <- classes, c `notElem` ["sourceCode","literate","numberLines"]] of [] -> "::" (lang:_) -> (".. code:: " <> text lang) $$ numberlines) $+$ nest tabstop (text str) $$ blankline blockToRST (BlockQuote blocks) = do tabstop <- get >>= (return . writerTabStop . stOptions) contents <- blockListToRST blocks return $ (nest tabstop contents) <> blankline blockToRST (Table caption _ widths headers rows) = do caption' <- inlineListToRST caption let caption'' = if null caption then empty else blankline <> text "Table: " <> caption' headers' <- mapM blockListToRST headers rawRows <- mapM (mapM blockListToRST) rows -- let isSimpleCell [Plain _] = True -- isSimpleCell [Para _] = True -- isSimpleCell [] = True -- isSimpleCell _ = False -- let isSimple = all (==0) widths && all (all isSimpleCell) rows let numChars = maximum . map offset opts <- get >>= return . stOptions let widthsInChars = if all (== 0) widths then map ((+2) . numChars) $ transpose (headers' : rawRows) else map (floor . (fromIntegral (writerColumns opts) *)) widths let hpipeBlocks blocks = hcat [beg, middle, end] where h = height (hcat blocks) sep' = lblock 3 $ vcat (map text $ replicate h " | ") beg = lblock 2 $ vcat (map text $ replicate h "| ") end = lblock 2 $ vcat (map text $ replicate h " |") middle = hcat $ intersperse sep' blocks let makeRow = hpipeBlocks . zipWith lblock widthsInChars let head' = makeRow headers' let rows' = map makeRow rawRows let border ch = char '+' <> char ch <> (hcat $ intersperse (char ch <> char '+' <> char ch) $ map (\l -> text $ replicate l ch) widthsInChars) <> char ch <> char '+' let body = vcat $ intersperse (border '-') rows' let head'' = if all null headers then empty else head' $$ border '=' return $ border '-' $$ head'' $$ body $$ border '-' $$ caption'' $$ blankline blockToRST (BulletList items) = do contents <- mapM bulletListItemToRST items -- ensure that sublists have preceding blank line return $ blankline $$ chomp (vcat contents) $$ blankline blockToRST (OrderedList (start, style', delim) items) = do let markers = if start == 1 && style' == DefaultStyle && delim == DefaultDelim then take (length items) $ repeat "#." else take (length items) $ orderedListMarkers (start, style', delim) let maxMarkerLength = maximum $ map length markers let markers' = map (\m -> let s = maxMarkerLength - length m in m ++ replicate s ' ') markers contents <- mapM (\(item, num) -> orderedListItemToRST item num) $ zip markers' items -- ensure that sublists have preceding blank line return $ blankline $$ chomp (vcat contents) $$ blankline blockToRST (DefinitionList items) = do contents <- mapM definitionListItemToRST items -- ensure that sublists have preceding blank line return $ blankline $$ chomp (vcat contents) $$ blankline -- | Convert bullet list item (list of blocks) to RST. bulletListItemToRST :: [Block] -> State WriterState Doc bulletListItemToRST items = do contents <- blockListToRST items return $ hang 3 "- " $ contents <> cr -- | Convert ordered list item (a list of blocks) to RST. orderedListItemToRST :: String -- ^ marker for list item -> [Block] -- ^ list item (list of blocks) -> State WriterState Doc orderedListItemToRST marker items = do contents <- blockListToRST items let marker' = marker ++ " " return $ hang (length marker') (text marker') $ contents <> cr -- | Convert defintion list item (label, list of blocks) to RST. definitionListItemToRST :: ([Inline], [[Block]]) -> State WriterState Doc definitionListItemToRST (label, defs) = do label' <- inlineListToRST label contents <- liftM vcat $ mapM blockListToRST defs tabstop <- get >>= (return . writerTabStop . stOptions) return $ label' $$ nest tabstop (nestle contents <> cr) -- | Format a list of lines as line block. linesToLineBlock :: [[Inline]] -> State WriterState Doc linesToLineBlock inlineLines = do lns <- mapM inlineListToRST inlineLines return $ (vcat $ map (hang 2 (text "| ")) lns) <> blankline -- | Convert list of Pandoc block elements to RST. blockListToRST' :: Bool -> [Block] -- ^ List of block elements -> State WriterState Doc blockListToRST' topLevel blocks = do tl <- gets stTopLevel modify (\s->s{stTopLevel=topLevel}) res <- vcat `fmap` mapM blockToRST blocks modify (\s->s{stTopLevel=tl}) return res blockListToRST :: [Block] -- ^ List of block elements -> State WriterState Doc 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 where -- remove spaces after displaymath, as they screw up indentation: removeSpaceAfterDisplayMath (Math DisplayMath x : zs) = Math DisplayMath x : dropWhile (==Space) zs removeSpaceAfterDisplayMath (x:xs) = x : removeSpaceAfterDisplayMath xs removeSpaceAfterDisplayMath [] = [] insertBS :: [Inline] -> [Inline] -- insert '\ ' where needed insertBS (x:y: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) | isComplex y && not (okBeforeComplex x) = x : RawInline "rst" "\\ " : insertBS (y : zs) | otherwise = x : insertBS (y : zs) insertBS (x:ys) = x : insertBS ys insertBS [] = [] surroundComplex :: Inline -> Inline -> Bool surroundComplex (Str s@(_:_)) (Str s'@(_:_)) = case (last s, head s') of ('\'','\'') -> True ('"','"') -> True ('<','>') -> True ('[',']') -> True ('{','}') -> True _ -> False surroundComplex _ _ = False okAfterComplex :: Inline -> Bool okAfterComplex Space = True okAfterComplex SoftBreak = True okAfterComplex LineBreak = True okAfterComplex (Str (c:_)) = isSpace c || c `elem` ("-.,:;!?\\/'\")]}>–—" :: String) okAfterComplex _ = False okBeforeComplex :: Inline -> Bool okBeforeComplex Space = True okBeforeComplex SoftBreak = True okBeforeComplex LineBreak = True okBeforeComplex (Str (c:_)) = isSpace c || c `elem` ("-:/'\"<([{–—" :: String) okBeforeComplex _ = False isComplex :: Inline -> Bool isComplex (Emph _) = True isComplex (Strong _) = True isComplex (SmallCaps _) = True isComplex (Strikeout _) = True isComplex (Superscript _) = True isComplex (Subscript _) = True isComplex (Link _ _ _) = True 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. inlineToRST :: Inline -> State WriterState Doc inlineToRST (Span _ ils) = inlineListToRST ils inlineToRST (Emph lst) = do contents <- inlineListToRST lst return $ "*" <> contents <> "*" inlineToRST (Strong lst) = do contents <- inlineListToRST lst return $ "**" <> contents <> "**" inlineToRST (Strikeout lst) = do contents <- inlineListToRST lst return $ "[STRIKEOUT:" <> contents <> "]" inlineToRST (Superscript lst) = do contents <- inlineListToRST lst return $ ":sup:`" <> contents <> "`" inlineToRST (Subscript lst) = do contents <- inlineListToRST lst return $ ":sub:`" <> contents <> "`" inlineToRST (SmallCaps lst) = inlineListToRST lst inlineToRST (Quoted SingleQuote lst) = do contents <- inlineListToRST lst return $ "‘" <> contents <> "’" inlineToRST (Quoted DoubleQuote lst) = do contents <- inlineListToRST lst return $ "“" <> contents <> "”" inlineToRST (Cite _ lst) = inlineListToRST lst inlineToRST (Code _ str) = return $ "``" <> text str <> "``" inlineToRST (Str str) = return $ text $ escapeString str inlineToRST (Math t str) = do modify $ \st -> st{ stHasMath = True } return $ if t == InlineMath then ":math:`" <> text str <> "`" else if '\n' `elem` str then blankline $$ ".. math::" $$ blankline $$ nest 3 (text str) $$ blankline else blankline $$ (".. math:: " <> text str) $$ blankline inlineToRST (RawInline f x) | f == "rst" = return $ text x | f == "latex" || f == "tex" = do modify $ \st -> st{ stHasRawTeX = True } return $ ":raw-latex:`" <> text x <> "`" | otherwise = return empty inlineToRST (LineBreak) = return cr -- there's no line break in RST (see Para) inlineToRST Space = return space inlineToRST SoftBreak = do wrapText <- gets (writerWrapText . stOptions) case wrapText of WrapPreserve -> return cr WrapAuto -> return space WrapNone -> return space -- autolink inlineToRST (Link _ [Str str] (src, _)) | isURI src && if "mailto:" `isPrefixOf` src then src == escapeURI ("mailto:" ++ str) else src == escapeURI str = do let srcSuffix = fromMaybe src (stripPrefix "mailto:" src) return $ text srcSuffix inlineToRST (Link _ [Image attr alt (imgsrc,imgtit)] (src, _tit)) = do label <- registerImage attr alt (imgsrc,imgtit) (Just src) return $ "|" <> label <> "|" inlineToRST (Link _ txt (src, tit)) = do useReferenceLinks <- get >>= return . writerReferenceLinks . stOptions linktext <- inlineListToRST $ normalizeSpaces txt if useReferenceLinks then do refs <- get >>= return . stLinks case lookup txt refs of Just (src',tit') -> if src == src' && tit == tit' then return $ "`" <> linktext <> "`_" else do -- duplicate label, use non-reference link return $ "`" <> linktext <> " <" <> text src <> ">`__" Nothing -> do modify $ \st -> st { stLinks = (txt,(src,tit)):refs } return $ "`" <> linktext <> "`_" else return $ "`" <> linktext <> " <" <> text src <> ">`__" inlineToRST (Image attr alternate (source, tit)) = do label <- registerImage attr alternate (source,tit) Nothing return $ "|" <> label <> "|" inlineToRST (Note contents) = do -- add to notes in state notes <- gets stNotes modify $ \st -> st { stNotes = contents:notes } let ref = show $ (length notes) + 1 return $ " [" <> text ref <> "]_" registerImage :: Attr -> [Inline] -> Target -> Maybe String -> State WriterState Doc registerImage attr alt (src,tit) mbtarget = do pics <- get >>= return . stImages txt <- case lookup alt pics of Just (a,s,t,mbt) | (a,s,t,mbt) == (attr,src,tit,mbtarget) -> return alt _ -> do let alt' = if null alt || alt == [Str ""] then [Str $ "image" ++ show (length pics)] else alt modify $ \st -> st { stImages = (alt', (attr,src,tit, mbtarget)):stImages st } return alt' inlineListToRST txt imageDimsToRST :: Attr -> State WriterState Doc imageDimsToRST attr = do let (ident, _, _) = attr name = if null ident then empty else ":name: " <> text ident showDim dir = let cols d = ":" <> text (show dir) <> ": " <> text (show d) in case (dimension dir attr) of Just (Percent a) -> case dir of Height -> empty Width -> cols (Percent a) Just dim -> cols dim Nothing -> empty return $ cr <> name $$ showDim Width $$ showDim Height pandoc-1.19.2.4/src/Text/Pandoc/Writers/Org.hs0000644000000000000000000004104013155240142017035 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2010-2015 Puneeth Chaganti Albert Krewinkel , and John MacFarlane 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.Writers.Org Copyright : Copyright (C) 2010-2015 Puneeth Chaganti and John MacFarlane License : GNU GPL, version 2 or above Maintainer : Puneeth Chaganti Stability : alpha Portability : portable Conversion of 'Pandoc' documents to Emacs Org-Mode. Org-Mode: -} module Text.Pandoc.Writers.Org ( writeOrg) where import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Pretty import Text.Pandoc.Templates (renderTemplate') import Data.Char ( isAlphaNum, toLower ) import Data.List ( isPrefixOf, intersect, intersperse, partition, transpose ) import Control.Monad.State data WriterState = WriterState { stNotes :: [[Block]] , stLinks :: Bool , stImages :: Bool , stHasMath :: Bool , stOptions :: WriterOptions } -- | Convert Pandoc to Org. writeOrg :: WriterOptions -> Pandoc -> String writeOrg opts document = let st = WriterState { stNotes = [], stLinks = False, stImages = False, stHasMath = False, stOptions = opts } in evalState (pandocToOrg document) st -- | Return Org representation of document. pandocToOrg :: Pandoc -> State WriterState String pandocToOrg (Pandoc meta blocks) = do opts <- liftM stOptions get let colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing metadata <- metaToJSON opts (fmap (render colwidth) . blockListToOrg) (fmap (render colwidth) . inlineListToOrg) meta body <- blockListToOrg blocks notes <- liftM (reverse . stNotes) get >>= notesToOrg -- note that the notes may contain refs, so we do them first hasMath <- liftM stHasMath get let main = render colwidth $ foldl ($+$) empty $ [body, notes] let context = defField "body" main $ defField "math" hasMath $ metadata case writerTemplate opts of Nothing -> return main Just tpl -> return $ renderTemplate' tpl context -- | Return Org representation of notes. notesToOrg :: [[Block]] -> State WriterState Doc notesToOrg notes = mapM (\(num, note) -> noteToOrg num note) (zip [1..] notes) >>= return . vsep -- | Return Org representation of a note. noteToOrg :: Int -> [Block] -> State WriterState Doc noteToOrg num note = do contents <- blockListToOrg note let marker = "[fn:" ++ show num ++ "] " return $ hang (length marker) (text marker) contents -- | Escape special characters for Org. escapeString :: String -> String escapeString = escapeStringUsing $ [ ('\x2014',"---") , ('\x2013',"--") , ('\x2019',"'") , ('\x2026',"...") ] ++ backslashEscapes "^_" isRawFormat :: Format -> Bool isRawFormat f = f == Format "latex" || f == Format "tex" || f == Format "org" -- | Convert Pandoc block element to Org. blockToOrg :: Block -- ^ Block element -> State WriterState Doc blockToOrg Null = return empty blockToOrg (Div (_,classes@(cls:_),kvs) bs) | "drawer" `elem` classes = do contents <- blockListToOrg bs let drawerNameTag = ":" <> text cls <> ":" let keys = vcat $ map (\(k,v) -> ":" <> text k <> ":" <> space <> text v) kvs let drawerEndTag = text ":END:" return $ drawerNameTag $$ cr $$ keys $$ blankline $$ contents $$ blankline $$ drawerEndTag $$ blankline blockToOrg (Div attrs bs) = do contents <- blockListToOrg bs let isGreaterBlockClass = (`elem` ["center", "quote"]) . map toLower return $ case attrs of ("", [], []) -> -- nullAttr, treat contents as if it wasn't wrapped blankline $$ contents $$ blankline (ident, [], []) -> -- only an id: add id as an anchor, unwrap the rest blankline $$ "<<" <> text ident <> ">>" $$ contents $$ blankline (ident, classes, kv) -> -- if one class looks like the name of a greater block then output as -- such: The ID, if present, is added via the #+NAME keyword; other -- classes and key-value pairs are kept as #+ATTR_HTML attributes. let (blockTypeCand, classes') = partition isGreaterBlockClass classes in case blockTypeCand of (blockType:classes'') -> blankline $$ attrHtml (ident, classes'' <> classes', kv) $$ "#+BEGIN_" <> text blockType $$ contents $$ "#+END_" <> text blockType $$ blankline _ -> -- fallback: wrap in div tags let startTag = tagWithAttrs "div" attrs endTag = text "" in blankline $$ "#+BEGIN_HTML" $$ nest 2 startTag $$ "#+END_HTML" $$ blankline $$ contents $$ blankline $$ "#+BEGIN_HTML" $$ nest 2 endTag $$ "#+END_HTML" $$ blankline blockToOrg (Plain inlines) = inlineListToOrg inlines -- title beginning with fig: indicates that the image is a figure blockToOrg (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do capt <- if null txt then return empty else ("#+CAPTION: " <>) `fmap` inlineListToOrg txt img <- inlineToOrg (Image attr txt (src,tit)) return $ capt $$ img $$ blankline blockToOrg (Para inlines) = do contents <- inlineListToOrg inlines return $ contents <> blankline blockToOrg (LineBlock lns) = do let splitStanza [] = [] splitStanza xs = case break (== mempty) xs of (l, []) -> l : [] (l, _:r) -> l : splitStanza r let joinWithLinefeeds = nowrap . mconcat . intersperse cr let joinWithBlankLines = mconcat . intersperse blankline let prettyfyStanza ls = joinWithLinefeeds <$> mapM inlineListToOrg ls contents <- joinWithBlankLines <$> mapM prettyfyStanza (splitStanza lns) return $ blankline $$ "#+BEGIN_VERSE" $$ nest 2 contents $$ "#+END_VERSE" <> blankline blockToOrg (RawBlock "html" str) = return $ blankline $$ "#+BEGIN_HTML" $$ nest 2 (text str) $$ "#+END_HTML" $$ blankline blockToOrg (RawBlock f str) | isRawFormat f = return $ text str blockToOrg (RawBlock _ _) = return empty blockToOrg HorizontalRule = return $ blankline $$ "--------------" $$ blankline blockToOrg (Header level attr inlines) = do contents <- inlineListToOrg inlines let headerStr = text $ if level > 999 then " " else replicate level '*' let drawerStr = if attr == nullAttr then empty else cr <> nest (level + 1) (propertiesDrawer attr) return $ headerStr <> " " <> contents <> drawerStr <> blankline blockToOrg (CodeBlock (_,classes,_) str) = do opts <- stOptions <$> get let tabstop = writerTabStop opts let at = map pandocLangToOrg classes `intersect` orgLangIdentifiers let (beg, end) = case at of [] -> ("#+BEGIN_EXAMPLE", "#+END_EXAMPLE") (x:_) -> ("#+BEGIN_SRC " ++ x, "#+END_SRC") return $ text beg $$ nest tabstop (text str) $$ text end $$ blankline blockToOrg (BlockQuote blocks) = do contents <- blockListToOrg blocks return $ blankline $$ "#+BEGIN_QUOTE" $$ nest 2 contents $$ "#+END_QUOTE" $$ blankline blockToOrg (Table caption' _ _ headers rows) = do caption'' <- inlineListToOrg caption' let caption = if null caption' then empty else ("#+CAPTION: " <> caption'') headers' <- mapM blockListToOrg headers rawRows <- mapM (mapM blockListToOrg) rows let numChars = maximum . map offset -- FIXME: width is not being used. let widthsInChars = map ((+2) . numChars) $ transpose (headers' : rawRows) -- FIXME: Org doesn't allow blocks with height more than 1. let hpipeBlocks blocks = hcat [beg, middle, end] where h = maximum (1 : map height blocks) sep' = lblock 3 $ vcat (map text $ replicate h " | ") beg = lblock 2 $ vcat (map text $ replicate h "| ") end = lblock 2 $ vcat (map text $ replicate h " |") middle = hcat $ intersperse sep' blocks let makeRow = hpipeBlocks . zipWith lblock widthsInChars let head' = makeRow headers' rows' <- mapM (\row -> do cols <- mapM blockListToOrg row return $ makeRow cols) rows let border ch = char '|' <> char ch <> (hcat $ intersperse (char ch <> char '+' <> char ch) $ map (\l -> text $ replicate l ch) widthsInChars) <> char ch <> char '|' let body = vcat rows' let head'' = if all null headers then empty else head' $$ border '-' return $ head'' $$ body $$ caption $$ blankline blockToOrg (BulletList items) = do contents <- mapM bulletListItemToOrg items -- ensure that sublists have preceding blank line return $ blankline $+$ vcat contents $$ blankline blockToOrg (OrderedList (start, _, delim) items) = do let delim' = case delim of TwoParens -> OneParen x -> x let markers = take (length items) $ orderedListMarkers (start, Decimal, delim') let maxMarkerLength = maximum $ map length markers let markers' = map (\m -> let s = maxMarkerLength - length m in m ++ replicate s ' ') markers contents <- mapM (\(item, num) -> orderedListItemToOrg item num) $ zip markers' items -- ensure that sublists have preceding blank line return $ blankline $$ vcat contents $$ blankline blockToOrg (DefinitionList items) = do contents <- mapM definitionListItemToOrg items return $ vcat contents $$ blankline -- | Convert bullet list item (list of blocks) to Org. bulletListItemToOrg :: [Block] -> State WriterState Doc bulletListItemToOrg items = do contents <- blockListToOrg items return $ hang 3 "- " (contents <> cr) -- | Convert ordered list item (a list of blocks) to Org. orderedListItemToOrg :: String -- ^ marker for list item -> [Block] -- ^ list item (list of blocks) -> State WriterState Doc orderedListItemToOrg marker items = do contents <- blockListToOrg items return $ hang (length marker + 1) (text marker <> space) (contents <> cr) -- | Convert defintion list item (label, list of blocks) to Org. definitionListItemToOrg :: ([Inline], [[Block]]) -> State WriterState Doc definitionListItemToOrg (label, defs) = do label' <- inlineListToOrg label contents <- liftM vcat $ mapM blockListToOrg defs return $ hang 3 "- " $ label' <> " :: " <> (contents <> cr) -- | Convert list of key/value pairs to Org :PROPERTIES: drawer. propertiesDrawer :: Attr -> Doc propertiesDrawer (ident, classes, kv) = let drawerStart = text ":PROPERTIES:" drawerEnd = text ":END:" kv' = if (classes == mempty) then kv else ("CLASS", unwords classes):kv kv'' = if (ident == mempty) then kv' else ("CUSTOM_ID", ident):kv' properties = vcat $ map kvToOrgProperty kv'' in drawerStart <> cr <> properties <> cr <> drawerEnd where kvToOrgProperty :: (String, String) -> Doc kvToOrgProperty (key, value) = text ":" <> text key <> text ": " <> text value <> cr attrHtml :: Attr -> Doc attrHtml ("" , [] , []) = mempty attrHtml (ident, classes, kvs) = let name = if (null ident) then mempty else "#+NAME: " <> text ident <> cr keyword = "#+ATTR_HTML" classKv = ("class", unwords classes) kvStrings = map (\(k,v) -> ":" <> k <> " " <> v) (classKv:kvs) in name <> keyword <> ": " <> text (unwords kvStrings) <> cr -- | Convert list of Pandoc block elements to Org. blockListToOrg :: [Block] -- ^ List of block elements -> State WriterState Doc blockListToOrg blocks = mapM blockToOrg blocks >>= return . vcat -- | Convert list of Pandoc inline elements to Org. inlineListToOrg :: [Inline] -> State WriterState Doc inlineListToOrg lst = mapM inlineToOrg lst >>= return . hcat -- | Convert Pandoc inline element to Org. inlineToOrg :: Inline -> State WriterState Doc inlineToOrg (Span (uid, [], []) []) = return $ "<<" <> text uid <> ">>" inlineToOrg (Span _ lst) = inlineListToOrg lst inlineToOrg (Emph lst) = do contents <- inlineListToOrg lst return $ "/" <> contents <> "/" inlineToOrg (Strong lst) = do contents <- inlineListToOrg lst return $ "*" <> contents <> "*" inlineToOrg (Strikeout lst) = do contents <- inlineListToOrg lst return $ "+" <> contents <> "+" inlineToOrg (Superscript lst) = do contents <- inlineListToOrg lst return $ "^{" <> contents <> "}" inlineToOrg (Subscript lst) = do contents <- inlineListToOrg lst return $ "_{" <> contents <> "}" inlineToOrg (SmallCaps lst) = inlineListToOrg lst inlineToOrg (Quoted SingleQuote lst) = do contents <- inlineListToOrg lst return $ "'" <> contents <> "'" inlineToOrg (Quoted DoubleQuote lst) = do contents <- inlineListToOrg lst return $ "\"" <> contents <> "\"" inlineToOrg (Cite _ lst) = inlineListToOrg lst inlineToOrg (Code _ str) = return $ "=" <> text str <> "=" inlineToOrg (Str str) = return $ text $ escapeString str inlineToOrg (Math t str) = do modify $ \st -> st{ stHasMath = True } return $ if t == InlineMath then "$" <> text str <> "$" else "$$" <> text str <> "$$" inlineToOrg (RawInline f@(Format f') str) = return $ if isRawFormat f then text str else "@@" <> text f' <> ":" <> text str <> "@@" inlineToOrg (LineBreak) = return (text "\\\\" <> cr) inlineToOrg Space = return space inlineToOrg SoftBreak = do wrapText <- gets (writerWrapText . stOptions) case wrapText of WrapPreserve -> return cr WrapAuto -> return space WrapNone -> return space inlineToOrg (Link _ txt (src, _)) = do case txt of [Str x] | escapeURI x == src -> -- autolink do modify $ \s -> s{ stLinks = True } return $ "[[" <> text (orgPath x) <> "]]" _ -> do contents <- inlineListToOrg txt modify $ \s -> s{ stLinks = True } return $ "[[" <> text (orgPath src) <> "][" <> contents <> "]]" inlineToOrg (Image _ _ (source, _)) = do modify $ \s -> s{ stImages = True } return $ "[[" <> text (orgPath source) <> "]]" inlineToOrg (Note contents) = do -- add to notes in state notes <- get >>= (return . stNotes) modify $ \st -> st { stNotes = contents:notes } let ref = show $ (length notes) + 1 return $ "[fn:" <> text ref <> "]" orgPath :: String -> String orgPath src = case src of [] -> mempty -- wiki link ('#':xs) -> xs -- internal link _ | isUrl src -> src _ | isFilePath src -> src _ -> "file:" <> src where isFilePath :: String -> Bool isFilePath cs = any (`isPrefixOf` cs) ["/", "./", "../", "file:"] isUrl :: String -> Bool isUrl cs = let (scheme, path) = break (== ':') cs in all (\c -> isAlphaNum c || c `elem` (".-"::String)) scheme && not (null path) -- | Translate from pandoc's programming language identifiers to those used by -- org-mode. pandocLangToOrg :: String -> String pandocLangToOrg cs = case cs of "c" -> "C" "cpp" -> "C++" "commonlisp" -> "lisp" "r" -> "R" "bash" -> "sh" _ -> cs -- | List of language identifiers recognized by org-mode. orgLangIdentifiers :: [String] orgLangIdentifiers = [ "asymptote", "awk", "C", "C++", "clojure", "css", "d", "ditaa", "dot" , "calc", "emacs-lisp", "fortran", "gnuplot", "haskell", "java", "js" , "latex", "ledger", "lisp", "lilypond", "matlab", "mscgen", "ocaml" , "octave", "org", "oz", "perl", "plantuml", "processing", "python", "R" , "ruby", "sass", "scheme", "screen", "sed", "sh", "sql", "sqlite" ] pandoc-1.19.2.4/src/Text/Pandoc/Writers/AsciiDoc.hs0000644000000000000000000005024113155240142017767 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2006-2015 John MacFarlane 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.Writers.AsciiDoc Copyright : Copyright (C) 2006-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to asciidoc. Note that some information may be lost in conversion, due to expressive limitations of asciidoc. Footnotes and table cells with paragraphs (or other block items) are not possible in asciidoc. If pandoc encounters one of these, it will insert a message indicating that it has omitted the construct. AsciiDoc: -} module Text.Pandoc.Writers.AsciiDoc (writeAsciiDoc) where import Text.Pandoc.Definition import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Options import Text.Pandoc.Parsing hiding (blankline, space) import Data.Maybe (fromMaybe) import Data.List ( stripPrefix, intersperse, intercalate ) import Text.Pandoc.Pretty import Text.Pandoc.ImageSize 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 Data.Char (isSpace, isPunctuation) data WriterState = WriterState { defListMarker :: String , orderedListLevel :: Int , bulletListLevel :: Int , intraword :: Bool } -- | Convert Pandoc to AsciiDoc. writeAsciiDoc :: WriterOptions -> Pandoc -> String writeAsciiDoc opts document = evalState (pandocToAsciiDoc opts document) WriterState{ defListMarker = "::" , orderedListLevel = 1 , bulletListLevel = 1 , intraword = False } -- | Return asciidoc representation of document. pandocToAsciiDoc :: WriterOptions -> Pandoc -> State WriterState String pandocToAsciiDoc opts (Pandoc meta blocks) = do let titleblock = not $ null (docTitle meta) && null (docAuthors meta) && null (docDate meta) let colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing metadata <- metaToJSON opts (fmap (render colwidth) . blockListToAsciiDoc opts) (fmap (render colwidth) . inlineListToAsciiDoc opts) meta let addTitleLine (String t) = String $ t <> "\n" <> T.replicate (T.length t) "=" addTitleLine x = x let metadata' = case fromJSON metadata of Success m -> toJSON $ M.adjust addTitleLine ("title" :: T.Text) m _ -> metadata body <- blockListToAsciiDoc opts blocks let main = render colwidth body let context = defField "body" main $ defField "toc" (writerTableOfContents opts && writerTemplate opts /= Nothing) $ defField "titleblock" titleblock $ metadata' case writerTemplate opts of Nothing -> return main Just tpl -> return $ renderTemplate' tpl context -- | Escape special characters for AsciiDoc. escapeString :: String -> String escapeString = escapeStringUsing escs where escs = backslashEscapes "{" -- | Ordered list start parser for use in Para below. olMarker :: Parser [Char] ParserState Char olMarker = do (start, style', delim) <- anyOrderedListMarker if delim == Period && (style' == UpperAlpha || (style' == UpperRoman && start `elem` [1, 5, 10, 50, 100, 500, 1000])) then spaceChar >> spaceChar else spaceChar -- | True if string begins with an ordered list marker beginsWithOrderedListMarker :: String -> Bool beginsWithOrderedListMarker str = case runParser olMarker defaultParserState "para start" (take 10 str) of Left _ -> False Right _ -> True -- | Convert Pandoc block element to asciidoc. blockToAsciiDoc :: WriterOptions -- ^ Options -> Block -- ^ Block element -> State WriterState Doc blockToAsciiDoc _ Null = return empty blockToAsciiDoc opts (Plain inlines) = do contents <- inlineListToAsciiDoc opts inlines return $ contents <> blankline blockToAsciiDoc opts (Para [Image attr alt (src,'f':'i':'g':':':tit)]) = do blockToAsciiDoc opts (Para [Image attr alt (src,tit)]) blockToAsciiDoc opts (Para inlines) = do contents <- inlineListToAsciiDoc opts inlines -- escape if para starts with ordered list marker let esc = if beginsWithOrderedListMarker (render Nothing contents) then text "\\" else empty return $ esc <> contents <> blankline blockToAsciiDoc opts (LineBlock lns) = do let docify line = if null line then return blankline else inlineListToAsciiDoc opts line let joinWithLinefeeds = nowrap . mconcat . intersperse cr contents <- joinWithLinefeeds <$> mapM docify lns return $ "[verse]" $$ text "--" $$ contents $$ text "--" $$ blankline blockToAsciiDoc _ (RawBlock f s) | f == "asciidoc" = return $ text s | otherwise = return empty blockToAsciiDoc _ HorizontalRule = return $ blankline <> text "'''''" <> blankline blockToAsciiDoc opts (Header level (ident,_,_) inlines) = do contents <- inlineListToAsciiDoc opts inlines let len = offset contents -- ident seem to be empty most of the time and asciidoc will generate them automatically -- so lets make them not show up when null let identifier = if (null ident) then empty else ("[[" <> text ident <> "]]") let setext = writerSetextHeaders opts return $ (if setext then identifier $$ contents $$ (case level of 1 -> text $ replicate len '-' 2 -> text $ replicate len '~' 3 -> text $ replicate len '^' 4 -> text $ replicate len '+' _ -> empty) <> blankline else identifier $$ text (replicate level '=') <> space <> contents <> blankline) blockToAsciiDoc _ (CodeBlock (_,classes,_) str) = return $ (flush $ if null classes then "...." $$ text str $$ "...." else attrs $$ "----" $$ text str $$ "----") <> blankline where attrs = "[" <> text (intercalate "," ("source" : classes)) <> "]" blockToAsciiDoc opts (BlockQuote blocks) = do contents <- blockListToAsciiDoc opts blocks let isBlock (BlockQuote _) = True isBlock _ = False -- if there are nested block quotes, put in an open block let contents' = if any isBlock blocks then "--" $$ contents $$ "--" else contents let cols = offset contents' let bar = text $ replicate cols '_' return $ bar $$ chomp contents' $$ bar <> blankline blockToAsciiDoc opts (Table caption aligns widths headers rows) = do caption' <- inlineListToAsciiDoc opts caption let caption'' = if null caption then empty else "." <> caption' <> cr let isSimple = all (== 0) widths let relativePercentWidths = if isSimple then widths else map (/ (sum widths)) widths let widths'' :: [Integer] widths'' = map (floor . (* 100)) relativePercentWidths -- ensure that the widths sum to 100 let widths' = case widths'' of _ | isSimple -> widths'' (w:ws) | sum (w:ws) < 100 -> (100 - sum ws) : ws ws -> ws let totalwidth :: Integer totalwidth = floor $ sum widths * 100 let colspec al wi = (case al of AlignLeft -> "<" AlignCenter -> "^" AlignRight -> ">" AlignDefault -> "") ++ if wi == 0 then "" else (show wi ++ "%") let headerspec = if all null headers then empty else text "options=\"header\"," let widthspec = if totalwidth == 0 then empty else text "width=" <> doubleQuotes (text $ show totalwidth ++ "%") <> text "," let tablespec = text "[" <> widthspec <> text "cols=" <> doubleQuotes (text $ intercalate "," $ zipWith colspec aligns widths') <> text "," <> headerspec <> text "]" let makeCell [Plain x] = do d <- blockListToAsciiDoc opts [Plain x] return $ text "|" <> chomp d makeCell [Para x] = makeCell [Plain x] makeCell [] = return $ text "|" makeCell bs = do d <- blockListToAsciiDoc opts bs return $ text "a|" $$ d let makeRow cells = hsep `fmap` mapM makeCell cells rows' <- mapM makeRow rows head' <- makeRow headers let head'' = if all null headers then empty else head' let colwidth = if writerWrapText opts == WrapAuto then writerColumns opts else 100000 let maxwidth = maximum $ map offset (head':rows') let body = if maxwidth > colwidth then vsep rows' else vcat rows' let border = text $ "|" ++ replicate (max 5 (min maxwidth colwidth) - 1) '=' return $ caption'' $$ tablespec $$ border $$ head'' $$ body $$ border $$ blankline blockToAsciiDoc opts (BulletList items) = do contents <- mapM (bulletListItemToAsciiDoc opts) items return $ cat contents <> blankline blockToAsciiDoc opts (OrderedList (_start, sty, _delim) items) = do let sty' = case sty of UpperRoman -> UpperAlpha LowerRoman -> LowerAlpha x -> x let markers = orderedListMarkers (1, sty', Period) -- start num not used let markers' = map (\m -> if length m < 3 then m ++ replicate (3 - length m) ' ' else m) markers contents <- mapM (\(item, num) -> orderedListItemToAsciiDoc opts item num) $ zip markers' items return $ cat contents <> blankline blockToAsciiDoc opts (DefinitionList items) = do contents <- mapM (definitionListItemToAsciiDoc opts) items return $ cat contents <> blankline blockToAsciiDoc opts (Div (ident,_,_) bs) = do let identifier = if (null ident) then empty else ("[[" <> text ident <> "]]") contents <- blockListToAsciiDoc opts bs return $ identifier $$ contents -- | Convert bullet list item (list of blocks) to asciidoc. bulletListItemToAsciiDoc :: WriterOptions -> [Block] -> State WriterState Doc bulletListItemToAsciiDoc opts blocks = do let addBlock :: Doc -> Block -> State WriterState Doc addBlock d b | isEmpty d = chomp `fmap` blockToAsciiDoc opts b addBlock d b@(BulletList _) = do x <- blockToAsciiDoc opts b return $ d <> cr <> chomp x addBlock d b@(OrderedList _ _) = do x <- blockToAsciiDoc opts b return $ d <> cr <> chomp x addBlock d b = do x <- blockToAsciiDoc opts b return $ d <> cr <> text "+" <> cr <> chomp x lev <- bulletListLevel `fmap` get modify $ \s -> s{ bulletListLevel = lev + 1 } contents <- foldM addBlock empty blocks modify $ \s -> s{ bulletListLevel = lev } let marker = text (replicate lev '*') return $ marker <> text " " <> contents <> cr -- | Convert ordered list item (a list of blocks) to asciidoc. orderedListItemToAsciiDoc :: WriterOptions -- ^ options -> String -- ^ list item marker -> [Block] -- ^ list item (list of blocks) -> State WriterState Doc orderedListItemToAsciiDoc opts marker blocks = do let addBlock :: Doc -> Block -> State WriterState Doc addBlock d b | isEmpty d = chomp `fmap` blockToAsciiDoc opts b addBlock d b@(BulletList _) = do x <- blockToAsciiDoc opts b return $ d <> cr <> chomp x addBlock d b@(OrderedList _ _) = do x <- blockToAsciiDoc opts b return $ d <> cr <> chomp x addBlock d b = do x <- blockToAsciiDoc opts b return $ d <> cr <> text "+" <> cr <> chomp x lev <- orderedListLevel `fmap` get modify $ \s -> s{ orderedListLevel = lev + 1 } contents <- foldM addBlock empty blocks modify $ \s -> s{ orderedListLevel = lev } return $ text marker <> text " " <> contents <> cr -- | Convert definition list item (label, list of blocks) to asciidoc. definitionListItemToAsciiDoc :: WriterOptions -> ([Inline],[[Block]]) -> State WriterState Doc definitionListItemToAsciiDoc opts (label, defs) = do labelText <- inlineListToAsciiDoc opts label marker <- defListMarker `fmap` get if marker == "::" then modify (\st -> st{ defListMarker = ";;"}) else modify (\st -> st{ defListMarker = "::"}) let divider = cr <> text "+" <> cr let defsToAsciiDoc :: [Block] -> State WriterState Doc defsToAsciiDoc ds = (vcat . intersperse divider . map chomp) `fmap` mapM (blockToAsciiDoc opts) ds defs' <- mapM defsToAsciiDoc defs modify (\st -> st{ defListMarker = marker }) let contents = nest 2 $ vcat $ intersperse divider $ map chomp defs' return $ labelText <> text marker <> cr <> contents <> cr -- | Convert list of Pandoc block elements to asciidoc. blockListToAsciiDoc :: WriterOptions -- ^ Options -> [Block] -- ^ List of block elements -> State WriterState Doc blockListToAsciiDoc opts blocks = cat `fmap` mapM (blockToAsciiDoc opts) blocks data SpacyLocation = End | Start -- | Convert list of Pandoc inline elements to asciidoc. inlineListToAsciiDoc :: WriterOptions -> [Inline] -> State WriterState Doc inlineListToAsciiDoc opts lst = do oldIntraword <- gets intraword setIntraword False result <- go lst setIntraword oldIntraword return result where go [] = return empty go (y:x:xs) | not (isSpacy End y) = do y' <- if isSpacy Start x then inlineToAsciiDoc opts y else withIntraword $ inlineToAsciiDoc opts y x' <- withIntraword $ inlineToAsciiDoc opts x xs' <- go xs return (y' <> x' <> xs') | not (isSpacy Start x) = do y' <- withIntraword $ inlineToAsciiDoc opts y xs' <- go (x:xs) return (y' <> xs') go (x:xs) = do x' <- inlineToAsciiDoc opts x xs' <- go xs return (x' <> xs') isSpacy :: SpacyLocation -> Inline -> Bool isSpacy _ Space = True isSpacy _ LineBreak = True isSpacy _ SoftBreak = True -- Note that \W characters count as spacy in AsciiDoc -- for purposes of determining interword: isSpacy End (Str xs) = case reverse xs of c:_ -> isPunctuation c || isSpace c _ -> False isSpacy Start (Str (c:_)) = isPunctuation c || isSpace c isSpacy _ _ = False setIntraword :: Bool -> State WriterState () setIntraword b = modify $ \st -> st{ intraword = b } withIntraword :: State WriterState a -> State WriterState a withIntraword p = setIntraword True *> p <* setIntraword False -- | Convert Pandoc inline element to asciidoc. inlineToAsciiDoc :: WriterOptions -> Inline -> State WriterState Doc inlineToAsciiDoc opts (Emph lst) = do contents <- inlineListToAsciiDoc opts lst isIntraword <- gets intraword let marker = if isIntraword then "__" else "_" return $ marker <> contents <> marker inlineToAsciiDoc opts (Strong lst) = do contents <- inlineListToAsciiDoc opts lst isIntraword <- gets intraword let marker = if isIntraword then "**" else "*" return $ marker <> contents <> marker inlineToAsciiDoc opts (Strikeout lst) = do contents <- inlineListToAsciiDoc opts lst return $ "[line-through]*" <> contents <> "*" inlineToAsciiDoc opts (Superscript lst) = do contents <- inlineListToAsciiDoc opts lst return $ "^" <> contents <> "^" inlineToAsciiDoc opts (Subscript lst) = do contents <- inlineListToAsciiDoc opts lst return $ "~" <> contents <> "~" inlineToAsciiDoc opts (SmallCaps lst) = inlineListToAsciiDoc opts lst inlineToAsciiDoc opts (Quoted SingleQuote lst) = inlineListToAsciiDoc opts (Str "`" : lst ++ [Str "'"]) inlineToAsciiDoc opts (Quoted DoubleQuote lst) = inlineListToAsciiDoc opts (Str "``" : lst ++ [Str "''"]) inlineToAsciiDoc _ (Code _ str) = return $ text "`" <> text (escapeStringUsing (backslashEscapes "`") str) <> "`" inlineToAsciiDoc _ (Str str) = return $ text $ escapeString str inlineToAsciiDoc _ (Math InlineMath str) = return $ "latexmath:[$" <> text str <> "$]" inlineToAsciiDoc _ (Math DisplayMath str) = return $ "latexmath:[\\[" <> text str <> "\\]]" inlineToAsciiDoc _ (RawInline f s) | f == "asciidoc" = return $ text s | otherwise = return empty inlineToAsciiDoc _ (LineBreak) = return $ " +" <> cr inlineToAsciiDoc _ Space = return space inlineToAsciiDoc opts SoftBreak = case writerWrapText opts of WrapAuto -> return space WrapPreserve -> return cr WrapNone -> return space inlineToAsciiDoc opts (Cite _ lst) = inlineListToAsciiDoc opts lst inlineToAsciiDoc opts (Link _ txt (src, _tit)) = do -- relative: link:downloads/foo.zip[download foo.zip] -- abs: http://google.cod[Google] -- or my@email.com[email john] linktext <- inlineListToAsciiDoc opts txt let isRelative = ':' `notElem` src let prefix = if isRelative then text "link:" else empty let srcSuffix = fromMaybe src (stripPrefix "mailto:" src) let useAuto = case txt of [Str s] | escapeURI s == srcSuffix -> True _ -> False return $ if useAuto then text srcSuffix else prefix <> text src <> "[" <> linktext <> "]" inlineToAsciiDoc opts (Image attr alternate (src, tit)) = do -- image:images/logo.png[Company logo, title="blah"] let txt = if (null alternate) || (alternate == [Str ""]) then [Str "image"] else alternate linktext <- inlineListToAsciiDoc opts txt let linktitle = if null tit then empty else ",title=\"" <> text tit <> "\"" showDim dir = case (dimension dir attr) of Just (Percent a) -> ["scaledwidth=" <> text (show (Percent a))] Just dim -> [text (show dir) <> "=" <> text (showInPixel opts dim)] Nothing -> [] dimList = showDim Width ++ showDim Height dims = if null dimList then empty else "," <> cat (intersperse "," dimList) return $ "image:" <> text src <> "[" <> linktext <> linktitle <> dims <> "]" inlineToAsciiDoc opts (Note [Para inlines]) = inlineToAsciiDoc opts (Note [Plain inlines]) inlineToAsciiDoc opts (Note [Plain inlines]) = do contents <- inlineListToAsciiDoc opts inlines return $ text "footnote:[" <> contents <> "]" -- asciidoc can't handle blank lines in notes inlineToAsciiDoc _ (Note _) = return "[multiblock footnote omitted]" inlineToAsciiDoc opts (Span (ident,_,_) ils) = do let identifier = if (null ident) then empty else ("[[" <> text ident <> "]]") contents <- inlineListToAsciiDoc opts ils return $ identifier <> contents pandoc-1.19.2.4/src/Text/Pandoc/Writers/Custom.hs0000644000000000000000000002437713155240142017576 0ustar0000000000000000{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE FlexibleInstances, OverloadedStrings, ScopedTypeVariables, DeriveDataTypeable, CPP #-} #if MIN_VERSION_base(4,8,0) #else {-# LANGUAGE OverlappingInstances #-} #endif {- Copyright (C) 2012-2015 John MacFarlane 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.Writers.Custom Copyright : Copyright (C) 2012-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to custom markup using a lua writer. -} module Text.Pandoc.Writers.Custom ( writeCustom ) where import Text.Pandoc.Definition import Text.Pandoc.Options import Data.List ( intersperse ) import Data.Char ( toLower ) import Data.Typeable 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 Control.Monad (when) import Control.Exception import qualified Data.Map as M import Text.Pandoc.Templates import GHC.IO.Encoding (getForeignEncoding,setForeignEncoding, utf8) attrToMap :: Attr -> M.Map String String attrToMap (id',classes,keyvals) = M.fromList $ ("id", id') : ("class", unwords classes) : keyvals #if MIN_VERSION_hslua(0,4,0) #if MIN_VERSION_base(4,8,0) instance {-# OVERLAPS #-} StackValue [Char] where #else instance StackValue [Char] where #endif push lua cs = Lua.push lua (UTF8.fromString cs) peek lua i = do res <- Lua.peek lua i return $ UTF8.toString `fmap` res valuetype _ = Lua.TSTRING #else #if MIN_VERSION_base(4,8,0) instance {-# OVERLAPS #-} StackValue a => StackValue [a] where #else instance StackValue a => StackValue [a] where #endif push lua xs = do Lua.createtable lua (length xs + 1) 0 let addValue (i, x) = Lua.push lua x >> Lua.rawseti lua (-2) i mapM_ addValue $ zip [1..] xs peek lua i = do top <- Lua.gettop lua let i' = if i < 0 then top + i + 1 else i Lua.pushnil lua lst <- getList lua i' Lua.pop lua 1 return (Just lst) valuetype _ = Lua.TTABLE getList :: StackValue a => LuaState -> Int -> IO [a] getList lua i' = do continue <- Lua.next lua i' if continue then do next <- Lua.peek lua (-1) Lua.pop lua 1 x <- maybe (fail "peek returned Nothing") return next rest <- getList lua i' return (x : rest) else return [] #endif instance StackValue Format where push lua (Format f) = Lua.push lua (map toLower f) peek l n = fmap Format `fmap` Lua.peek l n valuetype _ = Lua.TSTRING instance (StackValue a, StackValue b) => StackValue (M.Map a b) where push lua m = do let xs = M.toList m Lua.createtable lua (length xs + 1) 0 let addValue (k, v) = Lua.push lua k >> Lua.push lua v >> Lua.rawset lua (-3) mapM_ addValue xs peek _ _ = undefined -- not needed for our purposes valuetype _ = Lua.TTABLE instance (StackValue a, StackValue b) => StackValue (a,b) where push lua (k,v) = do Lua.createtable lua 2 0 Lua.push lua k Lua.push lua v Lua.rawset lua (-3) peek _ _ = undefined -- not needed for our purposes valuetype _ = Lua.TTABLE #if MIN_VERSION_base(4,8,0) instance {-# OVERLAPS #-} StackValue [Inline] where #else instance StackValue [Inline] where #endif push l ils = Lua.push l =<< inlineListToCustom l ils peek _ _ = undefined valuetype _ = Lua.TSTRING #if MIN_VERSION_base(4,8,0) instance {-# OVERLAPS #-} StackValue [Block] where #else instance StackValue [Block] where #endif push l ils = Lua.push l =<< blockListToCustom l ils peek _ _ = undefined valuetype _ = Lua.TSTRING instance StackValue MetaValue where push l (MetaMap m) = Lua.push l m push l (MetaList xs) = Lua.push l xs push l (MetaBool x) = Lua.push l x push l (MetaString s) = Lua.push l s push l (MetaInlines ils) = Lua.push l ils push l (MetaBlocks bs) = Lua.push l bs peek _ _ = undefined valuetype (MetaMap _) = Lua.TTABLE valuetype (MetaList _) = Lua.TTABLE valuetype (MetaBool _) = Lua.TBOOLEAN valuetype (MetaString _) = Lua.TSTRING valuetype (MetaInlines _) = Lua.TSTRING valuetype (MetaBlocks _) = Lua.TSTRING instance StackValue Citation where push lua cit = do Lua.createtable lua 6 0 let addValue (k :: String, v) = Lua.push lua k >> Lua.push lua v >> Lua.rawset lua (-3) addValue ("citationId", citationId cit) addValue ("citationPrefix", citationPrefix cit) addValue ("citationSuffix", citationSuffix cit) addValue ("citationMode", show (citationMode cit)) addValue ("citationNoteNum", citationNoteNum cit) addValue ("citationHash", citationHash cit) peek = undefined valuetype _ = Lua.TTABLE data PandocLuaException = PandocLuaException String deriving (Show, Typeable) instance Exception PandocLuaException -- | Convert Pandoc to custom markup. writeCustom :: FilePath -> WriterOptions -> Pandoc -> IO String writeCustom luaFile opts doc@(Pandoc meta _) = do luaScript <- UTF8.readFile luaFile enc <- getForeignEncoding setForeignEncoding utf8 lua <- Lua.newstate Lua.openlibs lua status <- Lua.loadstring lua luaScript luaFile -- check for error in lua script (later we'll change the return type -- to handle this more gracefully): when (status /= 0) $ #if MIN_VERSION_hslua(0,4,0) Lua.tostring lua 1 >>= throw . PandocLuaException . UTF8.toString #else Lua.tostring lua 1 >>= throw . PandocLuaException #endif Lua.call lua 0 0 -- TODO - call hierarchicalize, so we have that info rendered <- docToCustom lua opts doc context <- metaToJSON opts (blockListToCustom lua) (inlineListToCustom lua) meta Lua.close lua setForeignEncoding enc let body = rendered case writerTemplate opts of Nothing -> return body Just tpl -> return $ renderTemplate' tpl $ setField "body" body context docToCustom :: LuaState -> WriterOptions -> Pandoc -> IO String docToCustom lua opts (Pandoc (Meta metamap) blocks) = do body <- blockListToCustom lua blocks callfunc lua "Doc" body metamap (writerVariables opts) -- | Convert Pandoc block element to Custom. blockToCustom :: LuaState -- ^ Lua state -> Block -- ^ Block element -> IO String blockToCustom _ Null = return "" blockToCustom lua (Plain inlines) = callfunc lua "Plain" inlines blockToCustom lua (Para [Image attr txt (src,tit)]) = callfunc lua "CaptionedImage" src tit txt (attrToMap attr) blockToCustom lua (Para inlines) = callfunc lua "Para" inlines blockToCustom lua (LineBlock linesList) = callfunc lua "LineBlock" linesList blockToCustom lua (RawBlock format str) = callfunc lua "RawBlock" format str blockToCustom lua HorizontalRule = callfunc lua "HorizontalRule" blockToCustom lua (Header level attr inlines) = callfunc lua "Header" level inlines (attrToMap attr) blockToCustom lua (CodeBlock attr str) = callfunc lua "CodeBlock" str (attrToMap attr) blockToCustom lua (BlockQuote blocks) = callfunc lua "BlockQuote" blocks blockToCustom lua (Table capt aligns widths headers rows') = callfunc lua "Table" capt (map show aligns) widths headers rows' blockToCustom lua (BulletList items) = callfunc lua "BulletList" items blockToCustom lua (OrderedList (num,sty,delim) items) = callfunc lua "OrderedList" items num (show sty) (show delim) blockToCustom lua (DefinitionList items) = callfunc lua "DefinitionList" items blockToCustom lua (Div attr items) = callfunc lua "Div" items (attrToMap attr) -- | Convert list of Pandoc block elements to Custom. blockListToCustom :: LuaState -- ^ Options -> [Block] -- ^ List of block elements -> IO String blockListToCustom lua xs = do blocksep <- callfunc lua "Blocksep" bs <- mapM (blockToCustom lua) xs return $ mconcat $ intersperse blocksep bs -- | Convert list of Pandoc inline elements to Custom. inlineListToCustom :: LuaState -> [Inline] -> IO String inlineListToCustom lua lst = do xs <- mapM (inlineToCustom lua) lst return $ concat xs -- | Convert Pandoc inline element to Custom. inlineToCustom :: LuaState -> Inline -> IO String inlineToCustom lua (Str str) = callfunc lua "Str" str inlineToCustom lua Space = callfunc lua "Space" inlineToCustom lua SoftBreak = callfunc lua "SoftBreak" inlineToCustom lua (Emph lst) = callfunc lua "Emph" lst inlineToCustom lua (Strong lst) = callfunc lua "Strong" lst inlineToCustom lua (Strikeout lst) = callfunc lua "Strikeout" lst inlineToCustom lua (Superscript lst) = callfunc lua "Superscript" lst inlineToCustom lua (Subscript lst) = callfunc lua "Subscript" lst inlineToCustom lua (SmallCaps lst) = callfunc lua "SmallCaps" lst inlineToCustom lua (Quoted SingleQuote lst) = callfunc lua "SingleQuoted" lst inlineToCustom lua (Quoted DoubleQuote lst) = callfunc lua "DoubleQuoted" lst inlineToCustom lua (Cite cs lst) = callfunc lua "Cite" lst cs inlineToCustom lua (Code attr str) = callfunc lua "Code" str (attrToMap attr) inlineToCustom lua (Math DisplayMath str) = callfunc lua "DisplayMath" str inlineToCustom lua (Math InlineMath str) = callfunc lua "InlineMath" str inlineToCustom lua (RawInline format str) = callfunc lua "RawInline" format str inlineToCustom lua (LineBreak) = callfunc lua "LineBreak" inlineToCustom lua (Link attr txt (src,tit)) = callfunc lua "Link" txt src tit (attrToMap attr) inlineToCustom lua (Image attr alt (src,tit)) = callfunc lua "Image" alt src tit (attrToMap attr) inlineToCustom lua (Note contents) = callfunc lua "Note" contents inlineToCustom lua (Span attr items) = callfunc lua "Span" items (attrToMap attr) pandoc-1.19.2.4/src/Text/Pandoc/Writers/Textile.hs0000644000000000000000000004576213155240142017743 0ustar0000000000000000{- Copyright (C) 2010-2015 John MacFarlane 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.Writers.Textile Copyright : Copyright (C) 2010-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to Textile markup. Textile: -} module Text.Pandoc.Writers.Textile ( writeTextile ) where import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Shared import Text.Pandoc.Pretty (render) import Text.Pandoc.ImageSize import Text.Pandoc.Writers.Shared import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.XML ( escapeStringForXML ) import Data.List ( intercalate ) import Control.Monad.State 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 } -- | Convert Pandoc to Textile. writeTextile :: WriterOptions -> Pandoc -> String writeTextile opts document = evalState (pandocToTextile opts document) WriterState { stNotes = [], stListLevel = [], stStartNum = Nothing, stUseTags = False } -- | Return Textile representation of document. pandocToTextile :: WriterOptions -> Pandoc -> State WriterState String pandocToTextile opts (Pandoc meta blocks) = do metadata <- metaToJSON opts (blockListToTextile opts) (inlineListToTextile opts) meta body <- blockListToTextile opts blocks notes <- liftM (unlines . reverse . stNotes) get let main = body ++ if null notes then "" else ("\n\n" ++ notes) let context = defField "body" main metadata case writerTemplate opts of Nothing -> return main Just tpl -> return $ renderTemplate' tpl context withUseTags :: State WriterState a -> State WriterState a withUseTags action = do oldUseTags <- liftM stUseTags get modify $ \s -> s { stUseTags = True } result <- action modify $ \s -> s { stUseTags = oldUseTags } return result -- | Escape one character as needed for Textile. escapeCharForTextile :: Char -> String escapeCharForTextile x = case x of '&' -> "&" '<' -> "<" '>' -> ">" '"' -> """ '*' -> "*" '_' -> "_" '@' -> "@" '+' -> "+" '-' -> "-" '|' -> "|" '\x2014' -> " -- " '\x2013' -> " - " '\x2019' -> "'" '\x2026' -> "..." c -> [c] -- | Escape string as needed for Textile. escapeStringForTextile :: String -> String escapeStringForTextile = concatMap escapeCharForTextile -- | Convert Pandoc block element to Textile. blockToTextile :: WriterOptions -- ^ Options -> Block -- ^ Block element -> State WriterState String blockToTextile _ Null = return "" blockToTextile opts (Div attr bs) = do let startTag = render Nothing $ tagWithAttrs "div" attr let endTag = "" contents <- blockListToTextile opts bs return $ startTag ++ "\n\n" ++ contents ++ "\n\n" ++ endTag ++ "\n" blockToTextile opts (Plain inlines) = inlineListToTextile opts inlines -- title beginning with fig: indicates that the image is a figure blockToTextile opts (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do capt <- blockToTextile opts (Para txt) im <- inlineToTextile opts (Image attr txt (src,tit)) return $ im ++ "\n" ++ capt blockToTextile opts (Para inlines) = do useTags <- liftM stUseTags get listLevel <- liftM stListLevel get contents <- inlineListToTextile opts inlines return $ if useTags then "

" ++ contents ++ "

" else contents ++ if null listLevel then "\n" else "" blockToTextile opts (LineBlock lns) = blockToTextile opts $ linesToPara lns blockToTextile _ (RawBlock f str) | f == Format "html" || f == Format "textile" = return str | otherwise = return "" blockToTextile _ HorizontalRule = return "
\n" blockToTextile opts (Header level (ident,classes,keyvals) inlines) = do contents <- inlineListToTextile opts inlines let identAttr = if null ident then "" else ('#':ident) let attribs = if null identAttr && null classes then "" else "(" ++ unwords classes ++ identAttr ++ ")" let lang = maybe "" (\x -> "[" ++ x ++ "]") $ lookup "lang" keyvals let styles = maybe "" (\x -> "{" ++ x ++ "}") $ lookup "style" keyvals let prefix = 'h' : show level ++ attribs ++ styles ++ lang ++ ". " return $ prefix ++ contents ++ "\n" blockToTextile _ (CodeBlock (_,classes,_) str) | any (all isSpace) (lines str) = return $ "\n" ++ escapeStringForXML str ++ "\n\n" where classes' = if null classes then "" else " class=\"" ++ unwords classes ++ "\"" blockToTextile _ (CodeBlock (_,classes,_) str) = return $ "bc" ++ classes' ++ ". " ++ str ++ "\n\n" where classes' = if null classes then "" else "(" ++ unwords classes ++ ")" blockToTextile opts (BlockQuote bs@[Para _]) = do contents <- blockListToTextile opts bs return $ "bq. " ++ contents ++ "\n\n" blockToTextile opts (BlockQuote blocks) = do contents <- blockListToTextile opts blocks return $ "
\n\n" ++ contents ++ "\n
\n" blockToTextile opts (Table [] aligns widths headers rows') | all (==0) widths = do hs <- mapM (liftM (("_. " ++) . stripTrailingNewlines) . blockListToTextile opts) headers let cellsToRow cells = "|" ++ intercalate "|" cells ++ "|" let header = if all null headers then "" else cellsToRow hs ++ "\n" let blocksToCell (align, bs) = do contents <- stripTrailingNewlines <$> blockListToTextile opts bs let alignMarker = case align of AlignLeft -> "<. " AlignRight -> ">. " AlignCenter -> "=. " AlignDefault -> "" return $ alignMarker ++ contents let rowToCells = mapM blocksToCell . zip aligns bs <- mapM rowToCells rows' let body = unlines $ map cellsToRow bs return $ header ++ body blockToTextile opts (Table capt aligns widths headers rows') = do let alignStrings = map alignmentToString aligns captionDoc <- if null capt then return "" else do c <- inlineListToTextile opts capt return $ "" ++ c ++ "\n" let percent w = show (truncate (100*w) :: Integer) ++ "%" let coltags = if all (== 0.0) widths then "" else unlines $ map (\w -> "") widths head' <- if all null headers then return "" else do hs <- tableRowToTextile opts alignStrings 0 headers return $ "\n" ++ hs ++ "\n\n" body' <- zipWithM (tableRowToTextile opts alignStrings) [1..] rows' return $ "\n" ++ captionDoc ++ coltags ++ head' ++ "\n" ++ unlines body' ++ "\n
\n" blockToTextile opts x@(BulletList items) = do oldUseTags <- liftM stUseTags get let useTags = oldUseTags || not (isSimpleList x) if useTags then do contents <- withUseTags $ mapM (listItemToTextile opts) items return $ "
    \n" ++ vcat contents ++ "\n
\n" else do modify $ \s -> s { stListLevel = stListLevel s ++ "*" } level <- get >>= return . length . stListLevel contents <- mapM (listItemToTextile opts) items modify $ \s -> s { stListLevel = init (stListLevel s) } return $ vcat contents ++ (if level > 1 then "" else "\n") blockToTextile opts x@(OrderedList attribs@(start, _, _) items) = do oldUseTags <- liftM stUseTags get let useTags = oldUseTags || not (isSimpleList x) if useTags then do contents <- withUseTags $ mapM (listItemToTextile opts) items return $ "\n" ++ vcat contents ++ "\n\n" else do 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), stStartNum = Nothing } return $ vcat contents ++ (if level > 1 then "" else "\n") blockToTextile opts (DefinitionList items) = do contents <- withUseTags $ mapM (definitionListItemToTextile opts) items return $ "
\n" ++ vcat contents ++ "\n
\n" -- Auxiliary functions for lists: -- | Convert ordered list attributes to HTML attribute string listAttribsToString :: ListAttributes -> String listAttribsToString (startnum, numstyle, _) = let numstyle' = camelCaseToHyphenated $ show numstyle in (if startnum /= 1 then " start=\"" ++ show startnum ++ "\"" else "") ++ (if numstyle /= DefaultStyle then " style=\"list-style-type: " ++ numstyle' ++ ";\"" else "") -- | Convert bullet or ordered list item (list of blocks) to Textile. listItemToTextile :: WriterOptions -> [Block] -> State WriterState String listItemToTextile opts items = do contents <- blockListToTextile opts items useTags <- get >>= return . stUseTags if useTags then return $ "
  • " ++ contents ++ "
  • " else do 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 -> ([Inline],[[Block]]) -> State WriterState String definitionListItemToTextile opts (label, items) = do labelText <- inlineListToTextile opts label contents <- mapM (blockListToTextile opts) items return $ "
    " ++ labelText ++ "
    \n" ++ (intercalate "\n" $ map (\d -> "
    " ++ d ++ "
    ") contents) -- | True if the list can be handled by simple wiki markup, False if HTML tags will be needed. isSimpleList :: Block -> Bool isSimpleList x = case x of BulletList items -> all isSimpleListItem items 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 -- HTML tags will be needed. isSimpleListItem :: [Block] -> Bool isSimpleListItem [] = True isSimpleListItem [x] = case x of Plain _ -> True Para _ -> True BulletList _ -> isSimpleList x OrderedList _ _ -> isSimpleList x _ -> False isSimpleListItem [x, y] | isPlainOrPara x = case y of BulletList _ -> isSimpleList y OrderedList _ _ -> isSimpleList y _ -> False isSimpleListItem _ = False isPlainOrPara :: Block -> Bool isPlainOrPara (Plain _) = True isPlainOrPara (Para _) = True isPlainOrPara _ = False -- | Concatenates strings with line breaks between them. vcat :: [String] -> String vcat = intercalate "\n" -- Auxiliary functions for tables. (TODO: these are common to HTML, MediaWiki, -- and Textile writers, and should be abstracted out.) tableRowToTextile :: WriterOptions -> [String] -> Int -> [[Block]] -> State WriterState String tableRowToTextile opts alignStrings rownum cols' = do let celltype = if rownum == 0 then "th" else "td" let rowclass = case rownum of 0 -> "header" x | x `rem` 2 == 1 -> "odd" _ -> "even" cols'' <- sequence $ zipWith (\alignment item -> tableItemToTextile opts celltype alignment item) alignStrings cols' return $ "\n" ++ unlines cols'' ++ "" alignmentToString :: Alignment -> [Char] alignmentToString alignment = case alignment of AlignLeft -> "left" AlignRight -> "right" AlignCenter -> "center" AlignDefault -> "left" tableItemToTextile :: WriterOptions -> String -> String -> [Block] -> State WriterState String tableItemToTextile opts celltype align' item = do let mkcell x = "<" ++ celltype ++ " align=\"" ++ align' ++ "\">" ++ x ++ "" contents <- blockListToTextile opts item return $ mkcell contents -- | Convert list of Pandoc block elements to Textile. blockListToTextile :: WriterOptions -- ^ Options -> [Block] -- ^ List of block elements -> State WriterState String blockListToTextile opts blocks = mapM (blockToTextile opts) blocks >>= return . vcat -- | Convert list of Pandoc inline elements to Textile. inlineListToTextile :: WriterOptions -> [Inline] -> State WriterState String inlineListToTextile opts lst = mapM (inlineToTextile opts) lst >>= return . concat -- | Convert Pandoc inline element to Textile. inlineToTextile :: WriterOptions -> Inline -> State WriterState String inlineToTextile opts (Span _ lst) = inlineListToTextile opts lst inlineToTextile opts (Emph lst) = do contents <- inlineListToTextile opts lst return $ if '_' `elem` contents then "" ++ contents ++ "" else "_" ++ contents ++ "_" inlineToTextile opts (Strong lst) = do contents <- inlineListToTextile opts lst return $ if '*' `elem` contents then "" ++ contents ++ "" else "*" ++ contents ++ "*" inlineToTextile opts (Strikeout lst) = do contents <- inlineListToTextile opts lst return $ if '-' `elem` contents then "" ++ contents ++ "" else "-" ++ contents ++ "-" inlineToTextile opts (Superscript lst) = do contents <- inlineListToTextile opts lst return $ if '^' `elem` contents then "" ++ contents ++ "" else "[^" ++ contents ++ "^]" inlineToTextile opts (Subscript lst) = do contents <- inlineListToTextile opts lst return $ if '~' `elem` contents then "" ++ contents ++ "" else "[~" ++ contents ++ "~]" inlineToTextile opts (SmallCaps lst) = inlineListToTextile opts lst inlineToTextile opts (Quoted SingleQuote lst) = do contents <- inlineListToTextile opts lst return $ "'" ++ contents ++ "'" inlineToTextile opts (Quoted DoubleQuote lst) = do contents <- inlineListToTextile opts lst return $ "\"" ++ contents ++ "\"" inlineToTextile opts (Cite _ lst) = inlineListToTextile opts lst inlineToTextile _ (Code _ str) = return $ if '@' `elem` str then "" ++ escapeStringForXML str ++ "" else "@" ++ str ++ "@" inlineToTextile _ (Str str) = return $ escapeStringForTextile str inlineToTextile _ (Math _ str) = return $ "" ++ escapeStringForXML str ++ "" inlineToTextile opts (RawInline f str) | f == Format "html" || f == Format "textile" = return str | (f == Format "latex" || f == Format "tex") && isEnabled Ext_raw_tex opts = return str | otherwise = return "" inlineToTextile _ (LineBreak) = return "\n" inlineToTextile _ SoftBreak = return " " inlineToTextile _ Space = return " " inlineToTextile opts (Link (_, cls, _) txt (src, _)) = do let classes = if null cls then "" else "(" ++ unwords cls ++ ")" label <- case txt of [Code _ s] | s == src -> return "$" [Str s] | s == src -> return "$" _ -> inlineListToTextile opts txt return $ "\"" ++ classes ++ label ++ "\":" ++ src inlineToTextile opts (Image attr@(_, cls, _) alt (source, tit)) = do alt' <- inlineListToTextile opts alt let txt = if null tit then if null alt' then "" else "(" ++ alt' ++ ")" else "(" ++ tit ++ ")" classes = if null cls then "" else "(" ++ unwords cls ++ ")" showDim dir = let toCss str = Just $ show dir ++ ":" ++ str ++ ";" in case (dimension dir attr) of Just (Percent a) -> toCss $ show (Percent a) Just dim -> toCss $ showInPixel opts dim ++ "px" Nothing -> Nothing styles = case (showDim Width, showDim Height) of (Just w, Just h) -> "{" ++ w ++ h ++ "}" (Just w, Nothing) -> "{" ++ w ++ "height:auto;}" (Nothing, Just h) -> "{" ++ "width:auto;" ++ h ++ "}" (Nothing, Nothing) -> "" return $ "!" ++ classes ++ styles ++ source ++ txt ++ "!" inlineToTextile opts (Note contents) = do curNotes <- liftM stNotes get let newnum = length curNotes + 1 contents' <- blockListToTextile opts contents let thisnote = "fn" ++ show newnum ++ ". " ++ contents' ++ "\n" modify $ \s -> s { stNotes = thisnote : curNotes } return $ "[" ++ show newnum ++ "]" -- note - may not work for notes with multiple blocks pandoc-1.19.2.4/src/Text/Pandoc/Writers/MediaWiki.hs0000644000000000000000000004124413155240142020157 0ustar0000000000000000{- Copyright (C) 2008-2015 John MacFarlane 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.Writers.MediaWiki Copyright : Copyright (C) 2008-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to MediaWiki markup. MediaWiki: -} module Text.Pandoc.Writers.MediaWiki ( writeMediaWiki ) where import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Pretty (render) import Text.Pandoc.ImageSize import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.XML ( escapeStringForXML ) import Data.List ( intersect, intercalate ) import Network.URI ( isURI ) import Control.Monad.Reader import Control.Monad.State data WriterState = WriterState { stNotes :: Bool -- True if there are notes , stOptions :: WriterOptions -- writer options } data WriterReader = WriterReader { options :: WriterOptions -- Writer options , listLevel :: String -- String at beginning of list items, e.g. "**" , useTags :: Bool -- True if we should use HTML tags because we're in a complex list } type MediaWikiWriter = ReaderT WriterReader (State WriterState) -- | Convert Pandoc to MediaWiki. writeMediaWiki :: WriterOptions -> Pandoc -> String writeMediaWiki opts document = let initialState = WriterState { stNotes = False, stOptions = opts } env = WriterReader { options = opts, listLevel = [], useTags = False } in evalState (runReaderT (pandocToMediaWiki document) env) initialState -- | Return MediaWiki representation of document. pandocToMediaWiki :: Pandoc -> MediaWikiWriter String pandocToMediaWiki (Pandoc meta blocks) = do opts <- asks options metadata <- metaToJSON opts (fmap trimr . blockListToMediaWiki) inlineListToMediaWiki meta body <- blockListToMediaWiki blocks notesExist <- gets stNotes let notes = if notesExist then "\n" else "" let main = body ++ notes let context = defField "body" main $ defField "toc" (writerTableOfContents opts) metadata return $ case writerTemplate opts of Nothing -> main Just tpl -> renderTemplate' tpl context -- | Escape special characters for MediaWiki. escapeString :: String -> String escapeString = escapeStringForXML -- | Convert Pandoc block element to MediaWiki. blockToMediaWiki :: Block -- ^ Block element -> MediaWikiWriter String blockToMediaWiki Null = return "" blockToMediaWiki (Div attrs bs) = do contents <- blockListToMediaWiki bs return $ render Nothing (tagWithAttrs "div" attrs) ++ "\n\n" ++ contents ++ "\n\n" ++ "" blockToMediaWiki (Plain inlines) = inlineListToMediaWiki inlines -- title beginning with fig: indicates that the image is a figure blockToMediaWiki (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do capt <- if null txt then return "" else ("|caption " ++) `fmap` inlineListToMediaWiki txt img <- imageToMediaWiki attr let opt = if null txt then "" else "|alt=" ++ if null tit then capt else tit ++ capt return $ "[[File:" ++ src ++ "|frame|none" ++ img ++ opt ++ "]]\n" blockToMediaWiki (Para inlines) = do tags <- asks useTags lev <- asks listLevel contents <- inlineListToMediaWiki inlines return $ if tags then "

    " ++ contents ++ "

    " else contents ++ if null lev then "\n" else "" blockToMediaWiki (LineBlock lns) = blockToMediaWiki $ linesToPara lns blockToMediaWiki (RawBlock f str) | f == Format "mediawiki" = return str | f == Format "html" = return str | otherwise = return "" blockToMediaWiki HorizontalRule = return "\n-----\n" blockToMediaWiki (Header level _ inlines) = do contents <- inlineListToMediaWiki inlines let eqs = replicate level '=' return $ eqs ++ " " ++ contents ++ " " ++ eqs ++ "\n" blockToMediaWiki (CodeBlock (_,classes,_) str) = do let at = classes `intersect` ["actionscript", "ada", "apache", "applescript", "asm", "asp", "autoit", "bash", "blitzbasic", "bnf", "c", "c_mac", "caddcl", "cadlisp", "cfdg", "cfm", "cpp", "cpp-qt", "csharp", "css", "d", "delphi", "diff", "div", "dos", "eiffel", "fortran", "freebasic", "gml", "groovy", "html4strict", "idl", "ini", "inno", "io", "java", "java5", "javascript", "latex", "lisp", "lua", "matlab", "mirc", "mpasm", "mysql", "nsis", "objc", "ocaml", "ocaml-brief", "oobas", "oracle8", "pascal", "perl", "php", "php-brief", "plsql", "python", "qbasic", "rails", "reg", "robots", "ruby", "sas", "scheme", "sdlbasic", "smalltalk", "smarty", "sql", "tcl", "", "thinbasic", "tsql", "vb", "vbnet", "vhdl", "visualfoxpro", "winbatch", "xml", "xpp", "z80"] return $ if null at then "" else " class=\"" ++ unwords classes ++ "\">") ++ escapeString str ++ "" else "" ++ str ++ "" -- note: no escape! blockToMediaWiki (BlockQuote blocks) = do contents <- blockListToMediaWiki blocks return $ "
    " ++ contents ++ "
    " blockToMediaWiki (Table capt aligns widths headers rows') = do caption <- if null capt then return "" else do c <- inlineListToMediaWiki capt return $ "|+ " ++ trimr c ++ "\n" let headless = all null headers let allrows = if headless then rows' else headers:rows' tableBody <- intercalate "|-\n" `fmap` mapM (tableRowToMediaWiki headless aligns widths) (zip [1..] allrows) return $ "{|\n" ++ caption ++ tableBody ++ "|}\n" blockToMediaWiki x@(BulletList items) = do tags <- fmap (|| not (isSimpleList x)) $ asks useTags if tags then do contents <- local (\ s -> s { useTags = True }) $ mapM listItemToMediaWiki items return $ "
      \n" ++ vcat contents ++ "
    \n" else do lev <- asks listLevel contents <- local (\s -> s { listLevel = listLevel s ++ "*" }) $ mapM listItemToMediaWiki items return $ vcat contents ++ if null lev then "\n" else "" blockToMediaWiki x@(OrderedList attribs items) = do tags <- fmap (|| not (isSimpleList x)) $ asks useTags if tags then do contents <- local (\s -> s { useTags = True }) $ mapM listItemToMediaWiki items return $ "\n" ++ vcat contents ++ "\n" else do lev <- asks listLevel contents <- local (\s -> s { listLevel = listLevel s ++ "#" }) $ mapM listItemToMediaWiki items return $ vcat contents ++ if null lev then "\n" else "" blockToMediaWiki x@(DefinitionList items) = do tags <- fmap (|| not (isSimpleList x)) $ asks useTags if tags then do contents <- local (\s -> s { useTags = True }) $ mapM definitionListItemToMediaWiki items return $ "
    \n" ++ vcat contents ++ "
    \n" else do lev <- asks listLevel contents <- local (\s -> s { listLevel = listLevel s ++ ";" }) $ mapM definitionListItemToMediaWiki items return $ vcat contents ++ if null lev then "\n" else "" -- Auxiliary functions for lists: -- | Convert ordered list attributes to HTML attribute string listAttribsToString :: ListAttributes -> String listAttribsToString (startnum, numstyle, _) = let numstyle' = camelCaseToHyphenated $ show numstyle in (if startnum /= 1 then " start=\"" ++ show startnum ++ "\"" else "") ++ (if numstyle /= DefaultStyle then " style=\"list-style-type: " ++ numstyle' ++ ";\"" else "") -- | Convert bullet or ordered list item (list of blocks) to MediaWiki. listItemToMediaWiki :: [Block] -> MediaWikiWriter String listItemToMediaWiki items = do contents <- blockListToMediaWiki items tags <- asks useTags if tags then return $ "
  • " ++ contents ++ "
  • " else do marker <- asks listLevel return $ marker ++ " " ++ contents -- | Convert definition list item (label, list of blocks) to MediaWiki. definitionListItemToMediaWiki :: ([Inline],[[Block]]) -> MediaWikiWriter String definitionListItemToMediaWiki (label, items) = do labelText <- inlineListToMediaWiki label contents <- mapM blockListToMediaWiki items tags <- asks useTags if tags then return $ "
    " ++ labelText ++ "
    \n" ++ intercalate "\n" (map (\d -> "
    " ++ d ++ "
    ") contents) else do marker <- asks listLevel return $ marker ++ " " ++ labelText ++ "\n" ++ intercalate "\n" (map (\d -> init marker ++ ": " ++ d) contents) -- | True if the list can be handled by simple wiki markup, False if HTML tags will be needed. 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] DefinitionList items -> all isSimpleListItem $ concatMap snd items _ -> False -- | True if list item can be handled with the simple wiki syntax. False if -- HTML tags will be needed. isSimpleListItem :: [Block] -> Bool isSimpleListItem [] = True isSimpleListItem [x] = case x of Plain _ -> True Para _ -> True BulletList _ -> isSimpleList x OrderedList _ _ -> isSimpleList x DefinitionList _ -> isSimpleList x _ -> False isSimpleListItem [x, y] | isPlainOrPara x = case y of BulletList _ -> isSimpleList y OrderedList _ _ -> isSimpleList y DefinitionList _ -> isSimpleList y _ -> False isSimpleListItem _ = False isPlainOrPara :: Block -> Bool isPlainOrPara (Plain _) = True isPlainOrPara (Para _) = True isPlainOrPara _ = False -- | Concatenates strings with line breaks between them. vcat :: [String] -> String vcat = intercalate "\n" -- Auxiliary functions for tables: tableRowToMediaWiki :: Bool -> [Alignment] -> [Double] -> (Int, [[Block]]) -> MediaWikiWriter String tableRowToMediaWiki headless alignments widths (rownum, cells) = do cells' <- mapM (tableCellToMediaWiki headless rownum) $ zip3 alignments widths cells return $ unlines cells' tableCellToMediaWiki :: Bool -> Int -> (Alignment, Double, [Block]) -> MediaWikiWriter String tableCellToMediaWiki headless rownum (alignment, width, bs) = do contents <- blockListToMediaWiki bs let marker = if rownum == 1 && not headless then "!" else "|" let percent w = show (truncate (100*w) :: Integer) ++ "%" let attrs = ["align=" ++ show (alignmentToString alignment) | alignment /= AlignDefault && alignment /= AlignLeft] ++ ["width=\"" ++ percent width ++ "\"" | width /= 0.0 && rownum == 1] let attr = if null attrs then "" else unwords attrs ++ "|" let sep = case bs of [Plain _] -> " " [Para _] -> " " _ -> "\n" return $ marker ++ attr ++ sep ++ trimr contents alignmentToString :: Alignment -> String alignmentToString alignment = case alignment of AlignLeft -> "left" AlignRight -> "right" AlignCenter -> "center" AlignDefault -> "left" imageToMediaWiki :: Attr -> MediaWikiWriter String imageToMediaWiki attr = do opts <- gets stOptions let (_, cls, _) = attr toPx = fmap (showInPixel opts) . checkPct checkPct (Just (Percent _)) = Nothing checkPct maybeDim = maybeDim go (Just w) Nothing = '|':w ++ "px" go (Just w) (Just h) = '|':w ++ "x" ++ h ++ "px" go Nothing (Just h) = "|x" ++ h ++ "px" go Nothing Nothing = "" dims = go (toPx $ dimension Width attr) (toPx $ dimension Height attr) classes = if null cls then "" else "|class=" ++ unwords cls return $ dims ++ classes -- | Convert list of Pandoc block elements to MediaWiki. blockListToMediaWiki :: [Block] -- ^ List of block elements -> MediaWikiWriter String blockListToMediaWiki blocks = fmap vcat $ mapM blockToMediaWiki blocks -- | Convert list of Pandoc inline elements to MediaWiki. inlineListToMediaWiki :: [Inline] -> MediaWikiWriter String inlineListToMediaWiki lst = fmap concat $ mapM inlineToMediaWiki lst -- | Convert Pandoc inline element to MediaWiki. inlineToMediaWiki :: Inline -> MediaWikiWriter String inlineToMediaWiki (Span attrs ils) = do contents <- inlineListToMediaWiki ils return $ render Nothing (tagWithAttrs "span" attrs) ++ contents ++ "
    " inlineToMediaWiki (Emph lst) = do contents <- inlineListToMediaWiki lst return $ "''" ++ contents ++ "''" inlineToMediaWiki (Strong lst) = do contents <- inlineListToMediaWiki lst return $ "'''" ++ contents ++ "'''" inlineToMediaWiki (Strikeout lst) = do contents <- inlineListToMediaWiki lst return $ "" ++ contents ++ "" inlineToMediaWiki (Superscript lst) = do contents <- inlineListToMediaWiki lst return $ "" ++ contents ++ "" inlineToMediaWiki (Subscript lst) = do contents <- inlineListToMediaWiki lst return $ "" ++ contents ++ "" inlineToMediaWiki (SmallCaps lst) = inlineListToMediaWiki lst inlineToMediaWiki (Quoted SingleQuote lst) = do contents <- inlineListToMediaWiki lst return $ "\8216" ++ contents ++ "\8217" inlineToMediaWiki (Quoted DoubleQuote lst) = do contents <- inlineListToMediaWiki lst return $ "\8220" ++ contents ++ "\8221" inlineToMediaWiki (Cite _ lst) = inlineListToMediaWiki lst inlineToMediaWiki (Code _ str) = return $ "" ++ escapeString str ++ "" inlineToMediaWiki (Str str) = return $ escapeString str inlineToMediaWiki (Math _ str) = return $ "" ++ str ++ "" -- note: str should NOT be escaped inlineToMediaWiki (RawInline f str) | f == Format "mediawiki" = return str | f == Format "html" = return str | otherwise = return "" inlineToMediaWiki (LineBreak) = return "
    \n" inlineToMediaWiki SoftBreak = do wrapText <- gets (writerWrapText . stOptions) case wrapText of WrapAuto -> return " " WrapNone -> return " " WrapPreserve -> return "\n" inlineToMediaWiki Space = return " " inlineToMediaWiki (Link _ txt (src, _)) = do label <- inlineListToMediaWiki txt case txt of [Str s] | isURI src && escapeURI s == src -> return src _ -> return $ if isURI src then "[" ++ src ++ " " ++ label ++ "]" else "[[" ++ src' ++ "|" ++ label ++ "]]" where src' = case src of '/':xs -> xs -- with leading / it's a _ -> src -- link to a help page inlineToMediaWiki (Image attr alt (source, tit)) = do img <- imageToMediaWiki attr alt' <- inlineListToMediaWiki alt let txt = if null tit then if null alt then "" else '|' : alt' else '|' : tit return $ "[[File:" ++ source ++ img ++ txt ++ "]]" inlineToMediaWiki (Note contents) = do contents' <- blockListToMediaWiki contents modify (\s -> s { stNotes = True }) return $ "" ++ contents' ++ "" -- note - may not work for notes with multiple blocks pandoc-1.19.2.4/src/Text/Pandoc/Writers/DokuWiki.hs0000644000000000000000000005151713155240142020046 0ustar0000000000000000{- Copyright (C) 2008-2015 John MacFarlane 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.Writers.DokuWiki Copyright : Copyright (C) 2008-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : Clare Macrae Stability : alpha Portability : portable Conversion of 'Pandoc' documents to DokuWiki markup. DokuWiki: -} {- [ ] Implement nested blockquotes (currently only ever does one level) [x] Implement alignment of text in tables [ ] Implement comments [ ] Work through the Dokuwiki spec, and check I've not missed anything out [ ] Remove dud/duplicate code -} module Text.Pandoc.Writers.DokuWiki ( writeDokuWiki ) where import Text.Pandoc.Definition import Text.Pandoc.Options ( WriterOptions( writerTableOfContents , writerTemplate , writerWrapText), WrapOption(..) ) import Text.Pandoc.Shared ( escapeURI, linesToPara, removeFormatting , camelCaseToHyphenated, trimr, normalize, substitute ) import Text.Pandoc.Writers.Shared ( defField, metaToJSON ) import Text.Pandoc.ImageSize import Text.Pandoc.Templates ( renderTemplate' ) import Data.List ( intersect, intercalate, isPrefixOf, transpose ) import Data.Default (Default(..)) import Network.URI ( isURI ) import Control.Monad ( zipWithM ) import Control.Monad.State ( modify, State, get, evalState ) import Control.Monad.Reader ( ReaderT, runReaderT, ask, local ) data WriterState = WriterState { stNotes :: Bool -- True if there are notes } data WriterEnvironment = WriterEnvironment { stIndent :: String -- Indent after the marker at the beginning of list items , stUseTags :: Bool -- True if we should use HTML tags because we're in a complex list , stBackSlashLB :: Bool -- True if we should produce formatted strings with newlines (as in a table cell) } instance Default WriterState where def = WriterState { stNotes = False } instance Default WriterEnvironment where def = WriterEnvironment { stIndent = "" , stUseTags = False , stBackSlashLB = False } type DokuWiki = ReaderT WriterEnvironment (State WriterState) -- | Convert Pandoc to DokuWiki. writeDokuWiki :: WriterOptions -> Pandoc -> String writeDokuWiki opts document = runDokuWiki (pandocToDokuWiki opts $ normalize document) runDokuWiki :: DokuWiki a -> a runDokuWiki = flip evalState def . flip runReaderT def -- | Return DokuWiki representation of document. pandocToDokuWiki :: WriterOptions -> Pandoc -> DokuWiki String pandocToDokuWiki opts (Pandoc meta blocks) = do metadata <- metaToJSON opts (fmap trimr . blockListToDokuWiki opts) (inlineListToDokuWiki opts) meta body <- blockListToDokuWiki opts blocks notesExist <- stNotes <$> get let notes = if notesExist then "" -- TODO Was "\n" Check whether I can really remove this: -- if it is definitely to do with footnotes, can remove this whole bit else "" let main = body ++ notes let context = defField "body" main $ defField "toc" (writerTableOfContents opts) $ metadata case writerTemplate opts of Nothing -> return main Just tpl -> return $ renderTemplate' tpl context -- | Escape special characters for DokuWiki. escapeString :: String -> String escapeString = substitute "__" "%%__%%" . substitute "**" "%%**%%" . substitute "//" "%%//%%" -- | Convert Pandoc block element to DokuWiki. blockToDokuWiki :: WriterOptions -- ^ Options -> Block -- ^ Block element -> DokuWiki String blockToDokuWiki _ Null = return "" blockToDokuWiki opts (Div _attrs bs) = do contents <- blockListToDokuWiki opts bs return $ contents ++ "\n" blockToDokuWiki opts (Plain inlines) = inlineListToDokuWiki opts inlines -- title beginning with fig: indicates that the image is a figure -- dokuwiki doesn't support captions - so combine together alt and caption into alt blockToDokuWiki opts (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do capt <- if null txt then return "" else (" " ++) `fmap` inlineListToDokuWiki opts txt let opt = if null txt then "" else "|" ++ if null tit then capt else tit ++ capt -- Relative links fail isURI and receive a colon prefix = if isURI src then "" else ":" return $ "{{" ++ prefix ++ src ++ imageDims opts attr ++ opt ++ "}}\n" blockToDokuWiki opts (Para inlines) = do indent <- stIndent <$> ask useTags <- stUseTags <$> ask contents <- inlineListToDokuWiki opts inlines return $ if useTags then "

    " ++ contents ++ "

    " else contents ++ if null indent then "\n" else "" blockToDokuWiki opts (LineBlock lns) = blockToDokuWiki opts $ linesToPara lns blockToDokuWiki _ (RawBlock f str) | f == Format "dokuwiki" = return str -- See https://www.dokuwiki.org/wiki:syntax -- use uppercase HTML tag for block-level content: | f == Format "html" = return $ "\n" ++ str ++ "\n" | otherwise = return "" blockToDokuWiki _ HorizontalRule = return "\n----\n" blockToDokuWiki opts (Header level _ inlines) = do -- emphasis, links etc. not allowed in headers, apparently, -- so we remove formatting: contents <- inlineListToDokuWiki opts $ removeFormatting inlines let eqs = replicate ( 7 - level ) '=' return $ eqs ++ " " ++ contents ++ " " ++ eqs ++ "\n" blockToDokuWiki _ (CodeBlock (_,classes,_) str) = do let at = classes `intersect` ["actionscript", "ada", "apache", "applescript", "asm", "asp", "autoit", "bash", "blitzbasic", "bnf", "c", "c_mac", "caddcl", "cadlisp", "cfdg", "cfm", "cpp", "cpp-qt", "csharp", "css", "d", "delphi", "diff", "div", "dos", "eiffel", "fortran", "freebasic", "gml", "groovy", "html4strict", "idl", "ini", "inno", "io", "java", "java5", "javascript", "latex", "lisp", "lua", "matlab", "mirc", "mpasm", "mysql", "nsis", "objc", "ocaml", "ocaml-brief", "oobas", "oracle8", "pascal", "perl", "php", "php-brief", "plsql", "python", "qbasic", "rails", "reg", "robots", "ruby", "sas", "scheme", "sdlbasic", "smalltalk", "smarty", "sql", "tcl", "", "thinbasic", "tsql", "vb", "vbnet", "vhdl", "visualfoxpro", "winbatch", "xml", "xpp", "z80"] return $ " ">\n" (x:_) -> " " ++ x ++ ">\n") ++ str ++ "\n" blockToDokuWiki opts (BlockQuote blocks) = do contents <- blockListToDokuWiki opts blocks if isSimpleBlockQuote blocks then return $ unlines $ map ("> " ++) $ lines contents else return $ "
    \n" ++ contents ++ "
    " blockToDokuWiki opts (Table capt aligns _ headers rows) = do captionDoc <- if null capt then return "" else do c <- inlineListToDokuWiki opts capt return $ "" ++ c ++ "\n" headers' <- if all null headers then return [] else zipWithM (tableItemToDokuWiki opts) aligns headers rows' <- mapM (zipWithM (tableItemToDokuWiki opts) aligns) rows let widths = map (maximum . map length) $ transpose (headers':rows') let padTo (width, al) s = case (width - length s) of x | x > 0 -> if al == AlignLeft || al == AlignDefault then s ++ replicate x ' ' else if al == AlignRight then replicate x ' ' ++ s else replicate (x `div` 2) ' ' ++ s ++ replicate (x - x `div` 2) ' ' | otherwise -> s let renderRow sep cells = sep ++ intercalate sep (zipWith padTo (zip widths aligns) cells) ++ sep return $ captionDoc ++ (if null headers' then "" else renderRow "^" headers' ++ "\n") ++ unlines (map (renderRow "|") rows') blockToDokuWiki opts x@(BulletList items) = do oldUseTags <- stUseTags <$> ask indent <- stIndent <$> ask backSlash <- stBackSlashLB <$> ask let useTags = oldUseTags || not (isSimpleList x) if useTags then do contents <- local (\s -> s { stUseTags = True }) (mapM (listItemToDokuWiki opts) items) return $ "
      \n" ++ vcat contents ++ "
    \n" else do contents <- local (\s -> s { stIndent = stIndent s ++ " " , stBackSlashLB = backSlash}) (mapM (listItemToDokuWiki opts) items) return $ vcat contents ++ if null indent then "\n" else "" blockToDokuWiki opts x@(OrderedList attribs items) = do oldUseTags <- stUseTags <$> ask indent <- stIndent <$> ask backSlash <- stBackSlashLB <$> ask let useTags = oldUseTags || not (isSimpleList x) if useTags then do contents <- local (\s -> s { stUseTags = True }) (mapM (orderedListItemToDokuWiki opts) items) return $ "\n" ++ vcat contents ++ "\n" else do contents <- local (\s -> s { stIndent = stIndent s ++ " " , stBackSlashLB = backSlash}) (mapM (orderedListItemToDokuWiki opts) items) return $ vcat contents ++ if null indent then "\n" else "" -- TODO Need to decide how to make definition lists work on dokuwiki - I don't think there -- is a specific representation of them. -- TODO This creates double '; ; ' if there is a bullet or ordered list inside a definition list blockToDokuWiki opts x@(DefinitionList items) = do oldUseTags <- stUseTags <$> ask indent <- stIndent <$> ask backSlash <- stBackSlashLB <$> ask let useTags = oldUseTags || not (isSimpleList x) if useTags then do contents <- local (\s -> s { stUseTags = True }) (mapM (definitionListItemToDokuWiki opts) items) return $ "
    \n" ++ vcat contents ++ "
    \n" else do contents <- local (\s -> s { stIndent = stIndent s ++ " " , stBackSlashLB = backSlash}) (mapM (definitionListItemToDokuWiki opts) items) return $ vcat contents ++ if null indent then "\n" else "" -- Auxiliary functions for lists: -- | Convert ordered list attributes to HTML attribute string listAttribsToString :: ListAttributes -> String listAttribsToString (startnum, numstyle, _) = let numstyle' = camelCaseToHyphenated $ show numstyle in (if startnum /= 1 then " start=\"" ++ show startnum ++ "\"" else "") ++ (if numstyle /= DefaultStyle then " style=\"list-style-type: " ++ numstyle' ++ ";\"" else "") -- | Convert bullet list item (list of blocks) to DokuWiki. listItemToDokuWiki :: WriterOptions -> [Block] -> DokuWiki String listItemToDokuWiki opts items = do contents <- blockListToDokuWiki opts items useTags <- stUseTags <$> ask if useTags then return $ "
  • " ++ contents ++ "
  • " else do indent <- stIndent <$> ask backSlash <- stBackSlashLB <$> ask let indent' = if backSlash then (drop 2 indent) else indent return $ indent' ++ "* " ++ contents -- | Convert ordered list item (list of blocks) to DokuWiki. -- | TODO Emiminate dreadful duplication of text from listItemToDokuWiki orderedListItemToDokuWiki :: WriterOptions -> [Block] -> DokuWiki String orderedListItemToDokuWiki opts items = do contents <- blockListToDokuWiki opts items useTags <- stUseTags <$> ask if useTags then return $ "
  • " ++ contents ++ "
  • " else do indent <- stIndent <$> ask backSlash <- stBackSlashLB <$> ask let indent' = if backSlash then (drop 2 indent) else indent return $ indent' ++ "- " ++ contents -- | Convert definition list item (label, list of blocks) to DokuWiki. definitionListItemToDokuWiki :: WriterOptions -> ([Inline],[[Block]]) -> DokuWiki String definitionListItemToDokuWiki opts (label, items) = do labelText <- inlineListToDokuWiki opts label contents <- mapM (blockListToDokuWiki opts) items useTags <- stUseTags <$> ask if useTags then return $ "
    " ++ labelText ++ "
    \n" ++ (intercalate "\n" $ map (\d -> "
    " ++ d ++ "
    ") contents) else do indent <- stIndent <$> ask backSlash <- stBackSlashLB <$> ask let indent' = if backSlash then (drop 2 indent) else indent return $ indent' ++ "* **" ++ labelText ++ "** " ++ concat contents -- | True if the list can be handled by simple wiki markup, False if HTML tags will be needed. 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] DefinitionList items -> all isSimpleListItem $ concatMap snd items _ -> False -- | True if list item can be handled with the simple wiki syntax. False if -- HTML tags will be needed. isSimpleListItem :: [Block] -> Bool isSimpleListItem [] = True isSimpleListItem [x] = case x of Plain _ -> True Para _ -> True BulletList _ -> isSimpleList x OrderedList _ _ -> isSimpleList x DefinitionList _ -> isSimpleList x _ -> False isSimpleListItem [x, y] | isPlainOrPara x = case y of BulletList _ -> isSimpleList y OrderedList _ _ -> isSimpleList y DefinitionList _ -> isSimpleList y _ -> False isSimpleListItem _ = False isPlainOrPara :: Block -> Bool isPlainOrPara (Plain _) = True isPlainOrPara (Para _) = True isPlainOrPara _ = False isSimpleBlockQuote :: [Block] -> Bool isSimpleBlockQuote bs = all isPlainOrPara bs -- | Concatenates strings with line breaks between them. vcat :: [String] -> String vcat = intercalate "\n" backSlashLineBreaks :: String -> String backSlashLineBreaks cs = reverse $ g $ reverse $ concatMap f cs where f '\n' = "\\\\ " f c = [c] g (' ' : '\\':'\\': xs) = xs g s = s -- Auxiliary functions for tables: tableItemToDokuWiki :: WriterOptions -> Alignment -> [Block] -> DokuWiki String tableItemToDokuWiki opts align' item = do let mkcell x = (if align' == AlignRight || align' == AlignCenter then " " else "") ++ x ++ (if align' == AlignLeft || align' == AlignCenter then " " else "") contents <- local (\s -> s { stBackSlashLB = True }) $ blockListToDokuWiki opts item return $ mkcell contents -- | Convert list of Pandoc block elements to DokuWiki. blockListToDokuWiki :: WriterOptions -- ^ Options -> [Block] -- ^ List of block elements -> DokuWiki String blockListToDokuWiki opts blocks = do backSlash <- stBackSlashLB <$> ask if backSlash then (backSlashLineBreaks . vcat) <$> mapM (blockToDokuWiki opts) blocks else vcat <$> mapM (blockToDokuWiki opts) blocks -- | Convert list of Pandoc inline elements to DokuWiki. inlineListToDokuWiki :: WriterOptions -> [Inline] -> DokuWiki String inlineListToDokuWiki opts lst = concat <$> (mapM (inlineToDokuWiki opts) lst) -- | Convert Pandoc inline element to DokuWiki. inlineToDokuWiki :: WriterOptions -> Inline -> DokuWiki String inlineToDokuWiki opts (Span _attrs ils) = inlineListToDokuWiki opts ils inlineToDokuWiki opts (Emph lst) = do contents <- inlineListToDokuWiki opts lst return $ "//" ++ contents ++ "//" inlineToDokuWiki opts (Strong lst) = do contents <- inlineListToDokuWiki opts lst return $ "**" ++ contents ++ "**" inlineToDokuWiki opts (Strikeout lst) = do contents <- inlineListToDokuWiki opts lst return $ "" ++ contents ++ "" inlineToDokuWiki opts (Superscript lst) = do contents <- inlineListToDokuWiki opts lst return $ "" ++ contents ++ "" inlineToDokuWiki opts (Subscript lst) = do contents <- inlineListToDokuWiki opts lst return $ "" ++ contents ++ "" inlineToDokuWiki opts (SmallCaps lst) = inlineListToDokuWiki opts lst inlineToDokuWiki opts (Quoted SingleQuote lst) = do contents <- inlineListToDokuWiki opts lst return $ "\8216" ++ contents ++ "\8217" inlineToDokuWiki opts (Quoted DoubleQuote lst) = do contents <- inlineListToDokuWiki opts lst return $ "\8220" ++ contents ++ "\8221" inlineToDokuWiki opts (Cite _ lst) = inlineListToDokuWiki opts lst inlineToDokuWiki _ (Code _ str) = -- In dokuwiki, text surrounded by '' is really just a font statement, i.e. , -- and so other formatting can be present inside. -- However, in pandoc, and markdown, inlined code doesn't contain formatting. -- So I have opted for using %% to disable all formatting inside inline code blocks. -- This gives the best results when converting from other formats to dokuwiki, even if -- the resultand code is a little ugly, for short strings that don't contain formatting -- characters. -- It does mean that if pandoc could ever read dokuwiki, and so round-trip the format, -- any formatting inside inlined code blocks would be lost, or presented incorrectly. return $ "''%%" ++ str ++ "%%''" inlineToDokuWiki _ (Str str) = return $ escapeString str inlineToDokuWiki _ (Math mathType str) = return $ delim ++ str ++ delim -- note: str should NOT be escaped where delim = case mathType of DisplayMath -> "$$" InlineMath -> "$" inlineToDokuWiki _ (RawInline f str) | f == Format "dokuwiki" = return str | f == Format "html" = return $ "" ++ str ++ "" | otherwise = return "" inlineToDokuWiki _ (LineBreak) = return "\\\\\n" inlineToDokuWiki opts SoftBreak = case writerWrapText opts of WrapNone -> return " " WrapAuto -> return " " WrapPreserve -> return "\n" inlineToDokuWiki _ Space = return " " inlineToDokuWiki opts (Link _ txt (src, _)) = do label <- inlineListToDokuWiki opts txt case txt of [Str s] | "mailto:" `isPrefixOf` src -> return $ "<" ++ s ++ ">" | escapeURI s == src -> return src _ -> if isURI src then return $ "[[" ++ src ++ "|" ++ label ++ "]]" else return $ "[[" ++ src' ++ "|" ++ label ++ "]]" where src' = case src of '/':xs -> xs -- with leading / it's a _ -> src -- link to a help page inlineToDokuWiki opts (Image attr alt (source, tit)) = do alt' <- inlineListToDokuWiki opts alt let txt = case (tit, alt) of ("", []) -> "" ("", _ ) -> "|" ++ alt' (_ , _ ) -> "|" ++ tit -- Relative links fail isURI and receive a colon prefix = if isURI source then "" else ":" return $ "{{" ++ prefix ++ source ++ imageDims opts attr ++ txt ++ "}}" inlineToDokuWiki opts (Note contents) = do contents' <- blockListToDokuWiki opts contents modify (\s -> s { stNotes = True }) return $ "((" ++ contents' ++ "))" -- note - may not work for notes with multiple blocks imageDims :: WriterOptions -> Attr -> String imageDims opts attr = go (toPx $ dimension Width attr) (toPx $ dimension Height attr) where toPx = fmap (showInPixel opts) . checkPct checkPct (Just (Percent _)) = Nothing checkPct maybeDim = maybeDim go (Just w) Nothing = "?" ++ w go (Just w) (Just h) = "?" ++ w ++ "x" ++ h go Nothing (Just h) = "?0x" ++ h go Nothing Nothing = "" pandoc-1.19.2.4/src/Text/Pandoc/Writers/ZimWiki.hs0000644000000000000000000003603213155240142017676 0ustar0000000000000000{- Copyright (C) 2008-2015 John MacFarlane 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.Writers.ZimWiki Copyright : Copyright (C) 2008-2015 John MacFarlane, 2016 Alex Ivkin License : GNU GPL, version 2 or above Maintainer : Alex Ivkin Stability : alpha Portability : portable Conversion of 'Pandoc' documents to ZimWiki markup. http://zim-wiki.org/manual/Help/Wiki_Syntax.html -} module Text.Pandoc.Writers.ZimWiki ( writeZimWiki ) where import Text.Pandoc.Definition import Text.Pandoc.Options ( WriterOptions(writerTableOfContents, writerTemplate, writerWrapText), WrapOption(..) ) import Text.Pandoc.Shared ( escapeURI, linesToPara, removeFormatting, trimr , substitute ) import Text.Pandoc.Writers.Shared ( defField, metaToJSON ) import Text.Pandoc.ImageSize import Text.Pandoc.Templates ( renderTemplate' ) import Data.List ( intercalate, isPrefixOf, transpose, isInfixOf ) import Data.Text ( breakOnAll, pack ) import Data.Default (Default(..)) import Network.URI ( isURI ) import Control.Monad ( zipWithM ) import Control.Monad.State ( modify, State, get, evalState ) --import Control.Monad.Reader ( ReaderT, runReaderT, ask, local ) data WriterState = WriterState { stItemNum :: Int, stIndent :: String -- Indent after the marker at the beginning of list items } instance Default WriterState where def = WriterState { stItemNum = 1, stIndent = "" } -- | Convert Pandoc to ZimWiki. writeZimWiki :: WriterOptions -> Pandoc -> String writeZimWiki opts document = evalState (pandocToZimWiki opts document) (WriterState 1 "") -- | Return ZimWiki representation of document. pandocToZimWiki :: WriterOptions -> Pandoc -> State WriterState String pandocToZimWiki opts (Pandoc meta blocks) = do metadata <- metaToJSON opts (fmap trimr . blockListToZimWiki opts) (inlineListToZimWiki opts) meta body <- blockListToZimWiki opts blocks --let header = "Content-Type: text/x-zim-wiki\nWiki-Format: zim 0.4\n" let main = body let context = defField "body" main $ defField "toc" (writerTableOfContents opts) $ metadata case writerTemplate opts of Just tpl -> return $ renderTemplate' tpl context Nothing -> return main -- | Escape special characters for ZimWiki. escapeString :: String -> String escapeString = substitute "__" "''__''" . substitute "**" "''**''" . substitute "~~" "''~~''" . substitute "//" "''//''" -- | Convert Pandoc block element to ZimWiki. blockToZimWiki :: WriterOptions -> Block -> State WriterState String blockToZimWiki _ Null = return "" blockToZimWiki opts (Div _attrs bs) = do contents <- blockListToZimWiki opts bs return $ contents ++ "\n" blockToZimWiki opts (Plain inlines) = inlineListToZimWiki opts inlines -- title beginning with fig: indicates that the image is a figure -- ZimWiki doesn't support captions - so combine together alt and caption into alt blockToZimWiki opts (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do capt <- if null txt then return "" else (" " ++) `fmap` inlineListToZimWiki opts txt let opt = if null txt then "" else "|" ++ if null tit then capt else tit ++ capt -- Relative links fail isURI and receive a colon prefix = if isURI src then "" else ":" return $ "{{" ++ prefix ++ src ++ imageDims opts attr ++ opt ++ "}}\n" blockToZimWiki opts (Para inlines) = do indent <- stIndent <$> get -- useTags <- stUseTags <$> get contents <- inlineListToZimWiki opts inlines return $ contents ++ if null indent then "\n" else "" blockToZimWiki opts (LineBlock lns) = do blockToZimWiki opts $ linesToPara lns blockToZimWiki opts (RawBlock f str) | f == Format "zimwiki" = return str | f == Format "html" = do cont <- indentFromHTML opts str; return cont | otherwise = return "" blockToZimWiki _ HorizontalRule = return "\n----\n" blockToZimWiki opts (Header level _ inlines) = do contents <- inlineListToZimWiki opts $ removeFormatting inlines -- emphasis, links etc. not allowed in headers let eqs = replicate ( 7 - level ) '=' return $ eqs ++ " " ++ contents ++ " " ++ eqs ++ "\n" blockToZimWiki _ (CodeBlock (_,classes,_) str) = do return $ case classes of [] -> "'''\n" ++ cleanupCode str ++ "\n'''\n" -- no lang block is a quote block (x:_) -> "{{{code: lang=\"" ++ x ++ "\" linenumbers=\"True\"\n" ++ str ++ "\n}}}\n" -- for zim's code plugin, go verbatim on the lang spec blockToZimWiki opts (BlockQuote blocks) = do contents <- blockListToZimWiki opts blocks return $ unlines $ map ("> " ++) $ lines contents blockToZimWiki opts (Table capt aligns _ headers rows) = do captionDoc <- if null capt then return "" else do c <- inlineListToZimWiki opts capt return $ "" ++ c ++ "\n" headers' <- if all null headers then zipWithM (tableItemToZimWiki opts) aligns (rows !! 0) else zipWithM (tableItemToZimWiki opts) aligns headers rows' <- mapM (zipWithM (tableItemToZimWiki opts) aligns) rows let widths = map (maximum . map length) $ transpose (headers':rows') let padTo (width, al) s = case (width - length s) of x | x > 0 -> if al == AlignLeft || al == AlignDefault then s ++ replicate x ' ' else if al == AlignRight then replicate x ' ' ++ s else replicate (x `div` 2) ' ' ++ s ++ replicate (x - x `div` 2) ' ' | otherwise -> s let borderCell (width, al) _ = if al == AlignLeft then ":"++ replicate (width-1) '-' else if al == AlignDefault then replicate width '-' else if al == AlignRight then replicate (width-1) '-' ++ ":" else ":" ++ replicate (width-2) '-' ++ ":" let underheader = "|" ++ intercalate "|" (zipWith borderCell (zip widths aligns) headers') ++ "|" let renderRow sep cells = sep ++ intercalate sep (zipWith padTo (zip widths aligns) cells) ++ sep return $ captionDoc ++ (if null headers' then "" else renderRow "|" headers' ++ "\n") ++ underheader ++ "\n" ++ unlines (map (renderRow "|") rows') blockToZimWiki opts (BulletList items) = do indent <- stIndent <$> get modify $ \s -> s { stIndent = stIndent s ++ "\t" } contents <- (mapM (listItemToZimWiki opts) items) modify $ \s -> s{ stIndent = indent } -- drop 1 (stIndent s) } return $ vcat contents ++ if null indent then "\n" else "" blockToZimWiki opts (OrderedList _ items) = do indent <- stIndent <$> get modify $ \s -> s { stIndent = stIndent s ++ "\t", stItemNum = 1 } contents <- (mapM (orderedListItemToZimWiki opts) items) modify $ \s -> s{ stIndent = indent } -- drop 1 (stIndent s) } return $ vcat contents ++ if null indent then "\n" else "" blockToZimWiki opts (DefinitionList items) = do contents <- (mapM (definitionListItemToZimWiki opts) items) return $ vcat contents definitionListItemToZimWiki :: WriterOptions -> ([Inline],[[Block]]) -> State WriterState String definitionListItemToZimWiki opts (label, items) = do labelText <- inlineListToZimWiki opts label contents <- mapM (blockListToZimWiki opts) items indent <- stIndent <$> get return $ indent ++ "* **" ++ labelText ++ "** " ++ concat contents -- Auxiliary functions for lists: indentFromHTML :: WriterOptions -> String -> State WriterState String indentFromHTML _ str = do indent <- stIndent <$> get itemnum <- stItemNum <$> get if isInfixOf "
  • " str then return $ indent ++ show itemnum ++ "." else if isInfixOf "
  • " str then return "\n" else if isInfixOf "
  • " str then do let olcount=countSubStrs "
      " str modify $ \s -> s { stIndent = stIndent s ++ replicate olcount '\t', stItemNum = 1 } return "" else if isInfixOf "
    " str then do let olcount=countSubStrs "/
      " str modify $ \s -> s{ stIndent = drop olcount (stIndent s) } return "" else return "" countSubStrs :: String -> String -> Int countSubStrs sub str = length $ breakOnAll (pack sub) (pack str) cleanupCode :: String -> String cleanupCode = substitute "" "" . substitute "" "" vcat :: [String] -> String vcat = intercalate "\n" -- | Convert bullet list item (list of blocks) to ZimWiki. listItemToZimWiki :: WriterOptions -> [Block] -> State WriterState String listItemToZimWiki opts items = do contents <- blockListToZimWiki opts items indent <- stIndent <$> get return $ indent ++ "* " ++ contents -- | Convert ordered list item (list of blocks) to ZimWiki. orderedListItemToZimWiki :: WriterOptions -> [Block] -> State WriterState String orderedListItemToZimWiki opts items = do contents <- blockListToZimWiki opts items indent <- stIndent <$> get itemnum <- stItemNum <$> get --modify $ \s -> s { stItemNum = itemnum + 1 } -- this is not strictly necessary for zim as zim does its own renumbering return $ indent ++ show itemnum ++ ". " ++ contents -- Auxiliary functions for tables: tableItemToZimWiki :: WriterOptions -> Alignment -> [Block] -> State WriterState String tableItemToZimWiki opts align' item = do let mkcell x = (if align' == AlignRight || align' == AlignCenter then " " else "") ++ x ++ (if align' == AlignLeft || align' == AlignCenter then " " else "") contents <- blockListToZimWiki opts item -- local (\s -> s { stBackSlashLB = True }) $ return $ mkcell contents -- | Convert list of Pandoc block elements to ZimWiki. blockListToZimWiki :: WriterOptions -> [Block] -> State WriterState String blockListToZimWiki opts blocks = vcat <$> mapM (blockToZimWiki opts) blocks -- | Convert list of Pandoc inline elements to ZimWiki. inlineListToZimWiki :: WriterOptions -> [Inline] -> State WriterState String inlineListToZimWiki opts lst = concat <$> (mapM (inlineToZimWiki opts) lst) -- | Convert Pandoc inline element to ZimWiki. inlineToZimWiki :: WriterOptions -> Inline -> State WriterState String inlineToZimWiki opts (Emph lst) = do contents <- inlineListToZimWiki opts lst return $ "//" ++ contents ++ "//" inlineToZimWiki opts (Strong lst) = do contents <- inlineListToZimWiki opts lst return $ "**" ++ contents ++ "**" inlineToZimWiki opts (Strikeout lst) = do contents <- inlineListToZimWiki opts lst return $ "~~" ++ contents ++ "~~" inlineToZimWiki opts (Superscript lst) = do contents <- inlineListToZimWiki opts lst return $ "^{" ++ contents ++ "}" inlineToZimWiki opts (Subscript lst) = do contents <- inlineListToZimWiki opts lst return $ "_{" ++ contents ++ "}" inlineToZimWiki opts (Quoted SingleQuote lst) = do contents <- inlineListToZimWiki opts lst return $ "\8216" ++ contents ++ "\8217" inlineToZimWiki opts (Quoted DoubleQuote lst) = do contents <- inlineListToZimWiki opts lst return $ "\8220" ++ contents ++ "\8221" inlineToZimWiki opts (Span _attrs ils) = inlineListToZimWiki opts ils inlineToZimWiki opts (SmallCaps lst) = inlineListToZimWiki opts lst inlineToZimWiki opts (Cite _ lst) = inlineListToZimWiki opts lst inlineToZimWiki _ (Code _ str) = return $ "''" ++ str ++ "''" inlineToZimWiki _ (Str str) = return $ escapeString str inlineToZimWiki _ (Math mathType str) = return $ delim ++ str ++ delim -- note: str should NOT be escaped where delim = case mathType of DisplayMath -> "$$" InlineMath -> "$" -- | f == Format "html" = return $ "" ++ str ++ "" inlineToZimWiki opts (RawInline f str) | f == Format "zimwiki" = return str | f == Format "html" = do cont <- indentFromHTML opts str; return cont | otherwise = return "" inlineToZimWiki _ (LineBreak) = return "\n" -- was \\\\ inlineToZimWiki opts SoftBreak = case writerWrapText opts of WrapNone -> return " " WrapAuto -> return " " WrapPreserve -> return "\n" inlineToZimWiki _ Space = return " " inlineToZimWiki opts (Link _ txt (src, _)) = do label <- inlineListToZimWiki opts txt case txt of [Str s] | "mailto:" `isPrefixOf` src -> return $ "<" ++ s ++ ">" | escapeURI s == src -> return src _ -> if isURI src then return $ "[[" ++ src ++ "|" ++ label ++ "]]" else return $ "[[" ++ src' ++ "|" ++ label ++ "]]" where src' = case src of '/':xs -> xs -- with leading / it's a _ -> src -- link to a help page inlineToZimWiki opts (Image attr alt (source, tit)) = do alt' <- inlineListToZimWiki opts alt let txt = case (tit, alt) of ("", []) -> "" ("", _ ) -> "|" ++ alt' (_ , _ ) -> "|" ++ tit -- Relative links fail isURI and receive a colon prefix = if isURI source then "" else ":" return $ "{{" ++ prefix ++ source ++ imageDims opts attr ++ txt ++ "}}" inlineToZimWiki opts (Note contents) = do contents' <- blockListToZimWiki opts contents return $ "((" ++ contents' ++ "))" -- note - may not work for notes with multiple blocks imageDims :: WriterOptions -> Attr -> String imageDims opts attr = go (toPx $ dimension Width attr) (toPx $ dimension Height attr) where toPx = fmap (showInPixel opts) . checkPct checkPct (Just (Percent _)) = Nothing checkPct maybeDim = maybeDim go (Just w) Nothing = "?" ++ w go (Just w) (Just h) = "?" ++ w ++ "x" ++ h go Nothing (Just h) = "?0x" ++ h go Nothing Nothing = "" pandoc-1.19.2.4/src/Text/Pandoc/Writers/RTF.hs0000644000000000000000000003664513155240142016760 0ustar0000000000000000{- Copyright (C) 2006-2015 John MacFarlane 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.Writers.RTF Copyright : Copyright (C) 2006-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to RTF (rich text format). -} module Text.Pandoc.Writers.RTF ( writeRTF, writeRTFWithEmbeddedImages ) where import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Readers.TeXMath import Text.Pandoc.Templates (renderTemplate') import Text.Pandoc.Walk import Data.List ( isSuffixOf, intercalate ) import Data.Char ( ord, chr, isDigit ) import qualified Data.ByteString as B import qualified Data.Map as M import Text.Printf ( printf ) import Text.Pandoc.ImageSize -- | Convert Image inlines into a raw RTF embedded image, read from a file, -- or a MediaBag, or the internet. -- If file not found or filetype not jpeg or png, leave the inline unchanged. rtfEmbedImage :: WriterOptions -> Inline -> IO Inline rtfEmbedImage opts x@(Image attr _ (src,_)) = do result <- fetchItem' (writerMediaBag opts) (writerSourceURL opts) src case result of Right (imgdata, Just mime) | mime == "image/jpeg" || mime == "image/png" -> do let bytes = map (printf "%02x") $ B.unpack imgdata let filetype = case mime of "image/jpeg" -> "\\jpegblip" "image/png" -> "\\pngblip" _ -> error "Unknown file type" sizeSpec <- case imageSize imgdata of Left msg -> do warn $ "Could not determine image size in `" ++ src ++ "': " ++ msg return "" Right sz -> return $ "\\picw" ++ show xpx ++ "\\pich" ++ show ypx ++ "\\picwgoal" ++ show (floor (xpt * 20) :: Integer) ++ "\\pichgoal" ++ show (floor (ypt * 20) :: Integer) -- twip = 1/1440in = 1/20pt where (xpx, ypx) = sizeInPixels sz (xpt, ypt) = desiredSizeInPoints opts attr sz let raw = "{\\pict" ++ filetype ++ sizeSpec ++ "\\bin " ++ concat bytes ++ "}" return $ if B.null imgdata then x else RawInline (Format "rtf") raw _ -> return x rtfEmbedImage _ x = return x -- | Convert Pandoc to a string in rich text format, with -- images embedded as encoded binary data. writeRTFWithEmbeddedImages :: WriterOptions -> Pandoc -> IO String writeRTFWithEmbeddedImages options doc = writeRTF options `fmap` walkM (rtfEmbedImage options) doc -- | Convert Pandoc to a string in rich text format. writeRTF :: WriterOptions -> Pandoc -> String writeRTF options (Pandoc meta@(Meta metamap) blocks) = let spacer = not $ all null $ docTitle meta : docDate meta : docAuthors meta toPlain (MetaBlocks [Para ils]) = MetaInlines ils toPlain x = x -- adjust title, author, date so we don't get para inside para meta' = Meta $ M.adjust toPlain "title" . M.adjust toPlain "author" . M.adjust toPlain "date" $ metamap Just metadata = metaToJSON options (Just . concatMap (blockToRTF 0 AlignDefault)) (Just . inlineListToRTF) meta' body = concatMap (blockToRTF 0 AlignDefault) blocks isTOCHeader (Header lev _ _) = lev <= writerTOCDepth options isTOCHeader _ = False context = defField "body" body $ defField "spacer" spacer $ (if writerTableOfContents options then defField "toc" (tableOfContents $ filter isTOCHeader blocks) else id) $ metadata in case writerTemplate options of Just tpl -> renderTemplate' tpl context Nothing -> case reverse body of ('\n':_) -> body _ -> body ++ "\n" -- | Construct table of contents from list of header blocks. tableOfContents :: [Block] -> String tableOfContents headers = let contentsTree = hierarchicalize headers in concatMap (blockToRTF 0 AlignDefault) $ [Header 1 nullAttr [Str "Contents"], BulletList (map elementToListItem contentsTree)] elementToListItem :: Element -> [Block] elementToListItem (Blk _) = [] elementToListItem (Sec _ _ _ sectext subsecs) = [Plain sectext] ++ if null subsecs then [] else [BulletList (map elementToListItem subsecs)] -- | Convert unicode characters (> 127) into rich text format representation. handleUnicode :: String -> String handleUnicode [] = [] handleUnicode (c:cs) = if ord c > 127 then if surrogate c then let x = ord c - 0x10000 (q, r) = x `divMod` 0x400 upper = q + 0xd800 lower = r + 0xDC00 in enc (chr upper) ++ enc (chr lower) ++ handleUnicode cs else enc c ++ handleUnicode cs else c:(handleUnicode cs) where surrogate x = not ( (0x0000 <= ord x && ord x <= 0xd7ff) || (0xe000 <= ord x && ord x <= 0xffff) ) enc x = '\\':'u':(show (ord x)) ++ "?" -- | Escape special characters. escapeSpecial :: String -> String escapeSpecial = escapeStringUsing $ [ ('\t',"\\tab ") , ('\8216',"\\u8216'") , ('\8217',"\\u8217'") , ('\8220',"\\u8220\"") , ('\8221',"\\u8221\"") , ('\8211',"\\u8211-") , ('\8212',"\\u8212-") ] ++ backslashEscapes "{\\}" -- | Escape strings as needed for rich text format. stringToRTF :: String -> String stringToRTF = handleUnicode . escapeSpecial -- | Escape things as needed for code block in RTF. codeStringToRTF :: String -> String codeStringToRTF str = intercalate "\\line\n" $ lines (stringToRTF str) -- | Make a paragraph with first-line indent, block indent, and space after. rtfParSpaced :: Int -- ^ space after (in twips) -> Int -- ^ block indent (in twips) -> Int -- ^ first line indent (relative to block) (in twips) -> Alignment -- ^ alignment -> String -- ^ string with content -> String rtfParSpaced spaceAfter indent firstLineIndent alignment content = let alignString = case alignment of AlignLeft -> "\\ql " AlignRight -> "\\qr " AlignCenter -> "\\qc " AlignDefault -> "\\ql " in "{\\pard " ++ alignString ++ "\\f0 \\sa" ++ (show spaceAfter) ++ " \\li" ++ (show indent) ++ " \\fi" ++ (show firstLineIndent) ++ " " ++ content ++ "\\par}\n" -- | Default paragraph. rtfPar :: Int -- ^ block indent (in twips) -> Int -- ^ first line indent (relative to block) (in twips) -> Alignment -- ^ alignment -> String -- ^ string with content -> String rtfPar = rtfParSpaced 180 -- | Compact paragraph (e.g. for compact list items). rtfCompact :: Int -- ^ block indent (in twips) -> Int -- ^ first line indent (relative to block) (in twips) -> Alignment -- ^ alignment -> String -- ^ string with content -> String rtfCompact = rtfParSpaced 0 -- number of twips to indent indentIncrement :: Int indentIncrement = 720 listIncrement :: Int listIncrement = 360 -- | Returns appropriate bullet list marker for indent level. bulletMarker :: Int -> String bulletMarker indent = case indent `mod` 720 of 0 -> "\\bullet " _ -> "\\endash " -- | Returns appropriate (list of) ordered list markers for indent level. orderedMarkers :: Int -> ListAttributes -> [String] orderedMarkers indent (start, style, delim) = if style == DefaultStyle && delim == DefaultDelim then case indent `mod` 720 of 0 -> orderedListMarkers (start, Decimal, Period) _ -> orderedListMarkers (start, LowerAlpha, Period) else orderedListMarkers (start, style, delim) -- | Convert Pandoc block element to RTF. blockToRTF :: Int -- ^ indent level -> Alignment -- ^ alignment -> Block -- ^ block to convert -> String blockToRTF _ _ Null = "" blockToRTF indent alignment (Div _ bs) = concatMap (blockToRTF indent alignment) bs blockToRTF indent alignment (Plain lst) = rtfCompact indent 0 alignment $ inlineListToRTF lst blockToRTF indent alignment (Para lst) = rtfPar indent 0 alignment $ inlineListToRTF lst blockToRTF indent alignment (LineBlock lns) = blockToRTF indent alignment $ linesToPara lns blockToRTF indent alignment (BlockQuote lst) = concatMap (blockToRTF (indent + indentIncrement) alignment) lst blockToRTF indent _ (CodeBlock _ str) = rtfPar indent 0 AlignLeft ("\\f1 " ++ (codeStringToRTF str)) blockToRTF _ _ (RawBlock f str) | f == Format "rtf" = str | otherwise = "" blockToRTF indent alignment (BulletList lst) = spaceAtEnd $ concatMap (listItemToRTF alignment indent (bulletMarker indent)) lst blockToRTF indent alignment (OrderedList attribs lst) = spaceAtEnd $ concat $ zipWith (listItemToRTF alignment indent) (orderedMarkers indent attribs) lst blockToRTF indent alignment (DefinitionList lst) = spaceAtEnd $ concatMap (definitionListItemToRTF alignment indent) lst blockToRTF indent _ HorizontalRule = rtfPar indent 0 AlignCenter "\\emdash\\emdash\\emdash\\emdash\\emdash" blockToRTF indent alignment (Header level _ lst) = rtfPar indent 0 alignment $ "\\b \\fs" ++ (show (40 - (level * 4))) ++ " " ++ inlineListToRTF lst blockToRTF indent alignment (Table caption aligns sizes headers rows) = (if all null headers then "" else tableRowToRTF True indent aligns sizes headers) ++ concatMap (tableRowToRTF False indent aligns sizes) rows ++ rtfPar indent 0 alignment (inlineListToRTF caption) tableRowToRTF :: Bool -> Int -> [Alignment] -> [Double] -> [[Block]] -> String tableRowToRTF header indent aligns sizes' cols = let totalTwips = 6 * 1440 -- 6 inches sizes = if all (== 0) sizes' then take (length cols) $ repeat (1.0 / fromIntegral (length cols)) else sizes' columns = concat $ zipWith (tableItemToRTF indent) aligns cols rightEdges = tail $ scanl (\sofar new -> sofar + floor (new * totalTwips)) (0 :: Integer) sizes cellDefs = map (\edge -> (if header then "\\clbrdrb\\brdrs" else "") ++ "\\cellx" ++ show edge) rightEdges start = "{\n\\trowd \\trgaph120\n" ++ concat cellDefs ++ "\n" ++ "\\trkeep\\intbl\n{\n" end = "}\n\\intbl\\row}\n" in start ++ columns ++ end tableItemToRTF :: Int -> Alignment -> [Block] -> String tableItemToRTF indent alignment item = let contents = concatMap (blockToRTF indent alignment) item in "{" ++ substitute "\\pard" "\\pard\\intbl" contents ++ "\\cell}\n" -- | Ensure that there's the same amount of space after compact -- lists as after regular lists. spaceAtEnd :: String -> String spaceAtEnd str = if isSuffixOf "\\par}\n" str then (take ((length str) - 6) str) ++ "\\sa180\\par}\n" else str -- | Convert list item (list of blocks) to RTF. listItemToRTF :: Alignment -- ^ alignment -> Int -- ^ indent level -> String -- ^ list start marker -> [Block] -- ^ list item (list of blocks) -> [Char] listItemToRTF alignment indent marker [] = rtfCompact (indent + listIncrement) (0 - listIncrement) alignment (marker ++ "\\tx" ++ (show listIncrement) ++ "\\tab ") listItemToRTF alignment indent marker list = let (first:rest) = map (blockToRTF (indent + listIncrement) alignment) list listMarker = "\\fi" ++ show (0 - listIncrement) ++ " " ++ marker ++ "\\tx" ++ show listIncrement ++ "\\tab" insertListMarker ('\\':'f':'i':'-':d:xs) | isDigit d = listMarker ++ dropWhile isDigit xs insertListMarker ('\\':'f':'i':d:xs) | isDigit d = listMarker ++ dropWhile isDigit xs insertListMarker (x:xs) = x : insertListMarker xs insertListMarker [] = [] -- insert the list marker into the (processed) first block in insertListMarker first ++ concat rest -- | Convert definition list item (label, list of blocks) to RTF. definitionListItemToRTF :: Alignment -- ^ alignment -> Int -- ^ indent level -> ([Inline],[[Block]]) -- ^ list item (list of blocks) -> [Char] definitionListItemToRTF alignment indent (label, defs) = let labelText = blockToRTF indent alignment (Plain label) itemsText = concatMap (blockToRTF (indent + listIncrement) alignment) $ concat defs in labelText ++ itemsText -- | Convert list of inline items to RTF. inlineListToRTF :: [Inline] -- ^ list of inlines to convert -> String inlineListToRTF lst = concatMap inlineToRTF lst -- | Convert inline item to RTF. inlineToRTF :: Inline -- ^ inline to convert -> String inlineToRTF (Span _ lst) = inlineListToRTF lst inlineToRTF (Emph lst) = "{\\i " ++ (inlineListToRTF lst) ++ "}" inlineToRTF (Strong lst) = "{\\b " ++ (inlineListToRTF lst) ++ "}" inlineToRTF (Strikeout lst) = "{\\strike " ++ (inlineListToRTF lst) ++ "}" inlineToRTF (Superscript lst) = "{\\super " ++ (inlineListToRTF lst) ++ "}" inlineToRTF (Subscript lst) = "{\\sub " ++ (inlineListToRTF lst) ++ "}" inlineToRTF (SmallCaps lst) = "{\\scaps " ++ (inlineListToRTF lst) ++ "}" inlineToRTF (Quoted SingleQuote lst) = "\\u8216'" ++ (inlineListToRTF lst) ++ "\\u8217'" inlineToRTF (Quoted DoubleQuote lst) = "\\u8220\"" ++ (inlineListToRTF lst) ++ "\\u8221\"" inlineToRTF (Code _ str) = "{\\f1 " ++ (codeStringToRTF str) ++ "}" inlineToRTF (Str str) = stringToRTF str inlineToRTF (Math t str) = inlineListToRTF $ texMathToInlines t str inlineToRTF (Cite _ lst) = inlineListToRTF lst inlineToRTF (RawInline f str) | f == Format "rtf" = str | otherwise = "" inlineToRTF (LineBreak) = "\\line " inlineToRTF SoftBreak = " " inlineToRTF Space = " " inlineToRTF (Link _ text (src, _)) = "{\\field{\\*\\fldinst{HYPERLINK \"" ++ (codeStringToRTF src) ++ "\"}}{\\fldrslt{\\ul\n" ++ (inlineListToRTF text) ++ "\n}}}\n" inlineToRTF (Image _ _ (source, _)) = "{\\cf1 [image: " ++ source ++ "]\\cf0}" inlineToRTF (Note contents) = "{\\super\\chftn}{\\*\\footnote\\chftn\\~\\plain\\pard " ++ (concatMap (blockToRTF 0 AlignDefault) contents) ++ "}" pandoc-1.19.2.4/src/Text/Pandoc/Writers/ODT.hs0000644000000000000000000002176013155240142016743 0ustar0000000000000000{-# LANGUAGE ScopedTypeVariables #-} {- Copyright (C) 2008-2015 John MacFarlane 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.Writers.ODT Copyright : Copyright (C) 2008-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to ODT. -} module Text.Pandoc.Writers.ODT ( writeODT ) where import Data.IORef import Data.List ( isPrefixOf ) import Data.Maybe ( fromMaybe ) import Text.XML.Light.Output import Text.TeXMath import qualified Data.ByteString.Lazy as B import Text.Pandoc.UTF8 ( fromStringLazy ) import Codec.Archive.Zip import Text.Pandoc.Options ( WriterOptions(..), WrapOption(..) ) import Text.Pandoc.Shared ( stringify, fetchItem', warn, getDefaultReferenceODT ) import Text.Pandoc.ImageSize import Text.Pandoc.MIME ( getMimeType, extensionFromMimeType ) import Text.Pandoc.Definition import Text.Pandoc.Walk import Text.Pandoc.Writers.Shared ( fixDisplayMath ) import Text.Pandoc.Writers.OpenDocument ( writeOpenDocument ) import Control.Monad (liftM) import Text.Pandoc.XML import Text.Pandoc.Pretty import qualified Control.Exception as E import Data.Time.Clock.POSIX ( getPOSIXTime ) import System.FilePath ( takeExtension, takeDirectory, (<.>)) -- | Produce an ODT file from a Pandoc document. writeODT :: WriterOptions -- ^ Writer options -> Pandoc -- ^ Document to convert -> IO B.ByteString writeODT opts doc@(Pandoc meta _) = do let datadir = writerUserDataDir opts let title = docTitle meta refArchive <- case writerReferenceODT opts of Just f -> liftM toArchive $ B.readFile f Nothing -> getDefaultReferenceODT datadir -- handle formulas and pictures picEntriesRef <- newIORef ([] :: [Entry]) doc' <- walkM (transformPicMath opts picEntriesRef) $ walk fixDisplayMath doc let newContents = writeOpenDocument opts{writerWrapText = WrapNone} doc' epochtime <- floor `fmap` getPOSIXTime let contentEntry = toEntry "content.xml" epochtime $ fromStringLazy newContents picEntries <- readIORef picEntriesRef let archive = foldr addEntryToArchive refArchive $ contentEntry : picEntries -- construct META-INF/manifest.xml based on archive let toFileEntry fp = case getMimeType fp of Nothing -> empty Just m -> selfClosingTag "manifest:file-entry" [("manifest:media-type", m) ,("manifest:full-path", fp) ,("manifest:version", "1.2") ] let files = [ ent | ent <- filesInArchive archive, not ("META-INF" `isPrefixOf` ent) ] let formulas = [ takeDirectory ent ++ "/" | ent <- filesInArchive archive, "Formula-" `isPrefixOf` ent, takeExtension ent == ".xml" ] let manifestEntry = toEntry "META-INF/manifest.xml" epochtime $ fromStringLazy $ render Nothing $ text "" $$ ( inTags True "manifest:manifest" [("xmlns:manifest","urn:oasis:names:tc:opendocument:xmlns:manifest:1.0") ,("manifest:version","1.2")] $ ( selfClosingTag "manifest:file-entry" [("manifest:media-type","application/vnd.oasis.opendocument.text") ,("manifest:full-path","/")] $$ vcat ( map toFileEntry $ files ) $$ vcat ( map toFileEntry $ formulas ) ) ) let archive' = addEntryToArchive manifestEntry archive let metaEntry = toEntry "meta.xml" epochtime $ fromStringLazy $ render Nothing $ text "" $$ ( inTags True "office:document-meta" [("xmlns:office","urn:oasis:names:tc:opendocument:xmlns:office:1.0") ,("xmlns:xlink","http://www.w3.org/1999/xlink") ,("xmlns:dc","http://purl.org/dc/elements/1.1/") ,("xmlns:meta","urn:oasis:names:tc:opendocument:xmlns:meta:1.0") ,("xmlns:ooo","http://openoffice.org/2004/office") ,("xmlns:grddl","http://www.w3.org/2003/g/data-view#") ,("office:version","1.2")] $ ( inTagsSimple "office:meta" $ ( inTagsSimple "dc:title" (text $ escapeStringForXML (stringify title)) ) ) ) -- make sure mimetype is first let mimetypeEntry = toEntry "mimetype" epochtime $ fromStringLazy "application/vnd.oasis.opendocument.text" let archive'' = addEntryToArchive mimetypeEntry $ addEntryToArchive metaEntry archive' return $ fromArchive archive'' -- | transform both Image and Math elements transformPicMath :: WriterOptions -> IORef [Entry] -> Inline -> IO Inline transformPicMath opts entriesRef (Image attr@(id', cls, _) lab (src,t)) = do res <- fetchItem' (writerMediaBag opts) (writerSourceURL opts) src case res of Left (_ :: E.SomeException) -> do warn $ "Could not find image `" ++ src ++ "', skipping..." return $ Emph lab Right (img, mbMimeType) -> do (ptX, ptY) <- case imageSize img of Right s -> return $ sizeInPoints s Left msg -> do warn $ "Could not determine image size in `" ++ src ++ "': " ++ msg return (100, 100) let dims = case (getDim Width, getDim Height) of (Just w, Just h) -> [("width", show w), ("height", show h)] (Just w@(Percent _), Nothing) -> [("width", show w), ("style:rel-height", "scale")] (Nothing, Just h@(Percent _)) -> [("style:rel-width", "scale"), ("height", show h)] (Just w@(Inch i), Nothing) -> [("width", show w), ("height", show (i / ratio) ++ "in")] (Nothing, Just h@(Inch i)) -> [("width", show (i * ratio) ++ "in"), ("height", show h)] _ -> [("width", show ptX ++ "pt"), ("height", show ptY ++ "pt")] where ratio = ptX / ptY getDim dir = case (dimension dir attr) of Just (Percent i) -> Just $ Percent i Just dim -> Just $ Inch $ inInch opts dim Nothing -> Nothing let newattr = (id', cls, dims) entries <- readIORef entriesRef let extension = fromMaybe (takeExtension $ takeWhile (/='?') src) (mbMimeType >>= extensionFromMimeType) let newsrc = "Pictures/" ++ show (length entries) <.> extension let toLazy = B.fromChunks . (:[]) epochtime <- floor `fmap` getPOSIXTime let entry = toEntry newsrc epochtime $ toLazy img modifyIORef entriesRef (entry:) return $ Image newattr lab (newsrc, t) transformPicMath _ entriesRef (Math t math) = do entries <- readIORef entriesRef let dt = if t == InlineMath then DisplayInline else DisplayBlock case writeMathML dt <$> readTeX math of Left _ -> return $ Math t math Right r -> do let conf = useShortEmptyTags (const False) defaultConfigPP let mathml = ppcTopElement conf r epochtime <- floor `fmap` getPOSIXTime let dirname = "Formula-" ++ show (length entries) ++ "/" let fname = dirname ++ "content.xml" let entry = toEntry fname epochtime (fromStringLazy mathml) modifyIORef entriesRef (entry:) return $ RawInline (Format "opendocument") $ render Nothing $ inTags False "draw:frame" [("text:anchor-type", if t == DisplayMath then "paragraph" else "as-char") ,("style:vertical-pos", "middle") ,("style:vertical-rel", "text")] $ selfClosingTag "draw:object" [("xlink:href", dirname) , ("xlink:type", "simple") , ("xlink:show", "embed") , ("xlink:actuate", "onLoad")] transformPicMath _ _ x = return x pandoc-1.19.2.4/src/Text/Pandoc/Writers/Docx.hs0000644000000000000000000016523113155240142017214 0ustar0000000000000000{-# LANGUAGE ScopedTypeVariables, PatternGuards, ViewPatterns #-} {- Copyright (C) 2012-2015 John MacFarlane 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.Writers.Docx Copyright : Copyright (C) 2012-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to docx. -} module Text.Pandoc.Writers.Docx ( writeDocx ) where import Data.List ( intercalate, isPrefixOf, isSuffixOf ) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Lazy.Char8 as BL8 import qualified Data.Map as M import qualified Data.Set as Set import qualified Text.Pandoc.UTF8 as UTF8 import Codec.Archive.Zip import Data.Time.Clock.POSIX import System.Environment import Text.Pandoc.Compat.Time import Text.Pandoc.Definition import Text.Pandoc.Generic import Text.Pandoc.ImageSize import Text.Pandoc.Shared hiding (Element) import Text.Pandoc.Writers.Shared (fixDisplayMath) import Text.Pandoc.Options import Text.Pandoc.Readers.TeXMath import Text.Pandoc.Highlighting ( highlight ) import Text.Pandoc.Walk import Text.XML.Light as XML import Text.TeXMath import Text.Pandoc.Readers.Docx.StyleMap import Text.Pandoc.Readers.Docx.Util (elemName) import Control.Monad.Reader import Control.Monad.State import Skylighting import Data.Unique (hashUnique, newUnique) import System.Random (randomRIO) import Text.Printf (printf) import qualified Control.Exception as E import Data.Monoid ((<>)) import qualified Data.Text as T import Text.Pandoc.MIME (MimeType, getMimeType, getMimeTypeDef, extensionFromMimeType) import Control.Applicative ((<|>)) import Data.Maybe (fromMaybe, mapMaybe, maybeToList, isNothing) import Data.Char (ord, isSpace, toLower) data ListMarker = NoMarker | BulletMarker | NumberMarker ListNumberStyle ListNumberDelim Int deriving (Show, Read, Eq, Ord) listMarkerToId :: ListMarker -> String listMarkerToId NoMarker = "990" listMarkerToId BulletMarker = "991" listMarkerToId (NumberMarker sty delim n) = '9' : '9' : styNum : delimNum : show n where styNum = case sty of DefaultStyle -> '2' Example -> '3' Decimal -> '4' LowerRoman -> '5' UpperRoman -> '6' LowerAlpha -> '7' UpperAlpha -> '8' delimNum = case delim of DefaultDelim -> '0' Period -> '1' OneParen -> '2' TwoParens -> '3' data WriterEnv = WriterEnv{ envTextProperties :: [Element] , envParaProperties :: [Element] , envRTL :: Bool , envListLevel :: Int , envListNumId :: Int , envInDel :: Bool , envChangesAuthor :: String , envChangesDate :: String , envPrintWidth :: Integer } defaultWriterEnv :: WriterEnv defaultWriterEnv = WriterEnv{ envTextProperties = [] , envParaProperties = [] , envRTL = False , envListLevel = -1 , envListNumId = 1 , envInDel = False , envChangesAuthor = "unknown" , envChangesDate = "1969-12-31T19:00:00Z" , envPrintWidth = 1 } data WriterState = WriterState{ stFootnotes :: [Element] , stSectionIds :: Set.Set String , stExternalLinks :: M.Map String String , stImages :: M.Map FilePath (String, String, Maybe MimeType, Element, B.ByteString) , stLists :: [ListMarker] , stInsId :: Int , stDelId :: Int , stStyleMaps :: StyleMaps , stFirstPara :: Bool , stTocTitle :: [Inline] , stDynamicParaProps :: [String] , stDynamicTextProps :: [String] } defaultWriterState :: WriterState defaultWriterState = WriterState{ stFootnotes = defaultFootnotes , stSectionIds = Set.empty , stExternalLinks = M.empty , stImages = M.empty , stLists = [NoMarker] , stInsId = 1 , stDelId = 1 , stStyleMaps = defaultStyleMaps , stFirstPara = False , stTocTitle = normalizeInlines [Str "Table of Contents"] , stDynamicParaProps = [] , stDynamicTextProps = [] } type WS = ReaderT WriterEnv (StateT WriterState IO) mknode :: Node t => String -> [(String,String)] -> t -> Element mknode s attrs = add_attrs (map (\(k,v) -> Attr (nodename k) v) attrs) . node (nodename s) nodename :: String -> QName nodename s = QName{ qName = name, qURI = Nothing, qPrefix = prefix } where (name, prefix) = case break (==':') s of (xs,[]) -> (xs, Nothing) (ys, _:zs) -> (zs, Just ys) toLazy :: B.ByteString -> BL.ByteString toLazy = BL.fromChunks . (:[]) renderXml :: Element -> BL.ByteString renderXml elt = BL8.pack "\n" <> UTF8.fromStringLazy (showElement elt) renumIdMap :: Int -> [Element] -> M.Map String String renumIdMap _ [] = M.empty renumIdMap n (e:es) | Just oldId <- findAttr (QName "Id" Nothing Nothing) e = M.insert oldId ("rId" ++ (show n)) (renumIdMap (n+1) es) | otherwise = renumIdMap n es replaceAttr :: (QName -> Bool) -> String -> [XML.Attr] -> [XML.Attr] replaceAttr _ _ [] = [] replaceAttr f val (a:as) | f (attrKey a) = (XML.Attr (attrKey a) val) : (replaceAttr f val as) | otherwise = a : (replaceAttr f val as) renumId :: (QName -> Bool) -> (M.Map String String) -> Element -> Element renumId f renumMap e | Just oldId <- findAttrBy f e , Just newId <- M.lookup oldId renumMap = let attrs' = replaceAttr f newId (elAttribs e) in e { elAttribs = attrs' } | otherwise = e renumIds :: (QName -> Bool) -> (M.Map String String) -> [Element] -> [Element] renumIds f renumMap = map (renumId f renumMap) -- | Certain characters are invalid in XML even if escaped. -- See #1992 stripInvalidChars :: String -> String stripInvalidChars = filter isValidChar -- | See XML reference isValidChar :: Char -> Bool isValidChar (ord -> c) | c == 0x9 = True | c == 0xA = True | c == 0xD = True | 0x20 <= c && c <= 0xD7FF = True | 0xE000 <= c && c <= 0xFFFD = True | 0x10000 <= c && c <= 0x10FFFF = True | otherwise = False metaValueToInlines :: MetaValue -> [Inline] metaValueToInlines (MetaString s) = normalizeInlines [Str s] metaValueToInlines (MetaInlines ils) = ils metaValueToInlines (MetaBlocks bs) = query return bs metaValueToInlines (MetaBool b) = [Str $ show b] metaValueToInlines _ = [] -- | Produce an Docx file from a Pandoc document. writeDocx :: WriterOptions -- ^ Writer options -> Pandoc -- ^ Document to convert -> IO BL.ByteString writeDocx opts doc@(Pandoc meta _) = do let datadir = writerUserDataDir opts let doc' = walk fixDisplayMath $ doc username <- lookup "USERNAME" <$> getEnvironment utctime <- getCurrentTime distArchive <- getDefaultReferenceDocx datadir refArchive <- case writerReferenceDocx opts of Just f -> liftM (toArchive . toLazy) $ B.readFile f Nothing -> getDefaultReferenceDocx datadir parsedDoc <- parseXml refArchive distArchive "word/document.xml" let wname f qn = qPrefix qn == Just "w" && f (qName qn) let mbsectpr = filterElementName (wname (=="sectPr")) parsedDoc -- Gets the template size let mbpgsz = mbsectpr >>= (filterElementName (wname (=="pgSz"))) let mbAttrSzWidth = (elAttribs <$> mbpgsz) >>= (lookupAttrBy ((=="w") . qName)) let mbpgmar = mbsectpr >>= (filterElementName (wname (=="pgMar"))) let mbAttrMarLeft = (elAttribs <$> mbpgmar) >>= (lookupAttrBy ((=="left") . qName)) let mbAttrMarRight = (elAttribs <$> mbpgmar) >>= (lookupAttrBy ((=="right") . qName)) -- Get the avaible area (converting the size and the margins to int and -- doing the difference let pgContentWidth = (-) <$> (read <$> mbAttrSzWidth ::Maybe Integer) <*> ( (+) <$> (read <$> mbAttrMarRight ::Maybe Integer) <*> (read <$> mbAttrMarLeft ::Maybe Integer) ) -- styles let stylepath = "word/styles.xml" styledoc <- parseXml refArchive distArchive stylepath -- parse styledoc for heading styles let styleMaps = getStyleMaps styledoc let tocTitle = fromMaybe (stTocTitle defaultWriterState) $ metaValueToInlines <$> lookupMeta "toc-title" meta let initialSt = defaultWriterState { stStyleMaps = styleMaps , stTocTitle = tocTitle } let isRTLmeta = case lookupMeta "dir" meta of Just (MetaString "rtl") -> True Just (MetaInlines [Str "rtl"]) -> True _ -> False let env = defaultWriterEnv { envRTL = isRTLmeta , envChangesAuthor = fromMaybe "unknown" username , envChangesDate = formatTime defaultTimeLocale "%FT%XZ" utctime , envPrintWidth = (maybe 420 (\x -> quot x 20) pgContentWidth) } ((contents, footnotes), st) <- runStateT (runReaderT (writeOpenXML opts{writerWrapText = WrapNone} doc') env) initialSt let epochtime = floor $ utcTimeToPOSIXSeconds utctime let imgs = M.elems $ stImages st -- create entries for images in word/media/... let toImageEntry (_,path,_,_,img) = toEntry ("word/" ++ path) epochtime $ toLazy img let imageEntries = map toImageEntry imgs let stdAttributes = [("xmlns:w","http://schemas.openxmlformats.org/wordprocessingml/2006/main") ,("xmlns:m","http://schemas.openxmlformats.org/officeDocument/2006/math") ,("xmlns:r","http://schemas.openxmlformats.org/officeDocument/2006/relationships") ,("xmlns:o","urn:schemas-microsoft-com:office:office") ,("xmlns:v","urn:schemas-microsoft-com:vml") ,("xmlns:w10","urn:schemas-microsoft-com:office:word") ,("xmlns:a","http://schemas.openxmlformats.org/drawingml/2006/main") ,("xmlns:pic","http://schemas.openxmlformats.org/drawingml/2006/picture") ,("xmlns:wp","http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")] parsedRels <- parseXml refArchive distArchive "word/_rels/document.xml.rels" let isHeaderNode e = findAttr (QName "Type" Nothing Nothing) e == Just "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" let isFooterNode e = findAttr (QName "Type" Nothing Nothing) e == Just "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" let headers = filterElements isHeaderNode parsedRels let footers = filterElements isFooterNode parsedRels let extractTarget = findAttr (QName "Target" Nothing Nothing) -- we create [Content_Types].xml and word/_rels/document.xml.rels -- from scratch rather than reading from reference.docx, -- because Word sometimes changes these files when a reference.docx is modified, -- e.g. deleting the reference to footnotes.xml or removing default entries -- for image content types. -- [Content_Types].xml let mkOverrideNode (part', contentType') = mknode "Override" [("PartName",part'),("ContentType",contentType')] () let mkImageOverride (_, imgpath, mbMimeType, _, _) = mkOverrideNode ("/word/" ++ imgpath, fromMaybe "application/octet-stream" mbMimeType) let mkMediaOverride imgpath = mkOverrideNode ('/':imgpath, getMimeTypeDef imgpath) let overrides = map mkOverrideNode ( [("/word/webSettings.xml", "application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml") ,("/word/numbering.xml", "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml") ,("/word/settings.xml", "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml") ,("/word/theme/theme1.xml", "application/vnd.openxmlformats-officedocument.theme+xml") ,("/word/fontTable.xml", "application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml") ,("/docProps/app.xml", "application/vnd.openxmlformats-officedocument.extended-properties+xml") ,("/docProps/core.xml", "application/vnd.openxmlformats-package.core-properties+xml") ,("/word/styles.xml", "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml") ,("/word/document.xml", "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml") ,("/word/footnotes.xml", "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml") ] ++ map (\x -> (maybe "" ("/word/" ++) $ extractTarget x, "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml")) headers ++ map (\x -> (maybe "" ("/word/" ++) $ extractTarget x, "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml")) footers) ++ map mkImageOverride imgs ++ map mkMediaOverride [ eRelativePath e | e <- zEntries refArchive , "word/media/" `isPrefixOf` eRelativePath e ] let defaultnodes = [mknode "Default" [("Extension","xml"),("ContentType","application/xml")] (), mknode "Default" [("Extension","rels"),("ContentType","application/vnd.openxmlformats-package.relationships+xml")] ()] let contentTypesDoc = mknode "Types" [("xmlns","http://schemas.openxmlformats.org/package/2006/content-types")] $ defaultnodes ++ overrides let contentTypesEntry = toEntry "[Content_Types].xml" epochtime $ renderXml contentTypesDoc -- word/_rels/document.xml.rels let toBaseRel (url', id', target') = mknode "Relationship" [("Type",url') ,("Id",id') ,("Target",target')] () let baserels' = map toBaseRel [("http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering", "rId1", "numbering.xml") ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", "rId2", "styles.xml") ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings", "rId3", "settings.xml") ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings", "rId4", "webSettings.xml") ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable", "rId5", "fontTable.xml") ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", "rId6", "theme/theme1.xml") ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes", "rId7", "footnotes.xml") ] let idMap = renumIdMap (length baserels' + 1) (headers ++ footers) let renumHeaders = renumIds (\q -> qName q == "Id") idMap headers let renumFooters = renumIds (\q -> qName q == "Id") idMap footers let baserels = baserels' ++ renumHeaders ++ renumFooters let toImgRel (ident,path,_,_,_) = mknode "Relationship" [("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"),("Id",ident),("Target",path)] () let imgrels = map toImgRel imgs let toLinkRel (src,ident) = mknode "Relationship" [("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"),("Id",ident),("Target",src),("TargetMode","External") ] () let linkrels = map toLinkRel $ M.toList $ stExternalLinks st let reldoc = mknode "Relationships" [("xmlns","http://schemas.openxmlformats.org/package/2006/relationships")] $ baserels ++ imgrels ++ linkrels let relEntry = toEntry "word/_rels/document.xml.rels" epochtime $ renderXml reldoc -- adjust contents to add sectPr from reference.docx let sectpr = case mbsectpr of Just sectpr' -> let cs = renumIds (\q -> qName q == "id" && qPrefix q == Just "r") idMap (elChildren sectpr') in add_attrs (elAttribs sectpr') $ mknode "w:sectPr" [] cs Nothing -> (mknode "w:sectPr" [] ()) -- let sectpr = fromMaybe (mknode "w:sectPr" [] ()) mbsectpr' let contents' = contents ++ [sectpr] let docContents = mknode "w:document" stdAttributes $ mknode "w:body" [] contents' -- word/document.xml let contentEntry = toEntry "word/document.xml" epochtime $ renderXml docContents -- footnotes let notes = mknode "w:footnotes" stdAttributes footnotes let footnotesEntry = toEntry "word/footnotes.xml" epochtime $ renderXml notes -- footnote rels let footnoteRelEntry = toEntry "word/_rels/footnotes.xml.rels" epochtime $ renderXml $ mknode "Relationships" [("xmlns","http://schemas.openxmlformats.org/package/2006/relationships")] linkrels -- styles -- We only want to inject paragraph and text properties that -- are not already in the style map. Note that keys in the stylemap -- are normalized as lowercase. let newDynamicParaProps = filter (\sty -> isNothing $ M.lookup (toLower <$> sty) $ getMap $ sParaStyleMap styleMaps) (stDynamicParaProps st) newDynamicTextProps = filter (\sty -> isNothing $ M.lookup (toLower <$> sty) $ getMap $ sCharStyleMap styleMaps) (stDynamicTextProps st) let newstyles = map newParaPropToOpenXml newDynamicParaProps ++ map newTextPropToOpenXml newDynamicTextProps ++ (styleToOpenXml styleMaps $ writerHighlightStyle opts) let styledoc' = styledoc{ elContent = modifyContent (elContent styledoc) } where modifyContent | writerHighlight opts = (++ map Elem newstyles) | otherwise = filter notTokStyle notTokStyle (Elem el) = notStyle el || notTokId el notTokStyle _ = True notStyle = (/= elemName' "style") . elName notTokId = maybe True (`notElem` tokStys) . findAttr (elemName' "styleId") tokStys = "SourceCode" : map show (enumFromTo KeywordTok NormalTok) elemName' = elemName (sNameSpaces styleMaps) "w" let styleEntry = toEntry stylepath epochtime $ renderXml styledoc' -- construct word/numbering.xml let numpath = "word/numbering.xml" numbering <- parseXml refArchive distArchive numpath newNumElts <- mkNumbering (stLists st) let allElts = onlyElems (elContent numbering) ++ newNumElts let numEntry = toEntry numpath epochtime $ renderXml numbering{ elContent = -- we want all the abstractNums first, then the nums, -- otherwise things break: [Elem e | e <- allElts , qName (elName e) == "abstractNum" ] ++ [Elem e | e <- allElts , qName (elName e) == "num" ] } let docPropsPath = "docProps/core.xml" let docProps = mknode "cp:coreProperties" [("xmlns:cp","http://schemas.openxmlformats.org/package/2006/metadata/core-properties") ,("xmlns:dc","http://purl.org/dc/elements/1.1/") ,("xmlns:dcterms","http://purl.org/dc/terms/") ,("xmlns:dcmitype","http://purl.org/dc/dcmitype/") ,("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance")] $ mknode "dc:title" [] (stringify $ docTitle meta) : mknode "dc:creator" [] (intercalate "; " (map stringify $ docAuthors meta)) : (\x -> [ mknode "dcterms:created" [("xsi:type","dcterms:W3CDTF")] x , mknode "dcterms:modified" [("xsi:type","dcterms:W3CDTF")] x ]) (formatTime defaultTimeLocale "%FT%XZ" utctime) let docPropsEntry = toEntry docPropsPath epochtime $ renderXml docProps let relsPath = "_rels/.rels" let rels = mknode "Relationships" [("xmlns", "http://schemas.openxmlformats.org/package/2006/relationships")] $ map (\attrs -> mknode "Relationship" attrs ()) [ [("Id","rId1") ,("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument") ,("Target","word/document.xml")] , [("Id","rId4") ,("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties") ,("Target","docProps/app.xml")] , [("Id","rId3") ,("Type","http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties") ,("Target","docProps/core.xml")] ] let relsEntry = toEntry relsPath epochtime $ renderXml rels -- we use dist archive for settings.xml, because Word sometimes -- adds references to footnotes or endnotes we don't have... -- we do, however, copy some settings over from reference let settingsPath = "word/settings.xml" settingsList = [ "w:autoHyphenation" , "w:consecutiveHyphenLimit" , "w:hyphenationZone" , "w:doNotHyphenateCap" ] settingsEntry <- copyChildren refArchive distArchive settingsPath epochtime settingsList let entryFromArchive arch path = maybe (fail $ path ++ " missing in reference docx") return (findEntryByPath path arch `mplus` findEntryByPath path distArchive) docPropsAppEntry <- entryFromArchive refArchive "docProps/app.xml" themeEntry <- entryFromArchive refArchive "word/theme/theme1.xml" fontTableEntry <- entryFromArchive refArchive "word/fontTable.xml" webSettingsEntry <- entryFromArchive refArchive "word/webSettings.xml" headerFooterEntries <- mapM (entryFromArchive refArchive) $ mapMaybe (fmap ("word/" ++) . extractTarget) (headers ++ footers) let miscRelEntries = [ e | e <- zEntries refArchive , "word/_rels/" `isPrefixOf` (eRelativePath e) , ".xml.rels" `isSuffixOf` (eRelativePath e) , eRelativePath e /= "word/_rels/document.xml.rels" , eRelativePath e /= "word/_rels/footnotes.xml.rels" ] let otherMediaEntries = [ e | e <- zEntries refArchive , "word/media/" `isPrefixOf` eRelativePath e ] -- Create archive let archive = foldr addEntryToArchive emptyArchive $ contentTypesEntry : relsEntry : contentEntry : relEntry : footnoteRelEntry : numEntry : styleEntry : footnotesEntry : docPropsEntry : docPropsAppEntry : themeEntry : fontTableEntry : settingsEntry : webSettingsEntry : imageEntries ++ headerFooterEntries ++ miscRelEntries ++ otherMediaEntries return $ fromArchive archive newParaPropToOpenXml :: String -> Element newParaPropToOpenXml s = let styleId = filter (not . isSpace) s in mknode "w:style" [ ("w:type", "paragraph") , ("w:customStyle", "1") , ("w:styleId", styleId)] [ mknode "w:name" [("w:val", s)] () , mknode "w:basedOn" [("w:val","BodyText")] () , mknode "w:qFormat" [] () ] newTextPropToOpenXml :: String -> Element newTextPropToOpenXml s = let styleId = filter (not . isSpace) s in mknode "w:style" [ ("w:type", "character") , ("w:customStyle", "1") , ("w:styleId", styleId)] [ mknode "w:name" [("w:val", s)] () , mknode "w:basedOn" [("w:val","BodyTextChar")] () ] styleToOpenXml :: StyleMaps -> Style -> [Element] styleToOpenXml sm style = maybeToList parStyle ++ mapMaybe toStyle alltoktypes where alltoktypes = enumFromTo KeywordTok NormalTok toStyle toktype | hasStyleName (show toktype) (sCharStyleMap sm) = Nothing | otherwise = Just $ mknode "w:style" [("w:type","character"), ("w:customStyle","1"),("w:styleId",show toktype)] [ mknode "w:name" [("w:val",show toktype)] () , mknode "w:basedOn" [("w:val","VerbatimChar")] () , mknode "w:rPr" [] $ [ mknode "w:color" [("w:val",tokCol toktype)] () | tokCol toktype /= "auto" ] ++ [ mknode "w:shd" [("w:val","clear"),("w:fill",tokBg toktype)] () | tokBg toktype /= "auto" ] ++ [ mknode "w:b" [] () | tokFeature tokenBold toktype ] ++ [ mknode "w:i" [] () | tokFeature tokenItalic toktype ] ++ [ mknode "w:u" [] () | tokFeature tokenUnderline toktype ] ] tokStyles = tokenStyles style tokFeature f toktype = maybe False f $ lookup toktype tokStyles tokCol toktype = maybe "auto" (drop 1 . fromColor) $ (tokenColor =<< lookup toktype tokStyles) `mplus` defaultColor style tokBg toktype = maybe "auto" (drop 1 . fromColor) $ (tokenBackground =<< lookup toktype tokStyles) `mplus` backgroundColor style parStyle | hasStyleName "Source Code" (sParaStyleMap sm) = Nothing | otherwise = Just $ mknode "w:style" [("w:type","paragraph"), ("w:customStyle","1"),("w:styleId","SourceCode")] [ mknode "w:name" [("w:val","Source Code")] () , mknode "w:basedOn" [("w:val","Normal")] () , mknode "w:link" [("w:val","VerbatimChar")] () , mknode "w:pPr" [] $ mknode "w:wordWrap" [("w:val","off")] () : ( maybe [] (\col -> [mknode "w:shd" [("w:val","clear"),("w:fill",drop 1 $ fromColor col)] ()]) $ backgroundColor style ) ] copyChildren :: Archive -> Archive -> String -> Integer -> [String] -> IO Entry copyChildren refArchive distArchive path timestamp elNames = do ref <- parseXml refArchive distArchive path dist <- parseXml distArchive distArchive path return $ toEntry path timestamp $ renderXml dist{ elContent = elContent dist ++ copyContent ref } where strName QName{qName=name, qPrefix=prefix} | Just p <- prefix = p++":"++name | otherwise = name shouldCopy = (`elem` elNames) . strName cleanElem el@Element{elName=name} = Elem el{elName=name{qURI=Nothing}} copyContent = map cleanElem . filterChildrenName shouldCopy -- this is the lowest number used for a list numId baseListId :: Int baseListId = 1000 mkNumbering :: [ListMarker] -> IO [Element] mkNumbering lists = do elts <- mapM mkAbstractNum (ordNub lists) return $ elts ++ zipWith mkNum lists [baseListId..(baseListId + length lists - 1)] mkNum :: ListMarker -> Int -> Element mkNum marker numid = mknode "w:num" [("w:numId",show numid)] $ mknode "w:abstractNumId" [("w:val",listMarkerToId marker)] () : case marker of NoMarker -> [] BulletMarker -> [] NumberMarker _ _ start -> map (\lvl -> mknode "w:lvlOverride" [("w:ilvl",show (lvl :: Int))] $ mknode "w:startOverride" [("w:val",show start)] ()) [0..6] mkAbstractNum :: ListMarker -> IO Element mkAbstractNum marker = do nsid <- randomRIO (0x10000000 :: Integer, 0xFFFFFFFF :: Integer) return $ mknode "w:abstractNum" [("w:abstractNumId",listMarkerToId marker)] $ mknode "w:nsid" [("w:val", printf "%8x" nsid)] () : mknode "w:multiLevelType" [("w:val","multilevel")] () : map (mkLvl marker) [0..6] mkLvl :: ListMarker -> Int -> Element mkLvl marker lvl = mknode "w:lvl" [("w:ilvl",show lvl)] $ [ mknode "w:start" [("w:val",start)] () | marker /= NoMarker && marker /= BulletMarker ] ++ [ mknode "w:numFmt" [("w:val",fmt)] () , mknode "w:lvlText" [("w:val",lvltxt)] () , mknode "w:lvlJc" [("w:val","left")] () , mknode "w:pPr" [] [ mknode "w:tabs" [] $ mknode "w:tab" [("w:val","num"),("w:pos",show $ lvl * step)] () , mknode "w:ind" [("w:left",show $ lvl * step + hang),("w:hanging",show hang)] () ] ] where (fmt, lvltxt, start) = case marker of NoMarker -> ("bullet"," ","1") BulletMarker -> ("bullet",bulletFor lvl,"1") NumberMarker st de n -> (styleFor st lvl ,patternFor de ("%" ++ show (lvl + 1)) ,show n) step = 720 hang = 480 bulletFor 0 = "\x2022" -- filled circle bulletFor 1 = "\x2013" -- en dash bulletFor 2 = "\x2022" -- hyphen bullet bulletFor 3 = "\x2013" bulletFor 4 = "\x2022" bulletFor 5 = "\x2013" bulletFor _ = "\x2022" styleFor UpperAlpha _ = "upperLetter" styleFor LowerAlpha _ = "lowerLetter" styleFor UpperRoman _ = "upperRoman" styleFor LowerRoman _ = "lowerRoman" styleFor Decimal _ = "decimal" styleFor DefaultStyle 1 = "decimal" styleFor DefaultStyle 2 = "lowerLetter" styleFor DefaultStyle 3 = "lowerRoman" styleFor DefaultStyle 4 = "decimal" styleFor DefaultStyle 5 = "lowerLetter" styleFor DefaultStyle 6 = "lowerRoman" styleFor _ _ = "decimal" patternFor OneParen s = s ++ ")" patternFor TwoParens s = "(" ++ s ++ ")" patternFor _ s = s ++ "." getNumId :: WS Int getNumId = (((baseListId - 1) +) . length) `fmap` gets stLists makeTOC :: WriterOptions -> WS [Element] makeTOC opts | writerTableOfContents opts = do let depth = "1-"++(show (writerTOCDepth opts)) let tocCmd = "TOC \\o \""++depth++"\" \\h \\z \\u" tocTitle <- gets stTocTitle title <- withParaPropM (pStyleM "TOC Heading") (blocksToOpenXML opts [Para tocTitle]) return $ [mknode "w:sdt" [] ([ mknode "w:sdtPr" [] ( mknode "w:docPartObj" [] ( [mknode "w:docPartGallery" [("w:val","Table of Contents")] (), mknode "w:docPartUnique" [] ()] ) -- w:docPartObj ), -- w:sdtPr mknode "w:sdtContent" [] (title++[ mknode "w:p" [] ( mknode "w:r" [] ([ mknode "w:fldChar" [("w:fldCharType","begin"),("w:dirty","true")] (), mknode "w:instrText" [("xml:space","preserve")] tocCmd, mknode "w:fldChar" [("w:fldCharType","separate")] (), mknode "w:fldChar" [("w:fldCharType","end")] () ]) -- w:r ) -- w:p ]) ])] -- w:sdt makeTOC _ = return [] -- | Convert Pandoc document to two lists of -- OpenXML elements (the main document and footnotes). writeOpenXML :: WriterOptions -> Pandoc -> WS ([Element], [Element]) writeOpenXML opts (Pandoc meta blocks) = do let tit = docTitle meta ++ case lookupMeta "subtitle" meta of Just (MetaBlocks [Plain xs]) -> LineBreak : xs _ -> [] let auths = docAuthors meta let dat = docDate meta let abstract' = case lookupMeta "abstract" meta of Just (MetaBlocks bs) -> bs Just (MetaInlines ils) -> [Plain ils] _ -> [] let subtitle' = case lookupMeta "subtitle" meta of Just (MetaBlocks [Plain xs]) -> xs Just (MetaBlocks [Para xs]) -> xs Just (MetaInlines xs) -> xs _ -> [] title <- withParaPropM (pStyleM "Title") $ blocksToOpenXML opts [Para tit | not (null tit)] subtitle <- withParaPropM (pStyleM "Subtitle") $ blocksToOpenXML opts [Para subtitle' | not (null subtitle')] authors <- withParaProp (pCustomStyle "Author") $ blocksToOpenXML opts $ map Para auths date <- withParaPropM (pStyleM "Date") $ blocksToOpenXML opts [Para dat | not (null dat)] abstract <- if null abstract' then return [] else withParaProp (pCustomStyle "Abstract") $ blocksToOpenXML opts abstract' let convertSpace (Str x : Space : Str y : xs) = Str (x ++ " " ++ y) : xs convertSpace (Str x : Str y : xs) = Str (x ++ y) : xs convertSpace xs = xs let blocks' = bottomUp convertSpace blocks doc' <- (setFirstPara >> blocksToOpenXML opts blocks') notes' <- reverse `fmap` gets stFootnotes toc <- makeTOC opts let meta' = title ++ subtitle ++ authors ++ date ++ abstract ++ toc return (meta' ++ doc', notes') -- | Convert a list of Pandoc blocks to OpenXML. blocksToOpenXML :: WriterOptions -> [Block] -> WS [Element] blocksToOpenXML opts bls = concat `fmap` mapM (blockToOpenXML opts) bls pCustomStyle :: String -> Element pCustomStyle sty = mknode "w:pStyle" [("w:val",sty)] () pStyleM :: String -> WS XML.Element pStyleM styleName = do styleMaps <- gets stStyleMaps let sty' = getStyleId styleName $ sParaStyleMap styleMaps return $ mknode "w:pStyle" [("w:val",sty')] () rCustomStyle :: String -> Element rCustomStyle sty = mknode "w:rStyle" [("w:val",sty)] () rStyleM :: String -> WS XML.Element rStyleM styleName = do styleMaps <- gets stStyleMaps let sty' = getStyleId styleName $ sCharStyleMap styleMaps return $ mknode "w:rStyle" [("w:val",sty')] () getUniqueId :: MonadIO m => m String -- the + 20 is to ensure that there are no clashes with the rIds -- already in word/document.xml.rel getUniqueId = liftIO $ (show . (+ 20) . hashUnique) `fmap` newUnique -- | Key for specifying user-defined docx styles. dynamicStyleKey :: String dynamicStyleKey = "custom-style" -- | Convert a Pandoc block element to OpenXML. blockToOpenXML :: WriterOptions -> Block -> WS [Element] blockToOpenXML opts blk = withDirection $ blockToOpenXML' opts blk blockToOpenXML' :: WriterOptions -> Block -> WS [Element] blockToOpenXML' _ Null = return [] blockToOpenXML' opts (Div (ident,classes,kvs) bs) | Just sty <- lookup dynamicStyleKey kvs = do modify $ \s -> s{stDynamicParaProps = sty : (stDynamicParaProps s)} withParaPropM (pStyleM sty) $ blocksToOpenXML opts bs | Just "rtl" <- lookup "dir" kvs = do let kvs' = filter (("dir", "rtl")/=) kvs local (\env -> env { envRTL = True }) $ blockToOpenXML opts (Div (ident,classes,kvs') bs) | Just "ltr" <- lookup "dir" kvs = do let kvs' = filter (("dir", "ltr")/=) kvs local (\env -> env { envRTL = False }) $ blockToOpenXML opts (Div (ident,classes,kvs') bs) blockToOpenXML' opts (Div (_,["references"],_) bs) = do let (hs, bs') = span isHeaderBlock bs header <- blocksToOpenXML opts hs -- We put the Bibliography style on paragraphs after the header rest <- withParaPropM (pStyleM "Bibliography") $ blocksToOpenXML opts bs' return (header ++ rest) blockToOpenXML' opts (Div _ bs) = blocksToOpenXML opts bs blockToOpenXML' opts (Header lev (ident,_,_) lst) = do setFirstPara paraProps <- withParaPropM (pStyleM ("Heading "++show lev)) $ getParaProps False contents <- inlinesToOpenXML opts lst usedIdents <- gets stSectionIds let bookmarkName = if null ident then uniqueIdent lst usedIdents else ident modify $ \s -> s{ stSectionIds = Set.insert bookmarkName $ stSectionIds s } id' <- getUniqueId let bookmarkStart = mknode "w:bookmarkStart" [("w:id", id') ,("w:name",bookmarkName)] () let bookmarkEnd = mknode "w:bookmarkEnd" [("w:id", id')] () return [mknode "w:p" [] (paraProps ++ [bookmarkStart, bookmarkEnd] ++ contents)] blockToOpenXML' opts (Plain lst) = withParaProp (pCustomStyle "Compact") $ blockToOpenXML opts (Para lst) -- title beginning with fig: indicates that the image is a figure blockToOpenXML' opts (Para [Image attr alt (src,'f':'i':'g':':':tit)]) = do setFirstPara let prop = pCustomStyle $ if null alt then "Figure" else "FigureWithCaption" paraProps <- local (\env -> env { envParaProperties = prop : envParaProperties env }) (getParaProps False) contents <- inlinesToOpenXML opts [Image attr alt (src,tit)] captionNode <- withParaProp (pCustomStyle "ImageCaption") $ blockToOpenXML opts (Para alt) return $ mknode "w:p" [] (paraProps ++ contents) : captionNode -- fixDisplayMath sometimes produces a Para [] as artifact blockToOpenXML' _ (Para []) = return [] blockToOpenXML' opts (Para lst) = do isFirstPara <- gets stFirstPara paraProps <- getParaProps $ case lst of [Math DisplayMath _] -> True _ -> False bodyTextStyle <- pStyleM "Body Text" let paraProps' = case paraProps of [] | isFirstPara -> [mknode "w:pPr" [] [pCustomStyle "FirstParagraph"]] [] -> [mknode "w:pPr" [] [bodyTextStyle]] ps -> ps modify $ \s -> s { stFirstPara = False } contents <- inlinesToOpenXML opts lst return [mknode "w:p" [] (paraProps' ++ contents)] blockToOpenXML' opts (LineBlock lns) = blockToOpenXML opts $ linesToPara lns blockToOpenXML' _ (RawBlock format str) | format == Format "openxml" = return [ x | Elem x <- parseXML str ] | otherwise = return [] blockToOpenXML' opts (BlockQuote blocks) = do p <- withParaPropM (pStyleM "Block Text") $ blocksToOpenXML opts blocks setFirstPara return p blockToOpenXML' opts (CodeBlock attrs str) = do p <- withParaProp (pCustomStyle "SourceCode") (blockToOpenXML opts $ Para [Code attrs str]) setFirstPara return p blockToOpenXML' _ HorizontalRule = do setFirstPara return [ mknode "w:p" [] $ mknode "w:r" [] $ mknode "w:pict" [] $ mknode "v:rect" [("style","width:0;height:1.5pt"), ("o:hralign","center"), ("o:hrstd","t"),("o:hr","t")] () ] blockToOpenXML' opts (Table caption aligns widths headers rows) = do setFirstPara let captionStr = stringify caption caption' <- if null caption then return [] else withParaProp (pCustomStyle "TableCaption") $ blockToOpenXML opts (Para caption) let alignmentFor al = mknode "w:jc" [("w:val",alignmentToString al)] () let cellToOpenXML (al, cell) = withParaProp (alignmentFor al) $ blocksToOpenXML opts cell headers' <- mapM cellToOpenXML $ zip aligns headers rows' <- mapM (mapM cellToOpenXML . zip aligns) rows let borderProps = mknode "w:tcPr" [] [ mknode "w:tcBorders" [] $ mknode "w:bottom" [("w:val","single")] () , mknode "w:vAlign" [("w:val","bottom")] () ] let emptyCell = [mknode "w:p" [] [mknode "w:pPr" [] [pCustomStyle "Compact"]]] let mkcell border contents = mknode "w:tc" [] $ [ borderProps | border ] ++ if null contents then emptyCell else contents let mkrow border cells = mknode "w:tr" [] $ [mknode "w:trPr" [] [ mknode "w:cnfStyle" [("w:firstRow","1")] ()] | border] ++ map (mkcell border) cells let textwidth = 7920 -- 5.5 in in twips, 1/20 pt let fullrow = 5000 -- 100% specified in pct let rowwidth = fullrow * sum widths let mkgridcol w = mknode "w:gridCol" [("w:w", show (floor (textwidth * w) :: Integer))] () let hasHeader = not (all null headers) return $ caption' ++ [mknode "w:tbl" [] ( mknode "w:tblPr" [] ( mknode "w:tblStyle" [("w:val","TableNormal")] () : mknode "w:tblW" [("w:type", "pct"), ("w:w", show rowwidth)] () : mknode "w:tblLook" [("w:firstRow","1") | hasHeader ] () : [ mknode "w:tblCaption" [("w:val", captionStr)] () | not (null caption) ] ) : mknode "w:tblGrid" [] (if all (==0) widths then [] else map mkgridcol widths) : [ mkrow True headers' | hasHeader ] ++ map (mkrow False) rows' )] blockToOpenXML' opts (BulletList lst) = do let marker = BulletMarker addList marker numid <- getNumId l <- asList $ concat `fmap` mapM (listItemToOpenXML opts numid) lst setFirstPara return l blockToOpenXML' opts (OrderedList (start, numstyle, numdelim) lst) = do let marker = NumberMarker numstyle numdelim start addList marker numid <- getNumId l <- asList $ concat `fmap` mapM (listItemToOpenXML opts numid) lst setFirstPara return l blockToOpenXML' opts (DefinitionList items) = do l <- concat `fmap` mapM (definitionListItemToOpenXML opts) items setFirstPara return l definitionListItemToOpenXML :: WriterOptions -> ([Inline],[[Block]]) -> WS [Element] definitionListItemToOpenXML opts (term,defs) = do term' <- withParaProp (pCustomStyle "DefinitionTerm") $ blockToOpenXML opts (Para term) defs' <- withParaProp (pCustomStyle "Definition") $ concat `fmap` mapM (blocksToOpenXML opts) defs return $ term' ++ defs' addList :: ListMarker -> WS () addList marker = do lists <- gets stLists modify $ \st -> st{ stLists = lists ++ [marker] } listItemToOpenXML :: WriterOptions -> Int -> [Block] -> WS [Element] listItemToOpenXML _ _ [] = return [] listItemToOpenXML opts numid (first:rest) = do first' <- withNumId numid $ blockToOpenXML opts first -- baseListId is the code for no list marker: rest' <- withNumId baseListId $ blocksToOpenXML opts rest return $ first' ++ rest' alignmentToString :: Alignment -> [Char] alignmentToString alignment = case alignment of AlignLeft -> "left" AlignRight -> "right" AlignCenter -> "center" AlignDefault -> "left" -- | Convert a list of inline elements to OpenXML. inlinesToOpenXML :: WriterOptions -> [Inline] -> WS [Element] inlinesToOpenXML opts lst = concat `fmap` mapM (inlineToOpenXML opts) lst withNumId :: Int -> WS a -> WS a withNumId numid = local $ \env -> env{ envListNumId = numid } asList :: WS a -> WS a asList = local $ \env -> env{ envListLevel = envListLevel env + 1 } getTextProps :: WS [Element] getTextProps = do props <- asks envTextProperties return $ if null props then [] else [mknode "w:rPr" [] props] withTextProp :: Element -> WS a -> WS a withTextProp d p = local (\env -> env {envTextProperties = d : envTextProperties env}) p withTextPropM :: WS Element -> WS a -> WS a withTextPropM = (. flip withTextProp) . (>>=) getParaProps :: Bool -> WS [Element] getParaProps displayMathPara = do props <- asks envParaProperties listLevel <- asks envListLevel numid <- asks envListNumId let listPr = if listLevel >= 0 && not displayMathPara then [ mknode "w:numPr" [] [ mknode "w:numId" [("w:val",show numid)] () , mknode "w:ilvl" [("w:val",show listLevel)] () ] ] else [] return $ case props ++ listPr of [] -> [] ps -> [mknode "w:pPr" [] ps] withParaProp :: Element -> WS a -> WS a withParaProp d p = local (\env -> env {envParaProperties = d : envParaProperties env}) p withParaPropM :: WS Element -> WS a -> WS a withParaPropM = (. flip withParaProp) . (>>=) formattedString :: String -> WS [Element] formattedString str = do props <- getTextProps inDel <- asks envInDel return [ mknode "w:r" [] $ props ++ [ mknode (if inDel then "w:delText" else "w:t") [("xml:space","preserve")] (stripInvalidChars str) ] ] setFirstPara :: WS () setFirstPara = modify $ \s -> s { stFirstPara = True } -- | Convert an inline element to OpenXML. inlineToOpenXML :: WriterOptions -> Inline -> WS [Element] inlineToOpenXML opts il = withDirection $ inlineToOpenXML' opts il inlineToOpenXML' :: WriterOptions -> Inline -> WS [Element] inlineToOpenXML' _ (Str str) = formattedString str inlineToOpenXML' opts Space = inlineToOpenXML opts (Str " ") inlineToOpenXML' opts SoftBreak = inlineToOpenXML opts (Str " ") inlineToOpenXML' opts (Span (ident,classes,kvs) ils) | Just sty <- lookup dynamicStyleKey kvs = do let kvs' = filter ((dynamicStyleKey, sty)/=) kvs modify $ \s -> s{stDynamicTextProps = sty : (stDynamicTextProps s)} withTextProp (rCustomStyle sty) $ inlineToOpenXML opts (Span (ident,classes,kvs') ils) | Just "rtl" <- lookup "dir" kvs = do let kvs' = filter (("dir", "rtl")/=) kvs local (\env -> env { envRTL = True }) $ inlineToOpenXML opts (Span (ident,classes,kvs') ils) | Just "ltr" <- lookup "dir" kvs = do let kvs' = filter (("dir", "ltr")/=) kvs local (\env -> env { envRTL = False }) $ inlineToOpenXML opts (Span (ident,classes,kvs') ils) | "insertion" `elem` classes = do defaultAuthor <- asks envChangesAuthor defaultDate <- asks envChangesDate let author = fromMaybe defaultAuthor (lookup "author" kvs) date = fromMaybe defaultDate (lookup "date" kvs) insId <- gets stInsId modify $ \s -> s{stInsId = (insId + 1)} x <- inlinesToOpenXML opts ils return [ mknode "w:ins" [("w:id", (show insId)), ("w:author", author), ("w:date", date)] x ] | "deletion" `elem` classes = do defaultAuthor <- asks envChangesAuthor defaultDate <- asks envChangesDate let author = fromMaybe defaultAuthor (lookup "author" kvs) date = fromMaybe defaultDate (lookup "date" kvs) delId <- gets stDelId modify $ \s -> s{stDelId = (delId + 1)} x <- local (\env -> env {envInDel = True}) (inlinesToOpenXML opts ils) return [ mknode "w:del" [("w:id", (show delId)), ("w:author", author), ("w:date", date)] x ] | otherwise = do let off x = withTextProp (mknode x [("w:val","0")] ()) ((if "csl-no-emph" `elem` classes then off "w:i" else id) . (if "csl-no-strong" `elem` classes then off "w:b" else id) . (if "csl-no-smallcaps" `elem` classes then off "w:smallCaps" else id)) $ inlinesToOpenXML opts ils inlineToOpenXML' opts (Strong lst) = withTextProp (mknode "w:b" [] ()) $ inlinesToOpenXML opts lst inlineToOpenXML' opts (Emph lst) = withTextProp (mknode "w:i" [] ()) $ inlinesToOpenXML opts lst inlineToOpenXML' opts (Subscript lst) = withTextProp (mknode "w:vertAlign" [("w:val","subscript")] ()) $ inlinesToOpenXML opts lst inlineToOpenXML' opts (Superscript lst) = withTextProp (mknode "w:vertAlign" [("w:val","superscript")] ()) $ inlinesToOpenXML opts lst inlineToOpenXML' opts (SmallCaps lst) = withTextProp (mknode "w:smallCaps" [] ()) $ inlinesToOpenXML opts lst inlineToOpenXML' opts (Strikeout lst) = withTextProp (mknode "w:strike" [] ()) $ inlinesToOpenXML opts lst inlineToOpenXML' _ LineBreak = return [br] inlineToOpenXML' _ (RawInline f str) | f == Format "openxml" = return [ x | Elem x <- parseXML str ] | otherwise = return [] inlineToOpenXML' opts (Quoted quoteType lst) = inlinesToOpenXML opts $ [Str open] ++ lst ++ [Str close] where (open, close) = case quoteType of SingleQuote -> ("\x2018", "\x2019") DoubleQuote -> ("\x201C", "\x201D") inlineToOpenXML' opts (Math mathType str) = do let displayType = if mathType == DisplayMath then DisplayBlock else DisplayInline when (displayType == DisplayBlock) setFirstPara case writeOMML displayType <$> readTeX str of Right r -> return [r] Left e -> do warn $ "Cannot convert the following TeX math, skipping:\n" ++ str ++ "\n" ++ e inlinesToOpenXML opts (texMathToInlines mathType str) inlineToOpenXML' opts (Cite _ lst) = inlinesToOpenXML opts lst inlineToOpenXML' opts (Code attrs str) = do let unhighlighted = intercalate [br] `fmap` (mapM formattedString $ lines str) formatOpenXML _fmtOpts = intercalate [br] . map (map toHlTok) toHlTok (toktype,tok) = mknode "w:r" [] [ mknode "w:rPr" [] [ rCustomStyle (show toktype) ] , mknode "w:t" [("xml:space","preserve")] (T.unpack tok) ] withTextProp (rCustomStyle "VerbatimChar") $ if writerHighlight opts then case highlight formatOpenXML attrs str of Nothing -> unhighlighted Just h -> return h else unhighlighted inlineToOpenXML' opts (Note bs) = do notes <- gets stFootnotes notenum <- getUniqueId footnoteStyle <- rStyleM "Footnote Reference" let notemarker = mknode "w:r" [] [ mknode "w:rPr" [] footnoteStyle , mknode "w:footnoteRef" [] () ] let notemarkerXml = RawInline (Format "openxml") $ ppElement notemarker let insertNoteRef (Plain ils : xs) = Plain (notemarkerXml : Space : ils) : xs insertNoteRef (Para ils : xs) = Para (notemarkerXml : Space : ils) : xs insertNoteRef xs = Para [notemarkerXml] : xs contents <- local (\env -> env{ envListLevel = -1 , envParaProperties = [] , envTextProperties = [] }) (withParaPropM (pStyleM "Footnote Text") $ blocksToOpenXML opts $ insertNoteRef bs) let newnote = mknode "w:footnote" [("w:id", notenum)] $ contents modify $ \s -> s{ stFootnotes = newnote : notes } return [ mknode "w:r" [] [ mknode "w:rPr" [] footnoteStyle , mknode "w:footnoteReference" [("w:id", notenum)] () ] ] -- internal link: inlineToOpenXML' opts (Link _ txt ('#':xs,_)) = do contents <- withTextPropM (rStyleM "Hyperlink") $ inlinesToOpenXML opts txt return [ mknode "w:hyperlink" [("w:anchor",xs)] contents ] -- external link: inlineToOpenXML' opts (Link _ txt (src,_)) = do contents <- withTextPropM (rStyleM "Hyperlink") $ inlinesToOpenXML opts txt extlinks <- gets stExternalLinks id' <- case M.lookup src extlinks of Just i -> return i Nothing -> do i <- ("rId"++) `fmap` getUniqueId modify $ \st -> st{ stExternalLinks = M.insert src i extlinks } return i return [ mknode "w:hyperlink" [("r:id",id')] contents ] inlineToOpenXML' opts (Image attr alt (src, title)) = do -- first, check to see if we've already done this image pageWidth <- asks envPrintWidth imgs <- gets stImages case M.lookup src imgs of Just (_,_,_,elt,_) -> return [elt] Nothing -> do res <- liftIO $ fetchItem' (writerMediaBag opts) (writerSourceURL opts) src case res of Left (_ :: E.SomeException) -> do warn $ "Could not find image `" ++ src ++ "', skipping..." -- emit alt text inlinesToOpenXML opts alt Right (img, mt) -> do ident <- ("rId"++) `fmap` getUniqueId let (xpt,ypt) = desiredSizeInPoints opts attr (either (const def) id (imageSize img)) -- 12700 emu = 1 pt let (xemu,yemu) = fitToPage (xpt * 12700, ypt * 12700) (pageWidth * 12700) let cNvPicPr = mknode "pic:cNvPicPr" [] $ mknode "a:picLocks" [("noChangeArrowheads","1"),("noChangeAspect","1")] () let nvPicPr = mknode "pic:nvPicPr" [] [ mknode "pic:cNvPr" [("descr",src),("id","0"),("name","Picture")] () , cNvPicPr ] let blipFill = mknode "pic:blipFill" [] [ mknode "a:blip" [("r:embed",ident)] () , mknode "a:stretch" [] $ mknode "a:fillRect" [] () ] let xfrm = mknode "a:xfrm" [] [ mknode "a:off" [("x","0"),("y","0")] () , mknode "a:ext" [("cx",show xemu),("cy",show yemu)] () ] let prstGeom = mknode "a:prstGeom" [("prst","rect")] $ mknode "a:avLst" [] () let ln = mknode "a:ln" [("w","9525")] [ mknode "a:noFill" [] () , mknode "a:headEnd" [] () , mknode "a:tailEnd" [] () ] let spPr = mknode "pic:spPr" [("bwMode","auto")] [xfrm, prstGeom, mknode "a:noFill" [] (), ln] let graphic = mknode "a:graphic" [] $ mknode "a:graphicData" [("uri","http://schemas.openxmlformats.org/drawingml/2006/picture")] [ mknode "pic:pic" [] [ nvPicPr , blipFill , spPr ] ] let imgElt = mknode "w:r" [] $ mknode "w:drawing" [] $ mknode "wp:inline" [] [ mknode "wp:extent" [("cx",show xemu),("cy",show yemu)] () , mknode "wp:effectExtent" [("b","0"),("l","0"),("r","0"),("t","0")] () , mknode "wp:docPr" [("descr",stringify alt), ("title", title), ("id","1"),("name","Picture")] () , graphic ] let imgext = case mt >>= extensionFromMimeType of Just x -> '.':x Nothing -> case imageType img of Just Png -> ".png" Just Jpeg -> ".jpeg" Just Gif -> ".gif" Just Pdf -> ".pdf" Just Eps -> ".eps" Nothing -> "" if null imgext then -- without an extension there is no rule for content type inlinesToOpenXML opts alt -- return alt to avoid corrupted docx else do let imgpath = "media/" ++ ident ++ imgext let mbMimeType = mt <|> getMimeType imgpath -- insert mime type to use in constructing [Content_Types].xml modify $ \st -> st{ stImages = M.insert src (ident, imgpath, mbMimeType, imgElt, img) $ stImages st } return [imgElt] br :: Element br = mknode "w:r" [] [mknode "w:br" [("w:type","textWrapping")] () ] -- Word will insert these footnotes into the settings.xml file -- (whether or not they're visible in the document). If they're in the -- file, but not in the footnotes.xml file, it will produce -- problems. So we want to make sure we insert them into our document. defaultFootnotes :: [Element] defaultFootnotes = [ mknode "w:footnote" [("w:type", "separator"), ("w:id", "-1")] $ [ mknode "w:p" [] $ [mknode "w:r" [] $ [ mknode "w:separator" [] ()]]] , mknode "w:footnote" [("w:type", "continuationSeparator"), ("w:id", "0")] $ [ mknode "w:p" [] $ [ mknode "w:r" [] $ [ mknode "w:continuationSeparator" [] ()]]]] parseXml :: Archive -> Archive -> String -> IO Element parseXml refArchive distArchive relpath = case findEntryByPath relpath refArchive `mplus` findEntryByPath relpath distArchive of Nothing -> fail $ relpath ++ " missing in reference docx" Just e -> case parseXMLDoc . UTF8.toStringLazy . fromEntry $ e of Nothing -> fail $ relpath ++ " corrupt in reference docx" Just d -> return d -- | Scales the image to fit the page -- sizes are passed in emu fitToPage :: (Double, Double) -> Integer -> (Integer, Integer) fitToPage (x, y) pageWidth -- Fixes width to the page width and scales the height | x > fromIntegral pageWidth = (pageWidth, floor $ ((fromIntegral pageWidth) / x) * y) | otherwise = (floor x, floor y) withDirection :: WS a -> WS a withDirection x = do isRTL <- asks envRTL paraProps <- asks envParaProperties textProps <- asks envTextProperties -- We want to clean all bidirection (bidi) and right-to-left (rtl) -- properties from the props first. This is because we don't want -- them to stack up. let paraProps' = filter (\e -> (qName . elName) e /= "bidi") paraProps textProps' = filter (\e -> (qName . elName) e /= "rtl") textProps if isRTL -- if we are going right-to-left, we (re?)add the properties. then flip local x $ \env -> env { envParaProperties = (mknode "w:bidi" [] ()) : paraProps' , envTextProperties = (mknode "w:rtl" [] ()) : textProps' } else flip local x $ \env -> env { envParaProperties = paraProps' , envTextProperties = textProps' } pandoc-1.19.2.4/src/Text/Pandoc/Writers/EPUB.hs0000644000000000000000000015044513155240142017053 0ustar0000000000000000{-# LANGUAGE PatternGuards, CPP, ScopedTypeVariables, ViewPatterns, FlexibleContexts #-} {- Copyright (C) 2010-2015 John MacFarlane 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.Writers.EPUB Copyright : Copyright (C) 2010-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane Stability : alpha Portability : portable Conversion of 'Pandoc' documents to EPUB. -} module Text.Pandoc.Writers.EPUB ( writeEPUB ) where import Data.IORef ( IORef, newIORef, readIORef, modifyIORef ) import qualified Data.Map as M import qualified Data.Set as Set import Data.Maybe ( fromMaybe, catMaybes ) import Data.List ( isPrefixOf, isInfixOf, intercalate ) 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 Codec.Archive.Zip ( emptyArchive, addEntryToArchive, eRelativePath, fromEntry , Entry, toEntry, fromArchive) import Data.Time.Clock.POSIX ( getPOSIXTime ) 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(..)) import Text.Pandoc.Builder (fromList, setMeta) import Text.Pandoc.Options ( WriterOptions(..) , WrapOption(..) , HTMLMathMethod(..) , EPUBVersion(..) , ObfuscationMethod(NoObfuscation) ) import Text.Pandoc.Definition import Text.Pandoc.Walk (walk, walkM, query) import Control.Monad.State (modify, get, State, put, evalState) import Control.Monad (mplus, liftM, when) 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 ( writeHtml ) import Data.Char ( toLower, isDigit, isAlphaNum ) import Text.Pandoc.MIME (MimeType, getMimeType, extensionFromMimeType) import qualified Control.Exception as E import Text.Blaze.Html.Renderer.Utf8 (renderHtml) import Text.HTML.TagSoup (Tag(TagOpen), fromAttrib, parseTags) -- A Chapter includes a list of blocks and maybe a section -- number offset. Note, some chapters are unnumbered. The section -- number is different from the index number, which will be used -- in filenames, chapter0003.xhtml. data Chapter = Chapter (Maybe [Int]) [Block] data EPUBMetadata = EPUBMetadata{ epubIdentifier :: [Identifier] , epubTitle :: [Title] , epubDate :: [Date] , epubLanguage :: String , epubCreator :: [Creator] , epubContributor :: [Creator] , epubSubject :: [String] , epubDescription :: Maybe String , epubType :: Maybe String , epubFormat :: Maybe String , epubPublisher :: Maybe String , epubSource :: Maybe String , epubRelation :: Maybe String , epubCoverage :: Maybe String , epubRights :: Maybe String , epubCoverImage :: Maybe String , epubStylesheet :: Maybe Stylesheet , epubPageDirection :: Maybe ProgressionDirection } deriving Show data Stylesheet = StylesheetPath FilePath | StylesheetContents String deriving Show data Date = Date{ dateText :: String , dateEvent :: Maybe String } deriving Show data Creator = Creator{ creatorText :: String , creatorRole :: Maybe String , creatorFileAs :: Maybe String } deriving Show data Identifier = Identifier{ identifierText :: String , identifierScheme :: Maybe String } deriving Show data Title = Title{ titleText :: String , titleFileAs :: Maybe String , titleType :: Maybe String } deriving Show data ProgressionDirection = LTR | RTL deriving Show dcName :: String -> QName dcName n = QName n Nothing (Just "dc") dcNode :: Node t => String -> t -> Element dcNode = node . dcName opfName :: String -> QName opfName n = QName n Nothing (Just "opf") toId :: FilePath -> String toId = map (\x -> if isAlphaNum x || x == '-' || x == '_' then x else '_') . takeFileName removeNote :: Inline -> Inline removeNote (Note _) = Str "" removeNote x = x getEPUBMetadata :: WriterOptions -> Meta -> IO EPUBMetadata getEPUBMetadata opts meta = do let md = metadataFromMeta opts meta let elts = onlyElems $ parseXML $ writerEpubMetadata opts let md' = foldr addMetadataFromXML md elts let addIdentifier m = if null (epubIdentifier m) then do randomId <- fmap show getRandomUUID return $ m{ epubIdentifier = [Identifier randomId Nothing] } else return m let addLanguage m = if null (epubLanguage m) then case lookup "lang" (writerVariables opts) of Just x -> return m{ epubLanguage = x } Nothing -> do localeLang <- E.catch (liftM (map (\c -> if c == '_' then '-' else c) . takeWhile (/='.')) $ getEnv "LANG") (\e -> let _ = (e :: E.SomeException) in return "en-US") return m{ epubLanguage = localeLang } else return m let fixDate m = if null (epubDate m) then do currentTime <- getCurrentTime return $ m{ epubDate = [ Date{ dateText = showDateTimeISO8601 currentTime , dateEvent = Nothing } ] } else return m let addAuthor m = if any (\c -> creatorRole c == Just "aut") $ epubCreator m then return m else do let authors' = map stringify $ docAuthors meta let toAuthor name = Creator{ creatorText = name , creatorRole = Just "aut" , creatorFileAs = Nothing } return $ m{ epubCreator = map toAuthor authors' ++ epubCreator m } addIdentifier md' >>= fixDate >>= addAuthor >>= addLanguage addMetadataFromXML :: Element -> EPUBMetadata -> EPUBMetadata addMetadataFromXML e@(Element (QName name _ (Just "dc")) attrs _ _) md | name == "identifier" = md{ epubIdentifier = Identifier{ identifierText = strContent e , identifierScheme = lookupAttr (opfName "scheme") attrs } : epubIdentifier md } | name == "title" = md{ epubTitle = Title{ titleText = strContent e , titleFileAs = getAttr "file-as" , titleType = getAttr "type" } : epubTitle md } | name == "date" = md{ epubDate = Date{ dateText = fromMaybe "" $ normalizeDate' $ strContent e , dateEvent = getAttr "event" } : epubDate md } | name == "language" = md{ epubLanguage = strContent e } | name == "creator" = md{ epubCreator = Creator{ creatorText = strContent e , creatorRole = getAttr "role" , creatorFileAs = getAttr "file-as" } : epubCreator md } | name == "contributor" = md{ epubContributor = Creator { creatorText = strContent e , creatorRole = getAttr "role" , creatorFileAs = getAttr "file-as" } : epubContributor md } | name == "subject" = md{ epubSubject = strContent e : epubSubject md } | name == "description" = md { epubDescription = Just $ strContent e } | name == "type" = md { epubType = Just $ strContent e } | name == "format" = md { epubFormat = Just $ strContent e } | name == "type" = md { epubType = Just $ strContent e } | name == "publisher" = md { epubPublisher = Just $ strContent e } | name == "source" = md { epubSource = Just $ strContent e } | name == "relation" = md { epubRelation = Just $ strContent e } | name == "coverage" = md { epubCoverage = Just $ strContent e } | name == "rights" = md { epubRights = Just $ strContent e } | otherwise = md where getAttr n = lookupAttr (opfName n) attrs addMetadataFromXML _ md = md metaValueToString :: MetaValue -> String metaValueToString (MetaString s) = s metaValueToString (MetaInlines ils) = stringify ils metaValueToString (MetaBlocks bs) = stringify bs metaValueToString (MetaBool True) = "true" metaValueToString (MetaBool False) = "false" metaValueToString _ = "" getList :: String -> Meta -> (MetaValue -> a) -> [a] getList s meta handleMetaValue = case lookupMeta s meta of Just (MetaList xs) -> map handleMetaValue xs Just mv -> [handleMetaValue mv] Nothing -> [] getIdentifier :: Meta -> [Identifier] getIdentifier meta = getList "identifier" meta handleMetaValue where handleMetaValue (MetaMap m) = Identifier{ identifierText = maybe "" metaValueToString $ M.lookup "text" m , identifierScheme = metaValueToString <$> M.lookup "scheme" m } handleMetaValue mv = Identifier (metaValueToString mv) Nothing getTitle :: Meta -> [Title] getTitle meta = getList "title" meta handleMetaValue where handleMetaValue (MetaMap m) = Title{ titleText = maybe "" metaValueToString $ M.lookup "text" m , titleFileAs = metaValueToString <$> M.lookup "file-as" m , titleType = metaValueToString <$> M.lookup "type" m } handleMetaValue mv = Title (metaValueToString mv) Nothing Nothing getCreator :: String -> Meta -> [Creator] getCreator s meta = getList s meta handleMetaValue where handleMetaValue (MetaMap m) = Creator{ creatorText = maybe "" metaValueToString $ M.lookup "text" m , creatorFileAs = metaValueToString <$> M.lookup "file-as" m , creatorRole = metaValueToString <$> M.lookup "role" m } handleMetaValue mv = Creator (metaValueToString mv) Nothing Nothing getDate :: String -> Meta -> [Date] getDate s meta = getList s meta handleMetaValue where handleMetaValue (MetaMap m) = Date{ dateText = maybe "" id $ M.lookup "text" m >>= normalizeDate' . metaValueToString , dateEvent = metaValueToString <$> M.lookup "event" m } handleMetaValue mv = Date { dateText = maybe "" id $ normalizeDate' $ metaValueToString mv , dateEvent = Nothing } simpleList :: String -> Meta -> [String] simpleList s meta = case lookupMeta s meta of Just (MetaList xs) -> map metaValueToString xs Just x -> [metaValueToString x] Nothing -> [] metadataFromMeta :: WriterOptions -> Meta -> EPUBMetadata metadataFromMeta opts meta = EPUBMetadata{ epubIdentifier = identifiers , epubTitle = titles , epubDate = date , epubLanguage = language , epubCreator = creators , epubContributor = contributors , epubSubject = subjects , epubDescription = description , epubType = epubtype , epubFormat = format , epubPublisher = publisher , epubSource = source , epubRelation = relation , epubCoverage = coverage , epubRights = rights , epubCoverImage = coverImage , epubStylesheet = stylesheet , epubPageDirection = pageDirection } where identifiers = getIdentifier meta titles = getTitle meta date = getDate "date" meta language = maybe "" metaValueToString $ lookupMeta "language" meta `mplus` lookupMeta "lang" meta creators = getCreator "creator" meta contributors = getCreator "contributor" meta subjects = simpleList "subject" meta description = metaValueToString <$> lookupMeta "description" meta epubtype = metaValueToString <$> lookupMeta "type" meta format = metaValueToString <$> lookupMeta "format" meta publisher = metaValueToString <$> lookupMeta "publisher" meta source = metaValueToString <$> lookupMeta "source" meta relation = metaValueToString <$> lookupMeta "relation" meta coverage = metaValueToString <$> lookupMeta "coverage" meta rights = metaValueToString <$> lookupMeta "rights" meta coverImage = lookup "epub-cover-image" (writerVariables opts) `mplus` (metaValueToString <$> lookupMeta "cover-image" meta) stylesheet = (StylesheetContents <$> writerEpubStylesheet opts) `mplus` ((StylesheetPath . metaValueToString) <$> lookupMeta "stylesheet" meta) pageDirection = case map toLower . metaValueToString <$> lookupMeta "page-progression-direction" meta of Just "ltr" -> Just LTR Just "rtl" -> Just RTL _ -> Nothing -- | Produce an EPUB file from a Pandoc document. writeEPUB :: WriterOptions -- ^ Writer options -> Pandoc -- ^ Document to convert -> IO B.ByteString writeEPUB opts doc@(Pandoc meta _) = do let version = fromMaybe EPUB2 (writerEpubVersion opts) let epub3 = version == EPUB3 epochtime <- floor `fmap` getPOSIXTime let mkEntry path content = toEntry path epochtime content let vars = ("epub3", if epub3 then "true" else "false") : ("css", "stylesheet.css") : writerVariables opts let opts' = opts{ writerEmailObfuscation = NoObfuscation , writerSectionDivs = True , writerHtml5 = epub3 , writerVariables = vars , writerHTMLMathMethod = if epub3 then MathML Nothing else writerHTMLMathMethod opts , writerWrapText = WrapAuto } metadata <- getEPUBMetadata opts' meta -- cover page (cpgEntry, cpicEntry) <- case epubCoverImage metadata of Nothing -> return ([],[]) Just img -> do let coverImage = "media/" ++ takeFileName img let cpContent = renderHtml $ writeHtml opts'{ writerVariables = ("coverpage","true"):vars } (Pandoc meta [RawBlock (Format "html") $ "
      \n\"cover\n
      "]) imgContent <- B.readFile img return ( [mkEntry "cover.xhtml" cpContent] , [mkEntry coverImage imgContent] ) -- title page let tpContent = renderHtml $ writeHtml opts'{ writerVariables = ("titlepage","true"):vars } (Pandoc meta []) let tpEntry = mkEntry "title_page.xhtml" tpContent -- handle pictures mediaRef <- newIORef [] Pandoc _ blocks <- walkM (transformInline opts' mediaRef) doc >>= walkM (transformBlock opts' mediaRef) picEntries <- (catMaybes . map (snd . snd)) <$> readIORef mediaRef -- handle fonts let matchingGlob f = do xs <- namesMatching f when (null xs) $ warn $ f ++ " did not match any font files." return xs let mkFontEntry f = mkEntry (takeFileName f) `fmap` B.readFile f fontFiles <- concat <$> mapM matchingGlob (writerEpubFonts opts') fontEntries <- mapM mkFontEntry fontFiles -- set page progression direction attribution let progressionDirection = case epubPageDirection metadata of Just LTR | epub3 -> [("page-progression-direction", "ltr")] Just RTL | epub3 -> [("page-progression-direction", "rtl")] _ -> [] -- body pages -- add level 1 header to beginning if none there let blocks' = addIdentifiers $ case blocks of (Header 1 _ _ : _) -> blocks _ -> Header 1 ("",["unnumbered"],[]) (docTitle' meta) : blocks let chapterHeaderLevel = writerEpubChapterLevel opts let isChapterHeader (Header n _ _) = n <= chapterHeaderLevel isChapterHeader (Div ("",["references"],[]) (Header n _ _:_)) = n <= chapterHeaderLevel isChapterHeader _ = False let toChapters :: [Block] -> State [Int] [Chapter] toChapters [] = return [] toChapters (Div ("",["references"],[]) bs@(Header 1 _ _:_) : rest) = toChapters (bs ++ rest) toChapters (Header n attr@(_,classes,_) ils : bs) = do nums <- get mbnum <- if "unnumbered" `elem` classes then return Nothing else case splitAt (n - 1) nums of (ks, (m:_)) -> do let nums' = ks ++ [m+1] put nums' return $ Just (ks ++ [m]) -- note, this is the offset not the sec number (ks, []) -> do let nums' = ks ++ [1] put nums' return $ Just ks let (xs,ys) = break isChapterHeader bs (Chapter mbnum (Header n attr ils : xs) :) `fmap` toChapters ys toChapters (b:bs) = do let (xs,ys) = break isChapterHeader bs (Chapter Nothing (b:xs) :) `fmap` toChapters ys let chapters' = evalState (toChapters blocks') [] let extractLinkURL' :: Int -> Inline -> [(String, String)] extractLinkURL' num (Span (ident, _, _) _) | not (null ident) = [(ident, showChapter num ++ ('#':ident))] extractLinkURL' _ _ = [] let extractLinkURL :: Int -> Block -> [(String, String)] extractLinkURL num (Div (ident, _, _) _) | not (null ident) = [(ident, showChapter num ++ ('#':ident))] extractLinkURL num (Header _ (ident, _, _) _) | not (null ident) = [(ident, showChapter num ++ ('#':ident))] extractLinkURL num b = query (extractLinkURL' num) b let reftable = concat $ zipWith (\(Chapter _ bs) num -> query (extractLinkURL num) bs) chapters' [1..] let fixInternalReferences :: Inline -> Inline fixInternalReferences (Link attr lab ('#':xs, tit)) = case lookup xs reftable of Just ys -> Link attr lab (ys, tit) Nothing -> Link attr lab ('#':xs, tit) fixInternalReferences x = x -- internal reference IDs change when we chunk the file, -- so that '#my-header-1' might turn into 'chap004.xhtml#my-header'. -- this fixes that: let chapters = map (\(Chapter mbnum bs) -> Chapter mbnum $ walk fixInternalReferences bs) chapters' let chapToEntry :: Int -> Chapter -> Entry chapToEntry num (Chapter mbnum bs) = mkEntry (showChapter num) $ renderHtml $ writeHtml opts'{ writerNumberOffset = fromMaybe [] mbnum } $ case bs of (Header _ _ xs : _) -> -- remove notes or we get doubled footnotes Pandoc (setMeta "title" (walk removeNote $ fromList xs) nullMeta) bs _ -> Pandoc nullMeta bs let chapterEntries = zipWith chapToEntry [1..] chapters -- incredibly inefficient (TODO): let containsMathML ent = epub3 && " [] xs -> [("properties", unwords xs)]) $ () let chapterRefNode ent = unode "itemref" ! [("idref", toId $ eRelativePath ent)] $ () let pictureNode ent = unode "item" ! [("id", toId $ eRelativePath ent), ("href", eRelativePath ent), ("media-type", fromMaybe "application/octet-stream" $ mediaTypeOf $ eRelativePath ent)] $ () let fontNode ent = unode "item" ! [("id", toId $ eRelativePath ent), ("href", eRelativePath ent), ("media-type", fromMaybe "" $ getMimeType $ eRelativePath ent)] $ () let plainTitle = case docTitle' meta of [] -> case epubTitle metadata of [] -> "UNTITLED" (x:_) -> titleText x x -> stringify x let tocTitle = fromMaybe plainTitle $ metaValueToString <$> lookupMeta "toc-title" meta let uuid = case epubIdentifier metadata of (x:_) -> identifierText x -- use first identifier as UUID [] -> error "epubIdentifier is null" -- shouldn't happen currentTime <- getCurrentTime let contentsData = UTF8.fromStringLazy $ ppTopElement $ unode "package" ! [("version", case version of EPUB2 -> "2.0" EPUB3 -> "3.0") ,("xmlns","http://www.idpf.org/2007/opf") ,("unique-identifier","epub-id-1")] $ [ metadataElement version metadata currentTime , unode "manifest" $ [ unode "item" ! [("id","ncx"), ("href","toc.ncx") ,("media-type","application/x-dtbncx+xml")] $ () , unode "item" ! [("id","style"), ("href","stylesheet.css") ,("media-type","text/css")] $ () , unode "item" ! ([("id","nav") ,("href","nav.xhtml") ,("media-type","application/xhtml+xml")] ++ [("properties","nav") | epub3 ]) $ () ] ++ map chapterNode (cpgEntry ++ (tpEntry : chapterEntries)) ++ (case cpicEntry of [] -> [] (x:_) -> [add_attrs [Attr (unqual "properties") "cover-image" | epub3] (pictureNode x)]) ++ map pictureNode picEntries ++ map fontNode fontEntries , unode "spine" ! ([("toc","ncx")] ++ progressionDirection) $ case epubCoverImage metadata of Nothing -> [] Just _ -> [ unode "itemref" ! [("idref", "cover_xhtml")] $ () ] ++ ((unode "itemref" ! [("idref", "title_page_xhtml") ,("linear", case lookupMeta "title" meta of Just _ -> "yes" Nothing -> "no")] $ ()) : [unode "itemref" ! [("idref", "nav")] $ () | writerTableOfContents opts ] ++ map chapterRefNode chapterEntries) , unode "guide" $ [ unode "reference" ! [("type","toc"),("title", tocTitle), ("href","nav.xhtml")] $ () ] ++ [ unode "reference" ! [("type","cover"),("title","Cover"),("href","cover.xhtml")] $ () | epubCoverImage metadata /= Nothing ] ] let contentsEntry = mkEntry "content.opf" contentsData -- toc.ncx let secs = hierarchicalize blocks' let tocLevel = writerTOCDepth opts let navPointNode :: (Int -> String -> String -> [Element] -> Element) -> S.Element -> State Int Element navPointNode formatter (S.Sec _ nums (ident,_,_) ils children) = do n <- get modify (+1) let showNums :: [Int] -> String showNums = intercalate "." . map show let tit' = stringify ils let tit = if writerNumberSections opts && not (null nums) then showNums nums ++ " " ++ tit' else tit' let src = case lookup ident reftable of Just x -> x Nothing -> error (ident ++ " not found in reftable") let isSec (S.Sec lev _ _ _ _) = lev <= tocLevel isSec _ = False let subsecs = filter isSec children subs <- mapM (navPointNode formatter) subsecs return $ formatter n tit src subs navPointNode _ (S.Blk _) = error "navPointNode encountered Blk" let navMapFormatter :: Int -> String -> String -> [Element] -> Element navMapFormatter n tit src subs = unode "navPoint" ! [("id", "navPoint-" ++ show n)] $ [ unode "navLabel" $ unode "text" tit , unode "content" ! [("src", src)] $ () ] ++ subs let tpNode = unode "navPoint" ! [("id", "navPoint-0")] $ [ unode "navLabel" $ unode "text" (stringify $ docTitle' meta) , unode "content" ! [("src","title_page.xhtml")] $ () ] let tocData = UTF8.fromStringLazy $ ppTopElement $ unode "ncx" ! [("version","2005-1") ,("xmlns","http://www.daisy.org/z3986/2005/ncx/")] $ [ unode "head" $ [ unode "meta" ! [("name","dtb:uid") ,("content", uuid)] $ () , unode "meta" ! [("name","dtb:depth") ,("content", "1")] $ () , unode "meta" ! [("name","dtb:totalPageCount") ,("content", "0")] $ () , unode "meta" ! [("name","dtb:maxPageNumber") ,("content", "0")] $ () ] ++ case epubCoverImage metadata of Nothing -> [] Just img -> [unode "meta" ! [("name","cover"), ("content", toId img)] $ ()] , unode "docTitle" $ unode "text" $ plainTitle , unode "navMap" $ tpNode : evalState (mapM (navPointNode navMapFormatter) secs) 1 ] let tocEntry = mkEntry "toc.ncx" tocData let navXhtmlFormatter :: Int -> String -> String -> [Element] -> Element navXhtmlFormatter n tit src subs = unode "li" ! [("id", "toc-li-" ++ show n)] $ (unode "a" ! [("href",src)] $ tit) : case subs of [] -> [] (_:_) -> [unode "ol" ! [("class","toc")] $ subs] let navtag = if epub3 then "nav" else "div" let navBlocks = [RawBlock (Format "html") $ ppElement $ unode navtag ! ([("epub:type","toc") | epub3] ++ [("id","toc")]) $ [ unode "h1" ! [("id","toc-title")] $ tocTitle , unode "ol" ! [("class","toc")] $ evalState (mapM (navPointNode navXhtmlFormatter) secs) 1]] let landmarks = if epub3 then [RawBlock (Format "html") $ ppElement $ unode "nav" ! [("epub:type","landmarks") ,("hidden","hidden")] $ [ unode "ol" $ [ unode "li" [ unode "a" ! [("href", "cover.xhtml") ,("epub:type", "cover")] $ "Cover"] | epubCoverImage metadata /= Nothing ] ++ [ unode "li" [ unode "a" ! [("href", "#toc") ,("epub:type", "toc")] $ "Table of contents" ] | writerTableOfContents opts ] ] ] else [] let navData = renderHtml $ writeHtml opts'{ writerVariables = ("navpage","true"):vars } (Pandoc (setMeta "title" (walk removeNote $ fromList $ docTitle' meta) nullMeta) (navBlocks ++ landmarks)) let navEntry = mkEntry "nav.xhtml" navData -- mimetype let mimetypeEntry = mkEntry "mimetype" $ UTF8.fromStringLazy "application/epub+zip" -- container.xml let containerData = UTF8.fromStringLazy $ ppTopElement $ unode "container" ! [("version","1.0") ,("xmlns","urn:oasis:names:tc:opendocument:xmlns:container")] $ unode "rootfiles" $ unode "rootfile" ! [("full-path","content.opf") ,("media-type","application/oebps-package+xml")] $ () let containerEntry = mkEntry "META-INF/container.xml" containerData -- com.apple.ibooks.display-options.xml let apple = UTF8.fromStringLazy $ ppTopElement $ unode "display_options" $ unode "platform" ! [("name","*")] $ unode "option" ! [("name","specified-fonts")] $ "true" let appleEntry = mkEntry "META-INF/com.apple.ibooks.display-options.xml" apple -- stylesheet stylesheet <- case epubStylesheet metadata of Just (StylesheetPath fp) -> UTF8.readFile fp Just (StylesheetContents s) -> return s Nothing -> UTF8.toString `fmap` readDataFile (writerUserDataDir opts) "epub.css" let stylesheetEntry = mkEntry "stylesheet.css" $ UTF8.fromStringLazy stylesheet -- construct archive let archive = foldr addEntryToArchive emptyArchive (mimetypeEntry : containerEntry : appleEntry : stylesheetEntry : tpEntry : contentsEntry : tocEntry : navEntry : (picEntries ++ cpicEntry ++ cpgEntry ++ chapterEntries ++ fontEntries)) return $ fromArchive archive metadataElement :: EPUBVersion -> EPUBMetadata -> UTCTime -> Element metadataElement version md currentTime = unode "metadata" ! [("xmlns:dc","http://purl.org/dc/elements/1.1/") ,("xmlns:opf","http://www.idpf.org/2007/opf")] $ mdNodes where mdNodes = identifierNodes ++ titleNodes ++ dateNodes ++ languageNodes ++ creatorNodes ++ contributorNodes ++ subjectNodes ++ descriptionNodes ++ typeNodes ++ formatNodes ++ publisherNodes ++ sourceNodes ++ relationNodes ++ coverageNodes ++ rightsNodes ++ coverImageNodes ++ modifiedNodes withIds base f = concat . zipWith f (map (\x -> base ++ ('-' : show x)) ([1..] :: [Int])) identifierNodes = withIds "epub-id" toIdentifierNode $ epubIdentifier md titleNodes = withIds "epub-title" toTitleNode $ epubTitle md dateNodes = if version == EPUB2 then withIds "epub-date" toDateNode $ epubDate md else -- epub3 allows only one dc:date -- http://www.idpf.org/epub/30/spec/epub30-publications.html#sec-opf-dcdate case epubDate md of [] -> [] (x:_) -> [dcNode "date" ! [("id","epub-date")] $ dateText x] languageNodes = [dcTag "language" $ epubLanguage md] creatorNodes = withIds "epub-creator" (toCreatorNode "creator") $ epubCreator md contributorNodes = withIds "epub-contributor" (toCreatorNode "contributor") $ epubContributor md subjectNodes = map (dcTag "subject") $ epubSubject md descriptionNodes = maybe [] (dcTag' "description") $ epubDescription md typeNodes = maybe [] (dcTag' "type") $ epubType md formatNodes = maybe [] (dcTag' "format") $ epubFormat md publisherNodes = maybe [] (dcTag' "publisher") $ epubPublisher md sourceNodes = maybe [] (dcTag' "source") $ epubSource md relationNodes = maybe [] (dcTag' "relation") $ epubRelation md coverageNodes = maybe [] (dcTag' "coverage") $ epubCoverage md rightsNodes = maybe [] (dcTag' "rights") $ epubRights md coverImageNodes = maybe [] (\img -> [unode "meta" ! [("name","cover"), ("content",toId img)] $ ()]) $ epubCoverImage md modifiedNodes = [ unode "meta" ! [("property", "dcterms:modified")] $ (showDateTimeISO8601 currentTime) | version == EPUB3 ] dcTag n s = unode ("dc:" ++ n) s dcTag' n s = [dcTag n s] toIdentifierNode id' (Identifier txt scheme) | version == EPUB2 = [dcNode "identifier" ! ([("id",id')] ++ maybe [] (\x -> [("opf:scheme", x)]) scheme) $ txt] | otherwise = [dcNode "identifier" ! [("id",id')] $ txt] ++ maybe [] (\x -> [unode "meta" ! [("refines",'#':id'),("property","identifier-type"), ("scheme","onix:codelist5")] $ x]) (schemeToOnix `fmap` scheme) toCreatorNode s id' creator | version == EPUB2 = [dcNode s ! (("id",id') : maybe [] (\x -> [("opf:file-as",x)]) (creatorFileAs creator) ++ maybe [] (\x -> [("opf:role",x)]) (creatorRole creator >>= toRelator)) $ creatorText creator] | otherwise = [dcNode s ! [("id",id')] $ creatorText creator] ++ maybe [] (\x -> [unode "meta" ! [("refines",'#':id'),("property","file-as")] $ x]) (creatorFileAs creator) ++ maybe [] (\x -> [unode "meta" ! [("refines",'#':id'),("property","role"), ("scheme","marc:relators")] $ x]) (creatorRole creator >>= toRelator) toTitleNode id' title | version == EPUB2 = [dcNode "title" ! (("id",id') : -- note: EPUB2 doesn't accept opf:title-type maybe [] (\x -> [("opf:file-as",x)]) (titleFileAs title)) $ titleText title] | otherwise = [dcNode "title" ! [("id",id')] $ titleText title] ++ maybe [] (\x -> [unode "meta" ! [("refines",'#':id'),("property","file-as")] $ x]) (titleFileAs title) ++ maybe [] (\x -> [unode "meta" ! [("refines",'#':id'),("property","title-type")] $ x]) (titleType title) toDateNode id' date = [dcNode "date" ! (("id",id') : maybe [] (\x -> [("opf:event",x)]) (dateEvent date)) $ dateText date] schemeToOnix "ISBN-10" = "02" schemeToOnix "GTIN-13" = "03" schemeToOnix "UPC" = "04" schemeToOnix "ISMN-10" = "05" schemeToOnix "DOI" = "06" schemeToOnix "LCCN" = "13" schemeToOnix "GTIN-14" = "14" schemeToOnix "ISBN-13" = "15" schemeToOnix "Legal deposit number" = "17" schemeToOnix "URN" = "22" schemeToOnix "OCLC" = "23" schemeToOnix "ISMN-13" = "25" schemeToOnix "ISBN-A" = "26" schemeToOnix "JP" = "27" schemeToOnix "OLCC" = "28" schemeToOnix _ = "01" showDateTimeISO8601 :: UTCTime -> String showDateTimeISO8601 = formatTime defaultTimeLocale "%FT%TZ" transformTag :: WriterOptions -> IORef [(FilePath, (FilePath, Maybe Entry))] -- ^ (oldpath, newpath, entry) media -> Tag String -> IO (Tag String) transformTag opts mediaRef tag@(TagOpen name attr) | 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 newposter <- modifyMediaRef opts mediaRef poster let attr' = filter (\(x,_) -> x /= "src" && x /= "poster") attr ++ [("src", newsrc) | not (null newsrc)] ++ [("poster", newposter) | not (null newposter)] return $ TagOpen name attr' transformTag _ _ tag = return tag modifyMediaRef :: WriterOptions -> IORef [(FilePath, (FilePath, Maybe Entry))] -> FilePath -> IO FilePath modifyMediaRef _ _ "" = return "" modifyMediaRef opts mediaRef oldsrc = do media <- readIORef mediaRef case lookup oldsrc media of Just (n,_) -> return n Nothing -> do res <- fetchItem' (writerMediaBag opts) (writerSourceURL opts) oldsrc (new, mbEntry) <- case res of Left _ -> do warn $ "Could not find media `" ++ oldsrc ++ "', skipping..." return (oldsrc, Nothing) Right (img,mbMime) -> do let new = "media/file" ++ show (length media) ++ fromMaybe (takeExtension (takeWhile (/='?') oldsrc)) (('.':) <$> (mbMime >>= extensionFromMimeType)) epochtime <- floor `fmap` getPOSIXTime let entry = toEntry new epochtime $ B.fromChunks . (:[]) $ img return (new, Just entry) modifyIORef mediaRef ( (oldsrc, (new, mbEntry)): ) return new transformBlock :: WriterOptions -> IORef [(FilePath, (FilePath, Maybe Entry))] -- ^ (oldpath, newpath, entry) media -> Block -> IO Block transformBlock opts mediaRef (RawBlock fmt raw) | fmt == Format "html" = do let tags = parseTags raw tags' <- mapM (transformTag opts mediaRef) tags return $ RawBlock fmt (renderTags' tags') transformBlock _ _ b = return b transformInline :: WriterOptions -> IORef [(FilePath, (FilePath, Maybe Entry))] -- ^ (oldpath, newpath) media -> Inline -> IO Inline transformInline opts mediaRef (Image attr lab (src,tit)) = do newsrc <- modifyMediaRef opts mediaRef src return $ Image attr lab (newsrc, tit) 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 tags' <- mapM (transformTag opts mediaRef) tags return $ RawInline fmt (renderTags' tags') transformInline _ _ x = return x (!) :: (t -> Element) -> [(String, String)] -> t -> Element (!) f attrs n = add_attrs (map (\(k,v) -> Attr (unqual k) v) attrs) (f n) -- | Version of 'ppTopElement' that specifies UTF-8 encoding. ppTopElement :: Element -> String ppTopElement = ("\n" ++) . unEntity . ppElement -- unEntity removes numeric entities introduced by ppElement -- (kindlegen seems to choke on these). where unEntity [] = "" unEntity ('&':'#':xs) = let (ds,ys) = break (==';') xs rest = drop 1 ys in case safeRead ('\'':'\\':ds ++ "'") of Just x -> x : unEntity rest Nothing -> '&':'#':unEntity xs unEntity (x:xs) = x : unEntity xs mediaTypeOf :: FilePath -> Maybe MimeType mediaTypeOf x = let mediaPrefixes = ["image", "video", "audio"] in case getMimeType x of Just y | any (`isPrefixOf` y) mediaPrefixes -> Just y _ -> Nothing -- Returns filename for chapter number. showChapter :: Int -> String showChapter = printf "ch%03d.xhtml" -- Add identifiers to any headers without them. addIdentifiers :: [Block] -> [Block] addIdentifiers bs = evalState (mapM go bs) Set.empty where go (Header n (ident,classes,kvs) ils) = do ids <- get let ident' = if null ident then uniqueIdent ils ids else ident modify $ Set.insert ident' return $ Header n (ident',classes,kvs) ils go x = return x -- Variant of normalizeDate that allows partial dates: YYYY, YYYY-MM normalizeDate' :: String -> Maybe String normalizeDate' xs = let xs' = trim xs in case xs' of [y1,y2,y3,y4] | all isDigit [y1,y2,y3,y4] -> Just xs' -- YYYY [y1,y2,y3,y4,'-',m1,m2] | all isDigit [y1,y2,y3,y4,m1,m2] -- YYYY-MM -> Just xs' _ -> normalizeDate xs' toRelator :: String -> Maybe String toRelator x | x `elem` relators = Just x | otherwise = lookup (map toLower x) relatorMap relators :: [String] relators = map snd relatorMap relatorMap :: [(String, String)] relatorMap = [("abridger", "abr") ,("actor", "act") ,("adapter", "adp") ,("addressee", "rcp") ,("analyst", "anl") ,("animator", "anm") ,("annotator", "ann") ,("appellant", "apl") ,("appellee", "ape") ,("applicant", "app") ,("architect", "arc") ,("arranger", "arr") ,("art copyist", "acp") ,("art director", "adi") ,("artist", "art") ,("artistic director", "ard") ,("assignee", "asg") ,("associated name", "asn") ,("attributed name", "att") ,("auctioneer", "auc") ,("author", "aut") ,("author in quotations or text abstracts", "aqt") ,("author of afterword, colophon, etc.", "aft") ,("author of dialog", "aud") ,("author of introduction, etc.", "aui") ,("autographer", "ato") ,("bibliographic antecedent", "ant") ,("binder", "bnd") ,("binding designer", "bdd") ,("blurb writer", "blw") ,("book designer", "bkd") ,("book producer", "bkp") ,("bookjacket designer", "bjd") ,("bookplate designer", "bpd") ,("bookseller", "bsl") ,("braille embosser", "brl") ,("broadcaster", "brd") ,("calligrapher", "cll") ,("cartographer", "ctg") ,("caster", "cas") ,("censor", "cns") ,("choreographer", "chr") ,("cinematographer", "cng") ,("client", "cli") ,("collection registrar", "cor") ,("collector", "col") ,("collotyper", "clt") ,("colorist", "clr") ,("commentator", "cmm") ,("commentator for written text", "cwt") ,("compiler", "com") ,("complainant", "cpl") ,("complainant-appellant", "cpt") ,("complainant-appellee", "cpe") ,("composer", "cmp") ,("compositor", "cmt") ,("conceptor", "ccp") ,("conductor", "cnd") ,("conservator", "con") ,("consultant", "csl") ,("consultant to a project", "csp") ,("contestant", "cos") ,("contestant-appellant", "cot") ,("contestant-appellee", "coe") ,("contestee", "cts") ,("contestee-appellant", "ctt") ,("contestee-appellee", "cte") ,("contractor", "ctr") ,("contributor", "ctb") ,("copyright claimant", "cpc") ,("copyright holder", "cph") ,("corrector", "crr") ,("correspondent", "crp") ,("costume designer", "cst") ,("court governed", "cou") ,("court reporter", "crt") ,("cover designer", "cov") ,("creator", "cre") ,("curator", "cur") ,("dancer", "dnc") ,("data contributor", "dtc") ,("data manager", "dtm") ,("dedicatee", "dte") ,("dedicator", "dto") ,("defendant", "dfd") ,("defendant-appellant", "dft") ,("defendant-appellee", "dfe") ,("degree granting institution", "dgg") ,("delineator", "dln") ,("depicted", "dpc") ,("depositor", "dpt") ,("designer", "dsr") ,("director", "drt") ,("dissertant", "dis") ,("distribution place", "dbp") ,("distributor", "dst") ,("donor", "dnr") ,("draftsman", "drm") ,("dubious author", "dub") ,("editor", "edt") ,("editor of compilation", "edc") ,("editor of moving image work", "edm") ,("electrician", "elg") ,("electrotyper", "elt") ,("enacting jurisdiction", "enj") ,("engineer", "eng") ,("engraver", "egr") ,("etcher", "etr") ,("event place", "evp") ,("expert", "exp") ,("facsimilist", "fac") ,("field director", "fld") ,("film director", "fmd") ,("film distributor", "fds") ,("film editor", "flm") ,("film producer", "fmp") ,("filmmaker", "fmk") ,("first party", "fpy") ,("forger", "frg") ,("former owner", "fmo") ,("funder", "fnd") ,("geographic information specialist", "gis") ,("honoree", "hnr") ,("host", "hst") ,("host institution", "his") ,("illuminator", "ilu") ,("illustrator", "ill") ,("inscriber", "ins") ,("instrumentalist", "itr") ,("interviewee", "ive") ,("interviewer", "ivr") ,("inventor", "inv") ,("issuing body", "isb") ,("judge", "jud") ,("jurisdiction governed", "jug") ,("laboratory", "lbr") ,("laboratory director", "ldr") ,("landscape architect", "lsa") ,("lead", "led") ,("lender", "len") ,("libelant", "lil") ,("libelant-appellant", "lit") ,("libelant-appellee", "lie") ,("libelee", "lel") ,("libelee-appellant", "let") ,("libelee-appellee", "lee") ,("librettist", "lbt") ,("licensee", "lse") ,("licensor", "lso") ,("lighting designer", "lgd") ,("lithographer", "ltg") ,("lyricist", "lyr") ,("manufacture place", "mfp") ,("manufacturer", "mfr") ,("marbler", "mrb") ,("markup editor", "mrk") ,("metadata contact", "mdc") ,("metal-engraver", "mte") ,("moderator", "mod") ,("monitor", "mon") ,("music copyist", "mcp") ,("musical director", "msd") ,("musician", "mus") ,("narrator", "nrt") ,("onscreen presenter", "osp") ,("opponent", "opn") ,("organizer of meeting", "orm") ,("originator", "org") ,("other", "oth") ,("owner", "own") ,("panelist", "pan") ,("papermaker", "ppm") ,("patent applicant", "pta") ,("patent holder", "pth") ,("patron", "pat") ,("performer", "prf") ,("permitting agency", "pma") ,("photographer", "pht") ,("plaintiff", "ptf") ,("plaintiff-appellant", "ptt") ,("plaintiff-appellee", "pte") ,("platemaker", "plt") ,("praeses", "pra") ,("presenter", "pre") ,("printer", "prt") ,("printer of plates", "pop") ,("printmaker", "prm") ,("process contact", "prc") ,("producer", "pro") ,("production company", "prn") ,("production designer", "prs") ,("production manager", "pmn") ,("production personnel", "prd") ,("production place", "prp") ,("programmer", "prg") ,("project director", "pdr") ,("proofreader", "pfr") ,("provider", "prv") ,("publication place", "pup") ,("publisher", "pbl") ,("publishing director", "pbd") ,("puppeteer", "ppt") ,("radio director", "rdd") ,("radio producer", "rpc") ,("recording engineer", "rce") ,("recordist", "rcd") ,("redaktor", "red") ,("renderer", "ren") ,("reporter", "rpt") ,("repository", "rps") ,("research team head", "rth") ,("research team member", "rtm") ,("researcher", "res") ,("respondent", "rsp") ,("respondent-appellant", "rst") ,("respondent-appellee", "rse") ,("responsible party", "rpy") ,("restager", "rsg") ,("restorationist", "rsr") ,("reviewer", "rev") ,("rubricator", "rbr") ,("scenarist", "sce") ,("scientific advisor", "sad") ,("screenwriter", "aus") ,("scribe", "scr") ,("sculptor", "scl") ,("second party", "spy") ,("secretary", "sec") ,("seller", "sll") ,("set designer", "std") ,("setting", "stg") ,("signer", "sgn") ,("singer", "sng") ,("sound designer", "sds") ,("speaker", "spk") ,("sponsor", "spn") ,("stage director", "sgd") ,("stage manager", "stm") ,("standards body", "stn") ,("stereotyper", "str") ,("storyteller", "stl") ,("supporting host", "sht") ,("surveyor", "srv") ,("teacher", "tch") ,("technical director", "tcd") ,("television director", "tld") ,("television producer", "tlp") ,("thesis advisor", "ths") ,("transcriber", "trc") ,("translator", "trl") ,("type designer", "tyd") ,("typographer", "tyg") ,("university place", "uvp") ,("videographer", "vdg") ,("witness", "wit") ,("wood engraver", "wde") ,("woodcutter", "wdc") ,("writer of accompanying material", "wam") ,("writer of added commentary", "wac") ,("writer of added lyrics", "wal") ,("writer of added text", "wat") ] docTitle' :: Meta -> [Inline] docTitle' meta = fromMaybe [] $ go <$> lookupMeta "title" meta where go (MetaString s) = [Str s] go (MetaInlines xs) = xs go (MetaBlocks [Para xs]) = xs go (MetaBlocks [Plain xs]) = xs go (MetaMap m) = case M.lookup "type" m of Just x | stringify x == "main" -> maybe [] go $ M.lookup "text" m _ -> [] go (MetaList xs) = concatMap go xs go _ = [] pandoc-1.19.2.4/src/Text/Pandoc/Writers/FB2.hs0000644000000000000000000005665613155240142016702 0ustar0000000000000000{-# LANGUAGE PatternGuards #-} {- Copyright (c) 2011-2012, Sergey Astanin All rights reserved. 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 -} {- | Conversion of 'Pandoc' documents to FB2 (FictionBook2) format. FictionBook is an XML-based e-book format. For more information see: -} module Text.Pandoc.Writers.FB2 (writeFB2) where import Control.Monad.State (StateT, evalStateT, get, modify) import Control.Monad.State (liftM, liftM2, liftIO) import Data.ByteString.Base64 (encode) import Data.Char (toLower, isSpace, isAscii, isControl) import Data.List (intersperse, intercalate, isPrefixOf, stripPrefix) import Data.Either (lefts, rights) import Network.Browser (browse, request, setAllowRedirects, setOutHandler) import Network.HTTP (catchIO_, getRequest, getHeaders, getResponseBody) import Network.HTTP (lookupHeader, HeaderName(..), urlEncode) import Network.URI (isURI, unEscapeString) import System.FilePath (takeExtension) import Text.XML.Light import qualified Control.Exception as E import qualified Data.ByteString as B import qualified Text.XML.Light as X import qualified Text.XML.Light.Cursor as XC import Text.Pandoc.Definition import Text.Pandoc.Options (WriterOptions(..), HTMLMathMethod(..), def) import Text.Pandoc.Shared (orderedListMarkers, isHeaderBlock, capitalize, linesToPara) -- | Data to be written at the end of the document: -- (foot)notes, URLs, references, images. data FbRenderState = FbRenderState { footnotes :: [ (Int, String, [Content]) ] -- ^ #, ID, text , imagesToFetch :: [ (String, String) ] -- ^ filename, URL or path , parentListMarker :: String -- ^ list marker of the parent ordered list , parentBulletLevel :: Int -- ^ nesting level of the unordered list , writerOptions :: WriterOptions } deriving (Show) -- | FictionBook building monad. type FBM = StateT FbRenderState IO newFB :: FbRenderState newFB = FbRenderState { footnotes = [], imagesToFetch = [] , parentListMarker = "", parentBulletLevel = 0 , writerOptions = def } data ImageMode = NormalImage | InlineImage deriving (Eq) instance Show ImageMode where show NormalImage = "imageType" show InlineImage = "inlineImageType" -- | Produce an FB2 document from a 'Pandoc' document. writeFB2 :: WriterOptions -- ^ conversion options -> Pandoc -- ^ document to convert -> IO String -- ^ FictionBook2 document (not encoded yet) writeFB2 opts (Pandoc meta blocks) = flip evalStateT newFB $ do modify (\s -> s { writerOptions = opts }) desc <- description meta fp <- frontpage meta secs <- renderSections 1 blocks let body = el "body" $ fp ++ secs notes <- renderFootnotes (imgs,missing) <- liftM imagesToFetch get >>= \s -> liftIO (fetchImages s) let body' = replaceImagesWithAlt missing body let fb2_xml = el "FictionBook" (fb2_attrs, [desc, body'] ++ notes ++ imgs) return $ xml_head ++ (showContent fb2_xml) ++ "\n" where xml_head = "\n" fb2_attrs = let xmlns = "http://www.gribuser.ru/xml/fictionbook/2.0" xlink = "http://www.w3.org/1999/xlink" in [ uattr "xmlns" xmlns , attr ("xmlns", "l") xlink ] -- frontpage :: Meta -> FBM [Content] frontpage meta' = do t <- cMapM toXml . docTitle $ meta' return $ [ el "title" (el "p" t) , el "annotation" (map (el "p" . cMap plain) (docAuthors meta' ++ [docDate meta'])) ] description :: Meta -> FBM Content description meta' = do bt <- booktitle meta' let as = authors meta' dd <- docdate meta' return $ el "description" [ el "title-info" (bt ++ as ++ dd) , el "document-info" [ el "program-used" "pandoc" ] -- FIXME: +version ] booktitle :: Meta -> FBM [Content] booktitle meta' = do t <- cMapM toXml . docTitle $ meta' return $ if null t then [] else [ el "book-title" t ] authors :: Meta -> [Content] authors meta' = cMap author (docAuthors meta') author :: [Inline] -> [Content] author ss = let ws = words . cMap plain $ ss email = (el "email") `fmap` (take 1 $ filter ('@' `elem`) ws) ws' = filter ('@' `notElem`) ws names = case ws' of (nickname:[]) -> [ el "nickname" nickname ] (fname:lname:[]) -> [ el "first-name" fname , el "last-name" lname ] (fname:rest) -> [ el "first-name" fname , el "middle-name" (concat . init $ rest) , el "last-name" (last rest) ] ([]) -> [] in list $ el "author" (names ++ email) docdate :: Meta -> FBM [Content] docdate meta' = do let ss = docDate meta' d <- cMapM toXml ss return $ if null d then [] else [el "date" d] -- | Divide the stream of blocks into sections and convert to XML -- representation. renderSections :: Int -> [Block] -> FBM [Content] renderSections level blocks = do let secs = splitSections level blocks mapM (renderSection level) secs renderSection :: Int -> ([Inline], [Block]) -> FBM Content renderSection level (ttl, body) = do title <- if null ttl then return [] else return . list . el "title" . formatTitle $ ttl content <- if (hasSubsections body) then renderSections (level + 1) body else cMapM blockToXml body return $ el "section" (title ++ content) where hasSubsections = any isHeaderBlock -- | Only

      and are allowed within in FB2. formatTitle :: [Inline] -> [Content] formatTitle inlines = let lns = split isLineBreak inlines lns' = map (el "p" . cMap plain) lns in intersperse (el "empty-line" ()) lns' split :: (a -> Bool) -> [a] -> [[a]] split _ [] = [] split cond xs = let (b,a) = break cond xs in (b:split cond (drop 1 a)) isLineBreak :: Inline -> Bool isLineBreak LineBreak = True isLineBreak _ = False -- | Divide the stream of block elements into sections: [(title, blocks)]. splitSections :: Int -> [Block] -> [([Inline], [Block])] splitSections level blocks = reverse $ revSplit (reverse blocks) where revSplit [] = [] revSplit rblocks = let (lastsec, before) = break sameLevel rblocks (header, prevblocks) = case before of ((Header n _ title):prevblocks') -> if n == level then (title, prevblocks') else ([], before) _ -> ([], before) in (header, reverse lastsec) : revSplit prevblocks sameLevel (Header n _ _) = n == level sameLevel _ = False -- | Make another FictionBook body with footnotes. renderFootnotes :: FBM [Content] renderFootnotes = do fns <- footnotes `liftM` get if null fns then return [] -- no footnotes else return . list $ el "body" ([uattr "name" "notes"], map renderFN (reverse fns)) where renderFN (n, idstr, cs) = let fn_texts = (el "title" (el "p" (show n))) : cs in el "section" ([uattr "id" idstr], fn_texts) -- | Fetch images and encode them for the FictionBook XML. -- Return image data and a list of hrefs of the missing images. fetchImages :: [(String,String)] -> IO ([Content],[String]) fetchImages links = do imgs <- mapM (uncurry fetchImage) links return $ (rights imgs, lefts imgs) -- | Fetch image data from disk or from network and make a <binary> XML section. -- Return either (Left hrefOfMissingImage) or (Right xmlContent). fetchImage :: String -> String -> IO (Either String Content) fetchImage href link = do mbimg <- case (isURI link, readDataURI link) of (True, Just (mime,_,True,base64)) -> let mime' = map toLower mime in if mime' == "image/png" || mime' == "image/jpeg" then return (Just (mime',base64)) else return Nothing (True, Just _) -> return Nothing -- not base64-encoded (True, Nothing) -> fetchURL link (False, _) -> do d <- nothingOnError $ B.readFile (unEscapeString link) let t = case map toLower (takeExtension link) of ".png" -> Just "image/png" ".jpg" -> Just "image/jpeg" ".jpeg" -> Just "image/jpeg" ".jpe" -> Just "image/jpeg" _ -> Nothing -- only PNG and JPEG are supported in FB2 return $ liftM2 (,) t (liftM (toStr . encode) d) case mbimg of Just (imgtype, imgdata) -> do return . Right $ el "binary" ( [uattr "id" href , uattr "content-type" imgtype] , txt imgdata ) _ -> return (Left ('#':href)) where nothingOnError :: (IO B.ByteString) -> (IO (Maybe B.ByteString)) nothingOnError action = liftM Just action `E.catch` omnihandler omnihandler :: E.SomeException -> IO (Maybe B.ByteString) omnihandler _ = return Nothing -- | Extract mime type and encoded data from the Data URI. readDataURI :: String -- ^ URI -> Maybe (String,String,Bool,String) -- ^ Maybe (mime,charset,isBase64,data) readDataURI uri = case stripPrefix "data:" uri of Nothing -> Nothing Just rest -> let meta = takeWhile (/= ',') rest -- without trailing ',' uridata = drop (length meta + 1) rest parts = split (== ';') meta (mime,cs,enc)=foldr upd ("text/plain","US-ASCII",False) parts in Just (mime,cs,enc,uridata) where upd str m@(mime,cs,enc) | isMimeType str = (str,cs,enc) | Just str' <- stripPrefix "charset=" str = (mime,str',enc) | str == "base64" = (mime,cs,True) | otherwise = m -- Without parameters like ;charset=...; see RFC 2045, 5.1 isMimeType :: String -> Bool isMimeType s = case split (=='/') s of [mtype,msubtype] -> ((map toLower mtype) `elem` types || "x-" `isPrefixOf` (map toLower mtype)) && all valid mtype && all valid msubtype _ -> False where types = ["text","image","audio","video","application","message","multipart"] valid c = isAscii c && not (isControl c) && not (isSpace c) && c `notElem` "()<>@,;:\\\"/[]?=" -- | Fetch URL, return its Content-Type and binary data on success. fetchURL :: String -> IO (Maybe (String, String)) fetchURL url = do flip catchIO_ (return Nothing) $ do r <- browse $ do setOutHandler (const (return ())) setAllowRedirects True liftM snd . request . getRequest $ url let content_type = lookupHeader HdrContentType (getHeaders r) content <- liftM (Just . toStr . encode . toBS) . getResponseBody $ Right r return $ liftM2 (,) content_type content toBS :: String -> B.ByteString toBS = B.pack . map (toEnum . fromEnum) toStr :: B.ByteString -> String toStr = map (toEnum . fromEnum) . B.unpack footnoteID :: Int -> String footnoteID i = "n" ++ (show i) linkID :: Int -> String linkID i = "l" ++ (show i) -- | Convert a block-level Pandoc's element to FictionBook XML representation. blockToXml :: Block -> FBM [Content] blockToXml (Plain ss) = cMapM toXml ss -- FIXME: can lead to malformed FB2 blockToXml (Para [Math DisplayMath formula]) = insertMath NormalImage formula -- title beginning with fig: indicates that the image is a figure blockToXml (Para [Image atr alt (src,'f':'i':'g':':':tit)]) = insertImage NormalImage (Image atr alt (src,tit)) blockToXml (Para ss) = liftM (list . el "p") $ cMapM toXml ss blockToXml (CodeBlock _ s) = return . spaceBeforeAfter . map (el "p" . el "code") . lines $ s blockToXml (RawBlock _ s) = return . spaceBeforeAfter . map (el "p" . el "code") . lines $ s blockToXml (Div _ bs) = cMapM blockToXml bs blockToXml (BlockQuote bs) = liftM (list . el "cite") $ cMapM blockToXml bs blockToXml (LineBlock lns) = blockToXml $ linesToPara lns blockToXml (OrderedList a bss) = do state <- get let pmrk = parentListMarker state let markers = map ((pmrk ++ " ") ++) $ orderedListMarkers a let mkitem mrk bs = do modify (\s -> s { parentListMarker = mrk }) itemtext <- cMapM blockToXml . paraToPlain $ bs modify (\s -> s { parentListMarker = pmrk }) -- old parent marker return . el "p" $ [ txt mrk, txt " " ] ++ itemtext mapM (uncurry mkitem) (zip markers bss) blockToXml (BulletList bss) = do state <- get let level = parentBulletLevel state let pmrk = parentListMarker state let prefix = replicate (length pmrk) ' ' let bullets = ["\x2022", "\x25e6", "*", "\x2043", "\x2023"] let mrk = prefix ++ bullets !! (level `mod` (length bullets)) let mkitem bs = do modify (\s -> s { parentBulletLevel = (level+1) }) itemtext <- cMapM blockToXml . paraToPlain $ bs modify (\s -> s { parentBulletLevel = level }) -- restore bullet level return $ el "p" $ [ txt (mrk ++ " ") ] ++ itemtext mapM mkitem bss blockToXml (DefinitionList defs) = cMapM mkdef defs where mkdef (term, bss) = do def' <- cMapM (cMapM blockToXml . sep . paraToPlain . map indent) bss t <- wrap "strong" term return [ el "p" t, el "p" def' ] sep blocks = if all needsBreak blocks then blocks ++ [Plain [LineBreak]] else blocks needsBreak (Para _) = False needsBreak (Plain ins) = LineBreak `notElem` ins needsBreak _ = True blockToXml (Header _ _ _) = -- should never happen, see renderSections error "unexpected header in section text" blockToXml HorizontalRule = return [ el "empty-line" () , el "p" (txt (replicate 10 '—')) , el "empty-line" () ] blockToXml (Table caption aligns _ headers rows) = do hd <- mkrow "th" headers aligns bd <- mapM (\r -> mkrow "td" r aligns) rows c <- return . el "emphasis" =<< cMapM toXml caption return [el "table" (hd : bd), el "p" c] where mkrow :: String -> [TableCell] -> [Alignment] -> FBM Content mkrow tag cells aligns' = (el "tr") `liftM` (mapM (mkcell tag) (zip cells aligns')) -- mkcell :: String -> (TableCell, Alignment) -> FBM Content mkcell tag (cell, align) = do cblocks <- cMapM blockToXml cell return $ el tag ([align_attr align], cblocks) -- align_attr a = Attr (QName "align" Nothing Nothing) (align_str a) align_str AlignLeft = "left" align_str AlignCenter = "center" align_str AlignRight = "right" align_str AlignDefault = "left" blockToXml Null = return [] -- Replace paragraphs with plain text and line break. -- Necessary to simulate multi-paragraph lists in FB2. paraToPlain :: [Block] -> [Block] paraToPlain [] = [] paraToPlain (Para inlines : rest) = let p = (Plain (inlines ++ [LineBreak])) in p : paraToPlain rest paraToPlain (p:rest) = p : paraToPlain rest -- Simulate increased indentation level. Will not really work -- for multi-line paragraphs. indent :: Block -> Block indent = indentBlock where -- indentation space spacer :: String spacer = replicate 4 ' ' -- indentBlock (Plain ins) = Plain ((Str spacer):ins) indentBlock (Para ins) = Para ((Str spacer):ins) indentBlock (CodeBlock a s) = let s' = unlines . map (spacer++) . lines $ s in CodeBlock a s' indentBlock (BlockQuote bs) = BlockQuote (map indent bs) indentBlock (Header l attr' ins) = Header l attr' (indentLines ins) indentBlock everythingElse = everythingElse -- indent every (explicit) line indentLines :: [Inline] -> [Inline] indentLines ins = let lns = split isLineBreak ins :: [[Inline]] in intercalate [LineBreak] $ map ((Str spacer):) lns -- | Convert a Pandoc's Inline element to FictionBook XML representation. toXml :: Inline -> FBM [Content] toXml (Str s) = return [txt s] toXml (Span _ ils) = cMapM toXml ils toXml (Emph ss) = list `liftM` wrap "emphasis" ss toXml (Strong ss) = list `liftM` wrap "strong" ss toXml (Strikeout ss) = list `liftM` wrap "strikethrough" ss toXml (Superscript ss) = list `liftM` wrap "sup" ss toXml (Subscript ss) = list `liftM` wrap "sub" ss toXml (SmallCaps ss) = cMapM toXml $ capitalize ss toXml (Quoted SingleQuote ss) = do -- FIXME: should be language-specific inner <- cMapM toXml ss return $ [txt "‘"] ++ inner ++ [txt "’"] toXml (Quoted DoubleQuote ss) = do inner <- cMapM toXml ss return $ [txt "“"] ++ inner ++ [txt "”"] toXml (Cite _ ss) = cMapM toXml ss -- FIXME: support citation styles toXml (Code _ s) = return [el "code" s] toXml Space = return [txt " "] toXml SoftBreak = return [txt " "] toXml LineBreak = return [el "empty-line" ()] toXml (Math _ formula) = insertMath InlineImage formula toXml (RawInline _ _) = return [] -- raw TeX and raw HTML are suppressed toXml (Link _ text (url,ttl)) = do fns <- footnotes `liftM` get let n = 1 + length fns let ln_id = linkID n let ln_ref = list . el "sup" . txt $ "[" ++ show n ++ "]" ln_text <- cMapM toXml text let ln_desc = let ttl' = dropWhile isSpace ttl in if null ttl' then list . el "p" $ el "code" url else list . el "p" $ [ txt (ttl' ++ ": "), el "code" url ] modify (\s -> s { footnotes = (n, ln_id, ln_desc) : fns }) return $ ln_text ++ [ el "a" ( [ attr ("l","href") ('#':ln_id) , uattr "type" "note" ] , ln_ref) ] toXml img@(Image _ _ _) = insertImage InlineImage img toXml (Note bs) = do fns <- footnotes `liftM` get let n = 1 + length fns let fn_id = footnoteID n fn_desc <- cMapM blockToXml bs modify (\s -> s { footnotes = (n, fn_id, fn_desc) : fns }) let fn_ref = el "sup" . txt $ "[" ++ show n ++ "]" return . list $ el "a" ( [ attr ("l","href") ('#':fn_id) , uattr "type" "note" ] , fn_ref ) insertMath :: ImageMode -> String -> FBM [Content] insertMath immode formula = do htmlMath <- return . writerHTMLMathMethod . writerOptions =<< get case htmlMath of WebTeX url -> do let alt = [Code nullAttr formula] let imgurl = url ++ urlEncode formula let img = Image nullAttr alt (imgurl, "") insertImage immode img _ -> return [el "code" formula] insertImage :: ImageMode -> Inline -> FBM [Content] insertImage immode (Image _ alt (url,ttl)) = do images <- imagesToFetch `liftM` get let n = 1 + length images let fname = "image" ++ show n modify (\s -> s { imagesToFetch = (fname, url) : images }) let ttlattr = case (immode, null ttl) of (NormalImage, False) -> [ uattr "title" ttl ] _ -> [] return . list $ el "image" $ [ attr ("l","href") ('#':fname) , attr ("l","type") (show immode) , uattr "alt" (cMap plain alt) ] ++ ttlattr insertImage _ _ = error "unexpected inline instead of image" replaceImagesWithAlt :: [String] -> Content -> Content replaceImagesWithAlt missingHrefs body = let cur = XC.fromContent body cur' = replaceAll cur in XC.toTree . XC.root $ cur' where -- replaceAll :: XC.Cursor -> XC.Cursor replaceAll c = let n = XC.current c c' = if isImage n && isMissing n then XC.modifyContent replaceNode c else c in case XC.nextDF c' of (Just cnext) -> replaceAll cnext Nothing -> c' -- end of document -- isImage :: Content -> Bool isImage (Elem e) = (elName e) == (uname "image") isImage _ = False -- isMissing (Elem img@(Element _ _ _ _)) = let imgAttrs = elAttribs img badAttrs = map (attr ("l","href")) missingHrefs in any (`elem` imgAttrs) badAttrs isMissing _ = False -- replaceNode :: Content -> Content replaceNode n@(Elem img@(Element _ _ _ _)) = let attrs = elAttribs img alt = getAttrVal attrs (uname "alt") imtype = getAttrVal attrs (qname "l" "type") in case (alt, imtype) of (Just alt', Just imtype') -> if imtype' == show NormalImage then el "p" alt' else txt alt' (Just alt', Nothing) -> txt alt' -- no type attribute _ -> n -- don't replace if alt text is not found replaceNode n = n -- getAttrVal :: [X.Attr] -> QName -> Maybe String getAttrVal attrs name = case filter ((name ==) . attrKey) attrs of (a:_) -> Just (attrVal a) _ -> Nothing -- | Wrap all inlines with an XML tag (given its unqualified name). wrap :: String -> [Inline] -> FBM Content wrap tagname inlines = el tagname `liftM` cMapM toXml inlines -- " Create a singleton list. list :: a -> [a] list = (:[]) -- | Convert an 'Inline' to plaintext. plain :: Inline -> String plain (Str s) = s plain (Emph ss) = concat (map plain ss) plain (Span _ ss) = concat (map plain ss) plain (Strong ss) = concat (map plain ss) plain (Strikeout ss) = concat (map plain ss) plain (Superscript ss) = concat (map plain ss) plain (Subscript ss) = concat (map plain ss) plain (SmallCaps ss) = concat (map plain ss) plain (Quoted _ ss) = concat (map plain ss) plain (Cite _ ss) = concat (map plain ss) -- FIXME plain (Code _ s) = s plain Space = " " plain SoftBreak = " " plain LineBreak = "\n" plain (Math _ s) = s plain (RawInline _ s) = s plain (Link _ text (url,_)) = concat (map plain text ++ [" <", url, ">"]) plain (Image _ alt _) = concat (map plain alt) plain (Note _) = "" -- FIXME -- | Create an XML element. el :: (Node t) => String -- ^ unqualified element name -> t -- ^ node contents -> Content -- ^ XML content el name cs = Elem $ unode name cs -- | Put empty lines around content spaceBeforeAfter :: [Content] -> [Content] spaceBeforeAfter cs = let emptyline = el "empty-line" () in [emptyline] ++ cs ++ [emptyline] -- | Create a plain-text XML content. txt :: String -> Content txt s = Text $ CData CDataText s Nothing -- | Create an XML attribute with an unqualified name. uattr :: String -> String -> Text.XML.Light.Attr uattr name val = Attr (uname name) val -- | Create an XML attribute with a qualified name from given namespace. attr :: (String, String) -> String -> Text.XML.Light.Attr attr (ns, name) val = Attr (qname ns name) val -- | Unqualified name uname :: String -> QName uname name = QName name Nothing Nothing -- | Qualified name qname :: String -> String -> QName qname ns name = QName name Nothing (Just ns) -- | Abbreviation for 'concatMap'. cMap :: (a -> [b]) -> [a] -> [b] cMap = concatMap -- | Monadic equivalent of 'concatMap'. cMapM :: (Monad m) => (a -> m [b]) -> [a] -> m [b] cMapM f xs = concat `liftM` mapM f xs ����������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Writers/TEI.hs������������������������������������������������������0000644�0000000�0000000�00000032672�13155240142�016742� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings, PatternGuards #-} {- Copyright (C) 2006-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.Writers.Docbook Copyright : Copyright (C) 2006-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable Conversion of 'Pandoc' documents to Docbook XML. -} module Text.Pandoc.Writers.TEI (writeTEI) where import Text.Pandoc.Definition import Text.Pandoc.XML import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Options import Text.Pandoc.Templates (renderTemplate') import Data.List ( stripPrefix, isPrefixOf ) import Data.Char ( toLower ) import Text.Pandoc.Highlighting ( languages, languagesByExtension ) import Text.Pandoc.Pretty import Text.Pandoc.ImageSize import qualified Text.Pandoc.Builder as B -- | Convert list of authors to a docbook <author> section authorToTEI :: WriterOptions -> [Inline] -> B.Inlines authorToTEI opts name' = let name = render Nothing $ inlinesToTEI opts name' colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing in B.rawInline "tei" $ render colwidth $ inTagsSimple "author" (text $ escapeStringForXML name) -- | Convert Pandoc document to string in Docbook format. writeTEI :: WriterOptions -> Pandoc -> String writeTEI opts (Pandoc meta blocks) = let elements = hierarchicalize blocks colwidth = if writerWrapText opts == WrapAuto then Just $ writerColumns opts else Nothing render' = render colwidth startLvl = case writerTopLevelDivision opts of TopLevelPart -> -1 TopLevelChapter -> 0 TopLevelSection -> 1 TopLevelDefault -> 1 auths' = map (authorToTEI opts) $ docAuthors meta meta' = B.setMeta "author" auths' meta Just metadata = metaToJSON opts (Just . render colwidth . (vcat . (map (elementToTEI opts startLvl)) . hierarchicalize)) (Just . render colwidth . inlinesToTEI opts) meta' main = render' $ vcat (map (elementToTEI opts startLvl) elements) context = defField "body" main $ defField "mathml" (case writerHTMLMathMethod opts of MathML _ -> True _ -> False) $ metadata in case writerTemplate opts of Nothing -> main Just tpl -> renderTemplate' tpl context -- | Convert an Element to TEI. elementToTEI :: WriterOptions -> Int -> Element -> Doc elementToTEI opts _ (Blk block) = blockToTEI opts block elementToTEI opts lvl (Sec _ _num (id',_,_) title elements) = -- TEI doesn't allow sections with no content, so insert some if needed let elements' = if null elements then [Blk (Para [])] else elements -- level numbering correspond to LaTeX internals divType = case lvl of n | n == -1 -> "part" | n == 0 -> "chapter" | n >= 1 && n <= 5 -> "level" ++ show n | otherwise -> "section" in inTags True "div" [("type", divType) | not (null id')] $ -- ("id", writerIdentifierPrefix opts ++ id') | not (null id')] $ inTagsSimple "head" (inlinesToTEI opts title) $$ vcat (map (elementToTEI opts (lvl + 1)) elements') -- | Convert a list of Pandoc blocks to TEI. blocksToTEI :: WriterOptions -> [Block] -> Doc blocksToTEI opts = vcat . map (blockToTEI opts) -- | Auxiliary function to convert Plain block to Para. plainToPara :: Block -> Block plainToPara (Plain x) = Para x plainToPara x = x -- | Convert a list of pairs of terms and definitions into a TEI -- list with labels and items. deflistItemsToTEI :: WriterOptions -> [([Inline],[[Block]])] -> Doc deflistItemsToTEI opts items = vcat $ map (\(term, defs) -> deflistItemToTEI opts term defs) items -- | Convert a term and a list of blocks into a TEI varlistentry. deflistItemToTEI :: WriterOptions -> [Inline] -> [[Block]] -> Doc deflistItemToTEI opts term defs = let def' = concatMap (map plainToPara) defs in inTagsIndented "label" (inlinesToTEI opts term) $$ inTagsIndented "item" (blocksToTEI opts def') -- | Convert a list of lists of blocks to a list of TEI list items. listItemsToTEI :: WriterOptions -> [[Block]] -> Doc listItemsToTEI opts items = vcat $ map (listItemToTEI opts) items -- | Convert a list of blocks into a TEI list item. listItemToTEI :: WriterOptions -> [Block] -> Doc listItemToTEI opts item = inTagsIndented "item" $ blocksToTEI opts $ map plainToPara item imageToTEI :: WriterOptions -> Attr -> String -> Doc imageToTEI _ attr src = selfClosingTag "graphic" $ ("url", src) : idAndRole attr ++ dims where dims = go Width "width" ++ go Height "depth" go dir dstr = case (dimension dir attr) of Just a -> [(dstr, show a)] Nothing -> [] -- | Convert a Pandoc block element to TEI. blockToTEI :: WriterOptions -> Block -> Doc blockToTEI _ Null = empty -- Add ids to paragraphs in divs with ids - this is needed for -- pandoc-citeproc to get link anchors in bibliographies: blockToTEI opts (Div (ident,_,_) [Para lst]) = let attribs = [("id", ident) | not (null ident)] in inTags False "p" attribs $ inlinesToTEI opts lst blockToTEI opts (Div _ bs) = blocksToTEI opts $ map plainToPara bs blockToTEI _ (Header _ _ _) = empty -- should not occur after hierarchicalize -- For TEI simple, text must be within containing block element, so -- we use plainToPara to ensure that Plain text ends up contained by -- something. blockToTEI opts (Plain lst) = blockToTEI opts $ Para lst -- title beginning with fig: indicates that the image is a figure --blockToTEI opts (Para [Image attr txt (src,'f':'i':'g':':':_)]) = -- let alt = inlinesToTEI opts txt -- capt = if null txt -- then empty -- else inTagsSimple "title" alt -- in inTagsIndented "figure" $ -- capt $$ -- (inTagsIndented "mediaobject" $ -- (inTagsIndented "imageobject" -- (imageToTEI opts attr src)) $$ -- inTagsSimple "textobject" (inTagsSimple "phrase" alt)) blockToTEI opts (Para lst) = inTags False "p" [] $ inlinesToTEI opts lst blockToTEI opts (LineBlock lns) = blockToTEI opts $ linesToPara lns blockToTEI opts (BlockQuote blocks) = inTagsIndented "quote" $ blocksToTEI opts blocks blockToTEI _ (CodeBlock (_,classes,_) str) = text ("<ab type='codeblock " ++ lang ++ "'>") <> cr <> flush (text (escapeStringForXML str) <> cr <> text "</ab>") where lang = if null langs then "" else escapeStringForXML (head langs) isLang l = map toLower l `elem` map (map toLower) languages langsFrom s = if isLang s then [s] else languagesByExtension . map toLower $ s langs = concatMap langsFrom classes blockToTEI opts (BulletList lst) = let attribs = [("type", "unordered")] in inTags True "list" attribs $ listItemsToTEI opts lst blockToTEI _ (OrderedList _ []) = empty blockToTEI opts (OrderedList (start, numstyle, _) (first:rest)) = let attribs = case numstyle of DefaultStyle -> [] Decimal -> [("type", "ordered:arabic")] Example -> [("type", "ordered:arabic")] UpperAlpha -> [("type", "ordered:upperalpha")] LowerAlpha -> [("type", "ordered:loweralpha")] UpperRoman -> [("type", "ordered:upperroman")] LowerRoman -> [("type", "ordered:lowerroman")] items = if start == 1 then listItemsToTEI opts (first:rest) else (inTags True "item" [("n",show start)] (blocksToTEI opts $ map plainToPara first)) $$ listItemsToTEI opts rest in inTags True "list" attribs items blockToTEI opts (DefinitionList lst) = let attribs = [("type", "definition")] in inTags True "list" attribs $ deflistItemsToTEI opts lst blockToTEI _ (RawBlock f str) | f == "tei" = text str -- raw TEI block (should such a thing exist). -- | f == "html" = text str -- allow html for backwards compatibility | otherwise = empty blockToTEI _ HorizontalRule = selfClosingTag "milestone" [("unit","undefined"), ("type","separator"),("rendition","line")] -- | TEI Tables -- TEI Simple's tables are composed of cells and rows; other -- table info in the AST is here lossily discard. blockToTEI opts (Table _ _ _ headers rows) = let headers' = tableHeadersToTEI opts headers -- headers' = if all null headers -- then return empty -- else tableRowToTEI opts headers in inTags True "table" [] $ vcat $ [headers'] <> map (tableRowToTEI opts) rows tableRowToTEI :: WriterOptions -> [[Block]] -> Doc tableRowToTEI opts cols = inTagsIndented "row" $ vcat $ map (tableItemToTEI opts) cols tableHeadersToTEI :: WriterOptions -> [[Block]] -> Doc tableHeadersToTEI opts cols = inTags True "row" [("role","label")] $ vcat $ map (tableItemToTEI opts) cols tableItemToTEI :: WriterOptions -> [Block] -> Doc tableItemToTEI opts item = inTags False "cell" [] $ vcat $ map (blockToTEI opts) item -- | Convert a list of inline elements to TEI. inlinesToTEI :: WriterOptions -> [Inline] -> Doc inlinesToTEI opts lst = hcat $ map (inlineToTEI opts) lst -- | Convert an inline element to TEI. inlineToTEI :: WriterOptions -> Inline -> Doc inlineToTEI _ (Str str) = text $ escapeStringForXML str inlineToTEI opts (Emph lst) = inTags False "hi" [("rendition","simple:italic")] $ inlinesToTEI opts lst inlineToTEI opts (Strong lst) = inTags False "hi" [("rendition", "simple:bold")] $ inlinesToTEI opts lst inlineToTEI opts (Strikeout lst) = inTags False "hi" [("rendition", "simple:strikethrough")] $ inlinesToTEI opts lst inlineToTEI opts (Superscript lst) = inTags False "hi" [("rendition", "simple:superscript")] $ inlinesToTEI opts lst inlineToTEI opts (Subscript lst) = inTags False "hi" [("rendition", "simple:subscript")] $ inlinesToTEI opts lst inlineToTEI opts (SmallCaps lst) = inTags False "hi" [("rendition", "simple:smallcaps")] $ inlinesToTEI opts lst inlineToTEI opts (Quoted _ lst) = inTagsSimple "quote" $ inlinesToTEI opts lst inlineToTEI opts (Cite _ lst) = inlinesToTEI opts lst inlineToTEI opts (Span _ ils) = inlinesToTEI opts ils inlineToTEI _ (Code _ str) = inTags False "seg" [("type","code")] $ text (escapeStringForXML str) -- Distinguish display from inline math by wrapping the former in a "figure." inlineToTEI _ (Math t str) = case t of InlineMath -> inTags False "formula" [("notation","TeX")] $ text (str) DisplayMath -> inTags True "figure" [("type","math")] $ inTags False "formula" [("notation","TeX")] $ text (str) inlineToTEI _ (RawInline f x) | f == "tei" = text x | otherwise = empty inlineToTEI _ LineBreak = selfClosingTag "lb" [] inlineToTEI _ Space = space -- because we use \n for LineBreak, we can't do soft breaks: inlineToTEI _ SoftBreak = space inlineToTEI opts (Link attr txt (src, _)) | Just email <- stripPrefix "mailto:" src = let emailLink = text $ escapeStringForXML $ email in case txt of [Str s] | escapeURI s == email -> emailLink _ -> inlinesToTEI opts txt <+> char '(' <> emailLink <> char ')' | otherwise = (if isPrefixOf "#" src then inTags False "ref" $ ("target", drop 1 src) : idAndRole attr else inTags False "ref" $ ("target", src) : idAndRole attr ) $ inlinesToTEI opts txt inlineToTEI opts (Image attr description (src, tit)) = let titleDoc = if null tit then empty else inTags False "figDesc" [] (text $ escapeStringForXML tit) imageDesc = if null description then empty else inTags False "head" [] (inlinesToTEI opts description) in inTagsIndented "figure" $ imageDesc $$ imageToTEI opts attr src $$ titleDoc inlineToTEI opts (Note contents) = inTagsIndented "note" $ blocksToTEI opts contents idAndRole :: Attr -> [(String, String)] idAndRole (id',cls,_) = ident ++ role where ident = if null id' then [] else [("id", id')] role = if null cls then [] else [("role", unwords cls)] ����������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/PDF.hs��������������������������������������������������������������0000644�0000000�0000000�00000034422�13155240142�015266� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings, CPP, ScopedTypeVariables #-} {- Copyright (C) 2012-2016 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.PDF Copyright : Copyright (C) 2012-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable Conversion of LaTeX documents to PDF. -} module Text.Pandoc.PDF ( makePDF ) where 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 Data.Monoid ((<>)) import System.Exit (ExitCode (..)) import System.FilePath import System.IO (stderr, stdout) import System.IO.Temp (withTempFile) import System.Directory import Data.Digest.Pure.SHA (showDigest, sha1) import System.Environment import Control.Monad (unless, when, (<=<)) import qualified Control.Exception as E 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, inDirectory, stringify) import Text.Pandoc.Writers.Shared (getField, metaToJSON) import Text.Pandoc.Options (WriterOptions(..), HTMLMathMethod(..)) import Text.Pandoc.MIME (extensionFromMimeType, getMimeType) import Text.Pandoc.Process (pipeProcess) import qualified Data.ByteString.Lazy as BL import qualified Codec.Picture as JP #ifdef _WINDOWS import Data.List (intercalate) #endif #ifdef _WINDOWS changePathSeparators :: FilePath -> FilePath changePathSeparators = intercalate "/" . splitDirectories #endif makePDF :: String -- ^ pdf creator (pdflatex, lualatex, -- xelatex, context, wkhtmltopdf) -> (WriterOptions -> Pandoc -> String) -- ^ writer -> WriterOptions -- ^ options -> Pandoc -- ^ document -> IO (Either ByteString ByteString) makePDF "wkhtmltopdf" writer opts doc@(Pandoc meta _) = do let mathArgs = case writerHTMLMathMethod opts of -- with MathJax, wait til all math is rendered: MathJax _ -> ["--run-script", "MathJax.Hub.Register.StartupHook('End Typeset', function() { window.status = 'mathjax_loaded' });", "--window-status", "mathjax_loaded"] _ -> [] meta' <- metaToJSON opts (return . stringify) (return . stringify) meta let toArgs (f, mbd) = maybe [] (\d -> ['-':'-':f, d]) mbd let args = mathArgs ++ concatMap toArgs [("page-size", getField "papersize" meta') ,("title", getField "title" meta') ,("margin-bottom", fromMaybe (Just "1.2in") (getField "margin-bottom" meta')) ,("margin-top", fromMaybe (Just "1.25in") (getField "margin-top" meta')) ,("margin-right", fromMaybe (Just "1.25in") (getField "margin-right" meta')) ,("margin-left", fromMaybe (Just "1.25in") (getField "margin-left" meta')) ] let source = writer opts doc html2pdf (writerVerbose opts) args source makePDF program writer opts doc = withTempDir "tex2pdf." $ \tmpdir -> do doc' <- handleImages opts tmpdir doc let source = writer opts doc' args = writerLaTeXArgs opts case takeBaseName program of "context" -> context2pdf (writerVerbose opts) tmpdir source prog | prog `elem` ["pdflatex", "lualatex", "xelatex"] -> tex2pdf' (writerVerbose opts) args tmpdir program source _ -> return $ Left $ UTF8.fromStringLazy $ "Unknown program " ++ program handleImages :: WriterOptions -> FilePath -- ^ temp dir to store images -> Pandoc -- ^ document -> IO Pandoc handleImages opts tmpdir = walkM (convertImages tmpdir) <=< walkM (handleImage' opts tmpdir) handleImage' :: WriterOptions -> FilePath -> Inline -> IO Inline handleImage' opts tmpdir (Image attr ils (src,tit)) = do exists <- doesFileExist src if exists then return $ Image attr ils (src,tit) else do res <- fetchItem' (writerMediaBag opts) (writerSourceURL opts) src case res of Right (contents, Just mime) -> do let ext = fromMaybe (takeExtension src) $ extensionFromMimeType mime let basename = showDigest $ sha1 $ BL.fromChunks [contents] let fname = tmpdir </> basename <.> ext BS.writeFile fname contents return $ Image attr ils (fname,tit) _ -> do warn $ "Could not find image `" ++ src ++ "', skipping..." -- return alt text return $ Emph ils handleImage' _ _ x = return x convertImages :: FilePath -> Inline -> IO Inline convertImages tmpdir (Image attr ils (src, tit)) = do img <- convertImage tmpdir src newPath <- case img of Left e -> src <$ warn e Right fp -> return fp return (Image attr ils (newPath, tit)) convertImages _ x = return x -- Convert formats which do not work well in pdf to png convertImage :: FilePath -> FilePath -> IO (Either String FilePath) convertImage tmpdir fname = case mime of Just "image/png" -> doNothing Just "image/jpeg" -> doNothing Just "application/pdf" -> doNothing _ -> JP.readImage fname >>= \res -> case res of Left _ -> return $ Left $ "Unable to convert `" ++ fname ++ "' for use with pdflatex." Right img -> E.catch (Right fileOut <$ JP.savePngImage fileOut img) $ \(e :: E.SomeException) -> return (Left (show e)) where fileOut = replaceDirectory (replaceExtension fname ".png") tmpdir mime = getMimeType fname doNothing = return (Right fname) tex2pdf' :: Bool -- ^ Verbose output -> [String] -- ^ Arguments to the latex-engine -> FilePath -- ^ temp directory for output -> String -- ^ tex program -> String -- ^ tex source -> IO (Either ByteString ByteString) tex2pdf' verbose args tmpDir program source = do let numruns = if "\\tableofcontents" `isInfixOf` source then 3 -- to get page numbers else 2 -- 1 run won't give you PDF bookmarks (exit, log', mbPdf) <- runTeXProgram verbose program args 1 numruns tmpDir source case (exit, mbPdf) of (ExitFailure _, _) -> do let logmsg = extractMsg log' let extramsg = case logmsg of x | "! Package inputenc Error" `BC.isPrefixOf` x && program /= "xelatex" -> "\nTry running pandoc with --latex-engine=xelatex." _ -> "" return $ Left $ logmsg <> extramsg (ExitSuccess, Nothing) -> return $ Left "" (ExitSuccess, Just pdf) -> return $ Right pdf -- parsing output extractMsg :: ByteString -> ByteString extractMsg log' = do let msg' = dropWhile (not . ("!" `BC.isPrefixOf`)) $ BC.lines log' let (msg'',rest) = break ("l." `BC.isPrefixOf`) msg' let lineno = take 1 rest if null msg' 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, -- contents of stdout, contents of produced PDF if any). Rerun -- a fixed number of times to resolve references. runTeXProgram :: Bool -> String -> [String] -> Int -> Int -> FilePath -> String -> IO (ExitCode, ByteString, Maybe ByteString) runTeXProgram verbose program args runNumber numRuns tmpDir source = do let file = tmpDir </> "input.tex" exists <- doesFileExist file unless exists $ UTF8.writeFile file source #ifdef _WINDOWS -- note: we want / even on Windows, for TexLive let tmpDir' = changePathSeparators tmpDir let file' = changePathSeparators file #else let tmpDir' = tmpDir let file' = file #endif let programArgs = ["-halt-on-error", "-interaction", "nonstopmode", "-output-directory", tmpDir'] ++ args ++ [file'] env' <- getEnvironment let sep = [searchPathSeparator] let texinputs = maybe (tmpDir' ++ sep) ((tmpDir' ++ sep) ++) $ lookup "TEXINPUTS" env' let env'' = ("TEXINPUTS", texinputs) : [(k,v) | (k,v) <- env', k /= "TEXINPUTS"] when (verbose && runNumber == 1) $ do putStrLn "[makePDF] temp dir:" putStrLn tmpDir' putStrLn "[makePDF] Command line:" putStrLn $ program ++ " " ++ 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'') program programArgs BL.empty when verbose $ do putStrLn $ "[makePDF] Run #" ++ show runNumber B.hPutStr stdout out B.hPutStr stderr err putStr "\n" if runNumber <= numRuns then runTeXProgram verbose program args (runNumber + 1) numRuns tmpDir source else do let pdfFile = replaceDirectory (replaceExtension file ".pdf") tmpDir pdfExists <- doesFileExist pdfFile pdf <- 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 return (exit, out <> err, pdf) html2pdf :: Bool -- ^ Verbose output -> [String] -- ^ Args to wkhtmltopdf -> String -- ^ HTML5 source -> IO (Either ByteString ByteString) html2pdf verbose args source = do file <- withTempFile "." "html2pdf.html" $ \fp _ -> return fp pdfFile <- withTempFile "." "html2pdf.pdf" $ \fp _ -> return fp UTF8.writeFile file source let programArgs = args ++ [file, pdfFile] env' <- getEnvironment when verbose $ do putStrLn "[makePDF] Command line:" putStrLn $ "wkhtmltopdf" ++ " " ++ 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') "wkhtmltopdf" programArgs BL.empty removeFile file when verbose $ do B.hPutStr stdout out B.hPutStr stderr err putStr "\n" 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 do res <- (Just . B.fromChunks . (:[])) `fmap` BS.readFile pdfFile removeFile pdfFile return res else return Nothing let log' = out <> err return $ case (exit, mbPdf) of (ExitFailure _, _) -> Left log' (ExitSuccess, Nothing) -> Left "" (ExitSuccess, Just pdf) -> Right 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 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/UTF8.hs�������������������������������������������������������������0000644�0000000�0000000�00000007625�13155240142�015410� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2010-2016 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.UTF8 Copyright : Copyright (C) 2010-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable UTF-8 aware string IO functions that will work with GHC 6.10, 6.12, or 7. -} module Text.Pandoc.UTF8 ( readFile , writeFile , getContents , putStr , putStrLn , hPutStr , hPutStrLn , hGetContents , toString , fromString , toStringLazy , fromStringLazy , encodePath , decodeArg ) where import System.IO hiding (readFile, writeFile, getContents, putStr, putStrLn, hPutStr, hPutStrLn, hGetContents) import Prelude hiding (readFile, writeFile, getContents, putStr, putStrLn) import qualified System.IO as IO import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy as BL import qualified Data.Text.Encoding as T import qualified Data.Text as T import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.Encoding as TL readFile :: FilePath -> IO String readFile f = do h <- openFile (encodePath f) ReadMode hGetContents h writeFile :: FilePath -> String -> IO () writeFile f s = withFile (encodePath f) WriteMode $ \h -> hPutStr h s getContents :: IO String getContents = hGetContents stdin putStr :: String -> IO () putStr s = hPutStr stdout s putStrLn :: String -> IO () putStrLn s = hPutStrLn stdout s hPutStr :: Handle -> String -> IO () hPutStr h s = hSetEncoding h utf8 >> IO.hPutStr h s hPutStrLn :: Handle -> String -> IO () hPutStrLn h s = hSetEncoding h utf8 >> IO.hPutStrLn h s hGetContents :: Handle -> IO String hGetContents = fmap toString . B.hGetContents -- hGetContents h = hSetEncoding h utf8_bom -- >> hSetNewlineMode h universalNewlineMode -- >> IO.hGetContents h -- | Drop BOM (byte order marker) if present at beginning of string. -- Note that Data.Text converts the BOM to code point FEFF, zero-width -- no-break space, so if the string begins with this we strip it off. dropBOM :: String -> String dropBOM ('\xFEFF':xs) = xs dropBOM xs = xs filterCRs :: String -> String filterCRs ('\r':'\n':xs) = '\n': filterCRs xs filterCRs ('\r':xs) = '\n' : filterCRs xs filterCRs (x:xs) = x : filterCRs xs filterCRs [] = [] -- | Convert UTF8-encoded ByteString to String, also -- removing '\r' characters. toString :: B.ByteString -> String toString = filterCRs . dropBOM . T.unpack . T.decodeUtf8 fromString :: String -> B.ByteString fromString = T.encodeUtf8 . T.pack -- | Convert UTF8-encoded ByteString to String, also -- removing '\r' characters. toStringLazy :: BL.ByteString -> String toStringLazy = filterCRs . dropBOM . TL.unpack . TL.decodeUtf8 fromStringLazy :: String -> BL.ByteString fromStringLazy = TL.encodeUtf8 . TL.pack encodePath :: FilePath -> FilePath encodePath = id decodeArg :: String -> String decodeArg = id �����������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Templates.hs��������������������������������������������������������0000644�0000000�0000000�00000006117�13155240142�016613� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, OverloadedStrings, GeneralizedNewtypeDeriving #-} {- Copyright (C) 2009-2016 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.Templates Copyright : Copyright (C) 2009-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable A simple templating system with variable substitution and conditionals. -} module Text.Pandoc.Templates ( renderTemplate , renderTemplate' , TemplateTarget , varListToJSON , compileTemplate , Template , getDefaultTemplate ) where import Text.DocTemplates (Template, TemplateTarget, compileTemplate, renderTemplate, applyTemplate, varListToJSON) import Data.Aeson (ToJSON(..)) import qualified Data.Text as T import System.FilePath ((</>), (<.>)) import qualified Control.Exception.Extensible as E (try, IOException) import Text.Pandoc.Shared (readDataFileUTF8) -- | Get default template for the specified writer. getDefaultTemplate :: (Maybe FilePath) -- ^ User data directory to search first -> String -- ^ Name of writer -> IO (Either E.IOException String) getDefaultTemplate user writer = do let format = takeWhile (`notElem` ("+-" :: String)) writer -- strip off extensions case format of "native" -> return $ Right "" "json" -> return $ Right "" "docx" -> return $ Right "" "fb2" -> return $ Right "" "odt" -> getDefaultTemplate user "opendocument" "markdown_strict" -> getDefaultTemplate user "markdown" "multimarkdown" -> getDefaultTemplate user "markdown" "markdown_github" -> getDefaultTemplate user "markdown" "markdown_mmd" -> getDefaultTemplate user "markdown" "markdown_phpextra" -> getDefaultTemplate user "markdown" _ -> let fname = "templates" </> "default" <.> format in E.try $ readDataFileUTF8 user fname -- | Like 'applyTemplate', but raising an error if compilation fails. renderTemplate' :: (ToJSON a, TemplateTarget b) => String -> a -> b renderTemplate' template = either error id . applyTemplate (T.pack template) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/XML.hs��������������������������������������������������������������0000644�0000000�0000000�00000010246�13155240142�015313� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2006-2016 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.XML Copyright : Copyright (C) 2006-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable Functions for escaping and formatting XML. -} module Text.Pandoc.XML ( escapeCharForXML, escapeStringForXML, inTags, selfClosingTag, inTagsSimple, inTagsIndented, toEntities, fromEntities ) where import Text.Pandoc.Pretty import Data.Char (ord, isAscii, isSpace) import Text.HTML.TagSoup.Entity (lookupEntity) -- | Escape one character as needed for XML. escapeCharForXML :: Char -> String escapeCharForXML x = case x of '&' -> "&" '<' -> "<" '>' -> ">" '"' -> """ c -> [c] -- | Escape string as needed for XML. Entity references are not preserved. escapeStringForXML :: String -> String escapeStringForXML = concatMap escapeCharForXML -- | Escape newline characters as escapeNls :: String -> String escapeNls (x:xs) | x == '\n' = " " ++ escapeNls xs | otherwise = x : escapeNls xs escapeNls [] = [] -- | Return a text object with a string of formatted XML attributes. attributeList :: [(String, String)] -> Doc attributeList = hcat . map (\(a, b) -> text (' ' : escapeStringForXML a ++ "=\"" ++ escapeNls (escapeStringForXML b) ++ "\"")) -- | Put the supplied contents between start and end tags of tagType, -- with specified attributes and (if specified) indentation. inTags:: Bool -> String -> [(String, String)] -> Doc -> Doc inTags isIndented tagType attribs contents = let openTag = char '<' <> text tagType <> attributeList attribs <> char '>' closeTag = text "</" <> text tagType <> char '>' in if isIndented then openTag $$ nest 2 contents $$ closeTag else openTag <> contents <> closeTag -- | Return a self-closing tag of tagType with specified attributes selfClosingTag :: String -> [(String, String)] -> Doc selfClosingTag tagType attribs = char '<' <> text tagType <> attributeList attribs <> text " />" -- | Put the supplied contents between start and end tags of tagType. inTagsSimple :: String -> Doc -> Doc inTagsSimple tagType = inTags False tagType [] -- | Put the supplied contents in indented block btw start and end tags. inTagsIndented :: String -> Doc -> Doc inTagsIndented tagType = inTags True tagType [] -- | Escape all non-ascii characters using numerical entities. toEntities :: String -> String toEntities [] = "" toEntities (c:cs) | isAscii c = c : toEntities cs | otherwise = "&#" ++ show (ord c) ++ ";" ++ toEntities cs -- Unescapes XML entities fromEntities :: String -> String fromEntities ('&':xs) = case lookupEntity ent' of Just c -> c ++ fromEntities rest Nothing -> '&' : fromEntities xs where (ent, rest) = case break (\c -> isSpace c || c == ';') xs of (zs,';':ys) -> (zs,ys) (zs, ys) -> (zs,ys) ent' = case ent of '#':'X':ys -> '#':'x':ys -- workaround tagsoup bug '#':_ -> ent _ -> ent ++ ";" fromEntities (x:xs) = x : fromEntities xs fromEntities [] = [] ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/SelfContained.hs����������������������������������������������������0000644�0000000�0000000�00000016106�13155240142�017372� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2011-2016 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.SelfContained Copyright : Copyright (C) 2011-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable Functions for converting an HTML file into one that can be viewed offline, by incorporating linked images, CSS, and scripts into the HTML using data URIs. -} module Text.Pandoc.SelfContained ( makeSelfContained ) where import Text.HTML.TagSoup import Network.URI (isURI, escapeURIString, URI(..), parseURI) import Data.ByteString.Base64 import qualified Data.ByteString.Char8 as B import Data.ByteString (ByteString) import System.FilePath (takeExtension, takeDirectory, (</>)) import Data.Char (toLower, isAscii, isAlphaNum) import Codec.Compression.GZip as Gzip import qualified Data.ByteString.Lazy as L import Text.Pandoc.Shared (renderTags', err, fetchItem', warn, trim) import Text.Pandoc.MediaBag (MediaBag) import Text.Pandoc.MIME (MimeType) import Text.Pandoc.UTF8 (toString) import Text.Pandoc.Options (WriterOptions(..)) import Data.List (isPrefixOf) import Control.Applicative ((<|>)) import Text.Parsec (runParserT, ParsecT) import qualified Text.Parsec as P import Control.Monad.Trans (lift) isOk :: Char -> Bool isOk c = isAscii c && isAlphaNum c makeDataURI :: String -> ByteString -> String makeDataURI mime raw = if textual then "data:" ++ mime' ++ "," ++ escapeURIString isOk (toString raw) else "data:" ++ mime' ++ ";base64," ++ toString (encode raw) where textual = "text/" `Data.List.isPrefixOf` mime mime' = if textual && ';' `notElem` mime then mime ++ ";charset=utf-8" else mime -- mime type already has charset convertTag :: MediaBag -> Maybe String -> Tag String -> IO (Tag String) convertTag media sourceURL t@(TagOpen tagname as) | tagname `elem` ["img", "embed", "video", "input", "audio", "source", "track"] = do as' <- mapM processAttribute as return $ TagOpen tagname as' where processAttribute (x,y) = if x == "src" || x == "href" || x == "poster" then do enc <- getDataURI media sourceURL (fromAttrib "type" t) y return (x, enc) else return (x,y) convertTag media sourceURL t@(TagOpen "script" as) = case fromAttrib "src" t of [] -> return t src -> do enc <- getDataURI media sourceURL (fromAttrib "type" t) src return $ TagOpen "script" (("src",enc) : [(x,y) | (x,y) <- as, x /= "src"]) convertTag media sourceURL t@(TagOpen "link" as) = case fromAttrib "href" t of [] -> return t src -> do enc <- getDataURI media sourceURL (fromAttrib "type" t) src return $ TagOpen "link" (("href",enc) : [(x,y) | (x,y) <- as, x /= "href"]) convertTag _ _ t = return t cssURLs :: MediaBag -> Maybe String -> FilePath -> ByteString -> IO ByteString cssURLs media sourceURL d orig = do res <- runParserT (parseCSSUrls media sourceURL d) () "css" orig case res of Left e -> warn ("Could not parse CSS: " ++ show e) >> return orig Right bs -> return bs parseCSSUrls :: MediaBag -> Maybe String -> FilePath -> ParsecT ByteString () IO ByteString parseCSSUrls media sourceURL d = B.concat <$> P.many (pCSSWhite <|> pCSSComment <|> pCSSUrl media sourceURL d <|> pCSSOther) -- Note: some whitespace in CSS is significant, so we can't collapse it! pCSSWhite :: ParsecT ByteString () IO ByteString pCSSWhite = B.singleton <$> P.space <* P.spaces pCSSComment :: ParsecT ByteString () IO ByteString pCSSComment = P.try $ do P.string "/*" P.manyTill P.anyChar (P.try (P.string "*/")) return B.empty pCSSOther :: ParsecT ByteString () IO ByteString pCSSOther = do (B.pack <$> P.many1 (P.noneOf "u/ \n\r\t")) <|> (B.singleton <$> P.char 'u') <|> (B.singleton <$> P.char '/') pCSSUrl :: MediaBag -> Maybe String -> FilePath -> ParsecT ByteString () IO ByteString pCSSUrl media sourceURL d = P.try $ do P.string "url(" P.spaces quote <- P.option Nothing (Just <$> P.oneOf "\"'") url <- P.manyTill P.anyChar (maybe (P.lookAhead (P.char ')')) P.char quote) P.spaces P.char ')' let fallback = B.pack ("url(" ++ maybe "" (:[]) quote ++ trim url ++ maybe "" (:[]) quote ++ ")") case trim url of '#':_ -> return fallback '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 $ "url(" ++ enc ++ ")") getDataURI :: MediaBag -> Maybe String -> MimeType -> String -> IO String getDataURI _ _ _ src@('d':'a':'t':'a':':':_) = return src -- already data: uri getDataURI media sourceURL mimetype src = do let ext = map toLower $ takeExtension src fetchResult <- fetchItem' media sourceURL src (raw, respMime) <- case fetchResult of Left msg -> err 67 $ "Could not fetch " ++ src ++ "\n" ++ show msg Right x -> return x let raw' = if ext == ".gz" then B.concat $ L.toChunks $ Gzip.decompress $ L.fromChunks $ [raw] else raw let mime = case (mimetype, respMime) of ("",Nothing) -> error $ "Could not determine mime type for `" ++ src ++ "'" (x, Nothing) -> x (_, Just x ) -> x let cssSourceURL = case parseURI src of Just u | uriScheme u `elem` ["http:","https:"] -> Just $ show u{ uriPath = "", uriQuery = "", uriFragment = "" } _ -> Nothing result <- if mime == "text/css" then cssURLs media cssSourceURL (takeDirectory src) raw' else return raw' return $ makeDataURI mime result -- | Convert HTML into self-contained HTML, incorporating images, -- scripts, and CSS using data: URIs. makeSelfContained :: WriterOptions -> String -> IO String makeSelfContained opts inp = do let tags = parseTags inp out' <- mapM (convertTag (writerMediaBag opts) (writerSourceURL opts)) tags return $ renderTags' out' ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Process.hs����������������������������������������������������������0000644�0000000�0000000�00000007332�13155240142�016273� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2013-2016 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.Process Copyright : Copyright (C) 2013-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable ByteString variant of 'readProcessWithExitCode'. -} module Text.Pandoc.Process (pipeProcess) where import System.Process import System.Exit (ExitCode (..)) import Control.Exception import System.IO (hClose, hFlush) import Control.Concurrent (putMVar, takeMVar, newEmptyMVar, forkIO) import Control.Monad (unless) import qualified Data.ByteString.Lazy as BL {- | Version of 'System.Process.readProcessWithExitCode' that uses lazy bytestrings instead of strings and allows setting environment variables. @readProcessWithExitCode@ creates an external process, reads its standard output and standard error strictly, waits until the process terminates, and then returns the 'ExitCode' of the process, the standard output, and the standard error. If an asynchronous exception is thrown to the thread executing @readProcessWithExitCode@, the forked process will be terminated and @readProcessWithExitCode@ will wait (block) until the process has been terminated. -} pipeProcess :: Maybe [(String, String)] -- ^ environment variables -> FilePath -- ^ Filename of the executable (see 'proc' for details) -> [String] -- ^ any arguments -> BL.ByteString -- ^ standard input -> IO (ExitCode,BL.ByteString,BL.ByteString) -- ^ exitcode, stdout, stderr pipeProcess mbenv cmd args input = mask $ \restore -> do (Just inh, Just outh, Just errh, pid) <- createProcess (proc cmd args) { env = mbenv, std_in = CreatePipe, std_out = CreatePipe, std_err = CreatePipe } flip onException (do hClose inh; hClose outh; hClose errh; terminateProcess pid; waitForProcess pid) $ restore $ do -- fork off a thread to start consuming stdout out <- BL.hGetContents outh waitOut <- forkWait $ evaluate $ BL.length out -- fork off a thread to start consuming stderr err <- BL.hGetContents errh waitErr <- forkWait $ evaluate $ BL.length err -- now write and flush any input let writeInput = do unless (BL.null input) $ do BL.hPutStr inh input hFlush inh hClose inh writeInput -- wait on the output waitOut waitErr hClose outh hClose errh -- wait on the process ex <- waitForProcess pid return (ex, out, err) forkWait :: IO a -> IO (IO a) forkWait a = do res <- newEmptyMVar _ <- mask $ \restore -> forkIO $ try (restore a) >>= putMVar res return (takeMVar res >>= either (\ex -> throwIO (ex :: SomeException)) return) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/CSS.hs��������������������������������������������������������������0000644�0000000�0000000�00000002646�13155240142�015310� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������module Text.Pandoc.CSS ( foldOrElse , pickStyleAttrProps , pickStylesToKVs ) 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 ":;") <* (optional $ char ';') <* spaces return (trim p, trim v) styleAttrParser :: Parser [(String, String)] styleAttrParser = many1 ruleParser 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 -- | takes a list of keys/properties and a CSS string and -- returns the corresponding key-value-pairs. pickStylesToKVs :: [String] -> String -> [(String, String)] pickStylesToKVs props styleAttr = case parse styleAttrParser "" styleAttr of Left _ -> [] Right styles -> filter (\s -> fst s `elem` props) styles -- | takes a list of key/property synonyms and a CSS string and maybe -- returns the value of the first match (in order of the supplied list) pickStyleAttrProps :: [String] -> String -> Maybe String pickStyleAttrProps lookupProps styleAttr = do styles <- eitherToMaybe $ parse styleAttrParser "" styleAttr foldOrElse Nothing $ map (flip lookup styles) lookupProps ������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Docx/Lists.hs�����������������������������������������������0000644�0000000�0000000�00000017610�13155240142�020235� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2014-2016 Jesse Rosenthal <jrosenthal@jhu.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.Readers.Docx.Lists Copyright : Copyright (C) 2014-2016 Jesse Rosenthal License : GNU GPL, version 2 or above Maintainer : Jesse Rosenthal <jrosenthal@jhu.edu> Stability : alpha Portability : portable Functions for converting flat docx paragraphs into nested lists. -} module Text.Pandoc.Readers.Docx.Lists ( blocksToBullets , blocksToDefinitions , listParagraphDivs ) where import Text.Pandoc.JSON import Text.Pandoc.Generic (bottomUp) import Text.Pandoc.Shared (trim) import Control.Monad import Data.List import Data.Maybe isListItem :: Block -> Bool isListItem (Div (_, classes, _) _) | "list-item" `elem` classes = True isListItem _ = False getLevel :: Block -> Maybe Integer getLevel (Div (_, _, kvs) _) = liftM read $ lookup "level" kvs getLevel _ = Nothing getLevelN :: Block -> Integer getLevelN b = case getLevel b of Just n -> n Nothing -> -1 getNumId :: Block -> Maybe Integer getNumId (Div (_, _, kvs) _) = liftM read $ lookup "num-id" kvs getNumId _ = Nothing getNumIdN :: Block -> Integer getNumIdN b = case getNumId b of Just n -> n Nothing -> -1 getText :: Block -> Maybe String getText (Div (_, _, kvs) _) = lookup "text" kvs getText _ = Nothing data ListType = Itemized | Enumerated ListAttributes listStyleMap :: [(String, ListNumberStyle)] listStyleMap = [("upperLetter", UpperAlpha), ("lowerLetter", LowerAlpha), ("upperRoman", UpperRoman), ("lowerRoman", LowerRoman), ("decimal", Decimal)] listDelimMap :: [(String, ListNumberDelim)] listDelimMap = [("%1)", OneParen), ("(%1)", TwoParens), ("%1.", Period)] getListType :: Block -> Maybe ListType getListType b@(Div (_, _, kvs) _) | isListItem b = let start = lookup "start" kvs frmt = lookup "format" kvs txt = lookup "text" kvs in case frmt of Just "bullet" -> Just Itemized Just f -> case txt of Just t -> Just $ Enumerated ( read (fromMaybe "1" start) :: Int, fromMaybe DefaultStyle (lookup f listStyleMap), fromMaybe DefaultDelim (lookup t listDelimMap)) Nothing -> Nothing _ -> Nothing getListType _ = Nothing listParagraphDivs :: [String] listParagraphDivs = ["ListParagraph"] -- This is a first stab at going through and attaching meaning to list -- paragraphs, without an item marker, following a list item. We -- assume that these are paragraphs in the same item. handleListParagraphs :: [Block] -> [Block] handleListParagraphs [] = [] handleListParagraphs ( (Div attr1@(_, classes1, _) blks1) : (Div (ident2, classes2, kvs2) blks2) : blks ) | "list-item" `elem` classes1 && not ("list-item" `elem` classes2) && (not . null) (listParagraphDivs `intersect` classes2) = -- We don't want to keep this indent. let newDiv2 = (Div (ident2, classes2, filter (\kv -> fst kv /= "indent") kvs2) blks2) in handleListParagraphs ((Div attr1 (blks1 ++ [newDiv2])) : blks) handleListParagraphs (blk:blks) = blk : (handleListParagraphs blks) separateBlocks' :: Block -> [[Block]] -> [[Block]] separateBlocks' blk ([] : []) = [[blk]] separateBlocks' b@(BulletList _) acc = (init acc) ++ [(last acc) ++ [b]] separateBlocks' b@(OrderedList _ _) acc = (init acc) ++ [(last acc) ++ [b]] -- The following is for the invisible bullet lists. This is how -- pandoc-generated ooxml does multiparagraph item lists. separateBlocks' b acc | liftM trim (getText b) == Just "" = (init acc) ++ [(last acc) ++ [b]] separateBlocks' b acc = acc ++ [[b]] separateBlocks :: [Block] -> [[Block]] separateBlocks blks = foldr separateBlocks' [[]] (reverse blks) flatToBullets' :: Integer -> [Block] -> [Block] flatToBullets' _ [] = [] flatToBullets' num xs@(b : elems) | getLevelN b == num = b : (flatToBullets' num elems) | otherwise = let bNumId = getNumIdN b bLevel = getLevelN b (children, remaining) = span (\b' -> ((getLevelN b') > bLevel || ((getLevelN b') == bLevel && (getNumIdN b') == bNumId))) xs in case getListType b of Just (Enumerated attr) -> (OrderedList attr (separateBlocks $ flatToBullets' bLevel children)) : (flatToBullets' num remaining) _ -> (BulletList (separateBlocks $ flatToBullets' bLevel children)) : (flatToBullets' num remaining) flatToBullets :: [Block] -> [Block] flatToBullets elems = flatToBullets' (-1) elems singleItemHeaderToHeader :: Block -> Block singleItemHeaderToHeader (OrderedList _ [[h@(Header _ _ _)]]) = h singleItemHeaderToHeader blk = blk blocksToBullets :: [Block] -> [Block] blocksToBullets blks = map singleItemHeaderToHeader $ bottomUp removeListDivs $ flatToBullets $ (handleListParagraphs blks) plainParaInlines :: Block -> [Inline] plainParaInlines (Plain ils) = ils plainParaInlines (Para ils) = ils plainParaInlines _ = [] blocksToDefinitions' :: [([Inline], [[Block]])] -> [Block] -> [Block] -> [Block] blocksToDefinitions' [] acc [] = reverse acc blocksToDefinitions' defAcc acc [] = reverse $ (DefinitionList (reverse defAcc)) : acc blocksToDefinitions' defAcc acc ((Div (_, classes1, _) blks1) : (Div (ident2, classes2, kvs2) blks2) : blks) | "DefinitionTerm" `elem` classes1 && "Definition" `elem` classes2 = let remainingAttr2 = (ident2, delete "Definition" classes2, kvs2) pair = case remainingAttr2 == ("", [], []) of True -> (concatMap plainParaInlines blks1, [blks2]) False -> (concatMap plainParaInlines blks1, [[Div remainingAttr2 blks2]]) in blocksToDefinitions' (pair : defAcc) acc blks blocksToDefinitions' defAcc acc ((Div (ident2, classes2, kvs2) blks2) : blks) | (not . null) defAcc && "Definition" `elem` classes2 = let remainingAttr2 = (ident2, delete "Definition" classes2, kvs2) defItems2 = case remainingAttr2 == ("", [], []) of True -> blks2 False -> [Div remainingAttr2 blks2] ((defTerm, defItems):defs) = defAcc defAcc' = case null defItems of True -> (defTerm, [defItems2]) : defs False -> (defTerm, init defItems ++ [last defItems ++ defItems2]) : defs in blocksToDefinitions' defAcc' acc blks blocksToDefinitions' [] acc (b:blks) = blocksToDefinitions' [] (b:acc) blks blocksToDefinitions' defAcc acc (b:blks) = blocksToDefinitions' [] (b : (DefinitionList (reverse defAcc)) : acc) blks removeListDivs' :: Block -> [Block] removeListDivs' (Div (ident, classes, kvs) blks) | "list-item" `elem` classes = case delete "list-item" classes of [] -> blks classes' -> [Div (ident, classes', kvs) $ blks] removeListDivs' (Div (ident, classes, kvs) blks) | not $ null $ listParagraphDivs `intersect` classes = case classes \\ listParagraphDivs of [] -> blks classes' -> [Div (ident, classes', kvs) blks] removeListDivs' blk = [blk] removeListDivs :: [Block] -> [Block] removeListDivs = concatMap removeListDivs' blocksToDefinitions :: [Block] -> [Block] blocksToDefinitions = blocksToDefinitions' [] [] ������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Docx/Combine.hs���������������������������������������������0000644�0000000�0000000�00000012267�13155240142�020516� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, PatternGuards #-} module Text.Pandoc.Readers.Docx.Combine ( smushInlines , smushBlocks ) where import Text.Pandoc.Builder import Data.List import Data.Sequence (ViewR(..), ViewL(..), viewl, viewr, (><), (|>)) import qualified Data.Sequence as Seq (null) data Modifier a = Modifier (a -> a) | AttrModifier (Attr -> a -> a) Attr | NullModifier spaceOutInlinesL :: Inlines -> (Inlines, Inlines) spaceOutInlinesL ms = (l, stackInlines fs (m' <> r)) where (l, m, r) = spaceOutInlines ms (fs, m') = unstackInlines m spaceOutInlinesR :: Inlines -> (Inlines, Inlines) spaceOutInlinesR ms = (stackInlines fs (l <> m'), r) where (l, m, r) = spaceOutInlines ms (fs, m') = unstackInlines m spaceOutInlines :: Inlines -> (Inlines, Inlines, Inlines) spaceOutInlines ils = let (fs, ils') = unstackInlines ils contents = unMany ils' left = case viewl contents of (Space :< _) -> space _ -> mempty right = case viewr contents of (_ :> Space) -> space _ -> mempty in (left, (stackInlines fs $ trimInlines . Many $ contents), right) stackInlines :: [Modifier Inlines] -> Inlines -> Inlines stackInlines [] ms = ms stackInlines (NullModifier : fs) ms = stackInlines fs ms stackInlines ((Modifier f) : fs) ms = if isEmpty ms then stackInlines fs ms else f $ stackInlines fs ms stackInlines ((AttrModifier f attr) : fs) ms = f attr $ stackInlines fs ms unstackInlines :: Inlines -> ([Modifier Inlines], Inlines) unstackInlines ms = case ilModifier ms of NullModifier -> ([], ms) _ -> (f : fs, ms') where f = ilModifier ms (fs, ms') = unstackInlines $ ilInnards ms ilModifier :: Inlines -> Modifier Inlines ilModifier ils = case viewl (unMany ils) of (x :< xs) | Seq.null xs -> case x of (Emph _) -> Modifier emph (Strong _) -> Modifier strong (SmallCaps _) -> Modifier smallcaps (Strikeout _) -> Modifier strikeout (Superscript _) -> Modifier superscript (Subscript _) -> Modifier subscript (Link attr _ tgt) -> Modifier $ linkWith attr (fst tgt) (snd tgt) (Span attr _) -> AttrModifier spanWith attr _ -> NullModifier _ -> NullModifier ilInnards :: Inlines -> Inlines ilInnards ils = case viewl (unMany ils) of (x :< xs) | Seq.null xs -> case x of (Emph lst) -> fromList lst (Strong lst) -> fromList lst (SmallCaps lst) -> fromList lst (Strikeout lst) -> fromList lst (Superscript lst) -> fromList lst (Subscript lst) -> fromList lst (Link _ lst _) -> fromList lst (Span _ lst) -> fromList lst _ -> ils _ -> ils inlinesL :: Inlines -> (Inlines, Inlines) inlinesL ils = case viewl $ unMany ils of (s :< sq) -> (singleton s, Many sq) _ -> (mempty, ils) inlinesR :: Inlines -> (Inlines, Inlines) inlinesR ils = case viewr $ unMany ils of (sq :> s) -> (Many sq, singleton s) _ -> (ils, mempty) combineInlines :: Inlines -> Inlines -> Inlines combineInlines x y = let (xs', x') = inlinesR x (y', ys') = inlinesL y in xs' <> (combineSingletonInlines x' y') <> ys' combineSingletonInlines :: Inlines -> Inlines -> Inlines combineSingletonInlines x y = let (xfs, xs) = unstackInlines x (yfs, ys) = unstackInlines y shared = xfs `intersect` yfs x_remaining = xfs \\ shared y_remaining = yfs \\ shared x_rem_attr = filter isAttrModifier x_remaining y_rem_attr = filter isAttrModifier y_remaining in case null shared of True | isEmpty xs && isEmpty ys -> stackInlines (x_rem_attr ++ y_rem_attr) mempty | isEmpty xs -> let (sp, y') = spaceOutInlinesL y in (stackInlines x_rem_attr mempty) <> sp <> y' | isEmpty ys -> let (x', sp) = spaceOutInlinesR x in x' <> sp <> (stackInlines y_rem_attr mempty) | otherwise -> let (x', xsp) = spaceOutInlinesR x (ysp, y') = spaceOutInlinesL y in x' <> xsp <> ysp <> y' False -> stackInlines shared $ combineInlines (stackInlines x_remaining xs) (stackInlines y_remaining ys) combineBlocks :: Blocks -> Blocks -> Blocks combineBlocks bs cs | bs' :> (BlockQuote bs'') <- viewr (unMany bs) , (BlockQuote cs'') :< cs' <- viewl (unMany cs) = Many $ (bs' |> (BlockQuote (bs'' <> cs''))) >< cs' combineBlocks bs cs = bs <> cs instance (Monoid a, Eq a) => Eq (Modifier a) where (Modifier f) == (Modifier g) = (f mempty == g mempty) (AttrModifier f attr) == (AttrModifier g attr') = (f attr mempty == g attr' mempty) (NullModifier) == (NullModifier) = True _ == _ = False isEmpty :: (Monoid a, Eq a) => a -> Bool isEmpty x = x == mempty isAttrModifier :: Modifier a -> Bool isAttrModifier (AttrModifier _ _) = True isAttrModifier _ = False smushInlines :: [Inlines] -> Inlines smushInlines xs = foldl combineInlines mempty xs smushBlocks :: [Blocks] -> Blocks smushBlocks xs = foldl combineBlocks mempty xs �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Docx/Parse.hs�����������������������������������������������0000644�0000000�0000000�00000120541�13155240142�020207� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE PatternGuards, ViewPatterns, FlexibleInstances #-} {- Copyright (C) 2014-2016 Jesse Rosenthal <jrosenthal@jhu.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.Readers.Docx.Parse Copyright : Copyright (C) 2014-2016 Jesse Rosenthal License : GNU GPL, version 2 or above Maintainer : Jesse Rosenthal <jrosenthal@jhu.edu> Stability : alpha Portability : portable Conversion of docx archive into Docx haskell type -} module Text.Pandoc.Readers.Docx.Parse ( Docx(..) , Document(..) , Body(..) , BodyPart(..) , TblLook(..) , Extent , ParPart(..) , Run(..) , RunElem(..) , Notes , Numbering , Relationship , Media , RunStyle(..) , VertAlign(..) , ParIndentation(..) , ParagraphStyle(..) , Row(..) , Cell(..) , archiveToDocx , archiveToDocxWithWarnings ) where import Codec.Archive.Zip import Text.XML.Light import Data.Maybe import Data.List import System.FilePath import Data.Bits ((.|.)) import qualified Data.ByteString.Lazy as B import qualified Text.Pandoc.UTF8 as UTF8 import Control.Monad.Reader import Control.Monad.State import Control.Applicative ((<|>)) import qualified Data.Map as M import Control.Monad.Except import Text.Pandoc.Shared (safeRead, filteredFilesFromArchive) import Text.TeXMath.Readers.OMML (readOMML) import Text.TeXMath.Unicode.Fonts (getUnicode, stringToFont, Font(..)) import Text.TeXMath (Exp) import Text.Pandoc.Readers.Docx.Util import Data.Char (readLitChar, ord, chr, isDigit) data ReaderEnv = ReaderEnv { envNotes :: Notes , envComments :: Comments , envNumbering :: Numbering , envRelationships :: [Relationship] , envMedia :: Media , envFont :: Maybe Font , envCharStyles :: CharStyleMap , envParStyles :: ParStyleMap , envLocation :: DocumentLocation } deriving Show data ReaderState = ReaderState { stateWarnings :: [String] } deriving Show data DocxError = DocxError | WrongElem deriving Show type D = ExceptT DocxError (ReaderT ReaderEnv (State ReaderState)) runD :: D a -> ReaderEnv -> ReaderState -> (Either DocxError a, ReaderState) runD dx re rs = runState (runReaderT (runExceptT dx) re) rs maybeToD :: Maybe a -> D a maybeToD (Just a) = return a maybeToD Nothing = throwError DocxError eitherToD :: Either a b -> D b eitherToD (Right b) = return b eitherToD (Left _) = throwError DocxError concatMapM :: (Monad m) => (a -> m [b]) -> [a] -> m [b] concatMapM f xs = liftM concat (mapM f xs) -- This is similar to `mapMaybe`: it maps a function returning the D -- monad over a list, and only keeps the non-erroring return values. mapD :: (a -> D b) -> [a] -> D [b] mapD f xs = let handler x = (f x >>= (\y-> return [y])) `catchError` (\_ -> return []) in concatMapM handler xs data Docx = Docx Document deriving Show data Document = Document NameSpaces Body deriving Show data Body = Body [BodyPart] deriving Show type Media = [(FilePath, B.ByteString)] type CharStyle = (String, RunStyle) type ParStyle = (String, ParStyleData) type CharStyleMap = M.Map String RunStyle type ParStyleMap = M.Map String ParStyleData data Numbering = Numbering NameSpaces [Numb] [AbstractNumb] deriving Show data Numb = Numb String String -- right now, only a key to an abstract num deriving Show data AbstractNumb = AbstractNumb String [Level] deriving Show -- (ilvl, format, string, start) type Level = (String, String, String, Maybe Integer) data DocumentLocation = InDocument | InFootnote | InEndnote deriving (Eq,Show) data Relationship = Relationship DocumentLocation RelId Target deriving Show data Notes = Notes NameSpaces (Maybe (M.Map String Element)) (Maybe (M.Map String Element)) deriving Show data Comments = Comments NameSpaces (M.Map String Element) deriving Show data ParIndentation = ParIndentation { leftParIndent :: Maybe Integer , rightParIndent :: Maybe Integer , hangingParIndent :: Maybe Integer} deriving Show data ParagraphStyle = ParagraphStyle { pStyle :: [String] , indentation :: Maybe ParIndentation , dropCap :: Bool , pHeading :: Maybe (String, Int) , pNumInfo :: Maybe (String, String) , pBlockQuote :: Maybe Bool } deriving Show defaultParagraphStyle :: ParagraphStyle defaultParagraphStyle = ParagraphStyle { pStyle = [] , indentation = Nothing , dropCap = False , pHeading = Nothing , pNumInfo = Nothing , pBlockQuote = Nothing } data BodyPart = Paragraph ParagraphStyle [ParPart] | ListItem ParagraphStyle String String (Maybe Level) [ParPart] | Tbl String TblGrid TblLook [Row] | OMathPara [Exp] deriving Show type TblGrid = [Integer] data TblLook = TblLook {firstRowFormatting::Bool} deriving Show defaultTblLook :: TblLook defaultTblLook = TblLook{firstRowFormatting = False} data Row = Row [Cell] deriving Show data Cell = Cell [BodyPart] deriving Show -- (width, height) in EMUs type Extent = Maybe (Double, Double) data ParPart = PlainRun Run | Insertion ChangeId Author ChangeDate [Run] | Deletion ChangeId Author ChangeDate [Run] | CommentStart CommentId Author CommentDate [BodyPart] | CommentEnd CommentId | BookMark BookMarkId Anchor | InternalHyperLink Anchor [Run] | ExternalHyperLink URL [Run] | Drawing FilePath String String B.ByteString Extent -- title, alt | Chart -- placeholder for now | PlainOMath [Exp] deriving Show data Run = Run RunStyle [RunElem] | Footnote [BodyPart] | Endnote [BodyPart] | InlineDrawing FilePath String String B.ByteString Extent -- title, alt | InlineChart -- placeholder deriving Show data RunElem = TextRun String | LnBrk | Tab | SoftHyphen | NoBreakHyphen deriving Show data VertAlign = BaseLn | SupScrpt | SubScrpt deriving Show data RunStyle = RunStyle { isBold :: Maybe Bool , isItalic :: Maybe Bool , isSmallCaps :: Maybe Bool , isStrike :: Maybe Bool , rVertAlign :: Maybe VertAlign , rUnderline :: Maybe String , rStyle :: Maybe CharStyle} deriving Show data ParStyleData = ParStyleData { headingLev :: Maybe (String, Int) , isBlockQuote :: Maybe Bool , numInfo :: Maybe (String, String) , psStyle :: Maybe ParStyle} deriving Show defaultRunStyle :: RunStyle defaultRunStyle = RunStyle { isBold = Nothing , isItalic = Nothing , isSmallCaps = Nothing , isStrike = Nothing , rVertAlign = Nothing , rUnderline = Nothing , rStyle = Nothing} type Target = String type Anchor = String type URL = String type BookMarkId = String type RelId = String type ChangeId = String type CommentId = String type Author = String type ChangeDate = String type CommentDate = String archiveToDocx :: Archive -> Either DocxError Docx archiveToDocx archive = fst <$> archiveToDocxWithWarnings archive archiveToDocxWithWarnings :: Archive -> Either DocxError (Docx, [String]) archiveToDocxWithWarnings archive = do let notes = archiveToNotes archive comments = archiveToComments archive numbering = archiveToNumbering archive rels = archiveToRelationships archive media = filteredFilesFromArchive archive filePathIsMedia (styles, parstyles) = archiveToStyles archive rEnv = ReaderEnv notes comments numbering rels media Nothing styles parstyles InDocument rState = ReaderState { stateWarnings = [] } (eitherDoc, st) = runD (archiveToDocument archive) rEnv rState case eitherDoc of Right doc -> Right (Docx doc, stateWarnings st) Left e -> Left e archiveToDocument :: Archive -> D Document archiveToDocument zf = do entry <- maybeToD $ findEntryByPath "word/document.xml" zf docElem <- maybeToD $ (parseXMLDoc . UTF8.toStringLazy . fromEntry) entry let namespaces = elemToNameSpaces docElem bodyElem <- maybeToD $ findChild (elemName namespaces "w" "body") docElem body <- elemToBody namespaces bodyElem return $ Document namespaces body elemToBody :: NameSpaces -> Element -> D Body elemToBody ns element | isElem ns "w" "body" element = mapD (elemToBodyPart ns) (elChildren element) >>= (\bps -> return $ Body bps) elemToBody _ _ = throwError WrongElem archiveToStyles :: Archive -> (CharStyleMap, ParStyleMap) archiveToStyles zf = let stylesElem = findEntryByPath "word/styles.xml" zf >>= (parseXMLDoc . UTF8.toStringLazy . fromEntry) in case stylesElem of Nothing -> (M.empty, M.empty) Just styElem -> let namespaces = elemToNameSpaces styElem in ( M.fromList $ buildBasedOnList namespaces styElem (Nothing :: Maybe CharStyle), M.fromList $ buildBasedOnList namespaces styElem (Nothing :: Maybe ParStyle) ) isBasedOnStyle :: (ElemToStyle a) => NameSpaces -> Element -> Maybe a -> Bool isBasedOnStyle ns element parentStyle | isElem ns "w" "style" element , Just styleType <- findAttr (elemName ns "w" "type") element , styleType == cStyleType parentStyle , Just basedOnVal <- findChild (elemName ns "w" "basedOn") element >>= findAttr (elemName ns "w" "val") , Just ps <- parentStyle = (basedOnVal == getStyleId ps) | isElem ns "w" "style" element , Just styleType <- findAttr (elemName ns "w" "type") element , styleType == cStyleType parentStyle , Nothing <- findChild (elemName ns "w" "basedOn") element , Nothing <- parentStyle = True | otherwise = False class ElemToStyle a where cStyleType :: Maybe a -> String elemToStyle :: NameSpaces -> Element -> Maybe a -> Maybe a getStyleId :: a -> String instance ElemToStyle CharStyle where cStyleType _ = "character" elemToStyle ns element parentStyle | isElem ns "w" "style" element , Just "character" <- findAttr (elemName ns "w" "type") element , Just styleId <- findAttr (elemName ns "w" "styleId") element = Just (styleId, elemToRunStyle ns element parentStyle) | otherwise = Nothing getStyleId s = fst s instance ElemToStyle ParStyle where cStyleType _ = "paragraph" elemToStyle ns element parentStyle | isElem ns "w" "style" element , Just "paragraph" <- findAttr (elemName ns "w" "type") element , Just styleId <- findAttr (elemName ns "w" "styleId") element = Just (styleId, elemToParStyleData ns element parentStyle) | otherwise = Nothing getStyleId s = fst s getStyleChildren :: (ElemToStyle a) => NameSpaces -> Element -> Maybe a -> [a] getStyleChildren ns element parentStyle | isElem ns "w" "styles" element = mapMaybe (\e -> elemToStyle ns e parentStyle) $ filterChildren (\e' -> isBasedOnStyle ns e' parentStyle) element | otherwise = [] buildBasedOnList :: (ElemToStyle a) => NameSpaces -> Element -> Maybe a -> [a] buildBasedOnList ns element rootStyle = case (getStyleChildren ns element rootStyle) of [] -> [] stys -> stys ++ (concatMap (\s -> buildBasedOnList ns element (Just s)) stys) archiveToNotes :: Archive -> Notes archiveToNotes zf = let fnElem = findEntryByPath "word/footnotes.xml" zf >>= (parseXMLDoc . UTF8.toStringLazy . fromEntry) enElem = findEntryByPath "word/endnotes.xml" zf >>= (parseXMLDoc . UTF8.toStringLazy . fromEntry) fn_namespaces = case fnElem of Just e -> elemToNameSpaces e Nothing -> [] en_namespaces = case enElem of Just e -> elemToNameSpaces e Nothing -> [] ns = unionBy (\x y -> fst x == fst y) fn_namespaces en_namespaces fn = fnElem >>= (elemToNotes ns "footnote") en = enElem >>= (elemToNotes ns "endnote") in Notes ns fn en archiveToComments :: Archive -> Comments archiveToComments zf = let cmtsElem = findEntryByPath "word/comments.xml" zf >>= (parseXMLDoc . UTF8.toStringLazy . fromEntry) cmts_namespaces = case cmtsElem of Just e -> elemToNameSpaces e Nothing -> [] cmts = (elemToComments cmts_namespaces) <$> cmtsElem in case cmts of Just c -> Comments cmts_namespaces c Nothing -> Comments cmts_namespaces M.empty 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 :: 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 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 = concatMap (filePathToRelationships archive) $ filesInArchive archive filePathIsMedia :: FilePath -> Bool filePathIsMedia fp = let (dir, _) = splitFileName fp in (dir == "word/media/") lookupLevel :: String -> String -> Numbering -> Maybe Level lookupLevel numId ilvl (Numbering _ numbs absNumbs) = do absNumId <- lookup numId $ map (\(Numb nid absnumid) -> (nid, absnumid)) numbs lvls <- lookup absNumId $ map (\(AbstractNumb aid ls) -> (aid, ls)) absNumbs lvl <- lookup ilvl $ map (\l@(i, _, _, _) -> (i, l)) lvls return lvl numElemToNum :: NameSpaces -> Element -> Maybe Numb numElemToNum ns element | isElem ns "w" "num" element = do numId <- findAttr (elemName ns "w" "numId") element absNumId <- findChild (elemName ns "w" "abstractNumId") element >>= findAttr (elemName ns "w" "val") return $ Numb numId absNumId numElemToNum _ _ = Nothing absNumElemToAbsNum :: NameSpaces -> Element -> Maybe AbstractNumb absNumElemToAbsNum ns element | isElem ns "w" "abstractNum" element = do absNumId <- findAttr (elemName ns "w" "abstractNumId") element let levelElems = findChildren (elemName ns "w" "lvl") element levels = mapMaybe (levelElemToLevel ns) levelElems return $ AbstractNumb absNumId levels absNumElemToAbsNum _ _ = Nothing levelElemToLevel :: NameSpaces -> Element -> Maybe Level levelElemToLevel ns element | isElem ns "w" "lvl" element = do ilvl <- findAttr (elemName ns "w" "ilvl") element fmt <- findChild (elemName ns "w" "numFmt") element >>= findAttr (elemName ns "w" "val") txt <- findChild (elemName ns "w" "lvlText") element >>= findAttr (elemName ns "w" "val") let start = findChild (elemName ns "w" "start") element >>= findAttr (elemName ns "w" "val") >>= (\s -> listToMaybe (map fst (reads s :: [(Integer, String)]))) return (ilvl, fmt, txt, start) levelElemToLevel _ _ = Nothing archiveToNumbering' :: Archive -> Maybe Numbering archiveToNumbering' zf = do case findEntryByPath "word/numbering.xml" zf of Nothing -> Just $ Numbering [] [] [] Just entry -> do numberingElem <- (parseXMLDoc . UTF8.toStringLazy . fromEntry) entry let namespaces = elemToNameSpaces numberingElem numElems = findChildren (elemName namespaces "w" "num") numberingElem absNumElems = findChildren (elemName namespaces "w" "abstractNum") numberingElem nums = mapMaybe (numElemToNum namespaces) numElems absNums = mapMaybe (absNumElemToAbsNum namespaces) absNumElems return $ Numbering namespaces nums absNums archiveToNumbering :: Archive -> Numbering archiveToNumbering archive = fromMaybe (Numbering [] [] []) (archiveToNumbering' archive) elemToNotes :: NameSpaces -> String -> Element -> Maybe (M.Map String Element) elemToNotes ns notetype element | isElem ns "w" (notetype ++ "s") element = let pairs = mapMaybe (\e -> findAttr (elemName ns "w" "id") e >>= (\a -> Just (a, e))) (findChildren (elemName ns "w" notetype) element) in Just $ M.fromList $ pairs elemToNotes _ _ _ = Nothing elemToComments :: NameSpaces -> Element -> M.Map String Element elemToComments ns element | isElem ns "w" "comments" element = let pairs = mapMaybe (\e -> findAttr (elemName ns "w" "id") e >>= (\a -> Just (a, e))) (findChildren (elemName ns "w" "comment") element) in M.fromList $ pairs elemToComments _ _ = M.empty --------------------------------------------- --------------------------------------------- elemToTblGrid :: NameSpaces -> Element -> D TblGrid elemToTblGrid ns element | isElem ns "w" "tblGrid" element = let cols = findChildren (elemName ns "w" "gridCol") element in mapD (\e -> maybeToD (findAttr (elemName ns "w" "val") e >>= stringToInteger)) cols elemToTblGrid _ _ = throwError WrongElem elemToTblLook :: NameSpaces -> Element -> D TblLook elemToTblLook ns element | isElem ns "w" "tblLook" element = let firstRow = findAttr (elemName ns "w" "firstRow") element val = findAttr (elemName ns "w" "val") element firstRowFmt = case firstRow of Just "1" -> True Just _ -> False Nothing -> case val of Just bitMask -> testBitMask bitMask 0x020 Nothing -> False in return $ TblLook{firstRowFormatting = firstRowFmt} elemToTblLook _ _ = throwError WrongElem elemToRow :: NameSpaces -> Element -> D Row elemToRow ns element | isElem ns "w" "tr" element = do let cellElems = findChildren (elemName ns "w" "tc") element cells <- mapD (elemToCell ns) cellElems return $ Row cells elemToRow _ _ = throwError WrongElem elemToCell :: NameSpaces -> Element -> D Cell elemToCell ns element | isElem ns "w" "tc" element = do cellContents <- mapD (elemToBodyPart ns) (elChildren element) return $ Cell cellContents elemToCell _ _ = throwError WrongElem elemToParIndentation :: NameSpaces -> Element -> Maybe ParIndentation elemToParIndentation ns element | isElem ns "w" "ind" element = Just $ ParIndentation { leftParIndent = findAttr (elemName ns "w" "left") element >>= stringToInteger , rightParIndent = findAttr (elemName ns "w" "right") element >>= stringToInteger , hangingParIndent = findAttr (elemName ns "w" "hanging") element >>= stringToInteger} elemToParIndentation _ _ = Nothing testBitMask :: String -> Int -> Bool testBitMask bitMaskS n = case (reads ("0x" ++ bitMaskS) :: [(Int, String)]) of [] -> False ((n', _) : _) -> ((n' .|. n) /= 0) stringToInteger :: String -> Maybe Integer stringToInteger s = listToMaybe $ map fst (reads s :: [(Integer, String)]) elemToBodyPart :: NameSpaces -> Element -> D BodyPart elemToBodyPart ns element | isElem ns "w" "p" element , (c:_) <- findChildren (elemName ns "m" "oMathPara") element = do expsLst <- eitherToD $ readOMML $ showElement c return $ OMathPara expsLst elemToBodyPart ns element | isElem ns "w" "p" element , Just (numId, lvl) <- getNumInfo ns element = do sty <- asks envParStyles let parstyle = elemToParagraphStyle ns element sty parparts <- mapD (elemToParPart ns) (elChildren element) num <- asks envNumbering let levelInfo = lookupLevel numId lvl num return $ ListItem parstyle numId lvl levelInfo parparts elemToBodyPart ns element | isElem ns "w" "p" element = do sty <- asks envParStyles let parstyle = elemToParagraphStyle ns element sty parparts <- mapD (elemToParPart ns) (elChildren element) -- Word uses list enumeration for numbered headings, so we only -- want to infer a list from the styles if it is NOT a heading. case pHeading parstyle of Nothing | Just (numId, lvl) <- pNumInfo parstyle -> do num <- asks envNumbering let levelInfo = lookupLevel numId lvl num return $ ListItem parstyle numId lvl levelInfo parparts _ -> return $ Paragraph parstyle parparts elemToBodyPart ns element | isElem ns "w" "tbl" element = do let caption' = findChild (elemName ns "w" "tblPr") element >>= findChild (elemName ns "w" "tblCaption") >>= findAttr (elemName ns "w" "val") caption = (fromMaybe "" caption') grid' = case findChild (elemName ns "w" "tblGrid") element of Just g -> elemToTblGrid ns g Nothing -> return [] tblLook' = case findChild (elemName ns "w" "tblPr") element >>= findChild (elemName ns "w" "tblLook") of Just l -> elemToTblLook ns l Nothing -> return defaultTblLook grid <- grid' tblLook <- tblLook' rows <- mapD (elemToRow ns) (elChildren element) return $ Tbl caption grid tblLook rows elemToBodyPart _ _ = throwError WrongElem 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 location <- asks envLocation target <- asks (lookupRelationship location s . envRelationships) case target of Just filepath -> do bytes <- asks (lookup ("word/" ++ filepath) . envMedia) case bytes of Just bs -> return (filepath, bs) Nothing -> throwError DocxError Nothing -> throwError DocxError getTitleAndAlt :: NameSpaces -> Element -> (String, String) getTitleAndAlt ns element = let mbDocPr = findChild (elemName ns "wp" "inline") element >>= findChild (elemName ns "wp" "docPr") title = case mbDocPr >>= findAttr (elemName ns "" "title") of Just title' -> title' Nothing -> "" alt = case mbDocPr >>= findAttr (elemName ns "" "descr") of Just alt' -> alt' Nothing -> "" in (title, alt) elemToParPart :: NameSpaces -> Element -> D ParPart elemToParPart ns element | isElem ns "w" "r" element , Just drawingElem <- findChild (elemName ns "w" "drawing") element , pic_ns <- "http://schemas.openxmlformats.org/drawingml/2006/picture" , Just picElem <- findElement (QName "pic" (Just pic_ns) (Just "pic")) drawingElem = let (title, alt) = getTitleAndAlt ns drawingElem a_ns = "http://schemas.openxmlformats.org/drawingml/2006/main" drawing = findElement (QName "blip" (Just a_ns) (Just "a")) picElem >>= findAttr (elemName ns "r" "embed") in case drawing of Just s -> expandDrawingId s >>= (\(fp, bs) -> return $ Drawing fp title alt bs $ elemToExtent drawingElem) Nothing -> throwError WrongElem -- The below is an attempt to deal with images in deprecated vml format. elemToParPart ns element | isElem ns "w" "r" element , Just _ <- findChild (elemName ns "w" "pict") element = let drawing = findElement (elemName ns "v" "imagedata") element >>= findAttr (elemName ns "r" "id") in case drawing of -- Todo: check out title and attr for deprecated format. Just s -> expandDrawingId s >>= (\(fp, bs) -> return $ Drawing fp "" "" bs Nothing) Nothing -> throwError WrongElem -- Chart elemToParPart ns element | isElem ns "w" "r" element , Just drawingElem <- findChild (elemName ns "w" "drawing") element , c_ns <- "http://schemas.openxmlformats.org/drawingml/2006/chart" , Just _ <- findElement (QName "chart" (Just c_ns) (Just "c")) drawingElem = return Chart elemToParPart ns element | isElem ns "w" "r" element = elemToRun ns element >>= (\r -> return $ PlainRun r) elemToParPart ns element | isElem ns "w" "ins" element || isElem ns "w" "moveTo" element , Just cId <- findAttr (elemName ns "w" "id") element , Just cAuthor <- findAttr (elemName ns "w" "author") element , Just cDate <- findAttr (elemName ns "w" "date") element = do runs <- mapD (elemToRun ns) (elChildren element) return $ Insertion cId cAuthor cDate runs elemToParPart ns element | isElem ns "w" "del" element || isElem ns "w" "moveFrom" element , Just cId <- findAttr (elemName ns "w" "id") element , Just cAuthor <- findAttr (elemName ns "w" "author") element , Just cDate <- findAttr (elemName ns "w" "date") element = do runs <- mapD (elemToRun ns) (elChildren element) return $ Deletion cId cAuthor cDate runs elemToParPart ns element | isElem ns "w" "bookmarkStart" element , Just bmId <- findAttr (elemName ns "w" "id") element , Just bmName <- findAttr (elemName ns "w" "name") element = return $ BookMark bmId bmName 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 location relId rels of Just target -> do case findAttr (elemName ns "w" "anchor") element of Just anchor -> return $ ExternalHyperLink (target ++ '#':anchor) runs Nothing -> return $ ExternalHyperLink target runs Nothing -> return $ ExternalHyperLink "" runs elemToParPart ns element | isElem ns "w" "hyperlink" element , Just anchor <- findAttr (elemName ns "w" "anchor") element = do runs <- mapD (elemToRun ns) (elChildren element) return $ InternalHyperLink anchor runs elemToParPart ns element | isElem ns "w" "commentRangeStart" element , Just cmtId <- findAttr (elemName ns "w" "id") element = do (Comments _ commentMap) <- asks envComments case M.lookup cmtId commentMap of Just cmtElem -> elemToCommentStart ns cmtElem Nothing -> throwError WrongElem elemToParPart ns element | isElem ns "w" "commentRangeEnd" element , Just cmtId <- findAttr (elemName ns "w" "id") element = return $ CommentEnd cmtId elemToParPart ns element | isElem ns "m" "oMath" element = (eitherToD $ readOMML $ showElement element) >>= (return . PlainOMath) elemToParPart _ _ = throwError WrongElem elemToCommentStart :: NameSpaces -> Element -> D ParPart elemToCommentStart ns element | isElem ns "w" "comment" element , Just cmtId <- findAttr (elemName ns "w" "id") element , Just cmtAuthor <- findAttr (elemName ns "w" "author") element , Just cmtDate <- findAttr (elemName ns "w" "date") element = do bps <- mapD (elemToBodyPart ns) (elChildren element) return $ CommentStart cmtId cmtAuthor cmtDate bps elemToCommentStart _ _ = throwError WrongElem lookupFootnote :: String -> Notes -> Maybe Element lookupFootnote s (Notes _ fns _) = fns >>= (M.lookup s) lookupEndnote :: String -> Notes -> Maybe Element lookupEndnote s (Notes _ _ ens) = ens >>= (M.lookup s) elemToExtent :: Element -> Extent elemToExtent drawingElem = case (getDim "cx", getDim "cy") of (Just w, Just h) -> Just (w, h) _ -> Nothing where wp_ns = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" getDim at = findElement (QName "extent" (Just wp_ns) (Just "wp")) drawingElem >>= findAttr (QName at Nothing Nothing) >>= safeRead childElemToRun :: NameSpaces -> Element -> D Run childElemToRun ns element | isElem ns "w" "drawing" element , pic_ns <- "http://schemas.openxmlformats.org/drawingml/2006/picture" , Just picElem <- findElement (QName "pic" (Just pic_ns) (Just "pic")) element = let (title, alt) = getTitleAndAlt ns element a_ns = "http://schemas.openxmlformats.org/drawingml/2006/main" drawing = findElement (QName "blip" (Just a_ns) (Just "a")) picElem >>= findAttr (QName "embed" (lookup "r" ns) (Just "r")) in case drawing of Just s -> expandDrawingId s >>= (\(fp, bs) -> return $ InlineDrawing fp title alt bs $ elemToExtent element) Nothing -> throwError WrongElem childElemToRun ns element | isElem ns "w" "drawing" element , c_ns <- "http://schemas.openxmlformats.org/drawingml/2006/chart" , Just _ <- findElement (QName "chart" (Just c_ns) (Just "c")) element = return InlineChart childElemToRun ns element | isElem ns "w" "footnoteReference" element , Just fnId <- findAttr (elemName ns "w" "id") element = do notes <- asks envNotes case lookupFootnote fnId notes of Just e -> do bps <- local (\r -> r {envLocation=InFootnote}) $ mapD (elemToBodyPart ns) (elChildren e) return $ Footnote bps Nothing -> return $ Footnote [] childElemToRun ns element | isElem ns "w" "endnoteReference" element , Just enId <- findAttr (elemName ns "w" "id") element = do notes <- asks envNotes case lookupEndnote enId notes of Just e -> do bps <- local (\r -> r {envLocation=InEndnote}) $ mapD (elemToBodyPart ns) (elChildren e) return $ Endnote bps Nothing -> return $ Endnote [] childElemToRun _ _ = throwError WrongElem elemToRun :: NameSpaces -> Element -> D Run elemToRun ns element | isElem ns "w" "r" element , Just altCont <- findChild (elemName ns "mc" "AlternateContent") element = do let choices = findChildren (elemName ns "mc" "Choice") altCont choiceChildren = map head $ filter (not . null) $ map elChildren choices outputs <- mapD (childElemToRun ns) choiceChildren case outputs of r : _ -> return r [] -> throwError WrongElem elemToRun ns element | isElem ns "w" "r" element , Just drawingElem <- findChild (elemName ns "w" "drawing") element = childElemToRun ns drawingElem elemToRun ns element | isElem ns "w" "r" element , Just ref <- findChild (elemName ns "w" "footnoteReference") element = childElemToRun ns ref elemToRun ns element | isElem ns "w" "r" element , Just ref <- findChild (elemName ns "w" "endnoteReference") element = childElemToRun ns ref elemToRun ns element | isElem ns "w" "r" element = do runElems <- elemToRunElems ns element runStyle <- elemToRunStyleD ns element return $ Run runStyle runElems elemToRun _ _ = throwError WrongElem getParentStyleValue :: (ParStyleData -> Maybe a) -> ParStyleData -> Maybe a getParentStyleValue field style | Just value <- field style = Just value | Just parentStyle <- psStyle style = getParentStyleValue field (snd parentStyle) getParentStyleValue _ _ = Nothing getParStyleField :: (ParStyleData -> Maybe a) -> ParStyleMap -> [String] -> Maybe a getParStyleField field stylemap styles | x <- mapMaybe (\x -> M.lookup x stylemap) styles , (y:_) <- mapMaybe (getParentStyleValue field) x = Just y getParStyleField _ _ _ = Nothing elemToParagraphStyle :: NameSpaces -> Element -> ParStyleMap -> ParagraphStyle elemToParagraphStyle ns element sty | Just pPr <- findChild (elemName ns "w" "pPr") element = let style = mapMaybe (findAttr (elemName ns "w" "val")) (findChildren (elemName ns "w" "pStyle") pPr) in ParagraphStyle {pStyle = style , indentation = findChild (elemName ns "w" "ind") pPr >>= elemToParIndentation ns , dropCap = case findChild (elemName ns "w" "framePr") pPr >>= findAttr (elemName ns "w" "dropCap") of Just "none" -> False Just _ -> True Nothing -> False , pHeading = getParStyleField headingLev sty style , pNumInfo = getParStyleField numInfo sty style , pBlockQuote = getParStyleField isBlockQuote sty style } elemToParagraphStyle _ _ _ = defaultParagraphStyle checkOnOff :: NameSpaces -> Element -> QName -> Maybe Bool checkOnOff ns rPr tag | Just t <- findChild tag rPr , Just val <- findAttr (elemName ns "w" "val") t = Just $ case val of "true" -> True "false" -> False "on" -> True "off" -> False "1" -> True "0" -> False _ -> False | Just _ <- findChild tag rPr = Just True checkOnOff _ _ _ = Nothing elemToRunStyleD :: NameSpaces -> Element -> D RunStyle elemToRunStyleD ns element | Just rPr <- findChild (elemName ns "w" "rPr") element = do charStyles <- asks envCharStyles let parentSty = case findChild (elemName ns "w" "rStyle") rPr >>= findAttr (elemName ns "w" "val") of Just styName | Just style <- M.lookup styName charStyles -> Just (styName, style) _ -> Nothing return $ elemToRunStyle ns element parentSty elemToRunStyleD _ _ = return defaultRunStyle elemToRunStyle :: NameSpaces -> Element -> Maybe CharStyle -> RunStyle elemToRunStyle ns element parentStyle | Just rPr <- findChild (elemName ns "w" "rPr") element = RunStyle { isBold = checkOnOff ns rPr (elemName ns "w" "b") , isItalic = checkOnOff ns rPr (elemName ns "w" "i") , isSmallCaps = checkOnOff ns rPr (elemName ns "w" "smallCaps") , isStrike = checkOnOff ns rPr (elemName ns "w" "strike") , rVertAlign = findChild (elemName ns "w" "vertAlign") rPr >>= findAttr (elemName ns "w" "val") >>= \v -> Just $ case v of "superscript" -> SupScrpt "subscript" -> SubScrpt _ -> BaseLn , rUnderline = findChild (elemName ns "w" "u") rPr >>= findAttr (elemName ns "w" "val") , rStyle = parentStyle } elemToRunStyle _ _ _ = defaultRunStyle isNumericNotNull :: String -> Bool isNumericNotNull str = (str /= []) && (all isDigit str) getHeaderLevel :: NameSpaces -> Element -> Maybe (String,Int) getHeaderLevel ns element | Just styleId <- findAttr (elemName ns "w" "styleId") element , Just index <- stripPrefix "Heading" styleId , isNumericNotNull index = Just (styleId, read index) | Just styleId <- findAttr (elemName ns "w" "styleId") element , Just index <- findChild (elemName ns "w" "name") element >>= findAttr (elemName ns "w" "val") >>= stripPrefix "heading " , isNumericNotNull index = Just (styleId, read index) getHeaderLevel _ _ = Nothing blockQuoteStyleIds :: [String] blockQuoteStyleIds = ["Quote", "BlockQuote", "BlockQuotation"] blockQuoteStyleNames :: [String] blockQuoteStyleNames = ["Quote", "Block Text"] getBlockQuote :: NameSpaces -> Element -> Maybe Bool getBlockQuote ns element | Just styleId <- findAttr (elemName ns "w" "styleId") element , styleId `elem` blockQuoteStyleIds = Just True | Just styleName <- findChild (elemName ns "w" "name") element >>= findAttr (elemName ns "w" "val") , styleName `elem` blockQuoteStyleNames = Just True getBlockQuote _ _ = Nothing getNumInfo :: NameSpaces -> Element -> Maybe (String, String) getNumInfo ns element = do let numPr = findChild (elemName ns "w" "pPr") element >>= findChild (elemName ns "w" "numPr") lvl = fromMaybe "0" (numPr >>= findChild (elemName ns "w" "ilvl") >>= findAttr (elemName ns "w" "val")) numId <- numPr >>= findChild (elemName ns "w" "numId") >>= findAttr (elemName ns "w" "val") return (numId, lvl) elemToParStyleData :: NameSpaces -> Element -> Maybe ParStyle -> ParStyleData elemToParStyleData ns element parentStyle = ParStyleData { headingLev = getHeaderLevel ns element , isBlockQuote = getBlockQuote ns element , numInfo = getNumInfo ns element , psStyle = parentStyle } elemToRunElem :: NameSpaces -> Element -> D RunElem elemToRunElem ns element | isElem ns "w" "t" element || isElem ns "w" "delText" element || isElem ns "m" "t" element = do let str = strContent element font <- asks envFont case font of Nothing -> return $ TextRun str Just f -> return . TextRun $ 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 lowerFromPrivate (ord -> c) | c >= ord '\xF000' = chr $ c - ord '\xF000' | otherwise = chr c -- The char attribute is a hex string getSymChar :: NameSpaces -> Element -> RunElem getSymChar ns element | Just s <- lowerFromPrivate <$> getCodepoint , Just font <- getFont = let [(char, _)] = readLitChar ("\\x" ++ s) in TextRun . maybe "" (:[]) $ getUnicode font char where getCodepoint = findAttr (elemName ns "w" "char") element getFont = stringToFont =<< findAttr (elemName ns "w" "font") element lowerFromPrivate ('F':xs) = '0':xs lowerFromPrivate xs = xs getSymChar _ _ = TextRun "" elemToRunElems :: NameSpaces -> Element -> D [RunElem] elemToRunElems ns element | isElem ns "w" "r" element || isElem ns "m" "r" element = do let qualName = elemName ns "w" let font = do fontElem <- findElement (qualName "rFonts") element stringToFont =<< (foldr (<|>) Nothing $ map (flip findAttr fontElem . qualName) ["ascii", "hAnsi"]) local (setFont font) (mapD (elemToRunElem ns) (elChildren element)) elemToRunElems _ _ = throwError WrongElem setFont :: Maybe Font -> ReaderEnv -> ReaderEnv setFont f s = s{envFont = f} ���������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Docx/Util.hs������������������������������������������������0000644�0000000�0000000�00000001662�13155240142�020054� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������module Text.Pandoc.Readers.Docx.Util ( NameSpaces , elemName , isElem , elemToNameSpaces ) where import Text.XML.Light import Data.Maybe (mapMaybe) type NameSpaces = [(String, String)] elemToNameSpaces :: Element -> NameSpaces elemToNameSpaces = mapMaybe attrToNSPair . elAttribs attrToNSPair :: Attr -> Maybe (String, String) attrToNSPair (Attr (QName s _ (Just "xmlns")) val) = Just (s, val) attrToNSPair _ = Nothing elemName :: NameSpaces -> String -> String -> QName elemName ns prefix name = QName name (lookup prefix ns) (if null prefix then Nothing else Just prefix) isElem :: NameSpaces -> String -> String -> Element -> Bool isElem ns prefix name element = qName (elName element) == name && qURI (elName element) == lookup prefix ns ������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Docx/StyleMap.hs��������������������������������������������0000644�0000000�0000000�00000007357�13155240142�020704� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������module Text.Pandoc.Readers.Docx.StyleMap ( StyleMaps(..) , alterMap , getMap , defaultStyleMaps , getStyleMaps , getStyleId , hasStyleName ) where import Text.XML.Light import Text.Pandoc.Readers.Docx.Util import Control.Monad.State import Data.Char (toLower) import qualified Data.Map as M newtype ParaStyleMap = ParaStyleMap ( M.Map String String ) newtype CharStyleMap = CharStyleMap ( M.Map String String ) class StyleMap a where alterMap :: (M.Map String String -> M.Map String String) -> a -> a getMap :: a -> M.Map String String instance StyleMap ParaStyleMap where alterMap f (ParaStyleMap m) = ParaStyleMap $ f m getMap (ParaStyleMap m) = m instance StyleMap CharStyleMap where alterMap f (CharStyleMap m) = CharStyleMap $ f m getMap (CharStyleMap m) = m insert :: (StyleMap a) => Maybe String -> Maybe String -> a -> a insert (Just k) (Just v) m = alterMap (M.insert k v) m insert _ _ m = m getStyleId :: (StyleMap a) => String -> a -> String getStyleId s = M.findWithDefault (filter (/=' ') s) (map toLower s) . getMap hasStyleName :: (StyleMap a) => String -> a -> Bool hasStyleName styleName = M.member (map toLower styleName) . getMap data StyleMaps = StyleMaps { sNameSpaces :: NameSpaces , sParaStyleMap :: ParaStyleMap , sCharStyleMap :: CharStyleMap } data StyleType = ParaStyle | CharStyle defaultStyleMaps :: StyleMaps defaultStyleMaps = StyleMaps { sNameSpaces = [] , sParaStyleMap = ParaStyleMap M.empty , sCharStyleMap = CharStyleMap M.empty } type StateM a = State StyleMaps a getStyleMaps :: Element -> StyleMaps getStyleMaps docElem = execState genStyleMap state' where state' = defaultStyleMaps {sNameSpaces = elemToNameSpaces docElem} genStyleItem e = do styleType <- getStyleType e styleId <- getAttrStyleId e nameValLowercase <- fmap (map toLower) `fmap` getNameVal e case styleType of Just ParaStyle -> modParaStyleMap $ insert nameValLowercase styleId Just CharStyle -> modCharStyleMap $ insert nameValLowercase styleId _ -> return () genStyleMap = do style <- elemName' "style" let styles = findChildren style docElem forM_ styles genStyleItem modParaStyleMap :: (ParaStyleMap -> ParaStyleMap) -> StateM () modParaStyleMap f = modify $ \s -> s {sParaStyleMap = f $ sParaStyleMap s} modCharStyleMap :: (CharStyleMap -> CharStyleMap) -> StateM () modCharStyleMap f = modify $ \s -> s {sCharStyleMap = f $ sCharStyleMap s} getStyleType :: Element -> StateM (Maybe StyleType) getStyleType e = do styleTypeStr <- getAttrType e case styleTypeStr of Just "paragraph" -> return $ Just ParaStyle Just "character" -> return $ Just CharStyle _ -> return Nothing getAttrType :: Element -> StateM (Maybe String) getAttrType el = do name <- elemName' "type" return $ findAttr name el getAttrStyleId :: Element -> StateM (Maybe String) getAttrStyleId el = do name <- elemName' "styleId" return $ findAttr name el getNameVal :: Element -> StateM (Maybe String) getNameVal el = do name <- elemName' "name" val <- elemName' "val" return $ findChild name el >>= findAttr val elemName' :: String -> StateM QName elemName' name = do namespaces <- gets sNameSpaces return $ elemName namespaces "w" name ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/Base.hs�������������������������������������������������0000644�0000000�0000000�00000002630�13155240142�017636� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE PatternGuards #-} {- Copyright (C) 2015 Martin Linnemann <theCodingMarlin@googlemail.com> 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.Readers.Odt.Base Copyright : Copyright (C) 2015 Martin Linnemann License : GNU GPL, version 2 or above Maintainer : Martin Linnemann <theCodingMarlin@googlemail.com> Stability : alpha Portability : portable Core types of the odt reader. -} module Text.Pandoc.Readers.Odt.Base where import Text.Pandoc.Readers.Odt.Generic.XMLConverter import Text.Pandoc.Readers.Odt.Namespaces type OdtConverterState s = XMLConverterState Namespace s type XMLReader s a b = FallibleXMLConverter Namespace s a b type XMLReaderSafe s a b = XMLConverter Namespace s a b ��������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/Namespaces.hs�������������������������������������������0000644�0000000�0000000�00000011763�13155240142�021052� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2015 Martin Linnemann <theCodingMarlin@googlemail.com> 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.Reader.Odt.Namespaces Copyright : Copyright (C) 2015 Martin Linnemann License : GNU GPL, version 2 or above Maintainer : Martin Linnemann <theCodingMarlin@googlemail.com> Stability : alpha Portability : portable Namespaces used in odt files. -} module Text.Pandoc.Readers.Odt.Namespaces ( Namespace (..) ) where import Data.List ( isPrefixOf ) import Data.Maybe ( fromMaybe, listToMaybe ) import qualified Data.Map as M ( empty, insert ) import Text.Pandoc.Readers.Odt.Generic.Namespaces instance NameSpaceID Namespace where getInitialIRImap = nsIDmap getNamespaceID "" m = Just(m, NsXML) getNamespaceID iri m = asPair $ fromMaybe (NsOther iri) (findID iri) where asPair nsID = Just (M.insert nsID iri m, nsID) findID :: NameSpaceIRI -> Maybe Namespace findID iri = listToMaybe [nsID | (iri',~nsID) <- nsIDs, iri' `isPrefixOf` iri] nsIDmap :: NameSpaceIRIs Namespace nsIDmap = foldr (uncurry $ flip M.insert) M.empty nsIDs data Namespace = -- Open Document core NsOffice | NsStyle | NsText | NsTable | NsForm | NsDraw | Ns3D | NsAnim | NsChart | NsConfig | NsDB | NsMeta | NsNumber | NsScript | NsManifest | NsPresentation -- Metadata | NsODF -- Compatible elements | NsXSL_FO | NsSVG | NsSmil -- External standards | NsMathML | NsXForms | NsXLink | NsXHtml | NsGRDDL | NsDublinCore -- Metadata manifest | NsPKG -- Others | NsOpenFormula -- Core XML (basically only for the 'id'-attribute) | NsXML -- Fallback | NsOther String deriving ( Eq, Ord, Show ) -- | Not the actual iri's, but large prefixes of them - this way there are -- less versioning problems and the like. nsIDs :: [(String,Namespace)] nsIDs = [ ("urn:oasis:names:tc:opendocument:xmlns:animation" , NsAnim ), ("urn:oasis:names:tc:opendocument:xmlns:chart" , NsChart ), ("urn:oasis:names:tc:opendocument:xmlns:config" , NsConfig ), ("urn:oasis:names:tc:opendocument:xmlns:database" , NsDB ), ("urn:oasis:names:tc:opendocument:xmlns:dr3d" , Ns3D ), ("urn:oasis:names:tc:opendocument:xmlns:drawing" , NsDraw ), ("urn:oasis:names:tc:opendocument:xmlns:form" , NsForm ), ("urn:oasis:names:tc:opendocument:xmlns:manifest" , NsManifest ), ("urn:oasis:names:tc:opendocument:xmlns:meta" , NsMeta ), ("urn:oasis:names:tc:opendocument:xmlns:datastyle" , NsNumber ), ("urn:oasis:names:tc:opendocument:xmlns:of" , NsOpenFormula ), ("urn:oasis:names:tc:opendocument:xmlns:office:1.0" , NsOffice ), ("urn:oasis:names:tc:opendocument:xmlns:presentation" , NsPresentation ), ("urn:oasis:names:tc:opendocument:xmlns:script" , NsScript ), ("urn:oasis:names:tc:opendocument:xmlns:style" , NsStyle ), ("urn:oasis:names:tc:opendocument:xmlns:table" , NsTable ), ("urn:oasis:names:tc:opendocument:xmlns:text" , NsText ), ("urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible", NsXSL_FO ), ("urn:oasis:names:tc:opendocument:xmlns:smil-compatible" , NsSmil ), ("urn:oasis:names:tc:opendocument:xmlns:svg-compatible" , NsSVG ), ("http://docs.oasis-open.org/ns/office/1.2/meta/odf" , NsODF ), ("http://docs.oasis-open.org/ns/office/1.2/meta/pkg" , NsPKG ), ("http://purl.org/dc/elements" , NsDublinCore ), ("http://www.w3.org/2003/g/data-view" , NsGRDDL ), ("http://www.w3.org/1998/Math/MathML" , NsMathML ), ("http://www.w3.org/1999/xhtml" , NsXHtml ), ("http://www.w3.org/2002/xforms" , NsXForms ), ("http://www.w3.org/1999/xlink" , NsXLink ) ] �������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/StyleReader.hs������������������������������������������0000644�0000000�0000000�00000072512�13155240142�021215� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE TupleSections #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE Arrows #-} {- Copyright (C) 2015 Martin Linnemann <theCodingMarlin@googlemail.com> 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.Readers.Odt.StyleReader Copyright : Copyright (C) 2015 Martin Linnemann License : GNU GPL, version 2 or above Maintainer : Martin Linnemann <theCodingMarlin@googlemail.com> Stability : alpha Portability : portable Reader for the style information in an odt document. -} module Text.Pandoc.Readers.Odt.StyleReader ( Style (..) , StyleName , StyleFamily (..) , Styles (..) , StyleProperties (..) , TextProperties (..) , ParaProperties (..) , VerticalTextPosition (..) , ListItemNumberFormat (..) , ListLevel , ListStyle (..) , ListLevelStyle (..) , ListLevelType (..) , LengthOrPercent (..) , lookupStyle , getTextProperty , getTextProperty' , getParaProperty , getListStyle , getListLevelStyle , getStyleFamily , lookupDefaultStyle , lookupDefaultStyle' , lookupListStyleByName , getPropertyChain , textPropertyChain , stylePropertyChain , stylePropertyChain' , getStylePropertyChain , extendedStylePropertyChain , extendedStylePropertyChain' , liftStyles , readStylesAt ) where import Control.Arrow import Control.Applicative hiding ( liftA, liftA2, liftA3 ) import qualified Data.Foldable as F import qualified Data.Map as M import qualified Data.Set as S import Data.Char ( isDigit ) import Data.Default import Data.List ( unfoldr ) import Data.Maybe import qualified Text.XML.Light as XML import Text.Pandoc.Readers.Odt.Arrows.State import Text.Pandoc.Readers.Odt.Arrows.Utils import Text.Pandoc.Readers.Odt.Generic.Utils import qualified Text.Pandoc.Readers.Odt.Generic.SetMap as SM import Text.Pandoc.Readers.Odt.Generic.Fallible import Text.Pandoc.Readers.Odt.Generic.XMLConverter import Text.Pandoc.Readers.Odt.Namespaces import Text.Pandoc.Readers.Odt.Base readStylesAt :: XML.Element -> Fallible Styles readStylesAt e = runConverter' readAllStyles mempty e -------------------------------------------------------------------------------- -- Reader for font declarations and font pitches -------------------------------------------------------------------------------- -- Pandoc has no support for different font pitches. Yet knowing them can be -- very helpful in cases where Pandoc has more semantics than OpenDocument. -- In these cases, the pitch can help deciding as what to define a block of -- text. So let's start with a type for font pitches: data FontPitch = PitchVariable | PitchFixed deriving ( Eq, Show ) instance Lookupable FontPitch where lookupTable = [ ("variable" , PitchVariable) , ("fixed" , PitchFixed ) ] instance Default FontPitch where def = PitchVariable -- The font pitch can be specifed in a style directly. Normally, however, -- it is defined in the font. That is also the specs' recommendation. -- -- Thus, we want type FontFaceName = String type FontPitches = M.Map FontFaceName FontPitch -- To get there, the fonts have to be read and the pitches extracted. -- But the resulting map are only needed at one later place, so it should not be -- transported on the value level, especially as we already use a state arrow. -- So instead, the resulting map is lifted into the state of the reader. -- (An alternative might be ImplicitParams, but again, we already have a state.) -- -- So the main style readers will have the types type StyleReader a b = XMLReader FontPitches a b -- and type StyleReaderSafe a b = XMLReaderSafe FontPitches a b -- respectively. -- -- But before we can work with these, we need to define the reader that reads -- the fonts: -- | A reader for font pitches fontPitchReader :: XMLReader _s _x FontPitches fontPitchReader = executeIn NsOffice "font-face-decls" ( ( withEveryL NsStyle "font-face" $ liftAsSuccess ( findAttr' NsStyle "name" &&& lookupDefaultingAttr NsStyle "font-pitch" ) ) >>?^ ( M.fromList . (foldl accumLegalPitches []) ) ) where accumLegalPitches ls (Nothing,_) = ls accumLegalPitches ls (Just n,p) = (n,p):ls -- | A wrapper around the font pitch reader that lifts the result into the -- state. readFontPitches :: StyleReader x x readFontPitches = producingExtraState () () fontPitchReader -- | Looking up a pitch in the state of the arrow. -- -- The function does the following: -- * Look for the font pitch in an attribute. -- * If that fails, look for the font name, look up the font in the state -- and use the pitch from there. -- * Return the result in a Maybe -- findPitch :: XMLReaderSafe FontPitches _x (Maybe FontPitch) findPitch = ( lookupAttr NsStyle "font-pitch" `ifFailedDo` findAttr NsStyle "font-name" >>? ( keepingTheValue getExtraState >>% M.lookup >>^ maybeToChoice ) ) >>> choiceToMaybe -------------------------------------------------------------------------------- -- Definitions of main data -------------------------------------------------------------------------------- type StyleName = String -- | There are two types of styles: named styles with a style family and an -- optional style parent, and default styles for each style family, -- defining default style properties data Styles = Styles { stylesByName :: M.Map StyleName Style , listStylesByName :: M.Map StyleName ListStyle , defaultStyleMap :: M.Map StyleFamily StyleProperties } deriving ( Show ) -- Styles from a monoid under union instance Monoid Styles where mempty = Styles M.empty M.empty M.empty mappend (Styles sBn1 dSm1 lsBn1) (Styles sBn2 dSm2 lsBn2) = Styles (M.union sBn1 sBn2) (M.union dSm1 dSm2) (M.union lsBn1 lsBn2) -- Not all families from the specifications are implemented, only those we need. -- But there are none that are not mentioned here. data StyleFamily = FaText | FaParagraph -- | FaTable | FaTableCell | FaTableColumn | FaTableRow -- | FaGraphic | FaDrawing | FaChart -- | FaPresentation -- | FaRuby deriving ( Eq, Ord, Show ) instance Lookupable StyleFamily where lookupTable = [ ( "text" , FaText ) , ( "paragraph" , FaParagraph ) -- , ( "table" , FaTable ) -- , ( "table-cell" , FaTableCell ) -- , ( "table-column" , FaTableColumn ) -- , ( "table-row" , FaTableRow ) -- , ( "graphic" , FaGraphic ) -- , ( "drawing-page" , FaDrawing ) -- , ( "chart" , FaChart ) -- , ( "presentation" , FaPresentation ) -- , ( "ruby" , FaRuby ) ] -- | A named style data Style = Style { styleFamily :: Maybe StyleFamily , styleParentName :: Maybe StyleName , listStyle :: Maybe StyleName , styleProperties :: StyleProperties } deriving ( Eq, Show ) data StyleProperties = SProps { textProperties :: Maybe TextProperties , paraProperties :: Maybe ParaProperties -- , tableColProperties :: Maybe TColProperties -- , tableRowProperties :: Maybe TRowProperties -- , tableCellProperties :: Maybe TCellProperties -- , tableProperties :: Maybe TableProperties -- , graphicProperties :: Maybe GraphProperties } deriving ( Eq, Show ) instance Default StyleProperties where def = SProps { textProperties = Just def , paraProperties = Just def } data TextProperties = PropT { isEmphasised :: Bool , isStrong :: Bool , pitch :: Maybe FontPitch , verticalPosition :: VerticalTextPosition , underline :: Maybe UnderlineMode , strikethrough :: Maybe UnderlineMode } deriving ( Eq, Show ) instance Default TextProperties where def = PropT { isEmphasised = False , isStrong = False , pitch = Just def , verticalPosition = def , underline = Nothing , strikethrough = Nothing } data ParaProperties = PropP { paraNumbering :: ParaNumbering , indentation :: LengthOrPercent , margin_left :: LengthOrPercent } deriving ( Eq, Show ) instance Default ParaProperties where def = PropP { paraNumbering = NumberingNone , indentation = def , margin_left = def } ---- -- All the little data types that make up the properties ---- data VerticalTextPosition = VPosNormal | VPosSuper | VPosSub deriving ( Eq, Show ) instance Default VerticalTextPosition where def = VPosNormal instance Read VerticalTextPosition where readsPrec _ s = [ (VPosSub , s') | ("sub" , s') <- lexS ] ++ [ (VPosSuper , s') | ("super" , s') <- lexS ] ++ [ (signumToVPos n , s') | ( n , s') <- readPercent s ] where lexS = lex s signumToVPos n | n < 0 = VPosSub | n > 0 = VPosSuper | otherwise = VPosNormal data UnderlineMode = UnderlineModeNormal | UnderlineModeSkipWhitespace deriving ( Eq, Show ) instance Lookupable UnderlineMode where lookupTable = [ ( "continuous" , UnderlineModeNormal ) , ( "skip-white-space" , UnderlineModeSkipWhitespace ) ] data ParaNumbering = NumberingNone | NumberingKeep | NumberingRestart Int deriving ( Eq, Show ) data LengthOrPercent = LengthValueMM Int | PercentValue Int deriving ( Eq, Show ) instance Default LengthOrPercent where def = LengthValueMM 0 instance Read LengthOrPercent where readsPrec _ s = [ (PercentValue percent , s' ) | (percent , s' ) <- readPercent s] ++ [ (LengthValueMM lengthMM , s'') | (length' , s' ) <- reads s , (unit , s'') <- reads s' , let lengthMM = estimateInMillimeter length' unit ] data XslUnit = XslUnitMM | XslUnitCM | XslUnitInch | XslUnitPoints | XslUnitPica | XslUnitPixel | XslUnitEM instance Show XslUnit where show XslUnitMM = "mm" show XslUnitCM = "cm" show XslUnitInch = "in" show XslUnitPoints = "pt" show XslUnitPica = "pc" show XslUnitPixel = "px" show XslUnitEM = "em" instance Read XslUnit where readsPrec _ "mm" = [(XslUnitMM , "")] readsPrec _ "cm" = [(XslUnitCM , "")] readsPrec _ "in" = [(XslUnitInch , "")] readsPrec _ "pt" = [(XslUnitPoints , "")] readsPrec _ "pc" = [(XslUnitPica , "")] readsPrec _ "px" = [(XslUnitPixel , "")] readsPrec _ "em" = [(XslUnitEM , "")] readsPrec _ _ = [] -- | Rough conversion of measures into millimeters. -- Pixels and em's are actually implemetation dependant/relative measures, -- so I could not really easily calculate anything exact here even if I wanted. -- But I do not care about exactness right now, as I only use measures -- to determine if a paragraph is "indented" or not. 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 ---- -- List styles ---- type ListLevel = Int newtype ListStyle = ListStyle { levelStyles :: M.Map ListLevel ListLevelStyle } deriving ( Eq, Show ) -- getListLevelStyle :: ListLevel -> ListStyle -> Maybe ListLevelStyle 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 data ListLevelStyle = ListLevelStyle { listLevelType :: ListLevelType , listItemPrefix :: Maybe String , listItemSuffix :: Maybe String , listItemFormat :: ListItemNumberFormat , listItemStart :: Int } deriving ( Eq, Ord ) instance Show ListLevelStyle where show ListLevelStyle{..} = "<LLS|" ++ (show listLevelType) ++ "|" ++ (maybeToString listItemPrefix) ++ (show listItemFormat) ++ (maybeToString listItemSuffix) ++ ">" where maybeToString = fromMaybe "" data ListLevelType = LltBullet | LltImage | LltNumbered deriving ( Eq, Ord, Show ) data ListItemNumberFormat = LinfNone | LinfNumber | LinfRomanLC | LinfRomanUC | LinfAlphaLC | LinfAlphaUC | LinfString String deriving ( Eq, Ord ) instance Show ListItemNumberFormat where show LinfNone = "" show LinfNumber = "1" show LinfRomanLC = "i" show LinfRomanUC = "I" show LinfAlphaLC = "a" show LinfAlphaUC = "A" show (LinfString s) = s instance Default ListItemNumberFormat where def = LinfNone instance Read ListItemNumberFormat where readsPrec _ "" = [(LinfNone , "")] readsPrec _ "1" = [(LinfNumber , "")] readsPrec _ "i" = [(LinfRomanLC , "")] readsPrec _ "I" = [(LinfRomanUC , "")] readsPrec _ "a" = [(LinfAlphaLC , "")] readsPrec _ "A" = [(LinfAlphaUC , "")] readsPrec _ s = [(LinfString s , "")] -------------------------------------------------------------------------------- -- Readers -- -- ...it seems like a whole lot of this should be automatically deriveable -- or at least moveable into a class. Most of this is data concealed in -- code. -------------------------------------------------------------------------------- -- readAllStyles :: StyleReader _x Styles readAllStyles = ( readFontPitches >>?! ( readAutomaticStyles &&& readStyles )) >>?%? chooseMax -- all top elements are always on the same hierarchy level -- readStyles :: StyleReader _x Styles readStyles = executeIn NsOffice "styles" $ liftAsSuccess $ liftA3 Styles ( tryAll NsStyle "style" readStyle >>^ M.fromList ) ( tryAll NsText "list-style" readListStyle >>^ M.fromList ) ( tryAll NsStyle "default-style" readDefaultStyle >>^ M.fromList ) -- readAutomaticStyles :: StyleReader _x Styles readAutomaticStyles = executeIn NsOffice "automatic-styles" $ liftAsSuccess $ liftA3 Styles ( tryAll NsStyle "style" readStyle >>^ M.fromList ) ( tryAll NsText "list-style" readListStyle >>^ M.fromList ) ( returnV M.empty ) -- readDefaultStyle :: StyleReader _x (StyleFamily, StyleProperties) readDefaultStyle = lookupAttr NsStyle "family" >>?! keepingTheValue readStyleProperties -- readStyle :: StyleReader _x (StyleName,Style) readStyle = findAttr NsStyle "name" >>?! keepingTheValue ( liftA4 Style ( lookupAttr' NsStyle "family" ) ( findAttr' NsStyle "parent-style-name" ) ( findAttr' NsStyle "list-style-name" ) readStyleProperties ) -- readStyleProperties :: StyleReaderSafe _x StyleProperties readStyleProperties = liftA2 SProps ( readTextProperties >>> choiceToMaybe ) ( readParaProperties >>> choiceToMaybe ) -- readTextProperties :: StyleReader _x TextProperties readTextProperties = executeIn NsStyle "text-properties" $ liftAsSuccess ( liftA6 PropT ( searchAttr NsXSL_FO "font-style" False isFontEmphasised ) ( searchAttr NsXSL_FO "font-weight" False isFontBold ) ( findPitch ) ( getAttr NsStyle "text-position" ) ( readUnderlineMode ) ( readStrikeThroughMode ) ) where isFontEmphasised = [("normal",False),("italic",True),("oblique",True)] isFontBold = ("normal",False):("bold",True) :(map ((,True).show) ([100,200..900]::[Int])) readUnderlineMode :: StyleReaderSafe _x (Maybe UnderlineMode) readUnderlineMode = readLineMode "text-underline-mode" "text-underline-style" readStrikeThroughMode :: StyleReaderSafe _x (Maybe UnderlineMode) readStrikeThroughMode = readLineMode "text-line-through-mode" "text-line-through-style" readLineMode :: String -> String -> StyleReaderSafe _x (Maybe UnderlineMode) readLineMode modeAttr styleAttr = proc x -> do isUL <- searchAttr NsStyle styleAttr False isLinePresent -< x mode <- lookupAttr' NsStyle modeAttr -< x if isUL then case mode of Just m -> returnA -< Just m Nothing -> returnA -< Just UnderlineModeNormal else returnA -< Nothing where isLinePresent = [("none",False)] ++ map (,True) [ "dash" , "dot-dash" , "dot-dot-dash" , "dotted" , "long-dash" , "solid" , "wave" ] -- readParaProperties :: StyleReader _x ParaProperties readParaProperties = executeIn NsStyle "paragraph-properties" $ liftAsSuccess ( liftA3 PropP ( liftA2 readNumbering ( isSet' NsText "number-lines" ) ( readAttr' NsText "line-number" ) ) ( liftA2 readIndentation ( isSetWithDefault NsStyle "auto-text-indent" False ) ( getAttr NsXSL_FO "text-indent" ) ) ( getAttr NsXSL_FO "margin-left" ) ) where readNumbering (Just True) (Just n) = NumberingRestart n readNumbering (Just True) _ = NumberingKeep readNumbering _ _ = NumberingNone readIndentation False indent = indent readIndentation True _ = def ---- -- List styles ---- -- readListStyle :: StyleReader _x (StyleName, ListStyle) readListStyle = findAttr NsStyle "name" >>?! keepingTheValue ( liftA ListStyle $ ( liftA3 SM.union3 ( readListLevelStyles NsText "list-level-style-number" LltNumbered ) ( readListLevelStyles NsText "list-level-style-bullet" LltBullet ) ( readListLevelStyles NsText "list-level-style-image" LltImage ) ) >>^ M.mapMaybe chooseMostSpecificListLevelStyle ) -- readListLevelStyles :: Namespace -> ElementName -> ListLevelType -> StyleReaderSafe _x (SM.SetMap Int ListLevelStyle) readListLevelStyles namespace elementName levelType = ( tryAll namespace elementName (readListLevelStyle levelType) >>^ SM.fromList ) -- readListLevelStyle :: ListLevelType -> StyleReader _x (Int, ListLevelStyle) readListLevelStyle levelType = readAttr NsText "level" >>?! keepingTheValue ( liftA5 toListLevelStyle ( returnV levelType ) ( findAttr' NsStyle "num-prefix" ) ( findAttr' NsStyle "num-suffix" ) ( getAttr NsStyle "num-format" ) ( findAttr' NsText "start-value" ) ) where toListLevelStyle _ p s LinfNone b = ListLevelStyle LltBullet p s LinfNone (startValue b) toListLevelStyle _ p s f@(LinfString _) b = ListLevelStyle LltBullet p s f (startValue b) toListLevelStyle t p s f b = ListLevelStyle t p s f (startValue b) startValue (Just "") = 1 startValue (Just v) = if all isDigit v then read v else 1 startValue Nothing = 1 -- chooseMostSpecificListLevelStyle :: S.Set ListLevelStyle -> Maybe ListLevelStyle chooseMostSpecificListLevelStyle ls | ls == mempty = Nothing | otherwise = Just ( F.foldr1 select ls ) where select ( ListLevelStyle t1 p1 s1 f1 b1 ) ( ListLevelStyle t2 p2 s2 f2 _ ) = ListLevelStyle (select' t1 t2) (p1 <|> p2) (s1 <|> s2) (selectLinf f1 f2) b1 select' LltNumbered _ = LltNumbered select' _ LltNumbered = LltNumbered select' _ _ = LltBullet selectLinf LinfNone f2 = f2 selectLinf f1 LinfNone = f1 selectLinf (LinfString _) f2 = f2 selectLinf f1 (LinfString _) = f1 selectLinf f1 _ = f1 -------------------------------------------------------------------------------- -- Tools to access style data -------------------------------------------------------------------------------- -- lookupStyle :: StyleName -> Styles -> Maybe Style lookupStyle name Styles{..} = M.lookup name stylesByName -- lookupDefaultStyle :: StyleFamily -> Styles -> StyleProperties lookupDefaultStyle family Styles{..} = fromMaybe def (M.lookup family defaultStyleMap) -- lookupDefaultStyle' :: Styles -> StyleFamily -> StyleProperties lookupDefaultStyle' Styles{..} family = fromMaybe def (M.lookup family defaultStyleMap) -- getListStyle :: Style -> Styles -> Maybe ListStyle getListStyle Style{..} styles = listStyle >>= (`lookupListStyleByName` styles) -- lookupListStyleByName :: StyleName -> Styles -> Maybe ListStyle lookupListStyleByName name Styles{..} = M.lookup name listStylesByName -- | Returns a chain of parent of the current style. The direct parent will -- be the first element of the list, followed by its parent and so on. -- The current style is not in the list. parents :: Style -> Styles -> [Style] parents style styles = unfoldr findNextParent style -- Ha! where findNextParent Style{..} = fmap duplicate $ (`lookupStyle` styles) =<< styleParentName -- | Looks up the style family of the current style. Normally, every style -- should have one. But if not, all parents are searched. getStyleFamily :: Style -> Styles -> Maybe StyleFamily getStyleFamily style@Style{..} styles = styleFamily <|> (F.asum $ map (`getStyleFamily` styles) $ parents style styles) -- | Each 'Style' has certain 'StyleProperties'. But sometimes not all property -- values are specified. Instead, a value might be inherited from a -- parent style. This function makes this chain of inheritance -- concrete and easily accessible by encapsulating the necessary lookups. -- The resulting list contains the direct properties of the style as the first -- element, the ones of the direct parent element as the next one, and so on. -- -- Note: There should also be default properties for each style family. These -- are @not@ contained in this list because properties inherited from -- parent elements take precedence over default styles. -- -- This function is primarily meant to be used through convenience wrappers. -- stylePropertyChain :: Style -> Styles -> [StyleProperties] stylePropertyChain style styles = map styleProperties (style : parents style styles) -- extendedStylePropertyChain :: [Style] -> Styles -> [StyleProperties] extendedStylePropertyChain [] _ = [] extendedStylePropertyChain [style] styles = (stylePropertyChain style styles) ++ (maybeToList (fmap (lookupDefaultStyle' styles) (getStyleFamily style styles))) extendedStylePropertyChain (style:trace) styles = (stylePropertyChain style styles) ++ (extendedStylePropertyChain trace styles) -- Optimizable with Data.Sequence -- extendedStylePropertyChain' :: [Style] -> Styles -> Maybe [StyleProperties] extendedStylePropertyChain' [] _ = Nothing extendedStylePropertyChain' [style] styles = Just ( (stylePropertyChain style styles) ++ (maybeToList (fmap (lookupDefaultStyle' styles) (getStyleFamily style styles))) ) extendedStylePropertyChain' (style:trace) styles = fmap ((stylePropertyChain style styles) ++) (extendedStylePropertyChain' trace styles) -- stylePropertyChain' :: Styles -> Style -> [StyleProperties] stylePropertyChain' = flip stylePropertyChain -- getStylePropertyChain :: StyleName -> Styles -> [StyleProperties] getStylePropertyChain name styles = maybe [] (`stylePropertyChain` styles) (lookupStyle name styles) -- getPropertyChain :: (StyleProperties -> Maybe a) -> Style -> Styles -> [a] getPropertyChain extract style styles = catMaybes $ map extract $ stylePropertyChain style styles -- textPropertyChain :: Style -> Styles -> [TextProperties] textPropertyChain = getPropertyChain textProperties -- paraPropertyChain :: Style -> Styles -> [ParaProperties] paraPropertyChain = getPropertyChain paraProperties -- getTextProperty :: (TextProperties -> a) -> Style -> Styles -> Maybe a getTextProperty extract style styles = fmap extract $ listToMaybe $ textPropertyChain style styles -- getTextProperty' :: (TextProperties -> Maybe a) -> Style -> Styles -> Maybe a getTextProperty' extract style styles = F.asum $ map extract $ textPropertyChain style styles -- getParaProperty :: (ParaProperties -> a) -> Style -> Styles -> Maybe a getParaProperty extract style styles = fmap extract $ listToMaybe $ paraPropertyChain style styles -- | Lifts the reader into another readers' state. liftStyles :: (OdtConverterState s -> OdtConverterState Styles) -> (OdtConverterState Styles -> OdtConverterState s ) -> XMLReader s x x liftStyles extract inject = switchState extract inject $ convertingExtraState M.empty readAllStyles ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/ContentReader.hs����������������������������������������0000644�0000000�0000000�00000105040�13155240142�021520� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE Arrows #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE RecordWildCards #-} {- Copyright (C) 2015 Martin Linnemann <theCodingMarlin@googlemail.com> 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.Readers.Odt.ContentReader Copyright : Copyright (C) 2015 Martin Linnemann License : GNU GPL, version 2 or above Maintainer : Martin Linnemann <theCodingMarlin@googlemail.com> Stability : alpha Portability : portable The core of the odt reader that converts odt features into Pandoc types. -} module Text.Pandoc.Readers.Odt.ContentReader ( readerState , read_body ) where import Control.Arrow import Control.Applicative hiding ( liftA, liftA2, liftA3 ) import qualified Data.ByteString.Lazy as B import qualified Data.Map as M import Data.List ( find, intercalate ) import Data.Maybe import qualified Text.XML.Light as XML import Text.Pandoc.Definition import Text.Pandoc.Builder import Text.Pandoc.MediaBag (insertMedia, MediaBag) import Text.Pandoc.Shared import Text.Pandoc.Readers.Odt.Base import Text.Pandoc.Readers.Odt.Namespaces import Text.Pandoc.Readers.Odt.StyleReader import Text.Pandoc.Readers.Odt.Arrows.Utils import Text.Pandoc.Readers.Odt.Generic.XMLConverter import Text.Pandoc.Readers.Odt.Generic.Fallible import Text.Pandoc.Readers.Odt.Generic.Utils import qualified Data.Set as Set -------------------------------------------------------------------------------- -- State -------------------------------------------------------------------------------- type Anchor = String type Media = [(FilePath, B.ByteString)] data ReaderState = ReaderState { -- | A collection of styles read somewhere else. -- It is only queried here, not modified. styleSet :: Styles -- | A stack of the styles of parent elements. -- Used to look up inherited style properties. , styleTrace :: [Style] -- | Keeps track of the current depth in nested lists , currentListLevel :: ListLevel -- | Lists may provide their own style, but they don't have -- to. If they do not, the style of a parent list may be used -- or even a default list style from the paragraph style. -- This value keeps track of the closest list style there -- currently is. , currentListStyle :: Maybe ListStyle -- | A map from internal anchor names to "pretty" ones. -- The mapping is a purely cosmetic one. , bookmarkAnchors :: M.Map Anchor Anchor -- | A map of files / binary data from the archive , envMedia :: Media -- | Hold binary resources used in the document , odtMediaBag :: MediaBag -- , sequences -- , trackedChangeIDs } deriving ( Show ) readerState :: Styles -> Media -> ReaderState readerState styles media = ReaderState styles [] 0 Nothing M.empty media mempty -- pushStyle' :: Style -> ReaderState -> ReaderState pushStyle' style state = state { styleTrace = style : styleTrace state } -- popStyle' :: ReaderState -> ReaderState popStyle' state = case styleTrace state of _:trace -> state { styleTrace = trace } _ -> state -- modifyListLevel :: (ListLevel -> ListLevel) -> (ReaderState -> ReaderState) modifyListLevel f state = state { currentListLevel = f (currentListLevel state) } -- shiftListLevel :: ListLevel -> (ReaderState -> ReaderState) shiftListLevel diff = modifyListLevel (+ diff) -- swapCurrentListStyle :: Maybe ListStyle -> ReaderState -> (ReaderState, Maybe ListStyle) swapCurrentListStyle mListStyle state = ( state { currentListStyle = mListStyle } , currentListStyle state ) -- lookupPrettyAnchor :: Anchor -> ReaderState -> Maybe Anchor lookupPrettyAnchor anchor ReaderState{..} = M.lookup anchor bookmarkAnchors -- putPrettyAnchor :: Anchor -> Anchor -> ReaderState -> ReaderState putPrettyAnchor ugly pretty state@ReaderState{..} = state { bookmarkAnchors = M.insert ugly pretty bookmarkAnchors } -- usedAnchors :: ReaderState -> [Anchor] usedAnchors ReaderState{..} = M.elems bookmarkAnchors getMediaBag :: ReaderState -> MediaBag getMediaBag ReaderState{..} = odtMediaBag getMediaEnv :: ReaderState -> Media getMediaEnv ReaderState{..} = envMedia insertMedia' :: (FilePath, B.ByteString) -> ReaderState -> ReaderState insertMedia' (fp, bs) state@ReaderState{..} = state { odtMediaBag = insertMedia fp Nothing bs odtMediaBag } -------------------------------------------------------------------------------- -- Reader type and associated tools -------------------------------------------------------------------------------- type OdtReader a b = XMLReader ReaderState a b type OdtReaderSafe a b = XMLReaderSafe ReaderState a b -- | Extract something from the styles fromStyles :: (a -> Styles -> b) -> OdtReaderSafe a b fromStyles f = keepingTheValue (getExtraState >>^ styleSet) >>% f -- getStyleByName :: OdtReader StyleName Style getStyleByName = fromStyles lookupStyle >>^ maybeToChoice -- findStyleFamily :: OdtReader Style StyleFamily findStyleFamily = fromStyles getStyleFamily >>^ maybeToChoice -- lookupListStyle :: OdtReader StyleName ListStyle lookupListStyle = fromStyles lookupListStyleByName >>^ maybeToChoice -- switchCurrentListStyle :: OdtReaderSafe (Maybe ListStyle) (Maybe ListStyle) switchCurrentListStyle = keepingTheValue getExtraState >>% swapCurrentListStyle >>> first setExtraState >>^ snd -- pushStyle :: OdtReaderSafe Style Style pushStyle = keepingTheValue ( ( keepingTheValue getExtraState >>% pushStyle' ) >>> setExtraState ) >>^ fst -- popStyle :: OdtReaderSafe x x popStyle = keepingTheValue ( getExtraState >>> arr popStyle' >>> setExtraState ) >>^ fst -- getCurrentListLevel :: OdtReaderSafe _x ListLevel getCurrentListLevel = getExtraState >>^ currentListLevel -- updateMediaWithResource :: OdtReaderSafe (FilePath, B.ByteString) (FilePath, B.ByteString) updateMediaWithResource = keepingTheValue ( (keepingTheValue getExtraState >>% insertMedia' ) >>> setExtraState ) >>^ fst lookupResource :: OdtReaderSafe String (FilePath, B.ByteString) lookupResource = proc target -> do state <- getExtraState -< () case lookup target (getMediaEnv state) of Just bs -> returnV (target, bs) -<< () Nothing -> returnV ("", B.empty) -< () type AnchorPrefix = String -- | An adaptation of 'uniqueIdent' from "Text.Pandoc.Shared" that generates a -- unique identifier but without assuming that the id should be for a header. -- Second argument is a list of already used identifiers. uniqueIdentFrom :: AnchorPrefix -> [Anchor] -> Anchor uniqueIdentFrom baseIdent usedIdents = let numIdent n = baseIdent ++ "-" ++ show n in if baseIdent `elem` usedIdents then case find (\x -> numIdent x `notElem` usedIdents) ([1..60000] :: [Int]) of Just x -> numIdent x Nothing -> baseIdent -- if we have more than 60,000, allow repeats else baseIdent -- | First argument: basis for a new "pretty" anchor if none exists yet -- Second argument: a key ("ugly" anchor) -- Returns: saved "pretty" anchor or created new one getPrettyAnchor :: OdtReaderSafe (AnchorPrefix, Anchor) Anchor getPrettyAnchor = proc (baseIdent, uglyAnchor) -> do state <- getExtraState -< () case lookupPrettyAnchor uglyAnchor state of Just prettyAnchor -> returnA -< prettyAnchor Nothing -> do let newPretty = uniqueIdentFrom baseIdent (usedAnchors state) modifyExtraState (putPrettyAnchor uglyAnchor newPretty) -<< newPretty -- | Input: basis for a new header anchor -- Ouput: saved new anchor getHeaderAnchor :: OdtReaderSafe Inlines Anchor getHeaderAnchor = proc title -> do state <- getExtraState -< () let anchor = uniqueIdent (toList title) (Set.fromList $ usedAnchors state) modifyExtraState (putPrettyAnchor anchor anchor) -<< anchor -------------------------------------------------------------------------------- -- Working with styles -------------------------------------------------------------------------------- -- readStyleByName :: OdtReader _x (StyleName, Style) readStyleByName = findAttr NsText "style-name" >>? keepingTheValue getStyleByName >>^ liftE where liftE :: (StyleName, Fallible Style) -> Fallible (StyleName, Style) liftE (name, Right v) = Right (name, v) liftE (_, Left v) = Left v -- isStyleToTrace :: OdtReader Style Bool isStyleToTrace = findStyleFamily >>?^ (==FaText) -- withNewStyle :: OdtReaderSafe x Inlines -> OdtReaderSafe x Inlines withNewStyle a = proc x -> do fStyle <- readStyleByName -< () case fStyle of Right (styleName, _) | isCodeStyle styleName -> do inlines <- a -< x arr inlineCode -<< inlines Right (_, style) -> do mFamily <- arr styleFamily -< style fTextProps <- arr ( maybeToChoice . textProperties . styleProperties ) -< style case fTextProps of Right textProps -> do state <- getExtraState -< () let triple = (state, textProps, mFamily) modifier <- arr modifierFromStyleDiff -< triple fShouldTrace <- isStyleToTrace -< style case fShouldTrace of Right shouldTrace -> do if shouldTrace then do pushStyle -< style inlines <- a -< x popStyle -< () arr modifier -<< inlines else -- In case anything goes wrong a -< x Left _ -> a -< x Left _ -> a -< x Left _ -> a -< x where isCodeStyle :: StyleName -> Bool isCodeStyle "Source_Text" = True isCodeStyle _ = False inlineCode :: Inlines -> Inlines inlineCode = code . intercalate "" . map stringify . toList type PropertyTriple = (ReaderState, TextProperties, Maybe StyleFamily) type InlineModifier = Inlines -> Inlines -- | Given data about the local style changes, calculates how to modify -- an instance of 'Inlines' modifierFromStyleDiff :: PropertyTriple -> InlineModifier modifierFromStyleDiff propertyTriple = composition $ (getVPosModifier propertyTriple) : map (first ($ propertyTriple) >>> ifThen_else ignore) [ (hasEmphChanged , emph ) , (hasChanged isStrong , strong ) , (hasChanged strikethrough , strikeout ) ] where ifThen_else else' (if',then') = if if' then then' else else' ignore = id :: InlineModifier getVPosModifier :: PropertyTriple -> InlineModifier getVPosModifier triple@(_,textProps,_) = let getVPos = Just . verticalPosition in case lookupPreviousValueM getVPos triple of Nothing -> ignore Just oldVPos -> getVPosModifier' (oldVPos, verticalPosition textProps) getVPosModifier' (oldVPos , newVPos ) | oldVPos == newVPos = ignore getVPosModifier' ( _ , VPosSub ) = subscript getVPosModifier' ( _ , VPosSuper ) = superscript getVPosModifier' ( _ , _ ) = ignore hasEmphChanged :: PropertyTriple -> Bool hasEmphChanged = swing any [ hasChanged isEmphasised , hasChangedM pitch , hasChanged underline ] hasChanged property triple@(_, property -> newProperty, _) = maybe True (/=newProperty) (lookupPreviousValue property triple) hasChangedM property triple@(_, textProps,_) = fromMaybe False $ (/=) <$> property textProps <*> lookupPreviousValueM property triple lookupPreviousValue f = lookupPreviousStyleValue ((fmap f).textProperties) lookupPreviousValueM f = lookupPreviousStyleValue ((f =<<).textProperties) lookupPreviousStyleValue f (ReaderState{..},_,mFamily) = ( findBy f $ extendedStylePropertyChain styleTrace styleSet ) <|> ( f =<< fmap (lookupDefaultStyle' styleSet) mFamily ) type ParaModifier = Blocks -> Blocks _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_MM_ :: Int _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_PERCENT_ :: Int _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_MM_ = 5 _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_PERCENT_ = 5 -- | Returns either 'id' or 'blockQuote' depending on the current indentation getParaModifier :: Style -> ParaModifier getParaModifier Style{..} | Just props <- paraProperties styleProperties , isBlockQuote (indentation props) (margin_left props) = blockQuote | otherwise = id where isBlockQuote mIndent mMargin | LengthValueMM indent <- mIndent , indent > _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_MM_ = True | LengthValueMM margin <- mMargin , margin > _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_MM_ = True | LengthValueMM indent <- mIndent , LengthValueMM margin <- mMargin = indent + margin > _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_MM_ | PercentValue indent <- mIndent , indent > _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_PERCENT_ = True | PercentValue margin <- mMargin , margin > _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_PERCENT_ = True | PercentValue indent <- mIndent , PercentValue margin <- mMargin = indent + margin > _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_PERCENT_ | otherwise = False -- constructPara :: OdtReaderSafe Blocks Blocks -> OdtReaderSafe Blocks Blocks constructPara reader = proc blocks -> do fStyle <- readStyleByName -< blocks case fStyle of Left _ -> reader -< blocks Right (styleName, _) | isTableCaptionStyle styleName -> do blocks' <- reader -< blocks arr tableCaptionP -< blocks' Right (_, style) -> do let modifier = getParaModifier style blocks' <- reader -< blocks arr modifier -<< blocks' where isTableCaptionStyle :: StyleName -> Bool isTableCaptionStyle "Table" = True isTableCaptionStyle _ = False tableCaptionP b = divWith ("", ["caption"], []) b type ListConstructor = [Blocks] -> Blocks getListConstructor :: ListLevelStyle -> ListConstructor getListConstructor ListLevelStyle{..} = case listLevelType of LltBullet -> bulletList LltImage -> bulletList LltNumbered -> let listNumberStyle = toListNumberStyle listItemFormat listNumberDelim = toListNumberDelim listItemPrefix listItemSuffix in orderedListWith (listItemStart, listNumberStyle, listNumberDelim) where toListNumberStyle LinfNone = DefaultStyle toListNumberStyle LinfNumber = Decimal toListNumberStyle LinfRomanLC = LowerRoman toListNumberStyle LinfRomanUC = UpperRoman toListNumberStyle LinfAlphaLC = LowerAlpha toListNumberStyle LinfAlphaUC = UpperAlpha toListNumberStyle (LinfString _) = Example toListNumberDelim Nothing (Just ".") = Period toListNumberDelim (Just "" ) (Just ".") = Period toListNumberDelim Nothing (Just ")") = OneParen toListNumberDelim (Just "" ) (Just ")") = OneParen toListNumberDelim (Just "(") (Just ")") = TwoParens toListNumberDelim _ _ = DefaultDelim -- | Determines which style to use for a list, which level to use of that -- style, and which type of list to create as a result of this information. -- Then prepares the state for eventual child lists and constructs the list from -- the results. -- Two main cases are handled: The list may provide its own style or it may -- rely on a parent list's style. I the former case the current style in the -- state must be switched before and after the call to the child converter -- while in the latter the child converter can be called directly. -- If anything goes wrong, a default ordered-list-constructor is used. constructList :: OdtReaderSafe x [Blocks] -> OdtReaderSafe x Blocks constructList reader = proc x -> do modifyExtraState (shiftListLevel 1) -< () listLevel <- getCurrentListLevel -< () fStyleName <- findAttr NsText "style-name" -< () case fStyleName of Right styleName -> do fListStyle <- lookupListStyle -< styleName case fListStyle of Right listStyle -> do fLLS <- arr (uncurry getListLevelStyle) -< (listLevel,listStyle) case fLLS of Just listLevelStyle -> do oldListStyle <- switchCurrentListStyle -< Just listStyle blocks <- constructListWith listLevelStyle -<< x switchCurrentListStyle -< oldListStyle returnA -< blocks Nothing -> constructOrderedList -< x Left _ -> constructOrderedList -< x Left _ -> do state <- getExtraState -< () mListStyle <- arr currentListStyle -< state case mListStyle of Just listStyle -> do fLLS <- arr (uncurry getListLevelStyle) -< (listLevel,listStyle) case fLLS of Just listLevelStyle -> constructListWith listLevelStyle -<< x Nothing -> constructOrderedList -< x Nothing -> constructOrderedList -< x where constructOrderedList = reader >>> modifyExtraState (shiftListLevel (-1)) >>^ orderedList constructListWith listLevelStyle = reader >>> getListConstructor listLevelStyle ^>> modifyExtraState (shiftListLevel (-1)) -------------------------------------------------------------------------------- -- Readers -------------------------------------------------------------------------------- type ElementMatcher result = (Namespace, ElementName, OdtReader result result) type InlineMatcher = ElementMatcher Inlines type BlockMatcher = ElementMatcher Blocks -- matchingElement :: (Monoid e) => Namespace -> ElementName -> OdtReaderSafe e e -> ElementMatcher 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 >>% (<>) -- matchChildContent' :: (Monoid result) => [ElementMatcher result] -> OdtReaderSafe _x result matchChildContent' ls = returnV mempty >>> matchContent' ls -- matchChildContent :: (Monoid result) => [ElementMatcher result] -> OdtReaderSafe (result, XML.Content) result -> OdtReaderSafe _x result matchChildContent ls fallback = returnV mempty >>> matchContent ls fallback -------------------------------------------- -- Matchers -------------------------------------------- ---------------------- -- Basics ---------------------- -- -- | 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 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) extractText _ = failEmpty read_text_seq :: InlineMatcher read_text_seq = matchingElement NsText "sequence" $ matchChildContent [] read_plain_text -- specifically. I honor that, although the current implementation of '(<>)' -- for 'Inlines' in "Text.Pandoc.Builder" will collaps them agein. -- The rational is to be prepared for future modifications. read_spaces :: InlineMatcher read_spaces = matchingElement NsText "s" ( readAttrWithDefault NsText "c" 1 -- how many spaces? >>^ fromList.(`replicate` Space) ) -- read_line_break :: InlineMatcher read_line_break = matchingElement NsText "line-break" $ returnV linebreak -- read_span :: InlineMatcher read_span = matchingElement NsText "span" $ withNewStyle $ matchChildContent [ read_span , read_spaces , read_line_break , read_link , read_note , read_citation , read_bookmark , read_bookmark_start , read_reference_start , read_bookmark_ref , read_reference_ref ] read_plain_text -- read_paragraph :: BlockMatcher read_paragraph = matchingElement NsText "p" $ constructPara $ liftA para $ withNewStyle $ matchChildContent [ read_span , read_spaces , read_line_break , read_link , read_note , read_citation , read_bookmark , read_bookmark_start , read_reference_start , read_bookmark_ref , read_reference_ref , read_maybe_nested_img_frame , read_text_seq ] read_plain_text ---------------------- -- Headers ---------------------- -- read_header :: BlockMatcher read_header = matchingElement NsText "h" $ proc blocks -> do level <- ( readAttrWithDefault NsText "outline-level" 1 ) -< blocks children <- ( matchChildContent [ read_span , read_spaces , read_line_break , read_link , read_note , read_citation , read_bookmark , read_bookmark_start , read_reference_start , read_bookmark_ref , read_reference_ref , read_maybe_nested_img_frame ] read_plain_text ) -< blocks anchor <- getHeaderAnchor -< children let idAttr = (anchor, [], []) -- no classes, no key-value pairs arr (uncurry3 headerWith) -< (idAttr, level, children) ---------------------- -- Lists ---------------------- -- read_list :: BlockMatcher read_list = matchingElement NsText "list" -- $ withIncreasedListLevel $ constructList -- $ liftA bulletList $ matchChildContent' [ read_list_item ] -- read_list_item :: ElementMatcher [Blocks] read_list_item = matchingElement NsText "list-item" $ liftA (compactify'.(:[])) ( matchChildContent' [ read_paragraph , read_header , read_list ] ) ---------------------- -- Links ---------------------- read_link :: InlineMatcher read_link = matchingElement NsText "a" $ liftA3 link ( findAttrWithDefault NsXLink "href" "" ) ( findAttrWithDefault NsOffice "title" "" ) ( matchChildContent [ read_span , read_note , read_citation , read_bookmark , read_bookmark_start , read_reference_start , read_bookmark_ref , read_reference_ref ] read_plain_text ) ------------------------- -- Footnotes ------------------------- read_note :: InlineMatcher read_note = matchingElement NsText "note" $ liftA note $ matchChildContent' [ read_note_body ] read_note_body :: BlockMatcher read_note_body = matchingElement NsText "note-body" $ matchChildContent' [ read_paragraph ] ------------------------- -- Citations ------------------------- read_citation :: InlineMatcher read_citation = matchingElement NsText "bibliography-mark" $ liftA2 cite ( liftA2 makeCitation ( findAttrWithDefault NsText "identifier" "" ) ( readAttrWithDefault NsText "number" 0 ) ) ( matchChildContent [] read_plain_text ) where makeCitation :: String -> Int -> [Citation] makeCitation citeId num = [Citation citeId [] [] NormalCitation num 0] ---------------------- -- Tables ---------------------- -- read_table :: BlockMatcher read_table = matchingElement NsTable "table" $ liftA simpleTable' $ matchChildContent' [ read_table_row ] -- | A simple table without a caption or headers -- | Infers the number of headers from rows simpleTable' :: [[Blocks]] -> Blocks simpleTable' [] = simpleTable [] [] simpleTable' (x : rest) = simpleTable (fmap (const defaults) x) (x : rest) where defaults = fromList [] -- read_table_row :: ElementMatcher [[Blocks]] read_table_row = matchingElement NsTable "table-row" $ liftA (:[]) $ matchChildContent' [ read_table_cell ] -- read_table_cell :: ElementMatcher [Blocks] read_table_cell = matchingElement NsTable "table-cell" $ liftA (compactify'.(:[])) $ matchChildContent' [ read_paragraph ] ---------------------- -- Images ---------------------- -- read_maybe_nested_img_frame :: InlineMatcher read_maybe_nested_img_frame = matchingElement NsDraw "frame" $ proc blocks -> do img <- (findChild' NsDraw "image") -< () case img of Just _ -> read_frame -< blocks Nothing -> matchChildContent' [ read_frame_text_box ] -< blocks read_frame :: OdtReaderSafe Inlines Inlines read_frame = proc blocks -> do w <- ( findAttr' NsSVG "width" ) -< () h <- ( findAttr' NsSVG "height" ) -< () titleNodes <- ( matchChildContent' [ read_frame_title ] ) -< blocks src <- matchChildContent' [ read_image_src ] -< blocks resource <- lookupResource -< src _ <- updateMediaWithResource -< resource alt <- (matchChildContent [] read_plain_text) -< blocks arr (uncurry4 imageWith ) -< (image_attributes w h, src, inlineListToIdentifier (toList titleNodes), alt) image_attributes :: Maybe String -> Maybe String -> Attr image_attributes x y = ( "", [], (dim "width" x) ++ (dim "height" y)) where dim _ (Just "") = [] dim name (Just v) = [(name, v)] dim _ Nothing = [] read_image_src :: (Namespace, ElementName, OdtReader Anchor Anchor) read_image_src = matchingElement NsDraw "image" $ proc _ -> do imgSrc <- findAttr NsXLink "href" -< () case imgSrc of Right src -> returnV src -<< () Left _ -> returnV "" -< () read_frame_title :: InlineMatcher read_frame_title = matchingElement NsSVG "title" $ (matchChildContent [] read_plain_text) read_frame_text_box :: InlineMatcher read_frame_text_box = matchingElement NsDraw "text-box" $ proc blocks -> do paragraphs <- (matchChildContent' [ read_paragraph ]) -< blocks arr read_img_with_caption -< toList paragraphs read_img_with_caption :: [Block] -> Inlines read_img_with_caption ((Para ((Image attr alt (src,title)) : [])) : _) = singleton (Image attr alt (src, 'f':'i':'g':':':title)) -- no text, default caption read_img_with_caption ((Para ((Image attr _ (src,title)) : txt)) : _) = singleton (Image attr txt (src, 'f':'i':'g':':':title) ) -- override caption with the text that follows read_img_with_caption ( (Para (_ : xs)) : ys) = read_img_with_caption ((Para xs) : ys) read_img_with_caption _ = mempty ---------------------- -- Internal links ---------------------- _ANCHOR_PREFIX_ :: String _ANCHOR_PREFIX_ = "anchor" -- readAnchorAttr :: OdtReader _x Anchor readAnchorAttr = findAttr NsText "name" -- | Beware: may fail findAnchorName :: OdtReader AnchorPrefix Anchor findAnchorName = ( keepingTheValue readAnchorAttr >>^ spreadChoice ) >>?! getPrettyAnchor -- maybeAddAnchorFrom :: OdtReader Inlines AnchorPrefix -> OdtReaderSafe Inlines Inlines maybeAddAnchorFrom anchorReader = keepingTheValue (anchorReader >>? findAnchorName >>?^ toAnchorElem) >>> proc (inlines, fAnchorElem) -> do case fAnchorElem of Right anchorElem -> returnA -< anchorElem Left _ -> returnA -< inlines where toAnchorElem :: Anchor -> Inlines toAnchorElem anchorID = spanWith (anchorID, [], []) mempty -- no classes, no key-value pairs -- read_bookmark :: InlineMatcher read_bookmark = matchingElement NsText "bookmark" $ maybeAddAnchorFrom (liftAsSuccess $ returnV _ANCHOR_PREFIX_) -- read_bookmark_start :: InlineMatcher read_bookmark_start = matchingElement NsText "bookmark-start" $ maybeAddAnchorFrom (liftAsSuccess $ returnV _ANCHOR_PREFIX_) -- read_reference_start :: InlineMatcher read_reference_start = matchingElement NsText "reference-mark-start" $ maybeAddAnchorFrom readAnchorAttr -- | Beware: may fail findAnchorRef :: OdtReader _x Anchor findAnchorRef = ( findAttr NsText "ref-name" >>?^ (_ANCHOR_PREFIX_,) ) >>?! getPrettyAnchor -- maybeInAnchorRef :: OdtReaderSafe Inlines Inlines maybeInAnchorRef = proc inlines -> do fRef <- findAnchorRef -< () case fRef of Right anchor -> arr (toAnchorRef anchor) -<< inlines Left _ -> returnA -< inlines where toAnchorRef :: Anchor -> Inlines -> Inlines toAnchorRef anchor = link ('#':anchor) "" -- no title -- read_bookmark_ref :: InlineMatcher read_bookmark_ref = matchingElement NsText "bookmark-ref" $ maybeInAnchorRef <<< matchChildContent [] read_plain_text -- read_reference_ref :: InlineMatcher read_reference_ref = matchingElement NsText "reference-ref" $ maybeInAnchorRef <<< matchChildContent [] read_plain_text ---------------------- -- Entry point ---------------------- --read_plain_content :: OdtReaderSafe _x Inlines --read_plain_content = strContent >>^ text read_text :: OdtReaderSafe _x Pandoc read_text = matchChildContent' [ read_header , read_paragraph , read_list , read_table ] >>^ doc post_process :: Pandoc -> Pandoc post_process (Pandoc m blocks) = Pandoc m (post_process' blocks) post_process' :: [Block] -> [Block] post_process' ((Table _ a w h r) : (Div ("", ["caption"], _) [Para inlines] ) : xs) = (Table inlines a w h r) : ( post_process' xs ) post_process' bs = bs read_body :: OdtReader _x (Pandoc, MediaBag) read_body = executeIn NsOffice "body" $ executeIn NsOffice "text" $ liftAsSuccess $ proc inlines -> do txt <- read_text -< inlines state <- getExtraState -< () returnA -< (post_process txt, getMediaBag state) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/Generic/Fallible.hs�������������������������������������0000644�0000000�0000000�00000022117�13155240142�022054� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE GeneralizedNewtypeDeriving #-} {- Copyright (C) 2015 Martin Linnemann <theCodingMarlin@googlemail.com> 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.Readers.Odt.Generic.Fallible Copyright : Copyright (C) 2015 Martin Linnemann License : GNU GPL, version 2 or above Maintainer : Martin Linnemann <theCodingMarlin@googlemail.com> Stability : alpha Portability : portable Data types and utilities representing failure. Most of it is based on the "Either" type in its usual configuration (left represents failure). In most cases, the failure type is implied or required to be a "Monoid". The choice of "Either" instead of a custom type makes it easier to write compatible instances of "ArrowChoice". -} -- We export everything module Text.Pandoc.Readers.Odt.Generic.Fallible where import Control.Applicative import Control.Monad import qualified Data.Foldable as F import Data.Monoid ((<>)) -- | Default for now. Will probably become a class at some point. type Failure = () type Fallible a = Either Failure a -- | False -> Left (), True -> Right () boolToEither :: Bool -> Fallible () boolToEither False = Left () boolToEither True = Right () -- | False -> Left (), True -> Right () boolToChoice :: Bool -> Fallible () boolToChoice False = Left () boolToChoice True = Right () -- maybeToEither :: Maybe a -> Fallible a maybeToEither (Just a) = Right a maybeToEither Nothing = Left () -- eitherToMaybe :: Either _l a -> Maybe a eitherToMaybe (Left _) = Nothing eitherToMaybe (Right a) = Just a -- | > untagEither === either id id untagEither :: Either a a -> a untagEither (Left a) = a untagEither (Right a) = a -- | > fromLeft f === either f id fromLeft :: (a -> b) -> Either a b -> b fromLeft f (Left a) = f a fromLeft _ (Right b) = b -- | > fromRight f === either id f fromRight :: (a -> b) -> Either b a -> b fromRight _ (Left b) = b fromRight f (Right a) = f a -- | > recover a === fromLeft (const a) === either (const a) id recover :: a -> Either _f a -> a recover a (Left _) = a recover _ (Right a) = a -- | I would love to use 'fail'. Alas, 'Monad.fail'... failWith :: failure -> Either failure _x failWith f = Left f -- failEmpty :: (Monoid failure) => Either failure _x failEmpty = failWith mempty -- succeedWith :: a -> Either _x a succeedWith = Right -- collapseEither :: Either failure (Either failure x) -> Either failure x collapseEither (Left f ) = Left f collapseEither (Right (Left f)) = Left f collapseEither (Right (Right x)) = Right x -- | If either of the values represents an error, the result is a -- (possibly combined) error. If both values represent a success, -- both are returned. chooseMin :: (Monoid a) => Either a b -> Either a b' -> Either a (b,b') chooseMin = chooseMinWith (,) -- | If either of the values represents an error, the result is a -- (possibly combined) error. If both values represent a success, -- a combination is returned. chooseMinWith :: (Monoid a) => (b -> b' -> c) -> Either a b -> Either a b' -> Either a c chooseMinWith (><) (Right a) (Right b) = Right $ a >< b chooseMinWith _ (Left a) (Left b) = Left $ a <> b chooseMinWith _ (Left a) _ = Left a chooseMinWith _ _ (Left b) = Left b -- | If either of the values represents a non-error, the result is a -- (possibly combined) non-error. If both values represent an error, an error -- is returned. chooseMax :: (Monoid a, Monoid b) => Either a b -> Either a b -> Either a b chooseMax = chooseMaxWith (<>) -- | If either of the values represents a non-error, the result is a -- (possibly combined) non-error. If both values represent an error, an error -- is returned. chooseMaxWith :: (Monoid a) => (b -> b -> b) -> Either a b -> Either a b -> Either a b chooseMaxWith (><) (Right a) (Right b) = Right $ a >< b chooseMaxWith _ (Left a) (Left b) = Left $ a <> b chooseMaxWith _ (Right a) _ = Right a chooseMaxWith _ _ (Right b) = Right b -- | Class of containers that can escalate contained 'Either's. -- The word "Vector" is meant in the sense of a disease transmitter. class ChoiceVector v where spreadChoice :: v (Either f a) -> Either f (v a) -- Let's do a few examples first instance ChoiceVector Maybe where spreadChoice (Just (Left f)) = Left f spreadChoice (Just (Right x)) = Right (Just x) spreadChoice Nothing = Right Nothing instance ChoiceVector (Either l) where spreadChoice (Right (Left f)) = Left f spreadChoice (Right (Right x)) = Right (Right x) spreadChoice (Left x ) = Right (Left x) instance ChoiceVector ((,) a) where spreadChoice (_, Left f) = Left f spreadChoice (x, Right y) = Right (x,y) -- Wasn't there a newtype somewhere with the elements flipped? -- -- More instances later, first some discussion. -- -- I'll have to freshen up on type system details to see how (or if) to do -- something like -- -- > instance (ChoiceVector a, ChoiceVector b) => ChoiceVector (a b) where -- > : -- -- But maybe it would be even better to use something like -- -- > class ChoiceVector v v' f | v -> v' f where -- > spreadChoice :: v -> Either f v' -- -- That way, more places in @v@ could spread the cheer, e.g.: -- -- As before: -- -- ( a , Either f b) (a , b) f -- > instance ChoiceVector ((,) a (Either f b)) ((,) a b) f where -- > spreadChoice (_, Left f) = Left f -- > spreadChoice (a, Right b) = Right (a,b) -- -- But also: -- -- ( Either f a , b) (a , b) f -- > instance ChoiceVector ((,) (Either f a) b) ((,) a b) f where -- > spreadChoice (Right a,b) = Right (a,b) -- > spreadChoice (Left f,_) = Left f -- -- And maybe even: -- -- ( Either f a , Either f b) (a , b) f -- > instance ChoiceVector ((,) (Either f a) (Either f b)) ((,) a b) f where -- > spreadChoice (Right a , Right b) = Right (a,b) -- > spreadChoice (Left f , _ ) = Left f -- > spreadChoice ( _ , Left f) = Left f -- -- Of course that would lead to a lot of overlapping instances... -- But I can't think of a different way. A selector function might help, -- but not even a "Data.Traversable" is powerful enough for that. -- But maybe someone has already solved all this with a lens library. -- -- Well, it's an interesting academic question. But for practical purposes, -- I have more than enough right now. instance ChoiceVector ((,,) a b) where spreadChoice (_,_, Left f) = Left f spreadChoice (a,b, Right x) = Right (a,b,x) instance ChoiceVector ((,,,) a b c) where spreadChoice (_,_,_, Left f) = Left f spreadChoice (a,b,c, Right x) = Right (a,b,c,x) instance ChoiceVector ((,,,,) a b c d) where spreadChoice (_,_,_,_, Left f) = Left f spreadChoice (a,b,c,d, Right x) = Right (a,b,c,d,x) instance ChoiceVector (Const a) where spreadChoice (Const c) = Right (Const c) -- need to repackage because of implicit types -- | Fails on the first error instance ChoiceVector [] where spreadChoice = sequence -- using the monad instance of Either. -- Could be generalized to "Data.Traversable" - but why play -- with UndecidableInstances unless this is really needed. -- | Wrapper for a list. While the normal list instance of 'ChoiceVector' -- fails whenever it can, this type will never fail. newtype SuccessList a = SuccessList { collectNonFailing :: [a] } deriving ( Eq, Ord, Show ) instance ChoiceVector SuccessList where spreadChoice = Right . SuccessList . (foldr unTagRight []) . collectNonFailing where unTagRight (Right x) = (x:) unTagRight _ = id -- | Like 'catMaybes', but for 'Either'. collectRights :: [Either _l r] -> [r] collectRights = collectNonFailing . untag . spreadChoice . SuccessList where untag = fromLeft (error "Unexpected Left") -- | A version of 'collectRights' generalized to other containers. The -- container must be both "reducible" and "buildable". Most general containers -- should fullfill these requirements, but there is no single typeclass -- (that I know of) for that. -- Therefore, they are split between 'Foldable' and 'MonadPlus'. -- (Note that 'Data.Traversable.Traversable' alone would not be enough, either.) collectRightsF :: (F.Foldable c, MonadPlus c) => c (Either _l r) -> c r collectRightsF = F.foldr unTagRight mzero where unTagRight (Right x) = mplus $ return x unTagRight _ = id �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/Generic/SetMap.hs���������������������������������������0000644�0000000�0000000�00000003125�13155240142�021531� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2015 Martin Linnemann <theCodingMarlin@googlemail.com> 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.Readers.Odt.Generic.SetMap Copyright : Copyright (C) 2015 Martin Linnemann License : GNU GPL, version 2 or above Maintainer : Martin Linnemann <theCodingMarlin@googlemail.com> Stability : alpha Portability : portable A map of values to sets of values. -} module Text.Pandoc.Readers.Odt.Generic.SetMap where import qualified Data.Map as M import qualified Data.Set as S type SetMap k v = M.Map k (S.Set v) empty :: SetMap k v empty = M.empty fromList :: (Ord k, Ord v) => [(k,v)] -> SetMap k v fromList = foldr (uncurry insert) empty insert :: (Ord k, Ord v) => k -> v -> SetMap k v -> SetMap k v insert key value setMap = M.insertWith S.union key (S.singleton value) setMap union3 :: (Ord k) => SetMap k v -> SetMap k v -> SetMap k v -> SetMap k v union3 sm1 sm2 sm3 = sm1 `M.union` sm2 `M.union` sm3 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/Generic/Utils.hs����������������������������������������0000644�0000000�0000000�00000013740�13155240142�021444� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE TypeOperators #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ViewPatterns #-} {- Copyright (C) 2015 Martin Linnemann <theCodingMarlin@googlemail.com> 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.Reader.Odt.Generic.Utils Copyright : Copyright (C) 2015 Martin Linnemann License : GNU GPL, version 2 or above Maintainer : Martin Linnemann <theCodingMarlin@googlemail.com> Stability : alpha Portability : portable General utility functions for the odt reader. -} module Text.Pandoc.Readers.Odt.Generic.Utils ( uncurry3 , uncurry4 , uncurry5 , uncurry6 , uncurry7 , uncurry8 , swap , reverseComposition , bool , tryToRead , Lookupable(..) , readLookupables , readLookupable , readPercent , findBy , swing , composition ) where import Control.Category ( Category, (>>>), (<<<) ) import qualified Control.Category as Cat ( id ) import Control.Monad ( msum ) import qualified Data.Foldable as F ( Foldable, foldr ) import Data.Maybe -- | Aequivalent to -- > foldr (.) id -- where '(.)' are 'id' are the ones from "Control.Category" -- and 'foldr' is the one from "Data.Foldable". -- The noun-form was chosen to be consistend with 'sum', 'product' etc -- based on the discussion at -- <https://groups.google.com/forum/#!topic/haskell-cafe/VkOZM1zaHOI> -- (that I was not part of) composition :: (Category cat, F.Foldable f) => f (cat a a) -> cat a a composition = F.foldr (<<<) Cat.id -- | Aequivalent to -- > foldr (flip (.)) id -- where '(.)' are 'id' are the ones from "Control.Category" -- and 'foldr' is the one from "Data.Foldable". -- A reversed version of 'composition'. reverseComposition :: (Category cat, F.Foldable f) => f (cat a a) -> cat a a reverseComposition = F.foldr (>>>) Cat.id -- | 'Either' has 'either', 'Maybe' has 'maybe'. 'Bool' should have 'bool'. -- Note that the first value is selected if the boolean value is 'False'. -- That makes 'bool' consistent with the other two. Also, 'bool' now takes its -- arguments in the exact opposite order compared to the normal if construct. bool :: a -> a -> Bool -> a bool x _ False = x bool _ x True = x -- | This function often makes it possible to switch values with the functions -- that are applied to them. -- -- Examples: -- > swing map :: [a -> b] -> a -> [b] -- > swing any :: [a -> Bool] -> a -> Bool -- > swing foldr :: b -> a -> [a -> b -> b] -> b -- > swing scanr :: c -> a -> [a -> c -> c] -> c -- > swing zipWith :: [a -> b -> c] -> a -> [b] -> [c] -- > swing find :: [a -> Bool] -> a -> Maybe (a -> Bool) -- -- Stolen from <https://wiki.haskell.org/Pointfree> swing :: (((a -> b) -> b) -> c -> d) -> c -> a -> d swing = flip.(.flip id) -- swing f c a = f ($ a) c -- | Alternative to 'read'/'reads'. The former of these throws errors -- (nobody wants that) while the latter returns "to much" for simple purposes. -- This function instead applies 'reads' and returns the first match (if any) -- in a 'Maybe'. tryToRead :: (Read r) => String -> Maybe r tryToRead = reads >>> listToMaybe >>> fmap fst -- | A version of 'reads' that requires a '%' sign after the number readPercent :: ReadS Int readPercent s = [ (i,s') | (i , r ) <- reads s , ("%" , s') <- lex r ] -- | Data that can be looked up. -- This is mostly a utility to read data with kind *. class Lookupable a where lookupTable :: [(String, a)] -- | The idea is to use this function as if there was a declaration like -- -- > instance (Lookupable a) => (Read a) where -- > readsPrec _ = readLookupables -- . -- But including this code in this form would need UndecideableInstances. -- That is a bad idea. Luckily 'readLookupable' (without the s at the end) -- can be used directly in almost any case. readLookupables :: (Lookupable a) => String -> [(a,String)] readLookupables s = [ (a,rest) | (word,rest) <- lex s, let result = lookup word lookupTable, isJust result, let Just a = result ] -- | Very similar to a simple 'lookup' in the 'lookupTable', but with a lexer. readLookupable :: (Lookupable a) => String -> Maybe a readLookupable s = msum $ map ((`lookup` lookupTable).fst) $ lex s uncurry3 :: (a->b->c -> z) -> (a,b,c ) -> z uncurry4 :: (a->b->c->d -> z) -> (a,b,c,d ) -> z uncurry5 :: (a->b->c->d->e -> z) -> (a,b,c,d,e ) -> z uncurry6 :: (a->b->c->d->e->f -> z) -> (a,b,c,d,e,f ) -> z uncurry7 :: (a->b->c->d->e->f->g -> z) -> (a,b,c,d,e,f,g ) -> z uncurry8 :: (a->b->c->d->e->f->g->h -> z) -> (a,b,c,d,e,f,g,h) -> z uncurry3 fun (a,b,c ) = fun a b c uncurry4 fun (a,b,c,d ) = fun a b c d uncurry5 fun (a,b,c,d,e ) = fun a b c d e uncurry6 fun (a,b,c,d,e,f ) = fun a b c d e f uncurry7 fun (a,b,c,d,e,f,g ) = fun a b c d e f g uncurry8 fun (a,b,c,d,e,f,g,h) = fun a b c d e f g h swap :: (a,b) -> (b,a) swap (a,b) = (b,a) -- | A version of "Data.List.find" that uses a converter to a Maybe instance. -- The returned value is the first which the converter returns in a 'Just' -- wrapper. findBy :: (a -> Maybe b) -> [a] -> Maybe b findBy _ [] = Nothing findBy f ((f -> Just x):_ ) = Just x findBy f ( _:xs) = findBy f xs ��������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/Generic/Namespaces.hs�����������������������������������0000644�0000000�0000000�00000004336�13155240142�022424� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2015 Martin Linnemann <theCodingMarlin@googlemail.com> 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.Readers.Odt.Generic.Namespaces Copyright : Copyright (C) 2015 Martin Linnemann License : GNU GPL, version 2 or above Maintainer : Martin Linnemann <theCodingMarlin@googlemail.com> Stability : alpha Portability : portable A class containing a set of namespace identifiers. Used to convert between typesafe Haskell namespace identifiers and unsafe "real world" namespaces. -} module Text.Pandoc.Readers.Odt.Generic.Namespaces where import qualified Data.Map as M -- type NameSpaceIRI = String -- type NameSpaceIRIs nsID = M.Map nsID NameSpaceIRI -- class (Eq nsID, Ord nsID) => NameSpaceID nsID where -- | Given a IRI, possibly update the map and return the id of the namespace. -- May fail if the namespace is unknown and the application does not -- allow unknown namespaces. getNamespaceID :: NameSpaceIRI -> NameSpaceIRIs nsID -> Maybe (NameSpaceIRIs nsID, nsID) -- | Given a namespace id, lookup its IRI. May be overriden for performance. getIRI :: nsID -> NameSpaceIRIs nsID -> Maybe NameSpaceIRI -- | The root element of an XML document has a namespace, too, and the -- "XML.Light-parser" is eager to remove the corresponding namespace -- attribute. -- As a result, at least this root namespace must be provided. getInitialIRImap :: NameSpaceIRIs nsID getIRI = M.lookup getInitialIRImap = M.empty ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs���������������������������������0000644�0000000�0000000�00000126641�13155240142�022701� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE Arrows #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE RecordWildCards #-} {- Copyright (C) 2015 Martin Linnemann <theCodingMarlin@googlemail.com> 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.Readers.Odt.Generic.XMLConverter Copyright : Copyright (C) 2015 Martin Linnemann License : GNU GPL, version 2 or above Maintainer : Martin Linnemann <theCodingMarlin@googlemail.com> Stability : alpha Portability : portable A generalized XML parser based on stateful arrows. It might be sufficient to define this reader as a comonad, but there is not a lot of use in trying. -} module Text.Pandoc.Readers.Odt.Generic.XMLConverter ( ElementName , XMLConverterState , XMLConverter , FallibleXMLConverter , swapPosition , runConverter , runConverter'' , runConverter' , runConverterF' , runConverterF , getCurrentElement , getExtraState , setExtraState , modifyExtraState , convertingExtraState , producingExtraState , lookupNSiri , lookupNSprefix , readNSattributes , elemName , elemNameIs , strContent , elContent , currentElem , currentElemIs , expectElement , elChildren , findChildren , filterChildren , filterChildrenName , findChild' , findChild , filterChild' , filterChild , filterChildName' , filterChildName , isSet , isSet' , isSetWithDefault , hasAttrValueOf' , failIfNotAttrValueOf , isThatTheAttrValue , searchAttrIn , searchAttrWith , searchAttr , lookupAttr , lookupAttr' , lookupAttrWithDefault , lookupDefaultingAttr , findAttr' , findAttr , findAttrWithDefault , readAttr , readAttr' , readAttrWithDefault , getAttr -- , (>/<) -- , (?>/<) , executeIn , collectEvery , withEveryL , withEvery , tryAll , tryAll' , IdXMLConverter , MaybeEConverter , ElementMatchConverter , MaybeCConverter , ContentMatchConverter , makeMatcherE , makeMatcherC , prepareMatchersE , prepareMatchersC , matchChildren , matchContent'' , matchContent' , matchContent ) where import Control.Applicative hiding ( liftA, liftA2 ) import Control.Monad ( MonadPlus ) import Control.Arrow import qualified Data.Map as M import qualified Data.Foldable as F import Data.Default import Data.Maybe import qualified Text.XML.Light as XML import Text.Pandoc.Readers.Odt.Arrows.State import Text.Pandoc.Readers.Odt.Arrows.Utils import Text.Pandoc.Readers.Odt.Generic.Namespaces import Text.Pandoc.Readers.Odt.Generic.Utils import Text.Pandoc.Readers.Odt.Generic.Fallible -------------------------------------------------------------------------------- -- Basis types for readability -------------------------------------------------------------------------------- -- type ElementName = String type AttributeName = String type AttributeValue = String -- type NameSpacePrefix = String -- type NameSpacePrefixes nsID = M.Map nsID NameSpacePrefix -------------------------------------------------------------------------------- -- Main converter state -------------------------------------------------------------------------------- -- GADT so some of the NameSpaceID restrictions can be deduced data XMLConverterState nsID extraState where XMLConverterState :: NameSpaceID nsID => { -- | A stack of parent elements. The top element is the current one. -- Arguably, a real Zipper would be better. But that is an -- optimization that can be made at a later time, e.g. when -- replacing Text.XML.Light. parentElements :: [XML.Element] -- | A map from internal namespace IDs to the namespace prefixes -- used in XML elements , namespacePrefixes :: NameSpacePrefixes nsID -- | A map from internal namespace IDs to namespace IRIs -- (Only necessary for matching namespace IDs and prefixes) , namespaceIRIs :: NameSpaceIRIs nsID -- | A place to put "something else". This feature is used heavily -- to keep the main code cleaner. More specifically, the main reader -- is divided into different stages. Each stage lifts something up -- here, which the next stage can then use. This could of course be -- generalized to a state-tree or used for the namespace IRIs. The -- border between states and values is an imaginary one, after all. -- But the separation as it is seems to be enough for now. , moreState :: extraState } -> XMLConverterState nsID extraState -- createStartState :: (NameSpaceID nsID) => XML.Element -> extraState -> XMLConverterState nsID extraState createStartState element extraState = XMLConverterState { parentElements = [element] , namespacePrefixes = M.empty , namespaceIRIs = getInitialIRImap , moreState = extraState } -- | Functor over extra state instance Functor (XMLConverterState nsID) where fmap f ( XMLConverterState parents prefixes iRIs extraState ) = XMLConverterState parents prefixes iRIs (f extraState) -- replaceExtraState :: extraState -> XMLConverterState nsID _x -> XMLConverterState nsID extraState replaceExtraState x s = fmap (const x) s -- currentElement :: XMLConverterState nsID extraState -> XML.Element currentElement state = head (parentElements state) -- | Replace the current position by another, modifying the extra state -- in the process swapPosition :: (extraState -> extraState') -> [XML.Element] -> XMLConverterState nsID extraState -> XMLConverterState nsID extraState' swapPosition f stack state = state { parentElements = stack , moreState = f (moreState state) } -- | Replace the current position by another, modifying the extra state -- in the process swapStack' :: XMLConverterState nsID extraState -> [XML.Element] -> ( XMLConverterState nsID extraState , [XML.Element] ) swapStack' state stack = ( state { parentElements = stack } , parentElements state ) -- pushElement :: XML.Element -> XMLConverterState nsID extraState -> XMLConverterState nsID extraState pushElement e state = state { parentElements = e:(parentElements state) } -- | Pop the top element from the call stack, unless it is the last one. popElement :: XMLConverterState nsID extraState -> Maybe (XMLConverterState nsID extraState) popElement state | _:es@(_:_) <- parentElements state = Just $ state { parentElements = es } | otherwise = Nothing -------------------------------------------------------------------------------- -- Main type -------------------------------------------------------------------------------- -- It might be a good idea to pack the converters in a GADT -- Downside: data instead of type -- Upside: 'Failure' could be made a parameter as well. -- type XMLConverter nsID extraState input output = ArrowState (XMLConverterState nsID extraState ) input output type FallibleXMLConverter nsID extraState input output = XMLConverter nsID extraState input (Fallible output) -- runConverter :: XMLConverter nsID extraState input output -> XMLConverterState nsID extraState -> input -> output runConverter converter state input = snd $ runArrowState converter (state,input) -- runConverter'' :: (NameSpaceID nsID) => XMLConverter nsID extraState (Fallible ()) output -> extraState -> XML.Element -> output runConverter'' converter extraState element = runConverter (readNSattributes >>> converter) (createStartState element extraState) () runConverter' :: (NameSpaceID nsID) => FallibleXMLConverter nsID extraState () success -> extraState -> XML.Element -> Fallible success runConverter' converter extraState element = runConverter (readNSattributes >>? converter) (createStartState element extraState) () -- runConverterF' :: FallibleXMLConverter nsID extraState x y -> XMLConverterState nsID extraState -> Fallible x -> Fallible y runConverterF' a s e = runConverter (returnV e >>? a) s e -- runConverterF :: (NameSpaceID nsID) => FallibleXMLConverter nsID extraState XML.Element x -> extraState -> Fallible XML.Element -> Fallible x runConverterF a s = either failWith (\e -> runConverter a (createStartState e s) e) -- getCurrentElement :: XMLConverter nsID extraState x XML.Element getCurrentElement = extractFromState currentElement -- getExtraState :: XMLConverter nsID extraState x extraState getExtraState = extractFromState moreState -- setExtraState :: XMLConverter nsID extraState extraState extraState setExtraState = withState $ \state extra -> (replaceExtraState extra state , extra) -- | Lifts a function to the extra state. modifyExtraState :: (extraState -> extraState) -> XMLConverter nsID extraState x x modifyExtraState = modifyState.fmap -- | First sets the extra state to the new value. Then modifies the original -- extra state with a converter that uses the new state. Finally, the -- intermediate state is dropped and the extra state is lifted into the -- state as it was at the beginning of the function. -- As a result, exactly the extra state and nothing else is changed. -- The resulting converter even behaves like an identity converter on the -- value level. -- -- (The -ing form is meant to be mnemonic in a sequence of arrows as in -- convertingExtraState () converter >>> doOtherStuff) -- convertingExtraState :: extraState' -> FallibleXMLConverter nsID extraState' extraState extraState -> FallibleXMLConverter nsID extraState x x convertingExtraState v a = withSubStateF setVAsExtraState modifyWithA where setVAsExtraState = liftAsSuccess $ extractFromState id >>^ replaceExtraState v modifyWithA = keepingTheValue (moreState ^>> a) >>^ 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 -- intermediate state is dropped and the extra state is lifted into the -- state as it was at the beginning of the function. -- As a result, exactly the extra state and nothing else is changed. -- The resulting converter even behaves like an identity converter on the -- value level. -- -- Aequivalent to -- -- > \v x a -> convertingExtraState v (returnV x >>> a) -- -- (The -ing form is meant to be mnemonic in a sequence of arrows as in -- producingExtraState () () producer >>> doOtherStuff) -- producingExtraState :: extraState' -> a -> FallibleXMLConverter nsID extraState' a extraState -> FallibleXMLConverter nsID extraState x x producingExtraState v x a = convertingExtraState v (returnV x >>> a) -------------------------------------------------------------------------------- -- Work in namespaces -------------------------------------------------------------------------------- -- | Arrow version of 'getIRI' lookupNSiri :: (NameSpaceID nsID) => nsID -> XMLConverter nsID extraState x (Maybe NameSpaceIRI) lookupNSiri nsID = extractFromState $ \state -> getIRI nsID $ namespaceIRIs state -- lookupNSprefix :: (NameSpaceID nsID) => nsID -> XMLConverter nsID extraState x (Maybe NameSpacePrefix) lookupNSprefix nsID = extractFromState $ \state -> M.lookup nsID $ namespacePrefixes state -- | Extracts namespace attributes from the current element and tries to -- update the current mapping accordingly readNSattributes :: (NameSpaceID nsID) => FallibleXMLConverter nsID extraState x () readNSattributes = fromState $ \state -> maybe (state, failEmpty ) ( , succeedWith ()) (extractNSAttrs state ) where extractNSAttrs :: (NameSpaceID nsID) => XMLConverterState nsID extraState -> Maybe (XMLConverterState nsID extraState) extractNSAttrs startState = foldl (\state d -> state >>= addNS d) (Just startState) nsAttribs where nsAttribs = mapMaybe readNSattr (XML.elAttribs element) element = currentElement startState readNSattr (XML.Attr (XML.QName name _ (Just "xmlns")) iri) = Just (name, iri) readNSattr _ = Nothing addNS (prefix, iri) state = fmap updateState $ getNamespaceID iri $ namespaceIRIs state where updateState (iris,nsID) = state { namespaceIRIs = iris , namespacePrefixes = M.insert nsID prefix $ namespacePrefixes state } -------------------------------------------------------------------------------- -- Common namespace accessors -------------------------------------------------------------------------------- -- | Given a namespace id and an element name, creates a 'XML.QName' for -- internal use elemName :: (NameSpaceID nsID) => nsID -> ElementName -> XMLConverter nsID extraState x XML.QName elemName nsID name = lookupNSiri nsID &&& lookupNSprefix nsID >>% 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 where hasThatName e iri = let elName = XML.elName e in XML.qName elName == name && XML.qURI elName == iri -------------------------------------------------------------------------------- -- General content -------------------------------------------------------------------------------- -- strContent :: XMLConverter nsID extraState x String strContent = getCurrentElement >>^ XML.strContent -- elContent :: XMLConverter nsID extraState x [XML.Content] elContent = getCurrentElement >>^ XML.elContent -------------------------------------------------------------------------------- -- Current element -------------------------------------------------------------------------------- -- currentElem :: XMLConverter nsID extraState x (XML.QName) currentElem = getCurrentElement >>^ XML.elName currentElemIs :: (NameSpaceID nsID) => nsID -> ElementName -> XMLConverter nsID extraState x Bool currentElemIs nsID name = getCurrentElement >>> elemNameIs nsID name {- currentElemIs'' nsID name = ( (getCurrentElement >>^ XML.elName >>> (XML.qName >>^ (&&).(== name) ) ^&&&^ (XML.qIRI >>^ (==) ) ) >>% (.) ) &&& lookupNSiri nsID >>% ($) -} -- expectElement :: (NameSpaceID nsID) => nsID -> ElementName -> FallibleXMLConverter nsID extraState x () expectElement nsID name = currentElemIs nsID name >>^ boolToChoice -------------------------------------------------------------------------------- -- Chilren -------------------------------------------------------------------------------- -- elChildren :: XMLConverter nsID extraState x [XML.Element] elChildren = getCurrentElement >>^ XML.elChildren -- findChildren :: (NameSpaceID nsID) => nsID -> ElementName -> XMLConverter nsID extraState x [XML.Element] findChildren nsID name = elemName nsID name &&& getCurrentElement >>% XML.findChildren -- filterChildren :: (XML.Element -> Bool) -> XMLConverter nsID extraState x [XML.Element] filterChildren p = getCurrentElement >>^ XML.filterChildren p -- filterChildrenName :: (XML.QName -> Bool) -> XMLConverter nsID extraState x [XML.Element] filterChildrenName p = getCurrentElement >>^ XML.filterChildrenName p -- findChild' :: (NameSpaceID nsID) => nsID -> ElementName -> XMLConverter nsID extraState x (Maybe XML.Element) findChild' nsID name = elemName nsID name &&& getCurrentElement >>% XML.findChild -- findChild :: (NameSpaceID nsID) => nsID -> ElementName -> FallibleXMLConverter nsID extraState x XML.Element findChild nsID name = findChild' nsID name >>> maybeToChoice -- filterChild' :: (XML.Element -> Bool) -> XMLConverter nsID extraState x (Maybe XML.Element) filterChild' p = getCurrentElement >>^ XML.filterChild p -- filterChild :: (XML.Element -> Bool) -> FallibleXMLConverter nsID extraState x XML.Element filterChild p = filterChild' p >>> maybeToChoice -- filterChildName' :: (XML.QName -> Bool) -> XMLConverter nsID extraState x (Maybe XML.Element) filterChildName' p = getCurrentElement >>^ XML.filterChildName p -- filterChildName :: (XML.QName -> Bool) -> FallibleXMLConverter nsID extraState x XML.Element filterChildName p = filterChildName' p >>> maybeToChoice -------------------------------------------------------------------------------- -- Attributes -------------------------------------------------------------------------------- -- isSet :: (NameSpaceID nsID) => nsID -> AttributeName -> (Either Failure Bool) -> FallibleXMLConverter nsID extraState x Bool isSet nsID attrName deflt = findAttr' nsID attrName >>^ maybe deflt stringToBool -- isSet' :: (NameSpaceID nsID) => nsID -> AttributeName -> XMLConverter nsID extraState x (Maybe Bool) isSet' nsID attrName = findAttr' nsID attrName >>^ (>>= stringToBool') isSetWithDefault :: (NameSpaceID nsID) => nsID -> AttributeName -> Bool -> XMLConverter nsID extraState x Bool isSetWithDefault nsID attrName def' = isSet' nsID attrName >>^ fromMaybe def' -- hasAttrValueOf' :: (NameSpaceID nsID) => nsID -> AttributeName -> AttributeValue -> XMLConverter nsID extraState x Bool hasAttrValueOf' nsID attrName attrValue = findAttr nsID attrName >>> ( const False ^|||^ (==attrValue)) -- failIfNotAttrValueOf :: (NameSpaceID nsID) => nsID -> AttributeName -> AttributeValue -> FallibleXMLConverter nsID extraState x () failIfNotAttrValueOf nsID attrName attrValue = hasAttrValueOf' nsID attrName attrValue >>^ boolToChoice -- | Is the value that is currently transported in the arrow the value of -- the specified attribute? isThatTheAttrValue :: (NameSpaceID nsID) => nsID -> AttributeName -> FallibleXMLConverter nsID extraState AttributeValue Bool isThatTheAttrValue nsID attrName = keepingTheValue (findAttr nsID attrName) >>% right.(==) -- | Lookup value in a dictionary, fail if no attribute found or value -- not in dictionary searchAttrIn :: (NameSpaceID nsID) => nsID -> AttributeName -> [(AttributeValue,a)] -> FallibleXMLConverter nsID extraState x a searchAttrIn nsID attrName dict = findAttr nsID attrName >>?^? maybeToChoice.(`lookup` dict ) -- | Lookup value in a dictionary. Fail if no attribute found. If value not in -- dictionary, return default value searchAttrWith :: (NameSpaceID nsID) => nsID -> AttributeName -> a -> [(AttributeValue,a)] -> FallibleXMLConverter nsID extraState x a searchAttrWith nsID attrName defV dict = findAttr nsID attrName >>?^ (fromMaybe defV).(`lookup` dict ) -- | Lookup value in a dictionary. If attribute or value not found, -- return default value searchAttr :: (NameSpaceID nsID) => nsID -> AttributeName -> a -> [(AttributeValue,a)] -> XMLConverter nsID extraState x a searchAttr nsID attrName defV dict = searchAttrIn nsID attrName dict >>> const defV ^|||^ id -- | Read a 'Lookupable' attribute. Fail if no match. lookupAttr :: (NameSpaceID nsID, Lookupable a) => nsID -> AttributeName -> FallibleXMLConverter nsID extraState x a lookupAttr nsID attrName = lookupAttr' nsID attrName >>^ maybeToChoice -- | Read a 'Lookupable' attribute. Return the result as a 'Maybe'. lookupAttr' :: (NameSpaceID nsID, Lookupable a) => nsID -> AttributeName -> XMLConverter nsID extraState x (Maybe a) lookupAttr' nsID attrName = findAttr' nsID attrName >>^ (>>= readLookupable) -- | Read a 'Lookupable' attribute with explicit default lookupAttrWithDefault :: (NameSpaceID nsID, Lookupable a) => nsID -> AttributeName -> a -> XMLConverter nsID extraState x a lookupAttrWithDefault nsID attrName deflt = lookupAttr' nsID attrName >>^ fromMaybe deflt -- | Read a 'Lookupable' attribute with implicit default lookupDefaultingAttr :: (NameSpaceID nsID, Lookupable a, Default a) => nsID -> AttributeName -> XMLConverter nsID extraState x a lookupDefaultingAttr nsID attrName = lookupAttrWithDefault nsID attrName def -- | Return value as a (Maybe String) findAttr' :: (NameSpaceID nsID) => nsID -> AttributeName -> XMLConverter nsID extraState x (Maybe AttributeValue) findAttr' nsID attrName = elemName nsID attrName &&& getCurrentElement >>% XML.findAttr -- | Return value as string or fail findAttr :: (NameSpaceID nsID) => nsID -> AttributeName -> FallibleXMLConverter nsID extraState x AttributeValue findAttr nsID attrName = findAttr' nsID attrName >>> maybeToChoice -- | Return value as string or return provided default value findAttrWithDefault :: (NameSpaceID nsID) => nsID -> AttributeName -> AttributeValue -> XMLConverter nsID extraState x AttributeValue findAttrWithDefault nsID attrName deflt = findAttr' nsID attrName >>^ fromMaybe deflt -- | Read and return value or fail readAttr :: (NameSpaceID nsID, Read attrValue) => nsID -> AttributeName -> FallibleXMLConverter nsID extraState x attrValue readAttr nsID attrName = readAttr' nsID attrName >>> maybeToChoice -- | Read and return value or return Nothing readAttr' :: (NameSpaceID nsID, Read attrValue) => nsID -> AttributeName -> XMLConverter nsID extraState x (Maybe attrValue) readAttr' nsID attrName = findAttr' nsID attrName >>^ (>>= tryToRead) -- | Read and return value or return provided default value readAttrWithDefault :: (NameSpaceID nsID, Read attrValue) => nsID -> AttributeName -> attrValue -> XMLConverter nsID extraState x attrValue readAttrWithDefault nsID attrName deflt = findAttr' nsID attrName >>^ (>>= tryToRead) >>^ fromMaybe deflt -- | Read and return value or return default value from 'Default' instance getAttr :: (NameSpaceID nsID, Read attrValue, Default attrValue) => nsID -> AttributeName -> XMLConverter nsID extraState x attrValue getAttr nsID attrName = readAttrWithDefault nsID attrName def -------------------------------------------------------------------------------- -- Movements -------------------------------------------------------------------------------- -- jumpThere :: XMLConverter nsID extraState XML.Element XML.Element jumpThere = withState (\state element -> ( pushElement element state , element ) ) -- swapStack :: XMLConverter nsID extraState [XML.Element] [XML.Element] swapStack = withState swapStack' -- jumpBack :: FallibleXMLConverter nsID extraState _x _x jumpBack = tryModifyState (popElement >>> maybeToChoice) -- | Support function for "procedural" converters: jump to an element, execute -- a converter, jump back. -- This version is safer than 'executeThere', because it does not rely on the -- internal stack. As a result, the converter can not move around in arbitrary -- ways. The downside is of course that some of the environment is not -- accessible to the converter. switchingTheStack :: XMLConverter nsID moreState a b -> XMLConverter nsID moreState (a, XML.Element) b switchingTheStack a = second ( (:[]) ^>> swapStack ) >>> first a >>> second swapStack >>^ fst -- | Support function for "procedural" converters: jumps to an element, executes -- a converter, jumps back. -- Make sure that the converter is well-behaved; that is it should -- return to the exact position it started from in /every possible path/ of -- execution, even if it "fails". If it does not, you may encounter -- strange bugs. If you are not sure about the behaviour or want to use -- shortcuts, you can often use 'switchingTheStack' instead. executeThere :: FallibleXMLConverter nsID moreState a b -> FallibleXMLConverter nsID moreState (a, XML.Element) b executeThere a = second jumpThere >>> fst ^>> a >>> jumpBack -- >>? jumpBack would not ensure the jump. >>^ collapseEither -- | Do something in a sub-element, tnen come back executeIn :: (NameSpaceID nsID) => nsID -> ElementName -> FallibleXMLConverter nsID extraState f s -> FallibleXMLConverter nsID extraState f s executeIn nsID name a = keepingTheValue (findChild nsID name) >>> ignoringState liftFailure >>? switchingTheStack a where liftFailure (_, (Left f)) = Left f liftFailure (x, (Right e)) = Right (x, e) -------------------------------------------------------------------------------- -- Iterating over children -------------------------------------------------------------------------------- -- Helper converter to prepare different types of iterations. -- It lifts the children (of a certain type) of the current element -- into the value level and pairs each one with the current input value. prepareIteration :: (NameSpaceID nsID) => nsID -> ElementName -> XMLConverter nsID extraState b [(b, XML.Element)] prepareIteration nsID name = keepingTheValue (findChildren nsID name) >>% distributeValue -- | Applies a converter to every child element of a specific type. -- Collects results in a 'Monoid'. -- Fails completely if any conversion fails. collectEvery :: (NameSpaceID nsID, Monoid m) => nsID -> ElementName -> FallibleXMLConverter nsID extraState a m -> FallibleXMLConverter nsID extraState a m collectEvery nsID name a = prepareIteration nsID name >>> foldS' (switchingTheStack a) -- withEveryL :: (NameSpaceID nsID) => nsID -> ElementName -> FallibleXMLConverter nsID extraState a b -> FallibleXMLConverter nsID extraState a [b] withEveryL = withEvery -- | Applies a converter to every child element of a specific type. -- Collects results in a 'MonadPlus'. -- Fails completely if any conversion fails. withEvery :: (NameSpaceID nsID, MonadPlus m) => nsID -> ElementName -> FallibleXMLConverter nsID extraState a b -> FallibleXMLConverter nsID extraState a (m b) withEvery nsID name a = prepareIteration nsID name >>> iterateS' (switchingTheStack a) -- | Applies a converter to every child element of a specific type. -- Collects all successful results in a list. tryAll :: (NameSpaceID nsID) => nsID -> ElementName -> FallibleXMLConverter nsID extraState b a -> XMLConverter nsID extraState b [a] tryAll nsID name a = prepareIteration nsID name >>> iterateS (switchingTheStack a) >>^ collectRights -- | Applies a converter to every child element of a specific type. -- Collects all successful results. tryAll' :: (NameSpaceID nsID, F.Foldable c, MonadPlus c) => nsID -> ElementName -> FallibleXMLConverter nsID extraState b a -> XMLConverter nsID extraState b (c a) tryAll' nsID name a = prepareIteration nsID name >>> iterateS (switchingTheStack a) >>^ collectRightsF -------------------------------------------------------------------------------- -- Matching children -------------------------------------------------------------------------------- type IdXMLConverter nsID moreState x = XMLConverter nsID moreState x x type MaybeEConverter nsID moreState x = Maybe (IdXMLConverter nsID moreState (x, XML.Element)) -- Chainable converter that helps deciding which converter to actually use. type ElementMatchConverter nsID extraState x = IdXMLConverter nsID extraState (MaybeEConverter nsID extraState x, XML.Element) type MaybeCConverter nsID moreState x = Maybe (IdXMLConverter nsID moreState (x, XML.Content)) -- Chainable converter that helps deciding which converter to actually use. type ContentMatchConverter nsID extraState x = IdXMLConverter nsID extraState (MaybeCConverter nsID extraState x, XML.Content) -- Helper function: The @c@ is actually a converter that is to be selected by -- matching XML elements to the first two parameters. -- The fold used to match elements however is very simple, so to use it, -- this function wraps the converter in another converter that unifies -- the accumulator. Think of a lot of converters with the resulting type -- chained together. The accumulator not only transports the element -- unchanged to the next matcher, it also does the actual selecting by -- combining the intermediate results with '(<|>)'. makeMatcherE :: (NameSpaceID nsID) => nsID -> ElementName -> FallibleXMLConverter nsID extraState a a -> ElementMatchConverter nsID extraState a makeMatcherE nsID name c = ( second ( elemNameIs nsID name >>^ bool Nothing (Just tryC) ) >>% (<|>) ) &&&^ 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. -- The fold used to match elements however is very simple, so to use it, -- this function wraps the converter in another converter that unifies -- the accumulator. Think of a lot of converters with the resulting type -- chained together. The accumulator not only transports the element -- unchanged to the next matcher, it also does the actual selecting by -- combining the intermediate results with '(<|>)'. makeMatcherC :: (NameSpaceID nsID) => nsID -> ElementName -> FallibleXMLConverter nsID extraState a a -> ContentMatchConverter nsID extraState a makeMatcherC nsID name c = ( second ( contentToElem >>> returnV Nothing ||| ( elemNameIs nsID name >>^ bool Nothing (Just cWithJump) ) ) >>% (<|>) ) &&&^ snd where cWithJump = ( fst ^&&& ( second contentToElem >>> spreadChoice ^>>? executeThere c ) >>% recover) &&&^ snd contentToElem :: FallibleXMLConverter nsID extraState XML.Content XML.Element contentToElem = arr $ \e -> case e of XML.Elem e' -> succeedWith e' _ -> failEmpty -- Creates and chains a bunch of matchers prepareMatchersE :: (NameSpaceID nsID) => [(nsID, ElementName, FallibleXMLConverter nsID extraState x x)] -> ElementMatchConverter nsID extraState x --prepareMatchersE = foldSs . (map $ uncurry3 makeMatcherE) prepareMatchersE = reverseComposition . (map $ uncurry3 makeMatcherE) -- Creates and chains a bunch of matchers prepareMatchersC :: (NameSpaceID nsID) => [(nsID, ElementName, FallibleXMLConverter nsID extraState x x)] -> ContentMatchConverter nsID extraState x --prepareMatchersC = foldSs . (map $ uncurry3 makeMatcherC) prepareMatchersC = reverseComposition . (map $ uncurry3 makeMatcherC) -- | Takes a list of element-data - converter groups and -- * Finds all children of the current element -- * Matches each group to each child in order (at most one group per child) -- * Filters non-matched children -- * Chains all found converters in child-order -- * Applies the chain to the input element matchChildren :: (NameSpaceID nsID) => [(nsID, ElementName, FallibleXMLConverter nsID extraState a a)] -> XMLConverter nsID extraState a a matchChildren lookups = let matcher = prepareMatchersE lookups in keepingTheValue ( elChildren >>> map (Nothing,) ^>> iterateSL matcher >>^ catMaybes.map (\(m,e) -> fmap (swallowElem e) m) -- >>> foldSs >>> reverseComposition ) >>> swap ^>> app where -- let the converter swallow the element and drop the element -- in the return value swallowElem element converter = (,element) ^>> converter >>^ fst -- matchContent'' :: (NameSpaceID nsID) => [(nsID, ElementName, FallibleXMLConverter nsID extraState a a)] -> XMLConverter nsID extraState a a matchContent'' lookups = let matcher = prepareMatchersC lookups in keepingTheValue ( elContent >>> map (Nothing,) ^>> iterateSL matcher >>^ catMaybes.map (\(m,c) -> fmap (swallowContent c) m) -- >>> foldSs >>> reverseComposition ) >>> swap ^>> app where -- let the converter swallow the content and drop the content -- in the return value swallowContent content converter = (,content) ^>> converter >>^ fst -- | Takes a list of element-data - converter groups and -- * Finds all content of the current element -- * Matches each group to each piece of content in order -- (at most one group per piece of content) -- * Filters non-matched content -- * Chains all found converters in content-order -- * Applies the chain to the input element matchContent' :: (NameSpaceID nsID) => [(nsID, ElementName, FallibleXMLConverter nsID extraState a a)] -> XMLConverter nsID extraState a a matchContent' lookups = matchContent lookups (arr fst) -- | Takes a list of element-data - converter groups and -- * Finds all content of the current element -- * Matches each group to each piece of content in order -- (at most one group per piece of content) -- * Adds a default converter for all non-matched content -- * Chains all found converters in content-order -- * Applies the chain to the input element matchContent :: (NameSpaceID nsID) => [(nsID, ElementName, FallibleXMLConverter nsID extraState a a)] -> XMLConverter nsID extraState (a,XML.Content) a -> XMLConverter nsID extraState a a matchContent lookups fallback = let matcher = prepareMatchersC lookups in keepingTheValue ( elContent >>> map (Nothing,) ^>> iterateSL matcher >>^ map swallowOrFallback -- >>> foldSs >>> reverseComposition ) >>> swap ^>> app where -- let the converter swallow the content and drop the content -- in the return value swallowOrFallback (Just converter,content) = (,content) ^>> converter >>^ fst swallowOrFallback (Nothing ,content) = (,content) ^>> fallback -------------------------------------------------------------------------------- -- Internals -------------------------------------------------------------------------------- stringToBool :: (Monoid failure) => String -> Either failure Bool stringToBool val -- stringToBool' val >>> maybeToChoice | val `elem` trueValues = succeedWith True | val `elem` falseValues = succeedWith False | otherwise = failEmpty where trueValues = ["true" ,"on" ,"1"] falseValues = ["false","off","0"] stringToBool' :: String -> Maybe Bool stringToBool' val | val `elem` trueValues = Just True | val `elem` falseValues = Just False | otherwise = Nothing where trueValues = ["true" ,"on" ,"1"] falseValues = ["false","off","0"] distributeValue :: a -> [b] -> [(a,b)] distributeValue = map.(,) -------------------------------------------------------------------------------- {- NOTES It might be a good idea to refactor the namespace stuff. E.g.: if a namespace constructor took a string as a parameter, things like > a ?>/< (NsText,"body") would be nicer. Together with a rename and some trickery, something like > |< NsText "body" >< NsText "p" ?> a </> </>| might even be possible. Some day, XML.Light should be replaced by something better. While doing that, it might be useful to replace String as the type of element names with something else, too. (Of course with OverloadedStrings). While doing that, maybe the types can be created in a way that something like > NsText:"body" could be used. Overloading (:) does not sounds like the best idea, but if the element name type was a list, this might be possible. Of course that would be a bit hackish, so the "right" way would probably be something like > InNS NsText "body" but isn't that a bit boring? ;) -} �����������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/Arrows/State.hs�����������������������������������������0000644�0000000�0000000�00000025341�13155240142�021325� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE Arrows #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE FlexibleInstances #-} {- Copyright (C) 2015 Martin Linnemann <theCodingMarlin@googlemail.com> 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.Readers.Odt.Arrows.State Copyright : Copyright (C) 2015 Martin Linnemann License : GNU GPL, version 2 or above Maintainer : Martin Linnemann <theCodingMarlin@googlemail.com> Stability : alpha Portability : portable An arrow that transports a state. It is in essence a more powerful version of the standard state monad. As it is such a simple extension, there are other version out there that do exactly the same. The implementation is duplicated, though, to add some useful features. Most of these might be implemented without access to innards, but it's much faster and easier to implement this way. -} module Text.Pandoc.Readers.Odt.Arrows.State where import Prelude hiding ( foldr, foldl ) import qualified Control.Category as Cat import Control.Arrow import Control.Monad import Data.Foldable import Data.Monoid import Text.Pandoc.Readers.Odt.Arrows.Utils import Text.Pandoc.Readers.Odt.Generic.Fallible newtype ArrowState state a b = ArrowState { runArrowState :: (state, a) -> (state, b) } -- | Constructor withState :: (state -> a -> (state, b)) -> ArrowState state a b withState = ArrowState . uncurry -- | Constructor withState' :: ((state, a) -> (state, b)) -> ArrowState state a b withState' = ArrowState -- | Constructor modifyState :: (state -> state ) -> ArrowState state a a modifyState = ArrowState . first -- | Constructor ignoringState :: ( a -> b ) -> ArrowState state a b ignoringState = ArrowState . second -- | Constructor fromState :: (state -> (state, b)) -> ArrowState state a b fromState = ArrowState . (.fst) -- | Constructor extractFromState :: (state -> b ) -> ArrowState state x b extractFromState f = ArrowState $ \(state,_) -> (state, f state) -- | Constructor withUnchangedState :: (state -> a -> b ) -> ArrowState state a b withUnchangedState f = ArrowState $ \(state,a) -> (state, f state a) -- | Constructor tryModifyState :: (state -> Either f state) -> ArrowState state a (Either f a) tryModifyState f = ArrowState $ \(state,a) -> (state,).Left ||| (,Right a) $ f state instance Cat.Category (ArrowState s) where id = ArrowState id arrow2 . arrow1 = ArrowState $ (runArrowState arrow2).(runArrowState arrow1) instance Arrow (ArrowState state) where arr = ignoringState first a = ArrowState $ \(s,(aF,aS)) -> second (,aS) $ runArrowState a (s,aF) second a = ArrowState $ \(s,(aF,aS)) -> second (aF,) $ runArrowState a (s,aS) instance ArrowChoice (ArrowState state) where left a = ArrowState $ \(s,e) -> case e of Left l -> second Left $ runArrowState a (s,l) Right r -> (s, Right r) right a = ArrowState $ \(s,e) -> case e of Left l -> (s, Left l) Right r -> second Right $ runArrowState a (s,r) instance ArrowLoop (ArrowState state) where loop a = ArrowState $ \(s, x) -> let (s', (x', _d)) = runArrowState a (s, (x, _d)) in (s', x') instance ArrowApply (ArrowState state) where app = ArrowState $ \(s, (f,b)) -> runArrowState f (s,b) -- | Embedding of a state arrow in a state arrow with a different state type. switchState :: (s -> s') -> (s' -> s) -> ArrowState s' x y -> ArrowState s x y switchState there back a = ArrowState $ first there >>> runArrowState a >>> first back -- | Lift a state arrow to modify the state of an arrow -- with a different state type. liftToState :: (s -> s') -> ArrowState s' s s -> ArrowState s x x liftToState unlift a = modifyState $ unlift &&& id >>> runArrowState a >>> snd -- | Switches the type of the state temporarily. -- Drops the intermediate result state, behaving like the identity arrow, -- save for side effects in the state. withSubState :: ArrowState s x s2 -> ArrowState s2 s s -> ArrowState s x x withSubState unlift a = keepingTheValue (withSubState unlift a) >>^ fst -- | Switches the type of the state temporarily. -- Returns the resulting sub-state. withSubState' :: ArrowState s x s' -> ArrowState s' s s -> ArrowState s x s' withSubState' unlift a = ArrowState $ runArrowState unlift >>> switch >>> runArrowState a >>> switch where switch (x,y) = (y,x) -- | Switches the type of the state temporarily. -- Drops the intermediate result state, behaving like a fallible -- identity arrow, save for side effects in the state. withSubStateF :: ArrowState s x (Either f s') -> ArrowState s' s (Either f s ) -> ArrowState s x (Either f x ) withSubStateF unlift a = keepingTheValue (withSubStateF' unlift a) >>^ spreadChoice >>^ fmap fst -- | Switches the type of the state temporarily. -- Returns the resulting sub-state. withSubStateF' :: ArrowState s x (Either f s') -> ArrowState s' s (Either f s ) -> ArrowState s x (Either f s') withSubStateF' unlift a = ArrowState go where go p@(s,_) = tryRunning unlift ( tryRunning a (second Right) ) p where tryRunning a' b v = case runArrowState a' v of (_ , Left f) -> (s, Left f) (x , Right y) -> b (y,x) -- | Fold a state arrow through something 'Foldable'. Collect the results -- in a 'Monoid'. -- Intermediate form of a fold between one with "only" a 'Monoid' -- and one with any function. foldS :: (Foldable f, Monoid m) => ArrowState s x m -> ArrowState s (f x) m foldS a = ArrowState $ \(s,f) -> foldr a' (s,mempty) f where a' x (s',m) = second (m <>) $ runArrowState a (s',x) -- | Fold a state arrow through something 'Foldable'. Collect the results -- in a 'Monoid'. -- Intermediate form of a fold between one with "only" a 'Monoid' -- and one with any function. foldSL :: (Foldable f, Monoid m) => ArrowState s x m -> ArrowState s (f x) m foldSL a = ArrowState $ \(s,f) -> foldl a' (s,mempty) f where a' (s',m) x = second (m <>) $ runArrowState a (s',x) -- | Fold a fallible state arrow through something 'Foldable'. Collect the -- results in a 'Monoid'. -- Intermediate form of a fold between one with "only" a 'Monoid' -- and one with any function. -- If the iteration fails, the state will be reset to the initial one. foldS' :: (Foldable f, Monoid m) => ArrowState s x (Either e m) -> ArrowState s (f x) (Either e m) foldS' a = ArrowState $ \(s,f) -> foldr (a' s) (s,Right mempty) f where a' s x (s',Right m) = case runArrowState a (s',x) of (s'',Right m') -> (s'', Right (m <> m')) (_ ,Left e ) -> (s , Left e) a' _ _ e = e -- | Fold a fallible state arrow through something 'Foldable'. Collect the -- results in a 'Monoid'. -- Intermediate form of a fold between one with "only" a 'Monoid' -- and one with any function. -- If the iteration fails, the state will be reset to the initial one. foldSL' :: (Foldable f, Monoid m) => ArrowState s x (Either e m) -> ArrowState s (f x) (Either e m) foldSL' a = ArrowState $ \(s,f) -> foldl (a' s) (s,Right mempty) f where a' s (s',Right m) x = case runArrowState a (s',x) of (s'',Right m') -> (s'', Right (m <> m')) (_ ,Left e ) -> (s , Left e) a' _ e _ = e -- | Fold a state arrow through something 'Foldable'. Collect the results in a -- 'MonadPlus'. iterateS :: (Foldable f, MonadPlus m) => ArrowState s x y -> ArrowState s (f x) (m y) iterateS a = ArrowState $ \(s,f) -> foldr a' (s,mzero) f where a' x (s',m) = second ((mplus m).return) $ runArrowState a (s',x) -- | Fold a state arrow through something 'Foldable'. Collect the results in a -- 'MonadPlus'. iterateSL :: (Foldable f, MonadPlus m) => ArrowState s x y -> ArrowState s (f x) (m y) iterateSL a = ArrowState $ \(s,f) -> foldl a' (s,mzero) f where a' (s',m) x = second ((mplus m).return) $ runArrowState a (s',x) -- | Fold a fallible state arrow through something 'Foldable'. -- Collect the results in a 'MonadPlus'. -- If the iteration fails, the state will be reset to the initial one. iterateS' :: (Foldable f, MonadPlus m) => ArrowState s x (Either e y ) -> ArrowState s (f x) (Either e (m y)) iterateS' a = ArrowState $ \(s,f) -> foldr (a' s) (s,Right mzero) f where a' s x (s',Right m) = case runArrowState a (s',x) of (s'',Right m') -> (s'',Right $ mplus m $ return m') (_ ,Left e ) -> (s ,Left e ) a' _ _ e = e -- | Fold a fallible state arrow through something 'Foldable'. -- Collect the results in a 'MonadPlus'. -- If the iteration fails, the state will be reset to the initial one. iterateSL' :: (Foldable f, MonadPlus m) => ArrowState s x (Either e y ) -> ArrowState s (f x) (Either e (m y)) iterateSL' a = ArrowState $ \(s,f) -> foldl (a' s) (s,Right mzero) f where a' s (s',Right m) x = case runArrowState a (s',x) of (s'',Right m') -> (s'',Right $ mplus m $ return m') (_ ,Left e ) -> (s ,Left e ) a' _ e _ = e �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs�����������������������������������������0000644�0000000�0000000�00000044453�13155240142�021352� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2015 Martin Linnemann <theCodingMarlin@googlemail.com> 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.Readers.Odt.Arrows.Utils Copyright : Copyright (C) 2015 Martin Linnemann License : GNU GPL, version 2 or above Maintainer : Martin Linnemann <theCodingMarlin@googlemail.com> Stability : alpha Portability : portable Utility functions for Arrows (Kleisli monads). Some general notes on notation: * "^" is meant to stand for a pure function that is lifted into an arrow based on its usage for that purpose in "Control.Arrow". * "?" is meant to stand for the usage of a 'FallibleArrow' or a pure function with an equivalent return value. * "_" stands for the dropping of a value. -} -- We export everything module Text.Pandoc.Readers.Odt.Arrows.Utils where import Control.Arrow import Control.Monad ( join, MonadPlus(..) ) import qualified Data.Foldable as F import Data.Monoid import Text.Pandoc.Readers.Odt.Generic.Fallible import Text.Pandoc.Readers.Odt.Generic.Utils and2 :: (Arrow a) => a b c -> a b c' -> a b (c,c') and2 = (&&&) and3 :: (Arrow a) => a b c0->a b c1->a b c2 -> a b (c0,c1,c2 ) and4 :: (Arrow a) => a b c0->a b c1->a b c2->a b c3 -> a b (c0,c1,c2,c3 ) and5 :: (Arrow a) => a b c0->a b c1->a b c2->a b c3->a b c4 -> a b (c0,c1,c2,c3,c4 ) and6 :: (Arrow a) => a b c0->a b c1->a b c2->a b c3->a b c4->a b c5 -> a b (c0,c1,c2,c3,c4,c5 ) and7 :: (Arrow a) => a b c0->a b c1->a b c2->a b c3->a b c4->a b c5->a b c6 -> a b (c0,c1,c2,c3,c4,c5,c6 ) and8 :: (Arrow a) => a b c0->a b c1->a b c2->a b c3->a b c4->a b c5->a b c6->a b c7 -> a b (c0,c1,c2,c3,c4,c5,c6,c7) and3 a b c = (and2 a b ) &&& c >>^ \((z,y ) , x) -> (z,y,x ) and4 a b c d = (and3 a b c ) &&& d >>^ \((z,y,x ) , w) -> (z,y,x,w ) and5 a b c d e = (and4 a b c d ) &&& e >>^ \((z,y,x,w ) , v) -> (z,y,x,w,v ) and6 a b c d e f = (and5 a b c d e ) &&& f >>^ \((z,y,x,w,v ) , u) -> (z,y,x,w,v,u ) and7 a b c d e f g = (and6 a b c d e f ) &&& g >>^ \((z,y,x,w,v,u ) , t) -> (z,y,x,w,v,u,t ) and8 a b c d e f g h = (and7 a b c d e f g) &&& h >>^ \((z,y,x,w,v,u,t) , s) -> (z,y,x,w,v,u,t,s) liftA2 :: (Arrow a) => (x -> y -> z) -> a b x -> a b y -> a b z liftA2 f a b = a &&& b >>^ uncurry f liftA3 :: (Arrow a) => (z->y->x -> r) -> a b z->a b y->a b x -> a b r liftA4 :: (Arrow a) => (z->y->x->w -> r) -> a b z->a b y->a b x->a b w -> a b r liftA5 :: (Arrow a) => (z->y->x->w->v -> r) -> a b z->a b y->a b x->a b w->a b v -> a b r liftA6 :: (Arrow a) => (z->y->x->w->v->u -> r) -> a b z->a b y->a b x->a b w->a b v->a b u -> a b r liftA7 :: (Arrow a) => (z->y->x->w->v->u->t -> r) -> a b z->a b y->a b x->a b w->a b v->a b u->a b t -> a b r liftA8 :: (Arrow a) => (z->y->x->w->v->u->t->s -> r) -> a b z->a b y->a b x->a b w->a b v->a b u->a b t->a b s -> a b r liftA3 fun a b c = and3 a b c >>^ uncurry3 fun liftA4 fun a b c d = and4 a b c d >>^ uncurry4 fun liftA5 fun a b c d e = and5 a b c d e >>^ uncurry5 fun liftA6 fun a b c d e f = and6 a b c d e f >>^ uncurry6 fun liftA7 fun a b c d e f g = and7 a b c d e f g >>^ uncurry7 fun liftA8 fun a b c d e f g h = and8 a b c d e f g h >>^ uncurry8 fun liftA :: (Arrow a) => (y -> z) -> a b y -> a b z liftA fun a = a >>^ fun -- | Duplicate a value to subsequently feed it into different arrows. -- Can almost always be replaced with '(&&&)', 'keepingTheValue', -- or even '(|||)'. -- Aequivalent to -- > returnA &&& returnA duplicate :: (Arrow a) => a b (b,b) duplicate = arr $ join (,) -- | Lifts the combination of two values into an arrow. 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.) (>>%) :: (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 (>>%) -- | Precomposition with an uncurried function (%>>) :: (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 (%>>) infixr 2 >>%, %<<, %>>, <<% -- | Duplicate a value and apply an arrow to the second instance. -- Aequivalent to -- > \a -> duplicate >>> second a -- or -- > \a -> returnA &&& a keepingTheValue :: (Arrow a) => a b c -> a b (b,c) keepingTheValue a = returnA &&& a -- | Duplicate a value and apply an arrow to the first instance. -- Aequivalent to -- > \a -> duplicate >>> first a -- or -- > \a -> a &&& returnA keepingTheValue' :: (Arrow a) => a b c -> a b (c,b) keepingTheValue' a = a &&& returnA -- | 'bind' from the "Maybe"-Monad lifted into an 'ArrowChoice'. -- Actually, it's the more complex '(>=>)', because 'bind' alone does not -- combine as nicely in arrow form. -- The current implementation is not the most efficient one, because it can -- not return directly if a 'Nothing' is encountered. That in turn follows -- from the type system, as 'Nothing' has an "invisible" type parameter that -- can not be dropped early. -- -- Also, there probably is a way to generalize this to other monads -- or applicatives, but I'm leaving that as an exercise to the reader. -- I have a feeling there is a new Arrow-typeclass to be found that is less -- restrictive than 'ArrowApply'. If it is already out there, -- I have not seen it yet. ('ArrowPlus' for example is not general enough.) (>>>=) :: (ArrowChoice a) => a x (Maybe b) -> a b (Maybe c) -> a x (Maybe c) a1 >>>= a2 = a1 >>> maybeToChoice >>> right a2 >>> choiceToMaybe >>^ join infixr 2 >>>= -- | 'mplus' Lifted into an arrow. No 'ArrowPlus' required. -- (But still different from a true bind) (>++<) :: (Arrow a, MonadPlus m) => a x (m b) -> a x (m b) -> a x (m b) (>++<) = liftA2 mplus -- | Left-compose with a pure function leftLift :: (ArrowChoice a) => (l -> l') -> a (Either l r) (Either l' r) leftLift = left.arr -- | Right-compose with a pure function rightLift :: (ArrowChoice a) => (r -> r') -> a (Either l r) (Either l r') rightLift = right.arr ( ^+++ ) :: (ArrowChoice a) => (b -> c) -> a b' c' -> a (Either b b') (Either c c') ( +++^ ) :: (ArrowChoice a) => a b c -> (b' -> c') -> a (Either b b') (Either c c') ( ^+++^ ) :: (ArrowChoice a) => (b -> c) -> (b' -> c') -> a (Either b b') (Either c c') l ^+++ r = leftLift l >>> right r l +++^ r = left l >>> rightLift r l ^+++^ r = leftLift l >>> rightLift r infixr 2 ^+++, +++^, ^+++^ ( ^||| ) :: (ArrowChoice a) => (b -> d) -> a c d -> a (Either b c) d ( |||^ ) :: (ArrowChoice a) => a b d -> (c -> d) -> a (Either b c) d ( ^|||^ ) :: (ArrowChoice a) => (b -> d) -> (c -> d) -> a (Either b c) d l ^||| r = arr l ||| r l |||^ r = l ||| arr r l ^|||^ r = arr l ||| arr r infixr 2 ^||| , |||^, ^|||^ ( ^&&& ) :: (Arrow a) => (b -> c) -> a b c' -> a b (c,c') ( &&&^ ) :: (Arrow a) => a b c -> (b -> c') -> a b (c,c') ( ^&&&^ ) :: (Arrow a) => (b -> c) -> (b -> c') -> a b (c,c') l ^&&& r = arr l &&& r l &&&^ r = l &&& arr r l ^&&&^ r = arr l &&& arr r infixr 3 ^&&&, &&&^, ^&&&^ ( ^*** ) :: (Arrow a) => (b -> c) -> a b' c' -> a (b,b') (c,c') ( ***^ ) :: (Arrow a) => a b c -> (b' -> c') -> a (b,b') (c,c') ( ^***^ ) :: (Arrow a) => (b -> c) -> (b' -> c') -> a (b,b') (c,c') l ^*** r = arr l *** r l ***^ r = l *** arr r l ^***^ r = arr l *** arr r infixr 3 ^***, ***^, ^***^ -- | A version of -- -- >>> \p -> arr (\x -> if p x the Right x else Left x) -- -- but with p being an arrow choose :: (ArrowChoice a) => a b Bool -> a b (Either b b) choose checkValue = keepingTheValue checkValue >>^ select where select (x,True ) = Right x select (x,False ) = Left x -- | Converts @Right a@ into @Just a@ and @Left _@ into @Nothing@. choiceToMaybe :: (ArrowChoice a) => a (Either l r) (Maybe r) choiceToMaybe = arr eitherToMaybe -- | Converts @Nothing@ into @Left ()@ and @Just a@ into @Right a@. maybeToChoice :: (ArrowChoice a) => a (Maybe b) (Fallible b) maybeToChoice = arr maybeToEither -- | Lifts a constant value into an arrow returnV :: (Arrow a) => c -> a x c returnV = arr.const -- | 'returnA' dropping everything returnA_ :: (Arrow a) => a _b () returnA_ = returnV () -- | Wrapper for an arrow that can be evaluated im parallel. All -- Arrows can be evaluated in parallel, as long as they return a -- monoid. newtype ParallelArrow a b c = CoEval { evalParallelArrow :: a b c } deriving (Eq, Ord, Show) instance (Arrow a, Monoid m) => Monoid (ParallelArrow a b m) where mempty = CoEval $ returnV mempty (CoEval a) `mappend` (CoEval ~b) = CoEval $ a &&& b >>% mappend -- | Evaluates a collection of arrows in a parallel fashion. -- -- This is in essence a fold of '(&&&)' over the collection, -- so the actual execution order and parallelity depends on the -- implementation of '(&&&)' in the arrow in question. -- The default implementation of '(&&&)' for example keeps the -- order as given in the collection. -- -- This function can be seen as a generalization of -- 'Control.Applicative.sequenceA' to arrows or as an alternative to -- a fold with 'Control.Applicative.WrappedArrow', which -- substitutes the monoid with function application. -- coEval :: (Arrow a, F.Foldable f, Monoid m) => f (a b m) -> a b m coEval = evalParallelArrow . (F.foldMap CoEval) -- | Defines Left as failure, Right as success type FallibleArrow a input failure success = a input (Either failure success) type ReFallibleArrow a failure success success' = FallibleArrow a (Either failure success) failure success' -- | Wrapper for fallible arrows. Fallible arrows are all arrows that return -- an Either value where left is a faliure and right is a success value. newtype AlternativeArrow a input failure success = TryArrow { evalAlternativeArrow :: FallibleArrow a input failure success } instance (ArrowChoice a, Monoid failure) => Monoid (AlternativeArrow a input failure success) where mempty = TryArrow $ returnV $ Left mempty (TryArrow a) `mappend` (TryArrow b) = TryArrow $ a &&& b >>^ \(a',~b') -> ( (\a'' -> left (mappend a'') b') ||| Right ) a' -- | Evaluates a collection of fallible arrows, trying each one in succession. -- Left values are interpreted as failures, right values as successes. -- -- The evaluation is stopped once an arrow succeeds. -- Up to that point, all failures are collected in the failure-monoid. -- Note that '()' is a monoid, and thus can serve as a failure-collector if -- you are uninterested in the exact failures. -- -- This is in essence a fold of '(&&&)' over the collection, enhanced with a -- little bit of repackaging, so the actual execution order depends on the -- implementation of '(&&&)' in the arrow in question. -- The default implementation of '(&&&)' for example keeps the -- order as given in the collection. -- tryArrows :: (ArrowChoice a, F.Foldable f, Monoid failure) => f (FallibleArrow a b failure success) -> FallibleArrow a b failure success tryArrows = evalAlternativeArrow . (F.foldMap TryArrow) -- liftSuccess :: (ArrowChoice a) => (success -> success') -> ReFallibleArrow a failure success success' liftSuccess = rightLift -- liftAsSuccess :: (ArrowChoice a) => a x success -> FallibleArrow a x failure success liftAsSuccess a = a >>^ Right -- asFallibleArrow :: (ArrowChoice a) => a x success -> FallibleArrow a x failure success asFallibleArrow a = a >>^ Right -- | Raises an error into a 'ReFallibleArrow' if the arrow is already in -- "error mode" liftError :: (ArrowChoice a, Monoid failure) => failure -> ReFallibleArrow a failure success success liftError e = leftLift (e <>) -- | Raises an error into a 'FallibleArrow', droping both the arrow input -- and any previously stored error value. _raiseA :: (ArrowChoice a) => failure -> FallibleArrow a x failure success _raiseA e = returnV (Left e) -- | Raises an empty error into a 'FallibleArrow', droping both the arrow input -- and any previously stored error value. _raiseAEmpty :: (ArrowChoice a, Monoid failure) => FallibleArrow a x failure success _raiseAEmpty = _raiseA mempty -- | Raises an error into a 'ReFallibleArrow', possibly appending the new error -- to an existing one raiseA :: (ArrowChoice a, Monoid failure) => failure -> ReFallibleArrow a failure success success raiseA e = arr $ Left.(either (<> e) (const e)) -- | Raises an empty error into a 'ReFallibleArrow'. If there already is an -- error, nothing changes. -- (Note that this function is only aequivalent to @raiseA mempty@ iff the -- failure monoid follows the monoid laws.) raiseAEmpty :: (ArrowChoice a, Monoid failure) => ReFallibleArrow a failure success success raiseAEmpty = arr (fromRight (const mempty) >>> Left) -- | Execute the second arrow if the first succeeds (>>?) :: (ArrowChoice a) => FallibleArrow a x failure success -> FallibleArrow a success failure success' -> FallibleArrow a x failure success' a >>? b = a >>> Left ^||| b -- | Execute the lifted second arrow if the first succeeds (>>?^) :: (ArrowChoice a) => FallibleArrow a x failure success -> (success -> success') -> FallibleArrow a x failure success' a >>?^ f = a >>^ Left ^|||^ Right . f -- | Execute the lifted second arrow if the first succeeds (>>?^?) :: (ArrowChoice a) => FallibleArrow a x failure success -> (success -> Either failure success') -> FallibleArrow a x failure success' a >>?^? b = a >>> Left ^|||^ b -- | Execute the second arrow if the lifted first arrow succeeds (^>>?) :: (ArrowChoice a) => (x -> Either failure success) -> FallibleArrow a success failure success' -> FallibleArrow a x failure success' a ^>>? b = a ^>> Left ^||| b -- | Execute the lifted second arrow if the lifted first arrow succeeds (^>>?^) :: (ArrowChoice a) => (x -> Either failure success) -> (success -> success') -> FallibleArrow a x failure success' a ^>>?^ f = arr $ a >>> right f -- | Execute the lifted second arrow if the lifted first arrow succeeds (^>>?^?) :: (ArrowChoice a) => (x -> Either failure success) -> (success -> Either failure success') -> FallibleArrow a x failure success' a ^>>?^? f = a ^>> Left ^|||^ f -- | Execute the second, non-fallible arrow if the first arrow succeeds (>>?!) :: (ArrowChoice a) => FallibleArrow a x failure success -> a success success' -> FallibleArrow a x failure success' a >>?! f = a >>> right f --- (>>?%) :: (ArrowChoice a) => FallibleArrow a x f (b,b') -> (b -> b' -> c) -> FallibleArrow a x f c a >>?% f = a >>?^ (uncurry f) --- (^>>?%) :: (ArrowChoice a) => (x -> Either f (b,b')) -> (b -> b' -> c) -> FallibleArrow a x f c a ^>>?% f = arr a >>?^ (uncurry f) --- (>>?%?) :: (ArrowChoice a) => FallibleArrow a x f (b,b') -> (b -> b' -> (Either f c)) -> FallibleArrow a x f c a >>?%? f = a >>?^? (uncurry f) 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 ifFailedUse v = arr $ either (const v) id -- | '(&&)' lifted into an arrow (<&&>) :: (Arrow a) => a x Bool -> a x Bool -> a x Bool (<&&>) = liftA2 (&&) -- | '(||)' lifted into an arrow (<||>) :: (Arrow a) => a x Bool -> a x Bool -> a x Bool (<||>) = liftA2 (||) -- | An equivalent of '(&&)' in a fallible arrow (>&&<) :: (ArrowChoice a, Monoid f) => FallibleArrow a x f s -> FallibleArrow a x f s' -> FallibleArrow a x f (s,s') (>&&<) = liftA2 chooseMin -- | An equivalent of '(||)' in some forms of fallible arrows (>||<) :: (ArrowChoice a, Monoid f, Monoid s) => FallibleArrow a x f s -> FallibleArrow a x f s -> FallibleArrow a x f s (>||<) = liftA2 chooseMax -- | An arrow version of a short-circuit (<|>) ifFailedDo :: (ArrowChoice a) => FallibleArrow a x f y -> FallibleArrow a x f y -> FallibleArrow a x f y ifFailedDo a b = keepingTheValue a >>> repackage ^>> (b |||^ Right) where repackage (x , Left _) = Left x repackage (_ , Right y) = Right y infixr 4 <&&>, <||>, >&&<, >||< infixr 1 `ifFailedDo` ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Org/BlockStarts.hs������������������������������������������0000644�0000000�0000000�00000007455�13155240142�021232� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2014-2016 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 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.Readers.Org.Options Copyright : Copyright (C) 2014-2016 Albert Krewinkel License : GNU GPL, version 2 or above Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de> Parsers for Org-mode inline elements. -} module Text.Pandoc.Readers.Org.BlockStarts ( exampleLineStart , hline , noteMarker , tableStart , drawerStart , headerStart , metaLineStart , latexEnvStart , commentLineStart , bulletListStart , orderedListStart , endOfBlock ) where import Control.Monad ( void ) import Text.Pandoc.Readers.Org.Parsing -- | Horizontal Line (five -- dashes or more) hline :: OrgParser () hline = try $ do skipSpaces string "-----" many (char '-') skipSpaces newline return () -- | Read the start of a header line, return the header level headerStart :: OrgParser Int headerStart = try $ (length <$> many1 (char '*')) <* many1 (char ' ') <* updateLastPreCharPos tableStart :: OrgParser Char tableStart = try $ skipSpaces *> char '|' latexEnvStart :: OrgParser String latexEnvStart = try $ do skipSpaces *> string "\\begin{" *> latexEnvName <* string "}" <* blankline where latexEnvName :: OrgParser String latexEnvName = try $ mappend <$> many1 alphaNum <*> option "" (string "*") -- | Parses bullet list marker. bulletListStart :: OrgParser () bulletListStart = try $ choice [ () <$ skipSpaces <* oneOf "+-" <* skipSpaces1 , () <$ skipSpaces1 <* char '*' <* skipSpaces1 ] genericListStart :: OrgParser String -> OrgParser Int genericListStart listMarker = try $ (+) <$> (length <$> many spaceChar) <*> (length <$> listMarker <* many1 spaceChar) orderedListStart :: OrgParser Int orderedListStart = genericListStart orderedListMarker -- Ordered list markers allowed in org-mode where orderedListMarker = mappend <$> many1 digit <*> (pure <$> oneOf ".)") drawerStart :: OrgParser String drawerStart = try $ skipSpaces *> drawerName <* skipSpaces <* newline where drawerName = char ':' *> manyTill nonspaceChar (char ':') metaLineStart :: OrgParser () metaLineStart = try $ skipSpaces <* string "#+" commentLineStart :: OrgParser () commentLineStart = try $ skipSpaces <* string "# " exampleLineStart :: OrgParser () exampleLineStart = () <$ try (skipSpaces *> string ": ") noteMarker :: OrgParser String noteMarker = try $ do char '[' choice [ many1Till digit (char ']') , (++) <$> string "fn:" <*> many1Till (noneOf "\n\r\t ") (char ']') ] -- | Succeeds if the parser is at the end of a block. endOfBlock :: OrgParser () endOfBlock = lookAhead . try $ do void blankline <|> anyBlockStart where -- Succeeds if there is a new block starting at this position. anyBlockStart :: OrgParser () anyBlockStart = try . choice $ [ exampleLineStart , hline , metaLineStart , commentLineStart , void noteMarker , void tableStart , void drawerStart , void headerStart , void latexEnvStart , void bulletListStart , void orderedListStart ] �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Org/Blocks.hs�����������������������������������������������0000644�0000000�0000000�00000103140�13155240142�020200� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} {- Copyright (C) 2014-2017 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 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.Readers.Org.Options Copyright : Copyright (C) 2014-2017 Albert Krewinkel License : GNU GPL, version 2 or above Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de> Parsers for Org-mode block elements. -} module Text.Pandoc.Readers.Org.Blocks ( blockList , meta ) where import Text.Pandoc.Readers.Org.BlockStarts import Text.Pandoc.Readers.Org.Inlines import Text.Pandoc.Readers.Org.Meta ( metaExport, metaKey, metaLine ) import Text.Pandoc.Readers.Org.ParserState import Text.Pandoc.Readers.Org.Parsing import Text.Pandoc.Readers.Org.Shared ( cleanLinkString, isImageFilename, rundocBlockClass , toRundocAttrib, translateLang ) import qualified Text.Pandoc.Builder as B import Text.Pandoc.Builder ( Inlines, Blocks ) import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Shared ( compactify', compactify'DL, safeRead ) import Control.Monad ( foldM, guard, mzero, void ) import Data.Char ( isSpace, toLower, toUpper) import Data.Default ( Default ) import Data.List ( foldl', isPrefixOf ) import Data.Maybe ( fromMaybe, isNothing ) import Data.Monoid ((<>)) -- -- Org headers -- newtype Tag = Tag { fromTag :: String } deriving (Show, Eq) -- | Create a tag containing the given string. toTag :: String -> Tag toTag = Tag -- | The key (also called name or type) of a property. newtype PropertyKey = PropertyKey { fromKey :: String } deriving (Show, Eq, Ord) -- | Create a property key containing the given string. Org mode keys are -- case insensitive and are hence converted to lower case. toPropertyKey :: String -> PropertyKey toPropertyKey = PropertyKey . map toLower -- | The value assigned to a property. newtype PropertyValue = PropertyValue { fromValue :: String } -- | Create a property value containing the given string. toPropertyValue :: String -> PropertyValue toPropertyValue = PropertyValue -- | Check whether the property value is non-nil (i.e. truish). isNonNil :: PropertyValue -> Bool isNonNil p = map toLower (fromValue p) `notElem` ["()", "{}", "nil"] -- | Key/value pairs from a PROPERTIES drawer type Properties = [(PropertyKey, PropertyValue)] -- | Org mode headline (i.e. a document subtree). data Headline = Headline { headlineLevel :: Int , headlineTodoMarker :: Maybe TodoMarker , headlineText :: Inlines , headlineTags :: [Tag] , headlineProperties :: Properties , headlineContents :: Blocks , headlineChildren :: [Headline] } -- -- Parsing headlines and subtrees -- -- | Read an Org mode headline and its contents (i.e. a document subtree). -- @lvl@ gives the minimum acceptable level of the tree. headline :: Int -> OrgParser (F Headline) headline lvl = try $ do level <- headerStart guard (lvl <= level) todoKw <- optionMaybe todoKeyword title <- trimInlinesF . mconcat <$> manyTill inline endOfTitle tags <- option [] headerTags newline properties <- option mempty propertiesDrawer contents <- blocks children <- many (headline (level + 1)) return $ do title' <- title contents' <- contents children' <- sequence children return $ Headline { headlineLevel = level , headlineTodoMarker = todoKw , headlineText = title' , headlineTags = tags , headlineProperties = properties , headlineContents = contents' , headlineChildren = children' } where endOfTitle :: OrgParser () endOfTitle = void . lookAhead $ optional headerTags *> newline headerTags :: OrgParser [Tag] headerTags = try $ let tag = many1 (alphaNum <|> oneOf "@%#_") <* char ':' in map toTag <$> (skipSpaces *> char ':' *> many1 tag <* skipSpaces) -- | Convert an Org mode headline (i.e. a document tree) into pandoc's Blocks headlineToBlocks :: Headline -> OrgParser Blocks headlineToBlocks hdln@(Headline {..}) = do maxHeadlineLevels <- getExportSetting exportHeadlineLevels case () of _ | any isNoExportTag headlineTags -> return mempty _ | any isArchiveTag headlineTags -> archivedHeadlineToBlocks hdln _ | isCommentTitle headlineText -> return mempty _ | headlineLevel >= maxHeadlineLevels -> headlineToHeaderWithList hdln _ | otherwise -> headlineToHeaderWithContents hdln isNoExportTag :: Tag -> Bool isNoExportTag = (== toTag "noexport") isArchiveTag :: Tag -> Bool isArchiveTag = (== toTag "ARCHIVE") -- | Check if the title starts with COMMENT. -- FIXME: This accesses builder internals not intended for use in situations -- like these. Replace once keyword parsing is supported. isCommentTitle :: Inlines -> Bool isCommentTitle (B.toList -> (Str "COMMENT":_)) = True isCommentTitle _ = False archivedHeadlineToBlocks :: Headline -> OrgParser Blocks archivedHeadlineToBlocks hdln = do archivedTreesOption <- getExportSetting exportArchivedTrees case archivedTreesOption of ArchivedTreesNoExport -> return mempty ArchivedTreesExport -> headlineToHeaderWithContents hdln ArchivedTreesHeadlineOnly -> headlineToHeader hdln headlineToHeaderWithList :: Headline -> OrgParser Blocks headlineToHeaderWithList hdln@(Headline {..}) = do maxHeadlineLevels <- getExportSetting exportHeadlineLevels header <- headlineToHeader hdln listElements <- sequence (map headlineToBlocks headlineChildren) let listBlock = if null listElements then mempty else B.orderedList listElements let headerText = if maxHeadlineLevels == headlineLevel then header else flattenHeader header return $ headerText <> headlineContents <> listBlock where flattenHeader :: Blocks -> Blocks flattenHeader blks = case B.toList blks of (Header _ _ inlns:_) -> B.para (B.fromList inlns) _ -> mempty headlineToHeaderWithContents :: Headline -> OrgParser Blocks headlineToHeaderWithContents hdln@(Headline {..}) = do header <- headlineToHeader hdln childrenBlocks <- mconcat <$> sequence (map headlineToBlocks headlineChildren) return $ header <> headlineContents <> childrenBlocks headlineToHeader :: Headline -> OrgParser Blocks headlineToHeader (Headline {..}) = do exportTodoKeyword <- getExportSetting exportWithTodoKeywords let todoText = if exportTodoKeyword then case headlineTodoMarker of Just kw -> todoKeywordToInlines kw <> B.space Nothing -> mempty else mempty let text = tagTitle (todoText <> headlineText) headlineTags let propAttr = propertiesToAttr headlineProperties attr <- registerHeader propAttr headlineText return $ B.headerWith attr headlineLevel text todoKeyword :: OrgParser TodoMarker todoKeyword = try $ do taskStates <- activeTodoMarkers <$> getState let kwParser tdm = try $ (tdm <$ string (todoMarkerName tdm) <* spaceChar) choice (map kwParser taskStates) todoKeywordToInlines :: TodoMarker -> Inlines todoKeywordToInlines tdm = let todoText = todoMarkerName tdm todoState = map toLower . show $ todoMarkerState tdm classes = [todoState, todoText] in B.spanWith (mempty, classes, mempty) (B.str todoText) propertiesToAttr :: Properties -> Attr propertiesToAttr properties = let toStringPair prop = (fromKey (fst prop), fromValue (snd prop)) customIdKey = toPropertyKey "custom_id" classKey = toPropertyKey "class" unnumberedKey = toPropertyKey "unnumbered" specialProperties = [customIdKey, classKey, unnumberedKey] id' = fromMaybe mempty . fmap fromValue . lookup customIdKey $ properties cls = fromMaybe mempty . fmap fromValue . lookup classKey $ properties kvs' = map toStringPair . filter ((`notElem` specialProperties) . fst) $ properties isUnnumbered = fromMaybe False . fmap isNonNil . lookup unnumberedKey $ properties in (id', words cls ++ (if isUnnumbered then ["unnumbered"] else []), kvs') tagTitle :: Inlines -> [Tag] -> Inlines tagTitle title tags = title <> (mconcat $ map tagToInline tags) tagToInline :: Tag -> Inlines tagToInline t = B.spanWith ("", ["tag"], [("data-tag-name", fromTag t)]) mempty -- -- parsing blocks -- -- | Get a list of blocks. blockList :: OrgParser [Block] blockList = do initialBlocks <- blocks headlines <- sequence <$> manyTill (headline 1) eof st <- getState headlineBlocks <- fmap mconcat . sequence . map headlineToBlocks $ runF headlines st return . B.toList $ (runF initialBlocks st) <> headlineBlocks -- | Get the meta information safed in the state. meta :: OrgParser Meta meta = do meta' <- metaExport runF meta' <$> getState blocks :: OrgParser (F Blocks) blocks = mconcat <$> manyTill block (void (lookAhead headerStart) <|> eof) block :: OrgParser (F Blocks) block = choice [ mempty <$ blanklines , table , orgBlock , figure , example , genericDrawer , specialLine , horizontalRule , list , latexFragment , noteBlock , paraOrPlain ] <?> "block" -- -- Block Attributes -- -- | Attributes that may be added to figures (like a name or caption). data BlockAttributes = BlockAttributes { blockAttrName :: Maybe String , blockAttrLabel :: Maybe String , blockAttrCaption :: Maybe (F Inlines) , blockAttrKeyValues :: [(String, String)] } -- | Convert BlockAttributes into pandoc Attr attrFromBlockAttributes :: BlockAttributes -> Attr attrFromBlockAttributes (BlockAttributes{..}) = let ident = fromMaybe mempty $ lookup "id" blockAttrKeyValues classes = case lookup "class" blockAttrKeyValues of Nothing -> [] Just clsStr -> words clsStr kv = filter ((`notElem` ["id", "class"]) . fst) blockAttrKeyValues in (ident, classes, kv) stringyMetaAttribute :: (String -> Bool) -> OrgParser (String, String) stringyMetaAttribute attrCheck = try $ do metaLineStart attrName <- map toUpper <$> many1Till nonspaceChar (char ':') guard $ attrCheck attrName skipSpaces attrValue <- anyLine return (attrName, attrValue) blockAttributes :: OrgParser BlockAttributes blockAttributes = try $ do kv <- many (stringyMetaAttribute attrCheck) let caption = foldl' (appendValues "CAPTION") Nothing kv let kvAttrs = foldl' (appendValues "ATTR_HTML") Nothing kv let name = lookup "NAME" kv let label = lookup "LABEL" kv caption' <- case caption of Nothing -> return Nothing Just s -> Just <$> parseFromString inlines (s ++ "\n") kvAttrs' <- parseFromString keyValues . (++ "\n") $ fromMaybe mempty kvAttrs return $ BlockAttributes { blockAttrName = name , blockAttrLabel = label , blockAttrCaption = caption' , blockAttrKeyValues = kvAttrs' } where attrCheck :: String -> Bool attrCheck attr = case attr of "NAME" -> True "LABEL" -> True "CAPTION" -> True "ATTR_HTML" -> True _ -> False appendValues :: String -> Maybe String -> (String, String) -> Maybe String appendValues attrName accValue (key, value) = if key /= attrName then accValue else case accValue of Just acc -> Just $ acc ++ ' ':value Nothing -> Just value keyValues :: OrgParser [(String, String)] keyValues = try $ manyTill ((,) <$> key <*> value) newline where key :: OrgParser String key = try $ skipSpaces *> char ':' *> many1 nonspaceChar value :: OrgParser String value = skipSpaces *> manyTill anyChar endOfValue endOfValue :: OrgParser () endOfValue = lookAhead $ (() <$ try (many1 spaceChar <* key)) <|> () <$ newline -- -- Org Blocks (#+BEGIN_... / #+END_...) -- -- | Read an org-mode block delimited by #+BEGIN_TYPE and #+END_TYPE. orgBlock :: OrgParser (F Blocks) orgBlock = try $ do blockAttrs <- blockAttributes blkType <- blockHeaderStart ($ blkType) $ case (map toLower blkType) of "export" -> exportBlock "comment" -> rawBlockLines (const mempty) "html" -> rawBlockLines (return . B.rawBlock (lowercase blkType)) "latex" -> rawBlockLines (return . B.rawBlock (lowercase blkType)) "ascii" -> rawBlockLines (return . B.rawBlock (lowercase blkType)) "example" -> rawBlockLines (return . exampleCode) "quote" -> parseBlockLines (fmap B.blockQuote) "verse" -> verseBlock "src" -> codeBlock blockAttrs _ -> parseBlockLines $ let (ident, classes, kv) = attrFromBlockAttributes blockAttrs in fmap $ B.divWith (ident, classes ++ [blkType], kv) where blockHeaderStart :: OrgParser String blockHeaderStart = try $ skipSpaces *> stringAnyCase "#+begin_" *> orgArgWord lowercase :: String -> String lowercase = map toLower rawBlockLines :: (String -> F Blocks) -> String -> OrgParser (F Blocks) rawBlockLines f blockType = (ignHeaders *> (f <$> rawBlockContent blockType)) parseBlockLines :: (F Blocks -> F Blocks) -> String -> OrgParser (F Blocks) parseBlockLines f blockType = (ignHeaders *> (f <$> parsedBlockContent)) where parsedBlockContent :: OrgParser (F Blocks) parsedBlockContent = try $ do raw <- rawBlockContent blockType parseFromString blocks (raw ++ "\n") -- | Read the raw string content of a block rawBlockContent :: String -> OrgParser String rawBlockContent blockType = try $ do blkLines <- manyTill rawLine blockEnder tabLen <- getOption readerTabStop return . unlines . stripIndent . map (tabsToSpaces tabLen . commaEscaped) $ blkLines where rawLine :: OrgParser String rawLine = try $ ("" <$ blankline) <|> anyLine blockEnder :: OrgParser () blockEnder = try $ skipSpaces <* stringAnyCase ("#+end_" <> blockType) stripIndent :: [String] -> [String] stripIndent strs = map (drop (shortestIndent strs)) strs shortestIndent :: [String] -> Int shortestIndent = foldr min maxBound . map (length . takeWhile isSpace) . filter (not . null) tabsToSpaces :: Int -> String -> String tabsToSpaces _ [] = [] tabsToSpaces tabLen cs'@(c:cs) = case c of ' ' -> ' ':tabsToSpaces tabLen cs '\t' -> (take tabLen $ repeat ' ') ++ tabsToSpaces tabLen cs _ -> cs' commaEscaped :: String -> String commaEscaped (',':cs@('*':_)) = cs commaEscaped (',':cs@('#':'+':_)) = cs commaEscaped (' ':cs) = ' ':commaEscaped cs commaEscaped ('\t':cs) = '\t':commaEscaped cs commaEscaped cs = cs -- | Read but ignore all remaining block headers. ignHeaders :: OrgParser () ignHeaders = (() <$ newline) <|> (() <$ anyLine) -- | Read a block containing code intended for export in specific backends -- only. exportBlock :: String -> OrgParser (F Blocks) exportBlock blockType = try $ do exportType <- skipSpaces *> orgArgWord <* ignHeaders contents <- rawBlockContent blockType returnF (B.rawBlock (map toLower exportType) contents) verseBlock :: String -> OrgParser (F Blocks) verseBlock blockType = try $ do ignHeaders content <- rawBlockContent blockType fmap B.lineBlock . sequence <$> mapM parseVerseLine (lines content) where -- replace initial spaces with nonbreaking spaces to preserve -- indentation, parse the rest as normal inline parseVerseLine :: String -> OrgParser (F Inlines) parseVerseLine cs = do let (initialSpaces, indentedLine) = span isSpace cs let nbspIndent = if null initialSpaces then mempty else B.str $ map (const '\160') initialSpaces line <- parseFromString inlines (indentedLine ++ "\n") return (trimInlinesF $ pure nbspIndent <> line) -- | Read a code block and the associated results block if present. Which of -- boths blocks is included in the output is determined using the "exports" -- argument in the block header. codeBlock :: BlockAttributes -> String -> OrgParser (F Blocks) codeBlock blockAttrs blockType = do skipSpaces (classes, kv) <- codeHeaderArgs <|> (mempty <$ ignHeaders) content <- rawBlockContent blockType resultsContent <- trailingResultsBlock let id' = fromMaybe mempty $ blockAttrName blockAttrs let includeCode = exportsCode kv let includeResults = exportsResults kv let codeBlck = B.codeBlockWith ( id', classes, kv ) content let labelledBlck = maybe (pure codeBlck) (labelDiv codeBlck) (blockAttrCaption blockAttrs) let resultBlck = fromMaybe mempty resultsContent return $ (if includeCode then labelledBlck else mempty) <> (if includeResults then resultBlck else mempty) where labelDiv :: Blocks -> F Inlines -> F Blocks labelDiv blk value = B.divWith nullAttr <$> (mappend <$> labelledBlock value <*> pure blk) labelledBlock :: F Inlines -> F Blocks labelledBlock = fmap (B.plain . B.spanWith ("", ["label"], [])) exportsCode :: [(String, String)] -> Bool exportsCode attrs = not (("rundoc-exports", "none") `elem` attrs || ("rundoc-exports", "results") `elem` attrs) exportsResults :: [(String, String)] -> Bool exportsResults attrs = ("rundoc-exports", "results") `elem` attrs || ("rundoc-exports", "both") `elem` attrs trailingResultsBlock :: OrgParser (Maybe (F Blocks)) trailingResultsBlock = optionMaybe . try $ do blanklines stringAnyCase "#+RESULTS:" blankline block -- | Parse code block arguments -- TODO: We currently don't handle switches. codeHeaderArgs :: OrgParser ([String], [(String, String)]) codeHeaderArgs = try $ do language <- skipSpaces *> orgArgWord _ <- skipSpaces *> (try $ switch `sepBy` (many1 spaceChar)) parameters <- manyTill blockOption newline let pandocLang = translateLang language return $ if hasRundocParameters parameters then ( [ pandocLang, rundocBlockClass ] , map toRundocAttrib (("language", language) : parameters) ) else ([ pandocLang ], parameters) where hasRundocParameters = not . null switch :: OrgParser (Char, Maybe String) switch = try $ simpleSwitch <|> lineNumbersSwitch where simpleSwitch = (\c -> (c, Nothing)) <$> (oneOf "-+" *> letter) lineNumbersSwitch = (\ls -> ('l', Just ls)) <$> (string "-l \"" *> many1Till nonspaceChar (char '"')) blockOption :: OrgParser (String, String) blockOption = try $ do argKey <- orgArgKey paramValue <- option "yes" orgParamValue return (argKey, paramValue) orgParamValue :: OrgParser String orgParamValue = try $ skipSpaces *> notFollowedBy (char ':' ) *> many1 nonspaceChar <* skipSpaces horizontalRule :: OrgParser (F Blocks) horizontalRule = return B.horizontalRule <$ try hline -- -- Drawers -- -- | A generic drawer which has no special meaning for org-mode. -- Whether or not this drawer is included in the output depends on the drawers -- export setting. genericDrawer :: OrgParser (F Blocks) genericDrawer = try $ do name <- map toUpper <$> drawerStart content <- manyTill drawerLine (try drawerEnd) state <- getState -- Include drawer if it is explicitly included in or not explicitly excluded -- from the list of drawers that should be exported. PROPERTIES drawers are -- never exported. case (exportDrawers . orgStateExportSettings $ state) of _ | name == "PROPERTIES" -> return mempty Left names | name `elem` names -> return mempty Right names | name `notElem` names -> return mempty _ -> drawerDiv name <$> parseLines content where parseLines :: [String] -> OrgParser (F Blocks) parseLines = parseFromString blocks . (++ "\n") . unlines drawerDiv :: String -> F Blocks -> F Blocks drawerDiv drawerName = fmap $ B.divWith (mempty, [drawerName, "drawer"], mempty) drawerLine :: OrgParser String drawerLine = anyLine drawerEnd :: OrgParser String drawerEnd = try $ skipSpaces *> stringAnyCase ":END:" <* skipSpaces <* newline -- | Read a :PROPERTIES: drawer and return the key/value pairs contained -- within. propertiesDrawer :: OrgParser Properties propertiesDrawer = try $ do drawerType <- drawerStart guard $ map toUpper drawerType == "PROPERTIES" manyTill property (try drawerEnd) where property :: OrgParser (PropertyKey, PropertyValue) property = try $ (,) <$> key <*> value key :: OrgParser PropertyKey key = fmap toPropertyKey . try $ skipSpaces *> char ':' *> many1Till nonspaceChar (char ':') value :: OrgParser PropertyValue value = fmap toPropertyValue . try $ skipSpaces *> manyTill anyChar (try $ skipSpaces *> newline) -- -- Figures -- -- | Figures or an image paragraph (i.e. an image on a line by itself). Only -- images with a caption attribute are interpreted as figures. figure :: OrgParser (F Blocks) figure = try $ do figAttrs <- blockAttributes src <- skipSpaces *> selfTarget <* skipSpaces <* endOfParagraph case cleanLinkString src of Nothing -> mzero Just imgSrc -> do guard (isImageFilename imgSrc) let isFigure = not . isNothing $ blockAttrCaption figAttrs return $ imageBlock isFigure figAttrs imgSrc where selfTarget :: OrgParser String selfTarget = try $ char '[' *> linkTarget <* char ']' imageBlock :: Bool -> BlockAttributes -> String -> F Blocks imageBlock isFigure figAttrs imgSrc = let figName = fromMaybe mempty $ blockAttrName figAttrs figLabel = fromMaybe mempty $ blockAttrLabel figAttrs figCaption = fromMaybe mempty $ blockAttrCaption figAttrs figKeyVals = blockAttrKeyValues figAttrs attr = (figLabel, mempty, figKeyVals) figTitle = (if isFigure then withFigPrefix else id) figName in B.para . B.imageWith attr imgSrc figTitle <$> figCaption withFigPrefix :: String -> String withFigPrefix cs = if "fig:" `isPrefixOf` cs then cs else "fig:" ++ cs -- | Succeeds if looking at the end of the current paragraph endOfParagraph :: OrgParser () endOfParagraph = try $ skipSpaces *> newline *> endOfBlock -- -- Examples -- -- | Example code marked up by a leading colon. example :: OrgParser (F Blocks) example = try $ do return . return . exampleCode =<< unlines <$> many1 exampleLine where exampleLine :: OrgParser String exampleLine = try $ exampleLineStart *> anyLine exampleCode :: String -> Blocks exampleCode = B.codeBlockWith ("", ["example"], []) -- -- Comments, Options and Metadata -- specialLine :: OrgParser (F Blocks) specialLine = fmap return . try $ rawExportLine <|> metaLine <|> commentLine rawExportLine :: OrgParser Blocks rawExportLine = try $ do metaLineStart key <- metaKey if key `elem` ["latex", "html", "texinfo", "beamer"] then B.rawBlock key <$> anyLine else mzero commentLine :: OrgParser Blocks commentLine = commentLineStart *> anyLine *> pure mempty -- -- Tables -- data ColumnProperty = ColumnProperty { columnAlignment :: Maybe Alignment , columnRelWidth :: Maybe Int } deriving (Show, Eq) instance Default ColumnProperty where def = ColumnProperty Nothing Nothing data OrgTableRow = OrgContentRow (F [Blocks]) | OrgAlignRow [ColumnProperty] | OrgHlineRow -- OrgTable is strongly related to the pandoc table ADT. Using the same -- (i.e. pandoc-global) ADT would mean that the reader would break if the -- global structure was to be changed, which would be bad. The final table -- should be generated using a builder function. data OrgTable = OrgTable { orgTableColumnProperties :: [ColumnProperty] , orgTableHeader :: [Blocks] , orgTableRows :: [[Blocks]] } table :: OrgParser (F Blocks) table = try $ do blockAttrs <- blockAttributes lookAhead tableStart do rows <- tableRows let caption = fromMaybe (return mempty) $ blockAttrCaption blockAttrs return $ (<$> caption) . orgToPandocTable . normalizeTable =<< rowsToTable rows orgToPandocTable :: OrgTable -> Inlines -> Blocks orgToPandocTable (OrgTable colProps heads lns) caption = let totalWidth = if any (not . isNothing) (map columnRelWidth colProps) then Just . sum $ map (fromMaybe 1 . columnRelWidth) colProps else Nothing in B.table caption (map (convertColProp totalWidth) colProps) heads lns where convertColProp :: Maybe Int -> ColumnProperty -> (Alignment, Double) convertColProp totalWidth colProp = let align' = fromMaybe AlignDefault $ columnAlignment colProp width' = fromMaybe 0 $ (\w t -> (fromIntegral w / fromIntegral t)) <$> (columnRelWidth colProp) <*> totalWidth in (align', width') tableRows :: OrgParser [OrgTableRow] tableRows = try $ many (tableAlignRow <|> tableHline <|> tableContentRow) tableContentRow :: OrgParser OrgTableRow tableContentRow = try $ OrgContentRow . sequence <$> (tableStart *> many1Till tableContentCell newline) tableContentCell :: OrgParser (F Blocks) tableContentCell = try $ fmap B.plain . trimInlinesF . mconcat <$> manyTill inline endOfCell tableAlignRow :: OrgParser OrgTableRow tableAlignRow = try $ do tableStart colProps <- many1Till columnPropertyCell newline -- Empty rows are regular (i.e. content) rows, not alignment rows. guard $ any (/= def) colProps return $ OrgAlignRow colProps columnPropertyCell :: OrgParser ColumnProperty columnPropertyCell = emptyCell <|> propCell <?> "alignment info" where emptyCell = ColumnProperty Nothing Nothing <$ (try $ skipSpaces *> endOfCell) propCell = try $ ColumnProperty <$> (skipSpaces *> char '<' *> optionMaybe tableAlignFromChar) <*> (optionMaybe (many1 digit >>= safeRead) <* char '>' <* emptyCell) tableAlignFromChar :: OrgParser Alignment tableAlignFromChar = try $ choice [ char 'l' *> return AlignLeft , char 'c' *> return AlignCenter , char 'r' *> return AlignRight ] tableHline :: OrgParser OrgTableRow tableHline = try $ OrgHlineRow <$ (tableStart *> char '-' *> anyLine) endOfCell :: OrgParser Char endOfCell = try $ char '|' <|> lookAhead newline rowsToTable :: [OrgTableRow] -> F OrgTable rowsToTable = foldM rowToContent emptyTable where emptyTable = OrgTable mempty mempty mempty normalizeTable :: OrgTable -> OrgTable normalizeTable (OrgTable colProps heads rows) = OrgTable colProps' heads rows where refRow = if heads /= mempty then heads else case rows of (r:_) -> r _ -> mempty cols = length refRow fillColumns base padding = take cols $ base ++ repeat padding colProps' = fillColumns colProps def -- One or more horizontal rules after the first content line mark the previous -- line as a header. All other horizontal lines are discarded. rowToContent :: OrgTable -> OrgTableRow -> F OrgTable rowToContent orgTable row = case row of OrgHlineRow -> return singleRowPromotedToHeader OrgAlignRow props -> return . setProperties $ props OrgContentRow cs -> appendToBody cs where singleRowPromotedToHeader :: OrgTable singleRowPromotedToHeader = case orgTable of OrgTable{ orgTableHeader = [], orgTableRows = b:[] } -> orgTable{ orgTableHeader = b , orgTableRows = [] } _ -> orgTable setProperties :: [ColumnProperty] -> OrgTable setProperties ps = orgTable{ orgTableColumnProperties = ps } appendToBody :: F [Blocks] -> F OrgTable appendToBody frow = do newRow <- frow let oldRows = orgTableRows orgTable -- NOTE: This is an inefficient O(n) operation. This should be changed -- if performance ever becomes a problem. return orgTable{ orgTableRows = oldRows ++ [newRow] } -- -- LaTeX fragments -- latexFragment :: OrgParser (F Blocks) latexFragment = try $ do envName <- latexEnvStart content <- mconcat <$> manyTill anyLineNewline (latexEnd envName) return . return $ B.rawBlock "latex" (content `inLatexEnv` envName) where c `inLatexEnv` e = mconcat [ "\\begin{", e, "}\n" , c , "\\end{", e, "}\n" ] latexEnd :: String -> OrgParser () latexEnd envName = try $ () <$ skipSpaces <* string ("\\end{" ++ envName ++ "}") <* blankline -- -- Footnote defintions -- noteBlock :: OrgParser (F Blocks) noteBlock = try $ do ref <- noteMarker <* skipSpaces content <- mconcat <$> blocksTillHeaderOrNote addToNotesTable (ref, content) return mempty where blocksTillHeaderOrNote = many1Till block (eof <|> () <$ lookAhead noteMarker <|> () <$ lookAhead headerStart) -- Paragraphs or Plain text paraOrPlain :: OrgParser (F Blocks) paraOrPlain = try $ do -- Make sure we are not looking at a headline notFollowedBy' (char '*' *> (oneOf " *")) ils <- inlines 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)) -- -- list blocks -- list :: OrgParser (F Blocks) list = choice [ definitionList, bulletList, orderedList ] <?> "list" definitionList :: OrgParser (F Blocks) definitionList = try $ do n <- lookAhead (bulletListStart' Nothing) fmap B.definitionList . fmap compactify'DL . sequence <$> many1 (definitionListItem $ bulletListStart' (Just n)) bulletList :: OrgParser (F Blocks) bulletList = try $ do n <- lookAhead (bulletListStart' Nothing) fmap B.bulletList . fmap compactify' . sequence <$> many1 (listItem (bulletListStart' $ Just n)) orderedList :: OrgParser (F Blocks) orderedList = fmap B.orderedList . fmap compactify' . sequence <$> many1 (listItem orderedListStart) bulletListStart' :: Maybe Int -> OrgParser Int -- returns length of bulletList prefix, inclusive of marker bulletListStart' Nothing = do ind <- length <$> many spaceChar oneOf (bullets $ ind == 0) skipSpaces1 return (ind + 1) bulletListStart' (Just n) = do count (n-1) spaceChar oneOf (bullets $ n == 1) many1 spaceChar return n -- Unindented lists are legal, but they can't use '*' bullets. -- We return n to maintain compatibility with the generic listItem. bullets :: Bool -> String bullets unindented = if unindented then "+-" else "*+-" definitionListItem :: OrgParser Int -> OrgParser (F (Inlines, [Blocks])) definitionListItem parseMarkerGetLength = try $ do markerLength <- parseMarkerGetLength term <- manyTill (noneOf "\n\r") (try definitionMarker) line1 <- anyLineNewline blank <- option "" ("\n" <$ blankline) cont <- concat <$> many (listContinuation markerLength) term' <- parseFromString inlines term contents' <- parseFromString blocks $ line1 ++ blank ++ cont return $ (,) <$> term' <*> fmap (:[]) contents' where definitionMarker = spaceChar *> string "::" <* (spaceChar <|> lookAhead newline) -- parse raw text for one list item, excluding start marker and continuations listItem :: OrgParser Int -> OrgParser (F Blocks) listItem start = try . withContext ListItemState $ do markerLength <- try start firstLine <- anyLineNewline blank <- option "" ("\n" <$ blankline) rest <- concat <$> many (listContinuation markerLength) parseFromString blocks $ firstLine ++ blank ++ rest -- continuation of a list item - indented and separated by blankline or endline. -- Note: nested lists are parsed as continuations. listContinuation :: Int -> OrgParser String listContinuation markerLength = try $ notFollowedBy' blankline *> (mappend <$> (concat <$> many1 listLine) <*> many blankline) where listLine = try $ indentWith markerLength *> anyLineNewline -- indent by specified number of spaces (or equiv. tabs) indentWith :: Int -> OrgParser String indentWith num = do tabStop <- getOption readerTabStop if num < tabStop then count num (char ' ') else choice [ try (count num (char ' ')) , try (char '\t' >> count (num - tabStop) (char ' ')) ] -- | Parse any line, include the final newline in the output. anyLineNewline :: OrgParser String anyLineNewline = (++ "\n") <$> anyLine ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Org/ExportSettings.hs���������������������������������������0000644�0000000�0000000�00000013676�13155240142�022003� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2014-2016 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 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.Readers.Org.Options Copyright : Copyright (C) 2016 Albert Krewinkel License : GNU GPL, version 2 or above Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de> Parsers for Org-mode export options. -} module Text.Pandoc.Readers.Org.ExportSettings ( exportSettings ) where import Text.Pandoc.Readers.Org.ParserState import Text.Pandoc.Readers.Org.Parsing import Control.Monad ( mzero, void ) import Data.Char ( toLower ) import Data.Maybe ( listToMaybe ) -- | Read and handle space separated org-mode export settings. exportSettings :: OrgParser () exportSettings = void $ sepBy spaces exportSetting -- | Setter function for export settings. type ExportSettingSetter a = a -> ExportSettings -> ExportSettings -- | Read and process a single org-mode export option. exportSetting :: OrgParser () exportSetting = choice [ booleanSetting "^" (\val es -> es { exportSubSuperscripts = val }) , booleanSetting "'" (\val es -> es { exportSmartQuotes = val }) , booleanSetting "*" (\val es -> es { exportEmphasizedText = val }) , booleanSetting "-" (\val es -> es { exportSpecialStrings = val }) , ignoredSetting ":" , ignoredSetting "<" , ignoredSetting "\\n" , archivedTreeSetting "arch" (\val es -> es { exportArchivedTrees = val }) , booleanSetting "author" (\val es -> es { exportWithAuthor = val }) , ignoredSetting "c" -- org-mode allows the special value `comment` for creator, which we'll -- interpret as true as it doesn't make sense in the context of Pandoc. , booleanSetting "creator" (\val es -> es { exportWithCreator = val }) , complementableListSetting "d" (\val es -> es { exportDrawers = val }) , ignoredSetting "date" , ignoredSetting "e" , booleanSetting "email" (\val es -> es { exportWithEmail = val }) , ignoredSetting "f" , integerSetting "H" (\val es -> es { exportHeadlineLevels = val }) , ignoredSetting "inline" , ignoredSetting "num" , ignoredSetting "p" , ignoredSetting "pri" , ignoredSetting "prop" , ignoredSetting "stat" , ignoredSetting "tags" , ignoredSetting "tasks" , ignoredSetting "tex" , ignoredSetting "timestamp" , ignoredSetting "title" , ignoredSetting "toc" , booleanSetting "todo" (\val es -> es { exportWithTodoKeywords = val }) , ignoredSetting "|" ] <?> "export setting" genericExportSetting :: OrgParser a -> String -> ExportSettingSetter a -> OrgParser () genericExportSetting optionParser settingIdentifier setter = try $ do _ <- string settingIdentifier *> char ':' value <- optionParser updateState $ modifyExportSettings value where modifyExportSettings val st = st { orgStateExportSettings = setter val . orgStateExportSettings $ st } -- | A boolean option, either nil (False) or non-nil (True). booleanSetting :: String -> ExportSettingSetter Bool -> OrgParser () booleanSetting = genericExportSetting elispBoolean -- | An integer-valued option. integerSetting :: String -> ExportSettingSetter Int -> OrgParser () integerSetting = genericExportSetting parseInt where parseInt = try $ many1 digit >>= maybe mzero (return . fst) . listToMaybe . reads -- | Either the string "headline" or an elisp boolean and treated as an -- @ArchivedTreesOption@. archivedTreeSetting :: String -> ExportSettingSetter ArchivedTreesOption -> OrgParser () archivedTreeSetting = genericExportSetting $ archivedTreesHeadlineSetting <|> archivedTreesBoolean where archivedTreesHeadlineSetting = try $ do _ <- string "headline" lookAhead (newline <|> spaceChar) return ArchivedTreesHeadlineOnly archivedTreesBoolean = try $ do exportBool <- elispBoolean return $ if exportBool then ArchivedTreesExport else ArchivedTreesNoExport -- | A list or a complement list (i.e. a list starting with `not`). complementableListSetting :: String -> ExportSettingSetter (Either [String] [String]) -> OrgParser () complementableListSetting = genericExportSetting $ choice [ Left <$> complementStringList , Right <$> stringList , (\b -> if b then Left [] else Right []) <$> elispBoolean ] where -- Read a plain list of strings. stringList :: OrgParser [String] stringList = try $ char '(' *> sepBy elispString spaces <* char ')' -- Read an emacs lisp list specifying a complement set. complementStringList :: OrgParser [String] complementStringList = try $ string "(not " *> sepBy elispString spaces <* char ')' elispString :: OrgParser String elispString = try $ char '"' *> manyTill alphaNum (char '"') -- | Read but ignore the export setting. ignoredSetting :: String -> OrgParser () ignoredSetting s = try (() <$ string s <* char ':' <* many1 nonspaceChar) -- | Read an elisp boolean. Only NIL is treated as false, non-NIL values are -- interpreted as true. elispBoolean :: OrgParser Bool elispBoolean = try $ do value <- many1 nonspaceChar return $ case map toLower value of "nil" -> False "{}" -> False "()" -> False _ -> True ������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Org/Inlines.hs����������������������������������������������0000644�0000000�0000000�00000072537�13155240142�020403� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2014-2016 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 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.Readers.Org.Options Copyright : Copyright (C) 2014-2016 Albert Krewinkel License : GNU GPL, version 2 or above Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de> Parsers for Org-mode inline elements. -} module Text.Pandoc.Readers.Org.Inlines ( inline , inlines , addToNotesTable , linkTarget ) where import Text.Pandoc.Readers.Org.BlockStarts ( endOfBlock, noteMarker ) import Text.Pandoc.Readers.Org.ParserState import Text.Pandoc.Readers.Org.Parsing import Text.Pandoc.Readers.Org.Shared ( cleanLinkString, isImageFilename, rundocBlockClass , toRundocAttrib, translateLang ) import qualified Text.Pandoc.Builder as B import Text.Pandoc.Builder ( Inlines ) import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Readers.LaTeX ( inlineCommand, rawLaTeXInline ) import Text.TeXMath ( readTeX, writePandoc, DisplayType(..) ) import qualified Text.TeXMath.Readers.MathML.EntityMap as MathMLEntityMap import Prelude hiding (sequence) import Control.Monad ( guard, mplus, mzero, when, void ) import Data.Char ( isAlphaNum, isSpace ) import Data.List ( intersperse ) import Data.Maybe ( fromMaybe ) import qualified Data.Map as M import Data.Monoid ( (<>) ) import Data.Traversable (sequence) -- -- Functions acting on the parser state -- recordAnchorId :: String -> OrgParser () recordAnchorId i = updateState $ \s -> s{ orgStateAnchorIds = i : (orgStateAnchorIds s) } pushToInlineCharStack :: Char -> OrgParser () pushToInlineCharStack c = updateState $ \s -> s{ orgStateEmphasisCharStack = c:orgStateEmphasisCharStack s } popInlineCharStack :: OrgParser () popInlineCharStack = updateState $ \s -> s{ orgStateEmphasisCharStack = drop 1 . orgStateEmphasisCharStack $ s } surroundingEmphasisChar :: OrgParser [Char] surroundingEmphasisChar = take 1 . drop 1 . orgStateEmphasisCharStack <$> getState startEmphasisNewlinesCounting :: Int -> OrgParser () startEmphasisNewlinesCounting maxNewlines = updateState $ \s -> s{ orgStateEmphasisNewlines = Just maxNewlines } decEmphasisNewlinesCount :: OrgParser () decEmphasisNewlinesCount = updateState $ \s -> s{ orgStateEmphasisNewlines = (\n -> n - 1) <$> orgStateEmphasisNewlines s } newlinesCountWithinLimits :: OrgParser Bool newlinesCountWithinLimits = do st <- getState return $ ((< 0) <$> orgStateEmphasisNewlines st) /= Just True resetEmphasisNewlines :: OrgParser () resetEmphasisNewlines = updateState $ \s -> s{ orgStateEmphasisNewlines = Nothing } addToNotesTable :: OrgNoteRecord -> OrgParser () addToNotesTable note = do oldnotes <- orgStateNotes' <$> getState updateState $ \s -> s{ orgStateNotes' = note:oldnotes } -- | Parse a single Org-mode inline element inline :: OrgParser (F Inlines) inline = choice [ whitespace , linebreak , cite , footnote , linkOrImage , anchor , inlineCodeBlock , str , endline , emphasizedText , code , math , displayMath , verbatim , subscript , superscript , inlineLaTeX , exportSnippet , smart , symbol ] <* (guard =<< newlinesCountWithinLimits) <?> "inline" -- | Read the rest of the input as inlines. inlines :: OrgParser (F Inlines) inlines = trimInlinesF . mconcat <$> many1 inline -- treat these as potentially non-text when parsing inline: specialChars :: [Char] specialChars = "\"$'()*+-,./:;<=>@[\\]^_{|}~" whitespace :: OrgParser (F Inlines) whitespace = pure B.space <$ skipMany1 spaceChar <* updateLastPreCharPos <* updateLastForbiddenCharPos <?> "whitespace" linebreak :: OrgParser (F Inlines) linebreak = try $ pure B.linebreak <$ string "\\\\" <* skipSpaces <* newline str :: OrgParser (F Inlines) str = return . B.str <$> many1 (noneOf $ specialChars ++ "\n\r ") <* updateLastStrPos -- | An endline character that can be treated as a space, not a structural -- break. This should reflect the values of the Emacs variable -- @org-element-pagaraph-separate@. endline :: OrgParser (F Inlines) endline = try $ do newline notFollowedBy' endOfBlock decEmphasisNewlinesCount guard =<< newlinesCountWithinLimits updateLastPreCharPos return . return $ B.softbreak -- -- Citations -- -- The state of citations is a bit confusing due to the lack of an official -- syntax and multiple syntaxes coexisting. The pandocOrgCite syntax was the -- first to be implemented here and is almost identical to Markdown's citation -- syntax. The org-ref package is in wide use to handle citations, but the -- syntax is a bit limiting and not quite as simple to write. The -- semi-offical Org-mode citation syntax is based on John MacFarlane's Pandoc -- sytax and Org-oriented enhancements contributed by Richard Lawrence and -- others. It's dubbed Berkeley syntax due the place of activity of its main -- contributors. All this should be consolidated once an official Org-mode -- citation syntax has emerged. cite :: OrgParser (F Inlines) cite = try $ berkeleyCite <|> do guardEnabled Ext_citations (cs, raw) <- withRaw $ choice [ pandocOrgCite , orgRefCite , berkeleyTextualCite ] return $ (flip B.cite (B.text raw)) <$> cs -- | A citation in Pandoc Org-mode style (@[prefix \@citekey suffix]@). pandocOrgCite :: OrgParser (F [Citation]) pandocOrgCite = try $ char '[' *> skipSpaces *> citeList <* skipSpaces <* char ']' orgRefCite :: OrgParser (F [Citation]) orgRefCite = try $ choice [ normalOrgRefCite , fmap (:[]) <$> linkLikeOrgRefCite ] normalOrgRefCite :: OrgParser (F [Citation]) normalOrgRefCite = try $ do mode <- orgRefCiteMode -- org-ref style citation key, parsed into a citation of the given mode let orgRefCiteItem :: OrgParser (F Citation) orgRefCiteItem = try $ do key <- orgRefCiteKey returnF $ Citation { citationId = key , citationPrefix = mempty , citationSuffix = mempty , citationMode = mode , citationNoteNum = 0 , citationHash = 0 } firstCitation <- orgRefCiteItem moreCitations <- many (try $ char ',' *> orgRefCiteItem) return . sequence $ firstCitation : moreCitations where -- | Read an Berkeley-style Org-mode citation. Berkeley citation style was -- develop and adjusted to Org-mode style by John MacFarlane and Richard -- Lawrence, respectively, both philosophers at UC Berkeley. berkeleyCite :: OrgParser (F Inlines) berkeleyCite = try $ do bcl <- berkeleyCitationList return $ do parens <- berkeleyCiteParens <$> bcl prefix <- berkeleyCiteCommonPrefix <$> bcl suffix <- berkeleyCiteCommonSuffix <$> bcl citationList <- berkeleyCiteCitations <$> bcl return $ if parens then toCite . maybe id (\p -> alterFirst (prependPrefix p)) prefix . maybe id (\s -> alterLast (appendSuffix s)) suffix $ citationList else maybe mempty (<> " ") prefix <> (toListOfCites $ map toInTextMode citationList) <> maybe mempty (", " <>) suffix where toCite :: [Citation] -> Inlines toCite cs = B.cite cs mempty toListOfCites :: [Citation] -> Inlines toListOfCites = mconcat . intersperse ", " . map (\c -> B.cite [c] mempty) toInTextMode :: Citation -> Citation toInTextMode c = c { citationMode = AuthorInText } alterFirst, alterLast :: (a -> a) -> [a] -> [a] alterFirst _ [] = [] alterFirst f (c:cs) = (f c):cs alterLast f = reverse . alterFirst f . reverse prependPrefix, appendSuffix :: Inlines -> Citation -> Citation prependPrefix pre c = c { citationPrefix = B.toList pre <> citationPrefix c } appendSuffix suf c = c { citationSuffix = citationSuffix c <> B.toList suf } data BerkeleyCitationList = BerkeleyCitationList { berkeleyCiteParens :: Bool , berkeleyCiteCommonPrefix :: Maybe Inlines , berkeleyCiteCommonSuffix :: Maybe Inlines , berkeleyCiteCitations :: [Citation] } berkeleyCitationList :: OrgParser (F BerkeleyCitationList) berkeleyCitationList = try $ do char '[' parens <- choice [ False <$ berkeleyBareTag, True <$ berkeleyParensTag ] char ':' skipSpaces commonPrefix <- optionMaybe (try $ citationListPart <* char ';') citations <- citeList commonSuffix <- optionMaybe (try $ citationListPart) char ']' return (BerkeleyCitationList parens <$> sequence commonPrefix <*> sequence commonSuffix <*> citations) where citationListPart :: OrgParser (F Inlines) citationListPart = fmap (trimInlinesF . mconcat) . try . many1 $ do notFollowedBy' citeKey notFollowedBy (oneOf ";]") inline berkeleyBareTag :: OrgParser () berkeleyBareTag = try $ void berkeleyBareTag' berkeleyParensTag :: OrgParser () berkeleyParensTag = try . void $ enclosedByPair '(' ')' berkeleyBareTag' berkeleyBareTag' :: OrgParser () berkeleyBareTag' = try $ void (string "cite") berkeleyTextualCite :: OrgParser (F [Citation]) berkeleyTextualCite = try $ do (suppressAuthor, key) <- citeKey returnF . return $ Citation { citationId = key , citationPrefix = mempty , citationSuffix = mempty , citationMode = if suppressAuthor then SuppressAuthor else AuthorInText , citationNoteNum = 0 , citationHash = 0 } -- The following is what a Berkeley-style bracketed textual citation parser -- would look like. However, as these citations are a subset of Pandoc's Org -- citation style, this isn't used. -- berkeleyBracketedTextualCite :: OrgParser (F [Citation]) -- berkeleyBracketedTextualCite = try . (fmap head) $ -- enclosedByPair '[' ']' berkeleyTextualCite -- | Read a link-like org-ref style citation. The citation includes pre and -- post text. However, multiple citations are not possible due to limitations -- in the syntax. linkLikeOrgRefCite :: OrgParser (F Citation) linkLikeOrgRefCite = try $ do _ <- string "[[" mode <- orgRefCiteMode key <- orgRefCiteKey _ <- string "][" pre <- trimInlinesF . mconcat <$> manyTill inline (try $ string "::") spc <- option False (True <$ spaceChar) suf <- trimInlinesF . mconcat <$> manyTill inline (try $ string "]]") return $ do pre' <- pre suf' <- suf return Citation { citationId = key , citationPrefix = B.toList pre' , citationSuffix = B.toList (if spc then B.space <> suf' else suf') , citationMode = mode , citationNoteNum = 0 , citationHash = 0 } -- | Read a citation key. The characters allowed in citation keys are taken -- from the `org-ref-cite-re` variable in `org-ref.el`. orgRefCiteKey :: OrgParser String orgRefCiteKey = try . many1 . satisfy $ \c -> isAlphaNum c || c `elem` ("-_:\\./"::String) -- | Supported citation types. Only a small subset of org-ref types is -- supported for now. TODO: rewrite this, use LaTeX reader as template. orgRefCiteMode :: OrgParser CitationMode orgRefCiteMode = choice $ map (\(s, mode) -> mode <$ try (string s <* char ':')) [ ("cite", AuthorInText) , ("citep", NormalCitation) , ("citep*", NormalCitation) , ("citet", AuthorInText) , ("citet*", AuthorInText) , ("citeyear", SuppressAuthor) ] citeList :: OrgParser (F [Citation]) citeList = sequence <$> sepEndBy1 citation (try $ char ';' *> skipSpaces) citation :: OrgParser (F Citation) citation = try $ do pref <- prefix (suppress_author, key) <- citeKey suff <- suffix return $ do x <- pref y <- suff return $ Citation{ citationId = key , citationPrefix = B.toList x , citationSuffix = B.toList y , citationMode = if suppress_author then SuppressAuthor else NormalCitation , citationNoteNum = 0 , citationHash = 0 } where prefix = trimInlinesF . mconcat <$> manyTill inline (char ']' <|> (']' <$ lookAhead citeKey)) suffix = try $ do hasSpace <- option False (notFollowedBy nonspaceChar >> return True) skipSpaces rest <- trimInlinesF . mconcat <$> many (notFollowedBy (oneOf ";]") *> inline) return $ if hasSpace then (B.space <>) <$> rest else rest footnote :: OrgParser (F Inlines) footnote = try $ inlineNote <|> referencedNote inlineNote :: OrgParser (F Inlines) inlineNote = try $ do string "[fn:" ref <- many alphaNum char ':' note <- fmap B.para . trimInlinesF . mconcat <$> many1Till inline (char ']') when (not $ null ref) $ addToNotesTable ("fn:" ++ ref, note) return $ B.note <$> note referencedNote :: OrgParser (F Inlines) referencedNote = try $ do ref <- noteMarker return $ do notes <- asksF orgStateNotes' case lookup ref notes of Nothing -> return $ B.str $ "[" ++ ref ++ "]" Just contents -> do st <- askF let contents' = runF contents st{ orgStateNotes' = [] } return $ B.note contents' linkOrImage :: OrgParser (F Inlines) linkOrImage = explicitOrImageLink <|> selflinkOrImage <|> angleLink <|> plainLink <?> "link or image" explicitOrImageLink :: OrgParser (F Inlines) explicitOrImageLink = try $ do char '[' srcF <- applyCustomLinkFormat =<< possiblyEmptyLinkTarget title <- enclosedRaw (char '[') (char ']') title' <- parseFromString (mconcat <$> many inline) title char ']' return $ do src <- srcF case cleanLinkString title of Just imgSrc | isImageFilename imgSrc -> pure $ B.link src "" $ B.image imgSrc mempty mempty _ -> linkToInlinesF src =<< title' selflinkOrImage :: OrgParser (F Inlines) selflinkOrImage = try $ do src <- char '[' *> linkTarget <* char ']' return $ linkToInlinesF src (B.str src) plainLink :: OrgParser (F Inlines) plainLink = try $ do (orig, src) <- uri returnF $ B.link src "" (B.str orig) angleLink :: OrgParser (F Inlines) angleLink = try $ do char '<' link <- plainLink char '>' return link linkTarget :: OrgParser String linkTarget = enclosedByPair '[' ']' (noneOf "\n\r[]") possiblyEmptyLinkTarget :: OrgParser String possiblyEmptyLinkTarget = try linkTarget <|> ("" <$ string "[]") applyCustomLinkFormat :: String -> OrgParser (F String) applyCustomLinkFormat link = do let (linkType, rest) = break (== ':') link return $ do formatter <- M.lookup linkType <$> asksF orgStateLinkFormatters return $ maybe link ($ drop 1 rest) formatter -- | Take a link and return a function which produces new inlines when given -- description inlines. linkToInlinesF :: String -> Inlines -> F Inlines linkToInlinesF linkStr = case linkStr of "" -> pure . B.link mempty "" -- wiki link (empty by convention) ('#':_) -> pure . B.link linkStr "" -- document-local fraction _ -> case cleanLinkString linkStr of (Just cleanedLink) -> if isImageFilename cleanedLink then const . pure $ B.image cleanedLink "" "" else pure . B.link cleanedLink "" Nothing -> internalLink linkStr -- other internal link internalLink :: String -> Inlines -> F Inlines internalLink link title = do anchorB <- (link `elem`) <$> asksF orgStateAnchorIds if anchorB then return $ B.link ('#':link) "" title else return $ B.emph title -- | Parse an anchor like @<<anchor-id>>@ and return an empty span with -- @anchor-id@ set as id. Legal anchors in org-mode are defined through -- @org-target-regexp@, which is fairly liberal. Since no link is created if -- @anchor-id@ contains spaces, we are more restrictive in what is accepted as -- an anchor. anchor :: OrgParser (F Inlines) anchor = try $ do anchorId <- parseAnchor recordAnchorId anchorId returnF $ B.spanWith (solidify anchorId, [], []) mempty where parseAnchor = string "<<" *> many1 (noneOf "\t\n\r<>\"' ") <* string ">>" <* skipSpaces -- | Replace every char but [a-zA-Z0-9_.-:] with a hypen '-'. This mirrors -- the org function @org-export-solidify-link-text@. solidify :: String -> String solidify = map replaceSpecialChar where replaceSpecialChar c | isAlphaNum c = c | c `elem` ("_.-:" :: String) = c | otherwise = '-' -- | Parses an inline code block and marks it as an babel block. inlineCodeBlock :: OrgParser (F Inlines) inlineCodeBlock = try $ do string "src_" lang <- many1 orgArgWordChar opts <- option [] $ enclosedByPair '[' ']' inlineBlockOption inlineCode <- enclosedByPair '{' '}' (noneOf "\n\r") let attrClasses = [translateLang lang, rundocBlockClass] let attrKeyVal = map toRundocAttrib (("language", lang) : opts) returnF $ B.codeWith ("", attrClasses, attrKeyVal) inlineCode where inlineBlockOption :: OrgParser (String, String) inlineBlockOption = try $ do argKey <- orgArgKey paramValue <- option "yes" orgInlineParamValue return (argKey, paramValue) orgInlineParamValue :: OrgParser String orgInlineParamValue = try $ skipSpaces *> notFollowedBy (char ':') *> many1 (noneOf "\t\n\r ]") <* skipSpaces emphasizedText :: OrgParser (F Inlines) emphasizedText = do state <- getState guard . exportEmphasizedText . orgStateExportSettings $ state try $ choice [ emph , strong , strikeout , underline ] enclosedByPair :: Char -- ^ opening char -> Char -- ^ closing char -> OrgParser a -- ^ parser -> OrgParser [a] enclosedByPair s e p = char s *> many1Till p (char e) emph :: OrgParser (F Inlines) emph = fmap B.emph <$> emphasisBetween '/' strong :: OrgParser (F Inlines) strong = fmap B.strong <$> emphasisBetween '*' strikeout :: OrgParser (F Inlines) strikeout = fmap B.strikeout <$> emphasisBetween '+' -- There is no underline, so we use strong instead. underline :: OrgParser (F Inlines) underline = fmap B.strong <$> emphasisBetween '_' verbatim :: OrgParser (F Inlines) verbatim = return . B.code <$> verbatimBetween '=' code :: OrgParser (F Inlines) code = return . B.code <$> verbatimBetween '~' subscript :: OrgParser (F Inlines) subscript = fmap B.subscript <$> try (char '_' *> subOrSuperExpr) superscript :: OrgParser (F Inlines) superscript = fmap B.superscript <$> try (char '^' *> subOrSuperExpr) math :: OrgParser (F Inlines) math = return . B.math <$> choice [ math1CharBetween '$' , mathStringBetween '$' , rawMathBetween "\\(" "\\)" ] displayMath :: OrgParser (F Inlines) displayMath = return . B.displayMath <$> choice [ rawMathBetween "\\[" "\\]" , rawMathBetween "$$" "$$" ] updatePositions :: Char -> OrgParser Char updatePositions c = do when (c `elem` emphasisPreChars) updateLastPreCharPos when (c `elem` emphasisForbiddenBorderChars) updateLastForbiddenCharPos return c symbol :: OrgParser (F Inlines) symbol = return . B.str . (: "") <$> (oneOf specialChars >>= updatePositions) emphasisBetween :: Char -> OrgParser (F Inlines) emphasisBetween c = try $ do startEmphasisNewlinesCounting emphasisAllowedNewlines res <- enclosedInlines (emphasisStart c) (emphasisEnd c) isTopLevelEmphasis <- null . orgStateEmphasisCharStack <$> getState when isTopLevelEmphasis resetEmphasisNewlines return res verbatimBetween :: Char -> OrgParser String verbatimBetween c = try $ emphasisStart c *> many1TillNOrLessNewlines 1 verbatimChar (emphasisEnd c) where verbatimChar = noneOf "\n\r" >>= updatePositions -- | Parses a raw string delimited by @c@ using Org's math rules mathStringBetween :: Char -> OrgParser String mathStringBetween c = try $ do mathStart c body <- many1TillNOrLessNewlines mathAllowedNewlines (noneOf (c:"\n\r")) (lookAhead $ mathEnd c) final <- mathEnd c return $ body ++ [final] -- | Parse a single character between @c@ using math rules math1CharBetween :: Char -> OrgParser String math1CharBetween c = try $ do char c res <- noneOf $ c:mathForbiddenBorderChars char c eof <|> () <$ lookAhead (oneOf mathPostChars) return [res] rawMathBetween :: String -> String -> OrgParser String rawMathBetween s e = try $ string s *> manyTill anyChar (try $ string e) -- | Parses the start (opening character) of emphasis emphasisStart :: Char -> OrgParser Char emphasisStart c = try $ do guard =<< afterEmphasisPreChar guard =<< notAfterString char c lookAhead (noneOf emphasisForbiddenBorderChars) pushToInlineCharStack c -- nested inlines are allowed, so mark this position as one which might be -- followed by another inline. updateLastPreCharPos return c -- | Parses the closing character of emphasis emphasisEnd :: Char -> OrgParser Char emphasisEnd c = try $ do guard =<< notAfterForbiddenBorderChar char c eof <|> () <$ lookAhead acceptablePostChars updateLastStrPos popInlineCharStack return c where acceptablePostChars = surroundingEmphasisChar >>= \x -> oneOf (x ++ emphasisPostChars) mathStart :: Char -> OrgParser Char mathStart c = try $ char c <* notFollowedBy' (oneOf (c:mathForbiddenBorderChars)) mathEnd :: Char -> OrgParser Char mathEnd c = try $ do res <- noneOf (c:mathForbiddenBorderChars) char c eof <|> () <$ lookAhead (oneOf mathPostChars) return res enclosedInlines :: OrgParser a -> OrgParser b -> OrgParser (F Inlines) enclosedInlines start end = try $ trimInlinesF . mconcat <$> enclosed start end inline enclosedRaw :: OrgParser a -> OrgParser b -> OrgParser String enclosedRaw start end = try $ start *> (onSingleLine <|> spanningTwoLines) where onSingleLine = try $ many1Till (noneOf "\n\r") end spanningTwoLines = try $ anyLine >>= \f -> mappend (f <> " ") <$> onSingleLine -- | Like many1Till, but parses at most @n+1@ lines. @p@ must not consume -- newlines. many1TillNOrLessNewlines :: Int -> OrgParser Char -> OrgParser a -> OrgParser String many1TillNOrLessNewlines n p end = try $ nMoreLines (Just n) mempty >>= oneOrMore where nMoreLines Nothing cs = return cs nMoreLines (Just 0) cs = try $ (cs ++) <$> finalLine nMoreLines k cs = try $ (final k cs <|> rest k cs) >>= uncurry nMoreLines final _ cs = (\x -> (Nothing, cs ++ x)) <$> try finalLine rest m cs = (\x -> (minus1 <$> m, cs ++ x ++ "\n")) <$> try (manyTill p newline) finalLine = try $ manyTill p end minus1 k = k - 1 oneOrMore cs = guard (not $ null cs) *> return cs -- Org allows customization of the way it reads emphasis. We use the defaults -- here (see, e.g., the Emacs Lisp variable `org-emphasis-regexp-components` -- for details). -- | Chars allowed to occur before emphasis (spaces and newlines are ok, too) emphasisPreChars :: [Char] emphasisPreChars = "\t \"'({" -- | Chars allowed at after emphasis emphasisPostChars :: [Char] emphasisPostChars = "\t\n !\"'),-.:;?\\}" -- | Chars not allowed at the (inner) border of emphasis emphasisForbiddenBorderChars :: [Char] emphasisForbiddenBorderChars = "\t\n\r \"'," -- | The maximum number of newlines within emphasisAllowedNewlines :: Int emphasisAllowedNewlines = 1 -- LaTeX-style math: see `org-latex-regexps` for details -- | Chars allowed after an inline ($...$) math statement mathPostChars :: [Char] mathPostChars = "\t\n \"'),-.:;?" -- | Chars not allowed at the (inner) border of math mathForbiddenBorderChars :: [Char] mathForbiddenBorderChars = "\t\n\r ,;.$" -- | Maximum number of newlines in an inline math statement mathAllowedNewlines :: Int mathAllowedNewlines = 2 -- | Whether we are right behind a char allowed before emphasis afterEmphasisPreChar :: OrgParser Bool afterEmphasisPreChar = do pos <- getPosition lastPrePos <- orgStateLastPreCharPos <$> getState return . fromMaybe True $ (== pos) <$> lastPrePos -- | Whether the parser is right after a forbidden border char notAfterForbiddenBorderChar :: OrgParser Bool notAfterForbiddenBorderChar = do pos <- getPosition lastFBCPos <- orgStateLastForbiddenCharPos <$> getState return $ lastFBCPos /= Just pos -- | Read a sub- or superscript expression subOrSuperExpr :: OrgParser (F Inlines) subOrSuperExpr = try $ choice [ id <$> charsInBalanced '{' '}' (noneOf "\n\r") , enclosing ('(', ')') <$> charsInBalanced '(' ')' (noneOf "\n\r") , simpleSubOrSuperString ] >>= parseFromString (mconcat <$> many inline) where enclosing (left, right) s = left : s ++ [right] simpleSubOrSuperString :: OrgParser String simpleSubOrSuperString = try $ do state <- getState guard . exportSubSuperscripts . orgStateExportSettings $ state choice [ string "*" , mappend <$> option [] ((:[]) <$> oneOf "+-") <*> many1 alphaNum ] inlineLaTeX :: OrgParser (F Inlines) inlineLaTeX = try $ do cmd <- inlineLaTeXCommand maybe mzero returnF $ parseAsMath cmd `mplus` parseAsMathMLSym cmd `mplus` parseAsInlineLaTeX cmd where parseAsMath :: String -> Maybe Inlines parseAsMath cs = B.fromList <$> texMathToPandoc cs parseAsInlineLaTeX :: String -> Maybe Inlines parseAsInlineLaTeX cs = maybeRight $ runParser inlineCommand state "" cs parseAsMathMLSym :: String -> Maybe Inlines parseAsMathMLSym cs = B.str <$> MathMLEntityMap.getUnicode (clean cs) -- drop initial backslash and any trailing "{}" where clean = dropWhileEnd (`elem` ("{}" :: String)) . drop 1 state :: ParserState state = def{ stateOptions = def{ readerParseRaw = True }} texMathToPandoc :: String -> Maybe [Inline] texMathToPandoc cs = (maybeRight $ readTeX cs) >>= writePandoc DisplayInline maybeRight :: Either a b -> Maybe b maybeRight = either (const Nothing) Just inlineLaTeXCommand :: OrgParser String inlineLaTeXCommand = try $ do rest <- getInput case runParser rawLaTeXInline def "source" rest of Right (RawInline _ cs) -> do -- drop any trailing whitespace, those are not be part of the command as -- far as org mode is concerned. let cmdNoSpc = dropWhileEnd isSpace cs let len = length cmdNoSpc count len anyChar return cmdNoSpc _ -> mzero -- Taken from Data.OldList. dropWhileEnd :: (a -> Bool) -> [a] -> [a] dropWhileEnd p = foldr (\x xs -> if p x && null xs then [] else x : xs) [] exportSnippet :: OrgParser (F Inlines) exportSnippet = try $ do string "@@" format <- many1Till (alphaNum <|> char '-') (char ':') snippet <- manyTill anyChar (try $ string "@@") returnF $ B.rawInline format snippet smart :: OrgParser (F Inlines) smart = do getOption readerSmart >>= guard doubleQuoted <|> singleQuoted <|> choice (map (return <$>) [orgApostrophe, orgDash, orgEllipses]) where orgDash = do guard =<< getExportSetting exportSpecialStrings dash <* updatePositions '-' orgEllipses = do guard =<< getExportSetting exportSpecialStrings ellipses <* updatePositions '.' orgApostrophe = (char '\'' <|> char '\8217') <* updateLastPreCharPos <* updateLastForbiddenCharPos *> return (B.str "\x2019") singleQuoted :: OrgParser (F Inlines) singleQuoted = try $ do guard =<< getExportSetting exportSmartQuotes singleQuoteStart updatePositions '\'' withQuoteContext InSingleQuote $ fmap B.singleQuoted . trimInlinesF . mconcat <$> 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 -- in the same paragraph. doubleQuoted :: OrgParser (F Inlines) doubleQuoted = try $ do guard =<< getExportSetting exportSmartQuotes doubleQuoteStart updatePositions '"' contents <- mconcat <$> many (try $ notFollowedBy doubleQuoteEnd >> inline) (withQuoteContext InDoubleQuote $ (doubleQuoteEnd <* updateLastForbiddenCharPos) >> return (fmap B.doubleQuoted . trimInlinesF $ contents)) <|> (return $ return (B.str "\8220") <> contents) �����������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Org/Meta.hs�������������������������������������������������0000644�0000000�0000000�00000017733�13155240142�017665� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TupleSections #-} {- Copyright (C) 2014-2017 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 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.Readers.Org.Meta Copyright : Copyright (C) 2014-2017 Albert Krewinkel License : GNU GPL, version 2 or above Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de> Parsers for Org-mode meta declarations. -} module Text.Pandoc.Readers.Org.Meta ( metaExport , metaKey , metaLine ) where import Text.Pandoc.Readers.Org.BlockStarts import Text.Pandoc.Readers.Org.ExportSettings ( exportSettings ) import Text.Pandoc.Readers.Org.Inlines import Text.Pandoc.Readers.Org.ParserState import Text.Pandoc.Readers.Org.Parsing import qualified Text.Pandoc.Builder as B import Text.Pandoc.Builder ( Blocks, Inlines ) import Text.Pandoc.Definition import Control.Monad ( mzero, void ) import Data.Char ( toLower ) import Data.List ( intersperse ) import qualified Data.Map as M import Data.Monoid ( (<>) ) import Network.HTTP ( urlEncode ) -- | Returns the current meta, respecting export options. metaExport :: OrgParser (F Meta) metaExport = do st <- getState let settings = orgStateExportSettings st return $ (if exportWithAuthor settings then id else removeMeta "author") . (if exportWithCreator settings then id else removeMeta "creator") . (if exportWithEmail settings then id else removeMeta "email") <$> orgStateMeta st removeMeta :: String -> Meta -> Meta removeMeta key meta' = let metaMap = unMeta meta' in Meta $ M.delete key metaMap -- | Parse and handle a single line containing meta information -- The order, in which blocks are tried, makes sure that we're not looking at -- the beginning of a block, so we don't need to check for it metaLine :: OrgParser Blocks metaLine = mempty <$ metaLineStart <* (optionLine <|> declarationLine) declarationLine :: OrgParser () declarationLine = try $ do key <- map toLower <$> metaKey (key', value) <- metaValue key updateState $ \st -> let meta' = B.setMeta key' <$> value <*> pure nullMeta in st { orgStateMeta = meta' <> orgStateMeta st } metaKey :: OrgParser String metaKey = map toLower <$> many1 (noneOf ": \n\r") <* char ':' <* skipSpaces metaValue :: String -> OrgParser (String, (F MetaValue)) metaValue key = let inclKey = "header-includes" in case key of "author" -> (key,) <$> metaInlinesCommaSeparated "title" -> (key,) <$> metaInlines "date" -> (key,) <$> metaInlines "header-includes" -> (key,) <$> accumulatingList key metaInlines "latex_header" -> (inclKey,) <$> accumulatingList inclKey (metaExportSnippet "latex") "latex_class" -> ("documentclass",) <$> metaString -- Org-mode expects class options to contain the surrounding brackets, -- pandoc does not. "latex_class_options" -> ("classoption",) <$> metaModifiedString (filter (`notElem` "[]")) "html_head" -> (inclKey,) <$> accumulatingList inclKey (metaExportSnippet "html") _ -> (key,) <$> metaString metaInlines :: OrgParser (F MetaValue) metaInlines = fmap (MetaInlines . B.toList) <$> inlinesTillNewline metaInlinesCommaSeparated :: OrgParser (F MetaValue) metaInlinesCommaSeparated = do authStrs <- (many1 (noneOf ",\n")) `sepBy1` (char ',') newline authors <- mapM (parseFromString inlinesTillNewline . (++ "\n")) authStrs let toMetaInlines = MetaInlines . B.toList return $ MetaList . map toMetaInlines <$> sequence authors metaString :: OrgParser (F MetaValue) metaString = metaModifiedString id metaModifiedString :: (String -> String) -> OrgParser (F MetaValue) metaModifiedString f = return . MetaString . f <$> anyLine -- | Read an format specific meta definition metaExportSnippet :: String -> OrgParser (F MetaValue) metaExportSnippet format = return . MetaInlines . B.toList . B.rawInline format <$> anyLine -- | Accumulate the result of the @parser@ in a list under @key@. accumulatingList :: String -> OrgParser (F MetaValue) -> OrgParser (F MetaValue) accumulatingList key p = do value <- p meta' <- orgStateMeta <$> getState return $ (\m v -> MetaList (curList m ++ [v])) <$> meta' <*> value where curList m = case lookupMeta key m of Just (MetaList ms) -> ms Just x -> [x] _ -> [] -- -- export options -- optionLine :: OrgParser () optionLine = try $ do key <- metaKey case key of "link" -> parseLinkFormat >>= uncurry addLinkFormat "options" -> exportSettings "todo" -> todoSequence >>= updateState . registerTodoSequence "seq_todo" -> todoSequence >>= updateState . registerTodoSequence "typ_todo" -> todoSequence >>= updateState . registerTodoSequence _ -> mzero addLinkFormat :: String -> (String -> String) -> OrgParser () addLinkFormat key formatter = updateState $ \s -> let fs = orgStateLinkFormatters s in s{ orgStateLinkFormatters = M.insert key formatter fs } parseLinkFormat :: OrgParser ((String, String -> String)) parseLinkFormat = try $ do linkType <- (:) <$> letter <*> many (alphaNum <|> oneOf "-_") <* skipSpaces linkSubst <- parseFormat return (linkType, linkSubst) -- | An ad-hoc, single-argument-only implementation of a printf-style format -- parser. parseFormat :: OrgParser (String -> String) parseFormat = try $ do replacePlain <|> replaceUrl <|> justAppend where -- inefficient, but who cares replacePlain = try $ (\x -> concat . flip intersperse x) <$> sequence [tillSpecifier 's', rest] replaceUrl = try $ (\x -> concat . flip intersperse x . urlEncode) <$> sequence [tillSpecifier 'h', rest] justAppend = try $ (++) <$> rest rest = manyTill anyChar (eof <|> () <$ oneOf "\n\r") tillSpecifier c = manyTill (noneOf "\n\r") (try $ string ('%':c:"")) inlinesTillNewline :: OrgParser (F Inlines) inlinesTillNewline = trimInlinesF . mconcat <$> manyTill inline newline -- -- ToDo Sequences and Keywords -- todoSequence :: OrgParser TodoSequence todoSequence = try $ do todoKws <- todoKeywords doneKws <- optionMaybe $ todoDoneSep *> todoKeywords newline -- There must be at least one DONE keyword. The last TODO keyword is taken if -- necessary. case doneKws of Just done -> return $ keywordsToSequence todoKws done Nothing -> case reverse todoKws of [] -> mzero -- no keywords present (x:xs) -> return $ keywordsToSequence (reverse xs) [x] where todoKeywords :: OrgParser [String] todoKeywords = try $ let keyword = many1 nonspaceChar <* skipSpaces endOfKeywords = todoDoneSep <|> void newline in manyTill keyword (lookAhead endOfKeywords) todoDoneSep :: OrgParser () todoDoneSep = void . try $ skipSpaces *> char '|' <* skipSpaces1 keywordsToSequence :: [String] -> [String] -> TodoSequence keywordsToSequence todo done = let todoMarkers = map (TodoMarker Todo) todo doneMarkers = map (TodoMarker Done) done in todoMarkers ++ doneMarkers �������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Org/ParserState.hs������������������������������������������0000644�0000000�0000000�00000021736�13155240142�021232� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {- Copyright (C) 2014-2016 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 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.Readers.Org.Options Copyright : Copyright (C) 2014-2016 Albert Krewinkel License : GNU GPL, version 2 or above Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de> Define the Org-mode parser state. -} module Text.Pandoc.Readers.Org.ParserState ( OrgParserState (..) , OrgParserLocal (..) , OrgNoteRecord , HasReaderOptions (..) , HasQuoteContext (..) , TodoMarker (..) , TodoSequence , TodoState (..) , activeTodoMarkers , registerTodoSequence , F(..) , askF , asksF , trimInlinesF , runF , returnF , ExportSettings (..) , ArchivedTreesOption (..) , optionsToParserState ) where import Control.Monad (liftM, liftM2) import Control.Monad.Reader (Reader, runReader, ask, asks, local) import Data.Default (Default(..)) import qualified Data.Map as M import qualified Data.Set as Set import Text.Pandoc.Builder ( Inlines, Blocks, trimInlines ) import Text.Pandoc.Definition ( Meta(..), nullMeta ) import Text.Pandoc.Options ( ReaderOptions(..) ) import Text.Pandoc.Parsing ( HasHeaderMap(..) , HasIdentifierList(..) , HasLastStrPosition(..) , HasQuoteContext(..) , HasReaderOptions(..) , ParserContext(..) , QuoteContext(..) , SourcePos ) -- | An inline note / footnote containing the note key and its (inline) value. type OrgNoteRecord = (String, F Blocks) -- | Table of footnotes type OrgNoteTable = [OrgNoteRecord] -- | Map of functions for link transformations. The map key is refers to the -- link-type, the corresponding function transforms the given link string. type OrgLinkFormatters = M.Map String (String -> String) -- | The states in which a todo item can be data TodoState = Todo | Done deriving (Eq, Ord, Show) -- | A ToDo keyword like @TODO@ or @DONE@. data TodoMarker = TodoMarker { todoMarkerState :: TodoState , todoMarkerName :: String } deriving (Show, Eq) -- | Collection of todo markers in the order in which items should progress type TodoSequence = [TodoMarker] -- | Org-mode parser state data OrgParserState = OrgParserState { orgStateAnchorIds :: [String] , orgStateEmphasisCharStack :: [Char] , orgStateEmphasisNewlines :: Maybe Int , orgStateExportSettings :: ExportSettings , orgStateHeaderMap :: M.Map Inlines String , orgStateIdentifiers :: Set.Set String , orgStateLastForbiddenCharPos :: Maybe SourcePos , orgStateLastPreCharPos :: Maybe SourcePos , orgStateLastStrPos :: Maybe SourcePos , orgStateLinkFormatters :: OrgLinkFormatters , orgStateMeta :: F Meta , orgStateNotes' :: OrgNoteTable , orgStateOptions :: ReaderOptions , orgStateParserContext :: ParserContext , orgStateTodoSequences :: [TodoSequence] } data OrgParserLocal = OrgParserLocal { orgLocalQuoteContext :: QuoteContext } instance Default OrgParserLocal where def = OrgParserLocal NoQuote instance HasReaderOptions OrgParserState where extractReaderOptions = orgStateOptions instance HasLastStrPosition OrgParserState where getLastStrPos = orgStateLastStrPos setLastStrPos pos st = st{ orgStateLastStrPos = Just pos } instance HasQuoteContext st (Reader OrgParserLocal) where getQuoteContext = asks orgLocalQuoteContext withQuoteContext q = local (\s -> s{orgLocalQuoteContext = q}) 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) } instance Default OrgParserState where def = defaultOrgParserState defaultOrgParserState :: OrgParserState defaultOrgParserState = OrgParserState { orgStateAnchorIds = [] , orgStateEmphasisCharStack = [] , orgStateEmphasisNewlines = Nothing , orgStateExportSettings = def , orgStateHeaderMap = M.empty , orgStateIdentifiers = Set.empty , orgStateLastForbiddenCharPos = Nothing , orgStateLastPreCharPos = Nothing , orgStateLastStrPos = Nothing , orgStateLinkFormatters = M.empty , orgStateMeta = return nullMeta , orgStateNotes' = [] , orgStateOptions = def , orgStateParserContext = NullState , orgStateTodoSequences = [] } optionsToParserState :: ReaderOptions -> OrgParserState optionsToParserState opts = def { orgStateOptions = opts } registerTodoSequence :: TodoSequence -> OrgParserState -> OrgParserState registerTodoSequence todoSeq st = let curSeqs = orgStateTodoSequences st in st{ orgStateTodoSequences = todoSeq : curSeqs } -- | Get the current todo/done sequences. If no custom todo sequences have been -- defined, return a list containing just the default todo/done sequence. activeTodoSequences :: OrgParserState -> [TodoSequence] activeTodoSequences st = let curSeqs = orgStateTodoSequences st in if null curSeqs then [[ TodoMarker Todo "TODO" , TodoMarker Done "DONE" ]] else curSeqs activeTodoMarkers :: OrgParserState -> TodoSequence activeTodoMarkers = concat . activeTodoSequences -- -- Export Settings -- -- | Options for the way archived trees are handled. data ArchivedTreesOption = ArchivedTreesExport -- ^ Export the complete tree | ArchivedTreesNoExport -- ^ Exclude archived trees from exporting | ArchivedTreesHeadlineOnly -- ^ Export only the headline, discard the contents -- | Export settings <http://orgmode.org/manual/Export-settings.html> -- These settings can be changed via OPTIONS statements. data ExportSettings = ExportSettings { exportArchivedTrees :: ArchivedTreesOption -- ^ How to treat archived trees , exportDrawers :: Either [String] [String] -- ^ Specify drawer names which should be exported. @Left@ names are -- explicitly excluded from the resulting output while @Right@ means that -- only the listed drawer names should be included. , exportEmphasizedText :: Bool -- ^ Parse emphasized text , exportHeadlineLevels :: Int -- ^ Maximum depth of headlines, deeper headlines are convert to list , exportSmartQuotes :: Bool -- ^ Parse quotes smartly , exportSpecialStrings :: Bool -- ^ Parse ellipses and dashes smartly , exportSubSuperscripts :: Bool -- ^ TeX-like syntax for sub- and superscripts , exportWithAuthor :: Bool -- ^ Include author in final meta-data , exportWithCreator :: Bool -- ^ Include creator in final meta-data , exportWithEmail :: Bool -- ^ Include email in final meta-data , exportWithTodoKeywords :: Bool -- ^ Keep TODO keywords in headers } instance Default ExportSettings where def = defaultExportSettings defaultExportSettings :: ExportSettings defaultExportSettings = ExportSettings { exportArchivedTrees = ArchivedTreesHeadlineOnly , exportDrawers = Left ["LOGBOOK"] , exportEmphasizedText = True , exportHeadlineLevels = 3 , exportSmartQuotes = True , exportSpecialStrings = True , exportSubSuperscripts = True , exportWithAuthor = True , exportWithCreator = True , exportWithEmail = True , exportWithTodoKeywords = True } -- -- Parser state reader -- -- | Reader monad wrapping the parser state. This is used to delay evaluation -- until all relevant information has been parsed and made available in the -- parser state. See also the newtype of the same name in -- Text.Pandoc.Parsing. newtype F a = F { unF :: Reader OrgParserState a } deriving (Functor, Applicative, Monad) instance Monoid a => Monoid (F a) where mempty = return mempty mappend = liftM2 mappend mconcat = fmap mconcat . sequence runF :: F a -> OrgParserState -> a runF = runReader . unF askF :: F OrgParserState askF = F ask asksF :: (OrgParserState -> a) -> F a asksF f = F $ asks f trimInlinesF :: F Inlines -> F Inlines trimInlinesF = liftM trimInlines returnF :: Monad m => a -> m (F a) returnF = return . return ����������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Org/Parsing.hs����������������������������������������������0000644�0000000�0000000�00000013140�13155240142�020366� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2014-2016 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 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.Readers.Org.Options Copyright : Copyright (C) 2014-2016 Albert Krewinkel License : GNU GPL, version 2 or above Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de> Org-mode parsing utilities. Most functions are simply re-exports from @Text.Pandoc.Parsing@, some functions are adapted to Org-mode specific functionality. -} module Text.Pandoc.Readers.Org.Parsing ( OrgParser , anyLine , blanklines , newline , parseFromString , skipSpaces1 , inList , withContext , getExportSetting , updateLastForbiddenCharPos , updateLastPreCharPos , orgArgKey , orgArgWord , orgArgWordChar -- * Re-exports from Text.Pandoc.Parser , ParserContext (..) , many1Till , notFollowedBy' , spaceChar , nonspaceChar , skipSpaces , blankline , enclosed , stringAnyCase , charsInBalanced , uri , withRaw , readWithM , guardEnabled , updateLastStrPos , notAfterString , ParserState (..) , registerHeader , QuoteContext (..) , singleQuoteStart , singleQuoteEnd , doubleQuoteStart , doubleQuoteEnd , dash , ellipses , citeKey -- * Re-exports from Text.Pandoc.Parsec , runParser , getInput , char , letter , digit , alphaNum , skipMany1 , spaces , anyChar , satisfy , string , count , eof , noneOf , oneOf , lookAhead , notFollowedBy , many , many1 , manyTill , (<|>) , (<?>) , choice , try , sepBy , sepBy1 , sepEndBy1 , option , optional , optionMaybe , getState , updateState , SourcePos , getPosition ) where import Text.Pandoc.Readers.Org.ParserState import qualified Text.Pandoc.Parsing as P import Text.Pandoc.Parsing hiding ( anyLine, blanklines, newline , parseFromString ) import Control.Monad ( guard ) import Control.Monad.Reader ( Reader ) -- | The parser used to read org files. type OrgParser = ParserT [Char] OrgParserState (Reader OrgParserLocal) -- -- Adaptions and specializations of parsing utilities -- -- | Parse any line of text anyLine :: OrgParser String anyLine = P.anyLine <* updateLastPreCharPos <* updateLastForbiddenCharPos -- The version Text.Pandoc.Parsing cannot be used, as we need additional parts -- of the state saved and restored. parseFromString :: OrgParser a -> String -> OrgParser a parseFromString parser str' = do oldLastPreCharPos <- orgStateLastPreCharPos <$> getState updateState $ \s -> s{ orgStateLastPreCharPos = Nothing } result <- P.parseFromString parser str' updateState $ \s -> s{ orgStateLastPreCharPos = oldLastPreCharPos } return result -- | Skip one or more tab or space characters. skipSpaces1 :: OrgParser () skipSpaces1 = skipMany1 spaceChar -- | Like @Text.Parsec.Char.newline@, but causes additional state changes. newline :: OrgParser Char newline = P.newline <* updateLastPreCharPos <* updateLastForbiddenCharPos -- | Like @Text.Parsec.Char.blanklines@, but causes additional state changes. blanklines :: OrgParser [Char] blanklines = P.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 -- -- Parser state functions -- -- | Get an export setting. getExportSetting :: (ExportSettings -> a) -> OrgParser a getExportSetting s = s . orgStateExportSettings <$> getState -- | Set the current position as the last position at which a forbidden char -- was found (i.e. a character which is not allowed at the inner border of -- markup). updateLastForbiddenCharPos :: OrgParser () updateLastForbiddenCharPos = getPosition >>= \p -> updateState $ \s -> s{ orgStateLastForbiddenCharPos = Just p} -- | Set the current parser position as the position at which a character was -- seen which allows inline markup to follow. updateLastPreCharPos :: OrgParser () updateLastPreCharPos = getPosition >>= \p -> updateState $ \s -> s{ orgStateLastPreCharPos = Just p} -- -- Org key-value parsing -- -- | Read the key of a plist style key-value list. orgArgKey :: OrgParser String orgArgKey = try $ skipSpaces *> char ':' *> many1 orgArgWordChar -- | Read the value of a plist style key-value list. orgArgWord :: OrgParser String orgArgWord = many1 orgArgWordChar -- | Chars treated as part of a word in plists. orgArgWordChar :: OrgParser Char orgArgWordChar = alphaNum <|> oneOf "-_" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Readers/Org/Shared.hs�����������������������������������������������0000644�0000000�0000000�00000006641�13155240142�020201� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2014-2016 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 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.Readers.Org.Options Copyright : Copyright (C) 2014-2016 Albert Krewinkel License : GNU GPL, version 2 or above Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de> Utility functions used in other Pandoc Org modules. -} module Text.Pandoc.Readers.Org.Shared ( cleanLinkString , isImageFilename , rundocBlockClass , toRundocAttrib , translateLang ) where import Control.Arrow ( first ) import Data.Char ( isAlphaNum ) import Data.List ( isPrefixOf, isSuffixOf ) -- | Check whether the given string looks like the path to of URL of an image. isImageFilename :: String -> Bool isImageFilename filename = any (\x -> ('.':x) `isSuffixOf` filename) imageExtensions && (any (\x -> (x ++ "://") `isPrefixOf` filename) protocols || ':' `notElem` filename) where imageExtensions = [ "jpeg" , "jpg" , "png" , "gif" , "svg" ] protocols = [ "file", "http", "https" ] -- | Cleanup and canonicalize a string describing a link. Return @Nothing@ if -- the string does not appear to be a link. cleanLinkString :: String -> Maybe String cleanLinkString s = case s of '/':_ -> Just $ "file://" ++ s -- absolute path '.':'/':_ -> Just s -- relative path '.':'.':'/':_ -> Just s -- relative path -- Relative path or URL (file schema) 'f':'i':'l':'e':':':s' -> Just $ if ("//" `isPrefixOf` s') then s else s' _ | isUrl s -> Just s -- URL _ -> Nothing where isUrl :: String -> Bool isUrl cs = let (scheme, path) = break (== ':') cs in all (\c -> isAlphaNum c || c `elem` (".-"::String)) scheme && not (null path) -- | Prefix used for Rundoc classes and arguments. rundocPrefix :: String rundocPrefix = "rundoc-" -- | The class-name used to mark rundoc blocks. rundocBlockClass :: String rundocBlockClass = rundocPrefix ++ "block" -- | Prefix the name of a attribute, marking it as a code execution parameter. toRundocAttrib :: (String, String) -> (String, String) toRundocAttrib = first (rundocPrefix ++) -- | Translate from Org-mode's programming language identifiers to those used -- by Pandoc. This is useful to allow for proper syntax highlighting in -- Pandoc output. translateLang :: String -> String translateLang cs = case cs of "C" -> "c" "C++" -> "cpp" "emacs-lisp" -> "commonlisp" -- emacs lisp is not supported "js" -> "javascript" "lisp" -> "commonlisp" "R" -> "r" "sh" -> "bash" "sqlite" -> "sql" _ -> cs �����������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Writers/Shared.hs���������������������������������������������������0000644�0000000�0000000�00000014570�13155240142�017524� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2013-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.Writers.Shared Copyright : Copyright (C) 2013-2015 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable Shared utility functions for pandoc writers. -} module Text.Pandoc.Writers.Shared ( metaToJSON , getField , setField , defField , tagWithAttrs , fixDisplayMath ) where import Text.Pandoc.Definition import Text.Pandoc.Pretty import Text.Pandoc.XML (escapeStringForXML) import Control.Monad (liftM) import Text.Pandoc.Options (WriterOptions(..)) import qualified Data.HashMap.Strict as H import qualified Data.Map as M import qualified Data.Text as T import Data.Aeson (FromJSON(..), fromJSON, ToJSON (..), Value(Object), Result(..), encode) import Text.Pandoc.UTF8 (toStringLazy) import qualified Data.Traversable as Traversable import Data.List ( groupBy ) import Data.Maybe ( isJust ) -- | Create JSON value for template from a 'Meta' and an association list -- of variables, specified at the command line or in the writer. -- Variables overwrite metadata fields with the same names. -- If multiple variables are set with the same name, a list is -- assigned. metaToJSON :: Monad m => WriterOptions -> ([Block] -> m String) -> ([Inline] -> m String) -> Meta -> m Value metaToJSON opts blockWriter inlineWriter (Meta metamap) | isJust (writerTemplate opts) = do let baseContext = foldl (\acc (x,y) -> setField x y acc) (Object H.empty) $ writerVariables opts renderedMap <- Traversable.mapM (metaValueToJSON blockWriter inlineWriter) metamap let metadata = M.foldWithKey defField baseContext renderedMap return $ defField "meta-json" (toStringLazy $ encode metadata) metadata | otherwise = return (Object H.empty) metaValueToJSON :: Monad m => ([Block] -> m String) -> ([Inline] -> m String) -> MetaValue -> m Value metaValueToJSON blockWriter inlineWriter (MetaMap metamap) = liftM toJSON $ Traversable.mapM (metaValueToJSON blockWriter inlineWriter) metamap metaValueToJSON blockWriter inlineWriter (MetaList xs) = liftM toJSON $ Traversable.mapM (metaValueToJSON blockWriter inlineWriter) xs metaValueToJSON _ _ (MetaBool b) = return $ toJSON b metaValueToJSON _ _ (MetaString s) = return $ toJSON s metaValueToJSON blockWriter _ (MetaBlocks bs) = liftM toJSON $ blockWriter bs metaValueToJSON _ inlineWriter (MetaInlines bs) = liftM toJSON $ inlineWriter bs -- | Retrieve a field value from a JSON object. getField :: FromJSON a => String -> Value -> Maybe a getField field (Object hashmap) = do result <- H.lookup (T.pack field) hashmap case fromJSON result of Success x -> return x _ -> fail "Could not convert from JSON" getField _ _ = fail "Not a JSON object" setField :: ToJSON a => String -> a -> Value -> Value -- | Set a field of a JSON object. If the field already has a value, -- convert it into a list with the new value appended to the old value(s). -- This is a utility function to be used in preparing template contexts. setField field val (Object hashmap) = Object $ H.insertWith combine (T.pack field) (toJSON val) hashmap where combine newval oldval = case fromJSON oldval of Success xs -> toJSON $ xs ++ [newval] _ -> toJSON [oldval, newval] setField _ _ x = x defField :: ToJSON a => String -> a -> Value -> Value -- | Set a field of a JSON object if it currently has no value. -- If it has a value, do nothing. -- This is a utility function to be used in preparing template contexts. defField field val (Object hashmap) = Object $ H.insertWith f (T.pack field) (toJSON val) hashmap where f _newval oldval = oldval defField _ _ x = x -- Produce an HTML tag with the given pandoc attributes. tagWithAttrs :: String -> Attr -> Doc tagWithAttrs tag (ident,classes,kvs) = hsep ["<" <> text tag ,if null ident then empty else "id=" <> doubleQuotes (text ident) ,if null classes then empty else "class=" <> doubleQuotes (text (unwords classes)) ,hsep (map (\(k,v) -> text k <> "=" <> doubleQuotes (text (escapeStringForXML v))) kvs) ] <> ">" isDisplayMath :: Inline -> Bool isDisplayMath (Math DisplayMath _) = True isDisplayMath _ = False stripLeadingTrailingSpace :: [Inline] -> [Inline] stripLeadingTrailingSpace = go . reverse . go . reverse where go (Space:xs) = xs go (SoftBreak:xs) = xs go xs = xs -- Put display math in its own block (for ODT/DOCX). fixDisplayMath :: Block -> Block fixDisplayMath (Plain lst) | any isDisplayMath lst && not (all isDisplayMath lst) = -- chop into several paragraphs so each displaymath is its own Div ("",["math"],[]) $ map (Plain . stripLeadingTrailingSpace) $ groupBy (\x y -> (isDisplayMath x && isDisplayMath y) || not (isDisplayMath x || isDisplayMath y)) lst fixDisplayMath (Para lst) | any isDisplayMath lst && not (all isDisplayMath lst) = -- chop into several paragraphs so each displaymath is its own Div ("",["math"],[]) $ map (Para . stripLeadingTrailingSpace) $ groupBy (\x y -> (isDisplayMath x && isDisplayMath y) || not (isDisplayMath x || isDisplayMath y)) lst fixDisplayMath x = x ����������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Asciify.hs����������������������������������������������������������0000644�0000000�0000000�00000016716�13155240142�016252� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2013-2016 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.Asciify Copyright : Copyright (C) 2013-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable Function to convert accented latin letters to their unaccented ascii equivalents (used in constructing HTML identifiers). -} module Text.Pandoc.Asciify (toAsciiChar) where import qualified Data.Map as M import Data.Char (isAscii) toAsciiChar :: Char -> Maybe Char toAsciiChar c | isAscii c = Just c | otherwise = M.lookup c asciiMap asciiMap :: M.Map Char Char asciiMap = M.fromList [('\192','A') ,('\193','A') ,('\194','A') ,('\195','A') ,('\196','A') ,('\197','A') ,('\199','C') ,('\200','E') ,('\201','E') ,('\202','E') ,('\203','E') ,('\204','I') ,('\205','I') ,('\206','I') ,('\207','I') ,('\209','N') ,('\210','O') ,('\211','O') ,('\212','O') ,('\213','O') ,('\214','O') ,('\217','U') ,('\218','U') ,('\219','U') ,('\220','U') ,('\221','Y') ,('\224','a') ,('\225','a') ,('\226','a') ,('\227','a') ,('\228','a') ,('\229','a') ,('\231','c') ,('\232','e') ,('\233','e') ,('\234','e') ,('\235','e') ,('\236','i') ,('\237','i') ,('\238','i') ,('\239','i') ,('\241','n') ,('\242','o') ,('\243','o') ,('\244','o') ,('\245','o') ,('\246','o') ,('\249','u') ,('\250','u') ,('\251','u') ,('\252','u') ,('\253','y') ,('\255','y') ,('\256','A') ,('\257','a') ,('\258','A') ,('\259','a') ,('\260','A') ,('\261','a') ,('\262','C') ,('\263','c') ,('\264','C') ,('\265','c') ,('\266','C') ,('\267','c') ,('\268','C') ,('\269','c') ,('\270','D') ,('\271','d') ,('\274','E') ,('\275','e') ,('\276','E') ,('\277','e') ,('\278','E') ,('\279','e') ,('\280','E') ,('\281','e') ,('\282','E') ,('\283','e') ,('\284','G') ,('\285','g') ,('\286','G') ,('\287','g') ,('\288','G') ,('\289','g') ,('\290','G') ,('\291','g') ,('\292','H') ,('\293','h') ,('\296','I') ,('\297','i') ,('\298','I') ,('\299','i') ,('\300','I') ,('\301','i') ,('\302','I') ,('\303','i') ,('\304','I') ,('\308','J') ,('\309','j') ,('\310','K') ,('\311','k') ,('\313','L') ,('\314','l') ,('\315','L') ,('\316','l') ,('\317','L') ,('\318','l') ,('\323','N') ,('\324','n') ,('\325','N') ,('\326','n') ,('\327','N') ,('\328','n') ,('\332','O') ,('\333','o') ,('\334','O') ,('\335','o') ,('\336','O') ,('\337','o') ,('\340','R') ,('\341','r') ,('\342','R') ,('\343','r') ,('\344','R') ,('\345','r') ,('\346','S') ,('\347','s') ,('\348','S') ,('\349','s') ,('\350','S') ,('\351','s') ,('\352','S') ,('\353','s') ,('\354','T') ,('\355','t') ,('\356','T') ,('\357','t') ,('\360','U') ,('\361','u') ,('\362','U') ,('\363','u') ,('\364','U') ,('\365','u') ,('\366','U') ,('\367','u') ,('\368','U') ,('\369','u') ,('\370','U') ,('\371','u') ,('\372','W') ,('\373','w') ,('\374','Y') ,('\375','y') ,('\376','Y') ,('\377','Z') ,('\378','z') ,('\379','Z') ,('\380','z') ,('\381','Z') ,('\382','z') ,('\416','O') ,('\417','o') ,('\431','U') ,('\432','u') ,('\461','A') ,('\462','a') ,('\463','I') ,('\464','i') ,('\465','O') ,('\466','o') ,('\467','U') ,('\468','u') ,('\486','G') ,('\487','g') ,('\488','K') ,('\489','k') ,('\490','O') ,('\491','o') ,('\496','j') ,('\500','G') ,('\501','g') ,('\504','N') ,('\505','n') ,('\512','A') ,('\513','a') ,('\514','A') ,('\515','a') ,('\516','E') ,('\517','e') ,('\518','E') ,('\519','e') ,('\520','I') ,('\521','i') ,('\522','I') ,('\523','i') ,('\524','O') ,('\525','o') ,('\526','O') ,('\527','o') ,('\528','R') ,('\529','r') ,('\530','R') ,('\531','r') ,('\532','U') ,('\533','u') ,('\534','U') ,('\535','u') ,('\536','S') ,('\537','s') ,('\538','T') ,('\539','t') ,('\542','H') ,('\543','h') ,('\550','A') ,('\551','a') ,('\552','E') ,('\553','e') ,('\558','O') ,('\559','o') ,('\562','Y') ,('\563','y') ,('\894',';') ,('\7680','A') ,('\7681','a') ,('\7682','B') ,('\7683','b') ,('\7684','B') ,('\7685','b') ,('\7686','B') ,('\7687','b') ,('\7690','D') ,('\7691','d') ,('\7692','D') ,('\7693','d') ,('\7694','D') ,('\7695','d') ,('\7696','D') ,('\7697','d') ,('\7698','D') ,('\7699','d') ,('\7704','E') ,('\7705','e') ,('\7706','E') ,('\7707','e') ,('\7710','F') ,('\7711','f') ,('\7712','G') ,('\7713','g') ,('\7714','H') ,('\7715','h') ,('\7716','H') ,('\7717','h') ,('\7718','H') ,('\7719','h') ,('\7720','H') ,('\7721','h') ,('\7722','H') ,('\7723','h') ,('\7724','I') ,('\7725','i') ,('\7728','K') ,('\7729','k') ,('\7730','K') ,('\7731','k') ,('\7732','K') ,('\7733','k') ,('\7734','L') ,('\7735','l') ,('\7738','L') ,('\7739','l') ,('\7740','L') ,('\7741','l') ,('\7742','M') ,('\7743','m') ,('\7744','M') ,('\7745','m') ,('\7746','M') ,('\7747','m') ,('\7748','N') ,('\7749','n') ,('\7750','N') ,('\7751','n') ,('\7752','N') ,('\7753','n') ,('\7754','N') ,('\7755','n') ,('\7764','P') ,('\7765','p') ,('\7766','P') ,('\7767','p') ,('\7768','R') ,('\7769','r') ,('\7770','R') ,('\7771','r') ,('\7774','R') ,('\7775','r') ,('\7776','S') ,('\7777','s') ,('\7778','S') ,('\7779','s') ,('\7786','T') ,('\7787','t') ,('\7788','T') ,('\7789','t') ,('\7790','T') ,('\7791','t') ,('\7792','T') ,('\7793','t') ,('\7794','U') ,('\7795','u') ,('\7796','U') ,('\7797','u') ,('\7798','U') ,('\7799','u') ,('\7804','V') ,('\7805','v') ,('\7806','V') ,('\7807','v') ,('\7808','W') ,('\7809','w') ,('\7810','W') ,('\7811','w') ,('\7812','W') ,('\7813','w') ,('\7814','W') ,('\7815','w') ,('\7816','W') ,('\7817','w') ,('\7818','X') ,('\7819','x') ,('\7820','X') ,('\7821','x') ,('\7822','Y') ,('\7823','y') ,('\7824','Z') ,('\7825','z') ,('\7826','Z') ,('\7827','z') ,('\7828','Z') ,('\7829','z') ,('\7830','h') ,('\7831','t') ,('\7832','w') ,('\7833','y') ,('\7840','A') ,('\7841','a') ,('\7842','A') ,('\7843','a') ,('\7864','E') ,('\7865','e') ,('\7866','E') ,('\7867','e') ,('\7868','E') ,('\7869','e') ,('\7880','I') ,('\7881','i') ,('\7882','I') ,('\7883','i') ,('\7884','O') ,('\7885','o') ,('\7886','O') ,('\7887','o') ,('\7908','U') ,('\7909','u') ,('\7910','U') ,('\7911','u') ,('\7922','Y') ,('\7923','y') ,('\7924','Y') ,('\7925','y') ,('\7926','Y') ,('\7927','y') ,('\7928','Y') ,('\7929','y') ,('\8175','`') ,('\8490','K') ,('\8800','=') ,('\8814','<') ,('\8815','>') ] ��������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/MIME.hs�������������������������������������������������������������0000644�0000000�0000000�00000052764�13155240142�015415� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2011-2016 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.MIME Copyright : Copyright (C) 2011-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable Mime type lookup for ODT writer. -} module Text.Pandoc.MIME ( MimeType, getMimeType, getMimeTypeDef, extensionFromMimeType )where import System.FilePath import Data.Char ( toLower ) import Data.List (isPrefixOf, isSuffixOf) import Data.Maybe (fromMaybe) import qualified Data.Map as M type MimeType = String -- | Determine mime type appropriate for file path. getMimeType :: FilePath -> Maybe MimeType getMimeType fp -- ODT | fp == "layout-cache" = Just "application/binary" | "Formula-" `isPrefixOf` fp && "/" `isSuffixOf` fp = Just "application/vnd.oasis.opendocument.formula" -- generic | otherwise = M.lookup (map toLower $ drop 1 $ takeExtension fp) mimeTypes -- | Determime mime type appropriate for file path, defaulting to -- “application/octet-stream” if nothing else fits. getMimeTypeDef :: FilePath -> MimeType getMimeTypeDef = fromMaybe "application/octet-stream" . getMimeType extensionFromMimeType :: MimeType -> Maybe String extensionFromMimeType mimetype = M.lookup (takeWhile (/=';') mimetype) reverseMimeTypes -- note: we just look up the basic mime type, dropping the content-encoding etc. reverseMimeTypes :: M.Map MimeType String reverseMimeTypes = M.fromList $ map (\(k,v) -> (v,k)) mimeTypesList mimeTypes :: M.Map String MimeType mimeTypes = M.fromList mimeTypesList mimeTypesList :: [(String, MimeType)] mimeTypesList = -- List borrowed from happstack-server. [("gz","application/x-gzip") ,("cabal","application/x-cabal") ,("%","application/x-trash") ,("323","text/h323") ,("3gp","video/3gpp") ,("7z","application/x-7z-compressed") ,("abw","application/x-abiword") ,("ai","application/postscript") ,("aif","audio/x-aiff") ,("aifc","audio/x-aiff") ,("aiff","audio/x-aiff") ,("alc","chemical/x-alchemy") ,("art","image/x-jg") ,("asc","text/plain") ,("asf","video/x-ms-asf") ,("asn","chemical/x-ncbi-asn1") ,("aso","chemical/x-ncbi-asn1-binary") ,("asx","video/x-ms-asf") ,("atom","application/atom") ,("atomcat","application/atomcat+xml") ,("atomsrv","application/atomserv+xml") ,("au","audio/basic") ,("avi","video/x-msvideo") ,("b","chemical/x-molconn-Z") ,("bak","application/x-trash") ,("bat","application/x-msdos-program") ,("bcpio","application/x-bcpio") ,("bib","text/x-bibtex") ,("bin","application/octet-stream") ,("bmp","image/x-ms-bmp") ,("boo","text/x-boo") ,("book","application/x-maker") ,("bsd","chemical/x-crossfire") ,("c","text/x-csrc") ,("c++","text/x-c++src") ,("c3d","chemical/x-chem3d") ,("cab","application/x-cab") ,("cac","chemical/x-cache") ,("cache","chemical/x-cache") ,("cap","application/cap") ,("cascii","chemical/x-cactvs-binary") ,("cat","application/vnd.ms-pki.seccat") ,("cbin","chemical/x-cactvs-binary") ,("cbr","application/x-cbr") ,("cbz","application/x-cbz") ,("cc","text/x-c++src") ,("cdf","application/x-cdf") ,("cdr","image/x-coreldraw") ,("cdt","image/x-coreldrawtemplate") ,("cdx","chemical/x-cdx") ,("cdy","application/vnd.cinderella") ,("cef","chemical/x-cxf") ,("cer","chemical/x-cerius") ,("chm","chemical/x-chemdraw") ,("chrt","application/x-kchart") ,("cif","chemical/x-cif") ,("class","application/java-vm") ,("cls","text/x-tex") ,("cmdf","chemical/x-cmdf") ,("cml","chemical/x-cml") ,("cod","application/vnd.rim.cod") ,("com","application/x-msdos-program") ,("cpa","chemical/x-compass") ,("cpio","application/x-cpio") ,("cpp","text/x-c++src") ,("cpt","application/mac-compactpro") ,("crl","application/x-pkcs7-crl") ,("crt","application/x-x509-ca-cert") ,("csf","chemical/x-cache-csf") ,("csh","application/x-csh") ,("csm","chemical/x-csml") ,("csml","chemical/x-csml") ,("css","text/css") ,("csv","text/csv") ,("ctab","chemical/x-cactvs-binary") ,("ctx","chemical/x-ctx") ,("cu","application/cu-seeme") ,("cub","chemical/x-gaussian-cube") ,("cxf","chemical/x-cxf") ,("cxx","text/x-c++src") ,("d","text/x-dsrc") ,("dat","chemical/x-mopac-input") ,("dcr","application/x-director") ,("deb","application/x-debian-package") ,("dif","video/dv") ,("diff","text/x-diff") ,("dir","application/x-director") ,("djv","image/vnd.djvu") ,("djvu","image/vnd.djvu") ,("dl","video/dl") ,("dll","application/x-msdos-program") ,("dmg","application/x-apple-diskimage") ,("dms","application/x-dms") ,("doc","application/msword") ,("dot","application/msword") ,("dv","video/dv") ,("dvi","application/x-dvi") ,("dx","chemical/x-jcamp-dx") ,("dxr","application/x-director") ,("emb","chemical/x-embl-dl-nucleotide") ,("embl","chemical/x-embl-dl-nucleotide") ,("emf","image/x-emf") ,("eml","message/rfc822") ,("ent","chemical/x-ncbi-asn1-ascii") ,("eot","application/vnd.ms-fontobject") ,("eps","application/postscript") ,("etx","text/x-setext") ,("exe","application/x-msdos-program") ,("ez","application/andrew-inset") ,("fb","application/x-maker") ,("fbdoc","application/x-maker") ,("fch","chemical/x-gaussian-checkpoint") ,("fchk","chemical/x-gaussian-checkpoint") ,("fig","application/x-xfig") ,("flac","application/x-flac") ,("fli","video/fli") ,("fm","application/x-maker") ,("frame","application/x-maker") ,("frm","application/x-maker") ,("fs","text/plain") ,("gal","chemical/x-gaussian-log") ,("gam","chemical/x-gamess-input") ,("gamin","chemical/x-gamess-input") ,("gau","chemical/x-gaussian-input") ,("gcd","text/x-pcs-gcd") ,("gcf","application/x-graphing-calculator") ,("gcg","chemical/x-gcg8-sequence") ,("gen","chemical/x-genbank") ,("gf","application/x-tex-gf") ,("gif","image/gif") ,("gjc","chemical/x-gaussian-input") ,("gjf","chemical/x-gaussian-input") ,("gl","video/gl") ,("gnumeric","application/x-gnumeric") ,("gpt","chemical/x-mopac-graph") ,("gsf","application/x-font") ,("gsm","audio/x-gsm") ,("gtar","application/x-gtar") ,("h","text/x-chdr") ,("h++","text/x-c++hdr") ,("hdf","application/x-hdf") ,("hh","text/x-c++hdr") ,("hin","chemical/x-hin") ,("hpp","text/x-c++hdr") ,("hqx","application/mac-binhex40") ,("hs","text/x-haskell") ,("hta","application/hta") ,("htc","text/x-component") ,("htm","text/html") ,("html","text/html") ,("hxx","text/x-c++hdr") ,("ica","application/x-ica") ,("ice","x-conference/x-cooltalk") ,("ico","image/x-icon") ,("ics","text/calendar") ,("icz","text/calendar") ,("ief","image/ief") ,("iges","model/iges") ,("igs","model/iges") ,("iii","application/x-iphone") ,("inp","chemical/x-gamess-input") ,("ins","application/x-internet-signup") ,("iso","application/x-iso9660-image") ,("isp","application/x-internet-signup") ,("ist","chemical/x-isostar") ,("istr","chemical/x-isostar") ,("jad","text/vnd.sun.j2me.app-descriptor") ,("jar","application/java-archive") ,("java","text/x-java") ,("jdx","chemical/x-jcamp-dx") ,("jmz","application/x-jmol") ,("jng","image/x-jng") ,("jnlp","application/x-java-jnlp-file") ,("jpe","image/jpeg") ,("jpeg","image/jpeg") ,("jfif","image/jpeg") ,("jpg","image/jpeg") ,("js","application/x-javascript") ,("kar","audio/midi") ,("key","application/pgp-keys") ,("kil","application/x-killustrator") ,("kin","chemical/x-kinemage") ,("kml","application/vnd.google-earth.kml+xml") ,("kmz","application/vnd.google-earth.kmz") ,("kpr","application/x-kpresenter") ,("kpt","application/x-kpresenter") ,("ksp","application/x-kspread") ,("kwd","application/x-kword") ,("kwt","application/x-kword") ,("latex","application/x-latex") ,("lha","application/x-lha") ,("lhs","text/x-literate-haskell") ,("lsf","video/x-la-asf") ,("lsx","video/x-la-asf") ,("ltx","text/x-tex") ,("lyx","application/x-lyx") ,("lzh","application/x-lzh") ,("lzx","application/x-lzx") ,("m3u","audio/mpegurl") ,("m4a","audio/mpeg") ,("m4v","video/x-m4v") ,("maker","application/x-maker") ,("man","application/x-troff-man") ,("mcif","chemical/x-mmcif") ,("mcm","chemical/x-macmolecule") ,("mdb","application/msaccess") ,("me","application/x-troff-me") ,("mesh","model/mesh") ,("mid","audio/midi") ,("midi","audio/midi") ,("mif","application/x-mif") ,("mm","application/x-freemind") ,("mmd","chemical/x-macromodel-input") ,("mmf","application/vnd.smaf") ,("mml","text/mathml") ,("mmod","chemical/x-macromodel-input") ,("mng","video/x-mng") ,("moc","text/x-moc") ,("mol","chemical/x-mdl-molfile") ,("mol2","chemical/x-mol2") ,("moo","chemical/x-mopac-out") ,("mop","chemical/x-mopac-input") ,("mopcrt","chemical/x-mopac-input") ,("mov","video/quicktime") ,("movie","video/x-sgi-movie") ,("mp2","audio/mpeg") ,("mp3","audio/mpeg") ,("mp4","video/mp4") ,("mpc","chemical/x-mopac-input") ,("mpe","video/mpeg") ,("mpeg","video/mpeg") ,("mpega","audio/mpeg") ,("mpg","video/mpeg") ,("mpga","audio/mpeg") ,("ms","application/x-troff-ms") ,("msh","model/mesh") ,("msi","application/x-msi") ,("mvb","chemical/x-mopac-vib") ,("mxu","video/vnd.mpegurl") ,("nb","application/mathematica") ,("nc","application/x-netcdf") ,("nwc","application/x-nwc") ,("o","application/x-object") ,("oda","application/oda") ,("odb","application/vnd.oasis.opendocument.database") ,("odc","application/vnd.oasis.opendocument.chart") ,("odf","application/vnd.oasis.opendocument.formula") ,("odg","application/vnd.oasis.opendocument.graphics") ,("odi","application/vnd.oasis.opendocument.image") ,("odm","application/vnd.oasis.opendocument.text-master") ,("odp","application/vnd.oasis.opendocument.presentation") ,("ods","application/vnd.oasis.opendocument.spreadsheet") ,("odt","application/vnd.oasis.opendocument.text") ,("oga","audio/ogg") ,("ogg","application/ogg") ,("ogv","video/ogg") ,("ogx","application/ogg") ,("old","application/x-trash") ,("otg","application/vnd.oasis.opendocument.graphics-template") ,("oth","application/vnd.oasis.opendocument.text-web") ,("otp","application/vnd.oasis.opendocument.presentation-template") ,("ots","application/vnd.oasis.opendocument.spreadsheet-template") ,("otf","application/vnd.ms-opentype") ,("ott","application/vnd.oasis.opendocument.text-template") ,("oza","application/x-oz-application") ,("p","text/x-pascal") ,("p7r","application/x-pkcs7-certreqresp") ,("pac","application/x-ns-proxy-autoconfig") ,("pas","text/x-pascal") ,("pat","image/x-coreldrawpattern") ,("patch","text/x-diff") ,("pbm","image/x-portable-bitmap") ,("pcap","application/cap") ,("pcf","application/x-font") ,("pcf.Z","application/x-font") ,("pcx","image/pcx") ,("pdb","chemical/x-pdb") ,("pdf","application/pdf") ,("pfa","application/x-font") ,("pfb","application/x-font") ,("pgm","image/x-portable-graymap") ,("pgn","application/x-chess-pgn") ,("pgp","application/pgp-signature") ,("php","application/x-httpd-php") ,("php3","application/x-httpd-php3") ,("php3p","application/x-httpd-php3-preprocessed") ,("php4","application/x-httpd-php4") ,("phps","application/x-httpd-php-source") ,("pht","application/x-httpd-php") ,("phtml","application/x-httpd-php") ,("pk","application/x-tex-pk") ,("pl","text/x-perl") ,("pls","audio/x-scpls") ,("pm","text/x-perl") ,("png","image/png") ,("pnm","image/x-portable-anymap") ,("pot","text/plain") ,("ppm","image/x-portable-pixmap") ,("pps","application/vnd.ms-powerpoint") ,("ppt","application/vnd.ms-powerpoint") ,("prf","application/pics-rules") ,("prt","chemical/x-ncbi-asn1-ascii") ,("ps","application/postscript") ,("psd","image/x-photoshop") ,("py","text/x-python") ,("pyc","application/x-python-code") ,("pyo","application/x-python-code") ,("qt","video/quicktime") ,("qtl","application/x-quicktimeplayer") ,("ra","audio/x-pn-realaudio") ,("ram","audio/x-pn-realaudio") ,("rar","application/rar") ,("ras","image/x-cmu-raster") ,("rd","chemical/x-mdl-rdfile") ,("rdf","application/rdf+xml") ,("rgb","image/x-rgb") ,("rhtml","application/x-httpd-eruby") ,("rm","audio/x-pn-realaudio") ,("roff","application/x-troff") ,("ros","chemical/x-rosdal") ,("rpm","application/x-redhat-package-manager") ,("rss","application/rss+xml") ,("rtf","application/rtf") ,("rtx","text/richtext") ,("rxn","chemical/x-mdl-rxnfile") ,("sct","text/scriptlet") ,("sd","chemical/x-mdl-sdfile") ,("sd2","audio/x-sd2") ,("sda","application/vnd.stardivision.draw") ,("sdc","application/vnd.stardivision.calc") ,("sdd","application/vnd.stardivision.impress") ,("sdf","application/vnd.stardivision.math") ,("sds","application/vnd.stardivision.chart") ,("sdw","application/vnd.stardivision.writer") ,("ser","application/java-serialized-object") ,("sgf","application/x-go-sgf") ,("sgl","application/vnd.stardivision.writer-global") ,("sh","application/x-sh") ,("shar","application/x-shar") ,("shtml","text/html") ,("sid","audio/prs.sid") ,("sik","application/x-trash") ,("silo","model/mesh") ,("sis","application/vnd.symbian.install") ,("sisx","x-epoc/x-sisx-app") ,("sit","application/x-stuffit") ,("sitx","application/x-stuffit") ,("skd","application/x-koan") ,("skm","application/x-koan") ,("skp","application/x-koan") ,("skt","application/x-koan") ,("smi","application/smil") ,("smil","application/smil") ,("snd","audio/basic") ,("spc","chemical/x-galactic-spc") ,("spl","application/futuresplash") ,("spx","audio/ogg") ,("src","application/x-wais-source") ,("stc","application/vnd.sun.xml.calc.template") ,("std","application/vnd.sun.xml.draw.template") ,("sti","application/vnd.sun.xml.impress.template") ,("stl","application/vnd.ms-pki.stl") ,("stw","application/vnd.sun.xml.writer.template") ,("sty","text/x-tex") ,("sv4cpio","application/x-sv4cpio") ,("sv4crc","application/x-sv4crc") ,("svg","image/svg+xml") -- removed for now, since it causes problems with -- extensionFromMimeType: see #2183. -- ,("svgz","image/svg+xml") ,("sw","chemical/x-swissprot") ,("swf","application/x-shockwave-flash") ,("swfl","application/x-shockwave-flash") ,("sxc","application/vnd.sun.xml.calc") ,("sxd","application/vnd.sun.xml.draw") ,("sxg","application/vnd.sun.xml.writer.global") ,("sxi","application/vnd.sun.xml.impress") ,("sxm","application/vnd.sun.xml.math") ,("sxw","application/vnd.sun.xml.writer") ,("t","application/x-troff") ,("tar","application/x-tar") ,("taz","application/x-gtar") ,("tcl","application/x-tcl") ,("tex","text/x-tex") ,("texi","application/x-texinfo") ,("texinfo","application/x-texinfo") ,("text","text/plain") ,("tgf","chemical/x-mdl-tgf") ,("tgz","application/x-gtar") ,("tif","image/tiff") ,("tiff","image/tiff") ,("tk","text/x-tcl") ,("tm","text/texmacs") ,("torrent","application/x-bittorrent") ,("tr","application/x-troff") ,("ts","text/texmacs") ,("tsp","application/dsptype") ,("tsv","text/tab-separated-values") ,("ttf","application/x-font-truetype") ,("txt","text/plain") ,("udeb","application/x-debian-package") ,("uls","text/iuls") ,("ustar","application/x-ustar") ,("val","chemical/x-ncbi-asn1-binary") ,("vcd","application/x-cdlink") ,("vcf","text/x-vcard") ,("vcs","text/x-vcalendar") ,("vmd","chemical/x-vmd") ,("vms","chemical/x-vamas-iso14976") ,("vrm","x-world/x-vrml") ,("vrml","model/vrml") ,("vs","text/plain") ,("vsd","application/vnd.visio") ,("vtt","text/vtt") ,("wad","application/x-doom") ,("wav","audio/x-wav") ,("wax","audio/x-ms-wax") ,("wbmp","image/vnd.wap.wbmp") ,("wbxml","application/vnd.wap.wbxml") ,("webm","video/webm") ,("wk","application/x-123") ,("wm","video/x-ms-wm") ,("wma","audio/x-ms-wma") ,("wmd","application/x-ms-wmd") ,("wmf","image/x-wmf") ,("wml","text/vnd.wap.wml") ,("wmlc","application/vnd.wap.wmlc") ,("wmls","text/vnd.wap.wmlscript") ,("wmlsc","application/vnd.wap.wmlscriptc") ,("wmv","video/x-ms-wmv") ,("wmx","video/x-ms-wmx") ,("wmz","application/x-ms-wmz") ,("woff","application/font-woff") ,("woff2","font/woff2") ,("wp5","application/wordperfect5.1") ,("wpd","application/wordperfect") ,("wrl","model/vrml") ,("wsc","text/scriptlet") ,("wvx","video/x-ms-wvx") ,("wz","application/x-wingz") ,("xbm","image/x-xbitmap") ,("xcf","application/x-xcf") ,("xht","application/xhtml+xml") ,("xhtml","application/xhtml+xml") ,("xlb","application/vnd.ms-excel") ,("xls","application/vnd.ms-excel") ,("xlt","application/vnd.ms-excel") ,("xml","application/xml") ,("xpi","application/x-xpinstall") ,("xpm","image/x-xpixmap") ,("xsl","application/xml") ,("xtel","chemical/x-xtel") ,("xul","application/vnd.mozilla.xul+xml") ,("xwd","image/x-xwindowdump") ,("xyz","chemical/x-xyz") ,("zip","application/zip") ,("zmt","chemical/x-mopac-input") ] ������������pandoc-1.19.2.4/src/Text/Pandoc/Emoji.hs������������������������������������������������������������0000644�0000000�0000000�00000060737�13155240142�015730� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- 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 [("+1","\128077") ,("-1","\128078") ,("100","\128175") ,("1234","\128290") ,("8ball","\127921") ,("a","\127344\65039") ,("ab","\127374") ,("abc","\128292") ,("abcd","\128289") ,("accept","\127569") ,("aerial_tramway","\128673") ,("airplane","\9992\65039") ,("alarm_clock","\9200") ,("alien","\128125") ,("ambulance","\128657") ,("anchor","\9875") ,("angel","\128124") ,("anger","\128162") ,("angry","\128544") ,("anguished","\128551") ,("ant","\128028") ,("apple","\127822") ,("aquarius","\9810") ,("aries","\9800") ,("arrow_backward","\9664\65039") ,("arrow_double_down","\9196") ,("arrow_double_up","\9195") ,("arrow_down","\11015\65039") ,("arrow_down_small","\128317") ,("arrow_forward","\9654\65039") ,("arrow_heading_down","\10549\65039") ,("arrow_heading_up","\10548\65039") ,("arrow_left","\11013\65039") ,("arrow_lower_left","\8601\65039") ,("arrow_lower_right","\8600\65039") ,("arrow_right","\10145\65039") ,("arrow_right_hook","\8618\65039") ,("arrow_up","\11014\65039") ,("arrow_up_down","\8597\65039") ,("arrow_up_small","\128316") ,("arrow_upper_left","\8598\65039") ,("arrow_upper_right","\8599\65039") ,("arrows_clockwise","\128259") ,("arrows_counterclockwise","\128260") ,("art","\127912") ,("articulated_lorry","\128667") ,("astonished","\128562") ,("athletic_shoe","\128095") ,("atm","\127975") ,("b","\127345\65039") ,("baby","\128118") ,("baby_bottle","\127868") ,("baby_chick","\128036") ,("baby_symbol","\128700") ,("back","\128281") ,("baggage_claim","\128708") ,("balloon","\127880") ,("ballot_box_with_check","\9745\65039") ,("bamboo","\127885") ,("banana","\127820") ,("bangbang","\8252\65039") ,("bank","\127974") ,("bar_chart","\128202") ,("barber","\128136") ,("baseball","\9918\65039") ,("basketball","\127936") ,("bath","\128704") ,("bathtub","\128705") ,("battery","\128267") ,("bear","\128059") ,("bee","\128029") ,("beer","\127866") ,("beers","\127867") ,("beetle","\128030") ,("beginner","\128304") ,("bell","\128276") ,("bento","\127857") ,("bicyclist","\128692") ,("bike","\128690") ,("bikini","\128089") ,("bird","\128038") ,("birthday","\127874") ,("black_circle","\9899") ,("black_joker","\127183") ,("black_large_square","\11035") ,("black_medium_small_square","\9726") ,("black_medium_square","\9724\65039") ,("black_nib","\10002\65039") ,("black_small_square","\9642\65039") ,("black_square_button","\128306") ,("blossom","\127804") ,("blowfish","\128033") ,("blue_book","\128216") ,("blue_car","\128665") ,("blue_heart","\128153") ,("blush","\128522") ,("boar","\128023") ,("boat","\9973") ,("bomb","\128163") ,("book","\128214") ,("bookmark","\128278") ,("bookmark_tabs","\128209") ,("books","\128218") ,("boom","\128165") ,("boot","\128098") ,("bouquet","\128144") ,("bow","\128583") ,("bowling","\127923") ,("boy","\128102") ,("bread","\127838") ,("bride_with_veil","\128112") ,("bridge_at_night","\127753") ,("briefcase","\128188") ,("broken_heart","\128148") ,("bug","\128027") ,("bulb","\128161") ,("bullettrain_front","\128645") ,("bullettrain_side","\128644") ,("bus","\128652") ,("busstop","\128655") ,("bust_in_silhouette","\128100") ,("busts_in_silhouette","\128101") ,("cactus","\127797") ,("cake","\127856") ,("calendar","\128198") ,("calling","\128242") ,("camel","\128043") ,("camera","\128247") ,("cancer","\9803") ,("candy","\127852") ,("capital_abcd","\128288") ,("capricorn","\9809") ,("car","\128663") ,("card_index","\128199") ,("carousel_horse","\127904") ,("cat","\128049") ,("cat2","\128008") ,("cd","\128191") ,("chart","\128185") ,("chart_with_downwards_trend","\128201") ,("chart_with_upwards_trend","\128200") ,("checkered_flag","\127937") ,("cherries","\127826") ,("cherry_blossom","\127800") ,("chestnut","\127792") ,("chicken","\128020") ,("children_crossing","\128696") ,("chocolate_bar","\127851") ,("christmas_tree","\127876") ,("church","\9962") ,("cinema","\127910") ,("circus_tent","\127914") ,("city_sunrise","\127751") ,("city_sunset","\127750") ,("cl","\127377") ,("clap","\128079") ,("clapper","\127916") ,("clipboard","\128203") ,("clock1","\128336") ,("clock10","\128345") ,("clock1030","\128357") ,("clock11","\128346") ,("clock1130","\128358") ,("clock12","\128347") ,("clock1230","\128359") ,("clock130","\128348") ,("clock2","\128337") ,("clock230","\128349") ,("clock3","\128338") ,("clock330","\128350") ,("clock4","\128339") ,("clock430","\128351") ,("clock5","\128340") ,("clock530","\128352") ,("clock6","\128341") ,("clock630","\128353") ,("clock7","\128342") ,("clock730","\128354") ,("clock8","\128343") ,("clock830","\128355") ,("clock9","\128344") ,("clock930","\128356") ,("closed_book","\128213") ,("closed_lock_with_key","\128272") ,("closed_umbrella","\127746") ,("cloud","\9729\65039") ,("clubs","\9827\65039") ,("cn","\127464\127475") ,("cocktail","\127864") ,("coffee","\9749") ,("cold_sweat","\128560") ,("collision","\128165") ,("computer","\128187") ,("confetti_ball","\127882") ,("confounded","\128534") ,("confused","\128533") ,("congratulations","\12951\65039") ,("construction","\128679") ,("construction_worker","\128119") ,("convenience_store","\127978") ,("cookie","\127850") ,("cool","\127378") ,("cop","\128110") ,("copyright","\169\65039") ,("corn","\127805") ,("couple","\128107") ,("couple_with_heart","\128145") ,("couplekiss","\128143") ,("cow","\128046") ,("cow2","\128004") ,("credit_card","\128179") ,("crescent_moon","\127769") ,("crocodile","\128010") ,("crossed_flags","\127884") ,("crown","\128081") ,("cry","\128546") ,("crying_cat_face","\128575") ,("crystal_ball","\128302") ,("cupid","\128152") ,("curly_loop","\10160") ,("currency_exchange","\128177") ,("curry","\127835") ,("custard","\127854") ,("customs","\128707") ,("cyclone","\127744") ,("dancer","\128131") ,("dancers","\128111") ,("dango","\127841") ,("dart","\127919") ,("dash","\128168") ,("date","\128197") ,("de","\127465\127466") ,("deciduous_tree","\127795") ,("department_store","\127980") ,("diamond_shape_with_a_dot_inside","\128160") ,("diamonds","\9830\65039") ,("disappointed","\128542") ,("disappointed_relieved","\128549") ,("dizzy","\128171") ,("dizzy_face","\128565") ,("do_not_litter","\128687") ,("dog","\128054") ,("dog2","\128021") ,("dollar","\128181") ,("dolls","\127886") ,("dolphin","\128044") ,("door","\128682") ,("doughnut","\127849") ,("dragon","\128009") ,("dragon_face","\128050") ,("dress","\128087") ,("dromedary_camel","\128042") ,("droplet","\128167") ,("dvd","\128192") ,("e-mail","\128231") ,("ear","\128066") ,("ear_of_rice","\127806") ,("earth_africa","\127757") ,("earth_americas","\127758") ,("earth_asia","\127759") ,("egg","\127859") ,("eggplant","\127814") ,("eight","8\65039\8419") ,("eight_pointed_black_star","\10036\65039") ,("eight_spoked_asterisk","\10035\65039") ,("electric_plug","\128268") ,("elephant","\128024") ,("email","\9993\65039") ,("end","\128282") ,("envelope","\9993\65039") ,("envelope_with_arrow","\128233") ,("es","\127466\127480") ,("euro","\128182") ,("european_castle","\127984") ,("european_post_office","\127972") ,("evergreen_tree","\127794") ,("exclamation","\10071") ,("expressionless","\128529") ,("eyeglasses","\128083") ,("eyes","\128064") ,("facepunch","\128074") ,("factory","\127981") ,("fallen_leaf","\127810") ,("family","\128106") ,("fast_forward","\9193") ,("fax","\128224") ,("fearful","\128552") ,("feet","\128062") ,("ferris_wheel","\127905") ,("file_folder","\128193") ,("fire","\128293") ,("fire_engine","\128658") ,("fireworks","\127878") ,("first_quarter_moon","\127763") ,("first_quarter_moon_with_face","\127771") ,("fish","\128031") ,("fish_cake","\127845") ,("fishing_pole_and_fish","\127907") ,("fist","\9994") ,("five","5\65039\8419") ,("flags","\127887") ,("flashlight","\128294") ,("flipper","\128044") ,("floppy_disk","\128190") ,("flower_playing_cards","\127924") ,("flushed","\128563") ,("foggy","\127745") ,("football","\127944") ,("footprints","\128099") ,("fork_and_knife","\127860") ,("fountain","\9970") ,("four","4\65039\8419") ,("four_leaf_clover","\127808") ,("fr","\127467\127479") ,("free","\127379") ,("fried_shrimp","\127844") ,("fries","\127839") ,("frog","\128056") ,("frowning","\128550") ,("fuelpump","\9981") ,("full_moon","\127765") ,("full_moon_with_face","\127773") ,("game_die","\127922") ,("gb","\127468\127463") ,("gem","\128142") ,("gemini","\9802") ,("ghost","\128123") ,("gift","\127873") ,("gift_heart","\128157") ,("girl","\128103") ,("globe_with_meridians","\127760") ,("goat","\128016") ,("golf","\9971") ,("grapes","\127815") ,("green_apple","\127823") ,("green_book","\128215") ,("green_heart","\128154") ,("grey_exclamation","\10069") ,("grey_question","\10068") ,("grimacing","\128556") ,("grin","\128513") ,("grinning","\128512") ,("guardsman","\128130") ,("guitar","\127928") ,("gun","\128299") ,("haircut","\128135") ,("hamburger","\127828") ,("hammer","\128296") ,("hamster","\128057") ,("hand","\9995") ,("handbag","\128092") ,("hankey","\128169") ,("hash","#\65039\8419") ,("hatched_chick","\128037") ,("hatching_chick","\128035") ,("headphones","\127911") ,("hear_no_evil","\128585") ,("heart","\10084\65039") ,("heart_decoration","\128159") ,("heart_eyes","\128525") ,("heart_eyes_cat","\128571") ,("heartbeat","\128147") ,("heartpulse","\128151") ,("hearts","\9829\65039") ,("heavy_check_mark","\10004\65039") ,("heavy_division_sign","\10135") ,("heavy_dollar_sign","\128178") ,("heavy_exclamation_mark","\10071") ,("heavy_minus_sign","\10134") ,("heavy_multiplication_x","\10006\65039") ,("heavy_plus_sign","\10133") ,("helicopter","\128641") ,("herb","\127807") ,("hibiscus","\127802") ,("high_brightness","\128262") ,("high_heel","\128096") ,("hocho","\128298") ,("honey_pot","\127855") ,("honeybee","\128029") ,("horse","\128052") ,("horse_racing","\127943") ,("hospital","\127973") ,("hotel","\127976") ,("hotsprings","\9832\65039") ,("hourglass","\8987") ,("hourglass_flowing_sand","\9203") ,("house","\127968") ,("house_with_garden","\127969") ,("hushed","\128559") ,("ice_cream","\127848") ,("icecream","\127846") ,("id","\127380") ,("ideograph_advantage","\127568") ,("imp","\128127") ,("inbox_tray","\128229") ,("incoming_envelope","\128232") ,("information_desk_person","\128129") ,("information_source","\8505\65039") ,("innocent","\128519") ,("interrobang","\8265\65039") ,("iphone","\128241") ,("it","\127470\127481") ,("izakaya_lantern","\127982") ,("jack_o_lantern","\127875") ,("japan","\128510") ,("japanese_castle","\127983") ,("japanese_goblin","\128122") ,("japanese_ogre","\128121") ,("jeans","\128086") ,("joy","\128514") ,("joy_cat","\128569") ,("jp","\127471\127477") ,("key","\128273") ,("keycap_ten","\128287") ,("kimono","\128088") ,("kiss","\128139") ,("kissing","\128535") ,("kissing_cat","\128573") ,("kissing_closed_eyes","\128538") ,("kissing_heart","\128536") ,("kissing_smiling_eyes","\128537") ,("knife","\128298") ,("koala","\128040") ,("koko","\127489") ,("kr","\127472\127479") ,("lantern","\127982") ,("large_blue_circle","\128309") ,("large_blue_diamond","\128311") ,("large_orange_diamond","\128310") ,("last_quarter_moon","\127767") ,("last_quarter_moon_with_face","\127772") ,("laughing","\128518") ,("leaves","\127811") ,("ledger","\128210") ,("left_luggage","\128709") ,("left_right_arrow","\8596\65039") ,("leftwards_arrow_with_hook","\8617\65039") ,("lemon","\127819") ,("leo","\9804") ,("leopard","\128006") ,("libra","\9806") ,("light_rail","\128648") ,("link","\128279") ,("lips","\128068") ,("lipstick","\128132") ,("lock","\128274") ,("lock_with_ink_pen","\128271") ,("lollipop","\127853") ,("loop","\10175") ,("loud_sound","\128266") ,("loudspeaker","\128226") ,("love_hotel","\127977") ,("love_letter","\128140") ,("low_brightness","\128261") ,("m","\9410\65039") ,("mag","\128269") ,("mag_right","\128270") ,("mahjong","\126980") ,("mailbox","\128235") ,("mailbox_closed","\128234") ,("mailbox_with_mail","\128236") ,("mailbox_with_no_mail","\128237") ,("man","\128104") ,("man_with_gua_pi_mao","\128114") ,("man_with_turban","\128115") ,("mans_shoe","\128094") ,("maple_leaf","\127809") ,("mask","\128567") ,("massage","\128134") ,("meat_on_bone","\127830") ,("mega","\128227") ,("melon","\127816") ,("memo","\128221") ,("mens","\128697") ,("metro","\128647") ,("microphone","\127908") ,("microscope","\128300") ,("milky_way","\127756") ,("minibus","\128656") ,("minidisc","\128189") ,("mobile_phone_off","\128244") ,("money_with_wings","\128184") ,("moneybag","\128176") ,("monkey","\128018") ,("monkey_face","\128053") ,("monorail","\128669") ,("moon","\127764") ,("mortar_board","\127891") ,("mount_fuji","\128507") ,("mountain_bicyclist","\128693") ,("mountain_cableway","\128672") ,("mountain_railway","\128670") ,("mouse","\128045") ,("mouse2","\128001") ,("movie_camera","\127909") ,("moyai","\128511") ,("muscle","\128170") ,("mushroom","\127812") ,("musical_keyboard","\127929") ,("musical_note","\127925") ,("musical_score","\127932") ,("mute","\128263") ,("nail_care","\128133") ,("name_badge","\128219") ,("necktie","\128084") ,("negative_squared_cross_mark","\10062") ,("neutral_face","\128528") ,("new","\127381") ,("new_moon","\127761") ,("new_moon_with_face","\127770") ,("newspaper","\128240") ,("ng","\127382") ,("night_with_stars","\127747") ,("nine","9\65039\8419") ,("no_bell","\128277") ,("no_bicycles","\128691") ,("no_entry","\9940") ,("no_entry_sign","\128683") ,("no_good","\128581") ,("no_mobile_phones","\128245") ,("no_mouth","\128566") ,("no_pedestrians","\128695") ,("no_smoking","\128685") ,("non-potable_water","\128689") ,("nose","\128067") ,("notebook","\128211") ,("notebook_with_decorative_cover","\128212") ,("notes","\127926") ,("nut_and_bolt","\128297") ,("o","\11093") ,("o2","\127358\65039") ,("ocean","\127754") ,("octopus","\128025") ,("oden","\127842") ,("office","\127970") ,("ok","\127383") ,("ok_hand","\128076") ,("ok_woman","\128582") ,("older_man","\128116") ,("older_woman","\128117") ,("on","\128283") ,("oncoming_automobile","\128664") ,("oncoming_bus","\128653") ,("oncoming_police_car","\128660") ,("oncoming_taxi","\128662") ,("one","1\65039\8419") ,("open_book","\128214") ,("open_file_folder","\128194") ,("open_hands","\128080") ,("open_mouth","\128558") ,("ophiuchus","\9934") ,("orange_book","\128217") ,("outbox_tray","\128228") ,("ox","\128002") ,("package","\128230") ,("page_facing_up","\128196") ,("page_with_curl","\128195") ,("pager","\128223") ,("palm_tree","\127796") ,("panda_face","\128060") ,("paperclip","\128206") ,("parking","\127359\65039") ,("part_alternation_mark","\12349\65039") ,("partly_sunny","\9925") ,("passport_control","\128706") ,("paw_prints","\128062") ,("peach","\127825") ,("pear","\127824") ,("pencil","\128221") ,("pencil2","\9999\65039") ,("penguin","\128039") ,("pensive","\128532") ,("performing_arts","\127917") ,("persevere","\128547") ,("person_frowning","\128589") ,("person_with_blond_hair","\128113") ,("person_with_pouting_face","\128590") ,("phone","\9742\65039") ,("pig","\128055") ,("pig2","\128022") ,("pig_nose","\128061") ,("pill","\128138") ,("pineapple","\127821") ,("pisces","\9811") ,("pizza","\127829") ,("point_down","\128071") ,("point_left","\128072") ,("point_right","\128073") ,("point_up","\9757\65039") ,("point_up_2","\128070") ,("police_car","\128659") ,("poodle","\128041") ,("poop","\128169") ,("post_office","\127971") ,("postal_horn","\128239") ,("postbox","\128238") ,("potable_water","\128688") ,("pouch","\128093") ,("poultry_leg","\127831") ,("pound","\128183") ,("pouting_cat","\128574") ,("pray","\128591") ,("princess","\128120") ,("punch","\128074") ,("purple_heart","\128156") ,("purse","\128091") ,("pushpin","\128204") ,("put_litter_in_its_place","\128686") ,("question","\10067") ,("rabbit","\128048") ,("rabbit2","\128007") ,("racehorse","\128014") ,("radio","\128251") ,("radio_button","\128280") ,("rage","\128545") ,("railway_car","\128643") ,("rainbow","\127752") ,("raised_hand","\9995") ,("raised_hands","\128588") ,("raising_hand","\128587") ,("ram","\128015") ,("ramen","\127836") ,("rat","\128000") ,("recycle","\9851\65039") ,("red_car","\128663") ,("red_circle","\128308") ,("registered","\174\65039") ,("relaxed","\9786\65039") ,("relieved","\128524") ,("repeat","\128257") ,("repeat_one","\128258") ,("restroom","\128699") ,("revolving_hearts","\128158") ,("rewind","\9194") ,("ribbon","\127872") ,("rice","\127834") ,("rice_ball","\127833") ,("rice_cracker","\127832") ,("rice_scene","\127889") ,("ring","\128141") ,("rocket","\128640") ,("roller_coaster","\127906") ,("rooster","\128019") ,("rose","\127801") ,("rotating_light","\128680") ,("round_pushpin","\128205") ,("rowboat","\128675") ,("ru","\127479\127482") ,("rugby_football","\127945") ,("runner","\127939") ,("running","\127939") ,("running_shirt_with_sash","\127933") ,("sa","\127490\65039") ,("sagittarius","\9808") ,("sailboat","\9973") ,("sake","\127862") ,("sandal","\128097") ,("santa","\127877") ,("satellite","\128225") ,("satisfied","\128518") ,("saxophone","\127927") ,("school","\127979") ,("school_satchel","\127890") ,("scissors","\9986\65039") ,("scorpius","\9807") ,("scream","\128561") ,("scream_cat","\128576") ,("scroll","\128220") ,("seat","\128186") ,("secret","\12953\65039") ,("see_no_evil","\128584") ,("seedling","\127793") ,("seven","7\65039\8419") ,("shaved_ice","\127847") ,("sheep","\128017") ,("shell","\128026") ,("ship","\128674") ,("shirt","\128085") ,("shit","\128169") ,("shoe","\128094") ,("shower","\128703") ,("signal_strength","\128246") ,("six","6\65039\8419") ,("six_pointed_star","\128303") ,("ski","\127935") ,("skull","\128128") ,("sleeping","\128564") ,("sleepy","\128554") ,("slot_machine","\127920") ,("small_blue_diamond","\128313") ,("small_orange_diamond","\128312") ,("small_red_triangle","\128314") ,("small_red_triangle_down","\128315") ,("smile","\128516") ,("smile_cat","\128568") ,("smiley","\128515") ,("smiley_cat","\128570") ,("smiling_imp","\128520") ,("smirk","\128527") ,("smirk_cat","\128572") ,("smoking","\128684") ,("snail","\128012") ,("snake","\128013") ,("snowboarder","\127938") ,("snowflake","\10052\65039") ,("snowman","\9924") ,("sob","\128557") ,("soccer","\9917") ,("soon","\128284") ,("sos","\127384") ,("sound","\128265") ,("space_invader","\128126") ,("spades","\9824\65039") ,("spaghetti","\127837") ,("sparkle","\10055\65039") ,("sparkler","\127879") ,("sparkles","\10024") ,("sparkling_heart","\128150") ,("speak_no_evil","\128586") ,("speaker","\128264") ,("speech_balloon","\128172") ,("speedboat","\128676") ,("star","\11088") ,("star2","\127775") ,("stars","\127776") ,("station","\128649") ,("statue_of_liberty","\128509") ,("steam_locomotive","\128642") ,("stew","\127858") ,("straight_ruler","\128207") ,("strawberry","\127827") ,("stuck_out_tongue","\128539") ,("stuck_out_tongue_closed_eyes","\128541") ,("stuck_out_tongue_winking_eye","\128540") ,("sun_with_face","\127774") ,("sunflower","\127803") ,("sunglasses","\128526") ,("sunny","\9728\65039") ,("sunrise","\127749") ,("sunrise_over_mountains","\127748") ,("surfer","\127940") ,("sushi","\127843") ,("suspension_railway","\128671") ,("sweat","\128531") ,("sweat_drops","\128166") ,("sweat_smile","\128517") ,("sweet_potato","\127840") ,("swimmer","\127946") ,("symbols","\128291") ,("syringe","\128137") ,("tada","\127881") ,("tanabata_tree","\127883") ,("tangerine","\127818") ,("taurus","\9801") ,("taxi","\128661") ,("tea","\127861") ,("telephone","\9742\65039") ,("telephone_receiver","\128222") ,("telescope","\128301") ,("tennis","\127934") ,("tent","\9978") ,("thought_balloon","\128173") ,("three","3\65039\8419") ,("thumbsdown","\128078") ,("thumbsup","\128077") ,("ticket","\127915") ,("tiger","\128047") ,("tiger2","\128005") ,("tired_face","\128555") ,("tm","\8482\65039") ,("toilet","\128701") ,("tokyo_tower","\128508") ,("tomato","\127813") ,("tongue","\128069") ,("top","\128285") ,("tophat","\127913") ,("tractor","\128668") ,("traffic_light","\128677") ,("train","\128651") ,("train2","\128646") ,("tram","\128650") ,("triangular_flag_on_post","\128681") ,("triangular_ruler","\128208") ,("trident","\128305") ,("triumph","\128548") ,("trolleybus","\128654") ,("trophy","\127942") ,("tropical_drink","\127865") ,("tropical_fish","\128032") ,("truck","\128666") ,("trumpet","\127930") ,("tshirt","\128085") ,("tulip","\127799") ,("turtle","\128034") ,("tv","\128250") ,("twisted_rightwards_arrows","\128256") ,("two","2\65039\8419") ,("two_hearts","\128149") ,("two_men_holding_hands","\128108") ,("two_women_holding_hands","\128109") ,("u5272","\127545") ,("u5408","\127540") ,("u55b6","\127546") ,("u6307","\127535") ,("u6708","\127543\65039") ,("u6709","\127542") ,("u6e80","\127541") ,("u7121","\127514") ,("u7533","\127544") ,("u7981","\127538") ,("u7a7a","\127539") ,("uk","\127468\127463") ,("umbrella","\9748") ,("unamused","\128530") ,("underage","\128286") ,("unlock","\128275") ,("up","\127385") ,("us","\127482\127480") ,("v","\9996\65039") ,("vertical_traffic_light","\128678") ,("vhs","\128252") ,("vibration_mode","\128243") ,("video_camera","\128249") ,("video_game","\127918") ,("violin","\127931") ,("virgo","\9805") ,("volcano","\127755") ,("vs","\127386") ,("walking","\128694") ,("waning_crescent_moon","\127768") ,("waning_gibbous_moon","\127766") ,("warning","\9888\65039") ,("watch","\8986") ,("water_buffalo","\128003") ,("watermelon","\127817") ,("wave","\128075") ,("wavy_dash","\12336\65039") ,("waxing_crescent_moon","\127762") ,("waxing_gibbous_moon","\127764") ,("wc","\128702") ,("weary","\128553") ,("wedding","\128146") ,("whale","\128051") ,("whale2","\128011") ,("wheelchair","\9855") ,("white_check_mark","\9989") ,("white_circle","\9898") ,("white_flower","\128174") ,("white_large_square","\11036") ,("white_medium_small_square","\9725") ,("white_medium_square","\9723\65039") ,("white_small_square","\9643\65039") ,("white_square_button","\128307") ,("wind_chime","\127888") ,("wine_glass","\127863") ,("wink","\128521") ,("wolf","\128058") ,("woman","\128105") ,("womans_clothes","\128090") ,("womans_hat","\128082") ,("womens","\128698") ,("worried","\128543") ,("wrench","\128295") ,("x","\10060") ,("yellow_heart","\128155") ,("yen","\128180") ,("yum","\128523") ,("zap","\9889") ,("zero","0\65039\8419") ,("zzz","\128164") ] ���������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Parsing.hs����������������������������������������������������������0000644�0000000�0000000�00000145563�13155240142�016271� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE FlexibleContexts , GeneralizedNewtypeDeriving , TypeSynonymInstances , MultiParamTypeClasses , FlexibleInstances #-} {- Copyright (C) 2006-2016 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.Parsing Copyright : Copyright (C) 2006-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable A utility library with parsers used in pandoc readers. -} module Text.Pandoc.Parsing ( anyLine, many1Till, notFollowedBy', oneOfStrings, oneOfStringsCI, spaceChar, nonspaceChar, skipSpaces, blankline, blanklines, enclosed, stringAnyCase, parseFromString, lineClump, charsInBalanced, romanNumeral, emailAddress, uri, mathInline, mathDisplay, withHorizDisplacement, withRaw, escaped, characterReference, anyOrderedListMarker, orderedListMarker, charRef, lineBlockLines, tableWith, widthsFromIndices, gridTableWith, readWith, readWithWarnings, readWithM, testStringWith, guardEnabled, guardDisabled, updateLastStrPos, notAfterString, ParserState (..), HasReaderOptions (..), HasHeaderMap (..), HasIdentifierList (..), HasMacros (..), HasLastStrPosition (..), defaultParserState, HeaderType (..), ParserContext (..), QuoteContext (..), HasQuoteContext (..), NoteTable, NoteTable', KeyTable, SubstTable, Key (..), toKey, registerHeader, smartPunctuation, singleQuoteStart, singleQuoteEnd, doubleQuoteStart, doubleQuoteEnd, ellipses, apostrophe, dash, nested, citeKey, macro, applyMacros', Parser, ParserT, F(..), runF, askF, asksF, token, -- * Re-exports from Text.Pandoc.Parsec Stream, runParser, runParserT, parse, anyToken, getInput, setInput, unexpected, char, letter, digit, alphaNum, skipMany, skipMany1, spaces, space, anyChar, satisfy, newline, string, count, eof, noneOf, oneOf, lookAhead, notFollowedBy, many, many1, manyTill, (<|>), (<?>), choice, try, sepBy, sepBy1, sepEndBy, sepEndBy1, endBy, endBy1, option, optional, optionMaybe, getState, setState, updateState, SourcePos, getPosition, setPosition, sourceColumn, sourceLine, setSourceColumn, setSourceLine, newPos, addWarning, (<+?>), extractIdClass ) where import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Builder (Blocks, Inlines, rawBlock, HasMeta(..)) import qualified Text.Pandoc.Builder as B import Text.Pandoc.XML (fromEntities) import qualified Text.Pandoc.UTF8 as UTF8 (putStrLn) import Text.Parsec hiding (token) import Text.Parsec.Pos (newPos) import Data.Char ( toLower, toUpper, ord, chr, isAscii, isAlphaNum, isHexDigit, isSpace, isPunctuation ) import Data.List ( intercalate, transpose, isSuffixOf ) import Text.Pandoc.Shared import qualified Data.Map as M import Text.TeXMath.Readers.TeX.Macros (applyMacros, Macro, parseMacroDefinitions) import Text.HTML.TagSoup.Entity ( lookupEntity ) import Text.Pandoc.Asciify (toAsciiChar) import Data.Monoid ((<>)) import Data.Default import qualified Data.Set as Set import Control.Monad.Reader import Control.Monad.Identity import Data.Maybe (catMaybes) import Text.Pandoc.Error type Parser t s = Parsec t s type ParserT = ParsecT newtype F a = F { unF :: Reader ParserState a } deriving (Monad, Applicative, Functor) runF :: F a -> ParserState -> a runF = runReader . unF askF :: F ParserState askF = F ask asksF :: (ParserState -> a) -> F a asksF f = F $ asks f instance Monoid a => Monoid (F a) where mempty = return mempty mappend = liftM2 mappend mconcat = liftM mconcat . sequence -- | Parse any line of text anyLine :: Stream [Char] m Char => ParserT [Char] st m [Char] anyLine = do -- This is much faster than: -- manyTill anyChar newline inp <- getInput pos <- getPosition case break (=='\n') inp of (this, '\n':rest) -> do -- needed to persuade parsec that this won't match an empty string: anyChar setInput rest setPosition $ incSourceLine (setSourceColumn pos 1) 1 return this _ -> mzero -- | Like @manyTill@, but reads at least one item. many1Till :: Stream s m t => ParserT s st m a -> ParserT s st m end -> ParserT s st m [a] many1Till p end = do first <- p rest <- manyTill p end return (first:rest) -- | A more general form of @notFollowedBy@. This one allows any -- type of parser to be specified, and succeeds only if that parser fails. -- It does not consume any input. notFollowedBy' :: (Show b, Stream s m a) => ParserT s st m b -> ParserT s st m () notFollowedBy' p = try $ join $ do a <- try p return (unexpected (show a)) <|> return (return ()) -- (This version due to Andrew Pimlott on the Haskell mailing list.) oneOfStrings' :: Stream s m Char => (Char -> Char -> Bool) -> [String] -> ParserT s st m String oneOfStrings' _ [] = fail "no strings" oneOfStrings' matches strs = try $ do c <- anyChar let strs' = [xs | (x:xs) <- strs, x `matches` c] case strs' of [] -> fail "not found" _ -> (c:) <$> oneOfStrings' matches strs' <|> if "" `elem` strs' then return [c] else fail "not found" -- | Parses one of a list of strings. If the list contains -- two strings one of which is a prefix of the other, the longer -- string will be matched if possible. oneOfStrings :: Stream s m Char => [String] -> ParserT s st m String oneOfStrings = oneOfStrings' (==) -- | Parses one of a list of strings (tried in order), case insensitive. oneOfStringsCI :: Stream s m Char => [String] -> ParserT s st m String oneOfStringsCI = oneOfStrings' ciMatch where ciMatch x y = toLower' x == toLower' y -- this optimizes toLower by checking common ASCII case -- first, before calling the expensive unicode-aware -- function: toLower' c | c >= 'A' && c <= 'Z' = chr (ord c + 32) | isAscii c = c | otherwise = toLower c -- | Parses a space or tab. spaceChar :: Stream s m Char => ParserT s st m Char spaceChar = satisfy $ \c -> c == ' ' || c == '\t' -- | Parses a nonspace, nonnewline character. nonspaceChar :: Stream s m Char => ParserT s st m Char nonspaceChar = satisfy $ flip notElem ['\t', '\n', ' ', '\r'] -- | Skips zero or more spaces or tabs. skipSpaces :: Stream s m Char => ParserT s st m () skipSpaces = skipMany spaceChar -- | Skips zero or more spaces or tabs, then reads a newline. blankline :: Stream s m Char => ParserT s st m Char blankline = try $ skipSpaces >> newline -- | Parses one or more blank lines and returns a string of newlines. blanklines :: Stream s m Char => ParserT s st m [Char] blanklines = many1 blankline -- | Parses material enclosed between start and end parsers. enclosed :: Stream s m Char => ParserT s st m t -- ^ start parser -> ParserT s st m end -- ^ end parser -> ParserT s st m a -- ^ content parser (to be used repeatedly) -> ParserT s st m [a] enclosed start end parser = try $ start >> notFollowedBy space >> many1Till parser end -- | Parse string, case insensitive. stringAnyCase :: Stream s m Char => [Char] -> ParserT s st m String stringAnyCase [] = string "" stringAnyCase (x:xs) = do firstChar <- char (toUpper x) <|> char (toLower x) rest <- stringAnyCase xs return (firstChar:rest) -- | Parse contents of 'str' using 'parser' and return result. parseFromString :: Monad m => ParserT String st m a -> String -> ParserT String st m a parseFromString parser str = do oldPos <- getPosition oldInput <- getInput setInput str result <- parser spaces eof setInput oldInput setPosition oldPos return result -- | Parse raw line block up to and including blank lines. lineClump :: Stream [Char] m Char => ParserT [Char] st m String lineClump = blanklines <|> (many1 (notFollowedBy blankline >> anyLine) >>= return . unlines) -- | Parse a string of characters between an open character -- and a close character, including text between balanced -- pairs of open and close, which must be different. For example, -- @charsInBalanced '(' ')' anyChar@ will parse "(hello (there))" -- and return "hello (there)". charsInBalanced :: Stream s m Char => Char -> Char -> ParserT s st m Char -> ParserT s st m String charsInBalanced open close parser = try $ do char open let isDelim c = c == open || c == close raw <- many $ many1 (notFollowedBy (satisfy isDelim) >> parser) <|> (do res <- charsInBalanced open close parser return $ [open] ++ res ++ [close]) char close return $ concat raw -- old charsInBalanced would be: -- charsInBalanced open close (noneOf "\n" <|> char '\n' >> notFollowedBy blankline) -- old charsInBalanced' would be: -- charsInBalanced open close anyChar -- Auxiliary functions for romanNumeral: lowercaseRomanDigits :: [Char] lowercaseRomanDigits = ['i','v','x','l','c','d','m'] uppercaseRomanDigits :: [Char] uppercaseRomanDigits = map toUpper lowercaseRomanDigits -- | Parses a roman numeral (uppercase or lowercase), returns number. romanNumeral :: Stream s m Char => Bool -- ^ Uppercase if true -> ParserT s st m Int romanNumeral upperCase = do let romanDigits = if upperCase then uppercaseRomanDigits else lowercaseRomanDigits lookAhead $ oneOf romanDigits let [one, five, ten, fifty, hundred, fivehundred, thousand] = map char romanDigits thousands <- many thousand >>= (return . (1000 *) . length) ninehundreds <- option 0 $ try $ hundred >> thousand >> return 900 fivehundreds <- many fivehundred >>= (return . (500 *) . length) fourhundreds <- option 0 $ try $ hundred >> fivehundred >> return 400 hundreds <- many hundred >>= (return . (100 *) . length) nineties <- option 0 $ try $ ten >> hundred >> return 90 fifties <- many fifty >>= (return . (50 *) . length) forties <- option 0 $ try $ ten >> fifty >> return 40 tens <- many ten >>= (return . (10 *) . length) nines <- option 0 $ try $ one >> ten >> return 9 fives <- many five >>= (return . (5 *) . length) fours <- option 0 $ try $ one >> five >> return 4 ones <- many one >>= (return . length) let total = thousands + ninehundreds + fivehundreds + fourhundreds + hundreds + nineties + fifties + forties + tens + nines + fives + fours + ones if total == 0 then fail "not a roman numeral" else return total -- Parsers for email addresses and URIs -- | Parses an email address; returns original and corresponding -- escaped mailto: URI. emailAddress :: Stream s m Char => ParserT s st m (String, String) emailAddress = try $ toResult <$> mailbox <*> (char '@' *> domain) where toResult mbox dom = let full = fromEntities $ mbox ++ '@':dom in (full, escapeURI $ "mailto:" ++ full) mailbox = intercalate "." <$> (emailWord `sepby1` dot) domain = intercalate "." <$> (subdomain `sepby1` dot) dot = char '.' subdomain = many1 $ alphaNum <|> innerPunct -- this excludes some valid email addresses, since an -- email could contain e.g. '__', but gives better results -- for our purposes, when combined with markdown parsing: innerPunct = try (satisfy (\c -> isEmailPunct c || c == '@') <* notFollowedBy space <* notFollowedBy (satisfy isPunctuation)) -- technically an email address could begin with a symbol, -- but allowing this creates too many problems. -- See e.g. https://github.com/jgm/pandoc/issues/2940 emailWord = do x <- satisfy isAlphaNum xs <- many (satisfy isEmailChar) return (x:xs) isEmailChar c = isAlphaNum c || isEmailPunct c isEmailPunct c = c `elem` "!\"#$%&'*+-/=?^_{|}~;" -- note: sepBy1 from parsec consumes input when sep -- succeeds and p fails, so we use this variant here. sepby1 p sep = (:) <$> p <*> (many (try $ sep >> p)) -- Schemes from http://www.iana.org/assignments/uri-schemes.html plus -- the unofficial schemes coap, doi, javascript, isbn, pmid schemes :: [String] schemes = ["coap","doi","javascript","aaa","aaas","about","acap","cap","cid", "crid","data","dav","dict","dns","file","ftp","geo","go","gopher", "h323","http","https","iax","icap","im","imap","info","ipp","iris", "iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid", "msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp", "opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve", "sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet", "tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon", "xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s", "adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin", "bolo","callto","chrome","chrome-extension","com-eventbrite-attendee", "content", "cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb", "ed2k","facetime","feed","finger","fish","gg","git","gizmoproject", "gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms", "keyparc","lastfm","ldaps","magnet","maps","market","message","mms", "ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi", "platform","proxy","psyc","query","res","resource","rmi","rsync", "rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify", "ssh","steam","svn","teamspeak","things","udp","unreal","ut2004", "ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri", "ymsgr", "isbn", "pmid"] uriScheme :: Stream s m Char => ParserT s st m String uriScheme = oneOfStringsCI schemes -- | Parses a URI. Returns pair of original and URI-escaped version. uri :: Stream [Char] m Char => ParserT [Char] st m (String, String) uri = try $ do scheme <- uriScheme char ':' -- We allow sentence punctuation except at the end, since -- we don't want the trailing '.' in 'http://google.com.' We want to allow -- http://en.wikipedia.org/wiki/State_of_emergency_(disambiguation) -- as a URL, while NOT picking up the closing paren in -- (http://wikipedia.org). So we include balanced parens in the URL. let isWordChar c = isAlphaNum c || c `elem` "#$%*+/@\\_-" let wordChar = satisfy isWordChar let percentEscaped = try $ char '%' >> skipMany1 (satisfy isHexDigit) let entity = () <$ characterReference let punct = skipMany1 (char ',') <|> () <$ (satisfy (\c -> not (isSpace c) && c /= '<' && c /= '>')) let uriChunk = skipMany1 wordChar <|> percentEscaped <|> entity <|> (try $ punct >> lookAhead (void (satisfy isWordChar) <|> percentEscaped)) str <- snd <$> withRaw (skipMany1 ( () <$ (enclosed (char '(') (char ')') uriChunk <|> enclosed (char '{') (char '}') uriChunk <|> enclosed (char '[') (char ']') uriChunk) <|> uriChunk)) str' <- option str $ char '/' >> return (str ++ "/") let uri' = scheme ++ ":" ++ fromEntities str' return (uri', escapeURI uri') mathInlineWith :: Stream s m Char => String -> String -> ParserT s st m String mathInlineWith op cl = try $ do string op notFollowedBy space words' <- many1Till (count 1 (noneOf " \t\n\\") <|> (char '\\' >> -- This next clause is needed because \text{..} can -- contain $, \(\), etc. (try (string "text" >> (("\\text" ++) <$> inBalancedBraces 0 "")) <|> (\c -> ['\\',c]) <$> anyChar)) <|> do (blankline <* notFollowedBy' blankline) <|> (oneOf " \t" <* skipMany (oneOf " \t")) notFollowedBy (char '$') return " " ) (try $ string cl) notFollowedBy digit -- to prevent capture of $5 return $ concat words' where inBalancedBraces :: Stream s m Char => Int -> String -> ParserT s st m String inBalancedBraces 0 "" = do c <- anyChar if c == '{' then inBalancedBraces 1 "{" else mzero inBalancedBraces 0 s = return $ reverse s inBalancedBraces numOpen ('\\':xs) = do c <- anyChar inBalancedBraces numOpen (c:'\\':xs) inBalancedBraces numOpen xs = do c <- anyChar case c of '}' -> inBalancedBraces (numOpen - 1) (c:xs) '{' -> inBalancedBraces (numOpen + 1) (c:xs) _ -> inBalancedBraces numOpen (c:xs) mathDisplayWith :: Stream s m Char => String -> String -> ParserT s st m String mathDisplayWith op cl = try $ do string op many1Till (noneOf "\n" <|> (newline <* notFollowedBy' blankline)) (try $ string cl) mathDisplay :: (HasReaderOptions st, Stream s m Char) => ParserT s st m String mathDisplay = (guardEnabled Ext_tex_math_dollars >> mathDisplayWith "$$" "$$") <|> (guardEnabled Ext_tex_math_single_backslash >> mathDisplayWith "\\[" "\\]") <|> (guardEnabled Ext_tex_math_double_backslash >> mathDisplayWith "\\\\[" "\\\\]") mathInline :: (HasReaderOptions st , Stream s m Char) => ParserT s st m String mathInline = (guardEnabled Ext_tex_math_dollars >> mathInlineWith "$" "$") <|> (guardEnabled Ext_tex_math_single_backslash >> mathInlineWith "\\(" "\\)") <|> (guardEnabled Ext_tex_math_double_backslash >> mathInlineWith "\\\\(" "\\\\)") -- | Applies a parser, returns tuple of its results and its horizontal -- displacement (the difference between the source column at the end -- and the source column at the beginning). Vertical displacement -- (source row) is ignored. withHorizDisplacement :: Stream s m Char => ParserT s st m a -- ^ Parser to apply -> ParserT s st m (a, Int) -- ^ (result, displacement) withHorizDisplacement parser = do pos1 <- getPosition result <- parser pos2 <- getPosition return (result, sourceColumn pos2 - sourceColumn pos1) -- | Applies a parser and returns the raw string that was parsed, -- along with the value produced by the parser. withRaw :: Stream [Char] m Char => ParsecT [Char] st m a -> ParsecT [Char] st m (a, [Char]) withRaw parser = do pos1 <- getPosition inp <- getInput result <- parser pos2 <- getPosition let (l1,c1) = (sourceLine pos1, sourceColumn pos1) let (l2,c2) = (sourceLine pos2, sourceColumn pos2) let inplines = take ((l2 - l1) + 1) $ lines inp let raw = case inplines of [] -> "" [l] -> take (c2 - c1) l ls -> unlines (init ls) ++ take (c2 - 1) (last ls) return (result, raw) -- | Parses backslash, then applies character parser. escaped :: Stream s m Char => ParserT s st m Char -- ^ Parser for character to escape -> ParserT s st m Char escaped parser = try $ char '\\' >> parser -- | Parse character entity. characterReference :: Stream s m Char => ParserT s st m Char characterReference = try $ do char '&' ent <- many1Till nonspaceChar (char ';') let ent' = case ent of '#':'X':xs -> '#':'x':xs -- workaround tagsoup bug '#':_ -> ent _ -> ent ++ ";" case lookupEntity ent' of Just (c : _) -> return c _ -> fail "entity not found" -- | Parses an uppercase roman numeral and returns (UpperRoman, number). upperRoman :: Stream s m Char => ParserT s st m (ListNumberStyle, Int) upperRoman = do num <- romanNumeral True return (UpperRoman, num) -- | Parses a lowercase roman numeral and returns (LowerRoman, number). lowerRoman :: Stream s m Char => ParserT s st m (ListNumberStyle, Int) lowerRoman = do num <- romanNumeral False return (LowerRoman, num) -- | Parses a decimal numeral and returns (Decimal, number). decimal :: Stream s m Char => ParserT s st m (ListNumberStyle, Int) decimal = do num <- many1 digit return (Decimal, read num) -- | Parses a '@' and optional label and -- returns (DefaultStyle, [next example number]). The next -- example number is incremented in parser state, and the label -- (if present) is added to the label table. exampleNum :: Stream s m Char => ParserT s ParserState m (ListNumberStyle, Int) exampleNum = do char '@' lab <- many (alphaNum <|> satisfy (\c -> c == '_' || c == '-')) st <- getState let num = stateNextExample st let newlabels = if null lab then stateExamples st else M.insert lab num $ stateExamples st updateState $ \s -> s{ stateNextExample = num + 1 , stateExamples = newlabels } return (Example, num) -- | Parses a '#' returns (DefaultStyle, 1). defaultNum :: Stream s m Char => ParserT s st m (ListNumberStyle, Int) defaultNum = do char '#' return (DefaultStyle, 1) -- | Parses a lowercase letter and returns (LowerAlpha, number). lowerAlpha :: Stream s m Char => ParserT s st m (ListNumberStyle, Int) lowerAlpha = do ch <- oneOf ['a'..'z'] return (LowerAlpha, ord ch - ord 'a' + 1) -- | Parses an uppercase letter and returns (UpperAlpha, number). upperAlpha :: Stream s m Char => ParserT s st m (ListNumberStyle, Int) upperAlpha = do ch <- oneOf ['A'..'Z'] return (UpperAlpha, ord ch - ord 'A' + 1) -- | Parses a roman numeral i or I romanOne :: Stream s m Char => ParserT s st m (ListNumberStyle, Int) romanOne = (char 'i' >> return (LowerRoman, 1)) <|> (char 'I' >> return (UpperRoman, 1)) -- | Parses an ordered list marker and returns list attributes. anyOrderedListMarker :: Stream s m Char => ParserT s ParserState m ListAttributes anyOrderedListMarker = choice $ [delimParser numParser | delimParser <- [inPeriod, inOneParen, inTwoParens], numParser <- [decimal, exampleNum, defaultNum, romanOne, lowerAlpha, lowerRoman, upperAlpha, upperRoman]] -- | Parses a list number (num) followed by a period, returns list attributes. inPeriod :: Stream s m Char => ParserT s st m (ListNumberStyle, Int) -> ParserT s st m ListAttributes inPeriod num = try $ do (style, start) <- num char '.' let delim = if style == DefaultStyle then DefaultDelim else Period return (start, style, delim) -- | Parses a list number (num) followed by a paren, returns list attributes. inOneParen :: Stream s m Char => ParserT s st m (ListNumberStyle, Int) -> ParserT s st m ListAttributes inOneParen num = try $ do (style, start) <- num char ')' return (start, style, OneParen) -- | Parses a list number (num) enclosed in parens, returns list attributes. inTwoParens :: Stream s m Char => ParserT s st m (ListNumberStyle, Int) -> ParserT s st m ListAttributes inTwoParens num = try $ do char '(' (style, start) <- num char ')' return (start, style, TwoParens) -- | Parses an ordered list marker with a given style and delimiter, -- returns number. orderedListMarker :: Stream s m Char => ListNumberStyle -> ListNumberDelim -> ParserT s ParserState m Int orderedListMarker style delim = do let num = defaultNum <|> -- # can continue any kind of list case style of DefaultStyle -> decimal Example -> exampleNum Decimal -> decimal UpperRoman -> upperRoman LowerRoman -> lowerRoman UpperAlpha -> upperAlpha LowerAlpha -> lowerAlpha let context = case delim of DefaultDelim -> inPeriod Period -> inPeriod OneParen -> inOneParen TwoParens -> inTwoParens (start, _, _) <- context num return start -- | Parses a character reference and returns a Str element. charRef :: Stream s m Char => ParserT s st m Inline charRef = do c <- characterReference return $ Str [c] lineBlockLine :: Stream [Char] m Char => ParserT [Char] st m String lineBlockLine = try $ do char '|' char ' ' white <- many (spaceChar >> return '\160') notFollowedBy newline line <- anyLine continuations <- many (try $ char ' ' >> anyLine) return $ white ++ unwords (line : continuations) blankLineBlockLine :: Stream [Char] m Char => ParserT [Char] st m Char blankLineBlockLine = try (char '|' >> blankline) -- | Parses an RST-style line block and returns a list of strings. lineBlockLines :: Stream [Char] m Char => ParserT [Char] st m [String] lineBlockLines = try $ do lines' <- many1 (lineBlockLine <|> ((:[]) <$> blankLineBlockLine)) skipMany1 $ blankline <|> blankLineBlockLine return lines' -- | Parse a table using 'headerParser', 'rowParser', -- 'lineParser', and 'footerParser'. tableWith :: Stream s m Char => ParserT s ParserState m ([[Block]], [Alignment], [Int]) -> ([Int] -> ParserT s ParserState m [[Block]]) -> ParserT s ParserState m sep -> ParserT s ParserState m end -> ParserT s ParserState m Block tableWith headerParser rowParser lineParser footerParser = try $ do (heads, aligns, indices) <- headerParser lines' <- rowParser indices `sepEndBy1` lineParser footerParser numColumns <- getOption readerColumns let widths = if (indices == []) then replicate (length aligns) 0.0 else widthsFromIndices numColumns indices return $ Table [] aligns widths heads lines' -- Calculate relative widths of table columns, based on indices widthsFromIndices :: Int -- Number of columns on terminal -> [Int] -- Indices -> [Double] -- Fractional relative sizes of columns widthsFromIndices _ [] = [] widthsFromIndices numColumns' indices = let numColumns = max numColumns' (if null indices then 0 else last indices) lengths' = zipWith (-) indices (0:indices) lengths = reverse $ case reverse lengths' of [] -> [] [x] -> [x] -- compensate for the fact that intercolumn -- spaces are counted in widths of all columns -- but the last... (x:y:zs) -> if x < y && y - x <= 2 then y:y:zs else x:y:zs totLength = sum lengths quotient = if totLength > numColumns then fromIntegral totLength else fromIntegral numColumns fracs = map (\l -> (fromIntegral l) / quotient) lengths in tail fracs --- -- Parse a grid table: starts with row of '-' on top, then header -- (which may be grid), then the rows, -- which may be grid, separated by blank lines, and -- ending with a footer (dashed line followed by blank line). gridTableWith :: Stream [Char] m Char => ParserT [Char] ParserState m [Block] -- ^ Block list parser -> Bool -- ^ Headerless table -> ParserT [Char] ParserState m Block gridTableWith blocks headless = tableWith (gridTableHeader headless blocks) (gridTableRow blocks) (gridTableSep '-') gridTableFooter gridTableSplitLine :: [Int] -> String -> [String] gridTableSplitLine indices line = map removeFinalBar $ tail $ splitStringByIndices (init indices) $ trimr line gridPart :: Stream s m Char => Char -> ParserT s st m (Int, Int) gridPart ch = do dashes <- many1 (char ch) char '+' return (length dashes, length dashes + 1) gridDashedLines :: Stream s m Char => Char -> ParserT s st m [(Int,Int)] gridDashedLines ch = try $ char '+' >> many1 (gridPart ch) <* blankline removeFinalBar :: String -> String removeFinalBar = reverse . dropWhile (`elem` " \t") . dropWhile (=='|') . reverse -- | Separator between rows of grid table. gridTableSep :: Stream s m Char => Char -> ParserT s ParserState m Char gridTableSep ch = try $ gridDashedLines ch >> return '\n' -- | Parse header for a grid table. gridTableHeader :: Stream [Char] m Char => Bool -- ^ Headerless table -> ParserT [Char] ParserState m [Block] -> ParserT [Char] ParserState m ([[Block]], [Alignment], [Int]) gridTableHeader headless blocks = try $ do optional blanklines dashes <- gridDashedLines '-' rawContent <- if headless then return $ repeat "" else many1 (notFollowedBy (gridTableSep '=') >> char '|' >> many1Till anyChar newline) if headless then return () else gridTableSep '=' >> return () let lines' = map snd dashes let indices = scanl (+) 0 lines' let aligns = replicate (length lines') AlignDefault -- RST does not have a notion of alignments let rawHeads = if headless then replicate (length dashes) "" else map (intercalate " ") $ transpose $ map (gridTableSplitLine indices) rawContent heads <- mapM (parseFromString blocks) $ map trim rawHeads return (heads, aligns, indices) gridTableRawLine :: Stream s m Char => [Int] -> ParserT s ParserState m [String] gridTableRawLine indices = do char '|' line <- many1Till anyChar newline return (gridTableSplitLine indices line) -- | Parse row of grid table. gridTableRow :: Stream [Char] m Char => ParserT [Char] ParserState m [Block] -> [Int] -> ParserT [Char] ParserState m [[Block]] gridTableRow blocks indices = do colLines <- many1 (gridTableRawLine indices) let cols = map ((++ "\n") . unlines . removeOneLeadingSpace) $ transpose colLines mapM (liftM compactifyCell . parseFromString blocks) cols removeOneLeadingSpace :: [String] -> [String] removeOneLeadingSpace xs = if all startsWithSpace xs then map (drop 1) xs else xs where startsWithSpace "" = True startsWithSpace (y:_) = y == ' ' compactifyCell :: [Block] -> [Block] compactifyCell bs = head $ compactify [bs] -- | Parse footer for a grid table. gridTableFooter :: Stream s m Char => ParserT s ParserState m [Char] gridTableFooter = blanklines --- -- | Removes the ParsecT layer from the monad transformer stack readWithM :: (Monad m) => ParserT [Char] st m a -- ^ parser -> st -- ^ initial state -> String -- ^ input -> m (Either PandocError a) readWithM parser state input = mapLeft (ParsecError input) `liftM` runParserT parser state "source" input -- | Parse a string with a given parser and state readWith :: Parser [Char] st a -> st -> String -> Either PandocError a readWith p t inp = runIdentity $ readWithM p t inp readWithWarnings :: Parser [Char] ParserState a -> ParserState -> String -> Either PandocError (a, [String]) readWithWarnings p = readWith $ do doc <- p warnings <- stateWarnings <$> getState return (doc, warnings) -- | Parse a string with @parser@ (for testing). testStringWith :: (Show a) => ParserT [Char] ParserState Identity a -> [Char] -> IO () testStringWith parser str = UTF8.putStrLn $ show $ readWith parser defaultParserState str -- | Parsing options. data ParserState = ParserState { stateOptions :: ReaderOptions, -- ^ User options stateParserContext :: ParserContext, -- ^ Inside list? stateQuoteContext :: QuoteContext, -- ^ Inside quoted environment? stateAllowLinks :: Bool, -- ^ Allow parsing of links stateMaxNestingLevel :: Int, -- ^ Max # of nested Strong/Emph stateLastStrPos :: Maybe SourcePos, -- ^ Position after last str parsed stateKeys :: KeyTable, -- ^ List of reference keys stateHeaderKeys :: KeyTable, -- ^ List of implicit header ref keys stateSubstitutions :: SubstTable, -- ^ List of substitution references stateNotes :: NoteTable, -- ^ List of notes (raw bodies) stateNotes' :: NoteTable', -- ^ List of notes (parsed bodies) stateMeta :: Meta, -- ^ Document metadata stateMeta' :: F Meta, -- ^ Document metadata stateHeaderTable :: [HeaderType], -- ^ Ordered list of header types used stateHeaders :: M.Map Inlines String, -- ^ List of headers and ids (used for implicit ref links) stateIdentifiers :: Set.Set String, -- ^ Header identifiers used stateNextExample :: Int, -- ^ Number of next example stateExamples :: M.Map String Int, -- ^ Map from example labels to numbers stateHasChapters :: Bool, -- ^ True if \chapter encountered stateMacros :: [Macro], -- ^ List of macros defined so far stateRstDefaultRole :: String, -- ^ Current rST default interpreted text role stateRstCustomRoles :: M.Map String (String, Maybe String, Attr), -- ^ Current rST custom text roles -- Triple represents: 1) Base role, 2) Optional format (only for :raw: -- roles), 3) Additional classes (rest of Attr is unused)). stateCaption :: Maybe Inlines, -- ^ Caption in current environment stateInHtmlBlock :: Maybe String, -- ^ Tag type of HTML block being parsed stateMarkdownAttribute :: Bool, -- ^ True if in markdown=1 context stateWarnings :: [String] -- ^ Warnings generated by the parser } instance Default ParserState where def = defaultParserState instance HasMeta ParserState where setMeta field val st = st{ stateMeta = setMeta field val $ stateMeta st } deleteMeta field st = st{ stateMeta = deleteMeta field $ stateMeta st } class HasReaderOptions st where extractReaderOptions :: st -> ReaderOptions getOption :: (Stream s m t) => (ReaderOptions -> b) -> ParserT s st m b -- default getOption f = (f . extractReaderOptions) <$> getState class HasQuoteContext st m where getQuoteContext :: (Stream s m t) => ParsecT s st m QuoteContext withQuoteContext :: QuoteContext -> ParsecT s st m a -> ParsecT s st m a instance Monad m => HasQuoteContext ParserState m where getQuoteContext = stateQuoteContext <$> getState withQuoteContext context parser = do oldState <- getState let oldQuoteContext = stateQuoteContext oldState setState oldState { stateQuoteContext = context } result <- parser newState <- getState setState newState { stateQuoteContext = oldQuoteContext } return result instance HasReaderOptions ParserState where extractReaderOptions = stateOptions class HasHeaderMap st where extractHeaderMap :: st -> M.Map Inlines String updateHeaderMap :: (M.Map Inlines String -> M.Map Inlines String) -> st -> st instance HasHeaderMap ParserState where extractHeaderMap = stateHeaders updateHeaderMap f st = st{ stateHeaders = f $ stateHeaders st } class HasIdentifierList st where extractIdentifierList :: st -> Set.Set String updateIdentifierList :: (Set.Set String -> Set.Set String) -> st -> st instance HasIdentifierList ParserState where extractIdentifierList = stateIdentifiers updateIdentifierList f st = st{ stateIdentifiers = f $ stateIdentifiers st } class HasMacros st where extractMacros :: st -> [Macro] updateMacros :: ([Macro] -> [Macro]) -> st -> st instance HasMacros ParserState where extractMacros = stateMacros updateMacros f st = st{ stateMacros = f $ stateMacros st } class HasLastStrPosition st where setLastStrPos :: SourcePos -> st -> st getLastStrPos :: st -> Maybe SourcePos instance HasLastStrPosition ParserState where setLastStrPos pos st = st{ stateLastStrPos = Just pos } getLastStrPos st = stateLastStrPos st defaultParserState :: ParserState defaultParserState = ParserState { stateOptions = def, stateParserContext = NullState, stateQuoteContext = NoQuote, stateAllowLinks = True, stateMaxNestingLevel = 6, stateLastStrPos = Nothing, stateKeys = M.empty, stateHeaderKeys = M.empty, stateSubstitutions = M.empty, stateNotes = [], stateNotes' = [], stateMeta = nullMeta, stateMeta' = return nullMeta, stateHeaderTable = [], stateHeaders = M.empty, stateIdentifiers = Set.empty, stateNextExample = 1, stateExamples = M.empty, stateHasChapters = False, stateMacros = [], stateRstDefaultRole = "title-reference", stateRstCustomRoles = M.empty, stateCaption = Nothing, stateInHtmlBlock = Nothing, stateMarkdownAttribute = False, stateWarnings = []} -- | Succeed only if the extension is enabled. guardEnabled :: (Stream s m a, HasReaderOptions st) => Extension -> ParserT s st m () guardEnabled ext = getOption readerExtensions >>= guard . Set.member ext -- | Succeed only if the extension is disabled. guardDisabled :: (Stream s m a, HasReaderOptions st) => Extension -> ParserT s st m () guardDisabled ext = getOption readerExtensions >>= guard . not . Set.member ext -- | Update the position on which the last string ended. updateLastStrPos :: (Stream s m a, HasLastStrPosition st) => ParserT s st m () updateLastStrPos = getPosition >>= updateState . setLastStrPos -- | Whether we are right after the end of a string. notAfterString :: (Stream s m a, HasLastStrPosition st) => ParserT s st m Bool notAfterString = do pos <- getPosition st <- getState return $ getLastStrPos st /= Just pos data HeaderType = SingleHeader Char -- ^ Single line of characters underneath | DoubleHeader Char -- ^ Lines of characters above and below deriving (Eq, Show) data ParserContext = ListItemState -- ^ Used when running parser on list item contents | NullState -- ^ Default state deriving (Eq, Show) data QuoteContext = InSingleQuote -- ^ Used when parsing inside single quotes | InDoubleQuote -- ^ Used when parsing inside double quotes | NoQuote -- ^ Used when not parsing inside quotes deriving (Eq, Show) type NoteTable = [(String, String)] type NoteTable' = [(String, F Blocks)] -- used in markdown reader newtype Key = Key String deriving (Show, Read, Eq, Ord) toKey :: String -> Key toKey = Key . map toLower . unwords . words . unbracket where unbracket ('[':xs) | "]" `isSuffixOf` xs = take (length xs - 1) xs unbracket xs = xs type KeyTable = M.Map Key (Target, Attr) type SubstTable = M.Map Key Inlines -- | Add header to the list of headers in state, together -- with its associated identifier. If the identifier is null -- and the auto_identifers extension is set, generate a new -- unique identifier, and update the list of identifiers -- in state. registerHeader :: (Stream s m a, HasReaderOptions st, HasHeaderMap st, HasIdentifierList st) => Attr -> Inlines -> ParserT s st m Attr registerHeader (ident,classes,kvs) header' = do ids <- extractIdentifierList <$> getState exts <- getOption readerExtensions let insert' = M.insertWith (\_new old -> old) if null ident && Ext_auto_identifiers `Set.member` exts then do let id' = uniqueIdent (B.toList header') ids let id'' = if Ext_ascii_identifiers `Set.member` exts then catMaybes $ map toAsciiChar id' else id' updateState $ updateIdentifierList $ Set.insert id' updateState $ updateIdentifierList $ Set.insert id'' updateState $ updateHeaderMap $ insert' header' id' return (id'',classes,kvs) else do unless (null ident) $ updateState $ updateHeaderMap $ insert' header' ident return (ident,classes,kvs) -- | Fail unless we're in "smart typography" mode. failUnlessSmart :: (Stream s m a, HasReaderOptions st) => ParserT s st m () failUnlessSmart = getOption readerSmart >>= guard smartPunctuation :: (HasReaderOptions st, HasLastStrPosition st, HasQuoteContext st m, Stream s m Char) => ParserT s st m Inlines -> ParserT s st m Inlines smartPunctuation inlineParser = do failUnlessSmart choice [ quoted inlineParser, apostrophe, dash, ellipses ] apostrophe :: Stream s m Char => ParserT s st m Inlines apostrophe = (char '\'' <|> char '\8217') >> return (B.str "\x2019") quoted :: (HasLastStrPosition st, HasQuoteContext st m, Stream s m Char) => ParserT s st m Inlines -> ParserT s st m Inlines quoted inlineParser = doubleQuoted inlineParser <|> singleQuoted inlineParser singleQuoted :: (HasLastStrPosition st, HasQuoteContext st m, Stream s m Char) => ParserT s st m Inlines -> ParserT s st m Inlines singleQuoted inlineParser = try $ do singleQuoteStart withQuoteContext InSingleQuote $ many1Till inlineParser singleQuoteEnd >>= return . B.singleQuoted . mconcat doubleQuoted :: (HasQuoteContext st m, Stream s m Char) => ParserT s st m Inlines -> ParserT s st m Inlines doubleQuoted inlineParser = try $ do doubleQuoteStart withQuoteContext InDoubleQuote $ manyTill inlineParser doubleQuoteEnd >>= return . B.doubleQuoted . mconcat failIfInQuoteContext :: (HasQuoteContext st m, Stream s m t) => QuoteContext -> ParserT s st m () failIfInQuoteContext context = do context' <- getQuoteContext if context' == context then fail "already inside quotes" else return () charOrRef :: Stream s m Char => String -> ParserT s st m Char charOrRef cs = oneOf cs <|> try (do c <- characterReference guard (c `elem` cs) return c) singleQuoteStart :: (HasLastStrPosition st, HasQuoteContext st m, Stream s m Char) => ParserT s st m () singleQuoteStart = do failIfInQuoteContext InSingleQuote -- single quote start can't be right after str guard =<< notAfterString () <$ charOrRef "'\8216\145" singleQuoteEnd :: Stream s m Char => ParserT s st m () singleQuoteEnd = try $ do charOrRef "'\8217\146" notFollowedBy alphaNum doubleQuoteStart :: (HasQuoteContext st m, Stream s m Char) => ParserT s st m () doubleQuoteStart = do failIfInQuoteContext InDoubleQuote try $ do charOrRef "\"\8220\147" notFollowedBy . satisfy $ flip elem [' ', '\t', '\n'] doubleQuoteEnd :: Stream s m Char => ParserT s st m () doubleQuoteEnd = void (charOrRef "\"\8221\148") ellipses :: Stream s m Char => ParserT s st m Inlines ellipses = try (string "..." >> return (B.str "\8230")) dash :: (HasReaderOptions st, Stream s m Char) => ParserT s st m Inlines dash = try $ do oldDashes <- getOption readerOldDashes if oldDashes then do char '-' (char '-' >> return (B.str "\8212")) <|> (lookAhead digit >> return (B.str "\8211")) else do string "--" (char '-' >> return (B.str "\8212")) <|> return (B.str "\8211") -- This is used to prevent exponential blowups for things like: -- a**a*a**a*a**a*a**a*a**a*a**a*a** nested :: Stream s m a => ParserT s ParserState m a -> ParserT s ParserState m a nested p = do nestlevel <- stateMaxNestingLevel <$> getState guard $ nestlevel > 0 updateState $ \st -> st{ stateMaxNestingLevel = stateMaxNestingLevel st - 1 } res <- p updateState $ \st -> st{ stateMaxNestingLevel = nestlevel } return res citeKey :: (Stream s m Char, HasLastStrPosition st) => ParserT s st m (Bool, String) citeKey = try $ do guard =<< notAfterString suppress_author <- option False (char '-' *> return True) char '@' 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 ":.#$%&-+?<>~/") <|> try (oneOf ":/" <* lookAhead (char '/')) let key = firstChar:rest return (suppress_author, key) token :: (Stream s m t) => (t -> String) -> (t -> SourcePos) -> (t -> Maybe a) -> ParsecT s st m a token pp pos match = tokenPrim pp (\_ t _ -> pos t) match -- -- Macros -- -- | Parse a \newcommand or \renewcommand macro definition. macro :: (Stream [Char] m Char, HasMacros st, HasReaderOptions st) => ParserT [Char] st m Blocks macro = do apply <- getOption readerApplyMacros inp <- getInput case parseMacroDefinitions inp of ([], _) -> mzero (ms, rest) -> do def' <- count (length inp - length rest) anyChar if apply then do updateState $ \st -> updateMacros (ms ++) st return mempty else return $ rawBlock "latex" def' -- | Apply current macros to string. applyMacros' :: (HasReaderOptions st, HasMacros st, Stream [Char] m Char) => String -> ParserT [Char] st m String applyMacros' target = do apply <- getOption readerApplyMacros if apply then do macros <- extractMacros <$> getState return $ applyMacros macros target else return target -- | Append a warning to the log. addWarning :: Maybe SourcePos -> String -> Parser [Char] ParserState () addWarning mbpos msg = updateState $ \st -> st{ stateWarnings = (msg ++ maybe "" (\pos -> " " ++ show pos) mbpos) : stateWarnings st } infixr 5 <+?> (<+?>) :: (Monoid a) => ParserT s st m a -> ParserT s st m a -> ParserT s st m a a <+?> b = a >>= flip fmap (try b <|> return mempty) . (<>) extractIdClass :: Attr -> Attr extractIdClass (ident, cls, kvs) = (ident', cls', kvs') where ident' = case (lookup "id" kvs) of Just v -> v Nothing -> ident cls' = case (lookup "class" kvs) of Just cl -> words cl Nothing -> cls kvs' = filter (\(k,_) -> k /= "id" || k /= "class") kvs ���������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/UUID.hs�������������������������������������������������������������0000644�0000000�0000000�00000004417�13155240142�015424� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2010-2016 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.UUID Copyright : Copyright (C) 2010-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable UUID generation using Version 4 (random method) described in RFC4122. See http://tools.ietf.org/html/rfc4122 -} module Text.Pandoc.UUID ( UUID, getRandomUUID ) where import Text.Printf ( printf ) import System.Random ( randomIO ) import Data.Word import Data.Bits ( setBit, clearBit ) import Control.Monad ( liftM ) data UUID = UUID Word8 Word8 Word8 Word8 Word8 Word8 Word8 Word8 Word8 Word8 Word8 Word8 Word8 Word8 Word8 Word8 instance Show UUID where show (UUID a b c d e f g h i j k l m n o p) = "urn:uuid:" ++ printf "%02x" a ++ printf "%02x" b ++ printf "%02x" c ++ printf "%02x" d ++ "-" ++ printf "%02x" e ++ printf "%02x" f ++ "-" ++ printf "%02x" g ++ printf "%02x" h ++ "-" ++ printf "%02x" i ++ printf "%02x" j ++ "-" ++ printf "%02x" k ++ printf "%02x" l ++ printf "%02x" m ++ printf "%02x" n ++ printf "%02x" o ++ printf "%02x" p getRandomUUID :: IO UUID getRandomUUID = do let getRN :: a -> IO Word8 getRN _ = liftM fromIntegral (randomIO :: IO Int) [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p] <- mapM getRN ([1..16] :: [Int]) -- set variant let i' = i `setBit` 7 `clearBit` 6 -- set version (0100 for random) let g' = g `clearBit` 7 `setBit` 6 `clearBit` 5 `clearBit` 4 return $ UUID a b c d e f g' h i' j k l m n o p �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/ImageSize.hs��������������������������������������������������������0000644�0000000�0000000�00000051347�13155240142�016537� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} {- Copyright (C) 2011-2016 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.ImageSize Copyright : Copyright (C) 2011-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable Functions for determining the size of a PNG, JPEG, or GIF image. -} module Text.Pandoc.ImageSize ( ImageType(..) , imageType , imageSize , sizeInPixels , sizeInPoints , desiredSizeInPoints , Dimension(..) , Direction(..) , dimension , inInch , inPoints , numUnit , showInInch , showInPixel , showFl ) where 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.Monad import Data.Bits import Data.Binary import Data.Binary.Get import Text.Pandoc.Shared (safeRead, hush) import Data.Default (Default) import Numeric (showFFloat) import Text.Pandoc.Definition import Text.Pandoc.Options import qualified Data.Map as M import Control.Monad.Except import Data.Maybe (fromMaybe) -- quick and dirty functions to get image sizes -- algorithms borrowed from wwwis.pl data ImageType = Png | Gif | Jpeg | Pdf | Eps deriving Show data Direction = Width | Height instance Show Direction where show Width = "width" show Height = "height" data Dimension = Pixel Integer | Centimeter Double | Inch Double | Percent Double instance Show Dimension where show (Pixel a) = show a ++ "px" show (Centimeter a) = showFl a ++ "cm" show (Inch a) = showFl a ++ "in" show (Percent a) = show a ++ "%" data ImageSize = ImageSize{ pxX :: Integer , pxY :: Integer , dpiX :: Integer , dpiY :: Integer } deriving (Read, Show, Eq) instance Default ImageSize where def = ImageSize 300 200 72 72 showFl :: (RealFloat a) => a -> String showFl a = showFFloat (Just 5) a "" imageType :: ByteString -> Maybe ImageType imageType img = case B.take 4 img of "\x89\x50\x4e\x47" -> return Png "\x47\x49\x46\x38" -> return Gif "\xff\xd8\xff\xe0" -> return Jpeg -- JFIF "\xff\xd8\xff\xe1" -> return Jpeg -- Exif "%PDF" -> return Pdf "%!PS" | (B.take 4 $ B.drop 1 $ B.dropWhile (/=' ') img) == "EPSF" -> return Eps _ -> mzero imageSize :: ByteString -> Either String ImageSize imageSize img = case imageType img of Just Png -> mbToEither "could not determine PNG size" $ pngSize img Just Gif -> mbToEither "could not determine GIF size" $ gifSize img Just Jpeg -> jpegSize img Just Eps -> mbToEither "could not determine EPS size" $ epsSize img Just Pdf -> Left "could not determine PDF size" -- TODO Nothing -> Left "could not determine image type" where mbToEither msg Nothing = Left msg mbToEither _ (Just x) = Right x defaultSize :: (Integer, Integer) defaultSize = (72, 72) sizeInPixels :: ImageSize -> (Integer, Integer) sizeInPixels s = (pxX s, pxY s) -- | Calculate (height, width) in points using the image file's dpi metadata, -- using 72 Points == 1 Inch. sizeInPoints :: ImageSize -> (Double, Double) sizeInPoints s = (pxXf * 72 / dpiXf, pxYf * 72 / dpiYf) where pxXf = fromIntegral $ pxX s pxYf = fromIntegral $ pxY s dpiXf = fromIntegral $ dpiX s dpiYf = fromIntegral $ dpiY s -- | Calculate (height, width) in points, considering the desired dimensions in the -- attribute, while falling back on the image file's dpi metadata if no dimensions -- are specified in the attribute (or only dimensions in percentages). desiredSizeInPoints :: WriterOptions -> Attr -> ImageSize -> (Double, Double) desiredSizeInPoints opts attr s = case (getDim Width, getDim Height) of (Just w, Just h) -> (w, h) (Just w, Nothing) -> (w, w / ratio) (Nothing, Just h) -> (h * ratio, h) (Nothing, Nothing) -> sizeInPoints s where ratio = fromIntegral (pxX s) / fromIntegral (pxY s) getDim dir = case (dimension dir attr) of Just (Percent _) -> Nothing Just dim -> Just $ inPoints opts dim Nothing -> Nothing inPoints :: WriterOptions -> Dimension -> Double inPoints opts dim = 72 * inInch opts dim inInch :: WriterOptions -> Dimension -> Double inInch opts dim = case dim of (Pixel a) -> fromIntegral a / (fromIntegral $ writerDpi opts) (Centimeter a) -> a * 0.3937007874 (Inch a) -> a (Percent _) -> 0 -- | Convert a Dimension to a String denoting its equivalent in inches, for example "2.00000". -- Note: Dimensions in percentages are converted to the empty string. showInInch :: WriterOptions -> Dimension -> String showInInch _ (Percent _) = "" showInInch opts dim = showFl $ inInch opts dim -- | Convert a Dimension to a String denoting its equivalent in pixels, for example "600". -- Note: Dimensions in percentages are converted to the empty string. showInPixel :: WriterOptions -> Dimension -> String showInPixel opts dim = case dim of (Pixel a) -> show a (Centimeter a) -> show (floor $ dpi * a * 0.3937007874 :: Int) (Inch a) -> show (floor $ dpi * a :: Int) (Percent _) -> "" where dpi = fromIntegral $ writerDpi opts -- | Maybe split a string into a leading number and trailing unit, e.g. "3cm" to Just (3.0, "cm") numUnit :: String -> Maybe (Double, String) numUnit s = let (nums, unit) = span (\c -> isDigit c || ('.'==c)) s in case safeRead nums of Just n -> Just (n, unit) Nothing -> Nothing -- | Read a Dimension from an Attr attribute. -- `dimension Width attr` might return `Just (Pixel 3)` or for example `Just (Centimeter 2.0)`, etc. dimension :: Direction -> Attr -> Maybe Dimension dimension dir (_, _, kvs) = case dir of Width -> extractDim "width" Height -> extractDim "height" where extractDim key = case lookup key kvs of Just str -> case numUnit str of Just (num, unit) -> toDim num unit Nothing -> Nothing Nothing -> Nothing toDim a "cm" = Just $ Centimeter a toDim a "mm" = Just $ Centimeter (a / 10) toDim a "in" = Just $ Inch a toDim a "inch" = Just $ Inch a toDim a "%" = Just $ Percent a toDim a "px" = Just $ Pixel (floor a::Integer) toDim a "" = Just $ Pixel (floor a::Integer) toDim _ _ = Nothing epsSize :: ByteString -> Maybe ImageSize epsSize img = do let ls = takeWhile ("%" `B.isPrefixOf`) $ B.lines img let ls' = dropWhile (not . ("%%BoundingBox:" `B.isPrefixOf`)) ls case ls' of [] -> mzero (x:_) -> case B.words x of (_:_:_:ux:uy:[]) -> do ux' <- safeRead $ B.unpack ux uy' <- safeRead $ B.unpack uy return ImageSize{ pxX = ux' , pxY = uy' , dpiX = 72 , dpiY = 72 } _ -> mzero pngSize :: ByteString -> Maybe ImageSize pngSize img = do let (h, rest) = B.splitAt 8 img guard $ h == "\x8a\x4d\x4e\x47\x0d\x0a\x1a\x0a" || h == "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a" let (i, rest') = B.splitAt 4 $ B.drop 4 rest guard $ i == "MHDR" || i == "IHDR" let (sizes, rest'') = B.splitAt 8 rest' (x,y) <- case map fromIntegral $ unpack $ sizes of ([w1,w2,w3,w4,h1,h2,h3,h4] :: [Integer]) -> return ((shift w1 24) + (shift w2 16) + (shift w3 8) + w4, (shift h1 24) + (shift h2 16) + (shift h3 8) + h4) _ -> (hush . Left) "PNG parse error" let (dpix, dpiy) = findpHYs rest'' return $ ImageSize { pxX = x, pxY = y, dpiX = dpix, dpiY = dpiy } findpHYs :: ByteString -> (Integer, Integer) findpHYs x = if B.null x || "IDAT" `B.isPrefixOf` x then (72,72) -- default, no pHYs else if "pHYs" `B.isPrefixOf` x then let [x1,x2,x3,x4,y1,y2,y3,y4,u] = map fromIntegral $ unpack $ B.take 9 $ B.drop 4 x factor = if u == 1 -- dots per meter then \z -> z * 254 `div` 10000 else const 72 in ( factor $ (shift x1 24) + (shift x2 16) + (shift x3 8) + x4, factor $ (shift y1 24) + (shift y2 16) + (shift y3 8) + y4 ) else findpHYs $ B.drop 1 x -- read another byte gifSize :: ByteString -> Maybe ImageSize gifSize img = do let (h, rest) = B.splitAt 6 img guard $ h == "GIF87a" || h == "GIF89a" case map fromIntegral $ unpack $ B.take 4 rest of [w2,w1,h2,h1] -> return ImageSize { pxX = shift w1 8 + w2, pxY = shift h1 8 + h2, dpiX = 72, dpiY = 72 } _ -> (hush . Left) "GIF parse error" jpegSize :: ByteString -> Either String ImageSize jpegSize img = let (hdr, rest) = B.splitAt 4 img in if B.length rest < 14 then Left "unable to determine JPEG size" else case hdr of "\xff\xd8\xff\xe0" -> jfifSize rest "\xff\xd8\xff\xe1" -> exifSize rest _ -> Left "unable to determine JPEG size" jfifSize :: ByteString -> Either String ImageSize jfifSize rest = let [dpiDensity,dpix1,dpix2,dpiy1,dpiy2] = map fromIntegral $ unpack $ B.take 5 $ B.drop 9 $ rest factor = case dpiDensity of 1 -> id 2 -> \x -> (x * 254 `div` 10) _ -> const 72 dpix = factor (shift dpix1 8 + dpix2) dpiy = factor (shift dpiy1 8 + dpiy2) in case findJfifSize rest of Left msg -> Left msg Right (w,h) -> Right $ ImageSize { pxX = w , pxY = h , dpiX = dpix , dpiY = dpiy } findJfifSize :: ByteString -> Either String (Integer,Integer) findJfifSize bs = let bs' = B.dropWhile (=='\xff') $ B.dropWhile (/='\xff') bs in case B.uncons bs' of Just (c,bs'') | c >= '\xc0' && c <= '\xc3' -> case map fromIntegral $ unpack $ B.take 4 $ B.drop 3 bs'' of [h1,h2,w1,w2] -> Right (shift w1 8 + w2, shift h1 8 + h2) _ -> Left "JFIF parse error" Just (_,bs'') -> case map fromIntegral $ unpack $ B.take 2 bs'' of [c1,c2] -> let len = shift c1 8 + c2 -- skip variables in findJfifSize $ B.drop len bs'' _ -> Left "JFIF parse error" Nothing -> Left "Did not find JFIF length record" runGet' :: Get (Either String a) -> BL.ByteString -> Either String a runGet' p bl = #if MIN_VERSION_binary(0,7,0) case runGetOrFail p bl of Left (_,_,msg) -> Left msg Right (_,_,x) -> x #else runGet p bl #endif exifSize :: ByteString -> Either String ImageSize exifSize bs = runGet' header $ bl where bl = BL.fromChunks [bs] header = runExceptT $ exifHeader bl -- NOTE: It would be nicer to do -- runGet ((Just <$> exifHeader) <|> return Nothing) -- which would prevent pandoc from raising an error when an exif header can't -- be parsed. But we only get an Alternative instance for Get in binary 0.6, -- and binary 0.5 ships with ghc 7.6. exifHeader :: BL.ByteString -> ExceptT String Get ImageSize exifHeader hdr = do _app1DataSize <- lift getWord16be exifHdr <- lift getWord32be unless (exifHdr == 0x45786966) $ throwError "Did not find exif header" zeros <- lift getWord16be unless (zeros == 0) $ throwError "Expected zeros after exif header" -- beginning of tiff header -- we read whole thing to use -- in getting data from offsets: let tiffHeader = BL.drop 8 hdr byteAlign <- lift getWord16be let bigEndian = byteAlign == 0x4d4d let (getWord16, getWord32, getWord64) = if bigEndian then (getWord16be, getWord32be, getWord64be) else (getWord16le, getWord32le, getWord64le) let getRational = do num <- getWord32 den <- getWord32 return $ fromIntegral num / fromIntegral den tagmark <- lift getWord16 unless (tagmark == 0x002a) $ throwError "Failed alignment sanity check" ifdOffset <- lift getWord32 lift $ skip (fromIntegral ifdOffset - 8) -- skip to IDF numentries <- lift getWord16 let ifdEntry :: ExceptT String Get (TagType, DataFormat) ifdEntry = do tag <- fromMaybe UnknownTagType . flip M.lookup tagTypeTable <$> lift getWord16 dataFormat <- lift getWord16 numComponents <- lift getWord32 (fmt, bytesPerComponent) <- case dataFormat of 1 -> return (UnsignedByte <$> getWord8, 1) 2 -> return (AsciiString <$> getLazyByteString (fromIntegral numComponents), 1) 3 -> return (UnsignedShort <$> getWord16, 2) 4 -> return (UnsignedLong <$> getWord32, 4) 5 -> return (UnsignedRational <$> getRational, 8) 6 -> return (SignedByte <$> getWord8, 1) 7 -> return (Undefined <$> getLazyByteString (fromIntegral numComponents), 1) 8 -> return (SignedShort <$> getWord16, 2) 9 -> return (SignedLong <$> getWord32, 4) 10 -> return (SignedRational <$> getRational, 8) 11 -> return (SingleFloat <$> getWord32 {- TODO -}, 4) 12 -> return (DoubleFloat <$> getWord64 {- TODO -}, 8) _ -> throwError $ "Unknown data format " ++ show dataFormat let totalBytes = fromIntegral $ numComponents * bytesPerComponent payload <- if totalBytes <= 4 -- data is right here then lift $ fmt <* skip (4 - totalBytes) else do -- get data from offset offs <- lift getWord32 let bytesAtOffset = BL.take (fromIntegral totalBytes) $ BL.drop (fromIntegral offs) tiffHeader case runGet' (Right <$> fmt) bytesAtOffset of Left msg -> throwError msg Right x -> return x return (tag, payload) entries <- sequence $ replicate (fromIntegral numentries) ifdEntry subentries <- case lookup ExifOffset entries of Just (UnsignedLong offset') -> do pos <- lift bytesRead lift $ skip (fromIntegral offset' - (fromIntegral pos - 8)) numsubentries <- lift getWord16 sequence $ replicate (fromIntegral numsubentries) ifdEntry _ -> return [] let allentries = entries ++ subentries (wdth, hght) <- case (lookup ExifImageWidth allentries, lookup ExifImageHeight allentries) of (Just (UnsignedLong w), Just (UnsignedLong h)) -> return (fromIntegral w, fromIntegral h) _ -> return defaultSize -- we return a default width and height when -- the exif header doesn't contain these let resfactor = case lookup ResolutionUnit allentries of Just (UnsignedShort 1) -> (100 / 254) _ -> 1 let xres = maybe 72 (\(UnsignedRational x) -> floor $ x * resfactor) $ lookup XResolution allentries let yres = maybe 72 (\(UnsignedRational x) -> floor $ x * resfactor) $ lookup YResolution allentries return $ ImageSize{ pxX = wdth , pxY = hght , dpiX = xres , dpiY = yres } data DataFormat = UnsignedByte Word8 | AsciiString BL.ByteString | UnsignedShort Word16 | UnsignedLong Word32 | UnsignedRational Rational | SignedByte Word8 | Undefined BL.ByteString | SignedShort Word16 | SignedLong Word32 | SignedRational Rational | SingleFloat Word32 | DoubleFloat Word64 deriving (Show) data TagType = ImageDescription | Make | Model | Orientation | XResolution | YResolution | ResolutionUnit | Software | DateTime | WhitePoint | PrimaryChromaticities | YCbCrCoefficients | YCbCrPositioning | ReferenceBlackWhite | Copyright | ExifOffset | ExposureTime | FNumber | ExposureProgram | ISOSpeedRatings | ExifVersion | DateTimeOriginal | DateTimeDigitized | ComponentConfiguration | CompressedBitsPerPixel | ShutterSpeedValue | ApertureValue | BrightnessValue | ExposureBiasValue | MaxApertureValue | SubjectDistance | MeteringMode | LightSource | Flash | FocalLength | MakerNote | UserComment | FlashPixVersion | ColorSpace | ExifImageWidth | ExifImageHeight | RelatedSoundFile | ExifInteroperabilityOffset | FocalPlaneXResolution | FocalPlaneYResolution | FocalPlaneResolutionUnit | SensingMethod | FileSource | SceneType | UnknownTagType deriving (Show, Eq, Ord) tagTypeTable :: M.Map Word16 TagType tagTypeTable = M.fromList [ (0x010e, ImageDescription) , (0x010f, Make) , (0x0110, Model) , (0x0112, Orientation) , (0x011a, XResolution) , (0x011b, YResolution) , (0x0128, ResolutionUnit) , (0x0131, Software) , (0x0132, DateTime) , (0x013e, WhitePoint) , (0x013f, PrimaryChromaticities) , (0x0211, YCbCrCoefficients) , (0x0213, YCbCrPositioning) , (0x0214, ReferenceBlackWhite) , (0x8298, Copyright) , (0x8769, ExifOffset) , (0x829a, ExposureTime) , (0x829d, FNumber) , (0x8822, ExposureProgram) , (0x8827, ISOSpeedRatings) , (0x9000, ExifVersion) , (0x9003, DateTimeOriginal) , (0x9004, DateTimeDigitized) , (0x9101, ComponentConfiguration) , (0x9102, CompressedBitsPerPixel) , (0x9201, ShutterSpeedValue) , (0x9202, ApertureValue) , (0x9203, BrightnessValue) , (0x9204, ExposureBiasValue) , (0x9205, MaxApertureValue) , (0x9206, SubjectDistance) , (0x9207, MeteringMode) , (0x9208, LightSource) , (0x9209, Flash) , (0x920a, FocalLength) , (0x927c, MakerNote) , (0x9286, UserComment) , (0xa000, FlashPixVersion) , (0xa001, ColorSpace) , (0xa002, ExifImageWidth) , (0xa003, ExifImageHeight) , (0xa004, RelatedSoundFile) , (0xa005, ExifInteroperabilityOffset) , (0xa20e, FocalPlaneXResolution) , (0xa20f, FocalPlaneYResolution) , (0xa210, FocalPlaneResolutionUnit) , (0xa217, SensingMethod) , (0xa300, FileSource) , (0xa301, SceneType) ] �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Slides.hs�����������������������������������������������������������0000644�0000000�0000000�00000005256�13155240142�016103� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2012-2016 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.Slides Copyright : Copyright (C) 2012-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable Utility functions for splitting documents into slides for slide show formats (dzslides, revealjs, s5, slidy, slideous, beamer). -} module Text.Pandoc.Slides ( getSlideLevel, prepSlides ) where import Text.Pandoc.Definition -- | Find level of header that starts slides (defined as the least header -- level that occurs before a non-header/non-hrule in the blocks). getSlideLevel :: [Block] -> Int getSlideLevel = go 6 where go least (Header n _ _ : x : xs) | n < least && nonHOrHR x = go n xs | otherwise = go least (x:xs) go least (_ : xs) = go least xs go least [] = least nonHOrHR (Header{}) = False nonHOrHR (HorizontalRule) = False nonHOrHR _ = True -- | Prepare a block list to be passed to hierarchicalize. prepSlides :: Int -> [Block] -> [Block] prepSlides slideLevel = ensureStartWithH . splitHrule . extractRefsHeader where splitHrule (HorizontalRule : Header n attr xs : ys) | n == slideLevel = Header slideLevel attr xs : splitHrule ys splitHrule (HorizontalRule : xs) = Header slideLevel nullAttr [Str "\0"] : splitHrule xs splitHrule (x : xs) = x : splitHrule xs splitHrule [] = [] extractRefsHeader bs = case reverse bs of (Div ("",["references"],[]) (Header n attrs xs : ys) : zs) -> reverse zs ++ (Header n attrs xs : [Div ("",["references"],[]) ys]) _ -> bs ensureStartWithH bs@(Header n _ _:_) | n <= slideLevel = bs ensureStartWithH bs = Header slideLevel nullAttr [Str "\0"] : bs ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Highlighting.hs�����������������������������������������������������0000644�0000000�0000000�00000015125�13155240142�017261� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{- Copyright (C) 2008-2016 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.Highlighting Copyright : Copyright (C) 2008-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> Stability : alpha Portability : portable Exports functions for syntax highlighting. -} module Text.Pandoc.Highlighting ( languages , languagesByExtension , highlight , formatLaTeXInline , formatLaTeXBlock , styleToLaTeX , formatHtmlInline , formatHtmlBlock , styleToCss , pygments , espresso , zenburn , tango , kate , monochrome , haddock , Style , fromListingsLanguage , toListingsLanguage ) where import Text.Pandoc.Definition import Text.Pandoc.Shared (safeRead) import Skylighting import Data.Maybe (fromMaybe) import Data.Char (toLower) import qualified Data.Map as M import Control.Monad import qualified Data.Text as T languages :: [String] languages = [T.unpack (T.toLower (sName s)) | s <- M.elems defaultSyntaxMap] languagesByExtension :: String -> [String] languagesByExtension ext = [T.unpack (T.toLower (sName s)) | s <- syntaxesByExtension defaultSyntaxMap ext] highlight :: (FormatOptions -> [SourceLine] -> a) -- ^ Formatter -> Attr -- ^ Attributes of the CodeBlock -> String -- ^ Raw contents of the CodeBlock -> Maybe a -- ^ Maybe the formatted result highlight formatter (_, classes, keyvals) rawCode = let firstNum = fromMaybe 1 (safeRead (fromMaybe "1" $ lookup "startFrom" keyvals)) fmtOpts = defaultFormatOpts{ startNumber = firstNum, numberLines = any (`elem` ["number","numberLines", "number-lines"]) classes } tokenizeOpts = TokenizerConfig{ syntaxMap = defaultSyntaxMap , traceOutput = False } classes' = map T.pack classes rawCode' = T.pack rawCode in case msum (map (\l -> lookupSyntax l defaultSyntaxMap) classes') of Nothing | numberLines fmtOpts -> Just $ formatter fmtOpts{ codeClasses = [], containerClasses = classes' } $ map (\ln -> [(NormalTok, ln)]) $ T.lines rawCode' | otherwise -> Nothing Just syntax -> case tokenize tokenizeOpts syntax rawCode' of Right slines -> Just $ formatter fmtOpts{ codeClasses = [T.toLower (sShortname syntax)], containerClasses = classes' } slines Left _ -> Nothing -- Functions for correlating latex listings package's language names -- with skylighting language names: langToListingsMap :: M.Map String String langToListingsMap = M.fromList langsList listingsToLangMap :: M.Map String String listingsToLangMap = M.fromList $ map switch langsList where switch (a,b) = (b,a) langsList :: [(String, String)] langsList = [("abap","ABAP"), ("acm","ACM"), ("acmscript","ACMscript"), ("acsl","ACSL"), ("ada","Ada"), ("algol","Algol"), ("ant","Ant"), ("assembler","Assembler"), ("gnuassembler","Assembler"), ("awk","Awk"), ("bash","bash"), ("monobasic","Basic"), ("purebasic","Basic"), ("c","C"), ("cpp","C++"), ("c++","C++"), ("ocaml","Caml"), ("cil","CIL"), ("clean","Clean"), ("cobol","Cobol"), ("comal80","Comal80"), ("command.com","command.com"), ("comsol","Comsol"), ("csh","csh"), ("delphi","Delphi"), ("elan","Elan"), ("erlang","erlang"), ("euphoria","Euphoria"), ("fortran","Fortran"), ("gap","GAP"), ("gcl","GCL"), ("gnuplot","Gnuplot"), ("hansl","hansl"), ("haskell","Haskell"), ("html","HTML"), ("idl","IDL"), ("inform","inform"), ("java","Java"), ("jvmis","JVMIS"), ("ksh","ksh"), ("lingo","Lingo"), ("lisp","Lisp"), ("commonlisp","Lisp"), ("llvm","LLVM"), ("logo","Logo"), ("lua","Lua"), ("make","make"), ("makefile","make"), ("mathematica","Mathematica"), ("matlab","Matlab"), ("mercury","Mercury"), ("metapost","MetaPost"), ("miranda","Miranda"), ("mizar","Mizar"), ("ml","ML"), ("modula2","Modula-2"), ("mupad","MuPAD"), ("nastran","NASTRAN"), ("oberon2","Oberon-2"), ("ocl","OCL"), ("octave","Octave"), ("oz","Oz"), ("pascal","Pascal"), ("perl","Perl"), ("php","PHP"), ("pli","PL/I"), ("plasm","Plasm"), ("postscript","PostScript"), ("pov","POV"), ("prolog","Prolog"), ("promela","Promela"), ("pstricks","PSTricks"), ("python","Python"), ("r","R"), ("reduce","Reduce"), ("rexx","Rexx"), ("rsl","RSL"), ("ruby","Ruby"), ("s","S"), ("sas","SAS"), ("scala","Scala"), ("scilab","Scilab"), ("sh","sh"), ("shelxl","SHELXL"), ("simula","Simula"), ("sparql","SPARQL"), ("sql","SQL"), ("tcl","tcl"), ("tex","TeX"), ("latex","TeX"), ("vbscript","VBScript"), ("verilog","Verilog"), ("vhdl","VHDL"), ("vrml","VRML"), ("xml","XML"), ("xslt","XSLT")] -- | Determine listings language name from skylighting language name. toListingsLanguage :: String -> Maybe String toListingsLanguage lang = M.lookup (map toLower lang) langToListingsMap -- | Determine skylighting language name from listings language name. fromListingsLanguage :: String -> Maybe String fromListingsLanguage lang = M.lookup lang listingsToLangMap �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Compat/Time.hs������������������������������������������������������0000644�0000000�0000000�00000001176�13155240142�016776� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE CPP #-} {- This compatibility module is needed because, in time 1.5, the `defaultTimeLocale` function was moved from System.Locale (in the old-locale library) into Data.Time. We support both behaviors because time 1.4 is a boot library for GHC 7.8. time 1.5 is a boot library for GHC 7.10. When support is dropped for GHC 7.8, this module may be obsoleted. -} #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 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/src/Text/Pandoc/Data.hsb������������������������������������������������������������0000644�0000000�0000000�00000001104�13155240142�015657� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} -- 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 = map (\(fp, contents) -> (Posix.joinPath (splitDirectories fp), contents)) dataFiles' dataFiles' :: [(FilePath, B.ByteString)] dataFiles' = ("MANUAL.txt", %blob "MANUAL.txt") : %blobs "data" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/prelude/Prelude.hs������������������������������������������������������������������0000644�0000000�0000000�00000000611�13155240142�014767� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# 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 #else import "base" Prelude as P import Control.Applicative import Data.Monoid #endif �����������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/benchmark/weigh-pandoc.hs�����������������������������������������������������������0000644�0000000�0000000�00000002124�13155240142�016227� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import Weigh import Text.Pandoc main :: IO () main = do doc <- read <$> readFile "tests/testsuite.native" mainWith $ do func "Pandoc document" id doc mapM_ (\(n,r) -> weighReader doc n (handleError . r def{ readerSmart = True })) [("markdown", readMarkdown) ,("html", readHtml) ,("docbook", readDocBook) ,("latex", readLaTeX) ,("commonmark", readCommonMark) ] mapM_ (\(n,w) -> weighWriter doc n (w def)) [("markdown", writeMarkdown) ,("html", writeHtmlString) ,("docbook", writeDocbook) ,("latex", writeLaTeX) ,("commonmark", writeCommonMark) ] weighWriter :: Pandoc -> String -> (Pandoc -> String) -> Weigh () weighWriter doc name writer = func (name ++ " writer") writer doc weighReader :: Pandoc -> String -> (String -> Pandoc) -> Weigh () weighReader doc name reader = do case lookup name writers of Just (PureStringWriter writer) -> let inp = writer def{ writerWrapText = WrapAuto} doc in func (name ++ " reader") reader inp _ -> return () -- no writer for reader ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/trypandoc/trypandoc.hs��������������������������������������������������������������0000644�0000000�0000000�00000010760�13155240143�015744� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} module Main where import Network.Wai.Handler.CGI import Network.Wai import Control.Applicative ((<$>)) import Data.Maybe (mapMaybe, fromMaybe) import Network.HTTP.Types.Status (status200) import Network.HTTP.Types.Header (hContentType) import Network.HTTP.Types.URI (queryToQueryText) import Text.Pandoc import Text.Pandoc.Error (PandocError) import Text.Pandoc.Shared (tabFilter) import Data.Aeson import qualified Data.Text as T import Data.Text (Text) main :: IO () main = run app app :: Application app req respond = do let query = queryToQueryText $ queryString req let getParam x = maybe (error $ T.unpack x ++ " paramater not set") return $ lookup x query text <- getParam "text" >>= checkLength . fromMaybe T.empty fromFormat <- fromMaybe "" <$> getParam "from" toFormat <- fromMaybe "" <$> getParam "to" reader <- maybe (error $ "could not find reader for " ++ T.unpack fromFormat) return $ lookup fromFormat fromFormats let writer = maybe (error $ "could not find writer for " ++ T.unpack toFormat) id $ lookup toFormat toFormats let result = case reader $ tabFilter 4 $ T.unpack text of Right doc -> T.pack $ writer doc Left err -> error (show err) let output = encode $ object [ T.pack "html" .= result , T.pack "name" .= if fromFormat == "markdown_strict" then T.pack "pandoc (strict)" else T.pack "pandoc" , T.pack "version" .= pandocVersion] respond $ responseLBS status200 [(hContentType,"text/json; charset=UTF-8")] output checkLength :: Text -> IO Text checkLength t = if T.length t > 10000 then error "exceeds length limit of 10,000 characters" else return t writerOpts :: WriterOptions writerOpts = def { writerReferenceLinks = True, writerEmailObfuscation = NoObfuscation, writerHTMLMathMethod = MathJax "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML", writerHighlight = True } readerOpts :: ReaderOptions readerOpts = def { readerParseRaw = True, readerSmart = True } fromFormats :: [(Text, String -> Either PandocError Pandoc)] fromFormats = [ ("native" , readNative) ,("json" , Text.Pandoc.readJSON readerOpts) ,("markdown" , readMarkdown readerOpts) ,("markdown_strict" , readMarkdown readerOpts{ readerExtensions = strictExtensions, readerSmart = False }) ,("markdown_phpextra" , readMarkdown readerOpts{ readerExtensions = phpMarkdownExtraExtensions }) ,("markdown_github" , readMarkdown readerOpts{ readerExtensions = githubMarkdownExtensions }) ,("markdown_mmd", readMarkdown readerOpts{ readerExtensions = multimarkdownExtensions }) ,("rst" , readRST readerOpts) ,("mediawiki" , readMediaWiki readerOpts) ,("docbook" , readDocBook readerOpts) ,("opml" , readOPML readerOpts) ,("t2t" , readTxt2TagsNoMacros readerOpts) ,("org" , readOrg readerOpts) ,("textile" , readTextile readerOpts) -- TODO : textile+lhs ,("html" , readHtml readerOpts) ,("latex" , readLaTeX readerOpts) ,("haddock" , readHaddock readerOpts) ] toFormats :: [(Text, Pandoc -> String)] toFormats = mapMaybe (\(x,y) -> case y of PureStringWriter w -> Just (T.pack x, w writerOpts{ writerExtensions = case x of "markdown_strict" -> strictExtensions "markdown_phpextra" -> phpMarkdownExtraExtensions "markdown_mmd" -> multimarkdownExtensions "markdown_github" -> githubMarkdownExtensions _ -> pandocExtensions }) _ -> case x of "rtf" -> Just (T.pack x, writeRTF writerOpts) _ -> Nothing) writers ����������������pandoc-1.19.2.4/pandoc.hs���������������������������������������������������������������������������0000644�0000000�0000000�00000177776�13155240142�013226� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE CPP, TupleSections, ScopedTypeVariables, PatternGuards #-} {- Copyright (C) 2006-2016 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 : Main Copyright : Copyright (C) 2006-2016 John MacFarlane License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley@edu> Stability : alpha Portability : portable Parses command-line options and calls the appropriate readers and writers. -} module Main where import Text.Pandoc import Text.Pandoc.Builder (setMeta) import Text.Pandoc.PDF (makePDF) import Text.Pandoc.Walk (walk) import Text.Pandoc.Readers.LaTeX (handleIncludes) import Text.Pandoc.Shared ( tabFilter, readDataFileUTF8, readDataFile, safeRead, headerShift, normalize, err, warn, openURL ) import Text.Pandoc.MediaBag ( mediaDirectory, extractMediaBag, MediaBag ) import Text.Pandoc.XML ( toEntities ) import Text.Pandoc.SelfContained ( makeSelfContained ) import Text.Pandoc.Process (pipeProcess) import Skylighting ( defaultSyntaxMap, Syntax(..), Style, tango, pygments, espresso, zenburn, kate, haddock, breezeDark, monochrome ) import System.Environment ( getArgs, getProgName, getEnvironment ) import System.Exit ( ExitCode (..), exitSuccess ) import System.FilePath import System.Console.GetOpt import qualified Data.Set as Set import Data.Char ( toLower, toUpper ) import Data.List ( intercalate, isPrefixOf, isSuffixOf, sort ) import System.Directory ( getAppUserDataDirectory, findExecutable, doesFileExist, Permissions(..), getPermissions ) import System.IO ( stdout, stderr ) import System.IO.Error ( isDoesNotExistError ) import qualified Control.Exception as E import Control.Exception.Extensible ( throwIO ) import qualified Text.Pandoc.UTF8 as UTF8 import Control.Monad (when, unless, (>=>)) import Data.Maybe (fromMaybe, isNothing, isJust) import Data.Foldable (foldrM) import Network.URI (parseURI, isURI, URI(..)) import qualified Data.ByteString.Lazy as B import qualified Data.ByteString as BS import Data.Aeson (eitherDecode', encode) 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 Text.Pandoc.Readers.Txt2Tags (getT2TMeta) import Paths_pandoc (getDataDir) import Text.Printf (printf) #ifndef _WINDOWS import System.Posix.Terminal (queryTerminal) import System.Posix.IO (stdOutput) #endif type Transform = Pandoc -> Pandoc copyrightMessage :: String copyrightMessage = intercalate "\n" [ "", "Copyright (C) 2006-2016 John MacFarlane", "Web: http://pandoc.org", "This is free software; see the source for copying conditions.", "There is no warranty, not even for merchantability or fitness", "for a particular purpose." ] compileInfo :: String compileInfo = "\nCompiled with pandoc-types " ++ VERSION_pandoc_types ++ ", texmath " ++ VERSION_texmath ++ ", skylighting " ++ VERSION_skylighting -- | Converts a list of strings into a single string with the items printed as -- comma separated words in lines with a maximum line length. wrapWords :: Int -> Int -> [String] -> String wrapWords indent c = wrap' (c - indent) (c - indent) where wrap' _ _ [] = "" wrap' cols remaining (x:xs) | remaining == cols = x ++ wrap' cols (remaining - length x) xs | (length x + 1) > remaining = ",\n" ++ replicate indent ' ' ++ x ++ wrap' cols (cols - length x) xs | otherwise = ", " ++ x ++ wrap' cols (remaining - length x - 2) xs isTextFormat :: String -> Bool isTextFormat s = s `notElem` ["odt","docx","epub","epub3"] externalFilter :: FilePath -> [String] -> Pandoc -> IO Pandoc externalFilter f args' d = do exists <- doesFileExist f isExecutable <- if exists then executable <$> getPermissions f else return True let (f', args'') = if exists then case map toLower (takeExtension f) of _ | isExecutable -> ("." </> f, args') ".py" -> ("python", f:args') ".hs" -> ("runhaskell", f:args') ".pl" -> ("perl", f:args') ".rb" -> ("ruby", f:args') ".php" -> ("php", f:args') ".js" -> ("node", f:args') _ -> (f, args') else (f, args') unless (exists && isExecutable) $ do mbExe <- findExecutable f' when (isNothing mbExe) $ err 83 $ "Error running filter " ++ f ++ ":\n" ++ "Could not find executable '" ++ f' ++ "'." env <- getEnvironment let env' = Just $ ("PANDOC_VERSION", pandocVersion) : env (exitcode, outbs, errbs) <- E.handle filterException $ pipeProcess env' f' args'' $ encode d unless (B.null errbs) $ B.hPutStr stderr errbs case exitcode of ExitSuccess -> return $ either error id $ eitherDecode' outbs ExitFailure ec -> err 83 $ "Error running filter " ++ f ++ "\n" ++ "Filter returned error status " ++ show ec where filterException :: E.SomeException -> IO a filterException e = err 83 $ "Error running filter " ++ f ++ "\n" ++ show e highlightingStyles :: [(String, Style)] highlightingStyles = [("pygments", pygments), ("tango", tango), ("espresso", espresso), ("zenburn", zenburn), ("kate", kate), ("monochrome", monochrome), ("breezedark", breezeDark), ("haddock", haddock)] -- | Data structure for command line options. data Opt = Opt { optTabStop :: Int -- ^ Number of spaces per tab , optPreserveTabs :: Bool -- ^ Preserve tabs instead of converting to spaces , optStandalone :: Bool -- ^ Include header, footer , optReader :: String -- ^ Reader format , optWriter :: String -- ^ Writer format , optParseRaw :: Bool -- ^ Parse unconvertable HTML and TeX , optTableOfContents :: Bool -- ^ Include table of contents , optTransforms :: [Transform] -- ^ Doc transforms to apply , optTemplate :: Maybe FilePath -- ^ Custom template , optVariables :: [(String,String)] -- ^ Template variables to set , optMetadata :: M.Map String MetaValue -- ^ Metadata fields to set , optOutputFile :: String -- ^ Name of output file , optNumberSections :: Bool -- ^ Number sections in LaTeX , optNumberOffset :: [Int] -- ^ Starting number for sections , optSectionDivs :: Bool -- ^ Put sections in div tags in HTML , optIncremental :: Bool -- ^ Use incremental lists in Slidy/Slideous/S5 , optSelfContained :: Bool -- ^ Make HTML accessible offline , optSmart :: Bool -- ^ Use smart typography , optOldDashes :: Bool -- ^ Parse dashes like pandoc <=1.8.2.1 , optHtml5 :: Bool -- ^ Produce HTML5 in HTML , optHtmlQTags :: Bool -- ^ Use <q> tags in HTML , optHighlight :: Bool -- ^ Highlight source code , optHighlightStyle :: Style -- ^ Style to use for highlighted code , optTopLevelDivision :: TopLevelDivision -- ^ Type of the top-level divisions , optHTMLMathMethod :: HTMLMathMethod -- ^ Method to print HTML math , optReferenceODT :: Maybe FilePath -- ^ Path of reference.odt , optReferenceDocx :: Maybe FilePath -- ^ Path of reference.docx , optEpubStylesheet :: Maybe String -- ^ EPUB stylesheet , optEpubMetadata :: String -- ^ EPUB metadata , optEpubFonts :: [FilePath] -- ^ EPUB fonts to embed , optEpubChapterLevel :: Int -- ^ Header level at which to split chapters , optTOCDepth :: Int -- ^ Number of levels to include in TOC , optDumpArgs :: Bool -- ^ Output command-line arguments , optIgnoreArgs :: Bool -- ^ Ignore command-line arguments , optVerbose :: Bool -- ^ Verbose diagnostic output , optReferenceLinks :: Bool -- ^ Use reference links in writing markdown, rst , optReferenceLocation :: ReferenceLocation -- ^ location for footnotes and link references in markdown output , optDpi :: Int -- ^ Dpi , optWrapText :: WrapOption -- ^ Options for wrapping text , optColumns :: Int -- ^ Line length in characters , optFilters :: [FilePath] -- ^ Filters to apply , optEmailObfuscation :: ObfuscationMethod , optIdentifierPrefix :: String , optIndentedCodeClasses :: [String] -- ^ Default classes for indented code blocks , optDataDir :: Maybe FilePath , optCiteMethod :: CiteMethod -- ^ Method to output cites , optListings :: Bool -- ^ Use listings package for code blocks , optLaTeXEngine :: String -- ^ Program to use for latex -> pdf , optLaTeXEngineArgs :: [String] -- ^ Flags to pass to the latex-engine , optSlideLevel :: Maybe Int -- ^ Header level that creates slides , optSetextHeaders :: Bool -- ^ Use atx headers for markdown level 1-2 , optAscii :: Bool -- ^ Use ascii characters only in html , optTeXLigatures :: Bool -- ^ Use TeX ligatures for quotes/dashes , optDefaultImageExtension :: String -- ^ Default image extension , optExtractMedia :: Maybe FilePath -- ^ Path to extract embedded media , optTrace :: Bool -- ^ Print debug information , optTrackChanges :: TrackChanges -- ^ Accept or reject MS Word track-changes. , optFileScope :: Bool -- ^ Parse input files before combining , optKaTeXStylesheet :: Maybe String -- ^ Path to stylesheet for KaTeX , optKaTeXJS :: Maybe String -- ^ Path to js file for KaTeX } -- | Defaults for command-line options. defaultOpts :: Opt defaultOpts = Opt { optTabStop = 4 , optPreserveTabs = False , optStandalone = False , optReader = "" -- null for default reader , optWriter = "" -- null for default writer , optParseRaw = False , optTableOfContents = False , optTransforms = [] , optTemplate = Nothing , optVariables = [] , optMetadata = M.empty , optOutputFile = "-" -- "-" means stdout , optNumberSections = False , optNumberOffset = [0,0,0,0,0,0] , optSectionDivs = False , optIncremental = False , optSelfContained = False , optSmart = False , optOldDashes = False , optHtml5 = False , optHtmlQTags = False , optHighlight = True , optHighlightStyle = pygments , optTopLevelDivision = TopLevelDefault , optHTMLMathMethod = PlainMath , optReferenceODT = Nothing , optReferenceDocx = Nothing , optEpubStylesheet = Nothing , optEpubMetadata = "" , optEpubFonts = [] , optEpubChapterLevel = 1 , optTOCDepth = 3 , optDumpArgs = False , optIgnoreArgs = False , optVerbose = False , optReferenceLinks = False , optReferenceLocation = EndOfDocument , optDpi = 96 , optWrapText = WrapAuto , optColumns = 72 , optFilters = [] , optEmailObfuscation = NoObfuscation , optIdentifierPrefix = "" , optIndentedCodeClasses = [] , optDataDir = Nothing , optCiteMethod = Citeproc , optListings = False , optLaTeXEngine = "pdflatex" , optLaTeXEngineArgs = [] , optSlideLevel = Nothing , optSetextHeaders = True , optAscii = False , optTeXLigatures = True , optDefaultImageExtension = "" , optExtractMedia = Nothing , optTrace = False , optTrackChanges = AcceptChanges , optFileScope = False , optKaTeXStylesheet = Nothing , optKaTeXJS = Nothing } -- | A list of functions, each transforming the options data structure -- in response to a command-line option. options :: [OptDescr (Opt -> IO Opt)] options = [ Option "fr" ["from","read"] (ReqArg (\arg opt -> return opt { optReader = arg }) "FORMAT") "" , Option "tw" ["to","write"] (ReqArg (\arg opt -> return opt { optWriter = arg }) "FORMAT") "" , Option "o" ["output"] (ReqArg (\arg opt -> return opt { optOutputFile = arg }) "FILENAME") "" -- "Name of output file" , Option "" ["data-dir"] (ReqArg (\arg opt -> return opt { optDataDir = Just arg }) "DIRECTORY") -- "Directory containing pandoc data files." "" , Option "R" ["parse-raw"] (NoArg (\opt -> return opt { optParseRaw = True })) "" -- "Parse untranslatable HTML codes and LaTeX environments as raw" , Option "S" ["smart"] (NoArg (\opt -> return opt { optSmart = True })) "" -- "Use smart quotes, dashes, and ellipses" , Option "" ["old-dashes"] (NoArg (\opt -> return opt { optSmart = True , optOldDashes = True })) "" -- "Use smart quotes, dashes, and ellipses" , Option "" ["base-header-level"] (ReqArg (\arg opt -> case safeRead arg of Just t | t > 0 -> do let oldTransforms = optTransforms opt let shift = t - 1 return opt{ optTransforms = headerShift shift : oldTransforms } _ -> err 19 "base-header-level must be a number > 0") "NUMBER") "" -- "Headers base level" , Option "" ["indented-code-classes"] (ReqArg (\arg opt -> return opt { optIndentedCodeClasses = words $ map (\c -> if c == ',' then ' ' else c) arg }) "STRING") "" -- "Classes (whitespace- or comma-separated) to use for indented code-blocks" , Option "F" ["filter"] (ReqArg (\arg opt -> return opt { optFilters = arg : optFilters opt }) "PROGRAM") "" -- "External JSON filter" , Option "" ["normalize"] (NoArg (\opt -> return opt { optTransforms = normalize : optTransforms opt } )) "" -- "Normalize the Pandoc AST" , Option "p" ["preserve-tabs"] (NoArg (\opt -> return opt { optPreserveTabs = True })) "" -- "Preserve tabs instead of converting to spaces" , Option "" ["tab-stop"] (ReqArg (\arg opt -> case safeRead arg of Just t | t > 0 -> return opt { optTabStop = t } _ -> err 31 "tab-stop must be a number greater than 0") "NUMBER") "" -- "Tab stop (default 4)" , Option "" ["track-changes"] (ReqArg (\arg opt -> do action <- case arg of "accept" -> return AcceptChanges "reject" -> return RejectChanges "all" -> return AllChanges _ -> err 6 ("Unknown option for track-changes: " ++ arg) return opt { optTrackChanges = action }) "accept|reject|all") "" -- "Accepting or reject MS Word track-changes."" , Option "" ["file-scope"] (NoArg (\opt -> return opt { optFileScope = True })) "" -- "Parse input files before combining" , Option "" ["extract-media"] (ReqArg (\arg opt -> return opt { optExtractMedia = Just arg }) "PATH") "" -- "Directory to which to extract embedded media" , Option "s" ["standalone"] (NoArg (\opt -> return opt { optStandalone = True })) "" -- "Include needed header and footer on output" , Option "" ["template"] (ReqArg (\arg opt -> return opt{ optTemplate = Just arg, optStandalone = True }) "FILENAME") "" -- "Use custom template" , Option "M" ["metadata"] (ReqArg (\arg opt -> do let (key,val) = case break (`elem` ":=") arg of (k,_:v) -> (k, readMetaValue v) (k,_) -> (k, MetaBool True) return opt{ optMetadata = addMetadata key val $ optMetadata opt }) "KEY[:VALUE]") "" , Option "V" ["variable"] (ReqArg (\arg opt -> do let (key,val) = case break (`elem` ":=") arg of (k,_:v) -> (k,v) (k,_) -> (k,"true") return opt{ optVariables = (key,val) : optVariables opt }) "KEY[:VALUE]") "" , Option "D" ["print-default-template"] (ReqArg (\arg _ -> do templ <- getDefaultTemplate Nothing arg case templ of Right t -> UTF8.hPutStr stdout t Left e -> error $ show e exitSuccess) "FORMAT") "" -- "Print default template for FORMAT" , Option "" ["print-default-data-file"] (ReqArg (\arg _ -> do readDataFile Nothing arg >>= BS.hPutStr stdout exitSuccess) "FILE") "" -- "Print default data file" , Option "" ["dpi"] (ReqArg (\arg opt -> case safeRead arg of Just t | t > 0 -> return opt { optDpi = t } _ -> err 31 "dpi must be a number greater than 0") "NUMBER") "" -- "Dpi (default 96)" , Option "" ["no-wrap"] (NoArg (\opt -> do warn $ "--no-wrap is deprecated. " ++ "Use --wrap=none or --wrap=preserve instead." return opt { optWrapText = WrapNone })) "" , Option "" ["wrap"] (ReqArg (\arg opt -> case safeRead ("Wrap" ++ uppercaseFirstLetter arg) of Just o -> return opt { optWrapText = o } Nothing -> err 77 "--wrap must be auto, none, or preserve") "auto|none|preserve") "" -- "Option for wrapping text in output" , Option "" ["columns"] (ReqArg (\arg opt -> case safeRead arg of Just t | t > 0 -> return opt { optColumns = t } _ -> err 33 "columns must be a number greater than 0") "NUMBER") "" -- "Length of line in characters" , Option "" ["toc", "table-of-contents"] (NoArg (\opt -> return opt { optTableOfContents = True })) "" -- "Include table of contents" , Option "" ["toc-depth"] (ReqArg (\arg opt -> case safeRead arg of Just t | t >= 1 && t <= 6 -> return opt { optTOCDepth = t } _ -> err 57 "TOC level must be a number between 1 and 6") "NUMBER") "" -- "Number of levels to include in TOC" , Option "" ["no-highlight"] (NoArg (\opt -> return opt { optHighlight = False })) "" -- "Don't highlight source code" , Option "" ["highlight-style"] (ReqArg (\arg opt -> do case lookup (map toLower arg) highlightingStyles of Just s -> return opt{ optHighlightStyle = s } Nothing -> err 39 $ "Unknown style: " ++ arg) "STYLE") "" -- "Style for highlighted code" , Option "H" ["include-in-header"] (ReqArg (\arg opt -> do text <- UTF8.readFile arg -- add new ones to end, so they're included in order specified let newvars = optVariables opt ++ [("header-includes",text)] return opt { optVariables = newvars, optStandalone = True }) "FILENAME") "" -- "File to include at end of header (implies -s)" , Option "B" ["include-before-body"] (ReqArg (\arg opt -> do text <- UTF8.readFile arg -- add new ones to end, so they're included in order specified let newvars = optVariables opt ++ [("include-before",text)] return opt { optVariables = newvars, optStandalone = True }) "FILENAME") "" -- "File to include before document body" , Option "A" ["include-after-body"] (ReqArg (\arg opt -> do text <- UTF8.readFile arg -- add new ones to end, so they're included in order specified let newvars = optVariables opt ++ [("include-after",text)] return opt { optVariables = newvars, optStandalone = True }) "FILENAME") "" -- "File to include after document body" , Option "" ["self-contained"] (NoArg (\opt -> return opt { optSelfContained = True, optStandalone = True })) "" -- "Make slide shows include all the needed js and css" , Option "" ["html-q-tags"] (NoArg (\opt -> return opt { optHtmlQTags = True })) "" -- "Use <q> tags for quotes in HTML" , Option "" ["ascii"] (NoArg (\opt -> return opt { optAscii = True })) "" -- "Use ascii characters only in HTML output" , Option "" ["reference-links"] (NoArg (\opt -> return opt { optReferenceLinks = True } )) "" -- "Use reference links in parsing HTML" , Option "" ["reference-location"] (ReqArg (\arg opt -> do action <- case arg of "block" -> return EndOfBlock "section" -> return EndOfSection "document" -> return EndOfDocument _ -> err 6 ("Unknown option for reference-location: " ++ arg) return opt { optReferenceLocation = action }) "block|section|document") "" -- "Accepting or reject MS Word track-changes."" , Option "" ["atx-headers"] (NoArg (\opt -> return opt { optSetextHeaders = False } )) "" -- "Use atx-style headers for markdown" , Option "" ["chapters"] (NoArg (\opt -> do warn $ "--chapters is deprecated. " ++ "Use --top-level-division=chapter instead." return opt { optTopLevelDivision = TopLevelChapter })) "" -- "Use chapter for top-level sections in LaTeX, DocBook" , Option "" ["top-level-division"] (ReqArg (\arg opt -> do let tldName = "TopLevel" ++ uppercaseFirstLetter arg case safeRead tldName of Just tlDiv -> return opt { optTopLevelDivision = tlDiv } _ -> err 76 ("Top-level division must be " ++ "section, chapter, part, or default")) "section|chapter|part") "" -- "Use top-level division type in LaTeX, ConTeXt, DocBook" , Option "N" ["number-sections"] (NoArg (\opt -> return opt { optNumberSections = True })) "" -- "Number sections in LaTeX" , Option "" ["number-offset"] (ReqArg (\arg opt -> case safeRead ('[':arg ++ "]") of Just ns -> return opt { optNumberOffset = ns, optNumberSections = True } _ -> err 57 "could not parse number-offset") "NUMBERS") "" -- "Starting number for sections, subsections, etc." , Option "" ["no-tex-ligatures"] (NoArg (\opt -> return opt { optTeXLigatures = False })) "" -- "Don't use tex ligatures for quotes, dashes" , Option "" ["listings"] (NoArg (\opt -> return opt { optListings = True })) "" -- "Use listings package for LaTeX code blocks" , Option "i" ["incremental"] (NoArg (\opt -> return opt { optIncremental = True })) "" -- "Make list items display incrementally in Slidy/Slideous/S5" , Option "" ["slide-level"] (ReqArg (\arg opt -> case safeRead arg of Just t | t >= 1 && t <= 6 -> return opt { optSlideLevel = Just t } _ -> err 39 "slide level must be a number between 1 and 6") "NUMBER") "" -- "Force header level for slides" , Option "" ["section-divs"] (NoArg (\opt -> return opt { optSectionDivs = True })) "" -- "Put sections in div tags in HTML" , Option "" ["default-image-extension"] (ReqArg (\arg opt -> return opt { optDefaultImageExtension = arg }) "extension") "" -- "Default extension for extensionless images" , Option "" ["email-obfuscation"] (ReqArg (\arg opt -> do method <- case arg of "references" -> return ReferenceObfuscation "javascript" -> return JavascriptObfuscation "none" -> return NoObfuscation _ -> err 6 ("Unknown obfuscation method: " ++ arg) return opt { optEmailObfuscation = method }) "none|javascript|references") "" -- "Method for obfuscating email in HTML" , Option "" ["id-prefix"] (ReqArg (\arg opt -> return opt { optIdentifierPrefix = arg }) "STRING") "" -- "Prefix to add to automatically generated HTML identifiers" , Option "T" ["title-prefix"] (ReqArg (\arg opt -> do let newvars = ("title-prefix", arg) : optVariables opt return opt { optVariables = newvars, optStandalone = True }) "STRING") "" -- "String to prefix to HTML window title" , Option "c" ["css"] (ReqArg (\arg opt -> do -- add new link to end, so it is included in proper order let newvars = optVariables opt ++ [("css",arg)] return opt { optVariables = newvars, optStandalone = True }) "URL") "" -- "Link to CSS style sheet" , Option "" ["reference-odt"] (ReqArg (\arg opt -> return opt { optReferenceODT = Just arg }) "FILENAME") "" -- "Path of custom reference.odt" , Option "" ["reference-docx"] (ReqArg (\arg opt -> return opt { optReferenceDocx = Just arg }) "FILENAME") "" -- "Path of custom reference.docx" , Option "" ["epub-stylesheet"] (ReqArg (\arg opt -> do text <- UTF8.readFile arg return opt { optEpubStylesheet = Just text }) "FILENAME") "" -- "Path of epub.css" , Option "" ["epub-cover-image"] (ReqArg (\arg opt -> return opt { optVariables = ("epub-cover-image", arg) : optVariables opt }) "FILENAME") "" -- "Path of epub cover image" , Option "" ["epub-metadata"] (ReqArg (\arg opt -> do text <- UTF8.readFile arg return opt { optEpubMetadata = text }) "FILENAME") "" -- "Path of epub metadata file" , Option "" ["epub-embed-font"] (ReqArg (\arg opt -> return opt{ optEpubFonts = arg : optEpubFonts opt }) "FILE") "" -- "Directory of fonts to embed" , Option "" ["epub-chapter-level"] (ReqArg (\arg opt -> case safeRead arg of Just t | t >= 1 && t <= 6 -> return opt { optEpubChapterLevel = t } _ -> err 59 "chapter level must be a number between 1 and 6") "NUMBER") "" -- "Header level at which to split chapters in EPUB" , Option "" ["latex-engine"] (ReqArg (\arg opt -> do let b = takeBaseName arg if b `elem` ["pdflatex", "lualatex", "xelatex"] then return opt { optLaTeXEngine = arg } else err 45 "latex-engine must be pdflatex, lualatex, or xelatex.") "PROGRAM") "" -- "Name of latex program to use in generating PDF" , Option "" ["latex-engine-opt"] (ReqArg (\arg opt -> do let oldArgs = optLaTeXEngineArgs opt return opt { optLaTeXEngineArgs = arg : oldArgs }) "STRING") "" -- "Flags to pass to the LaTeX engine, all instances of this option are accumulated and used" , Option "" ["bibliography"] (ReqArg (\arg opt -> return opt{ optMetadata = addMetadata "bibliography" (readMetaValue arg) $ optMetadata opt }) "FILE") "" , Option "" ["csl"] (ReqArg (\arg opt -> return opt{ optMetadata = addMetadata "csl" (readMetaValue arg) $ optMetadata opt }) "FILE") "" , Option "" ["citation-abbreviations"] (ReqArg (\arg opt -> return opt{ optMetadata = addMetadata "citation-abbreviations" (readMetaValue arg) $ optMetadata opt }) "FILE") "" , Option "" ["natbib"] (NoArg (\opt -> return opt { optCiteMethod = Natbib })) "" -- "Use natbib cite commands in LaTeX output" , Option "" ["biblatex"] (NoArg (\opt -> return opt { optCiteMethod = Biblatex })) "" -- "Use biblatex cite commands in LaTeX output" , Option "m" ["latexmathml", "asciimathml"] (OptArg (\arg opt -> return opt { optHTMLMathMethod = LaTeXMathML arg }) "URL") "" -- "Use LaTeXMathML script in html output" , Option "" ["mathml"] (OptArg (\arg opt -> return opt { optHTMLMathMethod = MathML arg }) "URL") "" -- "Use mathml for HTML math" , Option "" ["mimetex"] (OptArg (\arg opt -> do let url' = case arg of Just u -> u ++ "?" Nothing -> "/cgi-bin/mimetex.cgi?" return opt { optHTMLMathMethod = WebTeX url' }) "URL") "" -- "Use mimetex for HTML math" , Option "" ["webtex"] (OptArg (\arg opt -> do let url' = fromMaybe "https://latex.codecogs.com/png.latex?" arg return opt { optHTMLMathMethod = WebTeX url' }) "URL") "" -- "Use web service for HTML math" , Option "" ["jsmath"] (OptArg (\arg opt -> return opt { optHTMLMathMethod = JsMath arg}) "URL") "" -- "Use jsMath for HTML math" , Option "" ["mathjax"] (OptArg (\arg opt -> do let url' = fromMaybe "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML-full" arg return opt { optHTMLMathMethod = MathJax url'}) "URL") "" -- "Use MathJax for HTML math" , Option "" ["katex"] (OptArg (\arg opt -> return opt { optKaTeXJS = arg <|> Just "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/katex.min.js"}) "URL") "" -- Use KaTeX for HTML Math , Option "" ["katex-stylesheet"] (ReqArg (\arg opt -> return opt { optKaTeXStylesheet = Just arg }) "URL") "" -- Set the KaTeX Stylesheet location , Option "" ["gladtex"] (NoArg (\opt -> return opt { optHTMLMathMethod = GladTeX })) "" -- "Use gladtex for HTML math" , Option "" ["trace"] (NoArg (\opt -> return opt { optTrace = True })) "" -- "Turn on diagnostic tracing in readers." , Option "" ["dump-args"] (NoArg (\opt -> return opt { optDumpArgs = True })) "" -- "Print output filename and arguments to stdout." , Option "" ["ignore-args"] (NoArg (\opt -> return opt { optIgnoreArgs = True })) "" -- "Ignore command-line arguments." , Option "" ["verbose"] (NoArg (\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 (map fst writers)) (unwords $ map fst highlightingStyles) ddir exitSuccess )) "" -- "Print bash completion script" , Option "" ["list-input-formats"] (NoArg (\_ -> do let readers'names = sort (map fst readers) mapM_ (UTF8.hPutStrLn stdout) readers'names exitSuccess )) "" , Option "" ["list-output-formats"] (NoArg (\_ -> do let writers'names = sort (map fst writers) mapM_ (UTF8.hPutStrLn stdout) writers'names exitSuccess )) "" , Option "" ["list-extensions"] (NoArg (\_ -> do let showExt x = drop 4 (show x) ++ if x `Set.member` pandocExtensions then " +" else " -" mapM_ (UTF8.hPutStrLn stdout . showExt) ([minBound..maxBound] :: [Extension]) exitSuccess )) "" , Option "" ["list-highlight-languages"] (NoArg (\_ -> do let langs = [ T.unpack (T.toLower (sShortname s)) | s <- M.elems defaultSyntaxMap , sShortname s `notElem` [T.pack "Alert", T.pack "Alert_indent"] ] mapM_ (UTF8.hPutStrLn stdout) langs exitSuccess )) "" , Option "" ["list-highlight-styles"] (NoArg (\_ -> do mapM_ (UTF8.hPutStrLn stdout) $ map fst highlightingStyles exitSuccess )) "" , Option "v" ["version"] (NoArg (\_ -> do prg <- getProgName defaultDatadir <- E.catch (getAppUserDataDirectory "pandoc") (\e -> let _ = (e :: E.SomeException) in return "") UTF8.hPutStrLn stdout (prg ++ " " ++ pandocVersion ++ compileInfo ++ "\nDefault user data directory: " ++ defaultDatadir ++ copyrightMessage) exitSuccess )) "" -- "Print version" , Option "h" ["help"] (NoArg (\_ -> do prg <- getProgName UTF8.hPutStr stdout (usageMessage prg options) exitSuccess )) "" -- "Show help" ] addMetadata :: String -> MetaValue -> M.Map String MetaValue -> M.Map String MetaValue addMetadata k v m = case M.lookup k m of Nothing -> M.insert k v m Just (MetaList xs) -> M.insert k (MetaList (xs ++ [v])) m Just x -> M.insert k (MetaList [v, x]) m readMetaValue :: String -> MetaValue readMetaValue s = case decode (UTF8.fromString s) of Just (Yaml.String t) -> MetaString $ T.unpack t Just (Yaml.Bool b) -> MetaBool b _ -> MetaString s -- Returns usage message usageMessage :: String -> [OptDescr (Opt -> IO Opt)] -> String usageMessage programName = usageInfo (programName ++ " [OPTIONS] [FILES]") -- Determine default reader based on source file extensions defaultReaderName :: String -> [FilePath] -> String defaultReaderName fallback [] = fallback defaultReaderName fallback (x:xs) = case takeExtension (map toLower x) of ".xhtml" -> "html" ".html" -> "html" ".htm" -> "html" ".md" -> "markdown" ".markdown" -> "markdown" ".tex" -> "latex" ".latex" -> "latex" ".ltx" -> "latex" ".rst" -> "rst" ".org" -> "org" ".lhs" -> "markdown+lhs" ".db" -> "docbook" ".opml" -> "opml" ".wiki" -> "mediawiki" ".dokuwiki" -> "dokuwiki" ".textile" -> "textile" ".native" -> "native" ".json" -> "json" ".docx" -> "docx" ".t2t" -> "t2t" ".epub" -> "epub" ".odt" -> "odt" ".pdf" -> "pdf" -- so we get an "unknown reader" error ".doc" -> "doc" -- so we get an "unknown reader" error _ -> defaultReaderName fallback xs -- Returns True if extension of first source is .lhs lhsExtension :: [FilePath] -> Bool lhsExtension (x:_) = takeExtension x == ".lhs" lhsExtension _ = False -- Determine default writer based on output file extension defaultWriterName :: FilePath -> String defaultWriterName "-" = "html" -- no output file defaultWriterName x = case takeExtension (map toLower x) of "" -> "markdown" -- empty extension ".tex" -> "latex" ".latex" -> "latex" ".ltx" -> "latex" ".context" -> "context" ".ctx" -> "context" ".rtf" -> "rtf" ".rst" -> "rst" ".s5" -> "s5" ".native" -> "native" ".json" -> "json" ".txt" -> "markdown" ".text" -> "markdown" ".md" -> "markdown" ".markdown" -> "markdown" ".textile" -> "textile" ".lhs" -> "markdown+lhs" ".texi" -> "texinfo" ".texinfo" -> "texinfo" ".db" -> "docbook" ".odt" -> "odt" ".docx" -> "docx" ".epub" -> "epub" ".org" -> "org" ".asciidoc" -> "asciidoc" ".adoc" -> "asciidoc" ".pdf" -> "latex" ".fb2" -> "fb2" ".opml" -> "opml" ".icml" -> "icml" ".tei.xml" -> "tei" ".tei" -> "tei" ['.',y] | y `elem` ['1'..'9'] -> "man" _ -> "html" -- Transformations of a Pandoc document post-parsing: extractMedia :: MediaBag -> FilePath -> Pandoc -> IO Pandoc extractMedia media dir d = case [fp | (fp, _, _) <- mediaDirectory media] of [] -> return d fps -> do extractMediaBag True dir media return $ walk (adjustImagePath dir fps) d adjustImagePath :: FilePath -> [FilePath] -> Inline -> Inline adjustImagePath dir paths (Image attr lab (src, tit)) | src `elem` paths = Image attr lab (dir ++ "/" ++ src, tit) adjustImagePath _ _ x = x adjustMetadata :: M.Map String MetaValue -> Pandoc -> IO Pandoc adjustMetadata metadata d = return $ M.foldWithKey setMeta d metadata applyTransforms :: [Transform] -> Pandoc -> IO Pandoc applyTransforms transforms d = return $ foldr ($) d transforms -- First we check to see if a filter is found. If not, and if it's -- not an absolute path, we check to see whether it's in `userdir/filters`. -- If not, we leave it unchanged. expandFilterPath :: Maybe FilePath -> FilePath -> IO FilePath expandFilterPath mbDatadir fp = do fpExists <- doesFileExist fp if fpExists then return fp else case mbDatadir of Just datadir | isRelative fp -> do let filterPath = (datadir </> "filters" </> fp) filterPathExists <- doesFileExist filterPath if filterPathExists then return filterPath else return fp _ -> return fp applyFilters :: Maybe FilePath -> [FilePath] -> [String] -> Pandoc -> IO Pandoc applyFilters mbDatadir filters args d = do expandedFilters <- mapM (expandFilterPath mbDatadir) filters foldrM ($) d $ map (flip externalFilter args) expandedFilters uppercaseFirstLetter :: String -> String uppercaseFirstLetter (c:cs) = toUpper c : cs uppercaseFirstLetter [] = [] main :: IO () main = do rawArgs <- map UTF8.decodeArg <$> getArgs prg <- getProgName let (actions, args, errors) = getOpt Permute options rawArgs unless (null errors) $ err 2 $ concat $ errors ++ ["Try " ++ prg ++ " --help for more information."] -- thread option data structure through all supplied option actions opts <- foldl (>>=) (return defaultOpts) actions convertWithOpts opts args convertWithOpts :: Opt -> [FilePath] -> IO () convertWithOpts opts args = do let Opt { optTabStop = tabStop , optPreserveTabs = preserveTabs , optStandalone = standalone , optReader = readerName , optWriter = writerName , optParseRaw = parseRaw , optVariables = variables , optMetadata = metadata , optTableOfContents = toc , optTransforms = transforms , optTemplate = templatePath , optOutputFile = outputFile , optNumberSections = numberSections , optNumberOffset = numberFrom , optSectionDivs = sectionDivs , optIncremental = incremental , optSelfContained = selfContained , optSmart = smart , optOldDashes = oldDashes , optHtml5 = html5 , optHtmlQTags = htmlQTags , optHighlight = highlight , optHighlightStyle = highlightStyle , optTopLevelDivision = topLevelDivision , optHTMLMathMethod = mathMethod' , optReferenceODT = referenceODT , optReferenceDocx = referenceDocx , optEpubStylesheet = epubStylesheet , optEpubMetadata = epubMetadata , optEpubFonts = epubFonts , optEpubChapterLevel = epubChapterLevel , optTOCDepth = epubTOCDepth , optDumpArgs = dumpArgs , optIgnoreArgs = ignoreArgs , optVerbose = verbose , optReferenceLinks = referenceLinks , optReferenceLocation = referenceLocation , optDpi = dpi , optWrapText = wrap , optColumns = columns , optFilters = filters , optEmailObfuscation = obfuscationMethod , optIdentifierPrefix = idPrefix , optIndentedCodeClasses = codeBlockClasses , optDataDir = mbDataDir , optCiteMethod = citeMethod , optListings = listings , optLaTeXEngine = latexEngine , optLaTeXEngineArgs = latexEngineArgs , optSlideLevel = slideLevel , optSetextHeaders = setextHeaders , optAscii = ascii , optTeXLigatures = texLigatures , optDefaultImageExtension = defaultImageExtension , optExtractMedia = mbExtractMedia , optTrace = trace , optTrackChanges = trackChanges , optFileScope = fileScope , optKaTeXStylesheet = katexStylesheet , optKaTeXJS = katexJS } = opts when dumpArgs $ do UTF8.hPutStrLn stdout outputFile mapM_ (UTF8.hPutStrLn stdout) args exitSuccess let csscdn = "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/katex.min.css" let mathMethod = case (katexJS, katexStylesheet) of (Nothing, _) -> mathMethod' (Just js, ss) -> KaTeX js (fromMaybe csscdn ss) -- --bibliography implies -F pandoc-citeproc for backwards compatibility: let needsCiteproc = isJust (M.lookup "bibliography" (optMetadata opts)) && optCiteMethod opts `notElem` [Natbib, Biblatex] && "pandoc-citeproc" `notElem` map takeBaseName filters let filters' = if needsCiteproc then "pandoc-citeproc" : filters else filters let sources = if ignoreArgs then [] else args datadir <- case mbDataDir of Nothing -> E.catch (Just <$> getAppUserDataDirectory "pandoc") (\e -> let _ = (e :: E.SomeException) in return Nothing) Just _ -> return mbDataDir -- assign reader and writer based on options and filenames let readerName' = case map toLower readerName of [] -> defaultReaderName (if any isURI sources then "html" else "markdown") sources "html4" -> "html" x -> x let writerName' = case map toLower writerName of [] -> defaultWriterName outputFile "epub2" -> "epub" "html4" -> "html" x -> x let format = takeWhile (`notElem` ['+','-']) $ takeFileName writerName' -- in case path to lua script let pdfOutput = map toLower (takeExtension outputFile) == ".pdf" let laTeXOutput = format `elem` ["latex", "beamer"] let conTeXtOutput = format == "context" let html5Output = format == "html5" let laTeXInput = "latex" `isPrefixOf` readerName' || "beamer" `isPrefixOf` readerName' writer <- if ".lua" `isSuffixOf` format -- note: use non-lowercased version writerName then return $ IOStringWriter $ writeCustom writerName else case getWriter writerName' of Left e -> err 9 $ if format == "pdf" then e ++ "\nTo create a pdf with pandoc, use " ++ "the latex or beamer writer and specify\n" ++ "an output file with .pdf extension " ++ "(pandoc -t latex -o filename.pdf)." else e Right w -> return w reader <- if "t2t" == readerName' then (mkStringReader . readTxt2Tags) <$> getT2TMeta sources outputFile else case getReader readerName' of Right r -> return r Left e -> err 7 e' where e' = case readerName' of "pdf" -> e ++ "\nPandoc can convert to PDF, but not from PDF." "doc" -> e ++ "\nPandoc can convert from DOCX, but not from DOC.\nTry using Word to save your DOC file as DOCX, and convert that with pandoc." _ -> e let standalone' = standalone || not (isTextFormat format) || pdfOutput templ <- case templatePath of _ | not standalone' -> return Nothing Nothing -> do deftemp <- getDefaultTemplate datadir format case deftemp of Left e -> throwIO e Right t -> return (Just t) Just tp -> do -- strip off extensions let tp' = case takeExtension tp of "" -> tp <.> format _ -> tp Just <$> E.catch (UTF8.readFile tp') (\e -> if isDoesNotExistError e then E.catch (readDataFileUTF8 datadir ("templates" </> tp')) (\e' -> let _ = (e' :: E.SomeException) in throwIO e') else throwIO e) variables' <- case mathMethod of LaTeXMathML Nothing -> do s <- readDataFileUTF8 datadir "LaTeXMathML.js" return $ ("mathml-script", s) : variables _ -> return variables variables'' <- if format == "dzslides" then do dztempl <- readDataFileUTF8 datadir ("dzslides" </> "template.html") let dzline = "<!-- {{{{ dzslides core" let dzcore = unlines $ dropWhile (not . (dzline `isPrefixOf`)) $ lines dztempl return $ ("dzslides-core", dzcore) : variables' else return variables' let sourceURL = case sources of [] -> Nothing (x:_) -> case parseURI x of Just u | uriScheme u `elem` ["http:","https:"] -> Just $ show u{ uriQuery = "", uriFragment = "" } _ -> Nothing let readerOpts = def{ readerSmart = if laTeXInput then texLigatures else smart || (texLigatures && (laTeXOutput || conTeXtOutput)) , readerStandalone = standalone' , readerParseRaw = parseRaw , readerColumns = columns , readerTabStop = tabStop , readerOldDashes = oldDashes , readerIndentedCodeClasses = codeBlockClasses , readerApplyMacros = not laTeXOutput , readerDefaultImageExtension = defaultImageExtension , readerTrace = trace , readerTrackChanges = trackChanges , readerFileScope = fileScope } #ifdef _WINDOWS let istty = True #else istty <- queryTerminal stdOutput #endif when (istty && not (isTextFormat format) && outputFile == "-") $ err 5 $ "Cannot write " ++ format ++ " output to stdout.\n" ++ "Specify an output file using the -o option." let readSources [] = mapM readSource ["-"] readSources srcs = mapM readSource srcs readSource "-" = UTF8.getContents readSource src = case parseURI src of Just u | uriScheme u `elem` ["http:","https:"] -> readURI src | uriScheme u == "file:" -> UTF8.readFile (uriPath u) _ -> UTF8.readFile src readURI src = do res <- openURL src case res of Left e -> throwIO e Right (bs,_) -> return $ UTF8.toString bs let readFiles [] = error "Cannot read archive from stdin" readFiles [x] = B.readFile x readFiles (x:xs) = mapM_ (warn . ("Ignoring: " ++)) xs >> B.readFile x let convertTabs = tabFilter (if preserveTabs || readerName' == "t2t" then 0 else tabStop) let handleIncludes' :: String -> IO (Either PandocError String) handleIncludes' = if readerName' `elem` ["latex", "latex+lhs"] then handleIncludes else return . Right let sourceToDoc :: [FilePath] -> IO (Pandoc, MediaBag) sourceToDoc sources' = fmap handleError $ case reader of StringReader r-> do srcs <- convertTabs . intercalate "\n" <$> readSources sources' doc <- handleIncludes' srcs either (return . Left) (\s -> fmap (,mempty) <$> r readerOpts s) doc ByteStringReader r -> readFiles sources' >>= r readerOpts -- We parse first if (1) fileScope is set, (2), it's a binary -- reader, or (3) we're reading JSON. This is easier to do of an AND -- of negatives as opposed to an OR of positives, so we do default -- parsing if it's a StringReader AND (fileScope is set AND it's not -- a JSON reader). (doc, media) <- case reader of (StringReader _) | not fileScope && readerName' /= "json" -> sourceToDoc sources _ | null sources -> sourceToDoc sources _ -> do pairs <- mapM (\s -> sourceToDoc [s]) sources return (mconcat $ map fst pairs, mconcat $ map snd pairs) let writerOptions = def { writerTemplate = templ, writerVariables = variables'', writerTabStop = tabStop, writerTableOfContents = toc, writerHTMLMathMethod = mathMethod, writerIncremental = incremental, writerCiteMethod = citeMethod, writerIgnoreNotes = False, writerNumberSections = numberSections, writerNumberOffset = numberFrom, writerSectionDivs = sectionDivs, writerReferenceLinks = referenceLinks, writerReferenceLocation = referenceLocation, writerDpi = dpi, writerWrapText = wrap, writerColumns = columns, writerEmailObfuscation = obfuscationMethod, writerIdentifierPrefix = idPrefix, writerSourceURL = sourceURL, writerUserDataDir = datadir, writerHtml5 = html5, writerHtmlQTags = htmlQTags, writerTopLevelDivision = topLevelDivision, writerListings = listings, writerBeamer = False, writerSlideLevel = slideLevel, writerHighlight = highlight, writerHighlightStyle = highlightStyle, writerSetextHeaders = setextHeaders, writerTeXLigatures = texLigatures, writerEpubMetadata = epubMetadata, writerEpubStylesheet = epubStylesheet, writerEpubFonts = epubFonts, writerEpubChapterLevel = epubChapterLevel, writerTOCDepth = epubTOCDepth, writerReferenceODT = referenceODT, writerReferenceDocx = referenceDocx, writerMediaBag = media, writerVerbose = verbose, writerLaTeXArgs = latexEngineArgs } doc' <- (maybe return (extractMedia media) mbExtractMedia >=> adjustMetadata metadata >=> applyTransforms transforms >=> applyFilters datadir filters' [format]) doc let writeFnBinary :: FilePath -> B.ByteString -> IO () writeFnBinary "-" = B.putStr writeFnBinary f = B.writeFile (UTF8.encodePath f) let writerFn :: FilePath -> String -> IO () writerFn "-" = UTF8.putStr writerFn f = UTF8.writeFile f case writer of IOStringWriter f -> f writerOptions doc' >>= writerFn outputFile IOByteStringWriter f -> f writerOptions doc' >>= writeFnBinary outputFile PureStringWriter f | pdfOutput -> do -- make sure writer is latex or beamer or context or html5 unless (laTeXOutput || conTeXtOutput || html5Output) $ err 47 $ "cannot produce pdf output with " ++ format ++ " writer" let pdfprog = case () of _ | conTeXtOutput -> "context" _ | html5Output -> "wkhtmltopdf" _ -> latexEngine -- check for pdf creating program mbPdfProg <- findExecutable pdfprog when (isNothing mbPdfProg) $ err 41 $ pdfprog ++ " not found. " ++ pdfprog ++ " is needed for pdf output." res <- makePDF pdfprog f writerOptions doc' case res of Right pdf -> writeFnBinary outputFile pdf Left err' -> do B.hPutStr stderr err' B.hPut stderr $ B.pack [10] err 43 "Error producing PDF" | otherwise -> selfcontain (f writerOptions doc' ++ ['\n' | not standalone']) >>= writerFn outputFile . handleEntities where htmlFormat = format `elem` ["html","html5","s5","slidy","slideous","dzslides","revealjs"] selfcontain = if selfContained && htmlFormat then makeSelfContained writerOptions else return handleEntities = if htmlFormat && ascii then toEntities else id ��pandoc-1.19.2.4/tests/test-pandoc.hs����������������������������������������������������������������0000644�0000000�0000000�00000004666�13155240143�015331� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# OPTIONS_GHC -Wall #-} module Main where import Test.Framework import GHC.IO.Encoding import qualified Tests.Old import qualified Tests.Readers.LaTeX import qualified Tests.Readers.Markdown import qualified Tests.Readers.Org import qualified Tests.Readers.HTML import qualified Tests.Readers.RST import qualified Tests.Readers.Docx import qualified Tests.Readers.Odt import qualified Tests.Readers.Txt2Tags import qualified Tests.Readers.EPUB import qualified Tests.Writers.ConTeXt import qualified Tests.Writers.LaTeX import qualified Tests.Writers.HTML import qualified Tests.Writers.Docbook import qualified Tests.Writers.Native import qualified Tests.Writers.Markdown import qualified Tests.Writers.Plain import qualified Tests.Writers.AsciiDoc import qualified Tests.Writers.Docx import qualified Tests.Writers.RST import qualified Tests.Writers.TEI import qualified Tests.Shared import qualified Tests.Walk import Text.Pandoc.Shared (inDirectory) import System.Environment (getArgs) tests :: [Test] tests = [ testGroup "Old" Tests.Old.tests , testGroup "Shared" Tests.Shared.tests , testGroup "Walk" Tests.Walk.tests , testGroup "Writers" [ testGroup "Native" Tests.Writers.Native.tests , testGroup "ConTeXt" Tests.Writers.ConTeXt.tests , testGroup "LaTeX" Tests.Writers.LaTeX.tests , testGroup "HTML" Tests.Writers.HTML.tests , testGroup "Docbook" Tests.Writers.Docbook.tests , testGroup "Markdown" Tests.Writers.Markdown.tests , testGroup "Plain" Tests.Writers.Plain.tests , testGroup "AsciiDoc" Tests.Writers.AsciiDoc.tests , testGroup "Docx" Tests.Writers.Docx.tests , testGroup "RST" Tests.Writers.RST.tests , testGroup "TEI" Tests.Writers.TEI.tests ] , testGroup "Readers" [ testGroup "LaTeX" Tests.Readers.LaTeX.tests , testGroup "Markdown" Tests.Readers.Markdown.tests , testGroup "HTML" Tests.Readers.HTML.tests , testGroup "Org" Tests.Readers.Org.tests , testGroup "RST" Tests.Readers.RST.tests , testGroup "Docx" Tests.Readers.Docx.tests , testGroup "Odt" Tests.Readers.Odt.tests , testGroup "Txt2Tags" Tests.Readers.Txt2Tags.tests , testGroup "EPUB" Tests.Readers.EPUB.tests ] ] main :: IO () main = do setLocaleEncoding utf8 args <- getArgs inDirectory "tests" $ defaultMainWithArgs tests args ��������������������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Old.hs������������������������������������������������������������������0000644�0000000�0000000�00000031245�13155240142�014720� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������module Tests.Old (tests) where import Test.Framework (testGroup, Test ) import Test.Framework.Providers.HUnit import Test.HUnit ( assertBool ) import System.Environment.Executable (getExecutablePath) import System.IO ( openTempFile, stderr ) import System.Process ( runProcess, waitForProcess ) import System.FilePath ( (</>), (<.>), takeDirectory, splitDirectories, joinPath ) import System.Directory import System.Exit import Data.Algorithm.Diff import Text.Pandoc.Shared ( normalize ) import Text.Pandoc.Options import Text.Pandoc.Writers.Native ( writeNative ) import Text.Pandoc.Readers.Native ( readNative ) import Prelude hiding ( readFile ) import qualified Data.ByteString.Lazy as B import Text.Pandoc.UTF8 (toStringLazy) import Text.Printf import Text.Pandoc.Error readFileUTF8 :: FilePath -> IO String readFileUTF8 f = B.readFile f >>= return . toStringLazy data TestResult = TestPassed | TestError ExitCode | TestFailed String FilePath [Diff String] deriving (Eq) instance Show TestResult where show TestPassed = "PASSED" show (TestError ec) = "ERROR " ++ show ec show (TestFailed cmd file d) = '\n' : dash ++ "\n--- " ++ file ++ "\n+++ " ++ cmd ++ "\n" ++ showDiff (1,1) d ++ dash where dash = replicate 72 '-' showDiff :: (Int,Int) -> [Diff String] -> String showDiff _ [] = "" showDiff (l,r) (First ln : ds) = printf "+%4d " l ++ ln ++ "\n" ++ showDiff (l+1,r) ds showDiff (l,r) (Second ln : ds) = printf "-%4d " r ++ ln ++ "\n" ++ showDiff (l,r+1) ds showDiff (l,r) (Both _ _ : ds) = showDiff (l+1,r+1) ds tests :: [Test] tests = [ testGroup "markdown" [ testGroup "writer" $ writerTests "markdown" ++ lhsWriterTests "markdown" , testGroup "reader" [ test "basic" ["-r", "markdown", "-w", "native", "-s", "-S"] "testsuite.txt" "testsuite.native" , test "tables" ["-r", "markdown", "-w", "native", "--columns=80"] "tables.txt" "tables.native" , test "pipe tables" ["-r", "markdown", "-w", "native", "--columns=80"] "pipe-tables.txt" "pipe-tables.native" , test "more" ["-r", "markdown", "-w", "native", "-s", "-S"] "markdown-reader-more.txt" "markdown-reader-more.native" , lhsReaderTest "markdown+lhs" ] , testGroup "citations" [ test "citations" ["-r", "markdown", "-w", "native"] "markdown-citations.txt" "markdown-citations.native" ] ] , testGroup "rst" [ testGroup "writer" (writerTests "rst" ++ lhsWriterTests "rst") , testGroup "reader" [ test "basic" ["-r", "rst", "-w", "native", "-s", "-S", "--columns=80"] "rst-reader.rst" "rst-reader.native" , test "tables" ["-r", "rst", "-w", "native", "--columns=80"] "tables.rst" "tables-rstsubset.native" , lhsReaderTest "rst+lhs" ] ] , testGroup "latex" [ testGroup "writer" (writerTests "latex" ++ lhsWriterTests "latex") , testGroup "reader" [ test "basic" ["-r", "latex", "-w", "native", "-s", "-R"] "latex-reader.latex" "latex-reader.native" , lhsReaderTest "latex+lhs" ] ] , testGroup "html" [ testGroup "writer" (writerTests "html" ++ lhsWriterTests "html") , test "reader" ["-r", "html", "-w", "native", "-s"] "html-reader.html" "html-reader.native" ] , testGroup "s5" [ s5WriterTest "basic" ["-s"] "s5" , s5WriterTest "fancy" ["-s","-m","-i"] "s5" , s5WriterTest "fragment" [] "html" , s5WriterTest "inserts" ["-s", "-H", "insert", "-B", "insert", "-A", "insert", "-c", "main.css"] "html" ] , testGroup "textile" [ testGroup "writer" $ writerTests "textile" , test "reader" ["-r", "textile", "-w", "native", "-s"] "textile-reader.textile" "textile-reader.native" ] , testGroup "docbook" [ 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 "docbook5" [ testGroup "writer" $ writerTests "docbook5" ] , testGroup "native" [ testGroup "writer" $ writerTests "native" , test "reader" ["-r", "native", "-w", "native", "-s"] "testsuite.native" "testsuite.native" ] , testGroup "fb2" [ fb2WriterTest "basic" [] "fb2/basic.markdown" "fb2/basic.fb2" , fb2WriterTest "titles" [] "fb2/titles.markdown" "fb2/titles.fb2" , fb2WriterTest "images" [] "fb2/images.markdown" "fb2/images.fb2" , fb2WriterTest "images-embedded" [] "fb2/images-embedded.html" "fb2/images-embedded.fb2" , fb2WriterTest "math" [] "fb2/math.markdown" "fb2/math.fb2" , fb2WriterTest "tables" [] "tables.native" "tables.fb2" , fb2WriterTest "testsuite" [] "testsuite.native" "writer.fb2" ] , testGroup "mediawiki" [ testGroup "writer" $ writerTests "mediawiki" , test "reader" ["-r", "mediawiki", "-w", "native", "-s"] "mediawiki-reader.wiki" "mediawiki-reader.native" ] , testGroup "dokuwiki" [ testGroup "writer" $ writerTests "dokuwiki" , test "inline_formatting" ["-r", "native", "-w", "dokuwiki", "-s"] "dokuwiki_inline_formatting.native" "dokuwiki_inline_formatting.dokuwiki" , test "multiblock table" ["-r", "native", "-w", "dokuwiki", "-s"] "dokuwiki_multiblock_table.native" "dokuwiki_multiblock_table.dokuwiki" , test "external images" ["-r", "native", "-w", "dokuwiki", "-s"] "dokuwiki_external_images.native" "dokuwiki_external_images.dokuwiki" ] , testGroup "opml" [ test "basic" ["-r", "native", "-w", "opml", "--columns=78", "-s"] "testsuite.native" "writer.opml" , test "reader" ["-r", "opml", "-w", "native", "-s"] "opml-reader.opml" "opml-reader.native" ] , testGroup "haddock" [ testGroup "writer" $ writerTests "haddock" , test "reader" ["-r", "haddock", "-w", "native", "-s"] "haddock-reader.haddock" "haddock-reader.native" ] , testGroup "txt2tags" [ test "reader" ["-r", "t2t", "-w", "native", "-s"] "txt2tags.t2t" "txt2tags.native" ] , testGroup "epub" [ test "features" ["-r", "epub", "-w", "native"] "epub/features.epub" "epub/features.native" , test "wasteland" ["-r", "epub", "-w", "native"] "epub/wasteland.epub" "epub/wasteland.native" , test "formatting" ["-r", "epub", "-w", "native"] "epub/formatting.epub" "epub/formatting.native" ] , testGroup "twiki" [ test "reader" ["-r", "twiki", "-w", "native", "-s"] "twiki-reader.twiki" "twiki-reader.native" ] , testGroup "other writers" $ map (\f -> testGroup f $ writerTests f) [ "opendocument" , "context" , "texinfo", "icml", "tei" , "man" , "plain" , "rtf", "org", "asciidoc", "zimwiki" ] , 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 readFile' :: FilePath -> IO String readFile' f = do s <- readFileUTF8 f return $! (length s `seq` s) lhsWriterTests :: String -> [Test] lhsWriterTests format = [ t "lhs to normal" format , t "lhs to lhs" (format ++ "+lhs") ] where t n f = test n ["--wrap=preserve", "-r", "native", "-s", "-w", f] "lhs-test.native" ("lhs-test" <.> f) lhsReaderTest :: String -> Test lhsReaderTest format = testWithNormalize normalizer "lhs" ["-r", format, "-w", "native"] ("lhs-test" <.> format) norm where normalizer = writeNative def . normalize . handleError . readNative norm = if format == "markdown+lhs" then "lhs-test-markdown.native" else "lhs-test.native" writerTests :: String -> [Test] writerTests format = [ test "basic" (opts ++ ["-s"]) "testsuite.native" ("writer" <.> format) , test "tables" opts "tables.native" ("tables" <.> format) ] where opts = ["-r", "native", "-w", format, "--columns=78", "--variable", "pandoc-version="] s5WriterTest :: String -> [String] -> String -> Test s5WriterTest modifier opts format = test (format ++ " writer (" ++ modifier ++ ")") (["-r", "native", "-w", format] ++ opts) "s5.native" ("s5-" ++ modifier <.> "html") fb2WriterTest :: String -> [String] -> String -> String -> Test fb2WriterTest title opts inputfile normfile = testWithNormalize (ignoreBinary . formatXML) title (["-t", "fb2"]++opts) inputfile normfile where formatXML xml = splitTags $ zip xml (drop 1 xml) splitTags [] = [] splitTags [end] = fst end : snd end : [] splitTags (('>','<'):rest) = ">\n" ++ splitTags rest splitTags ((c,_):rest) = c : splitTags rest ignoreBinary = unlines . filter (not . startsWith "<binary ") . lines startsWith tag str = all (uncurry (==)) $ zip tag str -- | Run a test without normalize function, return True if test passed. test :: String -- ^ Title of test -> [String] -- ^ Options to pass to pandoc -> String -- ^ Input filepath -> FilePath -- ^ Norm (for test results) filepath -> Test test = testWithNormalize id -- | Run a test with normalize function, return True if test passed. testWithNormalize :: (String -> String) -- ^ Normalize function for output -> String -- ^ Title of test -> [String] -- ^ Options to pass to pandoc -> String -- ^ Input filepath -> FilePath -- ^ Norm (for test results) filepath -> Test testWithNormalize normalizer testname opts inp norm = testCase testname $ do -- find pandoc executable relative to test-pandoc -- First, try in same directory (e.g. if both in ~/.cabal/bin) -- Second, try ../pandoc (e.g. if in dist/XXX/build/test-pandoc) pandocPath <- do testExePath <- getExecutablePath let testExeDir = takeDirectory testExePath found <- doesFileExist (testExeDir </> "pandoc") return $ if found then testExeDir </> "pandoc" else case splitDirectories testExeDir of [] -> error "test-pandoc: empty testExeDir" xs -> joinPath (init xs) </> "pandoc" </> "pandoc" (outputPath, hOut) <- openTempFile "" "pandoc-test" let inpPath = inp let normPath = norm let options = ["--data-dir", ".." </> "data"] ++ [inpPath] ++ opts let cmd = pandocPath ++ " " ++ unwords options let findDynlibDir [] = Nothing findDynlibDir ("build":xs) = Just $ joinPath (reverse xs) </> "build" findDynlibDir (_:xs) = findDynlibDir xs let mbDynlibDir = findDynlibDir (reverse $ splitDirectories pandocPath) let dynlibEnv = case mbDynlibDir of Nothing -> [] Just d -> [("DYLD_LIBRARY_PATH", d), ("LD_LIBRARY_PATH", d)] let env = dynlibEnv ++ [("TMP","."),("LANG","en_US.UTF-8"),("HOME", "./")] ph <- runProcess pandocPath options Nothing (Just env) Nothing (Just hOut) (Just stderr) ec <- waitForProcess ph result <- if ec == ExitSuccess then do -- filter \r so the tests will work on Windows machines outputContents <- readFile' outputPath >>= return . filter (/='\r') . normalizer normContents <- readFile' normPath >>= return . filter (/='\r') . normalizer if outputContents == normContents then return TestPassed else return $ TestFailed cmd normPath $ getDiff (lines outputContents) (lines normContents) else return $ TestError ec removeFile outputPath assertBool (show result) (result == TestPassed) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Helpers.hs��������������������������������������������������������������0000644�0000000�0000000�00000004777�13155240142�015616� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} -- Utility functions for the test suite. module Tests.Helpers ( test , (=?>) , property , ToString(..) , ToPandoc(..) ) where import Text.Pandoc.Definition import Text.Pandoc.Builder (Inlines, Blocks, doc, plain) import Test.Framework import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 import Test.HUnit (assertBool) import Text.Pandoc.Shared (normalize, trimr) import Text.Pandoc.Options import Text.Pandoc.Writers.Native (writeNative) import qualified Test.QuickCheck.Property as QP import Data.Algorithm.Diff import qualified Data.Map as M test :: (ToString a, ToString b, ToString c) => (a -> b) -- ^ function to test -> String -- ^ name of test case -> (a, c) -- ^ (input, expected value) -> Test test fn name (input, expected) = testCase name $ assertBool msg (actual' == expected') where msg = nl ++ dashes "input" ++ nl ++ input' ++ nl ++ dashes "result" ++ nl ++ unlines (map vividize diff) ++ dashes "" nl = "\n" input' = toString input actual' = lines $ toString $ fn input expected' = lines $ toString expected diff = getDiff expected' actual' dashes "" = replicate 72 '-' dashes x = replicate (72 - length x - 5) '-' ++ " " ++ x ++ " ---" vividize :: Diff String -> String vividize (Both s _) = " " ++ s vividize (First s) = "- " ++ s vividize (Second s) = "+ " ++ s property :: QP.Testable a => TestName -> a -> Test property = testProperty infix 5 =?> (=?>) :: a -> b -> (a,b) x =?> y = (x, y) class ToString a where toString :: a -> String instance ToString Pandoc where toString d = writeNative def{ writerTemplate = s } $ toPandoc d where s = case d of (Pandoc (Meta m) _) | M.null m -> Nothing | otherwise -> Just "" -- need this to get meta output instance ToString Blocks where toString = writeNative def . toPandoc instance ToString Inlines where toString = trimr . writeNative def . toPandoc instance ToString String where toString = id class ToPandoc a where toPandoc :: a -> Pandoc instance ToPandoc Pandoc where toPandoc = normalize instance ToPandoc Blocks where toPandoc = normalize . doc instance ToPandoc Inlines where toPandoc = normalize . doc . plain �pandoc-1.19.2.4/tests/Tests/Shared.hs���������������������������������������������������������������0000644�0000000�0000000�00000005545�13155240142�015414� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������module Tests.Shared (tests) where import Text.Pandoc.Definition import Text.Pandoc.Shared import Test.Framework import Tests.Helpers import Text.Pandoc.Arbitrary() import Test.Framework.Providers.HUnit import Test.HUnit ( assertBool, (@?=) ) import Text.Pandoc.Builder import System.FilePath.Posix (joinPath) tests :: [Test] tests = [ testGroup "normalize" [ property "p_normalize_blocks_rt" p_normalize_blocks_rt , property "p_normalize_inlines_rt" p_normalize_inlines_rt , property "p_normalize_no_trailing_spaces" p_normalize_no_trailing_spaces ] , testGroup "compactify'DL" [ testCase "compactify'DL with empty def" $ assertBool "compactify'DL" (let x = [(str "word", [para (str "def"), mempty])] in compactify'DL x == x) ] , testGroup "collapseFilePath" testCollapse ] p_normalize_blocks_rt :: [Block] -> Bool p_normalize_blocks_rt bs = normalizeBlocks bs == normalizeBlocks (normalizeBlocks bs) p_normalize_inlines_rt :: [Inline] -> Bool p_normalize_inlines_rt ils = normalizeInlines ils == normalizeInlines (normalizeInlines ils) p_normalize_no_trailing_spaces :: [Inline] -> Bool p_normalize_no_trailing_spaces ils = null ils' || last ils' /= Space where ils' = normalizeInlines $ ils ++ [Space] testCollapse :: [Test] testCollapse = map (testCase "collapse") [ (collapseFilePath (joinPath [ ""]) @?= (joinPath [ ""])) , (collapseFilePath (joinPath [ ".","foo"]) @?= (joinPath [ "foo"])) , (collapseFilePath (joinPath [ ".",".","..","foo"]) @?= (joinPath [ joinPath ["..", "foo"]])) , (collapseFilePath (joinPath [ "..","foo"]) @?= (joinPath [ "..","foo"])) , (collapseFilePath (joinPath [ "","bar","..","baz"]) @?= (joinPath [ "","baz"])) , (collapseFilePath (joinPath [ "","..","baz"]) @?= (joinPath [ "","..","baz"])) , (collapseFilePath (joinPath [ ".","foo","..",".","bar","..",".",".","baz"]) @?= (joinPath [ "baz"])) , (collapseFilePath (joinPath [ ".",""]) @?= (joinPath [ ""])) , (collapseFilePath (joinPath [ ".",".",""]) @?= (joinPath [ ""])) , (collapseFilePath (joinPath [ "..",""]) @?= (joinPath [ ".."])) , (collapseFilePath (joinPath [ "..",".",""]) @?= (joinPath [ ".."])) , (collapseFilePath (joinPath [ ".","..",""]) @?= (joinPath [ ".."])) , (collapseFilePath (joinPath [ "..","..",""]) @?= (joinPath [ "..",".."])) , (collapseFilePath (joinPath [ "parent","foo","baz","..","bar"]) @?= (joinPath [ "parent","foo","bar"])) , (collapseFilePath (joinPath [ "parent","foo","baz","..","..","bar"]) @?= (joinPath [ "parent","bar"])) , (collapseFilePath (joinPath [ "parent","foo",".."]) @?= (joinPath [ "parent"])) , (collapseFilePath (joinPath [ "","parent","foo","..","..","bar"]) @?= (joinPath [ "","bar"])) , (collapseFilePath (joinPath [ "",".","parent","foo"]) @?= (joinPath [ "","parent","foo"]))] �����������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Walk.hs�����������������������������������������������������������������0000644�0000000�0000000�00000002425�13155240142�015076� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE ScopedTypeVariables, FlexibleContexts #-} module Tests.Walk (tests) where import Text.Pandoc.Definition import Text.Pandoc.Walk import Test.Framework import Tests.Helpers import Data.Char (toUpper) import Text.Pandoc.Arbitrary() import Data.Generics tests :: [Test] tests = [ testGroup "Walk" [ property "p_walk inlineTrans" (p_walk inlineTrans) , property "p_walk blockTrans" (p_walk blockTrans) , property "p_query inlineQuery" (p_query inlineQuery) , property "p_query blockQuery" (p_query blockQuery) ] ] p_walk :: (Typeable a, Walkable a Pandoc) => (a -> a) -> Pandoc -> Bool p_walk f d = everywhere (mkT f) d == walk f d p_query :: (Eq a, Typeable a1, Monoid a, Walkable a1 Pandoc) => (a1 -> a) -> Pandoc -> Bool p_query f d = everything mappend (mempty `mkQ` f) d == query f d inlineTrans :: Inline -> Inline inlineTrans (Str xs) = Str $ map toUpper xs inlineTrans (Emph xs) = Strong xs inlineTrans x = x blockTrans :: Block -> Block blockTrans (Plain xs) = Para xs blockTrans (BlockQuote xs) = Div ("",["special"],[]) xs blockTrans x = x inlineQuery :: Inline -> String inlineQuery (Str xs) = xs inlineQuery _ = "" blockQuery :: Block -> [Int] blockQuery (Header lev _ _) = [lev] blockQuery _ = [] �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Readers/LaTeX.hs��������������������������������������������������������0000644�0000000�0000000�00000026471�13155240142�016551� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} module Tests.Readers.LaTeX (tests) where import Text.Pandoc.Definition import Test.Framework import Tests.Helpers import Text.Pandoc.Arbitrary() import Text.Pandoc.Builder import Text.Pandoc latex :: String -> Pandoc latex = handleError . readLaTeX def infix 4 =: (=:) :: ToString c => String -> (String, c) -> Test (=:) = test latex simpleTable' :: [Alignment] -> [[Blocks]] -> Blocks simpleTable' aligns = table "" (zip aligns (repeat 0.0)) (map (const mempty) aligns) tests :: [Test] tests = [ testGroup "basic" [ "simple" =: "word" =?> para "word" , "space" =: "some text" =?> para "some text" , "emphasized" =: "\\emph{emphasized}" =?> para (emph "emphasized") ] , testGroup "headers" [ "level 1" =: "\\section{header}" =?> headerWith ("header",[],[]) 1 "header" , "level 2" =: "\\subsection{header}" =?> headerWith ("header",[],[]) 2 "header" , "level 3" =: "\\subsubsection{header}" =?> headerWith ("header",[],[]) 3 "header" , "emph" =: "\\section{text \\emph{emph}}" =?> headerWith ("text-emph",[],[]) 1 ("text" <> space <> emph "emph") , "link" =: "\\section{text \\href{/url}{link}}" =?> headerWith ("text-link",[],[]) 1 ("text" <> space <> link "/url" "" "link") ] , testGroup "math" [ "escaped $" =: "$x=\\$4$" =?> para (math "x=\\$4") ] , testGroup "space and comments" [ "blank lines + space at beginning" =: "\n \n hi" =?> para "hi" , "blank lines + space + comments" =: "% my comment\n\n \n % another\n\nhi" =?> para "hi" , "comment in paragraph" =: "hi % this is a comment\nthere\n" =?> para "hi there" ] , testGroup "code blocks" [ "identifier" =: "\\begin{lstlisting}[label=test]\\end{lstlisting}" =?> codeBlockWith ("test", [], [("label","test")]) "" , "no identifier" =: "\\begin{lstlisting}\\end{lstlisting}" =?> codeBlock "" ] , testGroup "tables" [ "Single cell table" =: "\\begin{tabular}{|l|}Test\\\\\\end{tabular}" =?> simpleTable' [AlignLeft] [[plain "Test"]] , "Multi cell table" =: "\\begin{tabular}{|rl|}One & Two\\\\ \\end{tabular}" =?> simpleTable' [AlignRight,AlignLeft] [[plain "One", plain "Two"]] , "Multi line table" =: unlines [ "\\begin{tabular}{|c|}" , "One\\\\" , "Two\\\\" , "Three\\\\" , "\\end{tabular}" ] =?> simpleTable' [AlignCenter] [[plain "One"], [plain "Two"], [plain "Three"]] , "Empty table" =: "\\begin{tabular}{}\\end{tabular}" =?> simpleTable' [] [] , "Table with fixed column width" =: "\\begin{tabular}{|p{5cm}r|}One & Two\\\\ \\end{tabular}" =?> simpleTable' [AlignLeft,AlignRight] [[plain "One", plain "Two"]] , "Table with empty column separators" =: "\\begin{tabular}{@{}r@{}l}One & Two\\\\ \\end{tabular}" =?> simpleTable' [AlignRight,AlignLeft] [[plain "One", plain "Two"]] , "Table with custom column separators" =: unlines [ "\\begin{tabular}{@{($\\to$)}r@{\\hspace{2cm}}l}" , "One&Two\\\\" , "\\end{tabular}" ] =?> simpleTable' [AlignRight,AlignLeft] [[plain "One", plain "Two"]] , "Table with vertical alignment argument" =: "\\begin{tabular}[t]{r|r}One & Two\\\\ \\end{tabular}" =?> simpleTable' [AlignRight,AlignRight] [[plain "One", plain "Two"]] ] , testGroup "citations" [ natbibCitations , biblatexCitations ] , let hex = ['0'..'9']++['a'..'f'] in testGroup "Character Escapes" [ "Two-character escapes" =: concat ["^^"++[i,j] | i <- hex, j <- hex] =?> para (str ['\0'..'\255']) , "One-character escapes" =: concat ["^^"++[i] | i <- hex] =?> para (str $ ['p'..'y']++['!'..'&']) ] ] baseCitation :: Citation baseCitation = Citation{ citationId = "item1" , citationPrefix = [] , citationSuffix = [] , citationMode = AuthorInText , citationNoteNum = 0 , citationHash = 0 } rt :: String -> Inlines rt = rawInline "latex" natbibCitations :: Test natbibCitations = testGroup "natbib" [ "citet" =: "\\citet{item1}" =?> para (cite [baseCitation] (rt "\\citet{item1}")) , "suffix" =: "\\citet[p.~30]{item1}" =?> para (cite [baseCitation{ citationSuffix = toList $ text "p.\160\&30" }] (rt "\\citet[p.~30]{item1}")) , "suffix long" =: "\\citet[p.~30, with suffix]{item1}" =?> para (cite [baseCitation{ citationSuffix = toList $ text "p.\160\&30, with suffix" }] (rt "\\citet[p.~30, with suffix]{item1}")) , "multiple" =: "\\citeauthor{item1} \\citetext{\\citeyear{item1}; \\citeyear[p.~30]{item2}; \\citealp[see also][]{item3}}" =?> para (cite [baseCitation{ citationMode = AuthorInText } ,baseCitation{ citationMode = SuppressAuthor , citationSuffix = [Str "p.\160\&30"] , citationId = "item2" } ,baseCitation{ citationId = "item3" , citationPrefix = [Str "see",Space,Str "also"] , citationMode = NormalCitation } ] (rt "\\citetext{\\citeyear{item1}; \\citeyear[p.~30]{item2}; \\citealp[see also][]{item3}}")) , "group" =: "\\citetext{\\citealp[see][p.~34--35]{item1}; \\citealp[also][chap. 3]{item3}}" =?> para (cite [baseCitation{ citationMode = NormalCitation , citationPrefix = [Str "see"] , citationSuffix = [Str "p.\160\&34\8211\&35"] } ,baseCitation{ citationMode = NormalCitation , citationId = "item3" , citationPrefix = [Str "also"] , citationSuffix = [Str "chap.",Space,Str "3"] } ] (rt "\\citetext{\\citealp[see][p.~34--35]{item1}; \\citealp[also][chap. 3]{item3}}")) , "suffix and locator" =: "\\citep[pp.~33, 35--37, and nowhere else]{item1}" =?> para (cite [baseCitation{ citationMode = NormalCitation , citationSuffix = [Str "pp.\160\&33,",Space,Str "35\8211\&37,",Space,Str "and",Space,Str "nowhere",Space, Str "else"] }] (rt "\\citep[pp.~33, 35--37, and nowhere else]{item1}")) , "suffix only" =: "\\citep[and nowhere else]{item1}" =?> para (cite [baseCitation{ citationMode = NormalCitation , citationSuffix = toList $ text "and nowhere else" }] (rt "\\citep[and nowhere else]{item1}")) , "no author" =: "\\citeyearpar{item1}, and now Doe with a locator \\citeyearpar[p.~44]{item2}" =?> para (cite [baseCitation{ citationMode = SuppressAuthor }] (rt "\\citeyearpar{item1}") <> text ", and now Doe with a locator " <> cite [baseCitation{ citationMode = SuppressAuthor , citationSuffix = [Str "p.\160\&44"] , citationId = "item2" }] (rt "\\citeyearpar[p.~44]{item2}")) , "markup" =: "\\citep[\\emph{see}][p. \\textbf{32}]{item1}" =?> para (cite [baseCitation{ citationMode = NormalCitation , citationPrefix = [Emph [Str "see"]] , citationSuffix = [Str "p.",Space, Strong [Str "32"]] }] (rt "\\citep[\\emph{see}][p. \\textbf{32}]{item1}")) ] biblatexCitations :: Test biblatexCitations = testGroup "biblatex" [ "textcite" =: "\\textcite{item1}" =?> para (cite [baseCitation] (rt "\\textcite{item1}")) , "suffix" =: "\\textcite[p.~30]{item1}" =?> para (cite [baseCitation{ citationSuffix = toList $ text "p.\160\&30" }] (rt "\\textcite[p.~30]{item1}")) , "suffix long" =: "\\textcite[p.~30, with suffix]{item1}" =?> para (cite [baseCitation{ citationSuffix = toList $ text "p.\160\&30, with suffix" }] (rt "\\textcite[p.~30, with suffix]{item1}")) , "multiple" =: "\\textcites{item1}[p.~30]{item2}[see also][]{item3}" =?> para (cite [baseCitation{ citationMode = AuthorInText } ,baseCitation{ citationMode = NormalCitation , citationSuffix = [Str "p.\160\&30"] , citationId = "item2" } ,baseCitation{ citationId = "item3" , citationPrefix = [Str "see",Space,Str "also"] , citationMode = NormalCitation } ] (rt "\\textcites{item1}[p.~30]{item2}[see also][]{item3}")) , "group" =: "\\autocites[see][p.~34--35]{item1}[also][chap. 3]{item3}" =?> para (cite [baseCitation{ citationMode = NormalCitation , citationPrefix = [Str "see"] , citationSuffix = [Str "p.\160\&34\8211\&35"] } ,baseCitation{ citationMode = NormalCitation , citationId = "item3" , citationPrefix = [Str "also"] , citationSuffix = [Str "chap.",Space,Str "3"] } ] (rt "\\autocites[see][p.~34--35]{item1}[also][chap. 3]{item3}")) , "suffix and locator" =: "\\autocite[pp.~33, 35--37, and nowhere else]{item1}" =?> para (cite [baseCitation{ citationMode = NormalCitation , citationSuffix = [Str "pp.\160\&33,",Space,Str "35\8211\&37,",Space,Str "and",Space,Str "nowhere",Space, Str "else"] }] (rt "\\autocite[pp.~33, 35--37, and nowhere else]{item1}")) , "suffix only" =: "\\autocite[and nowhere else]{item1}" =?> para (cite [baseCitation{ citationMode = NormalCitation , citationSuffix = toList $ text "and nowhere else" }] (rt "\\autocite[and nowhere else]{item1}")) , "no author" =: "\\autocite*{item1}, and now Doe with a locator \\autocite*[p.~44]{item2}" =?> para (cite [baseCitation{ citationMode = SuppressAuthor }] (rt "\\autocite*{item1}") <> text ", and now Doe with a locator " <> cite [baseCitation{ citationMode = SuppressAuthor , citationSuffix = [Str "p.\160\&44"] , citationId = "item2" }] (rt "\\autocite*[p.~44]{item2}")) , "markup" =: "\\autocite[\\emph{see}][p. \\textbf{32}]{item1}" =?> para (cite [baseCitation{ citationMode = NormalCitation , citationPrefix = [Emph [Str "see"]] , citationSuffix = [Str "p.",Space, Strong [Str "32"]] }] (rt "\\autocite[\\emph{see}][p. \\textbf{32}]{item1}")) , "parencite" =: "\\parencite{item1}" =?> para (cite [baseCitation{ citationMode = NormalCitation }] (rt "\\parencite{item1}")) ] �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Readers/HTML.hs���������������������������������������������������������0000644�0000000�0000000�00000003127�13155240142�016331� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} module Tests.Readers.HTML (tests) where import Text.Pandoc.Definition import Test.Framework import Tests.Helpers import Text.Pandoc.Arbitrary() import Text.Pandoc.Builder import Text.Pandoc html :: String -> Pandoc html = handleError . readHtml def tests :: [Test] tests = [ testGroup "base tag" [ test html "simple" $ "<head><base href=\"http://www.w3schools.com/images/foo\" ></head><body><img src=\"stickman.gif\" alt=\"Stickman\"></head>" =?> plain (image "http://www.w3schools.com/images/stickman.gif" "" (text "Stickman")) , test html "slash at end of base" $ "<head><base href=\"http://www.w3schools.com/images/\" ></head><body><img src=\"stickman.gif\" alt=\"Stickman\"></head>" =?> plain (image "http://www.w3schools.com/images/stickman.gif" "" (text "Stickman")) , test html "slash at beginning of href" $ "<head><base href=\"http://www.w3schools.com/images/\" ></head><body><img src=\"/stickman.gif\" alt=\"Stickman\"></head>" =?> plain (image "http://www.w3schools.com/stickman.gif" "" (text "Stickman")) , test html "absolute URL" $ "<head><base href=\"http://www.w3schools.com/images/\" ></head><body><img src=\"http://example.com/stickman.gif\" alt=\"Stickman\"></head>" =?> plain (image "http://example.com/stickman.gif" "" (text "Stickman")) ] , testGroup "anchors" [ test html "anchor without href" $ "<a name=\"anchor\"/>" =?> plain (spanWith ("anchor",[],[]) mempty) ] ] �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Readers/Markdown.hs�����������������������������������������������������0000644�0000000�0000000�00000052035�13155240142�017351� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} module Tests.Readers.Markdown (tests) where import Text.Pandoc.Definition import Test.Framework import Tests.Helpers import Text.Pandoc.Arbitrary() import Text.Pandoc.Builder import qualified Data.Set as Set import Text.Pandoc markdown :: String -> Pandoc markdown = handleError . readMarkdown def markdownSmart :: String -> Pandoc markdownSmart = handleError . readMarkdown def { readerSmart = True } markdownCDL :: String -> Pandoc markdownCDL = handleError . readMarkdown def { readerExtensions = Set.insert Ext_compact_definition_lists $ readerExtensions def } markdownGH :: String -> Pandoc markdownGH = handleError . readMarkdown def { readerExtensions = githubMarkdownExtensions } infix 4 =: (=:) :: ToString c => String -> (String, c) -> Test (=:) = test markdown testBareLink :: (String, Inlines) -> Test testBareLink (inp, ils) = test (handleError . readMarkdown def{ readerExtensions = Set.fromList [Ext_autolink_bare_uris, Ext_raw_html] }) inp (inp, doc $ para ils) autolink :: String -> Inlines autolink = autolinkWith nullAttr autolinkWith :: Attr -> String -> Inlines autolinkWith attr s = linkWith attr s "" (str s) bareLinkTests :: [(String, Inlines)] bareLinkTests = [ ("http://google.com is a search engine.", autolink "http://google.com" <> " is a search engine.") , ("<a href=\"http://foo.bar.baz\">http://foo.bar.baz</a>", rawInline "html" "<a href=\"http://foo.bar.baz\">" <> "http://foo.bar.baz" <> rawInline "html" "</a>") , ("Try this query: http://google.com?search=fish&time=hour.", "Try this query: " <> autolink "http://google.com?search=fish&time=hour" <> ".") , ("HTTPS://GOOGLE.COM,", autolink "HTTPS://GOOGLE.COM" <> ",") , ("http://el.wikipedia.org/wiki/Τεχνολογία,", autolink "http://el.wikipedia.org/wiki/Τεχνολογία" <> ",") , ("doi:10.1000/182,", autolink "doi:10.1000/182" <> ",") , ("git://github.com/foo/bar.git,", autolink "git://github.com/foo/bar.git" <> ",") , ("file:///Users/joe/joe.txt, and", autolink "file:///Users/joe/joe.txt" <> ", and") , ("mailto:someone@somedomain.com.", autolink "mailto:someone@somedomain.com" <> ".") , ("Use http: this is not a link!", "Use http: this is not a link!") , ("(http://google.com).", "(" <> autolink "http://google.com" <> ").") , ("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]", 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}", 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", autolink "https://github.com/github/hubot/blob/master/scripts/cream.js#L20-20") , ("http://www.rubyonrails.com", autolink "http://www.rubyonrails.com") , ("http://www.rubyonrails.com:80", autolink "http://www.rubyonrails.com:80") , ("http://www.rubyonrails.com/~minam", autolink "http://www.rubyonrails.com/~minam") , ("https://www.rubyonrails.com/~minam", autolink "https://www.rubyonrails.com/~minam") , ("http://www.rubyonrails.com/~minam/url%20with%20spaces", autolink "http://www.rubyonrails.com/~minam/url%20with%20spaces") , ("http://www.rubyonrails.com/foo.cgi?something=here", autolink "http://www.rubyonrails.com/foo.cgi?something=here") , ("http://www.rubyonrails.com/foo.cgi?something=here&and=here", autolink "http://www.rubyonrails.com/foo.cgi?something=here&and=here") , ("http://www.rubyonrails.com/contact;new", autolink "http://www.rubyonrails.com/contact;new") , ("http://www.rubyonrails.com/contact;new%20with%20spaces", autolink "http://www.rubyonrails.com/contact;new%20with%20spaces") , ("http://www.rubyonrails.com/contact;new?with=query&string=params", autolink "http://www.rubyonrails.com/contact;new?with=query&string=params") , ("http://www.rubyonrails.com/~minam/contact;new?with=query&string=params", autolink "http://www.rubyonrails.com/~minam/contact;new?with=query&string=params") , ("http://en.wikipedia.org/wiki/Wikipedia:Today%27s_featured_picture_%28animation%29/January_20%2C_2007", autolink "http://en.wikipedia.org/wiki/Wikipedia:Today%27s_featured_picture_%28animation%29/January_20%2C_2007") , ("http://www.mail-archive.com/rails@lists.rubyonrails.org/", autolink "http://www.mail-archive.com/rails@lists.rubyonrails.org/") , ("http://www.amazon.com/Testing-Equal-Sign-In-Path/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1198861734&sr=8-1", autolink "http://www.amazon.com/Testing-Equal-Sign-In-Path/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1198861734&sr=8-1") , ("http://en.wikipedia.org/wiki/Texas_hold%27em", autolink "http://en.wikipedia.org/wiki/Texas_hold%27em") , ("https://www.google.com/doku.php?id=gps:resource:scs:start", autolink "https://www.google.com/doku.php?id=gps:resource:scs:start") , ("http://www.rubyonrails.com", autolink "http://www.rubyonrails.com") , ("http://manuals.ruby-on-rails.com/read/chapter.need_a-period/103#page281", autolink "http://manuals.ruby-on-rails.com/read/chapter.need_a-period/103#page281") , ("http://foo.example.com/controller/action?parm=value&p2=v2#anchor123", autolink "http://foo.example.com/controller/action?parm=value&p2=v2#anchor123") , ("http://foo.example.com:3000/controller/action", autolink "http://foo.example.com:3000/controller/action") , ("http://foo.example.com:3000/controller/action+pack", autolink "http://foo.example.com:3000/controller/action+pack") , ("http://business.timesonline.co.uk/article/0,,9065-2473189,00.html", autolink "http://business.timesonline.co.uk/article/0,,9065-2473189,00.html") , ("http://www.mail-archive.com/ruby-talk@ruby-lang.org/", autolink "http://www.mail-archive.com/ruby-talk@ruby-lang.org/") , ("https://example.org/?anchor=lala-", autolink "https://example.org/?anchor=lala-") , ("https://example.org/?anchor=-lala", autolink "https://example.org/?anchor=-lala") ] {- p_markdown_round_trip :: Block -> Bool p_markdown_round_trip b = matches d' d'' where d' = normalize $ Pandoc (Meta [] [] []) [b] d'' = normalize $ readMarkdown def { readerSmart = True } $ writeMarkdown def d' matches (Pandoc _ [Plain []]) (Pandoc _ []) = True matches (Pandoc _ [Para []]) (Pandoc _ []) = True matches (Pandoc _ [Plain xs]) (Pandoc _ [Para xs']) = xs == xs' matches x y = x == y -} tests :: [Test] tests = [ testGroup "inline code" [ "with attribute" =: "`document.write(\"Hello\");`{.javascript}" =?> para (codeWith ("",["javascript"],[]) "document.write(\"Hello\");") , "with attribute space" =: "`*` {.haskell .special x=\"7\"}" =?> para (code "*" <> space <> str "{.haskell" <> space <> str ".special" <> space <> str "x=\"7\"}") ] , testGroup "emph and strong" [ "two strongs in emph" =: "***a**b **c**d*" =?> para (emph (strong (str "a") <> str "b" <> space <> strong (str "c") <> str "d")) , "emph and strong emph alternating" =: "*xxx* ***xxx*** xxx\n*xxx* ***xxx*** xxx" =?> para (emph "xxx" <> space <> strong (emph "xxx") <> space <> "xxx" <> softbreak <> emph "xxx" <> space <> strong (emph "xxx") <> space <> "xxx") , "emph with spaced strong" =: "*x **xx** x*" =?> para (emph ("x" <> space <> strong "xx" <> space <> "x")) , "intraword underscore with opening underscore (#1121)" =: "_foot_ball_" =?> para (emph (text "foot_ball")) ] , testGroup "raw LaTeX" [ "in URL" =: "\\begin\n" =?> para (text "\\begin") ] , testGroup "raw HTML" [ "nesting (issue #1330)" =: "<del>test</del>" =?> rawBlock "html" "<del>" <> plain (str "test") <> rawBlock "html" "</del>" , "invalid tag (issue #1820" =: "</ div></.div>" =?> para (text "</ div></.div>") , "technically invalid comment" =: "<!-- pandoc --help -->" =?> rawBlock "html" "<!-- pandoc --help -->" , test markdownGH "issue 2469" $ "<\n\na>" =?> para (text "<") <> para (text "a>") ] , testGroup "raw email addresses" [ test markdownGH "issue 2940" $ "**@user**" =?> para (strong (text "@user")) ] , testGroup "emoji" [ test markdownGH "emoji symbols" $ ":smile: and :+1:" =?> para (text "😄 and 👍") ] , "unbalanced brackets" =: "[[[[[[[[[[[[[[[hi" =?> para (text "[[[[[[[[[[[[[[[hi") , testGroup "backslash escapes" [ "in URL" =: "[hi](/there\\))" =?> para (link "/there)" "" "hi") , "in title" =: "[hi](/there \"a\\\"a\")" =?> para (link "/there" "a\"a" "hi") , "in reference link title" =: "[hi]\n\n[hi]: /there (a\\)a)" =?> para (link "/there" "a)a" "hi") , "in reference link URL" =: "[hi]\n\n[hi]: /there\\.0" =?> para (link "/there.0" "" "hi") ] , testGroup "bare URIs" (map testBareLink bareLinkTests) , testGroup "autolinks" [ "with unicode dash following" =: "<http://foo.bar>\8212" =?> para (autolink "http://foo.bar" <> str "\8212") , "a partial URL (#2277)" =: "<www.boe.es/buscar/act.php?id=BOE-A-1996-8930#a66>" =?> para (text "<www.boe.es/buscar/act.php?id=BOE-A-1996-8930#a66>") , "with some attributes" =: "<http://foo.bar>{#i .j .z k=v}" =?> para (autolinkWith ("i", ["j", "z"], [("k", "v")]) "http://foo.bar") , "with some attributes and spaces" =: "<http://foo.bar> {#i .j .z k=v}" =?> para (autolink "http://foo.bar" <> space <> text "{#i .j .z k=v}") ] , testGroup "links" [ "no autolink inside link" =: "[<https://example.org>](url)" =?> para (link "url" "" (text "<https://example.org>")) , "no inline link inside link" =: "[[a](url2)](url)" =?> para (link "url" "" (text "[a](url2)")) , "no bare URI inside link" =: "[https://example.org(](url)" =?> para (link "url" "" (text "https://example.org(")) ] , testGroup "Headers" [ "blank line before header" =: "\n# Header\n" =?> headerWith ("header",[],[]) 1 "Header" , "bracketed text (#2062)" =: "# [hi]\n" =?> headerWith ("hi",[],[]) 1 "[hi]" , "ATX header without trailing #s" =: "# Foo bar\n\n" =?> headerWith ("foo-bar",[],[]) 1 "Foo bar" , "ATX header without trailing #s" =: "# Foo bar with # #" =?> headerWith ("foo-bar-with",[],[]) 1 "Foo bar with #" , "setext header" =: "Foo bar\n=\n\n Foo bar 2 \n=" =?> headerWith ("foo-bar",[],[]) 1 "Foo bar" <> headerWith ("foo-bar-2",[],[]) 1 "Foo bar 2" ] , testGroup "Implicit header references" [ "ATX header without trailing #s" =: "# Header\n[header]\n\n[header ]\n\n[ header]" =?> headerWith ("header",[],[]) 1 "Header" <> para (link "#header" "" (text "header")) <> para (link "#header" "" (text "header")) <> para (link "#header" "" (text "header")) , "ATX header with trailing #s" =: "# Foo bar #\n[foo bar]\n\n[foo bar ]\n\n[ foo bar]" =?> headerWith ("foo-bar",[],[]) 1 "Foo bar" <> para (link "#foo-bar" "" (text "foo bar")) <> para (link "#foo-bar" "" (text "foo bar")) <> para (link "#foo-bar" "" (text "foo bar")) , "setext header" =: " Header \n=\n\n[header]\n\n[header ]\n\n[ header]" =?> headerWith ("header",[],[]) 1 "Header" <> para (link "#header" "" (text "header")) <> para (link "#header" "" (text "header")) <> para (link "#header" "" (text "header")) ] , testGroup "smart punctuation" [ test markdownSmart "quote before ellipses" ("'...hi'" =?> para (singleQuoted "…hi")) , test markdownSmart "apostrophe before emph" ("D'oh! A l'*aide*!" =?> para ("D’oh! A l’" <> emph "aide" <> "!")) , test markdownSmart "apostrophe in French" ("À l'arrivée de la guerre, le thème de l'«impossibilité du socialisme»" =?> para "À l’arrivée de la guerre, le thème de l’«impossibilité du socialisme»") , test markdownSmart "apostrophe after math" $ -- issue #1909 "The value of the $x$'s and the systems' condition." =?> para (text "The value of the " <> math "x" <> text "\8217s and the systems\8217 condition.") ] , testGroup "footnotes" [ "indent followed by newline and flush-left text" =: "[^1]\n\n[^1]: my note\n\n \nnot in note\n" =?> para (note (para "my note")) <> para "not in note" , "indent followed by newline and indented text" =: "[^1]\n\n[^1]: my note\n \n in note\n" =?> para (note (para "my note" <> para "in note")) , "recursive note" =: "[^1]\n\n[^1]: See [^1]\n" =?> para (note (para "See [^1]")) ] , testGroup "lhs" [ test (handleError . readMarkdown def{ readerExtensions = Set.insert Ext_literate_haskell $ readerExtensions def }) "inverse bird tracks and html" $ "> a\n\n< b\n\n<div>\n" =?> codeBlockWith ("",["sourceCode","literate","haskell"],[]) "a" <> codeBlockWith ("",["sourceCode","haskell"],[]) "b" <> rawBlock "html" "<div>\n\n" ] -- the round-trip properties frequently fail -- , testGroup "round trip" -- [ property "p_markdown_round_trip" p_markdown_round_trip -- ] , testGroup "definition lists" [ "no blank space" =: "foo1\n : bar\n\nfoo2\n : bar2\n : bar3\n" =?> definitionList [ (text "foo1", [plain (text "bar")]) , (text "foo2", [plain (text "bar2"), plain (text "bar3")]) ] , "blank space before first def" =: "foo1\n\n : bar\n\nfoo2\n\n : bar2\n : bar3\n" =?> definitionList [ (text "foo1", [para (text "bar")]) , (text "foo2", [para (text "bar2"), plain (text "bar3")]) ] , "blank space before second def" =: "foo1\n : bar\n\nfoo2\n : bar2\n\n : bar3\n" =?> definitionList [ (text "foo1", [plain (text "bar")]) , (text "foo2", [plain (text "bar2"), para (text "bar3")]) ] , "laziness" =: "foo1\n : bar\nbaz\n : bar2\n" =?> definitionList [ (text "foo1", [plain (text "bar" <> softbreak <> text "baz"), plain (text "bar2")]) ] , "no blank space before first of two paragraphs" =: "foo1\n : bar\n\n baz\n" =?> definitionList [ (text "foo1", [para (text "bar") <> para (text "baz")]) ] , "first line not indented" =: "foo\n: bar\n" =?> definitionList [ (text "foo", [plain (text "bar")]) ] , "list in definition" =: "foo\n: - bar\n" =?> definitionList [ (text "foo", [bulletList [plain (text "bar")]]) ] , "in div" =: "<div>foo\n: - bar\n</div>" =?> divWith nullAttr (definitionList [ (text "foo", [bulletList [plain (text "bar")]]) ]) ] , testGroup "+compact_definition_lists" [ test markdownCDL "basic compact list" $ "foo1\n: bar\n baz\nfoo2\n: bar2\n" =?> definitionList [ (text "foo1", [plain (text "bar" <> softbreak <> text "baz")]) , (text "foo2", [plain (text "bar2")]) ] ] , testGroup "lists" [ "issue #1154" =: " - <div>\n first div breaks\n </div>\n\n <button>if this button exists</button>\n\n <div>\n with this div too.\n </div>\n" =?> bulletList [divWith nullAttr (para $ text "first div breaks") <> rawBlock "html" "<button>" <> plain (text "if this button exists") <> rawBlock "html" "</button>" <> divWith nullAttr (para $ text "with this div too.")] , test markdownGH "issue #1636" $ unlines [ "* a" , "* b" , "* c" , " * d" ] =?> bulletList [ plain "a" , plain "b" , plain "c" <> bulletList [plain "d"] ] ] , testGroup "entities" [ "character references" =: "⟨ ö" =?> para (text "\10216 ö") , "numeric" =: ",DD" =?> para (text ",DD") , "in link title" =: "[link](/url \"title ⟨ ö ,\")" =?> para (link "/url" "title \10216 ö ," (text "link")) ] , testGroup "citations" [ "simple" =: "@item1" =?> para (cite [ Citation{ citationId = "item1" , citationPrefix = [] , citationSuffix = [] , citationMode = AuthorInText , citationNoteNum = 0 , citationHash = 0 } ] "@item1") , "key starts with digit" =: "@1657:huyghens" =?> para (cite [ Citation{ citationId = "1657:huyghens" , citationPrefix = [] , citationSuffix = [] , citationMode = AuthorInText , citationNoteNum = 0 , citationHash = 0 } ] "@1657:huyghens") ] , let citation = cite [Citation "cita" [] [] AuthorInText 0 0] (str "@cita") in testGroup "footnote/link following citation" -- issue #2083 [ "footnote" =: unlines [ "@cita[^note]" , "" , "[^note]: note" ] =?> para ( citation <> note (para $ str "note") ) , "normal link" =: "@cita [link](http://www.com)" =?> para ( citation <> space <> link "http://www.com" "" (str "link") ) , "reference link" =: unlines [ "@cita [link][link]" , "" , "[link]: http://www.com" ] =?> para ( citation <> space <> link "http://www.com" "" (str "link") ) , "short reference link" =: unlines [ "@cita [link]" , "" , "[link]: http://www.com" ] =?> para ( citation <> space <> link "http://www.com" "" (str "link") ) , "implicit header link" =: unlines [ "# Header" , "@cita [Header]" ] =?> headerWith ("header",[],[]) 1 (str "Header") <> para ( citation <> space <> link "#header" "" (str "Header") ) , "regular citation" =: "@cita [foo]" =?> para ( cite [Citation "cita" [] [Str "foo"] AuthorInText 0 0] (str "@cita" <> space <> str "[foo]") ) ] ] ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Readers/Org.hs����������������������������������������������������������0000644�0000000�0000000�00000176601�13155240142�016324� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} module Tests.Readers.Org (tests) where import Text.Pandoc.Definition import Test.Framework import Tests.Helpers import Text.Pandoc.Builder import Text.Pandoc import Data.List (intersperse) org :: String -> Pandoc org = handleError . readOrg def orgSmart :: String -> Pandoc orgSmart = handleError . readOrg def { readerSmart = True } infix 4 =: (=:) :: ToString c => String -> (String, c) -> Test (=:) = test org spcSep :: [Inlines] -> Inlines spcSep = mconcat . intersperse space simpleTable' :: Int -> [Blocks] -> [[Blocks]] -> Blocks simpleTable' n = table "" (take n $ repeat (AlignDefault, 0.0)) tests :: [Test] tests = [ testGroup "Inlines" $ [ "Plain String" =: "Hello, World" =?> para (spcSep [ "Hello,", "World" ]) , "Emphasis" =: "/Planet Punk/" =?> para (emph . spcSep $ ["Planet", "Punk"]) , "Strong" =: "*Cider*" =?> para (strong "Cider") , "Strong Emphasis" =: "/*strength*/" =?> para (emph . strong $ "strength") , "Emphasized Strong preceded by space" =: " */super/*" =?> para (strong . emph $ "super") , "Strikeout" =: "+Kill Bill+" =?> para (strikeout . spcSep $ [ "Kill", "Bill" ]) , "Verbatim" =: "=Robot.rock()=" =?> para (code "Robot.rock()") , "Code" =: "~word for word~" =?> para (code "word for word") , "Math $..$" =: "$E=mc^2$" =?> para (math "E=mc^2") , "Math $$..$$" =: "$$E=mc^2$$" =?> para (displayMath "E=mc^2") , "Math \\[..\\]" =: "\\[E=ℎν\\]" =?> para (displayMath "E=ℎν") , "Math \\(..\\)" =: "\\(σ_x σ_p ≥ \\frac{ℏ}{2}\\)" =?> para (math "σ_x σ_p ≥ \\frac{ℏ}{2}") , "Symbol" =: "A * symbol" =?> para (str "A" <> space <> str "*" <> space <> "symbol") , "Superscript simple expression" =: "2^-λ" =?> para (str "2" <> superscript "-λ") , "Superscript multi char" =: "2^{n-1}" =?> para (str "2" <> superscript "n-1") , "Subscript simple expression" =: "a_n" =?> para (str "a" <> subscript "n") , "Subscript multi char" =: "a_{n+1}" =?> para (str "a" <> subscript "n+1") , "Linebreak" =: "line \\\\ \nbreak" =?> para ("line" <> linebreak <> "break") , "Inline note" =: "[fn::Schreib mir eine E-Mail]" =?> para (note $ para "Schreib mir eine E-Mail") , "Markup-chars not occuring on word break are symbols" =: unlines [ "this+that+ +so+on" , "seven*eight* nine*" , "+not+funny+" ] =?> para ("this+that+ +so+on" <> softbreak <> "seven*eight* nine*" <> softbreak <> strikeout "not+funny") , "No empty markup" =: "// ** __ ++ == ~~ $$" =?> para (spcSep [ "//", "**", "__", "++", "==", "~~", "$$" ]) , "Adherence to Org's rules for markup borders" =: "/t/& a/ / ./r/ (*l*) /e/! /b/." =?> para (spcSep [ emph $ "t/&" <> space <> "a" , "/" , "./r/" , "(" <> (strong "l") <> ")" , (emph "e") <> "!" , (emph "b") <> "." ]) , "Quotes are forbidden border chars" =: "/'nope/ *nope\"*" =?> para ("/'nope/" <> space <> "*nope\"*") , "Commata are forbidden border chars" =: "/nada,/" =?> para "/nada,/" , "Markup should work properly after a blank line" =: unlines ["foo", "", "/bar/"] =?> (para $ text "foo") <> (para $ emph $ text "bar") , "Inline math must stay within three lines" =: unlines [ "$a", "b", "c$", "$d", "e", "f", "g$" ] =?> para ((math "a\nb\nc") <> softbreak <> "$d" <> softbreak <> "e" <> softbreak <> "f" <> softbreak <> "g$") , "Single-character math" =: "$a$ $b$! $c$?" =?> para (spcSep [ math "a" , "$b$!" , (math "c") <> "?" ]) , "Markup may not span more than two lines" =: "/this *is +totally\nnice+ not*\nemph/" =?> para ("/this" <> space <> strong ("is" <> space <> strikeout ("totally" <> softbreak <> "nice") <> space <> "not") <> softbreak <> "emph/") , "Sub- and superscript expressions" =: unlines [ "a_(a(b)(c)d)" , "e^(f(g)h)" , "i_(jk)l)" , "m^()n" , "o_{p{q{}r}}" , "s^{t{u}v}" , "w_{xy}z}" , "1^{}2" , "3_{{}}" , "4^(a(*b(c*)d))" ] =?> para (mconcat $ intersperse softbreak [ "a" <> subscript "(a(b)(c)d)" , "e" <> superscript "(f(g)h)" , "i" <> (subscript "(jk)") <> "l)" , "m" <> (superscript "()") <> "n" , "o" <> subscript "p{q{}r}" , "s" <> superscript "t{u}v" , "w" <> (subscript "xy") <> "z}" , "1" <> (superscript "") <> "2" , "3" <> subscript "{}" , "4" <> superscript ("(a(" <> strong "b(c" <> ")d))") ]) , "Verbatim text can contain equal signes (=)" =: "=is_subst = True=" =?> para (code "is_subst = True") , testGroup "Images" [ "Image" =: "[[./sunset.jpg]]" =?> (para $ image "./sunset.jpg" "" "") , "Image with explicit file: prefix" =: "[[file:sunrise.jpg]]" =?> (para $ image "sunrise.jpg" "" "") , "Multiple images within a paragraph" =: unlines [ "[[file:sunrise.jpg]]" , "[[file:sunset.jpg]]" ] =?> (para $ (image "sunrise.jpg" "" "") <> softbreak <> (image "sunset.jpg" "" "")) , "Image with html attributes" =: unlines [ "#+ATTR_HTML: :width 50%" , "[[file:guinea-pig.gif]]" ] =?> (para $ imageWith ("", [], [("width", "50%")]) "guinea-pig.gif" "" "") ] , "Explicit link" =: "[[http://zeitlens.com/][pseudo-random /nonsense/]]" =?> (para $ link "http://zeitlens.com/" "" ("pseudo-random" <> space <> emph "nonsense")) , "Self-link" =: "[[http://zeitlens.com/]]" =?> (para $ link "http://zeitlens.com/" "" "http://zeitlens.com/") , "Absolute file link" =: "[[/url][hi]]" =?> (para $ link "file:///url" "" "hi") , "Link to file in parent directory" =: "[[../file.txt][moin]]" =?> (para $ link "../file.txt" "" "moin") , "Empty link (for gitit interop)" =: "[[][New Link]]" =?> (para $ link "" "" "New Link") , "Image link" =: "[[sunset.png][file:dusk.svg]]" =?> (para $ link "sunset.png" "" (image "dusk.svg" "" "")) , "Image link with non-image target" =: "[[http://example.com][./logo.png]]" =?> (para $ link "http://example.com" "" (image "./logo.png" "" "")) , "Plain link" =: "Posts on http://zeitlens.com/ can be funny at times." =?> (para $ spcSep [ "Posts", "on" , link "http://zeitlens.com/" "" "http://zeitlens.com/" , "can", "be", "funny", "at", "times." ]) , "Angle link" =: "Look at <http://moltkeplatz.de> for fnords." =?> (para $ spcSep [ "Look", "at" , link "http://moltkeplatz.de" "" "http://moltkeplatz.de" , "for", "fnords." ]) , "Absolute file link" =: "[[file:///etc/passwd][passwd]]" =?> (para $ link "file:///etc/passwd" "" "passwd") , "File link" =: "[[file:target][title]]" =?> (para $ link "target" "" "title") , "Anchor" =: "<<anchor>> Link here later." =?> (para $ spanWith ("anchor", [], []) mempty <> "Link" <> space <> "here" <> space <> "later.") , "Inline code block" =: "src_emacs-lisp{(message \"Hello\")}" =?> (para $ codeWith ( "" , [ "commonlisp", "rundoc-block" ] , [ ("rundoc-language", "emacs-lisp") ]) "(message \"Hello\")") , "Inline code block with arguments" =: "src_sh[:export both :results output]{echo 'Hello, World'}" =?> (para $ codeWith ( "" , [ "bash", "rundoc-block" ] , [ ("rundoc-language", "sh") , ("rundoc-export", "both") , ("rundoc-results", "output") ] ) "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 { citationId = "nonexistent" , citationPrefix = [] , citationSuffix = [] , citationMode = NormalCitation , citationNoteNum = 0 , citationHash = 0} in (para $ cite [citation] "[@nonexistent]") , "Citation containing text" =: "[see @item1 p. 34-35]" =?> let citation = Citation { citationId = "item1" , citationPrefix = [Str "see"] , citationSuffix = [Space ,Str "p.",Space,Str "34-35"] , citationMode = NormalCitation , citationNoteNum = 0 , citationHash = 0} in (para $ cite [citation] "[see @item1 p. 34-35]") , "Org-ref simple citation" =: "cite:pandoc" =?> let citation = Citation { citationId = "pandoc" , citationPrefix = mempty , citationSuffix = mempty , citationMode = AuthorInText , citationNoteNum = 0 , citationHash = 0 } in (para $ cite [citation] "cite:pandoc") , "Org-ref simple citation succeeded by comma" =: "cite:pandoc," =?> let citation = Citation { citationId = "pandoc" , citationPrefix = mempty , citationSuffix = mempty , citationMode = AuthorInText , citationNoteNum = 0 , citationHash = 0 } in (para $ cite [citation] "cite:pandoc" <> str ",") , "Org-ref simple citep citation" =: "citep:pandoc" =?> let citation = Citation { citationId = "pandoc" , citationPrefix = mempty , citationSuffix = mempty , citationMode = NormalCitation , citationNoteNum = 0 , citationHash = 0 } in (para $ cite [citation] "citep:pandoc") , "Org-ref extended citation" =: "[[citep:Dominik201408][See page 20::, for example]]" =?> let citation = Citation { citationId = "Dominik201408" , citationPrefix = toList "See page 20" , citationSuffix = toList ", for example" , citationMode = NormalCitation , citationNoteNum = 0 , citationHash = 0 } in (para $ cite [citation] "[[citep:Dominik201408][See page 20::, for example]]") , testGroup "Berkeley-style citations" $ let pandocCite = Citation { citationId = "Pandoc" , citationPrefix = mempty , citationSuffix = mempty , citationMode = NormalCitation , citationNoteNum = 0 , citationHash = 0 } pandocInText = pandocCite { citationMode = AuthorInText } dominikCite = Citation { citationId = "Dominik201408" , citationPrefix = mempty , citationSuffix = mempty , citationMode = NormalCitation , citationNoteNum = 0 , citationHash = 0 } dominikInText = dominikCite { citationMode = AuthorInText } in [ "Berkeley-style in-text citation" =: "See @Dominik201408." =?> (para $ "See " <> cite [dominikInText] "@Dominik201408" <> ".") , "Berkeley-style parenthetical citation list" =: "[(cite): see; @Dominik201408;also @Pandoc; and others]" =?> let pandocCite' = pandocCite { citationPrefix = toList "also" , citationSuffix = toList "and others" } dominikCite' = dominikCite { citationPrefix = toList "see" } in (para $ cite [dominikCite', pandocCite'] "") , "Berkeley-style plain citation list" =: "[cite: See; @Dominik201408; and @Pandoc; and others]" =?> let pandocCite' = pandocInText { citationPrefix = toList "and" } in (para $ "See " <> cite [dominikInText] "" <> "," <> space <> cite [pandocCite'] "" <> "," <> space <> "and others") ] , "Inline LaTeX symbol" =: "\\dots" =?> para "…" , "Inline LaTeX command" =: "\\textit{Emphasised}" =?> para (emph "Emphasised") , "Inline LaTeX command with spaces" =: "\\emph{Emphasis mine}" =?> para (emph "Emphasis mine") , "Inline LaTeX math symbol" =: "\\tau" =?> para (emph "τ") , "Unknown inline LaTeX command" =: "\\notacommand{foo}" =?> para (rawInline "latex" "\\notacommand{foo}") , "Export snippet" =: "@@html:<kbd>M-x org-agenda</kbd>@@" =?> para (rawInline "html" "<kbd>M-x org-agenda</kbd>") , "MathML symbol in LaTeX-style" =: "There is a hackerspace in Lübeck, Germany, called nbsp (unicode symbol: '\\nbsp')." =?> para ("There is a hackerspace in Lübeck, Germany, called nbsp (unicode symbol: ' ').") , "MathML symbol in LaTeX-style, including braces" =: "\\Aacute{}stor" =?> para "Ástor" , "MathML copy sign" =: "\\copy" =?> para "©" , "MathML symbols, space separated" =: "\\ForAll \\Auml" =?> para "∀ Ä" , "LaTeX citation" =: "\\cite{Coffee}" =?> let citation = Citation { citationId = "Coffee" , citationPrefix = [] , citationSuffix = [] , citationMode = NormalCitation , citationNoteNum = 0 , citationHash = 0} in (para . cite [citation] $ rawInline "latex" "\\cite{Coffee}") ] , testGroup "Meta Information" $ [ "Comment" =: "# Nothing to see here" =?> (mempty::Blocks) , "Not a comment" =: "#-tag" =?> para "#-tag" , "Comment surrounded by Text" =: unlines [ "Before" , "# Comment" , "After" ] =?> mconcat [ para "Before" , para "After" ] , "Title" =: "#+TITLE: Hello, World" =?> let titleInline = toList $ "Hello," <> space <> "World" meta = setMeta "title" (MetaInlines titleInline) $ nullMeta in Pandoc meta mempty , "Author" =: "#+author: Albert /Emacs-Fanboy/ Krewinkel" =?> let author = toList . spcSep $ [ "Albert", emph "Emacs-Fanboy", "Krewinkel" ] meta = setMeta "author" (MetaList [MetaInlines author]) $ nullMeta in Pandoc meta mempty , "Multiple authors" =: "#+author: James Dewey Watson, Francis Harry Compton Crick " =?> let watson = MetaInlines $ toList "James Dewey Watson" crick = MetaInlines $ toList "Francis Harry Compton Crick" meta = setMeta "author" (MetaList [watson, crick]) $ nullMeta in Pandoc meta mempty , "Date" =: "#+Date: Feb. *28*, 2014" =?> let date = toList . spcSep $ [ "Feb.", (strong "28") <> ",", "2014" ] meta = setMeta "date" (MetaInlines date) $ nullMeta in Pandoc meta mempty , "Description" =: "#+DESCRIPTION: Explanatory text" =?> let description = "Explanatory text" meta = setMeta "description" (MetaString description) $ nullMeta in Pandoc meta mempty , "Properties drawer" =: unlines [ " :PROPERTIES:" , " :setting: foo" , " :END:" ] =?> (mempty::Blocks) , "LaTeX_headers options are translated to header-includes" =: "#+LaTeX_header: \\usepackage{tikz}" =?> let latexInlines = rawInline "latex" "\\usepackage{tikz}" inclList = MetaList [MetaInlines (toList latexInlines)] meta = setMeta "header-includes" inclList nullMeta in Pandoc meta mempty , "LaTeX_class option is translated to documentclass" =: "#+LATEX_CLASS: article" =?> let meta = setMeta "documentclass" (MetaString "article") nullMeta in Pandoc meta mempty , "LaTeX_class_options is translated to classoption" =: "#+LATEX_CLASS_OPTIONS: [a4paper]" =?> let meta = setMeta "classoption" (MetaString "a4paper") nullMeta in Pandoc meta mempty , "LaTeX_class_options is translated to classoption" =: "#+html_head: <meta/>" =?> let html = rawInline "html" "<meta/>" inclList = MetaList [MetaInlines (toList html)] meta = setMeta "header-includes" inclList nullMeta in Pandoc meta mempty , "later meta definitions take precedence" =: unlines [ "#+AUTHOR: this will not be used" , "#+author: Max" ] =?> let author = MetaInlines [Str "Max"] meta = setMeta "author" (MetaList [author]) $ nullMeta in Pandoc meta mempty , "Logbook drawer" =: unlines [ " :LogBook:" , " - State \"DONE\" from \"TODO\" [2014-03-03 Mon 11:00]" , " :END:" ] =?> (mempty::Blocks) , "Drawer surrounded by text" =: unlines [ "Before" , ":PROPERTIES:" , ":END:" , "After" ] =?> para "Before" <> para "After" , "Drawer markers must be the only text in the line" =: unlines [ " :LOGBOOK: foo" , " :END: bar" ] =?> para (":LOGBOOK: foo" <> softbreak <> ":END: bar") , "Drawers can be arbitrary" =: unlines [ ":FOO:" , "/bar/" , ":END:" ] =?> divWith (mempty, ["FOO", "drawer"], mempty) (para $ emph "bar") , "Anchor reference" =: unlines [ "<<link-here>> Target." , "" , "[[link-here][See here!]]" ] =?> (para (spanWith ("link-here", [], []) mempty <> "Target.") <> para (link "#link-here" "" ("See" <> space <> "here!"))) , "Search links are read as emph" =: "[[Wally][Where's Wally?]]" =?> (para (emph $ "Where's" <> space <> "Wally?")) , "Link to nonexistent anchor" =: unlines [ "<<link-here>> Target." , "" , "[[link$here][See here!]]" ] =?> (para (spanWith ("link-here", [], []) mempty <> "Target.") <> para (emph ("See" <> space <> "here!"))) , "Link abbreviation" =: unlines [ "#+LINK: wp https://en.wikipedia.org/wiki/%s" , "[[wp:Org_mode][Wikipedia on Org-mode]]" ] =?> (para (link "https://en.wikipedia.org/wiki/Org_mode" "" ("Wikipedia" <> space <> "on" <> space <> "Org-mode"))) , "Link abbreviation, defined after first use" =: unlines [ "[[zl:non-sense][Non-sense articles]]" , "#+LINK: zl http://zeitlens.com/tags/%s.html" ] =?> (para (link "http://zeitlens.com/tags/non-sense.html" "" ("Non-sense" <> space <> "articles"))) , "Link abbreviation, URL encoded arguments" =: unlines [ "#+link: expl http://example.com/%h/foo" , "[[expl:Hello, World!][Moin!]]" ] =?> (para (link "http://example.com/Hello%2C%20World%21/foo" "" "Moin!")) , "Link abbreviation, append arguments" =: unlines [ "#+link: expl http://example.com/" , "[[expl:foo][bar]]" ] =?> (para (link "http://example.com/foo" "" "bar")) , testGroup "export options" [ "disable simple sub/superscript syntax" =: unlines [ "#+OPTIONS: ^:nil" , "a^b" ] =?> para "a^b" , "directly select drawers to be exported" =: unlines [ "#+OPTIONS: d:(\"IMPORTANT\")" , ":IMPORTANT:" , "23" , ":END:" , ":BORING:" , "very boring" , ":END:" ] =?> divWith (mempty, ["IMPORTANT", "drawer"], mempty) (para "23") , "exclude drawers from being exported" =: unlines [ "#+OPTIONS: d:(not \"BORING\")" , ":IMPORTANT:" , "5" , ":END:" , ":BORING:" , "very boring" , ":END:" ] =?> divWith (mempty, ["IMPORTANT", "drawer"], mempty) (para "5") , "don't include archive trees" =: unlines [ "#+OPTIONS: arch:nil" , "* old :ARCHIVE:" ] =?> (mempty ::Blocks) , "include complete archive trees" =: unlines [ "#+OPTIONS: arch:t" , "* old :ARCHIVE:" , " boring" ] =?> let tagSpan t = spanWith ("", ["tag"], [("data-tag-name", t)]) mempty in mconcat [ headerWith ("old", [], mempty) 1 ("old" <> tagSpan "ARCHIVE") , para "boring" ] , "include archive tree header only" =: unlines [ "#+OPTIONS: arch:headline" , "* old :ARCHIVE:" , " boring" ] =?> let tagSpan t = spanWith ("", ["tag"], [("data-tag-name", t)]) mempty in headerWith ("old", [], mempty) 1 ("old" <> tagSpan "ARCHIVE") , "limit headline depth" =: unlines [ "#+OPTIONS: H:2" , "* section" , "** subsection" , "*** list item 1" , "*** list item 2" ] =?> mconcat [ headerWith ("section", [], []) 1 "section" , headerWith ("subsection", [], []) 2 "subsection" , orderedList [ para "list item 1", para "list item 2" ] ] , "disable author export" =: unlines [ "#+OPTIONS: author:nil" , "#+AUTHOR: ShyGuy" ] =?> Pandoc nullMeta mempty , "disable creator export" =: unlines [ "#+OPTIONS: creator:nil" , "#+creator: The Architect" ] =?> Pandoc nullMeta mempty , "disable email export" =: unlines [ "#+OPTIONS: email:nil" , "#+email: no-mail-please@example.com" ] =?> Pandoc nullMeta mempty , "disable inclusion of todo keywords" =: unlines [ "#+OPTIONS: todo:nil" , "** DONE todo export" ] =?> headerWith ("todo-export", [], []) 2 "todo export" ] ] , testGroup "Basic Blocks" $ [ "Paragraph" =: "Paragraph\n" =?> para "Paragraph" , testGroup "headers" $ [ "First Level Header" =: "* Headline\n" =?> headerWith ("headline", [], []) 1 "Headline" , "Third Level Header" =: "*** Third Level Headline\n" =?> headerWith ("third-level-headline", [], []) 3 ("Third" <> space <> "Level" <> space <> "Headline") , "Compact Headers with Paragraph" =: unlines [ "* First Level" , "** Second Level" , " Text" ] =?> mconcat [ headerWith ("first-level", [], []) 1 ("First" <> space <> "Level") , headerWith ("second-level", [], []) 2 ("Second" <> space <> "Level") , para "Text" ] , "Separated Headers with Paragraph" =: unlines [ "* First Level" , "" , "** Second Level" , "" , " Text" ] =?> mconcat [ headerWith ("first-level", [], []) 1 ("First" <> space <> "Level") , headerWith ("second-level", [], []) 2 ("Second" <> space <> "Level") , para "Text" ] , "Headers not preceded by a blank line" =: unlines [ "** eat dinner" , "Spaghetti and meatballs tonight." , "** walk dog" ] =?> mconcat [ headerWith ("eat-dinner", [], []) 2 ("eat" <> space <> "dinner") , para $ spcSep [ "Spaghetti", "and", "meatballs", "tonight." ] , headerWith ("walk-dog", [], []) 2 ("walk" <> space <> "dog") ] , testGroup "Todo keywords" [ "Header with known todo keyword" =: "* TODO header" =?> let todoSpan = spanWith ("", ["todo", "TODO"], []) "TODO" in headerWith ("header", [], []) 1 (todoSpan <> space <> "header") , "Header marked as done" =: "* DONE header" =?> let todoSpan = spanWith ("", ["done", "DONE"], []) "DONE" in headerWith ("header", [], []) 1 (todoSpan <> space <> "header") , "Header with unknown todo keyword" =: "* WAITING header" =?> headerWith ("waiting-header", [], []) 1 "WAITING header" , "Custom todo keywords" =: unlines [ "#+TODO: WAITING CANCELLED" , "* WAITING compile" , "* CANCELLED lunch" ] =?> let todoSpan = spanWith ("", ["todo", "WAITING"], []) "WAITING" doneSpan = spanWith ("", ["done", "CANCELLED"], []) "CANCELLED" in headerWith ("compile", [], []) 1 (todoSpan <> space <> "compile") <> headerWith ("lunch", [], []) 1 (doneSpan <> space <> "lunch") , "Custom todo keywords with multiple done-states" =: unlines [ "#+TODO: WAITING | DONE CANCELLED " , "* WAITING compile" , "* CANCELLED lunch" , "* DONE todo-feature" ] =?> let waiting = spanWith ("", ["todo", "WAITING"], []) "WAITING" cancelled = spanWith ("", ["done", "CANCELLED"], []) "CANCELLED" done = spanWith ("", ["done", "DONE"], []) "DONE" in headerWith ("compile", [], []) 1 (waiting <> space <> "compile") <> headerWith ("lunch", [], []) 1 (cancelled <> space <> "lunch") <> headerWith ("todo-feature", [], []) 1 (done <> space <> "todo-feature") ] , "Tagged headers" =: unlines [ "* Personal :PERSONAL:" , "** Call Mom :@PHONE:" , "** Call John :@PHONE:JOHN: " ] =?> let tagSpan t = spanWith ("", ["tag"], [("data-tag-name", t)]) mempty 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" =?> 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" , " Not much going on here" , "** This will be dropped" , "* Comment tree above" ] =?> headerWith ("comment-tree-above", [], []) 1 "Comment tree above" , "Nothing but a COMMENT header" =: "* COMMENT Test" =?> (mempty::Blocks) , "Tree with :noexport:" =: unlines [ "* Should be ignored :archive:noexport:old:" , "** Old stuff" , " This is not going to be exported" ] =?> (mempty::Blocks) , "Subtree with :noexport:" =: unlines [ "* Exported" , "** This isn't exported :noexport:" , "*** This neither" , "** But this is" ] =?> mconcat [ headerWith ("exported", [], []) 1 "Exported" , headerWith ("but-this-is", [], []) 2 "But this is" ] , "Preferences are treated as header attributes" =: unlines [ "* foo" , " :PROPERTIES:" , " :custom_id: fubar" , " :bar: baz" , " :END:" ] =?> headerWith ("fubar", [], [("bar", "baz")]) 1 "foo" , "Headers marked with a unnumbered property get a class of the same name" =: unlines [ "* Not numbered" , " :PROPERTIES:" , " :UNNUMBERED: t" , " :END:" ] =?> headerWith ("not-numbered", ["unnumbered"], []) 1 "Not numbered" ] , "Paragraph starting with an asterisk" =: "*five" =?> para "*five" , "Paragraph containing asterisk at beginning of line" =: unlines [ "lucky" , "*star" ] =?> para ("lucky" <> softbreak <> "*star") , "Example block" =: unlines [ ": echo hello" , ": echo dear tester" ] =?> codeBlockWith ("", ["example"], []) "echo hello\necho dear tester\n" , "Example block surrounded by text" =: unlines [ "Greetings" , ": echo hello" , ": echo dear tester" , "Bye" ] =?> mconcat [ para "Greetings" , codeBlockWith ("", ["example"], []) "echo hello\necho dear tester\n" , para "Bye" ] , "Horizontal Rule" =: unlines [ "before" , "-----" , "after" ] =?> mconcat [ para "before" , horizontalRule , para "after" ] , "Not a Horizontal Rule" =: "----- five dashes" =?> (para $ spcSep [ "-----", "five", "dashes" ]) , "Comment Block" =: unlines [ "#+BEGIN_COMMENT" , "stuff" , "bla" , "#+END_COMMENT"] =?> (mempty::Blocks) , testGroup "Figures" $ [ "Figure" =: unlines [ "#+caption: A very courageous man." , "#+name: goodguy" , "[[file:edward.jpg]]" ] =?> para (image "edward.jpg" "fig:goodguy" "A very courageous man.") , "Figure with no name" =: unlines [ "#+caption: I've been through the desert on this" , "[[file:horse.png]]" ] =?> para (image "horse.png" "fig:" "I've been through the desert on this") , "Figure with `fig:` prefix in name" =: unlines [ "#+caption: Used as a metapher in evolutionary biology." , "#+name: fig:redqueen" , "[[./the-red-queen.jpg]]" ] =?> para (image "./the-red-queen.jpg" "fig:redqueen" "Used as a metapher in evolutionary biology.") , "Figure with HTML attributes" =: unlines [ "#+CAPTION: mah brain just explodid" , "#+NAME: lambdacat" , "#+ATTR_HTML: :style color: blue :role button" , "[[file:lambdacat.jpg]]" ] =?> let kv = [("style", "color: blue"), ("role", "button")] name = "fig:lambdacat" caption = "mah brain just explodid" in para (imageWith (mempty, mempty, kv) "lambdacat.jpg" name caption) , "Labelled figure" =: unlines [ "#+CAPTION: My figure" , "#+LABEL: fig:myfig" , "[[file:blub.png]]" ] =?> let attr = ("fig:myfig", mempty, mempty) in para (imageWith attr "blub.png" "fig:" "My figure") , "Figure with empty caption" =: unlines [ "#+CAPTION:" , "[[file:guess.jpg]]" ] =?> para (image "guess.jpg" "fig:" "") ] , "Footnote" =: unlines [ "A footnote[1]" , "" , "[1] First paragraph" , "" , "second paragraph" ] =?> para (mconcat [ "A", space, "footnote" , note $ mconcat [ para ("First" <> space <> "paragraph") , para ("second" <> space <> "paragraph") ] ]) , "Two footnotes" =: unlines [ "Footnotes[fn:1][fn:2]" , "" , "[fn:1] First note." , "" , "[fn:2] Second note." ] =?> para (mconcat [ "Footnotes" , note $ para ("First" <> space <> "note.") , note $ para ("Second" <> space <> "note.") ]) , "Footnote followed by header" =: unlines [ "Another note[fn:yay]" , "" , "[fn:yay] This is great!" , "" , "** Headline" ] =?> mconcat [ para (mconcat [ "Another", space, "note" , note $ para ("This" <> space <> "is" <> space <> "great!") ]) , headerWith ("headline", [], []) 2 "Headline" ] ] , testGroup "Lists" $ [ "Simple Bullet Lists" =: ("- Item1\n" ++ "- Item2\n") =?> bulletList [ plain "Item1" , plain "Item2" ] , "Indented Bullet Lists" =: (" - Item1\n" ++ " - Item2\n") =?> bulletList [ plain "Item1" , plain "Item2" ] , "Unindented *" =: ("- Item1\n" ++ "* Item2\n") =?> bulletList [ plain "Item1" ] <> headerWith ("item2", [], []) 1 "Item2" , "Multi-line Bullet Lists" =: ("- *Fat\n" ++ " Tony*\n" ++ "- /Sideshow\n" ++ " Bob/") =?> bulletList [ plain $ strong ("Fat" <> softbreak <> "Tony") , plain $ emph ("Sideshow" <> softbreak <> "Bob") ] , "Nested Bullet Lists" =: ("- Discovery\n" ++ " + One More Time\n" ++ " + Harder, Better, Faster, Stronger\n" ++ "- Homework\n" ++ " + Around the World\n"++ "- Human After All\n" ++ " + Technologic\n" ++ " + Robot Rock\n") =?> bulletList [ mconcat [ plain "Discovery" , bulletList [ plain ("One" <> space <> "More" <> space <> "Time") , plain ("Harder," <> space <> "Better," <> space <> "Faster," <> space <> "Stronger") ] ] , mconcat [ plain "Homework" , bulletList [ plain ("Around" <> space <> "the" <> space <> "World") ] ] , mconcat [ plain ("Human" <> space <> "After" <> space <> "All") , bulletList [ plain "Technologic" , plain ("Robot" <> space <> "Rock") ] ] ] , "Bullet List with Decreasing Indent" =: (" - Discovery\n\ \ - Human After All\n") =?> mconcat [ bulletList [ plain "Discovery" ] , bulletList [ plain ("Human" <> space <> "After" <> space <> "All")] ] , "Header follows Bullet List" =: (" - Discovery\n\ \ - Human After All\n\ \* Homework") =?> mconcat [ bulletList [ plain "Discovery" , plain ("Human" <> space <> "After" <> space <> "All") ] , headerWith ("homework", [], []) 1 "Homework" ] , "Bullet List Unindented with trailing Header" =: ("- Discovery\n\ \- Homework\n\ \* NotValidListItem") =?> mconcat [ bulletList [ plain "Discovery" , plain "Homework" ] , headerWith ("notvalidlistitem", [], []) 1 "NotValidListItem" ] , "Simple Ordered List" =: ("1. Item1\n" ++ "2. Item2\n") =?> let listStyle = (1, DefaultStyle, DefaultDelim) listStructure = [ plain "Item1" , plain "Item2" ] in orderedListWith listStyle listStructure , "Simple Ordered List with Parens" =: ("1) Item1\n" ++ "2) Item2\n") =?> let listStyle = (1, DefaultStyle, DefaultDelim) listStructure = [ plain "Item1" , plain "Item2" ] in orderedListWith listStyle listStructure , "Indented Ordered List" =: (" 1. Item1\n" ++ " 2. Item2\n") =?> let listStyle = (1, DefaultStyle, DefaultDelim) listStructure = [ plain "Item1" , plain "Item2" ] in orderedListWith listStyle listStructure , "Nested Ordered Lists" =: ("1. One\n" ++ " 1. One-One\n" ++ " 2. One-Two\n" ++ "2. Two\n" ++ " 1. Two-One\n"++ " 2. Two-Two\n") =?> let listStyle = (1, DefaultStyle, DefaultDelim) listStructure = [ mconcat [ plain "One" , orderedList [ plain "One-One" , plain "One-Two" ] ] , mconcat [ plain "Two" , orderedList [ plain "Two-One" , plain "Two-Two" ] ] ] in orderedListWith listStyle listStructure , "Ordered List in Bullet List" =: ("- Emacs\n" ++ " 1. Org\n") =?> bulletList [ (plain "Emacs") <> (orderedList [ plain "Org"]) ] , "Bullet List in Ordered List" =: ("1. GNU\n" ++ " - Freedom\n") =?> orderedList [ (plain "GNU") <> bulletList [ (plain "Freedom") ] ] , "Definition List" =: unlines [ "- PLL :: phase-locked loop" , "- TTL ::" , " transistor-transistor logic" , "- PSK :: phase-shift keying" , "" , " a digital modulation scheme" ] =?> definitionList [ ("PLL", [ plain $ "phase-locked" <> space <> "loop" ]) , ("TTL", [ plain $ "transistor-transistor" <> space <> "logic" ]) , ("PSK", [ mconcat [ para $ "phase-shift" <> space <> "keying" , para $ spcSep [ "a", "digital" , "modulation", "scheme" ] ] ]) ] , "Definition list with multi-word term" =: " - Elijah Wood :: He plays Frodo" =?> definitionList [ ("Elijah" <> space <> "Wood", [plain $ "He" <> space <> "plays" <> space <> "Frodo"])] , "Compact definition list" =: unlines [ "- ATP :: adenosine 5' triphosphate" , "- DNA :: deoxyribonucleic acid" , "- PCR :: polymerase chain reaction" , "" ] =?> definitionList [ ("ATP", [ plain $ spcSep [ "adenosine", "5'", "triphosphate" ] ]) , ("DNA", [ plain $ spcSep [ "deoxyribonucleic", "acid" ] ]) , ("PCR", [ plain $ spcSep [ "polymerase", "chain", "reaction" ] ]) ] , "Definition List With Trailing Header" =: "- definition :: list\n\ \- cool :: defs\n\ \* header" =?> mconcat [ definitionList [ ("definition", [plain "list"]) , ("cool", [plain "defs"]) ] , 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" , "" , "- orange" , "" , "- peach" ] =?> bulletList [ para "apple" , 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" [ "Single cell table" =: "|Test|" =?> simpleTable' 1 mempty [[plain "Test"]] , "Multi cell table" =: "| One | Two |" =?> simpleTable' 2 mempty [ [ plain "One", plain "Two" ] ] , "Multi line table" =: unlines [ "| One |" , "| Two |" , "| Three |" ] =?> simpleTable' 1 mempty [ [ plain "One" ] , [ plain "Two" ] , [ plain "Three" ] ] , "Empty table" =: "||" =?> simpleTable' 1 mempty [[mempty]] , "Glider Table" =: unlines [ "| 1 | 0 | 0 |" , "| 0 | 1 | 1 |" , "| 1 | 1 | 0 |" ] =?> simpleTable' 3 mempty [ [ plain "1", plain "0", plain "0" ] , [ plain "0", plain "1", plain "1" ] , [ plain "1", plain "1", plain "0" ] ] , "Table between Paragraphs" =: unlines [ "Before" , "| One | Two |" , "After" ] =?> mconcat [ para "Before" , simpleTable' 2 mempty [ [ plain "One", plain "Two" ] ] , para "After" ] , "Table with Header" =: unlines [ "| Species | Status |" , "|--------------+--------------|" , "| cervisiae | domesticated |" , "| paradoxus | wild |" ] =?> simpleTable [ plain "Species", plain "Status" ] [ [ plain "cervisiae", plain "domesticated" ] , [ plain "paradoxus", plain "wild" ] ] , "Table with final hline" =: unlines [ "| cervisiae | domesticated |" , "| paradoxus | wild |" , "|--------------+--------------|" ] =?> simpleTable' 2 mempty [ [ plain "cervisiae", plain "domesticated" ] , [ plain "paradoxus", plain "wild" ] ] , "Table in a box" =: unlines [ "|---------|---------|" , "| static | Haskell |" , "| dynamic | Lisp |" , "|---------+---------|" ] =?> simpleTable' 2 mempty [ [ plain "static", plain "Haskell" ] , [ plain "dynamic", plain "Lisp" ] ] , "Table with empty cells" =: "|||c|" =?> simpleTable' 3 mempty [[mempty, mempty, plain "c"]] , "Table with empty rows" =: unlines [ "| first |" , "| |" , "| third |" ] =?> simpleTable' 1 mempty [[plain "first"], [mempty], [plain "third"]] , "Table with alignment row" =: unlines [ "| Numbers | Text | More |" , "| <c> | <r> | |" , "| 1 | One | foo |" , "| 2 | Two | bar |" ] =?> table "" (zip [AlignCenter, AlignRight, AlignDefault] [0, 0, 0]) [] [ [ plain "Numbers", plain "Text", plain "More" ] , [ plain "1" , plain "One" , plain "foo" ] , [ plain "2" , plain "Two" , plain "bar" ] ] , "Pipe within text doesn't start a table" =: "Ceci n'est pas une | pipe " =?> para (spcSep [ "Ceci", "n'est", "pas", "une", "|", "pipe" ]) , "Missing pipe at end of row" =: "|incomplete-but-valid" =?> simpleTable' 1 mempty [ [ plain "incomplete-but-valid" ] ] , "Table with differing row lengths" =: unlines [ "| Numbers | Text " , "|-" , "| <c> | <r> |" , "| 1 | One | foo |" , "| 2" ] =?> table "" (zip [AlignCenter, AlignRight] [0, 0]) [ plain "Numbers", plain "Text" ] [ [ plain "1" , plain "One" , plain "foo" ] , [ plain "2" ] ] , "Table with caption" =: unlines [ "#+CAPTION: Hitchhiker's Multiplication Table" , "| x | 6 |" , "| 9 | 42 |" ] =?> table "Hitchhiker's Multiplication Table" [(AlignDefault, 0), (AlignDefault, 0)] [] [ [ plain "x", plain "6" ] , [ plain "9", plain "42" ] ] ] , testGroup "Blocks and fragments" [ "Source block" =: unlines [ " #+BEGIN_SRC haskell" , " main = putStrLn greeting" , " where greeting = \"moin\"" , " #+END_SRC" ] =?> let attr' = ("", ["haskell"], []) code' = "main = putStrLn greeting\n" ++ " where greeting = \"moin\"\n" in codeBlockWith attr' code' , "Source block with indented code" =: unlines [ " #+BEGIN_SRC haskell" , " main = putStrLn greeting" , " where greeting = \"moin\"" , " #+END_SRC" ] =?> let attr' = ("", ["haskell"], []) code' = "main = putStrLn greeting\n" ++ " where greeting = \"moin\"\n" in codeBlockWith attr' code' , "Source block with tab-indented code" =: unlines [ "\t#+BEGIN_SRC haskell" , "\tmain = putStrLn greeting" , "\t where greeting = \"moin\"" , "\t#+END_SRC" ] =?> let attr' = ("", ["haskell"], []) code' = "main = putStrLn greeting\n" ++ " where greeting = \"moin\"\n" in codeBlockWith attr' code' , "Empty source block" =: unlines [ " #+BEGIN_SRC haskell" , " #+END_SRC" ] =?> let attr' = ("", ["haskell"], []) code' = "" in codeBlockWith attr' code' , "Source block between paragraphs" =: unlines [ "Low German greeting" , " #+BEGIN_SRC haskell" , " main = putStrLn greeting" , " where greeting = \"Moin!\"" , " #+END_SRC" ] =?> let attr' = ("", ["haskell"], []) code' = "main = putStrLn greeting\n" ++ " where greeting = \"Moin!\"\n" in mconcat [ para $ spcSep [ "Low", "German", "greeting" ] , codeBlockWith attr' code' ] , "Source block with rundoc/babel arguments" =: unlines [ "#+BEGIN_SRC emacs-lisp :exports both" , "(progn (message \"Hello, World!\")" , " (+ 23 42))" , "#+END_SRC" ] =?> let classes = [ "commonlisp" -- as kate doesn't know emacs-lisp syntax , "rundoc-block" ] params = [ ("rundoc-language", "emacs-lisp") , ("rundoc-exports", "both") ] code' = unlines [ "(progn (message \"Hello, World!\")" , " (+ 23 42))" ] in codeBlockWith ("", classes, params) code' , "Source block with results and :exports both" =: unlines [ "#+BEGIN_SRC emacs-lisp :exports both" , "(progn (message \"Hello, World!\")" , " (+ 23 42))" , "#+END_SRC" , "" , "#+RESULTS:" , ": 65"] =?> let classes = [ "commonlisp" -- as kate doesn't know emacs-lisp syntax , "rundoc-block" ] params = [ ("rundoc-language", "emacs-lisp") , ("rundoc-exports", "both") ] code' = unlines [ "(progn (message \"Hello, World!\")" , " (+ 23 42))" ] results' = "65\n" in codeBlockWith ("", classes, params) code' <> codeBlockWith ("", ["example"], []) results' , "Source block with results and :exports code" =: unlines [ "#+BEGIN_SRC emacs-lisp :exports code" , "(progn (message \"Hello, World!\")" , " (+ 23 42))" , "#+END_SRC" , "" , "#+RESULTS:" , ": 65" ] =?> let classes = [ "commonlisp" -- as kate doesn't know emacs-lisp syntax , "rundoc-block" ] params = [ ("rundoc-language", "emacs-lisp") , ("rundoc-exports", "code") ] code' = unlines [ "(progn (message \"Hello, World!\")" , " (+ 23 42))" ] in codeBlockWith ("", classes, params) code' , "Source block with results and :exports results" =: unlines [ "#+BEGIN_SRC emacs-lisp :exports results" , "(progn (message \"Hello, World!\")" , " (+ 23 42))" , "#+END_SRC" , "" , "#+RESULTS:" , ": 65" ] =?> let results' = "65\n" in codeBlockWith ("", ["example"], []) results' , "Source block with results and :exports none" =: unlines [ "#+BEGIN_SRC emacs-lisp :exports none" , "(progn (message \"Hello, World!\")" , " (+ 23 42))" , "#+END_SRC" , "" , "#+RESULTS:" , ": 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" , "a rule." , "#+eND_exAMPle" ] =?> codeBlockWith ("", ["example"], []) "A chosen representation of\na rule.\n" , "HTML block" =: unlines [ "#+BEGIN_HTML" , "<aside>HTML5 is pretty nice.</aside>" , "#+END_HTML" ] =?> rawBlock "html" "<aside>HTML5 is pretty nice.</aside>\n" , "Quote block" =: unlines [ "#+BEGIN_QUOTE" , "/Niemand/ hat die Absicht, eine Mauer zu errichten!" , "#+END_QUOTE" ] =?> blockQuote (para (spcSep [ emph "Niemand", "hat", "die", "Absicht," , "eine", "Mauer", "zu", "errichten!" ])) , "Verse block" =: unlines [ "The first lines of Goethe's /Faust/:" , "#+begin_verse" , "Habe nun, ach! Philosophie," , "Juristerei und Medizin," , "Und leider auch Theologie!" , "Durchaus studiert, mit heißem Bemühn." , "#+end_verse" ] =?> mconcat [ para $ spcSep [ "The", "first", "lines", "of" , "Goethe's", emph "Faust" <> ":"] , lineBlock [ "Habe nun, ach! Philosophie," , "Juristerei und Medizin," , "Und leider auch Theologie!" , "Durchaus studiert, mit heißem Bemühn." ] ] , "Verse block with blank lines" =: unlines [ "#+BEGIN_VERSE" , "foo" , "" , "bar" , "#+END_VERSE" ] =?> lineBlock [ "foo", mempty, "bar" ] , "Verse block with varying indentation" =: unlines [ "#+BEGIN_VERSE" , " hello darkness" , "my old friend" , "#+END_VERSE" ] =?> lineBlock [ "\160\160hello darkness", "my old friend" ] , "Raw block LaTeX" =: unlines [ "#+BEGIN_LaTeX" , "The category $\\cat{Set}$ is adhesive." , "#+END_LaTeX" ] =?> rawBlock "latex" "The category $\\cat{Set}$ is adhesive.\n" , "Raw LaTeX line" =: "#+LATEX: \\let\\foo\\bar" =?> rawBlock "latex" "\\let\\foo\\bar" , "Raw Beamer line" =: "#+beamer: \\pause" =?> rawBlock "beamer" "\\pause" , "Raw HTML line" =: "#+HTML: <aside>not important</aside>" =?> rawBlock "html" "<aside>not important</aside>" , "Export block HTML" =: unlines [ "#+BEGIN_export html" , "<samp>Hello, World!</samp>" , "#+END_export" ] =?> rawBlock "html" "<samp>Hello, World!</samp>\n" , "LaTeX fragment" =: unlines [ "\\begin{equation}" , "X_i = \\begin{cases}" , " G_{\\alpha(i)} & \\text{if }\\alpha(i-1) = \\alpha(i)\\\\" , " C_{\\alpha(i)} & \\text{otherwise}" , " \\end{cases}" , "\\end{equation}" ] =?> rawBlock "latex" (unlines [ "\\begin{equation}" , "X_i = \\begin{cases}" , " G_{\\alpha(i)} & \\text{if }\\alpha(i-1) =" ++ " \\alpha(i)\\\\" , " C_{\\alpha(i)} & \\text{otherwise}" , " \\end{cases}" , "\\end{equation}" ]) , "Code block with caption" =: unlines [ "#+CAPTION: Functor laws in Haskell" , "#+NAME: functor-laws" , "#+BEGIN_SRC haskell" , "fmap id = id" , "fmap (p . q) = (fmap p) . (fmap q)" , "#+END_SRC" ] =?> divWith nullAttr (mappend (plain $ spanWith ("", ["label"], []) (spcSep [ "Functor", "laws", "in", "Haskell" ])) (codeBlockWith ("functor-laws", ["haskell"], []) (unlines [ "fmap id = id" , "fmap (p . q) = (fmap p) . (fmap q)" ]))) , "Convert blank lines in blocks to single newlines" =: unlines [ "#+begin_html" , "" , "<span>boring</span>" , "" , "#+end_html" ] =?> rawBlock "html" "\n<span>boring</span>\n\n" , "Accept `ATTR_HTML` attributes for generic block" =: unlines [ "#+ATTR_HTML: :title hello, world :id test :class fun code" , "#+BEGIN_TEST" , "nonsense" , "#+END_TEST" ] =?> let attr = ("test", ["fun", "code", "TEST"], [("title", "hello, world")]) in divWith attr (para "nonsense") , "Non-letter chars in source block parameters" =: unlines [ "#+BEGIN_SRC C :tangle xxxx.c :city Zürich" , "code body" , "#+END_SRC" ] =?> let classes = [ "c", "rundoc-block" ] params = [ ("rundoc-language", "C") , ("rundoc-tangle", "xxxx.c") , ("rundoc-city", "Zürich") ] in codeBlockWith ( "", classes, params) "code body\n" ] , testGroup "Smart punctuation" [ test orgSmart "quote before ellipses" ("'...hi'" =?> para (singleQuoted "…hi")) , test orgSmart "apostrophe before emph" ("D'oh! A l'/aide/!" =?> para ("D’oh! A l’" <> emph "aide" <> "!")) , test orgSmart "apostrophe in French" ("À l'arrivée de la guerre, le thème de l'«impossibilité du socialisme»" =?> para "À l’arrivée de la guerre, le thème de l’«impossibilité du socialisme»") , test orgSmart "Quotes cannot occur at the end of emphasized text" ("/say \"yes\"/" =?> para ("/say" <> space <> doubleQuoted "yes" <> "/")) , 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"))) ] ] �������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Readers/RST.hs����������������������������������������������������������0000644�0000000�0000000�00000017643�13155240142�016245� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} module Tests.Readers.RST (tests) where import Text.Pandoc.Definition import Test.Framework import Tests.Helpers import Text.Pandoc.Arbitrary() import Text.Pandoc.Builder import Text.Pandoc rst :: String -> Pandoc rst = handleError . readRST def{ readerStandalone = True } infix 4 =: (=:) :: ToString c => String -> (String, c) -> Test (=:) = test rst tests :: [Test] tests = [ "line block with blank line" =: "| a\n|\n| b" =?> lineBlock [ "a", mempty, "\160b" ] , testGroup "field list" [ "general" =: unlines [ "para" , "" , ":Hostname: media08" , ":IP address: 10.0.0.19" , ":Size: 3ru" , ":Version: 1" , ":Indentation: Since the field marker may be quite long, the second" , " and subsequent lines of the field body do not have to line up" , " with the first line, but they must be indented relative to the" , " field name marker, and they must line up with each other." , ":Parameter i: integer" , ":Final: item" , " on two lines" ] =?> ( doc $ para "para" <> definitionList [ (str "Hostname", [para "media08"]) , (text "IP address", [para "10.0.0.19"]) , (str "Size", [para "3ru"]) , (str "Version", [para "1"]) , (str "Indentation", [para "Since the field marker may be quite long, the second\nand subsequent lines of the field body do not have to line up\nwith the first line, but they must be indented relative to the\nfield name marker, and they must line up with each other."]) , (text "Parameter i", [para "integer"]) , (str "Final", [para "item\non two lines"]) ]) , "metadata" =: unlines [ "=====" , "Title" , "=====" , "--------" , "Subtitle" , "--------" , "" , ":Version: 1" ] =?> ( setMeta "version" (para "1") $ setMeta "title" ("Title" :: Inlines) $ setMeta "subtitle" ("Subtitle" :: Inlines) $ doc mempty ) , "with inline markup" =: unlines [ ":*Date*: today" , "" , ".." , "" , ":*one*: emphasis" , ":two_: reference" , ":`three`_: another one" , ":``four``: literal" , "" , ".. _two: http://example.com" , ".. _three: http://example.org" ] =?> ( setMeta "date" (str "today") $ doc $ definitionList [ (emph "one", [para "emphasis"]) , (link "http://example.com" "" "two", [para "reference"]) , (link "http://example.org" "" "three", [para "another one"]) , (code "four", [para "literal"]) ]) ] , "URLs with following punctuation" =: ("http://google.com, http://yahoo.com; http://foo.bar.baz.\n" ++ "http://foo.bar/baz_(bam) (http://foo.bar)") =?> para (link "http://google.com" "" "http://google.com" <> ", " <> link "http://yahoo.com" "" "http://yahoo.com" <> "; " <> link "http://foo.bar.baz" "" "http://foo.bar.baz" <> ". " <> softbreak <> link "http://foo.bar/baz_(bam)" "" "http://foo.bar/baz_(bam)" <> " (" <> link "http://foo.bar" "" "http://foo.bar" <> ")") , "Reference names with special characters" =: ("A-1-B_2_C:3:D+4+E.5.F_\n\n" ++ ".. _A-1-B_2_C:3:D+4+E.5.F: https://example.com\n") =?> para (link "https://example.com" "" "A-1-B_2_C:3:D+4+E.5.F") , "Code directive with class and number-lines" =: unlines [ ".. code::python" , " :number-lines: 34" , " :class: class1 class2 class3" , "" , " def func(x):" , " return y" ] =?> ( doc $ codeBlockWith ( "" , ["sourceCode", "python", "numberLines", "class1", "class2", "class3"] , [ ("startFrom", "34") ] ) "def func(x):\n return y" ) , "Code directive with number-lines, no line specified" =: unlines [ ".. code::python" , " :number-lines: " , "" , " def func(x):" , " return y" ] =?> ( doc $ codeBlockWith ( "" , ["sourceCode", "python", "numberLines"] , [ ("startFrom", "") ] ) "def func(x):\n return y" ) , testGroup "literal / line / code blocks" [ "indented literal block" =: unlines [ "::" , "" , " block quotes" , "" , " can go on for many lines" , "but must stop here"] =?> (doc $ codeBlock "block quotes\n\ncan go on for many lines" <> para "but must stop here") , "line block with 3 lines" =: "| a\n| b\n| c" =?> lineBlock ["a", "b", "c"] , "quoted literal block using >" =: "::\n\n> quoted\n> block\n\nOrdinary paragraph" =?> codeBlock "> quoted\n> block" <> para "Ordinary paragraph" , "quoted literal block using | (not a line block)" =: "::\n\n| quoted\n| block\n\nOrdinary paragraph" =?> codeBlock "| quoted\n| block" <> para "Ordinary paragraph" , "class directive with single paragraph" =: ".. class:: special\n\nThis is a \"special\" paragraph." =?> divWith ("", ["special"], []) (para "This is a \"special\" paragraph.") , "class directive with two paragraphs" =: ".. class:: exceptional remarkable\n\n First paragraph.\n\n Second paragraph." =?> divWith ("", ["exceptional", "remarkable"], []) (para "First paragraph." <> para "Second paragraph.") , "class directive around literal block" =: ".. class:: classy\n\n::\n\n a\n b" =?> divWith ("", ["classy"], []) (codeBlock "a\nb")] , testGroup "interpreted text roles" [ "literal role prefix" =: ":literal:`a`" =?> para (code "a") , "literal role postfix" =: "`a`:literal:" =?> para (code "a") , "literal text" =: "``text``" =?> para (code "text") , "code role" =: ":code:`a`" =?> para (codeWith ("", ["sourceCode"], []) "a") , "inherited code role" =: ".. role:: codeLike(code)\n\n:codeLike:`a`" =?> para (codeWith ("", ["codeLike", "sourceCode"], []) "a") , "custom code role with language field" =: ".. role:: lhs(code)\n :language: haskell\n\n:lhs:`a`" =?> para (codeWith ("", ["lhs", "haskell","sourceCode"], []) "a") , "custom role with unspecified parent role" =: ".. role:: classy\n\n:classy:`text`" =?> para (spanWith ("", ["classy"], []) "text") , "role with recursive inheritance" =: ".. role:: haskell(code)\n.. role:: lhs(haskell)\n\n:lhs:`text`" =?> para (codeWith ("", ["lhs", "haskell", "sourceCode"], []) "text") , "unknown role" =: ":unknown:`text`" =?> para (str "text") ] , testGroup "footnotes" [ "remove space before note" =: unlines [ "foo [1]_" , "" , ".. [1]" , " bar" ] =?> (para $ "foo" <> (note $ para "bar")) ] ] ���������������������������������������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Readers/Docx.hs���������������������������������������������������������0000644�0000000�0000000�00000031741�13155240142�016465� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������module Tests.Readers.Docx (tests) where import Text.Pandoc.Options import Text.Pandoc.Readers.Native import Text.Pandoc.Definition import Tests.Helpers import Test.Framework import Test.HUnit (assertBool) import Test.Framework.Providers.HUnit import qualified Data.ByteString.Lazy as B import Text.Pandoc.Readers.Docx import Text.Pandoc.Writers.Native (writeNative) import qualified Data.Map as M import Text.Pandoc.MediaBag (MediaBag, lookupMedia, mediaDirectory) import Codec.Archive.Zip import Text.Pandoc.Error -- We define a wrapper around pandoc that doesn't normalize in the -- tests. Since we do our own normalization, we want to make sure -- we're doing it right. data NoNormPandoc = NoNormPandoc {unNoNorm :: Pandoc} deriving Show noNorm :: Pandoc -> NoNormPandoc noNorm = NoNormPandoc instance ToString NoNormPandoc where toString d = writeNative def{ writerTemplate = s } $ toPandoc d where s = case d of NoNormPandoc (Pandoc (Meta m) _) | M.null m -> Nothing | otherwise -> Just "" -- need this to get meta output instance ToPandoc NoNormPandoc where toPandoc = unNoNorm compareOutput :: ReaderOptions -> FilePath -> FilePath -> IO (NoNormPandoc, NoNormPandoc) compareOutput opts docxFile nativeFile = do df <- B.readFile docxFile nf <- Prelude.readFile nativeFile let (p, _) = handleError $ readDocx opts df return $ (noNorm p, noNorm (handleError $ readNative nf)) testCompareWithOptsIO :: ReaderOptions -> String -> FilePath -> FilePath -> IO Test testCompareWithOptsIO opts name docxFile nativeFile = do (dp, np) <- compareOutput opts docxFile nativeFile return $ test id name (dp, np) testCompareWithOpts :: ReaderOptions -> String -> FilePath -> FilePath -> Test testCompareWithOpts opts name docxFile nativeFile = buildTest $ testCompareWithOptsIO opts name docxFile nativeFile testCompare :: String -> FilePath -> FilePath -> Test testCompare = testCompareWithOpts def testForWarningsWithOptsIO :: ReaderOptions -> String -> FilePath -> [String] -> IO Test testForWarningsWithOptsIO opts name docxFile expected = do df <- B.readFile docxFile let (_, _, warns) = handleError $ readDocxWithWarnings opts df return $ test id name (unlines warns, unlines expected) testForWarningsWithOpts :: ReaderOptions -> String -> FilePath -> [String] -> Test testForWarningsWithOpts opts name docxFile expected = buildTest $ testForWarningsWithOptsIO opts name docxFile expected -- testForWarnings :: String -> FilePath -> [String] -> Test -- testForWarnings = testForWarningsWithOpts def getMedia :: FilePath -> FilePath -> IO (Maybe B.ByteString) getMedia archivePath mediaPath = do zf <- B.readFile archivePath >>= return . toArchive return $ findEntryByPath ("word/" ++ mediaPath) zf >>= (Just . fromEntry) compareMediaPathIO :: FilePath -> MediaBag -> FilePath -> IO Bool compareMediaPathIO mediaPath mediaBag docxPath = do docxMedia <- getMedia docxPath mediaPath let mbBS = case lookupMedia mediaPath mediaBag of Just (_, bs) -> bs Nothing -> error ("couldn't find " ++ mediaPath ++ " in media bag") docxBS = case docxMedia of Just bs -> bs Nothing -> error ("couldn't find " ++ mediaPath ++ " in media bag") return $ mbBS == docxBS compareMediaBagIO :: FilePath -> IO Bool compareMediaBagIO docxFile = do df <- B.readFile docxFile let (_, mb) = handleError $ readDocx def df bools <- mapM (\(fp, _, _) -> compareMediaPathIO fp mb docxFile) (mediaDirectory mb) return $ and bools testMediaBagIO :: String -> FilePath -> IO Test testMediaBagIO name docxFile = do outcome <- compareMediaBagIO docxFile return $ testCase name (assertBool ("Media didn't match media bag in file " ++ docxFile) outcome) testMediaBag :: String -> FilePath -> Test testMediaBag name docxFile = buildTest $ testMediaBagIO name docxFile tests :: [Test] tests = [ testGroup "inlines" [ testCompare "font formatting" "docx/inline_formatting.docx" "docx/inline_formatting.native" , testCompare "font formatting with character styles" "docx/char_styles.docx" "docx/char_styles.native" , testCompare "hyperlinks" "docx/links.docx" "docx/links.native" , testCompare "normalizing adjacent hyperlinks" "docx/adjacent_links.docx" "docx/adjacent_links.native" , testCompare "inline image" "docx/image.docx" "docx/image_no_embed.native" , testCompare "VML image" "docx/image_vml.docx" "docx/image_vml.native" , testCompare "inline image in links" "docx/inline_images.docx" "docx/inline_images.native" , testCompare "handling unicode input" "docx/unicode.docx" "docx/unicode.native" , testCompare "literal tabs" "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" , testCompare "normalizing inlines deep inside blocks" "docx/deep_normalize.docx" "docx/deep_normalize.native" , testCompare "move trailing spaces outside of formatting" "docx/trailing_spaces_in_formatting.docx" "docx/trailing_spaces_in_formatting.native" , testCompare "inline code (with VerbatimChar style)" "docx/inline_code.docx" "docx/inline_code.native" , testCompare "inline code in subscript and superscript" "docx/verbatim_subsuper.docx" "docx/verbatim_subsuper.native" ] , testGroup "blocks" [ testCompare "headers" "docx/headers.docx" "docx/headers.native" , testCompare "headers already having auto identifiers" "docx/already_auto_ident.docx" "docx/already_auto_ident.native" , testCompare "nested anchor spans in header" "docx/nested_anchors_in_header.docx" "docx/nested_anchors_in_header.native" , testCompare "single numbered item not made into list" "docx/numbered_header.docx" "docx/numbered_header.native" , testCompare "enumerated headers not made into numbered list" "docx/enumerated_headings.docx" "docx/enumerated_headings.native" , testCompare "i18n blocks (headers and blockquotes)" "docx/i18n_blocks.docx" "docx/i18n_blocks.native" , testCompare "lists" "docx/lists.docx" "docx/lists.native" , testCompare "definition lists" "docx/definition_list.docx" "docx/definition_list.native" , testCompare "custom defined lists in styles" "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" , testCompare "hanging indents" "docx/hanging_indent.docx" "docx/hanging_indent.native" , testCompare "tables" "docx/tables.docx" "docx/tables.native" , testCompare "tables with lists in cells" "docx/table_with_list_cell.docx" "docx/table_with_list_cell.native" , testCompare "tables with one row" "docx/table_one_row.docx" "docx/table_one_row.native" , testCompare "code block" "docx/codeblock.docx" "docx/codeblock.native" , testCompare "dropcap paragraphs" "docx/drop_cap.docx" "docx/drop_cap.native" ] , testGroup "track changes" [ testCompare "insertion (default)" "docx/track_changes_insertion.docx" "docx/track_changes_insertion_accept.native" , testCompareWithOpts def{readerTrackChanges=AcceptChanges} "insert insertion (accept)" "docx/track_changes_insertion.docx" "docx/track_changes_insertion_accept.native" , testCompareWithOpts def{readerTrackChanges=RejectChanges} "remove insertion (reject)" "docx/track_changes_insertion.docx" "docx/track_changes_insertion_reject.native" , testCompare "deletion (default)" "docx/track_changes_deletion.docx" "docx/track_changes_deletion_accept.native" , testCompareWithOpts def{readerTrackChanges=AcceptChanges} "remove deletion (accept)" "docx/track_changes_deletion.docx" "docx/track_changes_deletion_accept.native" , testCompareWithOpts def{readerTrackChanges=RejectChanges} "insert deletion (reject)" "docx/track_changes_deletion.docx" "docx/track_changes_deletion_reject.native" , testCompareWithOpts def{readerTrackChanges=AllChanges} "keep insertion (all)" "docx/track_changes_deletion.docx" "docx/track_changes_deletion_all.native" , testCompareWithOpts def{readerTrackChanges=AllChanges} "keep deletion (all)" "docx/track_changes_deletion.docx" "docx/track_changes_deletion_all.native" , testCompareWithOpts def{readerTrackChanges=AcceptChanges} "move text (accept)" "docx/track_changes_move.docx" "docx/track_changes_move_accept.native" , testCompareWithOpts def{readerTrackChanges=RejectChanges} "move text (reject)" "docx/track_changes_move.docx" "docx/track_changes_move_reject.native" , testCompareWithOpts def{readerTrackChanges=AllChanges} "move text (all)" "docx/track_changes_move.docx" "docx/track_changes_move_all.native" , testCompareWithOpts def{readerTrackChanges=AcceptChanges} "comments (accept -- no comments)" "docx/comments.docx" "docx/comments_no_comments.native" , testCompareWithOpts def{readerTrackChanges=RejectChanges} "comments (reject -- comments)" "docx/comments.docx" "docx/comments_no_comments.native" , testCompareWithOpts def{readerTrackChanges=AllChanges} "comments (all comments)" "docx/comments.docx" "docx/comments.native" , testForWarningsWithOpts def{readerTrackChanges=AcceptChanges} "comment warnings (accept -- no warnings)" "docx/comments_warning.docx" [] , testForWarningsWithOpts def{readerTrackChanges=RejectChanges} "comment warnings (reject -- no warnings)" "docx/comments_warning.docx" [] , testForWarningsWithOpts def{readerTrackChanges=AllChanges} "comment warnings (all)" "docx/comments_warning.docx" ["Docx comment 1 will not retain formatting"] ] , testGroup "media" [ testMediaBag "image extraction" "docx/image.docx" ] , testGroup "metadata" [ testCompareWithOpts def{readerStandalone=True} "metadata fields" "docx/metadata.docx" "docx/metadata.native" , testCompareWithOpts def{readerStandalone=True} "stop recording metadata with normal text" "docx/metadata_after_normal.docx" "docx/metadata_after_normal.native" ] ] �������������������������������pandoc-1.19.2.4/tests/Tests/Readers/Odt.hs����������������������������������������������������������0000644�0000000�0000000�00000014474�13155240142�016322� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������module Tests.Readers.Odt (tests) where import Control.Monad ( liftM ) import Text.Pandoc.Options import Text.Pandoc.Readers.Native import Text.Pandoc.Readers.Markdown import Text.Pandoc.Definition import Tests.Helpers import Test.Framework import qualified Data.ByteString.Lazy as B import Text.Pandoc.Readers.Odt import Text.Pandoc.Writers.Native (writeNative) import qualified Data.Map as M import Text.Pandoc.Error tests :: [Test] tests = testsComparingToMarkdown ++ testsComparingToNative testsComparingToMarkdown :: [Test] testsComparingToMarkdown = map nameToTest namesOfTestsComparingToMarkdown where nameToTest name = createTest compareOdtToMarkdown name (toOdtPath name) (toMarkdownPath name) toOdtPath name = "odt/odt/" ++ name ++ ".odt" toMarkdownPath name = "odt/markdown/" ++ name ++ ".md" testsComparingToNative :: [Test] testsComparingToNative = map nameToTest namesOfTestsComparingToNative where nameToTest name = createTest compareOdtToNative name (toOdtPath name) (toNativePath name) toOdtPath name = "odt/odt/" ++ name ++ ".odt" toNativePath name = "odt/native/" ++ name ++ ".native" newtype NoNormPandoc = NoNormPandoc {unNoNorm :: Pandoc} deriving ( Show ) instance ToString NoNormPandoc where toString d = writeNative def{ writerTemplate = s } $ toPandoc d where s = case d of NoNormPandoc (Pandoc (Meta m) _) | M.null m -> Nothing | otherwise -> Just "" -- need this for Meta output instance ToPandoc NoNormPandoc where toPandoc = unNoNorm getNoNormVia :: (a -> Pandoc) -> String -> Either PandocError a -> NoNormPandoc getNoNormVia _ readerName (Left _) = error (readerName ++ " reader failed") getNoNormVia f _ (Right a) = NoNormPandoc (f a) type TestCreator = ReaderOptions -> FilePath -> FilePath -> IO (NoNormPandoc, NoNormPandoc) compareOdtToNative :: TestCreator compareOdtToNative opts odtPath nativePath = do nativeFile <- Prelude.readFile nativePath odtFile <- B.readFile odtPath let native = getNoNormVia id "native" $ readNative nativeFile let odt = getNoNormVia fst "odt" $ readOdt opts odtFile return (odt,native) compareOdtToMarkdown :: TestCreator compareOdtToMarkdown opts odtPath markdownPath = do markdownFile <- Prelude.readFile markdownPath odtFile <- B.readFile odtPath let markdown = getNoNormVia id "markdown" $ readMarkdown opts markdownFile let odt = getNoNormVia fst "odt" $ readOdt opts odtFile return (odt,markdown) createTest :: TestCreator -> TestName -> FilePath -> FilePath -> Test createTest creator name path1 path2 = buildTest $ liftM (test id name) (creator def path1 path2) {- -- getMedia :: FilePath -> FilePath -> IO (Maybe B.ByteString) getMedia archivePath mediaPath = do zf <- B.readFile archivePath >>= return . toArchive return $ findEntryByPath ("Pictures/" ++ mediaPath) zf >>= (Just . fromEntry) compareMediaPathIO :: FilePath -> MediaBag -> FilePath -> IO Bool compareMediaPathIO mediaPath mediaBag odtPath = do odtMedia <- getMedia odtPath mediaPath let mbBS = case lookupMedia mediaPath mediaBag of Just (_, bs) -> bs Nothing -> error ("couldn't find " ++ mediaPath ++ " in media bag") odtBS = case odtMedia of Just bs -> bs Nothing -> error ("couldn't find " ++ mediaPath ++ " in media bag") return $ mbBS == odtBS compareMediaBagIO :: FilePath -> IO Bool compareMediaBagIO odtFile = do df <- B.readFile odtFile let (_, mb) = readOdt def df bools <- mapM (\(fp, _, _) -> compareMediaPathIO fp mb odtFile) (mediaDirectory mb) return $ and bools testMediaBagIO :: String -> FilePath -> IO Test testMediaBagIO name odtFile = do outcome <- compareMediaBagIO odtFile return $ testCase name (assertBool ("Media didn't match media bag in file " ++ odtFile) outcome) testMediaBag :: String -> FilePath -> Test testMediaBag name odtFile = buildTest $ testMediaBagIO name odtFile -} -- namesOfTestsComparingToMarkdown :: [ String ] namesOfTestsComparingToMarkdown = [ "bold" -- , "citation" , "endnote" , "externalLink" , "footnote" , "headers" -- , "horizontalRule" , "italic" -- , "listBlocks" , "paragraph" , "strikeout" -- , "trackedChanges" , "underlined" ] namesOfTestsComparingToNative :: [ String ] namesOfTestsComparingToNative = [ "blockquote" , "image" , "imageIndex" , "imageWithCaption" , "inlinedCode" , "orderedListMixed" , "orderedListRoman" , "orderedListSimple" , "referenceToChapter" , "referenceToListItem" , "referenceToText" , "simpleTable" , "simpleTableWithCaption" -- , "table" , "textMixedStyles" , "tableWithContents" , "unicode" , "unorderedList" ] ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Readers/Txt2Tags.hs�����������������������������������������������������0000644�0000000�0000000�00000034354�13155240142�017253� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} module Tests.Readers.Txt2Tags (tests) where import Text.Pandoc.Definition import Test.Framework import Tests.Helpers import Text.Pandoc.Arbitrary() import Text.Pandoc.Builder import Text.Pandoc import Data.List (intersperse) import Text.Pandoc.Readers.Txt2Tags t2t :: String -> Pandoc t2t = handleError . readTxt2Tags (T2TMeta "date" "mtime" "in" "out") def infix 4 =: (=:) :: ToString c => String -> (String, c) -> Test (=:) = test t2t spcSep :: [Inlines] -> Inlines spcSep = mconcat . intersperse space simpleTable' :: Int -> [Blocks] -> [[Blocks]] -> Blocks simpleTable' n = table "" (take n $ repeat (AlignCenter, 0.0)) tests :: [Test] tests = [ testGroup "Inlines" $ [ "Plain String" =: "Hello, World" =?> para (spcSep [ "Hello,", "World" ]) , "Emphasis" =: "//Planet Punk//" =?> para (emph . spcSep $ ["Planet", "Punk"]) , "Strong" =: "**Cider**" =?> para (strong "Cider") , "Strong Emphasis" =: "//**strength**//" =?> para (emph . strong $ "strength") , "Strikeout" =: "--Kill Bill--" =?> para (strikeout . spcSep $ [ "Kill", "Bill" ]) , "Verbatim" =: "``Robot.rock()``" =?> para (code "Robot.rock()") , "Symbol" =: "A * symbol" =?> para (str "A" <> space <> str "*" <> space <> "symbol") , "No empty markup" =: "//// **** ____ ---- ```` \"\"\"\" ''''" =?> para (spcSep [ "////", "****", "____", "----", "````", "\"\"\"\"", "''''" ]) , "Inline markup is greedy" =: "***** ///// _____ ----- ````` \"\"\"\"\" '''''" =?> para (spcSep [strong "*", emph "/", emph "_" , strikeout "-", code "`", text "\"" , rawInline "html" "'"]) , "Markup must be greedy" =: "********** ////////// __________ ---------- `````````` \"\"\"\"\"\"\"\"\"\" ''''''''''" =?> para (spcSep [strong "******", emph "//////", emph "______" , strikeout "------", code "``````", text "\"\"\"\"\"\"" , rawInline "html" "''''''"]) , "Inlines must be glued" =: "** a** **a ** ** a **" =?> para (text "** a** **a ** ** a **") , "Macros: Date" =: "%%date" =?> para "date" , "Macros: Mod Time" =: "%%mtime" =?> para "mtime" , "Macros: Infile" =: "%%infile" =?> para "in" , "Macros: Outfile" =: "%%outfile" =?> para "out" , "Autolink" =: "http://www.google.com" =?> para (link "http://www.google.com" "" (str "http://www.google.com")) , "Image" =: "[image.jpg]" =?> para (image "image.jpg" "" mempty) , "Link" =: "[title http://google.com]" =?> para (link "http://google.com" "" (str "title")) , "Image link" =: "[[image.jpg] abc]" =?> para (link "abc" "" (image "image.jpg" "" mempty)) , "Invalid link: No trailing space" =: "[title invalid ]" =?> para (text "[title invalid ]") ] , testGroup "Basic Blocks" $ ["Paragraph, lines grouped together" =: "A paragraph\n A blank line ends the \n current paragraph\n" =?> para "A paragraph\n A blank line ends the\n current paragraph" , "Paragraph, ignore leading and trailing spaces" =: " Leading and trailing spaces are ignored. \n" =?> para "Leading and trailing spaces are ignored." , "Comment line in paragraph" =: "A comment line can be placed inside a paragraph.\n% this comment will be ignored \nIt will not affect it.\n" =?> para "A comment line can be placed inside a paragraph.\nIt will not affect it." , "Paragraph" =: "Paragraph\n" =?> para "Paragraph" , "First Level Header" =: "+ Headline +\n" =?> header 1 "Headline" , "Third Level Header" =: "=== Third Level Headline ===\n" =?> header 3 ("Third" <> space <> "Level" <> space <> "Headline") , "Header with label" =: "= header =[label]" =?> headerWith ("label", [], []) 1 ("header") , "Invalid header, mismatched delimiters" =: "== header =" =?> para (text "== header =") , "Invalid header, spaces in label" =: "== header ==[ haha ]" =?> para (text "== header ==[ haha ]") , "Invalid header, invalid label character" =: "== header ==[lab/el]" =?> para (text "== header ==[lab/el]") , "Headers not preceded by a blank line" =: unlines [ "++ eat dinner ++" , "Spaghetti and meatballs tonight." , "== walk dog ==" ] =?> mconcat [ header 2 ("eat" <> space <> "dinner") , para $ spcSep [ "Spaghetti", "and", "meatballs", "tonight." ] , header 2 ("walk" <> space <> "dog") ] , "Paragraph starting with an equals" =: "=five" =?> para "=five" , "Paragraph containing asterisk at beginning of line" =: unlines [ "lucky" , "*star" ] =?> para ("lucky" <> softbreak <> "*star") , "Horizontal Rule" =: unlines [ "before" , replicate 20 '-' , replicate 20 '=' , replicate 20 '_' , "after" ] =?> mconcat [ para "before" , horizontalRule , horizontalRule , horizontalRule , para "after" ] , "Comment Block" =: unlines [ "%%%" , "stuff" , "bla" , "%%%"] =?> (mempty::Blocks) ] , testGroup "Lists" $ [ "Simple Bullet Lists" =: ("- Item1\n" ++ "- Item2\n") =?> bulletList [ plain "Item1" , plain "Item2" ] , "Indented Bullet Lists" =: (" - Item1\n" ++ " - Item2\n") =?> bulletList [ plain "Item1" , plain "Item2" ] , "Nested Bullet Lists" =: ("- Discovery\n" ++ " + One More Time\n" ++ " + Harder, Better, Faster, Stronger\n" ++ "- Homework\n" ++ " + Around the World\n"++ "- Human After All\n" ++ " + Technologic\n" ++ " + Robot Rock\n") =?> bulletList [ mconcat [ plain "Discovery" , orderedList [ plain ("One" <> space <> "More" <> space <> "Time") , plain ("Harder," <> space <> "Better," <> space <> "Faster," <> space <> "Stronger") ] ] , mconcat [ plain "Homework" , orderedList [ plain ("Around" <> space <> "the" <> space <> "World") ] ] , mconcat [ plain ("Human" <> space <> "After" <> space <> "All") , orderedList [ plain "Technologic" , plain ("Robot" <> space <> "Rock") ] ] ] , "Simple Ordered List" =: ("+ Item1\n" ++ "+ Item2\n") =?> let listStyle = (1, DefaultStyle, DefaultDelim) listStructure = [ plain "Item1" , plain "Item2" ] in orderedListWith listStyle listStructure , "Indented Ordered List" =: (" + Item1\n" ++ " + Item2\n") =?> let listStyle = (1, DefaultStyle, DefaultDelim) listStructure = [ plain "Item1" , plain "Item2" ] in orderedListWith listStyle listStructure , "Nested Ordered Lists" =: ("+ One\n" ++ " + One-One\n" ++ " + One-Two\n" ++ "+ Two\n" ++ " + Two-One\n"++ " + Two-Two\n") =?> let listStyle = (1, DefaultStyle, DefaultDelim) listStructure = [ mconcat [ plain "One" , orderedList [ plain "One-One" , plain "One-Two" ] ] , mconcat [ plain "Two" , orderedList [ plain "Two-One" , plain "Two-Two" ] ] ] in orderedListWith listStyle listStructure , "Ordered List in Bullet List" =: ("- Emacs\n" ++ " + Org\n") =?> bulletList [ (plain "Emacs") <> (orderedList [ plain "Org"]) ] , "Bullet List in Ordered List" =: ("+ GNU\n" ++ " - Freedom\n") =?> orderedList [ (plain "GNU") <> bulletList [ (plain "Freedom") ] ] , "Definition List" =: unlines [ ": PLL" , " phase-locked loop" , ": TTL" , " transistor-transistor logic" , ": PSK" , " a digital" ] =?> definitionList [ ("PLL", [ plain $ "phase-locked" <> space <> "loop" ]) , ("TTL", [ plain $ "transistor-transistor" <> space <> "logic" ]) , ("PSK", [ plain $ "a" <> space <> "digital" ]) ] , "Loose bullet list" =: unlines [ "- apple" , "" , "- orange" , "" , "- peach" ] =?> bulletList [ para "apple" , para "orange" , para "peach" ] ] , testGroup "Tables" [ "Single cell table" =: "| Test " =?> simpleTable' 1 mempty [[plain "Test"]] , "Multi cell table" =: "| One | Two |" =?> simpleTable' 2 mempty [ [ plain "One", plain "Two" ] ] , "Multi line table" =: unlines [ "| One |" , "| Two |" , "| Three |" ] =?> simpleTable' 1 mempty [ [ plain "One" ] , [ plain "Two" ] , [ plain "Three" ] ] , "Empty table" =: "| |" =?> simpleTable' 1 mempty [[mempty]] , "Glider Table" =: unlines [ "| 1 | 0 | 0 |" , "| 0 | 1 | 1 |" , "| 1 | 1 | 0 |" ] =?> simpleTable' 3 mempty [ [ plain "1", plain "0", plain "0" ] , [ plain "0", plain "1", plain "1" ] , [ plain "1", plain "1", plain "0" ] ] , "Table with Header" =: unlines [ "|| Species | Status |" , "| cervisiae | domesticated |" , "| paradoxus | wild |" ] =?> simpleTable [ plain "Species", plain "Status" ] [ [ plain "cervisiae", plain "domesticated" ] , [ plain "paradoxus", plain "wild" ] ] , "Table alignment determined by spacing" =: unlines [ "| Numbers | Text | More |" , "| 1 | One | foo |" , "| 2 | Two | bar |" ] =?> table "" (zip [AlignCenter, AlignRight, AlignDefault] [0, 0, 0]) [] [ [ plain "Numbers", plain "Text", plain "More" ] , [ plain "1" , plain "One" , plain "foo" ] , [ plain "2" , plain "Two" , plain "bar" ] ] , "Pipe within text doesn't start a table" =: "Ceci n'est pas une | pipe " =?> para (spcSep [ "Ceci", "n'est", "pas", "une", "|", "pipe" ]) , "Table with differing row lengths" =: unlines [ "|| Numbers | Text " , "| 1 | One | foo |" , "| 2 " ] =?> table "" (zip [AlignCenter, AlignLeft, AlignLeft] [0, 0, 0]) [ plain "Numbers", plain "Text" , plain mempty ] [ [ plain "1" , plain "One" , plain "foo" ] , [ plain "2" , plain mempty , plain mempty ] ] ] , testGroup "Blocks and fragments" [ "Source block" =: unlines [ "```" , "main = putStrLn greeting" , " where greeting = \"moin\"" , "```" ] =?> let code' = "main = putStrLn greeting\n" ++ " where greeting = \"moin\"\n" in codeBlock code' , "tagged block" =: unlines [ "'''" , "<aside>HTML5 is pretty nice.</aside>" , "'''" ] =?> rawBlock "html" "<aside>HTML5 is pretty nice.</aside>\n" , "Quote block" =: unlines ["\t//Niemand// hat die Absicht, eine Mauer zu errichten!" ] =?> blockQuote (para (spcSep [ emph "Niemand", "hat", "die", "Absicht," , "eine", "Mauer", "zu", "errichten!" ])) ] ] ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Readers/EPUB.hs���������������������������������������������������������0000644�0000000�0000000�00000002204�13155240142�016313� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������module Tests.Readers.EPUB (tests) where import Text.Pandoc.Options import Test.Framework import Test.HUnit (assertBool) import Test.Framework.Providers.HUnit import qualified Data.ByteString.Lazy as BL import Text.Pandoc.Readers.EPUB import Text.Pandoc.MediaBag (MediaBag, mediaDirectory) import Text.Pandoc.Error getMediaBag :: FilePath -> IO MediaBag getMediaBag fp = snd . handleError . readEPUB def <$> BL.readFile fp testMediaBag :: FilePath -> [(String, String, Int)] -> IO () testMediaBag fp bag = do actBag <- (mediaDirectory <$> getMediaBag fp) assertBool (show "MediaBag did not match:\nExpected: " ++ show bag ++ "\nActual: " ++ show actBag) (actBag == bag) featuresBag :: [(String, String, Int)] featuresBag = [("img/check.gif","image/gif",1340) ,("img/check.jpg","image/jpeg",2661) ,("img/check.png","image/png",2815) ,("img/multiscripts_and_greek_alphabet.png","image/png",10060) ] tests :: [Test] tests = [ testGroup "EPUB Mediabag" [ testCase "features bag" (testMediaBag "epub/img.epub" featuresBag) ] ] ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Writers/Native.hs�������������������������������������������������������0000644�0000000�0000000�00000001020�13155240142�017053� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������module Tests.Writers.Native (tests) where import Test.Framework import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Text.Pandoc.Arbitrary() p_write_rt :: Pandoc -> Bool p_write_rt d = read (writeNative def{ writerTemplate = Just "" } d) == d p_write_blocks_rt :: [Block] -> Bool p_write_blocks_rt bs = length bs > 20 || read (writeNative def (Pandoc nullMeta bs)) == bs tests :: [Test] tests = [ property "p_write_rt" p_write_rt , property "p_write_blocks_rt" p_write_blocks_rt ] ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Writers/ConTeXt.hs������������������������������������������������������0000644�0000000�0000000�00000003702�13155240142�017162� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} module Tests.Writers.ConTeXt (tests) where import Test.Framework import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Text.Pandoc.Arbitrary() context :: (ToPandoc a) => a -> String context = writeConTeXt def . toPandoc context' :: (ToPandoc a) => a -> String context' = writeConTeXt def{ writerWrapText = WrapNone } . toPandoc {- "my test" =: X =?> Y is shorthand for test context "my test" $ X =?> Y which is in turn shorthand for test context "my test" (X,Y) -} infix 4 =: (=:) :: (ToString a, ToPandoc a) => String -> (a, String) -> Test (=:) = test context tests :: [Test] tests = [ testGroup "inline code" [ "with '}'" =: code "}" =?> "\\mono{\\}}" , "without '}'" =: code "]" =?> "\\type{]}" , property "code property" $ \s -> null s || if '{' `elem` s || '}' `elem` s then (context' $ code s) == "\\mono{" ++ (context' $ str s) ++ "}" else (context' $ code s) == "\\type{" ++ s ++ "}" ] , testGroup "headers" [ "level 1" =: headerWith ("my-header",[],[]) 1 "My header" =?> "\\section[my-header]{My header}" ] , testGroup "bullet lists" [ "nested" =: bulletList [ plain (text "top") <> bulletList [ plain (text "next") <> bulletList [plain (text "bot")] ] ] =?> unlines [ "\\startitemize[packed]" , "\\item" , " top" , " \\startitemize[packed]" , " \\item" , " next" , " \\startitemize[packed]" , " \\item" , " bot" , " \\stopitemize" , " \\stopitemize" , "\\stopitemize" ] ] ] ��������������������������������������������������������������pandoc-1.19.2.4/tests/Tests/Writers/Docbook.hs������������������������������������������������������0000644�0000000�0000000�00000033100�13155240142�017211� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{-# LANGUAGE OverloadedStrings #-} module Tests.Writers.Docbook (tests) where import Test.Framework import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Text.Pandoc.Arbitrary() docbook :: (ToPandoc a) => a -> String docbook = docbookWithOpts def{ writerWrapText = WrapNone } docbookWithOpts :: ToPandoc a => WriterOptions -> a -> String docbookWithOpts opts = writeDocbook opts . toPandoc {- "my test" =: X =?> Y is shorthand for test docbook "my test" $ X =?> Y which is in turn shorthand for test docbook "my test" (X,Y) -} infix 4 =: (=:) :: (ToString a, ToPandoc a) => String -> (a, String) -> Test (=:) = test docbook lineblock :: Blocks lineblock = para ("some text" <> linebreak <> "and more lines" <> linebreak <> "and again") lineblock_out :: [String] lineblock_out = [ "<literallayout>some text" , "and more lines" , "and again</literallayout>" ] tests :: [Test] tests = [ testGroup "line blocks" [ "none" =: para "This is a test" =?> unlines [ "<para>" , " This is a test" , "</para>" ] , "basic" =: lineblock =?> unlines lineblock_out , "blockquote" =: blockQuote lineblock =?> unlines ( [ "<blockquote>" ] ++ lineblock_out ++ [ "</blockquote>" ] ) , "footnote" =: para ("This is a test" <> note lineblock <> " of footnotes") =?> unlines ( [ "<para>" , " This is a test<footnote>" ] ++ lineblock_out ++ [ " </footnote> of footnotes" , "</para>" ] ) ] , testGroup "compact lists" [ testGroup "bullet" [ "compact" =: bulletList [plain "a", plain "b", plain "c"] =?> unlines [ "<itemizedlist spacing=\"compact\">" , " <listitem>" , " <para>" , " a" , " </para>" , " </listitem>" , " <listitem>" , " <para>" , " b" , " </para>" , " </listitem>" , " <listitem>" , " <para>" , " c" , " </para>" , " </listitem>" , "</itemizedlist>" ] , "loose" =: bulletList [para "a", para "b", para "c"] =?> unlines [ "<itemizedlist>" , " <listitem>" , " <para>" , " a" , " </para>" , " </listitem>" , " <listitem>" , " <para>" , " b" , " </para>" , " </listitem>" , " <listitem>" , " <para>" , " c" , " </para>" , " </listitem>" , "</itemizedlist>" ] ] , testGroup "ordered" [ "compact" =: orderedList [plain "a", plain "b", plain "c"] =?> unlines [ "<orderedlist spacing=\"compact\">" , " <listitem>" , " <para>" , " a" , " </para>" , " </listitem>" , " <listitem>" , " <para>" , " b" , " </para>" , " </listitem>" , " <listitem>" , " <para>" , " c" , " </para>" , " </listitem>" , "</orderedlist>" ] , "loose" =: orderedList [para "a", para "b", para "c"] =?> unlines [ "<orderedlist>" , " <listitem>" , " <para>" , " a" , " </para>" , " </listitem>" , " <listitem>" , " <para>" , " b" , " </para>" , " </listitem>" , " <listitem>" , " <para>" , " c" , " </para>" , " </listitem>" , "</orderedlist>" ] ] , testGroup "definition" [ "compact" =: definitionList [ ("an", [plain "apple" ]) , ("a", [plain "banana"]) , ("an", [plain "orange"])] =?> unlines [ "<variablelist spacing=\"compact\">" , " <varlistentry>" , " <term>" , " an" , " </term>" , " <listitem>" , " <para>" , " apple" , " </para>" , " </listitem>" , " </varlistentry>" , " <varlistentry>" , " <term>" , " a" , " </term>" , " <listitem>" , " <para>" , " banana" , " </para>" , " </listitem>" , " </varlistentry>" , " <varlistentry>" , " <term>" , " an" , " </term>" , " <listitem>" , " <para>" , " orange" , " </para>" , " </listitem>" , " </varlistentry>" , "</variablelist>" ] , "loose" =: definitionList [ ("an", [para "apple" ]) , ("a", [para "banana"]) , ("an", [para "orange"])] =?> unlines [ "<variablelist>" , " <varlistentry>" , " <term>" , " an" , " </term>" , " <listitem>" , " <para>" , " apple" , " </para>" , " </listitem>" , " </varlistentry>" , " <varlistentry>" , " <term>" , " a" , " </term>" , " <listitem>" , " <para>" , " banana" , " </para>" , " </listitem>" , " </varlistentry>" , " <varlistentry>" , " <term>" , " an" , " </term>" , " <listitem>" , " <para>" , " orange" , " </para>" , " </listitem>" , " </varlistentry>" , "</variablelist>" ] ] ] , testGroup "writer options" $ [ testGroup "top-level division" $ let headers = header 1 (text "header1") <> header 2 (text "header2") <> header 3 (text "header3") docbookTopLevelDiv :: (ToPandoc a) => TopLevelDivision -> a -> String docbookTopLevelDiv division = docbookWithOpts def{ writerTopLevelDivision = division } in [ test (docbookTopLevelDiv TopLevelSection) "sections as top-level" $ headers =?> unlines [ "<sect1>" , " <title>header1" , " " , " header2" , " " , " header3" , " " , " " , " " , " " , "" ] , test (docbookTopLevelDiv TopLevelChapter) "chapters as top-level" $ headers =?> unlines [ "" , " header1" , " " , " header2" , " " , " header3" , " " , " " , " " , " " , "" ] , test (docbookTopLevelDiv TopLevelPart) "parts as top-level" $ headers =?> unlines [ "" , " header1" , " " , " header2" , " " , " header3" , " " , " " , " " , " " , "" ] , test (docbookTopLevelDiv TopLevelDefault) "default top-level" $ headers =?> unlines [ "" , " header1" , " " , " header2" , " " , " header3" , " " , " " , " " , " " , "" ] ] ] ] pandoc-1.19.2.4/tests/Tests/Writers/HTML.hs0000644000000000000000000000215013155240142016376 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Tests.Writers.HTML (tests) where import Test.Framework import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Text.Pandoc.Arbitrary() html :: (ToPandoc a) => a -> String html = writeHtmlString def{ writerWrapText = WrapNone } . toPandoc {- "my test" =: X =?> Y is shorthand for test html "my test" $ X =?> Y which is in turn shorthand for test html "my test" (X,Y) -} infix 4 =: (=:) :: (ToString a, ToPandoc a) => String -> (a, String) -> Test (=:) = test html tests :: [Test] tests = [ testGroup "inline code" [ "basic" =: code "@&" =?> "@&" , "haskell" =: codeWith ("",["haskell"],[]) ">>=" =?> ">>=" , "nolanguage" =: codeWith ("",["nolanguage"],[]) ">>=" =?> ">>=" ] , testGroup "images" [ "alt with formatting" =: image "/url" "title" ("my " <> emph "image") =?> "\"my" ] ] pandoc-1.19.2.4/tests/Tests/Writers/Markdown.hs0000644000000000000000000002140213155240142017415 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} module Tests.Writers.Markdown (tests) where import Test.Framework import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Text.Pandoc.Arbitrary() markdown :: (ToPandoc a) => a -> String markdown = writeMarkdown def . toPandoc markdownWithOpts :: (ToPandoc a) => WriterOptions -> a -> String markdownWithOpts opts x = writeMarkdown opts $ toPandoc x {- "my test" =: X =?> Y is shorthand for test markdown "my test" $ X =?> Y which is in turn shorthand for test markdown "my test" (X,Y) -} infix 4 =: (=:) :: (ToString a, ToPandoc a) => String -> (a, String) -> Test (=:) = test markdown tests :: [Test] tests = [ "indented code after list" =: (orderedList [ para "one" <> para "two" ] <> codeBlock "test") =?> "1. one\n\n two\n\n\n\n test" , "list with tight sublist" =: bulletList [ plain "foo" <> bulletList [ plain "bar" ], plain "baz" ] =?> "- foo\n - bar\n- baz\n" ] ++ [noteTests] ++ [shortcutLinkRefsTests] {- Testing with the following text: First Header ============ This is a footnote.[^1] And this is a [link](https://www.google.com). > A note inside a block quote.[^2] > > A second paragraph. Second Header ============= Some more text. [^1]: Down here. [^2]: The second note. -} noteTestDoc :: Blocks noteTestDoc = header 1 "First Header" <> para ("This is a footnote." <> note (para "Down here.") <> " And this is a " <> link "https://www.google.com" "" "link" <> ".") <> blockQuote (para ("A note inside a block quote." <> note (para "The second note.")) <> para ("A second paragraph.")) <> header 1 "Second Header" <> para "Some more text." noteTests :: Test noteTests = testGroup "note and reference location" [ test (markdownWithOpts def) "footnotes at the end of a document" $ noteTestDoc =?> (unlines $ [ "First Header" , "============" , "" , "This is a footnote.[^1] And this is a [link](https://www.google.com)." , "" , "> A note inside a block quote.[^2]" , ">" , "> A second paragraph." , "" , "Second Header" , "=============" , "" , "Some more text." , "" , "[^1]: Down here." , "" , "[^2]: The second note." ]) , test (markdownWithOpts def{writerReferenceLocation=EndOfBlock}) "footnotes at the end of blocks" $ noteTestDoc =?> (unlines $ [ "First Header" , "============" , "" , "This is a footnote.[^1] And this is a [link](https://www.google.com)." , "" , "[^1]: Down here." , "" , "> A note inside a block quote.[^2]" , ">" , "> A second paragraph." , "" , "[^2]: The second note." , "" , "Second Header" , "=============" , "" , "Some more text." ]) , test (markdownWithOpts def{writerReferenceLocation=EndOfBlock, writerReferenceLinks=True}) "footnotes and reference links at the end of blocks" $ noteTestDoc =?> (unlines $ [ "First Header" , "============" , "" , "This is a footnote.[^1] And this is a [link]." , "" , "[^1]: Down here." , "" , " [link]: https://www.google.com" , "" , "> A note inside a block quote.[^2]" , ">" , "> A second paragraph." , "" , "[^2]: The second note." , "" , "Second Header" , "=============" , "" , "Some more text." ]) , test (markdownWithOpts def{writerReferenceLocation=EndOfSection}) "footnotes at the end of section" $ noteTestDoc =?> (unlines $ [ "First Header" , "============" , "" , "This is a footnote.[^1] And this is a [link](https://www.google.com)." , "" , "> A note inside a block quote.[^2]" , ">" , "> A second paragraph." , "" , "[^1]: Down here." , "" , "[^2]: The second note." , "" , "Second Header" , "=============" , "" , "Some more text." ]) ] shortcutLinkRefsTests :: Test shortcutLinkRefsTests = let infix 4 =: (=:) :: (ToString a, ToPandoc a) => String -> (a, String) -> Test (=:) = test (writeMarkdown (def {writerReferenceLinks = True}) . toPandoc) in testGroup "Shortcut reference links" [ "Simple link (shortcutable)" =: (para (link "/url" "title" "foo")) =?> "[foo]\n\n [foo]: /url \"title\"" , "Followed by another link (unshortcutable)" =: (para ((link "/url1" "title1" "first") <> (link "/url2" "title2" "second"))) =?> unlines [ "[first][][second]" , "" , " [first]: /url1 \"title1\"" , " [second]: /url2 \"title2\"" ] , "Followed by space and another link (unshortcutable)" =: (para ((link "/url1" "title1" "first") <> " " <> (link "/url2" "title2" "second"))) =?> unlines [ "[first][] [second]" , "" , " [first]: /url1 \"title1\"" , " [second]: /url2 \"title2\"" ] , "Reference link is used multiple times (unshortcutable)" =: (para ((link "/url1" "" "foo") <> (link "/url2" "" "foo") <> (link "/url3" "" "foo"))) =?> unlines [ "[foo][][foo][1][foo][2]" , "" , " [foo]: /url1" , " [1]: /url2" , " [2]: /url3" ] , "Reference link is used multiple times (unshortcutable)" =: (para ((link "/url1" "" "foo") <> " " <> (link "/url2" "" "foo") <> " " <> (link "/url3" "" "foo"))) =?> unlines [ "[foo][] [foo][1] [foo][2]" , "" , " [foo]: /url1" , " [1]: /url2" , " [2]: /url3" ] , "Reference link is followed by text in brackets" =: (para ((link "/url" "" "link") <> "[text in brackets]")) =?> unlines [ "[link][]\\[text in brackets\\]" , "" , " [link]: /url" ] , "Reference link is followed by space and text in brackets" =: (para ((link "/url" "" "link") <> " [text in brackets]")) =?> unlines [ "[link][] \\[text in brackets\\]" , "" , " [link]: /url" ] , "Reference link is followed by RawInline" =: (para ((link "/url" "" "link") <> rawInline "markdown" "[rawText]")) =?> unlines [ "[link][][rawText]" , "" , " [link]: /url" ] , "Reference link is followed by space and RawInline" =: (para ((link "/url" "" "link") <> space <> rawInline "markdown" "[rawText]")) =?> unlines [ "[link][] [rawText]" , "" , " [link]: /url" ] , "Reference link is followed by RawInline with space" =: (para ((link "/url" "" "link") <> rawInline "markdown" " [rawText]")) =?> unlines [ "[link][] [rawText]" , "" , " [link]: /url" ] , "Reference link is followed by citation" =: (para ((link "/url" "" "link") <> cite [Citation "author" [] [] NormalCitation 0 0] (str "[@author]"))) =?> unlines [ "[link][][@author]" , "" , " [link]: /url" ] , "Reference link is followed by space and citation" =: (para ((link "/url" "" "link") <> space <> cite [Citation "author" [] [] NormalCitation 0 0] (str "[@author]"))) =?> unlines [ "[link][] [@author]" , "" , " [link]: /url" ] ] pandoc-1.19.2.4/tests/Tests/Writers/Plain.hs0000644000000000000000000000071313155240142016700 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Tests.Writers.Plain (tests) where import Test.Framework import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Text.Pandoc.Arbitrary() infix 4 =: (=:) :: (ToString a, ToPandoc a) => String -> (a, String) -> Test (=:) = test (writePlain def . toPandoc) tests :: [Test] tests = [ "strongly emphasized text to uppercase" =: strong "Straße" =?> "STRASSE" ] pandoc-1.19.2.4/tests/Tests/Writers/AsciiDoc.hs0000644000000000000000000000432313155240142017314 0ustar0000000000000000module Tests.Writers.AsciiDoc (tests) where import Test.Framework import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Text.Pandoc.Arbitrary() asciidoc :: (ToPandoc a) => a -> String asciidoc = writeAsciiDoc def{ writerWrapText = WrapNone } . toPandoc tests :: [Test] tests = [ testGroup "emphasis" [ test asciidoc "emph word before" $ para (text "foo" <> emph (text "bar")) =?> "foo__bar__" , test asciidoc "emph word after" $ para (emph (text "foo") <> text "bar") =?> "__foo__bar" , test asciidoc "emph quoted" $ para (doubleQuoted (emph (text "foo"))) =?> "``__foo__''" , test asciidoc "strong word before" $ para (text "foo" <> strong (text "bar")) =?> "foo**bar**" , test asciidoc "strong word after" $ para (strong (text "foo") <> text "bar") =?> "**foo**bar" , test asciidoc "strong quoted" $ para (singleQuoted (strong (text "foo"))) =?> "`**foo**'" ] , testGroup "tables" [ test asciidoc "empty cells" $ simpleTable [] [[mempty],[mempty]] =?> unlines [ "[cols=\"\",]" , "|====" , "|" , "|" , "|====" ] , test asciidoc "multiblock cells" $ simpleTable [] [[para (text "Para 1") <> para (text "Para 2")]] =?> unlines [ "[cols=\"\",]" , "|=====" , "a|" , "Para 1" , "" , "Para 2" , "" , "|=====" ] ] ] pandoc-1.19.2.4/tests/Tests/Writers/LaTeX.hs0000644000000000000000000001671613155240142016624 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Tests.Writers.LaTeX (tests) where import Test.Framework import Tests.Helpers import Text.Pandoc import Text.Pandoc.Arbitrary () import Text.Pandoc.Builder latex :: (ToPandoc a) => a -> String latex = latexWithOpts def{ writerHighlight = True } latexListing :: (ToPandoc a) => a -> String latexListing = latexWithOpts def{ writerListings = True } latexWithOpts :: (ToPandoc a) => WriterOptions -> a -> String latexWithOpts opts = writeLaTeX opts . toPandoc {- "my test" =: X =?> Y is shorthand for test latex "my test" $ X =?> Y which is in turn shorthand for test latex "my test" (X,Y) -} infix 4 =: (=:) :: (ToString a, ToPandoc a) => String -> (a, String) -> Test (=:) = test latex tests :: [Test] tests = [ testGroup "code blocks" [ "in footnotes" =: note (para "hi" <> codeBlock "hi") =?> "\\footnote{hi\n\n\\begin{Verbatim}\nhi\n\\end{Verbatim}\n}" , test latexListing "identifier" $ codeBlockWith ("id",[],[]) "hi" =?> ("\\begin{lstlisting}[label=id]\nhi\n\\end{lstlisting}" :: String) , test latexListing "no identifier" $ codeBlock "hi" =?> ("\\begin{lstlisting}\nhi\n\\end{lstlisting}" :: String) ] , testGroup "definition lists" [ "with internal link" =: definitionList [(link "#go" "" (str "testing"), [plain (text "hi there")])] =?> "\\begin{description}\n\\tightlist\n\\item[{\\protect\\hyperlink{go}{testing}}]\nhi there\n\\end{description}" ] , testGroup "math" [ "escape |" =: para (math "\\sigma|_{\\{x\\}}") =?> "\\(\\sigma|_{\\{x\\}}\\)" ] , testGroup "headers" [ "unnumbered header" =: headerWith ("foo",["unnumbered"],[]) 1 (text "Header 1" <> note (plain $ text "note")) =?> "\\section*{\\texorpdfstring{Header 1\\footnote{note}}{Header 1}}\\label{foo}\n\\addcontentsline{toc}{section}{Header 1}\n" , "in list item" =: bulletList [header 2 (text "foo")] =?> "\\begin{itemize}\n\\item ~\n \\subsection{foo}\n\\end{itemize}" , "in definition list item" =: definitionList [(text "foo", [header 2 (text "bar"), para $ text "baz"])] =?> "\\begin{description}\n\\item[foo] ~ \n\\subsection{bar}\n\nbaz\n\\end{description}" , "containing image" =: header 1 (image "imgs/foo.jpg" "" (text "Alt text")) =?> "\\section{\\texorpdfstring{\\protect\\includegraphics{imgs/foo.jpg}}{Alt text}}" ] , testGroup "inline code" [ "struck out and highlighted" =: strikeout (codeWith ("",["haskell"],[]) "foo" <> space <> str "bar") =?> "\\sout{\\mbox{\\VERB|\\NormalTok{foo}|} bar}" , "struck out and not highlighted" =: strikeout (code "foo" <> space <> str "bar") =?> "\\sout{\\texttt{foo} bar}" , "single quotes" =: code "dog's" =?> "\\texttt{dog\\textquotesingle{}s}" , "backtick" =: code "`nu?`" =?> "\\texttt{\\textasciigrave{}nu?\\textasciigrave{}}" ] , testGroup "writer options" [ testGroup "top-level division" $ let headers = header 1 (text "header1") <> header 2 (text "header2") <> header 3 (text "header3") latexTopLevelDiv :: (ToPandoc a) => TopLevelDivision -> a -> String latexTopLevelDiv division = latexWithOpts def{ writerTopLevelDivision = division } beamerTopLevelDiv :: (ToPandoc a) => TopLevelDivision -> a -> String beamerTopLevelDiv division = latexWithOpts def { writerTopLevelDivision = division , writerBeamer = True } in [ test (latexTopLevelDiv TopLevelSection) "sections as top-level" $ headers =?> unlines [ "\\section{header1}\n" , "\\subsection{header2}\n" , "\\subsubsection{header3}" ] , test (latexTopLevelDiv TopLevelChapter) "chapters as top-level" $ headers =?> unlines [ "\\chapter{header1}\n" , "\\section{header2}\n" , "\\subsection{header3}" ] , test (latexTopLevelDiv TopLevelPart) "parts as top-level" $ headers =?> unlines [ "\\part{header1}\n" , "\\chapter{header2}\n" , "\\section{header3}" ] , test (latexTopLevelDiv TopLevelDefault) "default top-level" $ headers =?> unlines [ "\\section{header1}\n" , "\\subsection{header2}\n" , "\\subsubsection{header3}" ] , test (beamerTopLevelDiv TopLevelSection) "sections as top-level in beamer" $ headers =?> unlines [ "\\section{header1}\n" , "\\subsection{header2}\n" , "\\subsubsection{header3}" ] , test (beamerTopLevelDiv TopLevelChapter) "chapters are as part in beamer" $ headers =?> unlines [ "\\part{header1}\n" , "\\section{header2}\n" , "\\subsection{header3}" ] , test (beamerTopLevelDiv TopLevelPart) "parts as top-level in beamer" $ headers =?> unlines [ "\\part{header1}\n" , "\\section{header2}\n" , "\\subsection{header3}" ] , test (beamerTopLevelDiv TopLevelDefault) "default top-level in beamer" $ headers =?> unlines [ "\\section{header1}\n" , "\\subsection{header2}\n" , "\\subsubsection{header3}" ] , test (latexTopLevelDiv TopLevelPart) "part top-level, section not in toc" $ ( headerWith ("", ["unnumbered"], []) 1 (text "header1") <> headerWith ("", ["unnumbered"], []) 2 (text "header2") <> headerWith ("", ["unnumbered"], []) 3 (text "header3") <> headerWith ("", ["unnumbered"], []) 4 (text "header4") <> headerWith ("", ["unnumbered"], []) 5 (text "header5") <> headerWith ("", ["unnumbered"], []) 6 (text "header6")) =?> unlines [ "\\part*{header1}" , "\\addcontentsline{toc}{part}{header1}\n" , "\\chapter*{header2}" , "\\addcontentsline{toc}{chapter}{header2}\n" , "\\section*{header3}" , "\\addcontentsline{toc}{section}{header3}\n" , "\\subsection*{header4}" , "\\addcontentsline{toc}{subsection}{header4}\n" , "\\subsubsection*{header5}" , "\\addcontentsline{toc}{subsubsection}{header5}\n" , "\\paragraph{header6}" , "\\addcontentsline{toc}{paragraph}{header6}" ] ] ] ] pandoc-1.19.2.4/tests/Tests/Writers/Docx.hs0000644000000000000000000001241313155240142016532 0ustar0000000000000000module Tests.Writers.Docx (tests) where import Text.Pandoc.Options import Text.Pandoc.Readers.Native import Text.Pandoc.Definition import Tests.Helpers import Test.Framework import Text.Pandoc.Readers.Docx import Text.Pandoc.Writers.Docx import Text.Pandoc.Error import System.FilePath (()) type Options = (WriterOptions, ReaderOptions) compareOutput :: Options -> FilePath -> FilePath -> IO (Pandoc, Pandoc) compareOutput opts nativeFileIn nativeFileOut = do nf <- Prelude.readFile nativeFileIn nf' <- Prelude.readFile nativeFileOut 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') testCompareWithOptsIO :: Options -> String -> FilePath -> FilePath -> IO Test testCompareWithOptsIO opts name nativeFileIn nativeFileOut = do (dp, np) <- compareOutput opts nativeFileIn nativeFileOut return $ test id name (dp, np) testCompareWithOpts :: Options -> String -> FilePath -> FilePath -> Test testCompareWithOpts opts name nativeFileIn nativeFileOut = buildTest $ testCompareWithOptsIO opts name nativeFileIn nativeFileOut roundTripCompareWithOpts :: Options -> String -> FilePath -> Test roundTripCompareWithOpts opts name nativeFile = testCompareWithOpts opts name nativeFile nativeFile -- testCompare :: String -> FilePath -> FilePath -> Test -- testCompare = testCompareWithOpts def roundTripCompare :: String -> FilePath -> Test roundTripCompare = roundTripCompareWithOpts def tests :: [Test] tests = [ testGroup "inlines" [ roundTripCompare "font formatting" "docx/inline_formatting_writer.native" , roundTripCompare "font formatting with character styles" "docx/char_styles.native" , roundTripCompare "hyperlinks" "docx/links_writer.native" , roundTripCompare "inline image" "docx/image_no_embed_writer.native" , roundTripCompare "inline image in links" "docx/inline_images_writer.native" , roundTripCompare "handling unicode input" "docx/unicode.native" , roundTripCompare "literal tabs" "docx/tabs.native" , roundTripCompare "normalizing inlines" "docx/normalize.native" , roundTripCompare "normalizing inlines deep inside blocks" "docx/deep_normalize.native" , roundTripCompare "move trailing spaces outside of formatting" "docx/trailing_spaces_in_formatting.native" , roundTripCompare "inline code (with VerbatimChar style)" "docx/inline_code.native" , roundTripCompare "inline code in subscript and superscript" "docx/verbatim_subsuper.native" ] , testGroup "blocks" [ roundTripCompare "headers" "docx/headers.native" , roundTripCompare "headers already having auto identifiers" "docx/already_auto_ident.native" , roundTripCompare "numbered headers automatically made into list" "docx/numbered_header.native" , roundTripCompare "i18n blocks (headers and blockquotes)" "docx/i18n_blocks.native" -- Continuation does not survive round-trip , roundTripCompare "lists" "docx/lists_writer.native" , roundTripCompare "definition lists" "docx/definition_list.native" , roundTripCompare "custom defined lists in styles" "docx/german_styled_lists.native" , roundTripCompare "footnotes and endnotes" "docx/notes.native" , roundTripCompare "blockquotes (parsing indent as blockquote)" "docx/block_quotes_parse_indent.native" , roundTripCompare "hanging indents" "docx/hanging_indent.native" -- tables headers do not survive round-trip, should look into that , roundTripCompare "tables" "docx/tables.native" , roundTripCompare "tables with lists in cells" "docx/table_with_list_cell.native" , roundTripCompare "code block" "docx/codeblock.native" , roundTripCompare "dropcap paragraphs" "docx/drop_cap.native" ] , testGroup "metadata" [ roundTripCompareWithOpts (def,def{readerStandalone=True}) "metadata fields" "docx/metadata.native" , roundTripCompareWithOpts (def,def{readerStandalone=True}) "stop recording metadata with normal text" "docx/metadata_after_normal.native" ] , testGroup "customized styles" [ testCompareWithOpts ( def{writerReferenceDocx=Just "docx/custom-style-reference.docx"} , def) "simple customized blocks and inlines" "docx/custom-style-roundtrip-start.native" "docx/custom-style-roundtrip-end.native" ] ] pandoc-1.19.2.4/tests/Tests/Writers/RST.hs0000644000000000000000000000651313155240142016311 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Tests.Writers.RST (tests) where import Test.Framework import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Text.Pandoc.Arbitrary() infix 4 =: (=:) :: (ToString a, ToPandoc a) => String -> (a, String) -> Test (=:) = test (writeRST def{ writerHighlight = True } . toPandoc) tests :: [Test] tests = [ testGroup "rubrics" [ "in list item" =: bulletList [header 2 (text "foo")] =?> "- .. rubric:: foo" , "in definition list item" =: definitionList [(text "foo", [header 2 (text "bar"), para $ text "baz"])] =?> unlines [ "foo" , " .. rubric:: bar" , "" , " baz"] , "in block quote" =: blockQuote (header 1 (text "bar")) =?> " .. rubric:: bar" , "with id" =: blockQuote (headerWith ("foo",[],[]) 1 (text "bar")) =?> unlines [ " .. rubric:: bar" , " :name: foo"] , "with id class" =: blockQuote (headerWith ("foo",["baz"],[]) 1 (text "bar")) =?> unlines [ " .. rubric:: bar" , " :name: foo" , " :class: baz"] ] , testGroup "headings" [ "normal heading" =: header 1 (text "foo") =?> unlines [ "foo" , "==="] -- note: heading normalization is only done in standalone mode , test (writeRST def{ writerTemplate = Just "$body$\n" } . toPandoc) "heading levels" $ header 1 (text "Header 1") <> header 3 (text "Header 2") <> header 2 (text "Header 2") <> header 1 (text "Header 1") <> header 4 (text "Header 2") <> header 5 (text "Header 3") <> header 3 (text "Header 2") =?> unlines [ "Header 1" , "========" , "" , "Header 2" , "--------" , "" , "Header 2" , "--------" , "" , "Header 1" , "========" , "" , "Header 2" , "--------" , "" , "Header 3" , "~~~~~~~~" , "" , "Header 2" , "--------"] , test (writeRST def{ writerTemplate = Just "$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" , "--------"] ] ] pandoc-1.19.2.4/tests/Tests/Writers/TEI.hs0000644000000000000000000000242713155240142016262 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Tests.Writers.TEI (tests) where import Test.Framework import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Text.Pandoc.Arbitrary() {- "my test" =: X =?> Y is shorthand for test html "my test" $ X =?> Y which is in turn shorthand for test html "my test" (X,Y) -} infix 4 =: (=:) :: (ToString a, ToPandoc a) => String -> (a, String) -> Test (=:) = test (writeTEI def . toPandoc) tests :: [Test] tests = [ testGroup "block elements" ["para" =: para "Lorem ipsum cetera." =?> "

      Lorem ipsum cetera.

      " ] , testGroup "inlines" [ "Emphasis" =: emph ("emphasized") =?> "

      emphasized

      " ,"SingleQuoted" =: singleQuoted (text "quoted material") =?> "

      quoted material

      " ,"DoubleQuoted" =: doubleQuoted (text "quoted material") =?> "

      quoted material

      " ,"NestedQuoted" =: doubleQuoted (singleQuoted (text "quoted material")) =?> "

      quoted material

      " ] ] pandoc-1.19.2.4/benchmark/benchmark-pandoc.hs0000644000000000000000000000412113155240142017055 0ustar0000000000000000{- Copyright (C) 2012-2014 John MacFarlane 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 -} import Text.Pandoc import Criterion.Main import Criterion.Types (Config(..)) import Data.Maybe (mapMaybe) import Debug.Trace (trace) readerBench :: Pandoc -> (String, ReaderOptions -> String -> IO (Either PandocError Pandoc)) -> Maybe Benchmark readerBench doc (name, reader) = case lookup name writers of Just (PureStringWriter writer) -> let inp = writer def{ writerWrapText = WrapAuto} doc in return $ bench (name ++ " reader") $ nfIO $ (fmap handleError <$> reader def{ readerSmart = True }) inp _ -> trace ("\nCould not find writer for " ++ name ++ "\n") Nothing writerBench :: Pandoc -> (String, WriterOptions -> Pandoc -> String) -> Benchmark writerBench doc (name, writer) = bench (name ++ " writer") $ nf (writer def{ writerWrapText = WrapAuto }) doc main :: IO () main = do inp <- readFile "tests/testsuite.txt" let opts = def{ readerSmart = True } let doc = handleError $ readMarkdown opts inp let readers' = [(n,r) | (n, StringReader r) <- readers] let readerBs = mapMaybe (readerBench doc) $ filter (\(n,_) -> n /="haddock") readers' let writers' = [(n,w) | (n, PureStringWriter w) <- writers] let writerBs = map (writerBench doc) $ writers' defaultMainWith defaultConfig{ timeLimit = 6.0 } (writerBs ++ readerBs) pandoc-1.19.2.4/data/templates/default.html0000644000000000000000000000305513155256771016640 0ustar0000000000000000 $for(author-meta)$ $endfor$ $if(date-meta)$ $endif$ $if(keywords)$ $endif$ $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ $if(quotes)$ $endif$ $if(highlighting-css)$ $endif$ $for(css)$ $endfor$ $if(math)$ $math$ $endif$ $for(header-includes)$ $header-includes$ $endfor$ $for(include-before)$ $include-before$ $endfor$ $if(title)$

      $title$

      $if(subtitle)$

      $subtitle$

      $endif$ $for(author)$

      $author$

      $endfor$ $if(date)$

      $date$

      $endif$
      $endif$ $if(toc)$
      $toc$
      $endif$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.html50000644000000000000000000000273613155256771016732 0ustar0000000000000000 $for(author-meta)$ $endfor$ $if(date-meta)$ $endif$ $if(keywords)$ $endif$ $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ $if(quotes)$ $endif$ $if(highlighting-css)$ $endif$ $for(css)$ $endfor$ $if(math)$ $math$ $endif$ $for(header-includes)$ $header-includes$ $endfor$ $for(include-before)$ $include-before$ $endfor$ $if(title)$

      $title$

      $if(subtitle)$

      $subtitle$

      $endif$ $for(author)$

      $author$

      $endfor$ $if(date)$

      $date$

      $endif$
      $endif$ $if(toc)$ $endif$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.docbook0000644000000000000000000000131713155256771017313 0ustar0000000000000000 $if(mathml)$ $else$ $endif$
      $title$ $if(author)$ $for(author)$ $author$ $endfor$ $endif$ $if(date)$ $date$ $endif$ $for(include-before)$ $include-before$ $endfor$ $body$ $for(include-after)$ $include-after$ $endfor$
      pandoc-1.19.2.4/data/templates/default.docbook50000644000000000000000000000107113155256771017375 0ustar0000000000000000
      $title$ $if(author)$ $for(author)$ $author$ $endfor$ $endif$ $if(date)$ $date$ $endif$ $for(include-before)$ $include-before$ $endfor$ $body$ $for(include-after)$ $include-after$ $endfor$
      pandoc-1.19.2.4/data/templates/default.tei0000644000000000000000000000134513155256771016455 0ustar0000000000000000 $if(title)$ $title$ $endif$ $for(author)$ $author$ $endfor$

      $if(publicationStmt)$$publicationStmt$$endif$

      $if(license)$ $license$ $endif$
      $if(sourceDesc)$ $sourceDesc$ $else$

      Produced by pandoc.

      $endif$
      $for(include-before)$ $include-before$ $endfor$ $body$ $for(include-after)$ $include-after$ $endfor$
      pandoc-1.19.2.4/data/templates/default.beamer0000644000000000000000000001647313155256771017137 0ustar0000000000000000\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(handout)$handout,$endif$$if(beamer)$ignorenonframetext,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} \setbeamertemplate{caption}[numbered] \setbeamertemplate{caption label separator}{: } \setbeamercolor{caption name}{fg=normal text.fg} \beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$ $if(fontfamily)$ \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} $else$ \usepackage{lmodern} $endif$ \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fixltx2e} % provides \textsubscript \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} \usepackage[utf8]{inputenc} $if(euro)$ \usepackage{eurosym} $endif$ \else % if luatex or xelatex \ifxetex \usepackage{mathspec} \else \usepackage{fontspec} \fi \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} $for(fontfamilies)$ \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$} $endfor$ $if(euro)$ \newcommand{\euro}{€} $endif$ $if(mainfont)$ \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} $endif$ $if(sansfont)$ \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} $endif$ $if(monofont)$ \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$} $endif$ $if(mathfont)$ \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} $endif$ $if(CJKmainfont)$ \usepackage{xeCJK} \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} $endif$ \fi $if(theme)$ \usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} $endif$ $if(colortheme)$ \usecolortheme{$colortheme$} $endif$ $if(fonttheme)$ \usefonttheme{$fonttheme$} $endif$ $if(mainfont)$ \usefonttheme{serif} % use mainfont rather than sansfont for slide text $endif$ $if(innertheme)$ \useinnertheme{$innertheme$} $endif$ $if(outertheme)$ \useoutertheme{$outertheme$} $endif$ % 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 }{} $if(lang)$ \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} $if(babel-newcommands)$ $babel-newcommands$ $endif$ \else \usepackage{polyglossia} \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} $for(polyglossia-otherlangs)$ \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} $endfor$ \fi $endif$ \newif\ifbibliography $if(natbib)$ \usepackage{natbib} \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} $endif$ $if(biblatex)$ \usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} $for(bibliography)$ \addbibresource{$bibliography$} $endfor$ $endif$ $if(verbatim-in-note)$ \usepackage{fancyvrb} $endif$ \hypersetup{ $if(title-meta)$ pdftitle={$title-meta$}, $endif$ $if(author-meta)$ pdfauthor={$author-meta$}, $endif$ $if(keywords)$ pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, $endif$ $if(colorlinks)$ colorlinks=true, linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, $else$ pdfborder={0 0 0}, $endif$ breaklinks=true} \urlstyle{same} % don't use monospace font for urls $if(verbatim-in-note)$ \VerbatimFootnotes % allows verbatim text in footnotes $endif$ $if(listings)$ \usepackage{listings} $endif$ $if(lhs)$ \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} $endif$ $if(highlighting-macros)$ $highlighting-macros$ $endif$ $if(tables)$ \usepackage{longtable,booktabs} \usepackage{caption} % These lines are needed to make table captions work with longtable: \makeatletter \def\fnum@table{\tablename~\thetable} \makeatother $endif$ $if(graphics)$ \usepackage{graphicx,grffile} \makeatletter \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} \def\maxheight{\ifdim\Gin@nat@height>\textheight0.8\textheight\else\Gin@nat@height\fi} \makeatother % Scale images if necessary, so that they will not overflow the page % margins by default, and it is still possible to overwrite the defaults % using explicit options in \includegraphics[width, height, ...]{} \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} $endif$ % Prevent slide breaks in the middle of a paragraph: \widowpenalties 1 10000 \raggedbottom $if(section-titles)$ \AtBeginPart{ \let\insertpartnumber\relax \let\partname\relax \frame{\partpage} } \AtBeginSection{ \ifbibliography \else \let\insertsectionnumber\relax \let\sectionname\relax \frame{\sectionpage} \fi } \AtBeginSubsection{ \let\insertsubsectionnumber\relax \let\subsectionname\relax \frame{\subsectionpage} } $endif$ $if(links-as-notes)$ % Make links footnotes instead of hotlinks: \renewcommand{\href}[2]{#2\footnote{\url{#1}}} $endif$ $if(strikeout)$ \usepackage[normalem]{ulem} % avoid problems with \sout in headers with hyperref: \pdfstringdefDisableCommands{\renewcommand{\sout}{}} $endif$ \setlength{\parindent}{0pt} \setlength{\parskip}{6pt plus 2pt minus 1pt} \setlength{\emergencystretch}{3em} % prevent overfull lines \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} $if(numbersections)$ \setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} $else$ \setcounter{secnumdepth}{0} $endif$ $if(dir)$ \ifxetex % load bidi as late as possible as it modifies e.g. graphicx $if(latex-dir-rtl)$ \usepackage[RTLdocument]{bidi} $else$ \usepackage{bidi} $endif$ \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 $endif$ $for(header-includes)$ $header-includes$ $endfor$ $if(title)$ \title{$title$} $endif$ $if(subtitle)$ \subtitle{$subtitle$} $endif$ $if(author)$ \author{$for(author)$$author$$sep$ \and $endfor$} $endif$ $if(institute)$ \institute{$for(institute)$$institute$$sep$ \and $endfor$} $endif$ \date{$date$} \begin{document} $if(title)$ \frame{\titlepage} $endif$ $for(include-before)$ $include-before$ $endfor$ $if(toc)$ \begin{frame} \tableofcontents[hideallsubsections] \end{frame} $endif$ $body$ $if(natbib)$ $if(bibliography)$ $if(biblio-title)$ $if(book-class)$ \renewcommand\bibname{$biblio-title$} $else$ \renewcommand\refname{$biblio-title$} $endif$ $endif$ \begin{frame}[allowframebreaks]{$biblio-title$} \bibliographytrue \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} \end{frame} $endif$ $endif$ $if(biblatex)$ \begin{frame}[allowframebreaks]{$biblio-title$} \bibliographytrue \printbibliography[heading=none] \end{frame} $endif$ $for(include-after)$ $include-after$ $endfor$ \end{document} pandoc-1.19.2.4/data/templates/default.opendocument0000644000000000000000000000406113155256771020372 0ustar0000000000000000 $automatic-styles$ $for(header-includes)$ $header-includes$ $endfor$ $if(title)$ $title$ $endif$ $for(author)$ $author$ $endfor$ $if(date)$ $date$ $endif$ $for(include-before)$ $include-before$ $endfor$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.icml0000644000000000000000000000347313155256771016624 0ustar0000000000000000 $charStyles$ LeftAlign . 10 $parStyles$ $body$ $hyperlinks$ pandoc-1.19.2.4/data/templates/default.opml0000644000000000000000000000036413155256771016643 0ustar0000000000000000 $title$ $date$ $for(author)$$author$$sep$; $endfor$ $body$ pandoc-1.19.2.4/data/templates/default.latex0000644000000000000000000001657413155256771017023 0ustar0000000000000000\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} $if(beamerarticle)$ \usepackage{beamerarticle} % needs to be loaded first $endif$ $if(fontfamily)$ \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} $else$ \usepackage{lmodern} $endif$ $if(linestretch)$ \usepackage{setspace} \setstretch{$linestretch$} $endif$ \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fixltx2e} % provides \textsubscript \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} \usepackage[utf8]{inputenc} $if(euro)$ \usepackage{eurosym} $endif$ \else % if luatex or xelatex \ifxetex \usepackage{mathspec} \else \usepackage{fontspec} \fi \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} $for(fontfamilies)$ \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$} $endfor$ $if(euro)$ \newcommand{\euro}{€} $endif$ $if(mainfont)$ \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} $endif$ $if(sansfont)$ \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} $endif$ $if(monofont)$ \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$} $endif$ $if(mathfont)$ \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} $endif$ $if(CJKmainfont)$ \usepackage{xeCJK} \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} $endif$ \fi % use upquote if available, for straight quotes in verbatim environments \IfFileExists{upquote.sty}{\usepackage{upquote}}{} % use microtype if available \IfFileExists{microtype.sty}{% \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} \PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref $if(verbatim-in-note)$ \usepackage{fancyvrb} $endif$ \usepackage[unicode=true]{hyperref} $if(colorlinks)$ \PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref $endif$ \hypersetup{ $if(title-meta)$ pdftitle={$title-meta$}, $endif$ $if(author-meta)$ pdfauthor={$author-meta$}, $endif$ $if(keywords)$ pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, $endif$ $if(colorlinks)$ colorlinks=true, linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, $else$ pdfborder={0 0 0}, $endif$ breaklinks=true} \urlstyle{same} % don't use monospace font for urls $if(verbatim-in-note)$ \VerbatimFootnotes % allows verbatim text in footnotes $endif$ $if(geometry)$ \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} $endif$ $if(lang)$ \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} $if(babel-newcommands)$ $babel-newcommands$ $endif$ \else \usepackage{polyglossia} \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} $for(polyglossia-otherlangs)$ \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} $endfor$ \fi $endif$ $if(natbib)$ \usepackage{natbib} \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} $endif$ $if(biblatex)$ \usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} $for(bibliography)$ \addbibresource{$bibliography$} $endfor$ $endif$ $if(listings)$ \usepackage{listings} $endif$ $if(lhs)$ \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} $endif$ $if(highlighting-macros)$ $highlighting-macros$ $endif$ $if(tables)$ \usepackage{longtable,booktabs} % Fix footnotes in tables (requires footnote package) \IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{long table}}{} $endif$ $if(graphics)$ \usepackage{graphicx,grffile} \makeatletter \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} \makeatother % Scale images if necessary, so that they will not overflow the page % margins by default, and it is still possible to overwrite the defaults % using explicit options in \includegraphics[width, height, ...]{} \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} $endif$ $if(links-as-notes)$ % Make links footnotes instead of hotlinks: \renewcommand{\href}[2]{#2\footnote{\url{#1}}} $endif$ $if(strikeout)$ \usepackage[normalem]{ulem} % avoid problems with \sout in headers with hyperref: \pdfstringdefDisableCommands{\renewcommand{\sout}{}} $endif$ $if(indent)$ $else$ \IfFileExists{parskip.sty}{% \usepackage{parskip} }{% else \setlength{\parindent}{0pt} \setlength{\parskip}{6pt plus 2pt minus 1pt} } $endif$ \setlength{\emergencystretch}{3em} % prevent overfull lines \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} $if(numbersections)$ \setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} $else$ \setcounter{secnumdepth}{0} $endif$ $if(subparagraph)$ $else$ % 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 $endif$ $if(dir)$ \ifxetex % load bidi as late as possible as it modifies e.g. graphicx $if(latex-dir-rtl)$ \usepackage[RTLdocument]{bidi} $else$ \usepackage{bidi} $endif$ \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 $endif$ % set default figure placement to htbp \makeatletter \def\fps@figure{htbp} \makeatother $for(header-includes)$ $header-includes$ $endfor$ $if(title)$ \title{$title$$if(thanks)$\thanks{$thanks$}$endif$} $endif$ $if(subtitle)$ \providecommand{\subtitle}[1]{} \subtitle{$subtitle$} $endif$ $if(author)$ \author{$for(author)$$author$$sep$ \and $endfor$} $endif$ $if(institute)$ \providecommand{\institute}[1]{} \institute{$for(institute)$$institute$$sep$ \and $endfor$} $endif$ \date{$date$} \begin{document} $if(title)$ \maketitle $endif$ $if(abstract)$ \begin{abstract} $abstract$ \end{abstract} $endif$ $for(include-before)$ $include-before$ $endfor$ $if(toc)$ { $if(colorlinks)$ \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$} $endif$ \setcounter{tocdepth}{$toc-depth$} \tableofcontents } $endif$ $if(lot)$ \listoftables $endif$ $if(lof)$ \listoffigures $endif$ $body$ $if(natbib)$ $if(bibliography)$ $if(biblio-title)$ $if(book-class)$ \renewcommand\bibname{$biblio-title$} $else$ \renewcommand\refname{$biblio-title$} $endif$ $endif$ \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} $endif$ $endif$ $if(biblatex)$ \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ $endif$ $for(include-after)$ $include-after$ $endfor$ \end{document} pandoc-1.19.2.4/data/templates/default.context0000644000000000000000000000717413155256771017366 0ustar0000000000000000$if(context-lang)$ \mainlanguage[$context-lang$] $endif$ $if(context-dir)$ \setupalign[$context-dir$] \setupdirections[bidi=on,method=two] $endif$ % Enable hyperlinks \setupinteraction [state=start, $if(title)$ title={$title$}, $endif$ $if(subtitle)$ subtitle={$subtitle$}, $endif$ $if(author)$ author={$for(author)$$author$$sep$; $endfor$}, $endif$ $if(keywords)$ keyword={$for(keywords)$$keywords$$sep$; $endfor$}, $endif$ style=$linkstyle$, color=$linkcolor$, contrastcolor=$linkcontrastcolor$] % make chapter, section bookmarks visible when opening document \placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section] \setupinteractionscreen[option=bookmark] \setuptagging[state=start] $if(papersize)$ \setuppapersize[$for(papersize)$$papersize$$sep$,$endfor$] $endif$ $if(layout)$ \setuplayout[$for(layout)$$layout$$sep$,$endfor$] $endif$ $if(pagenumbering)$ \setuppagenumbering[$for(pagenumbering)$$pagenumbering$$sep$,$endfor$] $endif$ % use microtypography \definefontfeature[default][default][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes] \definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes] \setupalign[hz,hanging] \setupitaliccorrection[global, always] \setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted \usemodule[simplefonts$if(fontsize)$,$fontsize$$endif$] \setmainfontfallback[DejaVu Serif][range={greekandcoptic, greekextended}, force=yes, rscale=auto] $if(mainfont)$ \setmainfont[$mainfont$] $endif$ $if(sansfont)$ \setsansfont[$sansfont$][rscale=auto] $endif$ $if(monofont)$ \setmonofont[$monofont$][features=none, rscale=auto] $endif$ $if(mathfont)$ \setmathfont[$mathfont$][rscale=auto] $endif$ \setupwhitespace[$if(whitespace)$$whitespace$$else$medium$endif$] $if(indenting)$ \setupindenting[$for(indenting)$$indenting$$sep$,$endfor$] $endif$ $if(interlinespace)$ \setupinterlinespace[$for(interlinespace)$$interlinespace$$sep$,$endfor$] $endif$ \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] $if(headertext)$ \setupheadertexts$for(headertext)$[$headertext$]$endfor$ $endif$ $if(footertext)$ \setupfootertexts$for(footertext)$[$footertext$]$endfor$ $endif$ $if(number-sections)$ $else$ \setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no] $endif$ \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 $for(header-includes)$ $header-includes$ $endfor$ \starttext $if(title)$ \startalignment[middle] {\tfd $title$} $if(subtitle)$ \smallskip {\tfa $subtitle$} $endif$ $if(author)$ \smallskip {\tfa $for(author)$$author$$sep$\crlf $endfor$} $endif$ $if(date)$ \smallskip {\tfa $date$} $endif$ \bigskip \stopalignment $endif$ $if(abstract)$ \midaligned{\it Abstract} \startnarrower[2*middle] $abstract$ \stopnarrower \blank[big] $endif$ $for(include-before)$ $include-before$ $endfor$ $if(toc)$ \completecontent $endif$ $if(lot)$ \completelistoftables $endif$ $if(lof)$ \completelistoffigures $endif$ $body$ $for(include-after)$ $include-after$ $endfor$ \stoptext pandoc-1.19.2.4/data/templates/default.texinfo0000644000000000000000000000137313155256771017351 0ustar0000000000000000\input texinfo @documentencoding UTF-8 $for(header-includes)$ $header-includes$ $endfor$ $if(strikeout)$ @macro textstrikeout{text} ~~\text\~~ @end macro $endif$ $if(subscript)$ @macro textsubscript{text} @iftex @textsubscript{\text\} @end iftex @ifnottex _@{\text\@} @end ifnottex @end macro $endif$ $if(superscript)$ @macro textsuperscript{text} @iftex @textsuperscript{\text\} @end iftex @ifnottex ^@{\text\@} @end ifnottex @end macro $endif$ @ifnottex @paragraphindent 0 @end ifnottex $if(titlepage)$ @titlepage @title $title$ $for(author)$ @author $author$ $endfor$ $if(date)$ $date$ $endif$ @end titlepage $endif$ $for(include-before)$ $include-before$ $endfor$ $if(toc)$ @contents $endif$ $body$ $for(include-after)$ $include-after$ $endfor$ @bye pandoc-1.19.2.4/data/templates/default.man0000644000000000000000000000100013155256771016433 0ustar0000000000000000$if(has-tables)$ .\"t $endif$ $if(pandoc-version)$ .\" Automatically generated by Pandoc $pandoc-version$ .\" $endif$ $if(adjusting)$ .ad $adjusting$ $endif$ .TH "$title$" "$section$" "$date$" "$footer$" "$header$" $if(hyphenate)$ .hy $else$ .nh \" Turn off hyphenation by default. $endif$ $for(header-includes)$ $header-includes$ $endfor$ $for(include-before)$ $include-before$ $endfor$ $body$ $for(include-after)$ $include-after$ $endfor$ $if(author)$ .SH AUTHORS $for(author)$$author$$sep$; $endfor$. $endif$ pandoc-1.19.2.4/data/templates/default.markdown0000644000000000000000000000033213155256771017511 0ustar0000000000000000$if(titleblock)$ $titleblock$ $endif$ $for(header-includes)$ $header-includes$ $endfor$ $for(include-before)$ $include-before$ $endfor$ $if(toc)$ $toc$ $endif$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.commonmark0000644000000000000000000000033213155256771020032 0ustar0000000000000000$if(titleblock)$ $titleblock$ $endif$ $for(header-includes)$ $header-includes$ $endfor$ $for(include-before)$ $include-before$ $endfor$ $if(toc)$ $toc$ $endif$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.rst0000644000000000000000000000076513155256771016511 0ustar0000000000000000$if(title)$ $title$ $endif$ $for(author)$ :Author: $author$ $endfor$ $if(date)$ :Date: $date$ $endif$ $if(author)$ $else$ $if(date)$ $endif$ $endif$ $if(math)$ .. role:: math(raw) :format: html latex .. $endif$ $if(rawtex)$ .. role:: raw-latex(raw) :format: latex .. $endif$ $for(include-before)$ $include-before$ $endfor$ $if(toc)$ .. contents:: :depth: $toc-depth$ .. $endif$ $for(header-includes)$ $header-includes$ $endfor$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.plain0000644000000000000000000000033213155256771016772 0ustar0000000000000000$if(titleblock)$ $titleblock$ $endif$ $for(header-includes)$ $header-includes$ $endfor$ $for(include-before)$ $include-before$ $endfor$ $if(toc)$ $toc$ $endif$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.mediawiki0000644000000000000000000000020213155256771017626 0ustar0000000000000000$for(include-before)$ $include-before$ $endfor$ $if(toc)$ __TOC__ $endif$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.dokuwiki0000644000000000000000000000020213155256771017511 0ustar0000000000000000$for(include-before)$ $include-before$ $endfor$ $if(toc)$ __TOC__ $endif$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.zimwiki0000644000000000000000000000026613155256771017360 0ustar0000000000000000Content-Type: text/x-zim-wiki Wiki-Format: zim 0.4 $for(include-before)$ $include-before$ $endfor$ $if(toc)$ __TOC__ $endif$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.rtf0000644000000000000000000000111213155256771016457 0ustar0000000000000000{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 Courier;}} {\colortbl;\red255\green0\blue0;\red0\green0\blue255;} \widowctrl\hyphauto $for(header-includes)$ $header-includes$ $endfor$ $if(title)$ {\pard \qc \f0 \sa180 \li0 \fi0 \b \fs36 $title$\par} $endif$ $for(author)$ {\pard \qc \f0 \sa180 \li0 \fi0 $author$\par} $endfor$ $if(date)$ {\pard \qc \f0 \sa180 \li0 \fi0 $date$\par} $endif$ $if(spacer)$ {\pard \ql \f0 \sa180 \li0 \fi0 \par} $endif$ $if(toc)$ $toc$ $endif$ $for(include-before)$ $include-before$ $endfor$ $body$ $for(include-after)$ $include-after$ $endfor$ } pandoc-1.19.2.4/data/templates/default.s50000644000000000000000000000475513155256771016233 0ustar0000000000000000 $for(author-meta)$ $endfor$ $if(date-meta)$ $endif$ $if(keywords)$ $endif$ $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ $if(quotes)$ $endif$ $if(highlighting-css)$ $endif$ $for(css)$ $endfor$ $if(math)$ $math$ $endif$ $for(header-includes)$ $header-includes$ $endfor$ $for(include-before)$ $include-before$ $endfor$
      $if(title)$

      $title$

      $if(subtitle)$

      $subtitle$

      $endif$ $if(author)$

      $for(author)$$author$$sep$
      $endfor$

      $endif$ $if(date)$

      $date$

      $endif$
      $endif$ $if(toc)$
      $toc$
      $endif$ $body$ $for(include-after)$ $include-after$ $endfor$
      pandoc-1.19.2.4/data/templates/default.slidy0000644000000000000000000000370013155256771017015 0ustar0000000000000000 $for(author-meta)$ $endfor$ $if(date-meta)$ $endif$ $if(keywords)$ $endif$ $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ $if(quotes)$ $endif$ $if(highlighting-css)$ $endif$ $for(css)$ $endfor$ $if(math)$ $math$ $endif$ $for(header-includes)$ $header-includes$ $endfor$ $if(duration)$ $endif$ $for(include-before)$ $include-before$ $endfor$ $if(title)$

      $title$

      $if(subtitle)$

      $subtitle$

      $endif$ $if(author)$

      $for(author)$$author$$sep$
      $endfor$

      $endif$ $if(date)$

      $date$

      $endif$
      $endif$ $if(toc)$
      $toc$
      $endif$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.slideous0000644000000000000000000000533613155256771017527 0ustar0000000000000000 $for(author-meta)$ $endfor$ $if(date-meta)$ $endif$ $if(keywords)$ $endif$ $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ $if(quotes)$ $endif$ $if(highlighting-css)$ $endif$ $for(css)$ $endfor$ $if(math)$ $math$ $endif$ $for(header-includes)$ $header-includes$ $endfor$ $if(duration)$ $endif$ $for(include-before)$ $include-before$ $endfor$
      of {$$slidecount} ½ {$$title}, {$$author}
      $if(title)$

      $title$

      $if(subtitle)$

      $subtitle$

      $endif$

      $for(author)$$author$$sep$
      $endfor$

      $if(date)$

      $date$

      $endif$
      $endif$ $if(toc)$
      $toc$
      $endif$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.revealjs0000644000000000000000000001630513155256771017511 0ustar0000000000000000 $for(author-meta)$ $endfor$ $if(date-meta)$ $endif$ $if(keywords)$ $endif$ $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ $if(quotes)$ $endif$ $if(highlighting-css)$ $endif$ $if(theme)$ $else$ $endif$ $for(css)$ $endfor$ $if(math)$ $math$ $endif$ $for(header-includes)$ $header-includes$ $endfor$ $for(include-before)$ $include-before$ $endfor$
      $if(title)$

      $title$

      $if(subtitle)$

      $subtitle$

      $endif$ $for(author)$

      $author$

      $endfor$ $if(date)$

      $date$

      $endif$
      $endif$ $if(toc)$
      $toc$
      $endif$ $body$
      $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.dzslides0000644000000000000000000001032313155256771017511 0ustar0000000000000000 $for(author-meta)$ $endfor$ $if(date-meta)$ $endif$ $if(keywords)$ $endif$ $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ $if(quotes)$ $endif$ $if(highlighting-css)$ $endif$ $if(css)$ $for(css)$ $endfor$ $else$ $endif$ $if(math)$ $math$ $endif$ $for(header-includes)$ $header-includes$ $endfor$ $if(title)$

      $title$

      $if(subtitle)$

      $subtitle$

      $endif$
      $if(author)$$for(author)$$author$$sep$, $endfor$$endif$ · $if(date)$$date$$endif$
      $endif$ $if(toc)$
      $toc$
      $endif$ $for(include-before)$ $include-before$ $endfor$ $body$ $for(include-after)$ $include-after$ $endfor$ $dzslides-core$ pandoc-1.19.2.4/data/templates/default.asciidoc0000644000000000000000000000065513155256771017455 0ustar0000000000000000$if(titleblock)$ $title$ $if(author)$ $for(author)$$author$$sep$; $endfor$ $endif$ $if(date)$ $date$ $endif$ $if(keywords)$ :keywords: $for(keywords)$$keywords$$sep$, $endfor$ $endif$ $if(toc)$ :toc: $endif$ $endif$ $if(abstract)$ [abstract] == Abstract $abstract$ $endif$ $for(header-includes)$ $header-includes$ $endfor$ $for(include-before)$ $include-before$ $endfor$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.haddock0000644000000000000000000000000713155256771017263 0ustar0000000000000000$body$ pandoc-1.19.2.4/data/templates/default.textile0000644000000000000000000000014713155256771017351 0ustar0000000000000000$for(include-before)$ $include-before$ $endfor$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.org0000644000000000000000000000044713155256771016465 0ustar0000000000000000$if(title)$ #+TITLE: $title$ $endif$ $if(author)$ #+AUTHOR: $for(author)$$author$$sep$; $endfor$ $endif$ $if(date)$ #+DATE: $date$ $endif$ $for(header-includes)$ $header-includes$ $endfor$ $for(include-before)$ $include-before$ $endfor$ $body$ $for(include-after)$ $include-after$ $endfor$ pandoc-1.19.2.4/data/templates/default.epub0000644000000000000000000000246413155256771016632 0ustar0000000000000000 $pagetitle$ $if(highlighting-css)$ $endif$ $for(css)$ $endfor$ $for(header-includes)$ $header-includes$ $endfor$ $if(titlepage)$ $for(title)$ $if(title.text)$

      $title.text$

      $else$

      $title$

      $endif$ $endfor$ $if(subtitle)$

      $subtitle$

      $endif$ $for(author)$

      $author$

      $endfor$ $for(creator)$

      $creator.text$

      $endfor$ $if(publisher)$

      $publisher$

      $endif$ $if(date)$

      $date$

      $endif$ $if(rights)$
      $rights$
      $endif$ $else$ $for(include-before)$ $include-before$ $endfor$ $body$ $for(include-after)$ $include-after$ $endfor$ $endif$ pandoc-1.19.2.4/data/templates/default.epub30000644000000000000000000000246113155256771016712 0ustar0000000000000000 $pagetitle$ $if(quotes)$ $endif$ $if(highlighting-css)$ $endif$ $for(css)$ $endfor$ $for(header-includes)$ $header-includes$ $endfor$ $if(titlepage)$
      $for(title)$ $if(title.type)$

      $title.text$

      $else$

      $title$

      $endif$ $endfor$ $if(subtitle)$

      $subtitle$

      $endif$ $for(author)$

      $author$

      $endfor$ $for(creator)$

      $creator.text$

      $endfor$ $if(publisher)$

      $publisher$

      $endif$ $if(date)$

      $date$

      $endif$ $if(rights)$
      $rights$
      $endif$
      $else$ $for(include-before)$ $include-before$ $endfor$ $body$ $for(include-after)$ $include-after$ $endfor$ $endif$ pandoc-1.19.2.4/data/docx/[Content_Types].xml0000644000000000000000000000304513155240142017055 0ustar0000000000000000 pandoc-1.19.2.4/data/docx/_rels/.rels0000644000000000000000000000107713155240142015322 0ustar0000000000000000 pandoc-1.19.2.4/data/docx/docProps/app.xml0000644000000000000000000000132413155240142016336 0ustar0000000000000000 83 false false 12 12.0000 false Microsoft Word 12.0.0 583 0 6 false 475 8 1 pandoc-1.19.2.4/data/docx/docProps/core.xml0000644000000000000000000000061113155240142016504 0ustar0000000000000000 pandoc-1.19.2.4/data/docx/word/document.xml0000644000000000000000000000132113155240142016553 0ustar0000000000000000 Hello world. pandoc-1.19.2.4/data/docx/word/fontTable.xml0000644000000000000000000000467613155240142016673 0ustar0000000000000000 pandoc-1.19.2.4/data/docx/word/footnotes.xml0000644000000000000000000000163513155240142016765 0ustar0000000000000000 pandoc-1.19.2.4/data/docx/word/numbering.xml0000644000000000000000000000331413155240142016727 0ustar0000000000000000 pandoc-1.19.2.4/data/docx/word/settings.xml0000644000000000000000000000411713155240142016603 0ustar0000000000000000 pandoc-1.19.2.4/data/docx/word/webSettings.xml0000644000000000000000000000030713155240142017236 0ustar0000000000000000 pandoc-1.19.2.4/data/docx/word/styles.xml0000644000000000000000000003001213155240142016257 0ustar0000000000000000 pandoc-1.19.2.4/data/docx/word/_rels/document.xml.rels0000644000000000000000000000206113155240142020625 0ustar0000000000000000 pandoc-1.19.2.4/data/docx/word/_rels/footnotes.xml.rels0000644000000000000000000000017513155240142021033 0ustar0000000000000000 pandoc-1.19.2.4/data/docx/word/theme/theme1.xml0000644000000000000000000001677213155240142017242 0ustar0000000000000000 pandoc-1.19.2.4/data/odt/mimetype0000644000000000000000000000004713155240142014651 0ustar0000000000000000application/vnd.oasis.opendocument.textpandoc-1.19.2.4/data/odt/manifest.rdf0000644000000000000000000000160313155240142015377 0ustar0000000000000000 pandoc-1.19.2.4/data/odt/styles.xml0000644000000000000000000015461613155240142015156 0ustar0000000000000000 1 pandoc-1.19.2.4/data/odt/content.xml0000644000000000000000000000705313155240142015275 0ustar0000000000000000 Hello World!pandoc-1.19.2.4/data/odt/meta.xml0000644000000000000000000000140213155240142014541 0ustar0000000000000000 Pandoc pandoc-1.19.2.4/data/odt/settings.xml0000644000000000000000000002321213155240142015456 0ustar0000000000000000 002174710874truefalseview23041304100217451087300false100falsetruefalsefalse1473719falsetruefalsefalsetruefalsefalsefalsefalsefalsefalsefalsefalsetruefalse0falsefalsefalsefalsefalsefalsefalsefalsefalsefalsetruetruefalsefalsetruetruetruefalsehigh-resolution147371910falsefalsefalsetruefalsefalsetruefalsetruetruefalsefalsefalsefalsetruetruefalsetruetruetruefalsefalsefalse0falsefalsetruetruepandoc-1.19.2.4/data/odt/Configurations2/accelerator/current.xml0000644000000000000000000000000013155240142022626 0ustar0000000000000000pandoc-1.19.2.4/data/odt/Thumbnails/thumbnail.png0000644000000000000000000000142113155240142017671 0ustar0000000000000000PNG  IHDRg?IDATxA 0Q_ EQ{jC\s8I1I1I1I1I1I1I1I1I1I1I,mi>*oGOy+އoo'^=gIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIꐵ|AR8I1I1I1I1I1I1I1I1I1I1I1I(ppIENDB`pandoc-1.19.2.4/data/odt/META-INF/manifest.xml0000644000000000000000000000207613155240142016571 0ustar0000000000000000 pandoc-1.19.2.4/data/epub.css0000644000000000000000000000110013155240142013743 0ustar0000000000000000/* This defines styles and classes used in the book */ body { margin: 5%; text-align: justify; font-size: medium; } code { font-family: monospace; } h1 { text-align: left; } h2 { text-align: left; } h3 { text-align: left; } h4 { text-align: left; } h5 { text-align: left; } h6 { text-align: left; } h1.title { } 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; } em, em em em, em em em em em { font-style: italic;} em em, em em em em { font-style: normal; } pandoc-1.19.2.4/data/dzslides/template.html0000644000000000000000000004456013155240142016641 0ustar0000000000000000 The Title Of Your Presentation

      My Presentation

      by John Doe

      Some random text: But I've never been to the moon! You can see how I lived before I met you. Also Zoidberg. I could if you hadn't turned on the light and shut off my stereo.

      An incremental list

      • Item 1
      • Item 2
      • Item 3
        • Item 3.1
        • Item 3.2
      Some notes. They are only visible using onstage shell.
      Who's brave enough to fly into something we all keep calling a death sphere?

      In the onstage shell, notes scroll rather than overflow:

      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac dui eu est feugiat lacinia sit amet nec leo. Mauris eu ipsum leo. Nulla mi odio, cursus sed sollicitudin non, fringilla id magna. Suspendisse sit amet posuere elit. Maecenas iaculis, turpis a placerat imperdiet, libero lorem feugiat nisi, nec tincidunt diam nibh sit amet massa. Vestibulum quis adipiscing tellus. Maecenas sollicitudin sodales pulvinar. Donec dui ipsum, bibendum facilisis consequat interdum, tempus ut mauris. Aliquam ut dolor nec odio scelerisque bibendum quis in neque. Aliquam dui dui, pulvinar quis fermentum quis, gravida eu augue. Nunc tristique dolor a urna pulvinar bibendum. Curabitur mollis cursus neque, in scelerisque metus porta non. Donec tempor enim in nibh vestibulum et convallis nisi malesuada. Duis ut lectus sed metus venenatis porttitor id pharetra quam. Suspendisse sapien turpis, ornare in molestie et, gravida eget turpis.

      Part two

      An image
      Kittens are so cute!
      A video

      End!

      pandoc-1.19.2.4/data/sample.lua0000644000000000000000000002137113155240142014276 0ustar0000000000000000-- This is a sample custom writer for pandoc. It produces output -- that is very similar to that of pandoc's HTML writer. -- There is one new feature: code blocks marked with class 'dot' -- are piped through graphviz and images are included in the HTML -- output using 'data:' URLs. -- -- Invoke with: pandoc -t sample.lua -- -- Note: you need not have lua installed on your system to use this -- custom writer. However, if you do have lua installed, you can -- use it to test changes to the script. 'lua sample.lua' will -- produce informative error messages if your code contains -- syntax errors. -- Character escaping local function escape(s, in_attribute) return s:gsub("[<>&\"']", function(x) if x == '<' then return '<' elseif x == '>' then return '>' elseif x == '&' then return '&' elseif x == '"' then return '"' elseif x == "'" then return ''' else return x end end) end -- Helper function to convert an attributes table into -- a string that can be put into HTML tags. local function attributes(attr) local attr_table = {} for x,y in pairs(attr) do if y and y ~= "" then table.insert(attr_table, ' ' .. x .. '="' .. escape(y,true) .. '"') end end return table.concat(attr_table) end -- Run cmd on a temporary file containing inp and return result. local function pipe(cmd, inp) local tmp = os.tmpname() local tmph = io.open(tmp, "w") tmph:write(inp) tmph:close() local outh = io.popen(cmd .. " " .. tmp,"r") local result = outh:read("*all") outh:close() os.remove(tmp) return result end -- Table to store footnotes, so they can be included at the end. local notes = {} -- Blocksep is used to separate block elements. function Blocksep() return "\n\n" end -- This function is called once for the whole document. Parameters: -- body is a string, metadata is a table, variables is a table. -- This gives you a fragment. You could use the metadata table to -- fill variables in a custom lua template. Or, pass `--template=...` -- to pandoc, and pandoc will add do the template processing as -- usual. function Doc(body, metadata, variables) local buffer = {} local function add(s) table.insert(buffer, s) end add(body) if #notes > 0 then add('
        ') for _,note in pairs(notes) do add(note) end add('
      ') end return table.concat(buffer,'\n') .. '\n' end -- The functions that follow render corresponding pandoc elements. -- s is always a string, attr is always a table of attributes, and -- items is always an array of strings (the items in a list). -- Comments indicate the types of other variables. function Str(s) return escape(s) end function Space() return " " end function SoftBreak() return "\n" end function LineBreak() return "
      " end function Emph(s) return "" .. s .. "" end function Strong(s) return "" .. s .. "" end function Subscript(s) return "" .. s .. "" end function Superscript(s) return "" .. s .. "" end function SmallCaps(s) return '' .. s .. '' end function Strikeout(s) return '' .. s .. '' end function Link(s, src, tit, attr) return "" .. s .. "" end function Image(s, src, tit, attr) return "" end function Code(s, attr) return "" .. escape(s) .. "" end function InlineMath(s) return "\\(" .. escape(s) .. "\\)" end function DisplayMath(s) return "\\[" .. escape(s) .. "\\]" end function Note(s) local num = #notes + 1 -- insert the back reference right before the final closing tag. s = string.gsub(s, '(.*)' .. s .. '') -- return the footnote reference, linked to the note. return '' .. num .. '' end function Span(s, attr) return "" .. s .. "" end function RawInline(format, str) if format == "html" then return str else return '' end end function Cite(s, cs) local ids = {} for _,cit in ipairs(cs) do table.insert(ids, cit.citationId) end return "" .. s .. "" end function Plain(s) return s end function Para(s) return "

      " .. s .. "

      " end -- lev is an integer, the header level. function Header(lev, s, attr) return "" .. s .. "" end function BlockQuote(s) return "
      \n" .. s .. "\n
      " end function HorizontalRule() return "
      " end function LineBlock(ls) return '
      ' .. table.concat(ls, '\n') .. '
      ' end function CodeBlock(s, attr) -- If code block has class 'dot', pipe the contents through dot -- and base64, and include the base64-encoded png as a data: URL. if attr.class and string.match(' ' .. attr.class .. ' ',' dot ') then local png = pipe("base64", pipe("dot -Tpng", s)) return '' -- otherwise treat as code (one could pipe through a highlighter) else return "
      " .. escape(s) ..
                 "
      " end end function BulletList(items) local buffer = {} for _, item in pairs(items) do table.insert(buffer, "
    1. " .. item .. "
    2. ") end return "
        \n" .. table.concat(buffer, "\n") .. "\n
      " end function OrderedList(items) local buffer = {} for _, item in pairs(items) do table.insert(buffer, "
    3. " .. item .. "
    4. ") end return "
        \n" .. table.concat(buffer, "\n") .. "\n
      " end -- Revisit association list STackValue instance. function DefinitionList(items) local buffer = {} for _,item in pairs(items) do for k, v in pairs(item) do table.insert(buffer,"
      " .. k .. "
      \n
      " .. table.concat(v,"
      \n
      ") .. "
      ") end end return "
      \n" .. table.concat(buffer, "\n") .. "\n
      " end -- Convert pandoc alignment to something HTML can use. -- align is AlignLeft, AlignRight, AlignCenter, or AlignDefault. function html_align(align) if align == 'AlignLeft' then return 'left' elseif align == 'AlignRight' then return 'right' elseif align == 'AlignCenter' then return 'center' else return 'left' end end function CaptionedImage(src, tit, caption, attr) return '
      \n\n' .. '

      ' .. caption .. '

      \n
      ' 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. function Table(caption, aligns, widths, headers, rows) local buffer = {} local function add(s) table.insert(buffer, s) end add("") if caption ~= "" then add("") end if widths and widths[1] ~= 0 then for _, w in pairs(widths) do add('') end end local header_row = {} local empty_header = true for i, h in pairs(headers) do local align = html_align(aligns[i]) table.insert(header_row,'') empty_header = empty_header and h == "" end if empty_header then head = "" else add('') for _,h in pairs(header_row) do add(h) end add('') end local class = "even" for _, row in pairs(rows) do class = (class == "even" and "odd") or "even" add('') for i,c in pairs(row) do add('') end add('') end add('\n" .. s .. "" end -- The following code will produce runtime warnings when you haven't defined -- all of the functions you need for the custom writer, so it's useful -- to include when you're working on a writer. local meta = {} meta.__index = function(_, key) io.stderr:write(string.format("WARNING: Undefined function '%s'\n",key)) return function() return "" end end setmetatable(_G, meta) pandoc-1.19.2.4/data/bash_completion.tpl0000644000000000000000000000442413155240142016201 0ustar0000000000000000# 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" highlight_styles="%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 ;; --wrap) COMPREPLY=( $(compgen -W "auto none preserve" -- ${cur}) ) return 0 ;; --track-changes) COMPREPLY=( $(compgen -W "accept reject all" -- ${cur}) ) return 0 ;; --reference-location) COMPREPLY=( $(compgen -W "block section document" -- ${cur}) ) return 0 ;; --top-level-division) COMPREPLY=( $(compgen -W "section chapter part" -- ${cur}) ) return 0 ;; --highlight-style) COMPREPLY=( $(compgen -W "${highlight_styles}" -- ${cur}) ) return 0 ;; *) ;; esac case "${cur}" in -*) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; *) local IFS=$'\n' COMPREPLY=( $(compgen -X '' -f "${cur}") ) return 0 ;; esac } complete -o filenames -o bashdefault -F _pandoc pandoc pandoc-1.19.2.4/MANUAL.txt0000644000000000000000000043611513155240142013125 0ustar0000000000000000% Pandoc User's Guide % John MacFarlane % January 29, 2017 Synopsis ======== `pandoc` [*options*] [*input-file*]... 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], [PHP Markdown Extra], [GitHub-Flavored Markdown], [MultiMarkdown], 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], [MultiMarkdown], [reStructuredText], [XHTML], [HTML5], [LaTeX] \(including [`beamer`] slide shows\), [ConTeXt], [RTF], [OPML], [DocBook], [OpenDocument], [ODT], [Word docx], [GNU Texinfo], [MediaWiki markup], [DokuWiki markup], [ZimWiki markup], [Haddock markup], [EPUB] \(v2 or v3\), [FictionBook2], [Textile], [groff man] pages, [Emacs Org mode], [AsciiDoc], [InDesign ICML], [TEI Simple], and [Slidy], [Slideous], [DZSlides], [reveal.js] or [S5] HTML slide shows. It can also produce [PDF] output on systems where LaTeX, ConTeXt, or `wkhtmltopdf` 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 further 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 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/ [MultiMarkdown]: http://fletcherpenney.net/multimarkdown/ [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://www.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 [ZimWiki markup]: http://zim-wiki.org/manual/Help/Wiki_Syntax.html [TWiki markup]: http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules [Haddock markup]: https://www.haskell.org/haddock/doc/html/ch03s08.html [groff man]: http://man7.org/linux/man-pages/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]: https://en.wikipedia.org/wiki/Office_Open_XML [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 [TEI Simple]: https://github.com/TEIC/TEI-Simple Using `pandoc` -------------- If no *input-file* is specified, input is read from *stdin*. Otherwise, the *input-files* are concatenated (with a blank line between each) and used as input. Output goes to *stdout* by default (though output to *stdout* is disabled for the `odt`, `docx`, `epub`, and `epub3` output formats). For output to a file, use the `-o` option: pandoc -o output.html input.txt By default, pandoc produces a document fragment, not a standalone document with a proper header and footer. To produce a standalone 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], below. Instead of a file, an absolute URI may be given. In this case pandoc will fetch the content using HTTP: pandoc -f html -t markdown http://www.fsf.org If multiple input files are given, `pandoc` will concatenate them all (with blank lines between them) before parsing. This feature is disabled for binary input formats such as `EPUB`, `odt`, and `docx`. 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: pandoc -f markdown -t latex hello.txt To convert `hello.html` from HTML to Markdown: pandoc -f html -t markdown hello.html Supported output formats are listed below under the `-t/--to` option. Supported input formats are listed below under the `-f/--from` option. Note that the `rst`, `textile`, `latex`, and `html` readers are not complete; there are some constructs that they do not parse. If the input or output format is not specified explicitly, `pandoc` will attempt to guess it from the extensions of 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 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. 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`]: iconv -t utf-8 input.txt | pandoc | iconv -f utf-8 Note that in some output formats (such as HTML, LaTeX, ConTeXt, 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 -------------- 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: [`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 or included in any header file. 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 or `wkhtmltopdf` to create a PDF. To do this, specify an output file with a `.pdf` extension, as before, but add `-t context` or `-t html5` to the command line. PDF output can be controlled using [variables for LaTeX] (if LaTeX is used) and [variables for ConTeXt] (if ConTeXt is used). If `wkhtmltopdf` is used, then the variables `margin-left`, `margin-right`, `margin-top`, `margin-bottom`, and `papersize` will affect the output, as will `--css`. [`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/ Options ======= General options --------------- `-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT* : 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), `markdown_github` (GitHub-Flavored Markdown), `markdown_mmd` (MultiMarkdown), `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 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], 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 without pipe tables and with hard line breaks. See [Pandoc's Markdown], below, for a list of extensions and their names. See `--list-input-formats` and `--list-extensions`, below. `-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), `markdown_github` (GitHub-Flavored Markdown), `markdown_mmd` (MultiMarkdown), `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), `zimwiki` (ZimWiki markup), `textile` (Textile), `org` (Emacs Org mode), `texinfo` (GNU Texinfo), `opml` (OPML), `docbook` (DocBook 4), `docbook5` (DocBook 5), `opendocument` (OpenDocument), `odt` (OpenOffice text document), `docx` (Word docx), `haddock` (Haddock markup), `rtf` (rich text format), `epub` (EPUB v2 book), `epub3` (EPUB v3), `fb2` (FictionBook2 e-book), `asciidoc` (AsciiDoc), `icml` (InDesign ICML), `tei` (TEI Simple), `slidy` (Slidy HTML and JavaScript slide show), `slideous` (Slideous HTML and JavaScript slide show), `dzslides` (DZSlides 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], 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], below. Markdown syntax extensions can be individually enabled or disabled by appending `+EXTENSION` or `-EXTENSION` to the format name, as described above under `-f`. See `--list-output-formats` and `--list-extensions`, below. `-o` *FILE*, `--output=`*FILE* : Write output to *FILE* instead of *stdout*. If *FILE* is `-`, output will go to *stdout*. (Exception: if the output format is `odt`, `docx`, `epub`, or `epub3`, output to stdout is disabled.) `--data-dir=`*DIRECTORY* : Specify the user data directory to search for pandoc data files. If this option is not specified, the default user data directory will be used. This is, in Unix: $HOME/.pandoc in Windows XP: C:\Documents And Settings\USERNAME\Application Data\pandoc and in Windows Vista or later: C:\Users\USERNAME\AppData\Roaming\pandoc 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 with PDF output. `--list-input-formats` : List supported input formats, one per line. `--list-output-formats` : List supported output formats, one per line. `--list-extensions` : List supported Markdown extensions, one per line, followed by a `+` or `-` indicating whether it is enabled by default in pandoc's Markdown. `--list-highlight-languages` : List supported languages for syntax highlighting, one per line. `--list-highlight-styles` : List supported styles for syntax highlighting, one per line. See `--highlight-style`. `-v`, `--version` : Print version. `-h`, `--help` : Show usage message. Reader options -------------- `-R`, `--parse-raw` : Parse untranslatable HTML codes and LaTeX environments as raw HTML or LaTeX, instead of ignoring them. Affects only HTML and LaTeX input. Raw HTML can be printed in Markdown, reStructuredText, Emacs Org mode, HTML, Slidy, Slideous, DZSlides, reveal.js, and S5 output; raw LaTeX can be printed in Markdown, reStructuredText, Emacs Org mode, 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.) `-S`, `--smart` : 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 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` : Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes: `-` before a numeral is an en-dash, and `--` is an em-dash. This option is selected automatically for `textile` input. `--base-header-level=`*NUMBER* : Specify the base level for headers (defaults to 1). `--indented-code-classes=`*CLASSES* : Specify classes to use for indented code blocks--for example, `perl,numberLines` or `haskell`. Multiple classes may be separated by spaces or commas. `--default-image-extension=`*EXTENSION* : 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. `--file-scope` : Parse each file individually before combining for multifile documents. This will allow footnotes in different files with the same identifiers to work as expected. If this option is set, footnotes and links will not work across files. Reading binary files (docx, odt, epub) implies `--file-scope`. `--filter=`*PROGRAM* : 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's own JSON input and output. The name of the output format will be passed to the filter as the first argument. Hence, pandoc --filter ./caps.py -t latex is equivalent to pandoc -t json | ./caps.py latex | pandoc -f json -t latex The latter form may be useful for debugging filters. 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. There are also pandoc filter libraries in [PHP], [perl], and [javascript/node.js]. In order of preference, pandoc will look for filters in 1. a specified full or relative path (executable or non-executable) 2. `$DATADIR/filters` (executable or non-executable) 3. `$PATH` (executable only) `-M` *KEY*[`=`*VAL*], `--metadata=`*KEY*[`:`*VAL*] : Set the metadata field *KEY* to the value *VAL*. A value specified on the command line overrides a value specified in the document. Values will be parsed as YAML boolean or string values. If no value is specified, the value will be treated as Boolean true. Like `--variable`, `--metadata` causes template variables to be set. But unlike `--variable`, `--metadata` affects the metadata of the underlying document (which is accessible from filters and may be printed in some output formats). `--normalize` : Normalize the document after reading: merge adjacent `Str` or `Emph` elements, for example, and remove repeated `Space`s. `-p`, `--preserve-tabs` : Preserve tabs instead of converting them to spaces (the default). Note that this will only affect tabs in literal code spans and code blocks; tabs in regular text will be treated as spaces. `--tab-stop=`*NUMBER* : Specify the number of spaces per tab (default is 4). `--track-changes=accept`|`reject`|`all` : Specifies what to do with insertions, deletions, and comments produced by the MS Word "Track Changes" feature. `accept` (the default), inserts all insertions, and ignores all deletions. `reject` inserts all deletions and ignores insertions. Both `accept` and `reject` ignore comments. `all` puts in insertions, deletions, and comments, wrapped in spans with `insertion`, `deletion`, `comment-start`, and `comment-end` classes, respectively. The author and time of change is included. `all` is useful for scripting: only accepting changes from a certain reviewer, say, or before a certain date. This option only affects the docx reader. `--extract-media=`*DIR* : Extract images and other media contained in a docx or epub container to the path *DIR*, creating it if necessary, and adjust the images 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 ---------------------- `-s`, `--standalone` : Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment). This option is set automatically for `pdf`, `epub`, `epub3`, `fb2`, `docx`, and `odt` output. `--template=`*FILE* : Use *FILE* as a custom template for the generated document. Implies `--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 found, pandoc will search for it in the `templates` subdirectory of the user data directory (see `--data-dir`). If this option is not used, a default template appropriate for the output format will be used (see `-D/--print-default-template`). `-V` *KEY*[`=`*VAL*], `--variable=`*KEY*[`:`*VAL*] : Set the template variable *KEY* to the value *VAL* when rendering the document in standalone mode. This is generally only useful when the `--template` option is used to specify a custom template, since pandoc automatically sets the variables used in the default templates. If no *VAL* is specified, the key will be given the value `true`. `-D` *FORMAT*, `--print-default-template=`*FORMAT* : Print the system default template for an output *FORMAT*. (See `-t` for a list of possible *FORMAT*s.) Templates in the user data directory are ignored. `--print-default-data-file=`*FILE* : Print a system default data file. Files in the user data directory are ignored. `--dpi`=*NUMBER* : Specify the dpi (dots per inch) value for conversion from pixels to inch/centimeters and vice versa. The default is 96dpi. Technically, the correct term would be ppi (pixels per inch). `--wrap=auto`|`none`|`preserve` : Determine how text is wrapped in the output (the source code, not the rendered version). With `auto` (the default), pandoc will attempt to wrap lines to the column width specified by `--columns` (default 72). With `none`, pandoc will not wrap lines at all. With `preserve`, pandoc will attempt to preserve the wrapping from the source document (that is, where there are nonsemantic newlines in the source, there will be nonsemantic newlines in the output as well). Automatic wrapping does not currently work in HTML output. `--no-wrap` : Deprecated synonym for `--wrap=none`. `--columns=`*NUMBER* : Specify length of lines in characters. This affects text wrapping in the generated source code (see `--wrap`). It also affects calculation of column widths for plain text tables (see [Tables] below). `--toc`, `--table-of-contents` : Include an automatically generated table of contents (or, in the case of `latex`, `context`, `docx`, and `rst`, an instruction to create one) in the output document. This option has no effect on `man`, `docbook`, `docbook5`, `slidy`, `slideous`, `s5`, or `odt` output. `--toc-depth=`*NUMBER* : Specify the number of section levels to include in the table of contents. The default is 3 (which means that level 1, 2, and 3 headers will be listed in the contents). `--no-highlight` : Disables syntax highlighting for code blocks and inlines, even when a language attribute is given. `--highlight-style=`*STYLE* : Specifies the coloring style to be used in highlighted source code. Options are `pygments` (the default), `kate`, `monochrome`, `breezeDark`, `espresso`, `zenburn`, `haddock`, and `tango`. For more information on syntax highlighting in pandoc, see [Syntax highlighting], below. See also `--list-highlight-styles`. `-H` *FILE*, `--include-in-header=`*FILE* : Include contents of *FILE*, verbatim, at the end of the header. This can be used, for example, to include special CSS or JavaScript in HTML documents. This option can be used repeatedly to include multiple files in the header. They will be included in the order specified. Implies `--standalone`. `-B` *FILE*, `--include-before-body=`*FILE* : Include contents of *FILE*, verbatim, at the beginning of the document body (e.g. after the `` tag in HTML, or the `\begin{document}` command in LaTeX). This can be used to include navigation bars or banners in HTML documents. This option can be used repeatedly to include multiple files. They will be included in the order specified. Implies `--standalone`. `-A` *FILE*, `--include-after-body=`*FILE* : Include contents of *FILE*, verbatim, at the end of the document body (before the `` tag in HTML, or the `\end{document}` command in LaTeX). This option can be used repeatedly to include multiple files. They will be included in the order specified. Implies `--standalone`. Options affecting specific writers ---------------------------------- `--self-contained` : Produce a standalone HTML file with no external dependencies, using `data:` URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. The resulting file should be "self-contained," in the sense that it needs no external files and no net access to be displayed properly by a browser. This option works only with HTML output formats, including `html`, `html5`, `html+lhs`, `html5+lhs`, `s5`, `slidy`, `slideous`, `dzslides`, and `revealjs`. Scripts, images, and stylesheets at absolute URLs will be downloaded; those at relative URLs will be sought relative to the working directory (if the first source file is local) or relative to the base URL (if the first source file is remote). Limitation: resources that are loaded dynamically through JavaScript cannot be incorporated; as a result, `--self-contained` does not work with `--mathjax`, and some advanced features (e.g. zoom or speaker notes) may not work in an offline "self-contained" `reveal.js` slide show. `--html-q-tags` : Use `` tags for quotes in HTML. `--ascii` : Use only ASCII characters in output. Currently supported only for HTML output (which uses numerical entities instead of UTF-8 when this option is selected). `--reference-links` : Use reference-style links, rather than inline links, in writing Markdown or reStructuredText. By default inline links are used. The placement of link references is affected by the `--reference-location` option. `--reference-location = block`|`section`|`document` : Specify whether footnotes (and references, if `reference-links` is set) are placed at the end of the current (top-level) block, the current section, or the document. The default is `document`. Currently only affects the markdown writer. `--atx-headers` : 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` : Deprecated synonym for `--top-level-division=chapter`. `--top-level-division=[default|section|chapter|part]` : Treat top-level headers as the given division type in LaTeX, ConTeXt, DocBook, and TEI output. The hierarchy order is part, chapter, then section; all headers are shifted such that the top-level header becomes the specified type. The default behavior is to determine the best division type via heuristics: unless other conditions apply, `section` is chosen. When the LaTeX document class is set to `report`, `book`, or `memoir` (unless the `article` option is specified), `chapter` is implied as the setting for this option. If `beamer` is the output format, specifying either `chapter` or `part` will cause top-level headers to become `\part{..}`, while second-level headers remain as their default type. `-N`, `--number-sections` : Number section headings in LaTeX, ConTeXt, HTML, or EPUB output. By default, sections are not numbered. Sections with class `unnumbered` will never be numbered, even if `--number-sections` is specified. `--number-offset=`*NUMBER*[`,`*NUMBER*`,`*...*] : Offset for section headings in HTML output (ignored in other output formats). The first number is added to the section number for top-level headers, the second for second-level headers, and so on. So, for example, if you want the first top-level header in your document to be numbered "6", specify `--number-offset=5`. If your document starts with a level-2 header which you want to be numbered "1.5", specify `--number-offset=1,4`. Offsets are 0 by default. Implies `--number-sections`. `--no-tex-ligatures` : 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 the [`listings`] package for LaTeX code blocks `-i`, `--incremental` : Make list items in slide shows display incrementally (one by one). The default is for lists to be displayed all at once. `--slide-level=`*NUMBER* : Specifies that headers with the specified level create slides (for `beamer`, `s5`, `slidy`, `slideous`, `dzslides`). Headers above this level in the hierarchy are used to divide the slide show into sections; headers below this level create subheads within a slide. The default is to set the slide level based on the contents of the document; see [Structuring the slide show]. `--section-divs` : Wrap sections in `
      ` tags (or `
      ` tags in HTML5), and attach identifiers to the enclosing `
      ` (or `
      `) rather than the header itself. See [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. The default is `none`. `--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. This is useful for preventing duplicate identifiers when generating fragments to be included in other pages. `-T` *STRING*, `--title-prefix=`*STRING* : Specify *STRING* as a prefix at the beginning of the title that appears in the HTML header (but not in the title as it appears at the beginning of the HTML body). Implies `--standalone`. `-c` *URL*, `--css=`*URL* : Link to a CSS style sheet. This option can be used repeatedly to include multiple files. They will be included in the order specified. `--reference-odt=`*FILE* : Use the specified file as a style reference in producing an ODT. For best results, the reference ODT should be a modified version of an ODT produced using pandoc. The contents of the reference ODT are ignored, but its stylesheets are used in the new ODT. If no reference ODT is specified on the command line, pandoc will look for a file `reference.odt` in the user data directory (see `--data-dir`). If this is not found either, sensible defaults will be used. To produce a custom `reference.odt`, first get a copy of the default `reference.odt`: `pandoc --print-default-data-file reference.odt > custom-reference.odt`. Then open `custom-reference.docx` in LibreOffice, modify the styles as you wish, and save the file. `--reference-docx=`*FILE* : Use the specified file as a style reference in producing a docx file. For best results, the reference docx should be a modified version of a docx file produced using pandoc. The contents of the reference docx are ignored, but its stylesheets and document properties (including margins, page size, header, and footer) are used in the new docx. If no reference docx is specified on the command line, pandoc will look for a file `reference.docx` in the user data directory (see `--data-dir`). If this is not found either, sensible defaults will be used. To produce a custom `reference.docx`, first get a copy of the default `reference.docx`: `pandoc --print-default-data-file reference.docx > custom-reference.docx`. Then open `custom-reference.docx` in Word, modify the styles as you wish, and save the file. For best results, do not make changes to this file other than modifying the styles used by pandoc: [paragraph] Normal, Body Text, First Paragraph, Compact, Title, Subtitle, Author, Date, Abstract, Bibliography, Heading 1, Heading 2, Heading 3, Heading 4, Heading 5, Heading 6, Block Text, Footnote Text, Definition Term, Definition, Caption, Table Caption, Image Caption, Figure, Figure With Caption, TOC Heading; [character] Default Paragraph Font, Body Text Char, Verbatim Char, Footnote Reference, Hyperlink; [table] Normal Table. `--epub-stylesheet=`*FILE* : Use the specified CSS file to style the EPUB. If no stylesheet is specified, pandoc will look for a file `epub.css` in the user data directory (see `--data-dir`). If it is not found there, sensible defaults will be used. `--epub-cover-image=`*FILE* : Use the specified image as the EPUB cover. It is recommended that the image be less than 1000px in width and height. Note that 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]. For example: Creative Commons es-AR By default, pandoc will include the following metadata elements: `` (from the document title), `` (from the document authors), `` (from the document date, which should be in [ISO 8601 format]), `` (from the `lang` variable, or, if is not set, the locale), and `` (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 in the document can be used instead. See below under [EPUB Metadata]. `--epub-embed-font=`*FILE* : Embed the specified font in the EPUB. This option can be repeated to embed multiple fonts. Wildcards can also be used: for example, `DejaVuSans-*.ttf`. However, if you use wildcards on the command line, be sure to escape them or put the whole filename in single quotes, to prevent them from being interpreted by the shell. To use the embedded fonts, you will need to add declarations like the following to your CSS (see `--epub-stylesheet`): @font-face { font-family: DejaVuSans; font-style: normal; font-weight: normal; src:url("DejaVuSans-Regular.ttf"); } @font-face { font-family: DejaVuSans; font-style: normal; font-weight: bold; src:url("DejaVuSans-Bold.ttf"); } @font-face { font-family: DejaVuSans; font-style: italic; font-weight: normal; src:url("DejaVuSans-Oblique.ttf"); } @font-face { font-family: DejaVuSans; font-style: italic; font-weight: bold; src:url("DejaVuSans-BoldOblique.ttf"); } body { font-family: "DejaVuSans"; } `--epub-chapter-level=`*NUMBER* : Specify the header level at which to split the EPUB into separate "chapter" files. The default is to split into chapters at level 1 headers. This option only affects the internal composition of the EPUB, not the way chapters and sections are displayed to users. Some readers may be slow if the chapter files are too large, so for large documents with few level 1 headers, one might want to use a chapter level of 2 or 3. `--latex-engine=pdflatex`|`lualatex`|`xelatex` : Use the specified LaTeX engine when producing PDF output. The default is `pdflatex`. If the engine is not in your PATH, the full path of the engine may be specified here. `--latex-engine-opt=`*STRING* : Use the given string as a command-line argument to the `latex-engine`. 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 ------------------ `--bibliography=`*FILE* : Set the `bibliography` field in the document's metadata to *FILE*, overriding any value set in the metadata, and process citations using `pandoc-citeproc`. (This is equivalent to `--metadata bibliography=FILE --filter pandoc-citeproc`.) If `--natbib` or `--biblatex` is also supplied, `pandoc-citeproc` is not used, making this equivalent to `--metadata bibliography=FILE`. If you supply this argument multiple times, each *FILE* will be added to bibliography. `--csl=`*FILE* : Set the `csl` field in the document's metadata to *FILE*, overriding any value set in the metadata. (This is equivalent to `--metadata csl=FILE`.) This option is only relevant with `pandoc-citeproc`. `--citation-abbreviations=`*FILE* : Set the `citation-abbreviations` field in the document's metadata to *FILE*, overriding any value set in the metadata. (This is equivalent to `--metadata citation-abbreviations=FILE`.) This option is only relevant with `pandoc-citeproc`. `--natbib` : 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 [`bibtex`]. `--biblatex` : 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 [`bibtex`] or [`biber`]. Math rendering in HTML ---------------------- `-m` [*URL*], `--latexmathml`[`=`*URL*] : Use the [LaTeXMathML] script to display embedded TeX math in HTML output. To insert a link to a local copy of the `LaTeXMathML.js` script, provide a *URL*. If no *URL* is provided, the contents of the script will be inserted directly into the HTML header, preserving portability at the price of efficiency. If you plan to use math on several pages, it is much better to link to a copy of the script, so it can be cached. `--mathml`[`=`*URL*] : Convert TeX math to [MathML] (in `docbook`, `docbook5`, `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. `--jsmath`[`=`*URL*] : Use [jsMath] to display embedded TeX math in HTML output. The *URL* should point to the jsMath load script (e.g. `jsMath/easy/load.js`); if provided, it will be linked to in the header of standalone HTML documents. If a *URL* is not provided, no link to the jsMath load script will be inserted; it is then up to the author to provide such a link in the HTML template. `--mathjax`[`=`*URL*] : Use [MathJax] to display embedded TeX math in HTML output. The *URL* should point to the `MathJax.js` load script. If a *URL* is not provided, a link to the MathJax CDN will be inserted. `--gladtex` : Enclose TeX math in `` tags in HTML output. These can then be processed by [gladTeX] to produce links to images of the typeset formulas. `--mimetex`[`=`*URL*] : Render TeX math using the [mimeTeX] CGI script. If *URL* is not specified, it is assumed that the script is at `/cgi-bin/mimetex.cgi`. `--webtex`[`=`*URL*] : Render TeX formulas using an external script that converts TeX formulas to images. The formula will be concatenated with the URL provided. If *URL* is not specified, the CodeCogs will be used. Note: the `--webtex` option will affect Markdown output as well as HTML, which is useful if you're targeting a version of Markdown without native math support. `--katex`[`=`*URL*] : Use [KaTeX] to display embedded TeX math in HTML output. The *URL* should point to the `katex.js` load script. If a *URL* is not provided, a link to the KaTeX CDN will be inserted. Note: [KaTeX] seems to work best with `html5` output. `--katex-stylesheet=`*URL* : The *URL* should point to the `katex.css` stylesheet. If this option is 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 --------------------------- `--dump-args` : Print information about command-line arguments to *stdout*, then exit. This option is intended primarily for use in wrapper scripts. The first line of output contains the name of the output file specified 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 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, pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1 is equivalent to pandoc -o foo.html -s Templates ========= 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* 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 directory (see `--data-dir`, above). *Exceptions:* - For `odt` output, customize the `default.opendocument` template. - For `pdf` output, customize the `default.latex` template (or the `default.beamer` template, if you use `-t beamer`, or the `default.context` template, if you use `-t context`). - `docx` has no template (however, you can use `--reference-docx` to customize the output). 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. Variables set by pandoc ----------------------- Some variables are set automatically by pandoc. These vary somewhat depending on the output format, but include metadata fields as well as the following: `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: --- author: - Aristotle - Peter Abelard ... `subtitle` : document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and Word docx; renders in LaTeX only when using a document class that supports `\subtitle`, such as `beamer` or the [KOMA-Script] series (`scrartcl`, `scrreprt`, `scrbook`).[^subtitle] `institute` : author affiliations (in LaTeX and Beamer only). Can be a list, when there are multiple authors. `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 values) `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) `include-after` : contents specified by `-A/--include-after-body` (may have multiple values) `body` : body of document `meta-json` : JSON representation of all of the document's metadata [^subtitle]: To make `subtitle` work with other LaTeX document classes, you can add the following to `header-includes`: \providecommand{\subtitle}[1]{% \usepackage{titling} \posttitle{% \par\large#1\end{center}} } Language variables ------------------ `lang` : 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 overridden. 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 `http://www.w3.org/Talks/Tools/Slidy2`) `slideous-url` : base URL for Slideous documents (defaults to `slideous`) `s5-url` : base URL for S5 documents (defaults to `s5/default`) `revealjs-url` : base URL for reveal.js documents (defaults to `reveal.js`) `theme`, `colortheme`, `fonttheme`, `innertheme`, `outertheme` : themes for LaTeX [`beamer`] documents `themeoptions` : options for LaTeX beamer themes (a list). `navigation` : controls navigation symbols in `beamer` documents (default is `empty` for no navigation symbols; other valid values are `frame`, `vertical`, and `horizontal`). `section-titles` : enables on "title pages" for new sections in `beamer` documents (default = true). `beamerarticle` : when true, the `beamerarticle` package is loaded (for producing an article from beamer slides). `colorlinks` : add color to link text; automatically enabled if any of `linkcolor`, `citecolor`, `urlcolor`, or `toccolor` are set (for beamer only). `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] (for beamer only). [reveal.js configuration options]: https://github.com/hakimel/reveal.js#configuration Variables for LaTeX ------------------- LaTeX variables are used when [creating a PDF]. `papersize` : paper size, e.g. `letter`, `A4` `fontsize` : font size for body text (e.g. `10pt`, `12pt`) `documentclass` : document class, e.g. [`article`], [`report`], [`book`], [`memoir`] `classoption` : option for document class, e.g. `oneside`; may be repeated for multiple options `geometry` : option for [`geometry`] package, e.g. `margin=1in`; may be repeated for multiple options `margin-left`, `margin-right`, `margin-top`, `margin-bottom` : sets margins, if `geometry` is not used (otherwise `geometry` overrides these) `linestretch` : adjusts line spacing using the [`setspace`] package, e.g. `1.25`, `1.5` `fontfamily` : 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` : 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. `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. `fontenc` : allows font encoding to be specified through `fontenc` package (with `pdflatex`); default is `T1` (see guide to [LaTeX font encodings]) `microtypeoptions` : options to pass to the microtype package `colorlinks` : add color to link text; automatically enabled if any of `linkcolor`, `citecolor`, `urlcolor`, or `toccolor` are set `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] `links-as-notes` : causes links to be printed as footnotes `indent` : uses document class settings for indentation (the default LaTeX template otherwise removes indentation and adds space between paragraphs) `subparagraph` : disables default behavior of LaTeX template that redefines (sub)paragraphs as sections, changing the appearance of nested headings in some classes `thanks` : specifies contents of acknowledgments footnote after document title. `toc` : include table of contents (can also be set using `--toc/--table-of-contents`) `toc-depth` : level of section to include in table of contents `secnumdepth` : numbering depth for sections, if sections are numbered `lof`, `lot` : include list of figures, list of tables `bibliography` : bibliography to use for resolving references `biblio-style` : bibliography style, when used with `--natbib` and `--biblatex`. `biblio-title` : bibliography title, when used with `--natbib` and `--biblatex`. `biblatexoptions` : list of options for biblatex. [`article`]: https://ctan.org/pkg/article [`report`]: https://ctan.org/pkg/report [`book`]: https://ctan.org/pkg/book [KOMA-Script]: https://ctan.org/pkg/koma-script [`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 `margin-left`, `margin-right`, `margin-top`, `margin-bottom` : sets margins, if `layout` is not used (otherwise `layout` overrides these) `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 `header` : header in man pages `footer` : footer in man pages `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$ will be replaced by the document title. To write a literal `$` in a template, use `$$`. Templates may contain conditionals. The syntax is as follows: $if(variable)$ X $else$ Y $endif$ This will include `X` in the template if `variable` has a non-null value; otherwise it will include `Y`. `X` and `Y` are placeholders for any valid template text, and may include interpolated variables or other conditionals. The `$else$` section may be omitted. When variables can have multiple values (for example, `author` in a multi-author document), you can use the `$for$` keyword: $for(author)$ $endfor$ You can optionally specify a separator to be used between consecutive items: $for(author)$$author$$sep$, $endfor$ A dot can be used to select a field of a variable that takes an object as its value. So, for example: $author.name$ ($author.affiliation$) 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 and merge in changes after each pandoc release. [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 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 enabled, while `markdown-footnotes-pipe_tables` is pandoc's Markdown without footnotes or pipe tables. Philosophy ---------- Markdown is designed to be easy to write, and, even more importantly, easy to read: > A Markdown-formatted document should be publishable as-is, as plain > text, without looking like it's been marked up with tags or formatting > instructions. > -- [John Gruber](http://daringfireball.net/projects/markdown/syntax#philosophy) 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 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 elements like definition lists, tables, mathematics, and footnotes. Paragraphs ---------- A paragraph is one or more lines of text followed by one or more blank lines. Newlines are treated as spaces, so you can reflow your paragraphs as you like. If you need a hard line break, put two or more spaces at the end of a line. #### Extension: `escaped_line_breaks` #### A backslash followed by a newline is also a hard line break. 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. Headers ------- There are two kinds of headers: Setext and ATX. ### Setext-style headers ### A setext-style header is a line of text "underlined" with a row of `=` signs (for a level one header) or `-` signs (for a level two header): A level-one header ================== A level-two header ------------------ The header text can contain inline formatting, such as emphasis (see [Inline formatting], below). ### ATX-style headers ### 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: ## A level-two header ### A level-three header ### As with setext-style headers, the header text can contain formatting: # A level-one header with a [link](/url) and *emphasis* #### Extension: `blank_before_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 wrapping). Consider, for example: I like several of their flavors of ice cream: #22, for example, and #5. ### Header identifiers ### #### Extension: `header_attributes` #### Headers can be assigned attributes using this syntax at the end of the line containing the header text: {#identifier .class .class key=value key=value} Thus, for example, the following headers will all be assigned the identifier `foo`: # My header {#foo} ## My header ## {#foo} My other header {#foo} --------------- (This syntax is compatible with [PHP Markdown Extra].) Note that although this syntax allows assignment of classes and key/value attributes, writers generally don't use all of this information. Identifiers, classes, and key/value attributes are used in HTML and HTML-based formats such as EPUB and slidy. Identifiers are used for labels and link anchors in the LaTeX, ConTeXt, Textile, and AsciiDoc writers. Headers with the class `unnumbered` will not be numbered, even if `--number-sections` is specified. A single hyphen (`-`) in an attribute context is equivalent to `.unnumbered`, and preferable in non-English documents. So, # My header {-} is just the same as # My header {.unnumbered} #### Extension: `auto_identifiers` #### A header without an explicitly specified identifier will be automatically assigned a unique identifier based on the header text. To derive the identifier from the header text, - Remove all formatting, links, etc. - Remove all footnotes. - Remove all punctuation, except underscores, hyphens, and periods. - Replace all spaces and newlines with hyphens. - Convert all alphabetic characters to lowercase. - Remove everything up to the first letter (identifiers may not begin with a number or punctuation mark). - If nothing is left after this, use the identifier `section`. 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` These rules should, in most cases, allow one to determine the identifier from the header text. The exception is when several headers have the same text; in this case, the first will get an identifier as described above; the second will get the same identifier with `-1` appended; the third with `-2`; and so on. These identifiers are used to provide link targets in the table of contents generated by the `--toc|--table-of-contents` option. They also make it easy to provide links from one section of a document to another. A link to this section, for example, might look like this: See the section on [header identifiers](#header-identifiers-in-html-latex-and-context). Note, however, that this method of providing links to sections works only in HTML, LaTeX, and ConTeXt formats. If the `--section-divs` option is specified, then each section will be wrapped in a `div` (or a `section`, if `--html5` was specified), and the identifier will be attached to the enclosing `
      ` (or `
      `) tag rather than the header itself. This allows entire sections to be manipulated using JavaScript or treated differently in CSS. #### Extension: `implicit_header_references` #### Pandoc behaves as if reference links have been defined for each header. So, to link to a header # Header identifiers in HTML you can simply write [Header identifiers in HTML] or [Header identifiers in HTML][] or [the section on header identifiers][header identifiers in HTML] instead of giving the identifier explicitly: [Header identifiers in HTML](#header-identifiers-in-html) If there are multiple headers with identical text, the corresponding reference will link to the first one only, and you will need to use explicit links to link to the others, as described above. Like regular reference links, these references are case-insensitive. Explicit link reference definitions always take priority over implicit header references. So, in the following example, the link will point to `bar`, not to `#foo`: # Foo [foo]: bar See [foo] 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 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. > > 1. This is a list inside a block quote. > 2. Second item. A "lazy" form, which requires the `>` character only on the first line of each block, is also allowed: > This is a block quote. This paragraph has two lines. > 1. This is a list inside a block quote. 2. Second item. Among the block elements that can be contained in a block quote are other block quotes. That is, block quotes can be nested: > This is a block quote. > > > 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 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 wrapping). So, unless the `markdown_strict` format is used, the following does not produce a nested block quote in pandoc: > This is a block quote. >> Nested. Verbatim (code) blocks ---------------------- ### Indented code blocks ### A block of text indented four spaces (or one tab) is treated as verbatim text: that is, special characters do not trigger special formatting, and all spaces and line breaks are preserved. For example, if (a > 3) { moveShip(5 * gravity, DOWN); } The initial (four space or one tab) indentation is not considered part of the verbatim text, and is removed in the output. Note: blank lines in the verbatim text need not begin with four spaces. ### Fenced code blocks ### #### Extension: `fenced_code_blocks` #### 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 indentation is necessary: ~~~~~~~ if (a > 3) { moveShip(5 * gravity, DOWN); } ~~~~~~~ Like regular code blocks, fenced code blocks must be separated from surrounding text by blank lines. If the code itself contains a row of tildes or backticks, just use a longer row of tildes or backticks at the start and end: ~~~~~~~~~~~~~~~~ ~~~~~~~~~~ code including tildes ~~~~~~~~~~ ~~~~~~~~~~~~~~~~ #### Extension: `backtick_code_blocks` #### Same as `fenced_code_blocks`, but uses backticks (`` ` ``) instead of tildes (`~`). #### Extension: `fenced_code_attributes` #### Optionally, you may attach attributes to fenced or backtick code block using this syntax: ~~~~ {#mycode .haskell .numberLines startFrom="100"} qsort [] = [] qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++ qsort (filter (>= x) xs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here `mycode` is an identifier, `haskell` and `numberLines` are classes, and `startFrom` is an attribute with value `100`. Some output formats can use this information to do syntax highlighting. Currently, the only output formats that uses this information are HTML and LaTeX. If highlighting is supported for your output format and language, then the code block above will appear highlighted, with numbered lines. (To see which languages are supported, type `pandoc --list-highlight-languages`.) Otherwise, the code block above will appear as follows:
            
            ...
            
          
      A shortcut form can also be used for specifying the language of the code block: ```haskell qsort [] = [] ``` This is equivalent to: ``` {.haskell} qsort [] = [] ``` If the `fenced_code_attributes` extension is disabled, but input contains class attribute(s) for the code block, the first class attribute will be printed after the opening fence as a bare word. To prevent all highlighting, use the `--no-highlight` flag. To set the highlighting style, use `--highlight-style`. For more information on highlighting, see [Syntax highlighting], below. Line blocks ----------- #### Extension: `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: | The limerick packs laughs anatomical | In space that is quite economical. | But the good ones I've seen | So seldom are clean | And the clean ones so seldom are comical | 200 Main St. | Berkeley, CA 94718 The lines can be hard-wrapped if needed, but the continuation line must begin with a space. | The Right Honorable Most Venerable and Righteous Samuel L. Constable, Jr. | 200 Main St. | Berkeley, CA 94718 This syntax is borrowed from [reStructuredText]. Lists ----- ### Bullet lists ### A bullet list is a list of bulleted list items. A bulleted list item begins with a bullet (`*`, `+`, or `-`). Here is a simple example: * one * two * three This will produce a "compact" list. If you want a "loose" list, in which each item is formatted as a paragraph, put spaces between the items: * one * two * three The bullets need not be flush with the left margin; they may be indented one, two, or three spaces. The bullet must be followed by whitespace. List items look best if subsequent lines are flush with the first line (after the bullet): * here is my first list item. * and my second. But Markdown also allows a "lazy" format: * here is my first list item. * and my second. ### The four-space rule ### A list item may contain multiple paragraphs and other block-level content. However, subsequent paragraphs must be preceded by a blank line and indented four spaces or a tab. The list will look better if the first paragraph is aligned with the rest: * First paragraph. Continued. * Second paragraph. With a code block, which must be indented eight spaces: { code } List items may include other lists. In this case the preceding blank line is optional. The nested list must be indented four spaces or one tab: * fruits + apples - macintosh - red delicious + pears + peaches * vegetables + broccoli + chard 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. + A lazy, lazy, list item. + Another one; this looks bad but is legal. Second paragraph of second list item. **Note:** Although the four-space rule for continuation paragraphs 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 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]: http://daringfireball.net/projects/markdown/syntax#list ### Ordered lists ### 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 by a period and a space. The numbers themselves are ignored, so there is no difference between this list: 1. one 2. two 3. three and this one: 5. one 7. two 1. three #### Extension: `fancy_lists` #### 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 text that follows by at least one space, and, if the list marker is a capital letter with a period, by at least two spaces.[^2] [^2]: The point of this rule is to ensure that normal paragraphs starting with people's initials, like B. Russell was an English philosopher. do not get treated as list items. This rule will not prevent (C) 2007 Joe Smith from being interpreted as a list item. In this case, a backslash escape can be used: (C\) 2007 Joe Smith The `fancy_lists` extension also allows '`#`' to be used as an ordered list marker in place of a numeral: #. one #. two #### Extension: `startnum` #### Pandoc also pays attention to the type of list marker used, and to the starting number, and both of these are preserved where possible in the output format. Thus, the following yields a list with numbers followed by a single parenthesis, starting with 9, and a sublist with lowercase roman numerals: 9) Ninth 10) Tenth 11) Eleventh i. subone ii. subtwo iii. subthree Pandoc will start a new list each time a different type of list marker is used. So, the following will create three lists: (2) Two (5) Three 1. Four * Five If default list markers are desired, use `#.`: #. one #. two #. three ### Definition lists ### #### Extension: `definition_lists` #### Pandoc supports definition lists, using the syntax of [PHP Markdown Extra] with some extensions.[^3] Term 1 : Definition 1 Term 2 with *inline markup* : Definition 2 { some code, part of Definition 2 } Third paragraph of definition 2. Each term must fit on one line, which may optionally be followed by a blank line, and must be followed by one or more definitions. A definition begins with a colon or tilde, which may be indented one or two spaces. 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 at the beginning of a paragraph or other block element: Term 1 : Definition with lazy continuation. Second paragraph of the definition. If you leave space before the definition (as in the example above), the text of the definition will be treated as a paragraph. In some output formats, this will mean greater spacing between term/definition pairs. For a more compact definition list, omit the space before the definition: Term 1 ~ Definition 1 Term 2 ~ Definition 2a ~ Definition 2b 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], below.) [^3]: I have been influenced by the suggestions of [David Wheeler](http://www.justatheory.com/computers/markup/modest-markdown-proposal.html). ### Numbered example lists ### #### Extension: `example_lists` #### The special list marker `@` can be used for sequentially numbered examples. The first list item with a `@` marker will be numbered '1', the next '2', and so on, throughout the document. The numbered examples need not occur in a single list; each new list using `@` will take up where the last stopped. So, for example: (@) My first example will be numbered (1). (@) My second example will be numbered (2). Explanation of examples. (@) My third example will be numbered (3). Numbered examples can be labeled and referred to elsewhere in the document: (@good) This is a good example. As (@good) illustrates, ... The label can be any string of alphanumeric characters, underscores, or hyphens. ### Compact and loose lists ### Pandoc behaves differently from `Markdown.pl` on some "edge cases" involving lists. Consider this source: + First + Second: - Fee - Fie - Foe + Third Pandoc transforms this into a "compact list" (with no `

      ` tags around "First", "Second", or "Third"), while Markdown puts `

      ` 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, even though it is different from that of `Markdown.pl`.) ### Ending a list ### What if you want to put an indented code block after a list? - item one - item two { my code block } 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. To "cut off" the list after item two, you can insert some non-indented content, like an HTML comment, which won't produce visible output in any format: - item one - item two { my code block } You can use the same trick if you want two consecutive lists instead of one big list: 1. one 2. two 3. three 1. uno 2. dos 3. tres Horizontal rules ---------------- A line containing a row of three or more `*`, `-`, or `_` characters (optionally separated by spaces) produces a horizontal rule: * * * * --------------- Tables ------ Four kinds of tables may be used. The first three kinds presuppose the use of a fixed-width font, such as Courier. The fourth kind can be used with proportionally spaced fonts, as it does not require lining up columns. #### Extension: `table_captions` #### A caption may optionally be provided with all 4 kinds of tables (as illustrated in the examples below). A caption is a paragraph beginning with the string `Table:` (or just `:`), which will be stripped off. It may appear either before or after the table. #### Extension: `simple_tables` #### Simple tables look like this: Right Left Center Default ------- ------ ---------- ------- 12 12 12 12 123 123 123 123 1 1 1 1 Table: Demonstration of simple table syntax. The headers and table rows must each fit on one line. Column alignments are determined by the position of the header text relative to the dashed line below it:[^4] - If the dashed line is flush with the header text on the right side but extends beyond it on the left, the column is right-aligned. - If the dashed line is flush with the header text on the left side but extends beyond it on the right, the column is left-aligned. - If the dashed line extends beyond the header text on both sides, the column is centered. - If the dashed line is flush with the header text on both sides, the default alignment is used (in most cases, this will be left). [^4]: This scheme is due to Michel Fortin, who proposed it on the [Markdown discussion list](http://six.pairlist.net/pipermail/markdown-discuss/2005-March/001097.html). The table must end with a blank line, or a line of dashes followed by a blank line. The column headers may be omitted, provided a dashed line is used to end the table. For example: ------- ------ ---------- ------- 12 12 12 12 123 123 123 123 1 1 1 1 ------- ------ ---------- ------- When headers are omitted, column alignments are determined on the basis of the first line of the table body. So, in the tables above, the columns would be right, left, center, and right aligned, respectively. #### Extension: `multiline_tables` #### Multiline tables allow headers and table rows to span multiple lines of text (but cells that span multiple columns or rows of the table are not supported). Here is an example: ------------------------------------------------------------- Centered Default Right Left Header Aligned Aligned Aligned ----------- ------- --------------- ------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. ------------------------------------------------------------- Table: Here's the caption. It, too, may span multiple lines. These work like simple tables, but with the following differences: - They must begin with a row of dashes, before the header text (unless the headers are omitted). - They must end with a row of dashes, then a blank line. - The rows must be separated by blank lines. 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. Headers may be omitted in multiline tables as well as simple tables: ----------- ------- --------------- ------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. ----------- ------- --------------- ------------------------- : Here's a multiline table without headers. It is possible for a multiline table to have just one row, but the row should be followed by a blank line (and then the row of dashes that ends the table), or the table may be interpreted as a simple table. #### Extension: `grid_tables` #### Grid tables look like this: : Sample grid table. +---------------+---------------+--------------------+ | Fruit | Price | Advantages | +===============+===============+====================+ | Bananas | $1.34 | - built-in wrapper | | | | - bright color | +---------------+---------------+--------------------+ | Oranges | $2.10 | - cures scurvy | | | | - tasty | +---------------+---------------+--------------------+ The row of `=`s separates the header from the table body, and can be omitted for a headerless table. The cells of grid tables may contain arbitrary block elements (multiple paragraphs, code blocks, lists, etc.). Cells that span multiple columns or rows are not supported. Grid tables can be created easily using [Emacs table mode]. [Emacs table mode]: http://table.sourceforge.net/ Alignments can be specified as with pipe tables, by putting colons at the boundaries of the separator line after the header: +---------------+---------------+--------------------+ | Right | Left | Centered | +==============:+:==============+:==================:+ | Bananas | $1.34 | built-in wrapper | +---------------+---------------+--------------------+ For headerless tables, the colons go on the top line instead: +--------------:+:--------------+:------------------:+ | Right | Left | Centered | +---------------+---------------+--------------------+ #### Extension: `pipe_tables` #### Pipe tables look like this: | Right | Left | Default | Center | |------:|:-----|---------|:------:| | 12 | 12 | 12 | 12 | | 123 | 123 | 123 | 123 | | 1 | 1 | 1 | 1 | : Demonstration of pipe table syntax. 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 with blank cells. Since the pipes indicate column boundaries, columns need not be vertically aligned, as they are in the above example. So, this is a perfectly legal (though ugly) pipe table: fruit| price -----|-----: apple|2.05 pear|1.37 orange|3.09 The cells of pipe tables cannot contain block elements like paragraphs and lists, and cannot span multiple lines. If a pipe table contains a row whose printable content is wider than the column width (see `--columns`), then the cell contents will wrap, with the relative cell widths determined by the widths of the separator lines. Note: pandoc also recognizes pipe tables of the following form, as can be produced by Emacs' orgtbl-mode: | One | Two | |-----+-------| | my | table | | is | nice | 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 --------------- #### Extension: `pandoc_title_block` #### If the file begins with a title block % title % author(s) (separated by semicolons) % date it will be parsed as bibliographic information, not regular text. (It will be used, for example, in the title of standalone LaTeX or HTML output.) The block may contain just a title, a title and an author, or all three elements. If you want to include an author but no title, or a title and a date but no author, you need a blank line: % % Author % My title % % June 15, 2006 The title may occupy multiple lines, but continuation lines must begin with leading space, thus: % My title on multiple lines If a document has multiple authors, the authors may be put on separate lines with leading space, or separated by semicolons, or both. So, all of the following are equivalent: % Author One Author Two % Author One; Author Two % Author One; Author Two The date must fit on one line. All three metadata fields may contain standard inline formatting (italics, links, footnotes, etc.). Title blocks will always be parsed, but they will affect the output only when the `--standalone` (`-s`) option is chosen. In HTML output, titles will appear twice: once in the document head -- this is the title that will appear at the top of the window in a browser -- and once at the beginning of the document body. The title in the document head can have an optional prefix attached (`--title-prefix` or `-T` option). The title in the body appears as an H1 element with class "title", so it can be suppressed or reformatted with CSS. If a title prefix is specified with `-T` and no title block appears in the document, the title prefix will be used by itself as the HTML title. The man page writer extracts a title, man page section number, and other header and footer information from the title line. The title is assumed to be the first word on the title line, which may optionally end with a (single-digit) section number in parentheses. (There should be no space between the title and the parentheses.) Anything after this is assumed to be additional footer and header text. A single pipe character (`|`) should be used to separate the footer text from the header text. Thus, % PANDOC(1) will yield a man page with the title `PANDOC` and section 1. % PANDOC(1) Pandoc User Manuals will also have "Pandoc User Manuals" in the footer. % PANDOC(1) Pandoc User Manuals | Version 4.0 will also have "Version 4.0" in the header. #### Extension: `yaml_metadata_block` #### A YAML metadata block is a valid YAML object, delimited by a line of three hyphens (`---`) at the top and a line of three hyphens (`---`) or three dots (`...`) at the bottom. 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 files: pandoc chap1.md chap2.md chap3.md metadata.yaml -s -o book.html 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 with names ending in an underscore will be ignored by pandoc. (They may be given a role by external processors.) 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, 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. Note that YAML escaping rules must be followed. Thus, for example, if a title contains a colon, it must be quoted. The pipe character (`|`) can be used to begin an indented block that will be interpreted literally, without need for escaping. This form is necessary when the field contains blank lines: --- title: 'This is the title: it contains a colon' author: - Author One - Author Two tags: [nothing, nothingness] abstract: | This is the abstract. It consists of two paragraphs. ... 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:

      This is the abstract.

      It consists of two paragraphs.

      Variables can contain arbitrary YAML structures, but the template must match this structure. The `author` variable in the default templates expects a simple list or string, but can be changed to support more complicated structures. The following combination, for example, would add an affiliation to the author if one is given: --- title: The document title author: - name: Author One affiliation: University of Somewhere - name: Author Two affiliation: University of Nowhere ... To use the structured authors in the example above, you would need a custom template: $for(author)$ $if(author.name)$ $author.name$$if(author.affiliation)$ ($author.affiliation$)$endif$ $else$ $author$ $endif$ $endfor$ Backslash escapes ----------------- #### Extension: `all_symbols_escapable` #### Except inside a code block or inline code, any punctuation or space character preceded by a backslash will be treated literally, even if it would normally indicate formatting. Thus, for example, if one writes *\*hello\** one will get *hello* instead of hello 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 will be used.) A backslash-escaped space is parsed as a nonbreaking space. It will 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 `
      `. This is a nice alternative to Markdown's "invisible" way of indicating hard line breaks using two trailing spaces on a line. Backslash escapes do not work in verbatim contexts. Smart punctuation ----------------- #### Extension #### If the `--smart` option is specified, pandoc will 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: if your LaTeX template or any included header file call for the [`csquotes`] package, pandoc will detect this automatically and use `\enquote{...}` for quoted text. Inline formatting ----------------- ### Emphasis ### To *emphasize* some text, surround it with `*`s or `_`, like this: This text is _emphasized with underscores_, and this is *emphasized with asterisks*. Double `*` or `_` produces **strong emphasis**: This is **strong emphasis** and __with underscores__. A `*` or `_` character surrounded by spaces, or backslash-escaped, will not trigger emphasis: This is * not emphasized *, and \*neither is this\*. #### Extension: `intraword_underscores` #### Because `_` is sometimes used inside words and identifiers, pandoc does not interpret a `_` surrounded by alphanumeric characters as an emphasis marker. If you want to emphasize just part of a word, use `*`: feas*ible*, not feas*able*. ### Strikeout ### #### Extension: `strikeout` #### To strikeout a section of text with a horizontal line, begin and end it with `~~`. Thus, for example, This ~~is deleted text.~~ ### Superscripts and subscripts ### #### Extension: `superscript`, `subscript` #### Superscripts may be written by surrounding the superscripted text by `^` characters; subscripts may be written by surrounding the subscripted text by `~` characters. Thus, for example, H~2~O is a liquid. 2^10^ is 1024. If the superscripted or subscripted text contains spaces, these spaces must be escaped with backslashes. (This is to prevent accidental superscripting and subscripting through the ordinary use of `~` and `^`.) Thus, if you want the letter P with 'a cat' in subscripts, use `P~a\ cat~`, not `P~a cat~`. ### Verbatim ### To make a short span of text verbatim, put it inside backticks: What is the difference between `>>=` and `>>`? If the verbatim text includes a backtick, use double backticks: Here is a literal backtick `` ` ``. (The spaces after the opening backticks and before the closing backticks will be ignored.) 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). Note that backslash-escapes (and other Markdown constructs) do not work in verbatim contexts: This is a backslash followed by an asterisk: `\*`. #### Extension: `inline_code_attributes` #### Attributes can be attached to verbatim text, just as with [fenced code blocks]: `<$>`{.haskell} ### Small caps ### To write small caps, you can use an HTML span tag: Small caps (The semicolon is optional and there may be space after the colon.) This will work in all output formats that support small caps. Alternatively, you can also use the new `bracketed_spans` syntax: [Small caps]{style="font-variant:small-caps;"} Math ---- #### Extension: `tex_math_dollars` #### Anything between two `$` characters will be treated as TeX math. The opening `$` must have a non-space character immediately to its right, while the closing `$` must have a non-space character immediately to its left, and must not be followed immediately by a digit. Thus, `$20,000 and $30,000` won't parse as math. If for some reason you need to enclose text in literal `$` characters, backslash-escape 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, Emacs Org mode, ConTeXt, ZimWiki ~ It will appear verbatim between `$` characters. reStructuredText ~ It will be rendered using an [interpreted text role `:math:`]. AsciiDoc ~ It will be rendered as `latexmath:[...]`. Texinfo ~ It will be rendered inside a `@math` command. groff man ~ It will be rendered verbatim without `$`'s. MediaWiki, DokuWiki ~ It will be rendered inside `` tags. Textile ~ It will be rendered inside `` tags. 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 in an `inlineequation` or `informalequation` tag. Otherwise it will be rendered, if possible, using Unicode characters. Docx ~ It will be rendered using OMML math markup. FictionBook2 ~ If the `--webtex` option is used, formulas are rendered as images using CodeCogs or other compatible web service, downloaded and embedded in the e-book. Otherwise, they will appear verbatim. HTML, Slidy, DZSlides, S5, EPUB ~ The way math is rendered in HTML will depend on the command-line options selected: 1. The default is to render TeX math as far as possible using Unicode characters, as with RTF, DocBook, and OpenDocument output. Formulas are put inside a `span` with `class="math"`, so that they may be styled differently from the surrounding text if needed. 2. If the `--latexmathml` option is used, TeX math will be displayed between `$` or `$$` characters and put in `` tags with class `LaTeX`. The [LaTeXMathML] script will be used to render it as formulas. (This trick does not work in all browsers, but it works in Firefox. In browsers that do not support LaTeXMathML, TeX math will appear verbatim between `$` characters.) 3. If the `--jsmath` option is used, TeX math will be put inside `` tags (for inline math) or `
      ` tags (for display math) with class `math`. The [jsMath] script will be used to render it. 4. If the `--mimetex` option is used, the [mimeTeX] CGI script will be called to generate images for each TeX formula. This should work in all browsers. The `--mimetex` option takes an optional URL as argument. If no URL is specified, it will be assumed that the mimeTeX CGI script is at `/cgi-bin/mimetex.cgi`. 5. If the `--gladtex` option is used, TeX formulas will be enclosed in `` 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 procedure is: pandoc -s --gladtex myfile.txt -o myfile.htex gladtex -d myfile-images myfile.htex # produces myfile.html and images in myfile-images 6. If the `--webtex` option is used, TeX formulas will be converted to `` tags that link to an external script that converts formulas to images. The formula will be URL-encoded and concatenated with the URL provided. If no URL is specified, the CodeCogs will be used (`https://latex.codecogs.com/png.latex?`). 7. If the `--mathjax` option is used, TeX math will be displayed between `\(...\)` (for inline math) or `\[...\]` (for display math) and put in `` 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 -------- #### Extension: `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 be disabled if desired.) The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous, DZSlides, EPUB, Markdown, Emacs Org mode, and Textile output, and suppressed in other formats. #### Extension: `markdown_in_html_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; 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
      " .. caption .. "
      ' .. h .. '
      ' .. c .. '
      *one* [a link](http://google.com)
      into
      one a link
      whereas `Markdown.pl` will preserve it as is. There is one exception to this rule: text between ` in a comment or string. + More lenient non-quoted attribute values. Now we accept anything but a space character, quote, or <>. This helps in parsing e.g. www.google.com! + Bare & signs are now parsed as a string. This is a common HTML mistake. + Skip a bare < in malformed HTML. * Removed html2markdown and hsmarkdown. + html2markdown is no longer needed, since you can now pass URI arguments to pandoc and directly convert web pages. (Note, however, that pandoc assumes the pages are UTF8. html2markdown made an attempt to guess the encoding and convert them.) + hsmarkdown is pointless -- a large executable that could be replaced by 'pandoc --strict'. * In most writers, an image in a paragraph by itself is now rendered as a figure, with the alt text as the caption. (Texinfo, HTML, RST, MediaWiki, Docbook, LaTeX, ConTeXt, HTML.) Other images are rendered inline. * Depend on extensible-exceptions. This allows pandoc to be compiled on GHC 6.8. * Added --base-header-level option. For example, --base-header-level=2 will change level 1 headers to level 2, level 2 to level 3, etc. Closes Debian #563416. * Incomplete support for RST tables (simple and grid). Thanks to Eric Kow. Colspans and rowspans not yet supported. * Added accessors (docTitle, docAuthors, docDate) to Meta type. * MediaWiki writer: format links with relative URLs as wikilinks. The new rule: If the link target is an absolute URL, an external link is created. Otherwise, a wikilink is created. * Text.Pandoc.Shared: Export uniqueIdent, and don't allow tilde in identifier. Note: This may break links to sections that involve tildes. * Markdown(+lhs) reader: handle "inverse bird tracks." Inverse bird tracks (<) are used for haskell example code that is not part of the literate Haskell program. Resolves Issue #211. * LaTeX reader: + Recognize '\ ' (interword space). + Recognize nonbreaking space '~'. + Ignore \section, \pdfannot, \pdfstringdef. Ignore alt title in section headers. Don't treat \section as inline LaTeX. Resolves Issue #202. + LaTeX reader: allow any special character to be escaped. Resolves Issue #221. + LaTeX reader: treat \paragraph and \subparagraph as level 4, 5 headers. Resolves Issue #207. * Use template variables for include-before/after. + These options now imply -s; previously they worked also in fragment mode. + Users can now adjust position of include-before and include-after text in the templates. + Default position of include-before moved back (as it was before 1.4) before table of contents. + Resolves Issue #217. * Don't print an empty table header: (all writers). Resolves Issue #210. * HTML, Docbook writer: Use tbody, thead, and cols in tables. * HTML writer: Don't include TOC div if table of contents is empty. * Markdown writer: Fixed citations. Previously the markdown writer printed raw citation codes, e.g. [geach1970], rather than the expanded citations provided by citeproc, e.g. (Geach 1970). Now it prints the expanded citations. This means that the document produced can be processed as a markdown document without citeproc. Thanks to dsanson for reporting, and Andrea Rossato for the patch. * Improved and simplified title block in context template. Previously it caused an error if there was no title. This method should also be easier for users to customize. * Markdown reader: + Treat p., pp., sec., ch., as abbreviations in smart mode. + Disallow blank lines in inline code span. + Allow footnotes to be indented < 4 spaces. This fixes a regression. A test case has been added. + Escape spaces in URLs as %20. Previously they were incorrectly escaped as +, which is appropriate only for the query part of a URL. Resolves Issue #220. + Require two spaces after capital letter + period for list item. Otherwise "E. coli" starts a list. This might change the semantics of some existing documents, since previously the two-space requirement was only enforced when the second word started with a capital letter. But it is consistent with the existing documentation and follows the principle of least surprise. Resolves Issue #212. * LaTeX template: redefine labelwidth when using enumerate package. Otherwise the list labels (numbers) often extend past the left margin, which looks bad. * Mediawiki writer: Don't print a "== Notes ==" header before references. This is too English-centric. Writers can provide their own header at the end of the document. * Promoted mediawiki headers. '= head =' is now level 1, '== head ==' level 2, etc. This seems to be correct; it's only by convention that wikipedia articles have level 2 headers at most. Patch due to Eric Kow. * RunTests.hs: Set LANG to a UTF-8 locale. Use 'pandoc --data-dir=' so data files don't need to have been installed. This removes the need to set HOME. * HTML reader: + Handle spaces before . Resolves Issue #216. + Be forgiving in parsing a bare list within a list. The following is not valid xhtml, but the intent is clear:
      1. one
        1. sub
      2. two
      We'll treat the
        as if it's in a
      1. . Resolves Issue #215. * Updated INSTALL instructions. cabal method is now promoted. * Updated markdown2pdf man page. It no longer says all pandoc options are accepted. * README/man pages: Removed advice to pipe through tidy before HTML reader. This is obsolete, now that we have a forgiving HTML parser. * LaTeX writer: set numbersections template variable, so the section numbering options work again. * Removed obsolete Makefile. * Website: renamed index.txt.in -> index.txt. * New batch file to make-windows-installer. + Removed old Makefile.windows + Added make-windows-installer.bat + Modified default installer name in pandoc-setup.iss * Removed freebsd and macports directories. They are no longer up to date. * Setup.hs: + Made man page building sensitive to build verbosity. + Improved detection of highlighting support in test hook. + Install wrapper scripts into cabal bin directory. + Also simplified installManpages. + Setup.hs: install manpages to mandir. Code borrowed from darcs. * Changed default of writerXeTeX to False. * HTML writer: don't include empty UL if --toc but no sections. Resolves Issue #199. * LaTeX writer: + If book, report, or memoir documentclass, use \chapter{} for first-level headers. Otherwise use \section{}. + Removed stLink, link template variable. Reason: we now always include hyperref in the template. * LaTeX template: + Only show \author if there are some. + Always include hyperref package. It is used not just for links but for toc, section heading bookmarks, footnotes, etc. Also added unicode=true on hyperref options. * markdown2pdf: always do at least two runs. hyperref bookmarks require this. * cabal file: Removed unneeded dependency on template-haskell. * Windows installer - fixed bug in data file locations. Resolves Issue #197. * Deprecated --custom-header in documentation. Removed old "Custom Headers" section in README. pandoc (1.4) [ John MacFarlane ] * Pandoc will now compile with either GHC 6.10 or 6.12. + Don't use System.IO.UTF8 when compiling with 6.12 + Use -fno-warn-unused-do-bind option when compiling with 6.12 * Replaced old headers with templates. Now users have much more control over the way documents appear in --standalone mode, and writer code is simplified. Resolves Issues #59, 147. Every effort has been made to retain backwards compatibilty. So, the --custom-header option should still work as before. + Added Text.Pandoc.Templates. This provides functions for retrieving default templates and for rendering templates. + System templates (in the pandoc data directory) can be overridden by user templates in $HOME/.pandoc/templates. + Removed Text.Pandoc.DefaultHeaders. + Removed data/headers directory. + Added templates directory. + Added writerTemplate and writerVariables fields to WriterOptions. + Removed writerTitlePrefix, writerHeader fields from WriterOptions. + Changed --print-default-header to --print-default-template. + Added --template option. + Added -V/--variable option to set custom template variables. * Pandoc no longer requires Template Haskell. Resolves Issue #186. + Removed need for TH in ODT module. Instead get reference.odt from data file at run time. + Removed TH dependency from S5 module. S5 module now exports s5HeaderIncludes, which pandoc.hs includes if writer is s5 and standalone. + Refactored LaTeXMathML not to use TH. * Meta is now Meta [Inline] [[Inline]] [Inline] rather than Meta [Inline] [String] String. Authors and date in Meta are now lists of Inline elements rather than raw strings. This means that they can be formatted and can include footnotes. NOTE: This may be a breaking change for those using pandoc as a library. * Added readDataFile to Text.Pandoc.Shared. This retrieves a data file from the user pandoc data directory (~/.pandoc on unix), or, if not found there, from the system data directory ($CABALDIR/shared/pandoc-VERSION/). All data files, including templates, LaTeXMathML.js, s5 styles, and reference.odt, can be overridden by the user. * s5 files moved from data/ui/default to s5/default. * Use unicode instead of entities in HTML and XML output. Resolves Issue #163. * Prettier HTML footnote references: put anchor inside sup, instead of other way. Resolves Issue #191. Thanks to infinity0x. * Added --xetex option to pandoc and markdown2pdf. If --xetex is specified, pandoc produces latex suitable for processing by xelatex, and markdown2pdf uses xelatex to create the PDF. Resolves Issue #185. * RTF writer: multiple authors now occupy multiple paragraphs rather than using a line break. * Man writer: now the "--after-body" will come after the "AUTHORS" section, whereas before it would come before it. This is a slight break from backwards compatibility. * Added --reference-odt option, so users may customize the styles used in pandoc-generated ODT files. Users may also place a default reference.odt in the ~\.pandoc directory. * ODT writer: + Indented and line-broke styles.xml so it can be modified more easily. + Omitted some unnecessary style declarations. + Don't wrap text in OpenDocument writer. The tags are too long, making wrapping ugly and pointless. * LaTeX reader: use \\ to separate multiple authors. * Markdown reader: use ; as separator between authors. This allows you to use ',' within author names: e.g. "John Jones, Jr." * S5 writer: use linebreak to separate authors in title page. * RST reader: Allow :: before lhs code block. The RST spec requires the :: before verbatim blocks. This :: should not be treated as literal colons. Resolves Issue #189. * Documented pandoc 1.3's new definition list syntax in README. (An oversight in the last release.) * markdown2pdf.hs: + interpret ! in a log as an error line. + --toc now works properly. * Changes in RunTests.hs: + Use the Diff library rather than a local copy of Diff.hs. (This vastly increases performance.) This change means that 'cabal test' presupposes that the Diff library is installed. + Removed tests/Diff.hs from cabal file. + Changed RunTests to use local environment. We need at least HOME, so pandoc can find its data directory. * Updated windows installer to install data files in the app directory. * Windows installer now installs portable wrappers hsmarkdown and markdown2pdf. pandoc (1.3) [ John MacFarlane ] * Added --id-prefix option (Issue #41). This adds a prefix to all automatically generated HTML identifiers, which helps prevent duplicate identifiers when you're generating a fragment (say a blog post). * Added --indented-code-classes option. This specifies classes to use for indented code blocks. (Patch due to buttock; Issue #87.) * --number-sections now affects HTML output as well as ConTeXt and LaTeX (Issue #150). * Improved syntax for markdown definition lists (Issue #24). Definition lists are now more compatible with PHP Markdown Extra. + You can have multiple definitions for a term (but still not multiple terms). + Multi-block definitions no longer need a column before each block (indeed, this will now cause multiple definitions). + The marker no longer needs to be flush with the left margin, but can be indented at or two spaces. Also, ~ as well as : can be used as the marker (this suggestion due to David Wheeler.) + There can now be a blank line between the term and the definitions. * Better looking simple tables. Resolves Issue #180. + Markdown reader: simple tables are now given column widths of 0. + Column width of 0 is interpreted as meaning: use default column width. + Writers now include explicit column width information only for multiline tables. (Exception: RTF writer, which requires column widths. In this case, columns are given equal widths, adding up to the text width.) + Simple tables should now look better in most output formats. * Allow markdown tables without headers (Issue #50). The new syntax is described in README. Also allow optional line of dashes at bottom of simple tables. * Compensate for width of final table column (Issue #144). * Treat a backslash followed by a newline as a hard line break in markdown. Resolves Issue #154. This is a nice alternative to markdown's "invisible" way of indicating hardline breaks using lines that end with two spaces. * Improved performance of markdown reader by ~10% by eliminating the need for a separate parsing pass for notes. Raw notes are now stored on the first pass (which parses references), then parsed when the note is inserted into the AST. The stateNotes field in ParserState is now a list of [(String, String)] pairs instead of [(String, [Block])]. * In markdown reader, treat 4 or more * or _ in a row as literal text. (Trying to parse long strings of * or _ as strong or emph leads to exponential performance problems.) * Markdown reader: Use + rather than %20 for spaces in URLs. * Fixed htmlComment parser, adding a needed 'try'. * Don't print raw HTML in man output. * Allow . _ and ~ in header identifiers. * Specially mark code blocks that were "literate" in the input. They can then be treated differently in the writers. This allows authors to distinguish bits of the literate program they are writing from source code examples, even if the examples are marked as Haskell for highlighting. (Issue #174.) * Modified html+lhs output to use "haskell" highlighter instead of "literateHaskell". The highlighting module now adds bird tracks after highlighting (for HTML output), if the code block has the "literate" class. This gives better results, because kate's haskell highlighter is much better than the literateHaskell highlighter. * Fixed handling of footnotes in titles (HTML) and headers (LaTeX). (Issue #137.) * Support for "..code-block" directive in RST reader. Not core RST, but used in Sphinx for code blocks annotated with syntax information. Thanks to Luke Plant for the patch. * Added "head" to list of block-level HTML tags. Resolves Issue #108. * Added stripTags to Text.Pandoc.XML. This is used in the HTML writer. * Set utf-8 encoding in texinfo headers. * Docbook writer: add ids to sections. Use link for internal links. (Issue #60.) * Blank lines after lists in MediaWiki writer. * Properly handle commented-out list items in markdown. Resolves Issue #142. Example: - a - c * Changed heuristic in compactify. compactify has to decide whether a Para that ends a list is a Para intentionally, or just because of the blank lines at the end of every list. In the latter case the Para is turned to a Plain. The old heuristic was: change final Para to Plain iff the other items all end in Plain. This produces bad results when, for example, an item contains just a Plain and an HTML comment, as it does in the list above. The new heuristic: change final Para to Plain iff the other items don't contain a Para. * Added % as an rst underline character. Resolves Issue #173. * Fix inline math parser so that \$ is allowed in math. Resolves Issue #169. * Translate \int (integral) into unicode when using unicode math method. Resolves Issue #177. * markdown2pdf.hs improvements: + Use System.IO.UTF8. + Print error messages on last attempt. + Do not create a backup when overwriting a PDF (Issue #166). + Accept --longopt=val options. + Added man/man1/markdown2pdf.1 to extra-tmp-files in cabal, so that it is properly cleaned. * Added haddock comments warning that readers assume \n line endings. * Updated COPYRIGHT file. * Makefile: Changed EXECSBASE so it doesn't pull in hsmarkdown & markdown2pdf. Otherwise strip tries to strip shell scripts when you install using 'make'. * Changed Makefile so it doesn't build Haskell wrappers. * Fixed Makefile so it doesn't try to build man pages in build-doc. * Install pcre3.dll in Windows install script; this allows us to package a version of pandoc with highlighting support. pandoc (1.2.1) [ John MacFarlane ] * Fixed regression with --preserveTabs. Brought back optPreserveTabs. The trick of setting tabStop to 0 to mean "preserve tabs" had a bad side effect: strings of 0 spaces were interpreted as indentation. So, with --preserve-tabs, unindented paragraphs were treated as code. Resolves Issue #138. * HTML writer: wrap sections in divs. Resolves Issue #70. + hierarchicalize has been rationalized; it builds a hierarchical representation of the document from the headers, and simultaneously gives each section a unique identifier based on the heading title. + Identifiers are now attached to the divs rather than to the headers themselves. + Table of content backlinks go to the beginning of the table, rather than to the section reference that was clicked. + Code for constructing identifiers has been moved to Text.Pandoc.Shared from the HTML writer, since it is now consumed only by hierarchicalize. + In --strict mode, pandoc just prints bare headings, as before (unless --toc has been specified). + In s5 output, it does not wrap sections in divs, as that seems to confuse the s5 javascript. * Man writer: break lines at end of each sentence. groff expects this and treats '.' and '?' differently when followed by line ending as opposed to ordinary space. Also, don't escape periods. Instead, use zero-width character \& to avoid unwanted interpretation of periods at start of line. Resolves Issue #148. * Markdown writer: Added '#' and '>' to list of characters to be escaped in markdown output. Removed '<', as it is not an officially escapable character. This partially resolves Issue #96. * Make --smart the default for man output format. Otherwise we have trouble dividing lists of endlines into sentences. * DocBook writer: Use language attribute to indicate source language in code blocks. * RST reader: + Allow # to continue list, even if the list was started with an explicit marker. For example: A. my list #. continued Resolves Issue #140. + Allow continuation lines in line blocks. Also added test cases for line blocks for RST reader. Resolves Issue #149. + Allow explicit links with spaces in URL: `link `_ * Improved LaTeX reader's coverage of math modes. Remove displaymath* (which is not in LaTeX) and recognize all the amsmath environments that are alternatives to eqnarray, namely equation, equation*, gather, gather*, gathered, multline, multline*, align, align*, alignat, alignat*, aligned, alignedat, split. Resolves Issue #103. Thanks to shreevatsa.public for the patch. * Markdown reader: + Allow -, _, :, . in markdown attribute names. These are legal in XML attribute names. + Use non-breaking spaces in abbreviations. + Markdown reader: improved efficiency of abbreviation parsing. Instead of a separate abbrev parser, we just check for abbreviations each time we parse a string. This gives a huge performance boost with -S. Resolves Issue #141. * Improved efficiency of shared parsers: hexNum, htmlComment, whitespace, indentSpaces. * Export HTMLMathMethod in Text.Pandoc. * Export languagesByExtension in Text.Pandoc.Highlighting. * Added new Haskell version of markdown2pdf, due to Paulo Tanimoto. This should be more portable than the old shell script. * Made 'pandoc -v' more explicit about compiler options. Resolves Issue #139. * pandoc.hs: Made --strict compatible with --standalone, --toc. * Use Paths_pandoc to get version number, instead of hard-coding it into Text/Pandoc.hs. pandoc (1.2) [ John MacFarlane ] * Added support for literate Haskell. lhs support is triggered by '+lhs' suffixes in formats. For example, 'latex+lhs' is literate Haskell LaTeX. '.lhs' files are treated by default as literate markdown. + Added stateLiterateHaskell to parser state. + Added parser for lhsCodeBlock to Markdown, RST, LaTeX readers. + Added parser for |inline lhs| to LaTeX reader. + Added writerLiterateHaskell to WriterOptions. + Added lhs support to Markdown, RST, LaTeX, HTML writers. + Added definition of code environment to LaTeX header. + Added tests (run only if highlighting support compiled in). + Documented lhs features in man page and README. * In Text.Pandoc.Definition, added processWith, processWithM, and queryWith, and deprecated processPandoc and queryPandoc for these more general functions. * Fixed bug in mediawiki writer: improper closing tags in tables. Thanks to Benct Philip Jonsson for reporting the bug. * Added --email-obfuscation option. + Added writer option for email obfuscation. + Implemented email obfuscation options in HTML writer. + Added option to option parser. + Documented in README and pandoc man page. + Resolves Issue #97. * LaTeX writer: fixed bug with empty table cells. Resolves Issue #107. Thanks to rodja.trappe for the patch. * Fixed bug with header spacing in Markdown and RST writers. A null header (Meta [] [] []) should not cause a blank line at the beginning of output. But a blank line is needed between a non-null header and the main text. * Markdown reader: Relax spacing rules for $$ in display math. Now space and newlines are allowed after the opening $$ and before the closing $$. However, the display math cannot contain an entirely blank line. Resolves Issue #105. * Markdown reader: Gobble space after Plain blocks containing only raw html inline. Otherwise following header blocks are not parsed correctly, since the parser sees blank space before them. Resolves Issue #124. * Markdown reader: Allow " as well as '' to end a latex double-quote. * Conditionally depend on syb and base >= 4 if ghc >= 6.10. Resolves Issue #109. * Fixed problems in RST and markdown output due to bug in pretty-1.0.1.0 + Added hang' function to Text.Pandoc.Shared; this will be used instead of hang, which doesn't work properly in pretty-1.0.1.0. When pretty is upgraded, we can go back to hang. See http://article.gmane.org/gmane.comp.lang.haskell.general/16687 + Use hang' (and some different techniques) in RST and markdown writers. Some output is now a bit different. * Brought citeproc support up to date for citeproc-hs-0.2. (Patch by Andrea Rossato.) * Moved all haskell source to src subdirectory. Renamed Main.hs to pandoc.hs. * Rewrote hsmarkdown in Haskell for portability (src/hsmarkdown.hs). For now, keeping the old shell script too. * Added TemplateHaskell to Extensions for executable, removed -threaded for library. Thanks to duncan.coutts for the bug report. Resolves Issue #121. * Moved some Extra-Source-Files to Data-Files. * Moved tabFilter to Shared. * In pandoc.hs, removed optPreserveTabs; instead, tabstop of 0 means preserve tabs. * Minor code cleanup based on hlint suggestions. pandoc (1.1) [ John MacFarlane ] * Main.hs: + Changed date on copyright message in Main.hs. + Have the '-v' option print syntax highlighting languages separated by commas, and wrapped in lines, instead of in five columns as before. * Added --jsmath option. Resolves Issue #68. + Added --jsmath option to Main.hs + Added JsMath to HTMLMathMethod in Text.Pandoc.Shared. + Handle math appropriately in HTML writer when JsMath selected. + Documented the option in README and man page. * Text.Pandoc.Shared: Changed compactify to use a better heuristic for tight and loose lists. Final Para is changed to Plain if all other list items *end* with a Plain block. Addresses Issue #99. * HTML reader: + Added colons to protocols in unsanitaryURI. Closes Issue #88. + HTML reader: Don't interpret contents of
         blocks as markdown.
              Added rawVerbatimBlock parser.  Resolves Issue #94.
        
          * Markdown reader:
        
            + Allow URLs with spaces in them in links and references, but escape
              them as "%20".
            + Allow blank space at the end of horizontal rules.
        
          * RST reader: Modified 'unknownDirective' parser to handle comment
            blocks correctly, and added tests for comment blocks. Resolves Issue
            #86. Closes Debian Bug #500662.
        
          * HTML writer:
        
            + Include classes on tr elements in HTML output:
              "header", "odd", "even".  This allows tables to be styled with
              lines in alternating colors.  Resolves Issue #91.
            + Enclose all LaTeXMathML bits in .
              This prevents parts of the document that are not math from being
              interpreted as math by LaTeXMathML.js.
        
          * OpenDocument and ODT writers:  Added support for HorizontalRule elements,
            which were formerly ignored.  Resolves Issue #95.
        
          * Text.Pandoc.Shared:  Modified wrappedTeX to eliminate the line break
            between a footnote and immediately following nonspace characters in
            LaTeX and ConTeXt output. (This gets interpreted as a space, which
            is not desired in cases like "text^[note]---".)  Resolves Issue #93.
        
          * Windows installer: Don't require admin privileges to run
            installer.  Modified pandoc-setup.iss, and changed modpath.iss to
            modify HKCU path if user lacks admin privileges.  Also fixed case
            where oldpath is empty (previously this led to the new path
            beginning with a semicolon).
        
          * Updated INSTALL instructions for Arch packages and OS X install using
            cabal-install.
        
          * Removed the (now unneeded) debian directory.
            Removed empty Codec and System directories.
        
          * Moved odt-styles/ to data/.  Removed unneeded variable in Makefile.
        
          * Modified Setup.hs so that the "test" target returns an error status
            when tests fail, and "build" returns a success status if
            the build succeeds.  Resolves Issue #100.
        
          * Added BUGS to files in tarball.
        
        
        pandoc (1.0.0.1)
        
          [ John MacFarlane ]
        
          * Removed spurious reference to pdf output format from pandoc(1) man page.
        
        pandoc (1.0)
        
          [ Andrea Rossato ]
        
          * Added new OpenDocument writer.
        
          * Added support for SmallCaps inline element.
        
          * Added support for integrating pandoc with citeproc-hs.
        
            + Added Cite element to definition and writers.
            + Added Text.Pandoc.Biblio module
            + Note: This support is included only if the 'citeproc'
              Cabal configuration flag is set.
        
          * Made Pandoc data structure an instance of Typeable.
            Added new processPandoc and queryPandoc functions, to query
            or transform matching elements in a Pandoc structure.
        
          [ Peter Wang ]
        
          * Added new Texinfo writer.
        
          [ John MacFarlane ]
        
          * Changes to Texinfo writer:
        
            + No space between paragraph and following @verbatim (provides more
              pleasing appearance in text formats)
            + Blank line consistently after list environments.
            + Removed deVerb.
            + Use @code instead of @verb for inline code (this solves the character
              escaping problem for texi2dvi and texi2pdf).
            + Added news of Texinfo writer to README.
            + Added Texinfo to list of formats in man page, and removed extra 'groff'.
            + Added texi & texinfo extensions to Main.hs, and fixed bug in determining
              default output extension.
            + Modified disallowedInNode in Texinfo writer to correct list of disallowed characters.
        
          * Added tests for OpenDocument writer.
        
          * Added ODT writer (using zip-archive library to package output of
            OpenDocument writer).  Added odt-styles directory with default ODT styles.
        
          * Added new mediawiki writer and tests.
        
          * Markdown reader: Added support for delimited code blocks, with optional
            syntax highlighting using highlighting-kate (if the 'highlighting'
            configuration option is selected).
        
            + Currently highlighting is supported only in the HTML writer.
            + Delimited code blocks can have attributes; using the language name as
              class triggers highlighting.
            + New Attributes parameter in CodeBlock structure.
            + --version now indicates whether syntax highlighting support is compiled
              in, and prints a list of supported languages
        
          * Removed debian directory. Pandoc is no longer a native debian package.
        
          * Changes to build process:  pandoc can now be built from the repository
            using Cabal.  No unix tools are needed (so, pandoc can be built on Windows
            without Cygwin).
        
            + Include shell scripts themselves in repo, rather than generating from wrappers.
              Removed wrappers directory and wrappers Makefile target.
            + Text/Pandoc/ASCIIMathML.hs, Text/Pandoc/DefaultHeaders.hs,
              and Text/Pandoc/Writers/S5.hs are no longer built in Makefile
              from templates in the templates/ directory. Instead, they use template
              haskell to read data at compile time from the relevant files in data/.
              Template haskell functions go in a new module, Text.Pandoc.TH.
            + man pages are now generated in Setup.hs hook, not by Makefile
            + Makefile 'tarball' target now calls Cabal's 'sdist'
            + Added "Extra-Source-Files" to pandoc.cabal, so sdist contains everything needed
            + Added "Build-Type" field to pandoc.cabal to avoid warning.
            + Added to "Extra-source-files" and "Extra-tmp-files" in pandoc.cabal,
              so 'sdist' and 'clean' will work properly.
            + Setup.hs now generates man pages in a postbuild hook.
            + Added dependency-checking to Setup.hs, so it only rebuilds things
              that need rebuilding.
            + Added 'library' and 'executable' configuration flags.
              Cabal can now be told to build just the library or just the executable.
            + CABALOPTS may now be specified with 'make' to pass Cabal configuration flags.
              For example:  CABALOPTS=-fhighlighting make
        
          * Rewrote test suite so it doesn't depend on perl or unix tools.
        
            + Replaced old runtests.pl with a Haskell script RunTests.hs.
            + Added Diff.hs module to be used by RunTests.hs instead of unix 'diff'.
            + Added test hook to Setup.hs, so tests may be run from cabal.
            + Changed Makefile's 'test' target to run tests via cabal.
            + Removed old generate.sh.
            + Since we no longer have 'sed' to filter out raw HTML sections
              from the docbook writer test, or raw LaTeX sections from the
              context writer test, we now just include these sections.
              They can be taken out if it is necessary to process the files.
            + Updated latex and context writer tests to remove extra spaces
              after '\\item'
            + Added a markdown table reader test.
            + Added markdown-reader-more.txt to test suite, for additional test cases
              for raw ConTeXt environments and more.
        
          * Compatibility fixes for CPP, Cabal, and haddock:
        
            + Use CPP in "Extensions" field in pandoc.cabal.
            + Removed use of backslash string continuations in source files.
        
          * Removed pandoc.cabal.ghc66.  We now require Cabal >= 1.2, GHC >= 6.8,
            base >= 3.
        
          * Require parsec < 3.
            The compatibility module in parsec 3.0.0 gives far worse performance than
            parsec 2.1.  Eventually pandoc will be upgraded to use the new bytestring
            version of parsec, and then we'll go to parsec 3.0.0.
        
          * Removed Text.Regex dependencies by rewriting using plain Haskell
            (Text.Pandoc.Writers.RTF, Text.Pandoc.Writers.HTML, Main.hs)
        
          * Moved Text.Pandoc.Writers.DefaultHeaders -> Text.Pandoc.DefaultHeaders.
        
          * Makefile:
        
            + Added 'configure' as dependency of 'uninstall-all'.
              (It uses the Cabal build program.)
            + Makefile:  only use --with-hc-pkg if GHC_PKG is defined.
              Note that Cabal will automatically choose the ghc-pkg appropriate
              for the compiler selected, so normally specifying GHC by itself
              is sufficient.
        
          * Removed Text.Pandoc.UTF8 module; instead, depend on utf8-string and use
            its IO and conversion functions.
        
          * Added -Wall to ghc-options in pandoc.cabal.  Cleaned up modules so that
            everything is -Wall clean.
        
            + Added pragma to HTML writer to avoid deprecation warning for use of "start" attribute.
            + Added pragma to Text/Pandoc/Shared.hs to get rid of "orphan instance" warnings.
              (These are caused by the Lift instance for ByteString.)
        
          * Changed the comment used to replace unsafe HTML if sanitize-html option
            selected.
        
          * Made -c/--css option repeatable on the command line (like -H, -A, -B).
        
          * Moved XML-formatting functions to new unexported module Text.Pandoc.XML.
        
          * Escape '\160' as " ", not " " in XML.
            "nbsp" isn't a predefined XML entity.
        
          * Fixed bug in RST reader, which would choke on: "p. one\ntwo\n".
            Added some try's in ordered list parsers.
        
          * Man writer:  don't escape " as \".
        
          * Allow newline before URL in markdown link references.  Resolves Issue #81.
            Added tests for this issue in new "markdown-reader-more" tests.
            Changed RunTests.hs to run these tests.
        
          * Support for display math.  Resolves Issue #47.
        
            + Added a DisplayMath/InlineMath selector to Math inlines.
            + Markdown parser yields DisplayMath for $$...$$.
            + LaTeX parser yields DisplayMath when appropriate.  Removed
              mathBlock parsers, since the same effect is achieved by the math
              inline parsers, now that they handle display math.
            + Writers handle DisplayMath as appropriate for the format.
            + Modified tests accordingly; added new tests for display math.
        
          * Use LaTeXMathML instead of ASCIIMathML.  LaTeXMathML is closer
            to LaTeX in its display of math, and supports many non-math LaTeX environments.
        
            + Changed -m option to use LaTeXMathML rather than ASCIIMathML.
            + Modified HTML writer to print raw TeX when LaTeXMathML is
              being used instead of suppressing it.
            + Removed ASCIIMathML files from data/ and added LaTeXMathML.
            + Replaced ASCIIMathML with LaTeXMathML in source files.
            + Modified README and pandoc man page source.
            + Added --latexmathml option (kept --asciimathml as a synonym
              for backwards compatibility)
        
          * Markdown reader: Parse setext headers before atx headers.
            Test case:
               # hi
               ====
            parsed by Markdown.pl as an H1 header with contents "# hi".
        
          * Markdown reader: Treat "mixed" lists the same way as Markdown.pl does.
            The marker on the first list item determines the type of the whole
            list.  Thus, a list like
               1. one
               -  two
               *  three
            gets parsed as a single ordered list.  (Previous versions of pandoc
            treated this as an ordered list with an unordered sublist.)
        
          * Markdown smart typography:
        
            + Em dashes no longer eat surrounding whitespace.  Resolves Issue #69.
            + Use nonbreaking spaces after known abbreviations in markdown parser.
              Thus, for example, "Mr. Brown" comes out as "Mr.~Brown" in LaTeX, and does
              not produce a sentence-separating space.  Resolves Issue #75.
        
          * Markdown writer: Print unicode \160 literally, rather than as  .
        
          * Treat '\ ' in (extended) markdown as nonbreaking space.
            Print nonbreaking space appropriately in each writer (e.g. ~ in LaTeX).
        
          * The '--sanitize-html' option now examines URIs in markdown links
            and images, and in HTML href and src attributes.  If the URI scheme
            is not on a whitelist of safe schemes, it is rejected.  The main point
            is to prevent cross-site scripting attacks using 'javascript:' URIs.
            See http://www.mail-archive.com/markdown-discuss@six.pairlist.net/msg01186.html
            and http://ha.ckers.org/xss.html.  Resolves Issue #62.
        
          * HTML writer:
        
            + Override Text.XHtml's stringToHtml function,
              so that characters below 0xff are not converted to numerical entity
              references. Also convert '\160' to " ". This should aid readability
              and editability of the HTML source. It does presuppose that the HTML
              will be served as UTF-8.
            + In code blocks, change leading newlines to 
        tags. (Some browsers ignore them.) Resolves Issue #71. See http://six.pairlist.net/pipermail/markdown-discuss/2008-May/001297.html + Use style attributes rather than css classes for strikethrough and ordered list styles. This works better when fragments, rather than standalone documents, are generated. * HTML reader: Count anything that isn't a known block (HTML) tag as an inline tag (rather than the other way around). Added "html", "head", and "body" to list of block tags. Resolves Issue #66, allowing to count as an inline tag. * RTF writer: Fixed bug. Extra spaces were being printed after emphasized, boldface, and other inline elements. Resolves Issue #64. * LaTeX reader: improvements in raw LaTeX parsing. + "loose punctuation" (like {}) parsed as Space + Para elements must contain more than Str "" and Space elements + Added parser for "\ignore" command used in literate haskell. + Reworked unknownCommand and rawLaTeXInline: when not in "parse raw" mode, these parsers simply strip off the command part and allow the arguments to be parsed normally. So, for example, \blorg{\emph{hi}} will be parsed as Emph "hi" rather than Str "{\\emph{hi}}". + Parse lhs "code" environments as verbatim. Refactored parsers for verbatim environments. + Removed specialEnvironment parser. + parse '{}', if present, after \textless, \textgreater, \textbar, \textbackslash, \ldots. + Parse unescaped special characters verbatim rather than changing them to spaces. This way arguments of unknown commands will appear in braces. * Parse raw ConTeXt environments as TeX in markdown reader. Resolves Issue #73. * Moved BlockWrapper and wrappedBlocksToDoc from ConTeXt writer to Shared. * Made some structural changes to parsing of raw LaTeX environments. Previously there was a special block parser for LaTeX environments. It returned a Para element containing the raw TeX inline. This has been removed, and the raw LaTeX environment parser is now used in the rawLaTeXInline parser. The effect is exactly the same, except that we can now handle consecutive LaTeX and ConTeXt environments not separated by spaces. This new flexibility is required by the example in Issue #73: \placeformula \startformula L_{1} = L_{2} \stopformula API change: The LaTeX reader now exports rawLaTeXEnvironment' (which returns a string) rather than rawLaTeXEnvironment (which returns a block element). This is more likely to be useful in other applications. * Use \textsubscr instead of \textsubscript for LaTeX subscript macro. \textsubscript conflicts with a definition in the memoir class. Resolves Issue #65. * Removed unneeded space after "\\item" in LaTeX and ConTeXt output. * Added amsmath package to default LaTeX header. Resolves Issue #48. * Added \setupitemize[autointro] to ConTeXt header, to prevent orphaned list introduction lines. * Changed Float to Double in definition of Table element. (Double is more efficient in GHC.) * Fixed bug in Markdown parser: regular $s triggering math mode. For example: "shoes ($20) and socks ($5)." The fix consists in two new restrictions: + the $ that ends a math span may not be directly followed by a digit. + no blank lines may be included within a math span. Thanks to Joseph Reagle for noticing the bug. * Use Data.List's 'intercalate' instead of custom 'joinWithSep'. Removed 'joinWithSep' from Text.Pandoc.Shared. * Updated README and man pages. Acknowledge contributors in README. Added paragraph to README about producing S5 with separate CSS/javascript. * Updated INSTALL to reflect new build system (including configuration options) and document new dependencies. Added note to INSTALL that Cabal >= 1.2 is required for build. Resolves Issue #74. * Fixed some haddock documentation errors. * Small fix to markdown2pdf man page: only input needs to be piped through iconv. pandoc (0.46) unstable; urgency=low [ John MacFarlane ] * Made -H, -A, and -B options cumulative: if they are specified multiple times, multiple files will be included. * Added optional HTML sanitization using a whitelist. When this option is specified (--sanitize-html on the command line), unsafe HTML tags will be replaced by HTML comments, and unsafe HTML attributes will be removed. This option should be especially useful for those who want to use pandoc libraries in web applications, where users will provide the input. + Main.hs: Added --sanitize-html option. + Text.Pandoc.Shared: Added stateSanitizeHTML to ParserState. + Text.Pandoc.Readers.HTML: - Added whitelists of sanitaryTags and sanitaryAttributes. - Added parsers to check these lists (and state) to see if a given tag or attribute should be counted unsafe. - Modified anyHtmlTag and anyHtmlEndTag to replace unsafe tags with comments. - Modified htmlAttribute to remove unsafe attributes. - Modified htmlScript and htmlStyle to remove these elements if unsafe. + Modified README and man pages to document new option. * Improved handling of email addresses in markdown and reStructuredText. Consolidated uri and email address parsers. (Resolves Issue #37.) + New emailAddress and uri parsers in Text.Pandoc.Shared. - uri parser uses parseURI from Network.URI. - emailAddress parser properly handles email addresses with periods in them. + Removed uri and emailAddress parsers from Text.Pandoc.Readers.RST and Text.Pandoc.Readers.Markdown. * Markdown reader: + Fixed emph parser so that "*hi **there***" is parsed as a Strong nested in an Emph. (A '*' is only recognized as the end of the emphasis if it's not the beginning of a strong emphasis.) + Moved blockQuote parser before list parsers for performance. + Modified 'source' parser to allow backslash-escapes in URLs. So, for example, [my](/url\(1\)) yields a link to /url(1). Resolves Issue #34. + Disallowed links within links. (Resolves Issue #35.) - Replaced inlinesInBalanced with inlinesInBalancedBrackets, which instead of hard-coding the inline parser takes an inline parser as a parameter. - Modified reference and inlineNote to use inlinesInBalancedBrackets. - Removed unneeded inlineString function. - Added inlineNonLink parser, which is now used in the definition of reference. - Added inlineParsers list and redefined inline and inlineNonLink parsers in terms of it. - Added failIfLink parser. + Better handling of parentheses in URLs and quotation marks in titles. - 'source' parser first tries to parse URL with balanced parentheses; if that doesn't work, it tries to parse everything beginning with '(' and ending with ')'. - source parser now uses an auxiliary function source'. - linkTitle parser simplified and improved, under assumption that it will be called in context of source'. + Make 'block' conditional on strictness state, instead of using failIfStrict in block parsers. Use a different ordering of parsers in strict mode (raw HTML block before paragraph) for performance. In non-strict mode use rawHtmlBlocks instead of htmlBlock. Simplified htmlBlock, since we know it's only called in strict mode. + Improved handling of raw HTML. (Resolves Issue #36.) - Tags that can be either block or inline (e.g. ) should be treated as block when appropriate and as inline when appropriate. Thus, for example, hi should be treated as a paragraph with inline tags, while hi should be treated as a paragraph within tags. - Moved htmlBlock after para in list of block parsers. This ensures that tags that can be either block or inline get parsed as inline when appropriate. - Modified rawHtmlInline' so that block elements aren't treated as inline. - Modified para parser so that paragraphs containing only HTML tags and blank space are not allowed. Treat these as raw HTML blocks instead. + Fixed bug wherein HTML preceding a code block could cause it to be parsed as a paragraph. The problem is that the HTML parser used to eat all blank space after an HTML block, including the indentation of the code block. (Resolves Issue #39.) - In Text.Pandoc.Readers.HTML, removed parsing of following space from rawHtmlBlock. - In Text.Pandoc.Readers.Markdown, modified rawHtmlBlocks so that indentation is eaten *only* on the first line after the HTML block. This means that in
        foo
        the foo won't be treated as a code block, but in
        foo
        it will. This seems the right approach for least surprise. * RST reader: + Fixed bug in parsing explicit links (resolves Issue #44). The problem was that we were looking for inlines until a '<' character signaled the start of the URL; so, if you hit a reference-style link, it would keep looking til the end of the document. Fix: change inline => (notFollowedBy (char '`') >> inline). Note that this won't allow code inlines in links, but these aren't allowed in resT anyway. + Cleaned up parsing of reference names in key blocks and links. Allow nonquoted reference links to contain isolated '.', '-', '_', so so that strings like 'a_b_' count as links. + Removed unnecessary check for following link in str. This is unnecessary now that link is above str in the definition of 'inline'. * HTML reader: + Modified rawHtmlBlock so it parses and tags. This allows these tags to be handled correctly in Markdown. HTML reader now uses rawHtmlBlock', which excludes and , since these are handled in parseHtml. (Resolves Issue #38.) + Fixed bug (emph parser was looking for `` tag, not ``). + Don't interpret contents of style tags as markdown. (Resolves Issue #40.) - Added htmlStyle, analagous to htmlScript. - Use htmlStyle in htmlBlockElement and rawHtmlInline. - Moved "script" from the list of tags that can be either block or inline to the list of block tags. + Modified rawHtmlBlock to use anyHtmlBlockTag instead of anyHtmlTag and anyHtmlEndTag. This fixes a bug in markdown parsing, where inline tags would be included in raw HTML blocks. + Modified anyHtmlBlockTag to test for (not inline) rather than directly for block. This allows us to handle e.g. docbook in the markdown reader. * LaTeX reader: Properly recognize --parse-raw in rawLaTeXInline. Updated LaTeX reader test to use --parse-raw. * HTML writer: + Modified rules for automatic HTML header identifiers to ensure that identifiers begin with an alphabetic character. The new rules are described in README. (Resolves Issue #33.) + Changed handling of titles in HTML writer so you don't get "titleprefix - " followed by nothing. * ConTeXt writer: Use wrappers around Doc elements to ensure proper spacing. Each block element is wrapped with either Pad or Reg. Pad'ed elements are guaranteed to have a blank line in between. * RST writer: + Refactored RST writer to use a record instead of a tuple for state, and to include options in state so it doesn't need to be passed as a parameter. + Use an interpreted text role to render math in restructuredText. See http://www.american.edu/econ/itex2mml/mathhack.rst for the strategy. [ Recai Oktaş ] * Debian packaging changes: + Remove the empty 'include' directory in -dev package, which lintian complains about. + Bump Standarts-Version to 3.7.3. + Use new 'Homepage:' field to specify the upstream URL on suggestion of lintian. -- Recai Oktaş Tue, 08 Jan 2008 05:13:31 +0200 pandoc (0.45) unstable; urgency=low [ John MacFarlane ] * Simplified parsing of reference keys and notes in markdown and RST readers: The Reference data structure from Text.Pandoc.Shared is no longer needed, since referenceKey and noteBlock parses return strings (as many blank lines as were occupied by the key or note) and update state themselves. getPosition and setPosition are now used to ensure that error messages will give the correct line number. This yields cleaner (and slightly faster) code, with more accurate parsing error messages. * Added new Math inline element: + Markdown and LaTeX readers now convert TeX math into Math elements, not TeX. + This allows math to be treated differently from raw TeX in output. TeX elements are no longer printed in output formats other than Markdown, LaTeX, and ConTeXt. But Math elements are always printed. * New default handling of math in writers: + New module Text.Pandoc.Readers.TeXMath exports readTeXMath, which parses raw TeX math and outputs a string of Pandoc inlines that tries to render it as far as possible using unicode characters, lapsing into literal TeX when needed. + readTeXMath is now used for default HTML output in HTML, S5, RTF, and Docbook, if no other method for displaying math in HTML is specified. Enclosing $'s are no longer printed by default. + By default, math is put inside ``. This way it can be distinguished from the surrounding text, e.g. put in a different font. * New --gladtex and --mimetex options for display of math in HTML: + If --gladtex is specified, math is output between `` tags, so it can be processed by gladTeX. + If --mimetex is specified, math is put in `` tags with a link to the mimetex CGI script (or any other script that takes TeX math as input and outputs an image). The URL of the script may be specified, but defaults to /cgi-bin/mimetex.cgi. + HTMLMathMethod structure in WriterOptions keeps track of how to display math in HTML output. + Updated README with a description of the four options for displaying math in HTML. * HTML reader: + Fixed bug: parser for minimized attributes should not swallow trailing spaces. + Simplified HTML attribute parsing. + Changed parsing of code blocks in HTML reader: `` tag is no longer needed. `
        ` suffices. All HTML tags in the code block
              (e.g. for syntax highlighting) are skipped, because they are not
              portable to other output formats. A `...` block not
              surrounded by `
        ` now counts as inline HTML, not a code block.
            + Remove just one leading and one trailing newline from contents of
              `
        ...
        ` in codeBlock parser. * Markdown reader: + Removed support for box-style block quotes. + Require space before title in links and references. This fixes a bug in parsing URLs like http://silly/url(withparen). + Improved and simplified setextHeader parser. + Fixed logic in smart quote parsing, adding some needed 'try' statements. + Fixed smart quote parsing so that unicode characters 8216 and 8217 are recognized as single quotes, and 8220 and 8221 as double quotes. * RST reader: + Fixed bug in parsing of code blocks. Previously a full tab indent was required, but RST allows code to be indented any amount. Resolves Issue #27. + Allow field lists to be indented. + Parse the contents of field lists instead of treating as a raw string. + Represent field lists as definition lists instead of blockquotes. + Fixed bug in which metadata would be overridden if the document contained multiple field lists. + Parse fields associated with '.. image::' blocks, and use 'alt' field, if given, for image alt and title attributes. * LaTeX reader: + Modified specialChar so that '"' characters are parsed. + Fixed a bug in parsing of \[ \] math blocks (thanks to Mark Kalderon). * HTML writer: + Changes in handling of math (see above). + Don't produce HTML for table of contents if there are no headers. (This would be an empty list, which is invalid XHTML.) * Markdown writer: + Don't print title attribute if title is empty. (This differs from the behavior of Markdown.pl, and agrees with PHP Markdown. But John Gruber has indicated that he prefers this behavior.) Adjusted test suite accordingly. + Fixed incorrect line wrapping in paragraphs including hard line breaks. Resolves Issue #25. + Fixed bug in markdown writer: If an ordered list item began with a marker greater than 3 characters in width, and the item took more than one line, it would appear on the line after the list marker, e.g.: (12) My list item. Multiline. Now it works as follows: (12) My list item. Multiline. * RST writer + Fixed bug in RST writer's handling of ordered lists. Previously, list items with multiple lines would not always line up with single-line list items. Now, list items are nested the length of the list marker + 1. This looks better and ensures that list items all line up. (Note that list markers are padded to the length of the longest list marker in the series.) + Use 3-space indent for unordered lists. + If label for a link reference contains a colon, surround it by ` signs so it won't be interpreted as the end of the link label. * LaTeX writer: + Cleaner output for footnotes. Footnotes now always begin on a new line, and the final } is on a line by itself only when it needs to be (i.e. only when the note ends with a Verbatim environment). + Added writer options to state, so state doesn't need to be passed as a parameter. + Text wrapping now provided, using wrapTeXIfNeeded. * ConTeXt writer: many improvements for more idiomatic ConTeXt output (thanks to Idris Samawi Hamid for suggestions). + PrettyPrint module now used for output. + Writer options are now in state, so they don't have to be passed as a parameter. + Text wrapping now provided, using wrapTeXIfNeeded. + Better treatment of footnotes: footnotes are always on lines by themselves, and the final } is on a line by itself only when it needs to be (after \stoptyping). + Use \subject, \subsubject, ... or \section, \subsection, ... for headings, depending on whether --number-sections option is selected. + Extra blank line inserted after \stopitemize + Use new, "official" definition of blockquote environment. Also, use blank line after \startblockquote to balance blank line at the end. + Both itemized and enumerated lists are now generated using \start-stopitemize, with appropriate options. Removed definitions of ltxenum and ltxitem, which are no longer needed. Provided defaults for itemized lists in the preamble. State keeps track of ordered list level, so that when default numbering is specified, the appropriate scheme can be used. + Changed \useurl to \useURL. + Changed link color from red to blue. + Use \subsubsubsubsection etc., since these are supported (up to at least sub x 5). * Text.Pandoc.Shared: + Save and restore position in parseFromString, so that accurate error messages can be given. + Improved efficiency of romanNumeral parser. + Added wrappedTeX and wrapTeXIfNeeded functions. These ensure that footnotes occur on lines by themselves (to make them easier to see and move) and do not screw up line wrapping. * Text.Pandoc.UTF8: modified fromUTF8 to strip out the BOM if present. Windows Notepad and other applications insert a BOM at the beginning of a UTF8 file. * Main.hs (tabFilter): Treat '\r' at end of line as newline (in addition to "\r\n" and '\n'). * Added a writer option for wrapped text and a command-line option '--no-wrap', which disables text wrapping and minimizes whitespace in HTML. (Resolves Issue #26.) + Added support for '--no-wrap' to Main.hs. + Added wrapIfNeeded function to Text.Pandoc.Shared. + Use wrapIfNeeded instead of wrapped in the RST, Man, Docbook, and Markdown writers. + Added render and renderFragment helpers to HTML writer. * Modified html2markdown to run tidy only if the HTML cannot be parsed. Previously html2markdown piped all input through tidy before passing it to pandoc. This caused problems on certain pages (e.g. http://daringfireball.com/markdown) which have well-formed XHTML that causes tidy to choke. The solution is to pipe through tidy only if pandoc cannot parse the input by itself. This means that a temp file is now always used, even when input comes from a local file or standard input. * Removed 'version' constant from Main.hs; added 'pandocVersion' to Text.Pandoc library. * pandoc.cabal: + Modified to work with GHC 6.8 and Cabal configurations. (For GHC 6.8, pretty and containers must be added to Build-Depends, and it is desirable to use the -O2 compiler option.) Cabal configurations allows one to select options depending on the compiler version. For GHC 6.6, the splitBase option can be disabled. + pandoc.cabal.ghc66 is provided for users with older versions of Cabal, which do not support configurations. + Use Ghc-Prof-Options to ensure that '-auto-all' is used when '--enable-(executable|library)-profiling' is specified. Updated PROFILING instructions accordingly. * Makefile: + Makefile now checks GHC version. If GHC is 6.6, pandoc.cabal.ghc66 is copied to pandoc.cabal, and the old pandoc.cabal is copied to pandoc.cabal.orig. Otherwise, pandoc.cabal is copied to pandoc.cabal.orig but otherwise unmodified. This way, the Makefile will work properly with either GHC 6.6 or 6.8. + Changed BUILDCONF to point to dist/setup-config, not .setup-config. This is where current versions of Cabal put it. + Added $(BUILDCMD) target, so setup doesn't get compiled every time. + Removed dependency of templates on ./templates, which is circular now that templates is a subdirectory of the top-level. * MacPorts Portfile: + Modified to install the pandoc library in addition to programs. + Installation must be done manually rather than using Makefile's install-all. + Note that the library must be registered in the activate phase, after the library files have been copied out of the destroot. Cabal generates a 'register.sh' script that will do this. * debian/control: Added libghc6-network-dev, libghc6-xhtml-dev, and libghc6-mtl-dev as dependencies for libghc6-pandoc-dev. Closes: #445235 * debian/rules: Converted to UTF-8. * Changed pandoc home page to http://johnmacfarlane.net/pandoc/. * Updated ASCIIMathML.js to latest version. * Directory structure: + Moved everything from src into the top-level directory. + Changed references to source directory in Makefile and pandoc.cabal.*. + Moved ASCIIMathML.js, headers, and ui into templates directory. + Modified fillTemplates.pl to reflect new paths. [ Recai Oktaş ] * Makefile: Fixed the issue of having two copies of the library documentation under some usage scenarios. * Replaced 'ghc' with '$(GHC)' in Makefile, and made GHC and GHC_PKG configurable through the environment, to support unusual ghc installations. For example: GHC=/opt/ghc/bin/ghc GHC_PKG=/opt/ghc/bin/ghc-pkg make -- Recai Oktaş Sun, 07 Oct 2007 20:51:43 +0300 pandoc (0.44) unstable; urgency=low [ John MacFarlane ] * Fixed bug in HTML writer: when --toc was used, anchors were put around headers, which is invalid XHTML (block content within inline element). Now the anchors are put inside the header tags. Resolves Issue #23. * Added xmlns attribute to html element in html writer tests. This attribute is added by more recent versions of the xhtml library (>= 3000), and is required for valid XHTML. [ Recai Oktaş ] * On configure, compile 'Setup.hs' to 'setup' and use 'setup' as the build command instead of 'runhaskell', which, on some platforms (such as s390, alpha, m68k), throws the following error: runhaskell Setup.hs configure --prefix=/usr ghc-6.6.1: not built for interactive use This causes a serious FTBFS bug. Closes: #440668. -- Recai Oktaş Mon, 03 Sep 2007 18:24:02 +0300 pandoc (0.43) unstable; urgency=low [ John MacFarlane ] * The focus of this release is performance. The markdown parser is about five times faster than in 0.42, based on benchmarks with the TextMate manual. * Main.hs: Replaced CRFilter and tabFilter with single function tabFilter, which operates on the whole string rather than breaking it into lines, and handles dos-style line-endings as well as tabs. * Added separate LaTeX reader and native reader tests; removed round-trip tests. * Text.Pandoc.Shared: + Removed tabsToSpaces and tabsInLine (they were used only in Main.hs.) + General code cleanup (to elimante warnings when compiling with -Wall.) + Added 'wrapped' function, which helps wrap text into paragraphs, using the prettyprinting library. + Rewrote charsInBalanced and charsInBalanced'. - Documented restriction: open and close must be distinct characters. - Rearranged options for greater efficiency. - Bug fix: Changed inner call to charsInBalanced inside charsInBalanced' to charsInBalanced'. + anyLine now requires that the line end with a newline (not eof). This is a harmless assumption, since we always add newlines to the end of a block before parsing with anyLine, and it yields a 10% speed boost. + Removed unnecessary 'try' in anyLine. + Removed unneeded 'try' from romanNumeral parser. + Use notFollowedBy instead of notFollowedBy' in charsInBalanced. + Removed unneeded 'try' in parseFromString. + Removed unneeded 'try' from stringAnyCase. (Now it behaves like 'string'.) + Changed definition of 'enclosed' in Text.Pandoc.Shared so that 'try' is not automatically applied to the 'end' parser. Added 'try' in calls to 'enclosed' where needed. Slight speed increase. * Writers: + Replaced individual wrapping routines in RST, Man, and Markdown writers with 'wrapped' from Text.Pandoc.Shared. + Rewrote LaTeX writer to use the prettyprinting library, so we get word wrapping, etc. + Modified latex writer tests for new latex writer using prettyprinter. + Fixed bug in LaTeX writer: autolinks would not cause '\usepackage{url}' to be put in the document header. Also, changes to state in enumerated list items would be overwritten. + In Markdown writer, escape paragraphs that begin with ordered list markers, so they don't get interpreted as ordered lists. * Text.Pandoc.Reades.LaTeX: + Fixed bug in LaTeX reader, which wrongly assumed that the roman numeral after "enum" in "setcounter" would consist entirely of "i"s. 'enumiv' is legitimate. + LaTeX command and environment names can't contain numbers. + Rearranged order of parsers in inline for slight speed improvement. + Added '`' to special characters and 'unescapedChar'. * Text.Pandoc.Readers.RST: + Removed unneeded try's in RST reader; also minor code cleanup. + Removed tabchar. + Rearranged parsers in inline (doubled speed). * Text.Pandoc.Readers.Markdown: + Skip notes parsing if running in strict mode. (This yields a nice speed improvement in strict mode.) + Simplify autolink parsing code, using Network.URI to test for URIs. Added dependency on network library to debian/control and pandoc.cabal. + More perspicuous definition of nonindentSpaces. + Removed unneeded 'try' in 'rawLine'. + Combined linebreak and whitespace into a new whitespace parser, to avoid unnecessary reparsing of space characters. + Removed unnecessary 'try' in 'codeBlock', 'ellipses', 'noteMarker', 'multilineRow', 'dashedLine', 'rawHtmlBlocks'. + Use lookAhead in parsers for setext headers and definition lists to see if the next line begins appropriately; if not, don't waste any more time parsing. + Don't require blank lines after code block. (It's sufficient to end code block with a nonindented line.) + Changed definition of 'emph': italics with '_' must not be followed by an alphanumeric character. This is to help prevent interpretation of e.g. `[LC_TYPE]: my_type` as `[LCTYPE]:mytype`. + Improved Markdown.pl-compatibility in referenceLink: the two parts of a reference-style link may be separated by one space, but not more... [a] [link], [not] [a link]. + Fixed markdown inline code parsing so it better accords with Markdown.pl: the marker for the end of the code section is a clump of the same number of `'s with which the section began, followed by a non-` character. So, for example, ` h ``` i ` -> `h ``` i`. + Split 'title' into 'linkTitle' and 'referenceTitle', since the rules are slightly different. + Rewrote 'para' for greater efficiency. + Rewrote link parsers for greater efficiency. + Removed redundant 'referenceLink' in definition of inline (it's already in 'link'). + Refactored escapeChar so it doesn't need 'try'. + Refactored hrule for performance in Markdown reader. + More intelligent rearranging of 'inline' so that most frequently used parsers are tried first. + Removed tabchar parser, as whitespace handles tabs anyway. * Text.Pandoc.CharacterReferences: + Refactored. + Removed unnecessary 'try's for a speed improvement. + Removed unnecessary '&' and ';' from the entity table. * Build process: + Makefile: Get VERSION from cabal file, not Main.hs. + Modified MacPorts Portfile: - Depend on haddock - Build and install libraries and library documentation in addition to pandoc executable - Added template item for md5 sum in Portfile.in. - Incorporated changes from MacPorts repository (r28278). + FreeBSD port: Don't try to generate distinfo in Makefile. It can be made using 'make makesum' in FreeBSD. + Make both freebsd and macports targets depend on tarball. * Website and documentation: + Updated INSTALL instructions. + Added pandocwiki demo to website. + Removed local references to Portfile, since pandoc is now in the MacPorts repository. -- Recai Oktaş Sun, 02 Sep 2007 15:50:11 +0300 pandoc (0.42) unstable; urgency=low [ John MacFarlane ] * Main.hs: Use utf8 conversion on the extra files loaded with the -H, -C, -B, and -A options. This fixes problems with unicode characters in these files. * Exposed Text.Pandoc.ASCIIMathML, since it is imported in Text.Pandoc.Readers.HTML and without it we get a linking error when using the library. * Markdown reader: + Added new rule for enhanced markdown ordered lists: if the list marker is a capital letter followed by a period (including a single-letter capital roman numeral), then it must be followed by at least two spaces. The point of this is to avoid accidentally treating people's initials as list markers: a paragraph might begin, "B. Russell was an English philosopher," and this shouldn't be treated as a list. Documented change in README. + Blocks that start with "p. " and a digit are no longer treated as ordered lists (it's a page number). + Added a needed 'try' to listItem. + Removed check for a following setext header in endline. A full test is too inefficient (doubles benchmark time), and the substitute we had before is not 100% accurate. + Don't use Code elements for autolinks if --strict specified. * LaTeX writer: When a footnote ends with a Verbatim environment, the close } of the footnote cannot occur on the same line or an error occurs. Fixed this by adding a newline before the closing } of every footnote. * HTML writer: + Removed incorrect "{}" around style information in HTML tables. Column widths now work properly in HTML. + If --strict option is specified (and --toc is not), don't include identifiers in headers, for better Markdown compatibility. * Build process: + Separated $(web_dest) and website targets. + In website, index.txt is now constructed from template index.txt.in. + Added freebsd target to Markefile. This creates the freebsd Makefile from Makefile.in, and creates distinfo. Removed Makefile and distinfo from the repository. + Added macport target to Makefile. Portfile is built from template Portfile.in. + Removed OSX package targets. (Too many difficulties involving dependencies on dynamic libraries.) + More complete INSTALL instructions for all architectures. * Website: + Added a programming demo, pandocwiki. [ Recai Oktaş ] * Do not forget to close pandoc's ITP. Closes: #391666 -- Recai Oktaş Sun, 26 Aug 2007 22:51:32 +0300 pandoc (0.41) unstable; urgency=low [ John MacFarlane ] * Fixed bugs in HTML reader: + Skip material at end *only if* `` is present (previously, only part of the document would be parsed if an error was found; now a proper error message is given). + Added new constant eitherBlockOrInline with elements that may count either as block-level or as inline. Modified isInline and isBlock to take this into account. + Modified rawHtmlBlock to accept any tag (even an inline tag): this is innocuous, because rawHtmlBlock is tried only if a regular inline element can't be parsed. + Added a necessary 'try' in definition of 'para'. * Fixed bug in markdown ordered list parsing. The problem was that anyOrderedListStart did not check for a space following the ordered list marker. So in 'A.B. 2007' the parser would be expecting a list item, but would not find one, causing an error. Fixed a similar bug in the RST reader. Resolves Issue #22. * Refactored RST and Markdown readers using parseFromString. * LaTeX reader will now skip anything after \end{document}. * Fixed blockquote output in markdown writer: previously, block quotes in indented contexts would be indented only in the first line. * Added note to INSTALL about variations in versions of the xhtml library that can lead to failed tests (thanks to Leif LeBaron). -- Recai Oktaş Sun, 19 Aug 2007 23:26:07 +0300 pandoc (0.4) unstable; urgency=low [ John MacFarlane ] * Added two new output formats: groff man pages and ConTeXt. By default, output files with extensions ".ctx" and ".context" are assumed to be ConTeXt, and output files with single-digit extensions are assumed to be man pages. * Enhanced ordered lists (documented in README, under Lists): + The OrderedList block element now stores information about list number style, list number delimiter, and starting number. + The readers parse this information when possible. + The writers use this information to style ordered lists. + The enhancement can be disabled using the --strict option. * Added support for tables (with a new Table block element). Two kinds of tables are supported: a simple table with one-line rows, and a more complex variety with multiline rows. All output formats are supported, but only markdown tables are parsed at the moment. The syntax is documented in README. * Added support for definition lists (with a new DefinitionList block element). All output and input formats are supported. The syntax is documented in README. * Added support for superscripts and subscripts (with new Superscript and Subscript inline elements). All input and output formats. The syntax is documented in README. * Added support for strikeout (with a new Strikeout inline element). All input and output formats are supported. Thanks to Bradley Kuhn, who contributed a patch. The syntax is documented in README. Resolves Issue #18. * Added a --toc|--table-of-contents option. This causes an automatically generated table of contents (or an instruction that creates one) to be inserted at the beginning of the document. Not supported in S5, DocBook, or man page writers. * Modified the -m|--asciimathml option: + If an optional URL argument is provided, a link is inserted instead of the contents of the ASCIIMathML.js script. + Nothing is inserted unless the document actually contains LaTeX math. * Removed Blank block element as unnecessary. * Removed Key and Note blocks from the Pandoc data structure. All links are now stored as explicit links, and note contents are stored with the (inline) notes. + All link Targets are now explicit (URL, title) pairs; there is no longer a 'Ref' target. + Markdown and RST parsers now need to extract data from key and note blocks and insert them into the relevant inline elements. Other parsers have been simplified, since there is no longer any need to construct separate key and note blocks. + Markdown, RST, and HTML writers need to construct lists of notes; Markdown and RST writers need to construct lists of link references (when the --reference-links option is specified); and the RST writer needs to construct a list of image substitution references. All writers have been rewritten to use the State monad when state is required. + Several functions (generateReference, keyTable, replaceReferenceLinks, replaceRefLinksBlockList, and some auxiliaries used by them) have been removed from Text.Pandoc.Shared, since they are no longer needed. New functions and data structures (Reference, isNoteBlock, isKeyBlock, isLineClump) have been added. The functions inTags, selfClosingTag, inTagsSimple, and inTagsIndented have been moved to the DocBook writer, since that is now the only module that uses them. NoteTable is now exported in Text.Pandoc.Shared. + Added stateKeys and stateNotes to ParserState; removed stateKeyBlocks, stateKeysUsed, stateNoteBlocks, stateNoteIdentifiers, stateInlineLinks. + Added writerNotes and writerReferenceLinks to WriterOptions. * Added Text.Pandoc module that exports basic readers, writers, definitions, and utility functions. This should export everything needed for most uses of Pandoc libraries. The haddock documentation includes a short example program. * Text.Pandoc.ASCIIMathML is no longer an exported module. * Added Text.Pandoc.Blocks module to help in printing markdown and RST tables. This module provides functions for working with fixed-width blocks of text--e.g., placing them side by side, as in a table row. * Refactored to avoid reliance on Haskell's Text.Regex library, which (a) is slow, and (b) does not properly handle unicode. This fixed some strange bugs, e.g. in parsing S-cedilla, and improved performance. + Replaced 'gsub' with a general list function 'substitute' that does not rely on Text.Regex. + Rewrote extractTagType in HTML reader so that it doesn't use regexs. + In Markdown reader, replaced email regex test with a custom email autolink parser (autoLinkEmail). Also replaced selfClosingTag regex with a custom function isSelfClosingTag. + Modified Docbook writer so that it doesn't rely on Text.Regex for detecting 'mailto' links. + Removed escapePreservingRegex and reamped entity-handling functions in Text.Pandoc.Shared and Text.Pandoc.CharacterReferences to avoid reliance on Text.Regex (see below on character reference handling changes). * Renamed Text.Pandoc.Entities as Text.Pandoc.CharacterReferences. * Changed handling of XML entities. Entities are now parsed (and unicode characters returned) in the Markdown and HTML readers, rather than being handled in the writers. In HTML and Docbook writers, UTF-8 is now used instead of entities for characters above 128. This makes the HTML and DocBook output much more readable and more easily editable. + Removed sgmlHexEntity, sgmlDecimalEntity, sgmlNamedEntity, and sgmlCharacterEntity regexes from Text.Pandoc.Shared. + Renamed escapeSGMLChar to escapeCharForXML. Added escapeStringForXML. Moved both functions to Text.Pandoc.Writers.Docbook. + Added characterReference parser to Text.Pandoc.CharacterReferences. This parses a string and return a unicode character. + Rewrote decodeCharacterReferences to use the new parser instead of Text.Regex. + Added new charRef parser for Markdown and HTML, which replaces the old 'entity' parser. Added '&' as a special character in Markdown reader. + Modified HTML and Markdown readers to call decodeEntities on all raw strings (e.g. authors, dates, link titles), to ensure that no unprocessed entities are included in the native representation of the document. (In the HTML reader, most of this work is done by a change in extractAttributeName.) + In XML and Markdown output, escape unicode nonbreaking space as ' ', since a unicode non-breaking space is impossible to distinguish visually from a regular space. (Resolves Issue #3.) + Removed encodeEntitiesNumerical. + Use Data.Map for entityTable and (new) reverseEntityTable, for a slight performance boost over the old association list. + Removed unneeded decodeEntities from 'str' parser in HTML and Markdown readers. * Text.Pandoc.UTF8: Renamed encodeUTF8 to toUTF8, decodeUTF8 to fromUTF8, for clarity. * Replaced old haskell98 module names replaced by hierarchical module names, e.g. List by Data.List. Removed haskell98 from dependencies in pandoc.cabal, and added mtl (needed for state monad). Substituted xhtml for html. * Refactored and cleaned up character escaping in writers, using backslashEscapes and escapeStringUsing functions. * Instead of adding "\n\n" to the end of an input string in Main.hs, this is now done in the readers. This makes the libraries behave the way you'd expect from the pandoc program. Resolves Issue #10. * URLs and email addresses in autolinks are now typeset as Code. * In Main.hs, changed putStr to putStrLn -- mainly because MacOS X doesn't display the whole output unless there's a line ending. * Major code cleanup in all modules, for greater consistency, concision, and readability. * HTML reader: + Fixed several bugs (extractTagType, attribute parsing). + Remove Null blocks in lists of blocks when possible. + Allow HTML comments as raw HTML inline. * Markdown reader: + Ordered list items may no longer begin with uppercase letters, or letters greater than 'n'. (This prevents first initials and page reference, e.g. 'p. 400', from being parsed as beginning lists.) Also, numbers beginning list items may no longer end with ')', which is now allowed only after letters. Note: These changes may cause documents to be parsed differently. Users should take care in upgrading. + Changed autoLink parsing to conform better to Markdown.pl's behavior. `` is not treated as a link, but ``, ``, and `` are. + Cleaned up handling of embedded quotes in link titles. Now these are stored as a '"' character, not as '"'. + Use lookAhead parser for the 'first pass' (looking for reference keys), instead of parsing normally, then using setInput to reset input. This yields a slight performance boost. + Fixed several bugs in smart quote recognition. + Fixed bug in indentSpaces (which didn't properly handle cases with mixed spaces and tabs). + Consolidated 'text', 'special', and 'inline' into 'inline'. + Fixed bug which allowed URL and title to be separated by multiple blank lines in links and reference keys. They can be on separate lines but can't have blank lines between them. + Correctly handle bracketed text inside inline footnotes and links,using new function inlinesInBalanced. Resolves Issue #14. + Fixed bug in footnotes: links in footnotes were not being processed. Solution: three-stage parse. First, get all the reference keys and add information to state. Next, get all the notes and add information to state. (Reference keys may be needed at this stage.) Finally, parse everything else. + Replaced named constants like 'emphStart' with literals. + Removed an extra occurance of escapedChar in definition of inline. * RST reader: + Allow the URI in a RST hyperlink target to start on the line after the reference key. + Added 'try' in front of 'string', where needed, or used a different parser. This fixes a bug where ````` would not be correctly parsed as a verbatim `. + Fixed slow performance in parsing inline literals in RST reader. The problem was that ``#`` was seen by 'inline' as a potential link or image. Fix: inserted 'notFollowedBy (char '`')' in link parsers. Resolves Issue #8. + Use lookAhead instead of getInput/setInput in RST reader. Removed unneeded getState call, since lookAhead automatically saves and restores the parser state. + Allow hyperlink target URIs to be split over multiple lines, and to start on the line after the reference. Resolves Issue #7. + Fixed handling of autolinks. * LaTeX reader: + Replaced 'choice [(try (string ...), ...]' idiom with 'oneOfStrings', for clarity. + Added clauses for tilde and caret. Tilde is \ensuremath{\sim}, and caret is \^{}, not \^ as before. + Added parsing for \url. + Parse \texttt{} as code, provided there's nothing fancy inside. * HTML writer: + Modified HTML writer to use the Text.XHtml library. This results in cleaner, faster code, and it makes it easier to use Pandoc in other projects, like wikis, which use Text.XHtml. Two functions are now provided, writeHtml and writeHtmlString: the former outputs an Html structure, the latter a rendered string. The S5 writer is also changed, in parallel ways (writeS5, writeS5String). + The Html header is now written programmatically, so it has been removed from the 'headers' directory. The S5 header is still needed, but the doctype and some of the meta declarations have been removed, since they are written programatically. This change introduces a new dependency on the xhtml package. + Fixed two bugs in email obfuscation involving improper escaping of '&' in the `
        \f[] .fi .PP A shortcut form can also be used for specifying the language of the code block: .IP .nf \f[C] ```haskell qsort\ []\ =\ [] ``` \f[] .fi .PP This is equivalent to: .IP .nf \f[C] ```\ {.haskell} qsort\ []\ =\ [] ``` \f[] .fi .PP If the \f[C]fenced_code_attributes\f[] extension is disabled, but input contains class attribute(s) for the code block, the first class attribute will be printed after the opening fence as a bare word. .PP To prevent all highlighting, use the \f[C]\-\-no\-highlight\f[] flag. To set the highlighting style, use \f[C]\-\-highlight\-style\f[]. For more information on highlighting, see Syntax highlighting, below. .SS Line blocks .SS Extension: \f[C]line_blocks\f[] .PP 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. This is useful for verse and addresses: .IP .nf \f[C] |\ The\ limerick\ packs\ laughs\ anatomical |\ In\ space\ that\ is\ quite\ economical. |\ \ \ \ But\ the\ good\ ones\ I\[aq]ve\ seen |\ \ \ \ So\ seldom\ are\ clean |\ And\ the\ clean\ ones\ so\ seldom\ are\ comical |\ 200\ Main\ St. |\ Berkeley,\ CA\ 94718 \f[] .fi .PP The lines can be hard\-wrapped if needed, but the continuation line must begin with a space. .IP .nf \f[C] |\ The\ Right\ Honorable\ Most\ Venerable\ and\ Righteous\ Samuel\ L. \ \ Constable,\ Jr. |\ 200\ Main\ St. |\ Berkeley,\ CA\ 94718 \f[] .fi .PP This syntax is borrowed from reStructuredText. .SS Lists .SS Bullet lists .PP A bullet list is a list of bulleted list items. A bulleted list item begins with a bullet (\f[C]*\f[], \f[C]+\f[], or \f[C]\-\f[]). Here is a simple example: .IP .nf \f[C] *\ one *\ two *\ three \f[] .fi .PP This will produce a \[lq]compact\[rq] list. If you want a \[lq]loose\[rq] list, in which each item is formatted as a paragraph, put spaces between the items: .IP .nf \f[C] *\ one *\ two *\ three \f[] .fi .PP The bullets need not be flush with the left margin; they may be indented one, two, or three spaces. The bullet must be followed by whitespace. .PP List items look best if subsequent lines are flush with the first line (after the bullet): .IP .nf \f[C] *\ here\ is\ my\ first \ \ list\ item. *\ and\ my\ second. \f[] .fi .PP But Markdown also allows a \[lq]lazy\[rq] format: .IP .nf \f[C] *\ here\ is\ my\ first list\ item. *\ and\ my\ second. \f[] .fi .SS The four\-space rule .PP A list item may contain multiple paragraphs and other block\-level content. However, subsequent paragraphs must be preceded by a blank line and indented four spaces or a tab. The list will look better if the first paragraph is aligned with the rest: .IP .nf \f[C] \ \ *\ First\ paragraph. \ \ \ \ Continued. \ \ *\ Second\ paragraph.\ With\ a\ code\ block,\ which\ must\ be\ indented \ \ \ \ eight\ spaces: \ \ \ \ \ \ \ \ {\ code\ } \f[] .fi .PP List items may include other lists. In this case the preceding blank line is optional. The nested list must be indented four spaces or one tab: .IP .nf \f[C] *\ fruits \ \ \ \ +\ apples \ \ \ \ \ \ \ \ \-\ macintosh \ \ \ \ \ \ \ \ \-\ red\ delicious \ \ \ \ +\ pears \ \ \ \ +\ peaches *\ vegetables \ \ \ \ +\ broccoli \ \ \ \ +\ chard \f[] .fi .PP As noted above, Markdown allows you to write list items \[lq]lazily,\[rq] 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. .IP .nf \f[C] +\ A\ lazy,\ lazy,\ list item. +\ Another\ one;\ this\ looks bad\ but\ is\ legal. \ \ \ \ Second\ paragraph\ of\ second list\ item. \f[] .fi .PP \f[B]Note:\f[] Although the four\-space rule for continuation paragraphs 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 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 (including nested lists), and pandoc interprets it that way. .SS Ordered lists .PP 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 period and a space. The numbers themselves are ignored, so there is no difference between this list: .IP .nf \f[C] 1.\ \ one 2.\ \ two 3.\ \ three \f[] .fi .PP and this one: .IP .nf \f[C] 5.\ \ one 7.\ \ two 1.\ \ three \f[] .fi .SS Extension: \f[C]fancy_lists\f[] .PP 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 text that follows by at least one space, and, if the list marker is a capital letter with a period, by at least two spaces. .PP The \f[C]fancy_lists\f[] extension also allows `\f[C]#\f[]' to be used as an ordered list marker in place of a numeral: .IP .nf \f[C] #.\ one #.\ two \f[] .fi .SS Extension: \f[C]startnum\f[] .PP Pandoc also pays attention to the type of list marker used, and to the starting number, and both of these are preserved where possible in the output format. Thus, the following yields a list with numbers followed by a single parenthesis, starting with 9, and a sublist with lowercase roman numerals: .IP .nf \f[C] \ 9)\ \ Ninth 10)\ \ Tenth 11)\ \ Eleventh \ \ \ \ \ \ \ i.\ subone \ \ \ \ \ \ ii.\ subtwo \ \ \ \ \ iii.\ subthree \f[] .fi .PP Pandoc will start a new list each time a different type of list marker is used. So, the following will create three lists: .IP .nf \f[C] (2)\ Two (5)\ Three 1.\ \ Four *\ \ \ Five \f[] .fi .PP If default list markers are desired, use \f[C]#.\f[]: .IP .nf \f[C] #.\ \ one #.\ \ two #.\ \ three \f[] .fi .SS Definition lists .SS Extension: \f[C]definition_lists\f[] .PP Pandoc supports definition lists, using the syntax of PHP Markdown Extra with some extensions. .IP .nf \f[C] Term\ 1 :\ \ \ Definition\ 1 Term\ 2\ with\ *inline\ markup* :\ \ \ Definition\ 2 \ \ \ \ \ \ \ \ {\ some\ code,\ part\ of\ Definition\ 2\ } \ \ \ \ Third\ paragraph\ of\ definition\ 2. \f[] .fi .PP Each term must fit on one line, which may optionally be followed by a blank line, and must be followed by one or more definitions. A definition begins with a colon or tilde, which may be indented one or two spaces. .PP 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 \[lq]lazily\[rq] omit indentation except at the beginning of a paragraph or other block element: .IP .nf \f[C] Term\ 1 :\ \ \ Definition with\ lazy\ continuation. \ \ \ \ Second\ paragraph\ of\ the\ definition. \f[] .fi .PP If you leave space before the definition (as in the example above), the text of the definition will be treated as a paragraph. In some output formats, this will mean greater spacing between term/definition pairs. For a more compact definition list, omit the space before the definition: .IP .nf \f[C] Term\ 1 \ \ ~\ Definition\ 1 Term\ 2 \ \ ~\ Definition\ 2a \ \ ~\ Definition\ 2b \f[] .fi .PP Note that space between items in a definition list is required. (A variant that loosens this requirement, but disallows \[lq]lazy\[rq] hard wrapping, can be activated with \f[C]compact_definition_lists\f[]: see Non\-pandoc extensions, below.) .SS Numbered example lists .SS Extension: \f[C]example_lists\f[] .PP The special list marker \f[C]\@\f[] can be used for sequentially numbered examples. The first list item with a \f[C]\@\f[] marker will be numbered `1', the next `2', and so on, throughout the document. The numbered examples need not occur in a single list; each new list using \f[C]\@\f[] will take up where the last stopped. So, for example: .IP .nf \f[C] (\@)\ \ My\ first\ example\ will\ be\ numbered\ (1). (\@)\ \ My\ second\ example\ will\ be\ numbered\ (2). Explanation\ of\ examples. (\@)\ \ My\ third\ example\ will\ be\ numbered\ (3). \f[] .fi .PP Numbered examples can be labeled and referred to elsewhere in the document: .IP .nf \f[C] (\@good)\ \ This\ is\ a\ good\ example. As\ (\@good)\ illustrates,\ ... \f[] .fi .PP The label can be any string of alphanumeric characters, underscores, or hyphens. .SS Compact and loose lists .PP Pandoc behaves differently from \f[C]Markdown.pl\f[] on some \[lq]edge cases\[rq] involving lists. Consider this source: .IP .nf \f[C] +\ \ \ First +\ \ \ Second: \ \ \ \ \-\ \ \ Fee \ \ \ \ \-\ \ \ Fie \ \ \ \ \-\ \ \ Foe +\ \ \ Third \f[] .fi .PP Pandoc transforms this into a \[lq]compact list\[rq] (with no \f[C]

        \f[] tags around \[lq]First\[rq], \[lq]Second\[rq], or \[lq]Third\[rq]), while Markdown puts \f[C]

        \f[] tags around \[lq]Second\[rq] and \[lq]Third\[rq] (but not \[lq]First\[rq]), because of the blank space around \[lq]Third\[rq]. Pandoc follows a simple rule: if the text is followed by a blank line, it is treated as a paragraph. Since \[lq]Second\[rq] 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 \f[C]markdown_strict\f[] format is specified. 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 .PP What if you want to put an indented code block after a list? .IP .nf \f[C] \-\ \ \ item\ one \-\ \ \ item\ two \ \ \ \ {\ my\ code\ block\ } \f[] .fi .PP 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 To \[lq]cut off\[rq] the list after item two, you can insert some non\-indented content, like an HTML comment, which won't produce visible output in any format: .IP .nf \f[C] \-\ \ \ item\ one \-\ \ \ item\ two \ \ \ \ {\ my\ code\ block\ } \f[] .fi .PP You can use the same trick if you want two consecutive lists instead of one big list: .IP .nf \f[C] 1.\ \ one 2.\ \ two 3.\ \ three 1.\ \ uno 2.\ \ dos 3.\ \ tres \f[] .fi .SS Horizontal rules .PP A line containing a row of three or more \f[C]*\f[], \f[C]\-\f[], or \f[C]_\f[] characters (optionally separated by spaces) produces a horizontal rule: .IP .nf \f[C] *\ \ *\ \ *\ \ * \-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \f[] .fi .SS Tables .PP Four kinds of tables may be used. The first three kinds presuppose the use of a fixed\-width font, such as Courier. The fourth kind can be used with proportionally spaced fonts, as it does not require lining up columns. .SS Extension: \f[C]table_captions\f[] .PP A caption may optionally be provided with all 4 kinds of tables (as illustrated in the examples below). A caption is a paragraph beginning with the string \f[C]Table:\f[] (or just \f[C]:\f[]), which will be stripped off. It may appear either before or after the table. .SS Extension: \f[C]simple_tables\f[] .PP Simple tables look like this: .IP .nf \f[C] \ \ Right\ \ \ \ \ Left\ \ \ \ \ Center\ \ \ \ \ Default \-\-\-\-\-\-\-\ \ \ \ \ \-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\ \ \ \-\-\-\-\-\-\- \ \ \ \ \ 12\ \ \ \ \ 12\ \ \ \ \ \ \ \ 12\ \ \ \ \ \ \ \ \ \ \ \ 12 \ \ \ \ 123\ \ \ \ \ 123\ \ \ \ \ \ \ 123\ \ \ \ \ \ \ \ \ \ 123 \ \ \ \ \ \ 1\ \ \ \ \ 1\ \ \ \ \ \ \ \ \ \ 1\ \ \ \ \ \ \ \ \ \ \ \ \ 1 Table:\ \ Demonstration\ of\ simple\ table\ syntax. \f[] .fi .PP The headers and table rows must each fit on one line. Column alignments are determined by the position of the header text relative to the dashed line below it: .IP \[bu] 2 If the dashed line is flush with the header text on the right side but extends beyond it on the left, the column is right\-aligned. .IP \[bu] 2 If the dashed line is flush with the header text on the left side but extends beyond it on the right, the column is left\-aligned. .IP \[bu] 2 If the dashed line extends beyond the header text on both sides, the column is centered. .IP \[bu] 2 If the dashed line is flush with the header text on both sides, the default alignment is used (in most cases, this will be left). .PP The table must end with a blank line, or a line of dashes followed by a blank line. .PP The column headers may be omitted, provided a dashed line is used to end the table. For example: .IP .nf \f[C] \-\-\-\-\-\-\-\ \ \ \ \ \-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\ \ \ \-\-\-\-\-\-\- \ \ \ \ \ 12\ \ \ \ \ 12\ \ \ \ \ \ \ \ 12\ \ \ \ \ \ \ \ \ \ \ \ \ 12 \ \ \ \ 123\ \ \ \ \ 123\ \ \ \ \ \ \ 123\ \ \ \ \ \ \ \ \ \ \ 123 \ \ \ \ \ \ 1\ \ \ \ \ 1\ \ \ \ \ \ \ \ \ \ 1\ \ \ \ \ \ \ \ \ \ \ \ \ \ 1 \-\-\-\-\-\-\-\ \ \ \ \ \-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\ \ \ \-\-\-\-\-\-\- \f[] .fi .PP When headers are omitted, column alignments are determined on the basis of the first line of the table body. So, in the tables above, the columns would be right, left, center, and right aligned, respectively. .SS Extension: \f[C]multiline_tables\f[] .PP Multiline tables allow headers and table rows to span multiple lines of text (but cells that span multiple columns or rows of the table are not supported). Here is an example: .IP .nf \f[C] \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \ Centered\ \ \ Default\ \ \ \ \ \ \ \ \ \ \ Right\ Left \ \ Header\ \ \ \ Aligned\ \ \ \ \ \ \ \ \ Aligned\ Aligned \-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \ \ \ First\ \ \ \ row\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 12.0\ Example\ of\ a\ row\ that \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ spans\ multiple\ lines. \ \ Second\ \ \ \ row\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 5.0\ Here\[aq]s\ another\ one.\ Note \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ blank\ line\ between \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rows. \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- Table:\ Here\[aq]s\ the\ caption.\ It,\ too,\ may\ span multiple\ lines. \f[] .fi .PP These work like simple tables, but with the following differences: .IP \[bu] 2 They must begin with a row of dashes, before the header text (unless the headers are omitted). .IP \[bu] 2 They must end with a row of dashes, then a blank line. .IP \[bu] 2 The rows must be separated by blank lines. .PP 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. .PP Headers may be omitted in multiline tables as well as simple tables: .IP .nf \f[C] \-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \ \ \ First\ \ \ \ row\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 12.0\ Example\ of\ a\ row\ that \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ spans\ multiple\ lines. \ \ Second\ \ \ \ row\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 5.0\ Here\[aq]s\ another\ one.\ Note \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ blank\ line\ between \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rows. \-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- :\ Here\[aq]s\ a\ multiline\ table\ without\ headers. \f[] .fi .PP It is possible for a multiline table to have just one row, but the row should be followed by a blank line (and then the row of dashes that ends the table), or the table may be interpreted as a simple table. .SS Extension: \f[C]grid_tables\f[] .PP Grid tables look like this: .IP .nf \f[C] :\ Sample\ grid\ table. +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ |\ Fruit\ \ \ \ \ \ \ \ \ |\ Price\ \ \ \ \ \ \ \ \ |\ Advantages\ \ \ \ \ \ \ \ \ | +===============+===============+====================+ |\ Bananas\ \ \ \ \ \ \ |\ $1.34\ \ \ \ \ \ \ \ \ |\ \-\ built\-in\ wrapper\ | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \-\ bright\ color\ \ \ \ \ | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ |\ Oranges\ \ \ \ \ \ \ |\ $2.10\ \ \ \ \ \ \ \ \ |\ \-\ cures\ scurvy\ \ \ \ \ | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \-\ tasty\ \ \ \ \ \ \ \ \ \ \ \ | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ \f[] .fi .PP The row of \f[C]=\f[]s separates the header from the table body, and can be omitted for a headerless table. The cells of grid tables may contain arbitrary block elements (multiple paragraphs, code blocks, lists, etc.). Cells that span multiple columns or rows are not supported. Grid tables can be created easily using Emacs table mode. .PP Alignments can be specified as with pipe tables, by putting colons at the boundaries of the separator line after the header: .IP .nf \f[C] +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ |\ Right\ \ \ \ \ \ \ \ \ |\ Left\ \ \ \ \ \ \ \ \ \ |\ Centered\ \ \ \ \ \ \ \ \ \ \ | +==============:+:==============+:==================:+ |\ Bananas\ \ \ \ \ \ \ |\ $1.34\ \ \ \ \ \ \ \ \ |\ built\-in\ wrapper\ \ \ | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ \f[] .fi .PP For headerless tables, the colons go on the top line instead: .IP .nf \f[C] +\-\-\-\-\-\-\-\-\-\-\-\-\-\-:+:\-\-\-\-\-\-\-\-\-\-\-\-\-\-+:\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-:+ |\ Right\ \ \ \ \ \ \ \ \ |\ Left\ \ \ \ \ \ \ \ \ \ |\ Centered\ \ \ \ \ \ \ \ \ \ \ | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ \f[] .fi .SS Extension: \f[C]pipe_tables\f[] .PP Pipe tables look like this: .IP .nf \f[C] |\ Right\ |\ Left\ |\ Default\ |\ Center\ | |\-\-\-\-\-\-:|:\-\-\-\-\-|\-\-\-\-\-\-\-\-\-|:\-\-\-\-\-\-:| |\ \ \ 12\ \ |\ \ 12\ \ |\ \ \ \ 12\ \ \ |\ \ \ \ 12\ \ | |\ \ 123\ \ |\ \ 123\ |\ \ \ 123\ \ \ |\ \ \ 123\ \ | |\ \ \ \ 1\ \ |\ \ \ \ 1\ |\ \ \ \ \ 1\ \ \ |\ \ \ \ \ 1\ \ | \ \ :\ Demonstration\ of\ pipe\ table\ syntax. \f[] .fi .PP 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 with blank cells. .PP Since the pipes indicate column boundaries, columns need not be vertically aligned, as they are in the above example. So, this is a perfectly legal (though ugly) pipe table: .IP .nf \f[C] fruit|\ price \-\-\-\-\-|\-\-\-\-\-: apple|2.05 pear|1.37 orange|3.09 \f[] .fi .PP The cells of pipe tables cannot contain block elements like paragraphs and lists, and cannot span multiple lines. If a pipe table contains a row whose printable content is wider than the column width (see \f[C]\-\-columns\f[]), then the cell contents will wrap, with the relative cell widths determined by the widths of the separator lines. .PP Note: pandoc also recognizes pipe tables of the following form, as can be produced by Emacs' orgtbl\-mode: .IP .nf \f[C] |\ One\ |\ Two\ \ \ | |\-\-\-\-\-+\-\-\-\-\-\-\-| |\ my\ \ |\ table\ | |\ is\ \ |\ nice\ \ | \f[] .fi .PP The difference is that \f[C]+\f[] is used instead of \f[C]|\f[]. Other orgtbl features are not supported. In particular, to get non\-default column alignment, you'll need to add colons as above. .SS Metadata blocks .SS Extension: \f[C]pandoc_title_block\f[] .PP If the file begins with a title block .IP .nf \f[C] %\ title %\ author(s)\ (separated\ by\ semicolons) %\ date \f[] .fi .PP it will be parsed as bibliographic information, not regular text. (It will be used, for example, in the title of standalone LaTeX or HTML output.) The block may contain just a title, a title and an author, or all three elements. If you want to include an author but no title, or a title and a date but no author, you need a blank line: .IP .nf \f[C] % %\ Author %\ My\ title % %\ June\ 15,\ 2006 \f[] .fi .PP The title may occupy multiple lines, but continuation lines must begin with leading space, thus: .IP .nf \f[C] %\ My\ title \ \ on\ multiple\ lines \f[] .fi .PP If a document has multiple authors, the authors may be put on separate lines with leading space, or separated by semicolons, or both. So, all of the following are equivalent: .IP .nf \f[C] %\ Author\ One \ \ Author\ Two %\ Author\ One;\ Author\ Two %\ Author\ One; \ \ Author\ Two \f[] .fi .PP The date must fit on one line. .PP All three metadata fields may contain standard inline formatting (italics, links, footnotes, etc.). .PP Title blocks will always be parsed, but they will affect the output only when the \f[C]\-\-standalone\f[] (\f[C]\-s\f[]) option is chosen. In HTML output, titles will appear twice: once in the document head \[en] this is the title that will appear at the top of the window in a browser \[en] and once at the beginning of the document body. The title in the document head can have an optional prefix attached (\f[C]\-\-title\-prefix\f[] or \f[C]\-T\f[] option). The title in the body appears as an H1 element with class \[lq]title\[rq], so it can be suppressed or reformatted with CSS. If a title prefix is specified with \f[C]\-T\f[] and no title block appears in the document, the title prefix will be used by itself as the HTML title. .PP The man page writer extracts a title, man page section number, and other header and footer information from the title line. The title is assumed to be the first word on the title line, which may optionally end with a (single\-digit) section number in parentheses. (There should be no space between the title and the parentheses.) Anything after this is assumed to be additional footer and header text. A single pipe character (\f[C]|\f[]) should be used to separate the footer text from the header text. Thus, .IP .nf \f[C] %\ PANDOC(1) \f[] .fi .PP will yield a man page with the title \f[C]PANDOC\f[] and section 1. .IP .nf \f[C] %\ PANDOC(1)\ Pandoc\ User\ Manuals \f[] .fi .PP will also have \[lq]Pandoc User Manuals\[rq] in the footer. .IP .nf \f[C] %\ PANDOC(1)\ Pandoc\ User\ Manuals\ |\ Version\ 4.0 \f[] .fi .PP will also have \[lq]Version 4.0\[rq] in the header. .SS Extension: \f[C]yaml_metadata_block\f[] .PP A YAML metadata block is a valid YAML object, delimited by a line of three hyphens (\f[C]\-\-\-\f[]) at the top and a line of three hyphens (\f[C]\-\-\-\f[]) or three dots (\f[C]\&...\f[]) at the bottom. 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 files: .IP .nf \f[C] pandoc\ chap1.md\ chap2.md\ chap3.md\ metadata.yaml\ \-s\ \-o\ book.html \f[] .fi .PP Just be sure that the YAML file begins with \f[C]\-\-\-\f[] and ends with \f[C]\-\-\-\f[] or \f[C]\&...\f[].) .PP 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 with names ending in an underscore will be ignored by pandoc. (They may be given a role by external processors.) .PP A document may contain multiple metadata blocks. 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 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 the document. .PP Note that YAML escaping rules must be followed. Thus, for example, if a title contains a colon, it must be quoted. The pipe character (\f[C]|\f[]) can be used to begin an indented block that will be interpreted literally, without need for escaping. This form is necessary when the field contains blank lines: .IP .nf \f[C] \-\-\- title:\ \ \[aq]This\ is\ the\ title:\ it\ contains\ a\ colon\[aq] author: \-\ Author\ One \-\ Author\ Two tags:\ [nothing,\ nothingness] abstract:\ | \ \ This\ is\ the\ abstract. \ \ It\ consists\ of\ two\ paragraphs. \&... \f[] .fi .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[] field: .IP .nf \f[C]

        This\ is\ the\ abstract.

        It\ consists\ of\ two\ paragraphs.

        \f[] .fi .PP Variables can contain arbitrary YAML structures, but the template must match this structure. The \f[C]author\f[] variable in the default templates expects a simple list or string, but can be changed to support more complicated structures. The following combination, for example, would add an affiliation to the author if one is given: .IP .nf \f[C] \-\-\- title:\ The\ document\ title author: \-\ name:\ Author\ One \ \ affiliation:\ University\ of\ Somewhere \-\ name:\ Author\ Two \ \ affiliation:\ University\ of\ Nowhere \&... \f[] .fi .PP To use the structured authors in the example above, you would need a custom template: .IP .nf \f[C] $for(author)$ $if(author.name)$ $author.name$$if(author.affiliation)$\ ($author.affiliation$)$endif$ $else$ $author$ $endif$ $endfor$ \f[] .fi .SS Backslash escapes .SS Extension: \f[C]all_symbols_escapable\f[] .PP Except inside a code block or inline code, any punctuation or space character preceded by a backslash will be treated literally, even if it would normally indicate formatting. Thus, for example, if one writes .IP .nf \f[C] *\\*hello\\** \f[] .fi .PP one will get .IP .nf \f[C] *hello* \f[] .fi .PP instead of .IP .nf \f[C] hello \f[] .fi .PP This rule is easier to remember than standard Markdown's rule, which allows only the following characters to be backslash\-escaped: .IP .nf \f[C] \\`*_{}[]()>#+\-.! \f[] .fi .PP (However, if the \f[C]markdown_strict\f[] format is used, the standard 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 \f[C]\\ \f[] or \f[C]\\ \f[]. .PP 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 \f[C]\\\\\f[] and in HTML as \f[C]\f[]. This is a nice alternative to Markdown's \[lq]invisible\[rq] way of indicating hard line breaks using two trailing spaces on a line. .PP Backslash escapes do not work in verbatim contexts. .SS Smart punctuation .SS Extension .PP If the \f[C]\-\-smart\f[] option is specified, pandoc will 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 \[lq]Mr.\[rq] .PP Note: if your LaTeX template or any included header file call 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 To \f[I]emphasize\f[] some text, surround it with \f[C]*\f[]s or \f[C]_\f[], like this: .IP .nf \f[C] This\ text\ is\ _emphasized\ with\ underscores_,\ and\ this is\ *emphasized\ with\ asterisks*. \f[] .fi .PP Double \f[C]*\f[] or \f[C]_\f[] produces \f[B]strong emphasis\f[]: .IP .nf \f[C] This\ is\ **strong\ emphasis**\ and\ __with\ underscores__. \f[] .fi .PP A \f[C]*\f[] or \f[C]_\f[] character surrounded by spaces, or backslash\-escaped, will not trigger emphasis: .IP .nf \f[C] This\ is\ *\ not\ emphasized\ *,\ and\ \\*neither\ is\ this\\*. \f[] .fi .SS Extension: \f[C]intraword_underscores\f[] .PP Because \f[C]_\f[] is sometimes used inside words and identifiers, pandoc does not interpret a \f[C]_\f[] surrounded by alphanumeric characters as an emphasis marker. If you want to emphasize just part of a word, use \f[C]*\f[]: .IP .nf \f[C] feas*ible*,\ not\ feas*able*. \f[] .fi .SS Strikeout .SS Extension: \f[C]strikeout\f[] .PP To strikeout a section of text with a horizontal line, begin and end it with \f[C]~~\f[]. Thus, for example, .IP .nf \f[C] This\ ~~is\ deleted\ text.~~ \f[] .fi .SS Superscripts and subscripts .SS Extension: \f[C]superscript\f[], \f[C]subscript\f[] .PP Superscripts may be written by surrounding the superscripted text by \f[C]^\f[] characters; subscripts may be written by surrounding the subscripted text by \f[C]~\f[] characters. Thus, for example, .IP .nf \f[C] H~2~O\ is\ a\ liquid.\ \ 2^10^\ is\ 1024. \f[] .fi .PP If the superscripted or subscripted text contains spaces, these spaces must be escaped with backslashes. (This is to prevent accidental superscripting and subscripting through the ordinary use of \f[C]~\f[] and \f[C]^\f[].) Thus, if you want the letter P with `a cat' in subscripts, use \f[C]P~a\\\ cat~\f[], not \f[C]P~a\ cat~\f[]. .SS Verbatim .PP To make a short span of text verbatim, put it inside backticks: .IP .nf \f[C] What\ is\ the\ difference\ between\ `>>=`\ and\ `>>`? \f[] .fi .PP If the verbatim text includes a backtick, use double backticks: .IP .nf \f[C] Here\ is\ a\ literal\ backtick\ ``\ `\ ``. \f[] .fi .PP (The spaces after the opening backticks and before the closing backticks will be ignored.) .PP 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 in verbatim contexts: .IP .nf \f[C] This\ is\ a\ backslash\ followed\ by\ an\ asterisk:\ `\\*`. \f[] .fi .SS Extension: \f[C]inline_code_attributes\f[] .PP Attributes can be attached to verbatim text, just as with fenced code blocks: .IP .nf \f[C] `<$>`{.haskell} \f[] .fi .SS Small caps .PP To write small caps, you can use an HTML span tag: .IP .nf \f[C] Small\ caps \f[] .fi .PP (The semicolon is optional and there may be space after the colon.) This will work in all output formats that support small caps. .PP Alternatively, you can also use the new \f[C]bracketed_spans\f[] syntax: .IP .nf \f[C] [Small\ caps]{style="font\-variant:small\-caps;"} \f[] .fi .SS Math .SS Extension: \f[C]tex_math_dollars\f[] .PP Anything between two \f[C]$\f[] characters will be treated as TeX math. The opening \f[C]$\f[] must have a non\-space character immediately to its right, while the closing \f[C]$\f[] must have a non\-space character immediately to its left, and must not be followed immediately by a digit. Thus, \f[C]$20,000\ and\ $30,000\f[] won't parse as math. If for some reason you need to enclose text in literal \f[C]$\f[] characters, backslash\-escape them and they won't be treated as math delimiters. .PP TeX math will be printed in all output formats. How it is rendered depends on the output format: .TP .B Markdown, LaTeX, Emacs Org mode, ConTeXt, ZimWiki 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[]. .RS .RE .TP .B AsciiDoc It will be rendered as \f[C]latexmath:[...]\f[]. .RS .RE .TP .B Texinfo It will be rendered inside a \f[C]\@math\f[] command. .RS .RE .TP .B groff man It will be rendered verbatim without \f[C]$\f[]'s. .RS .RE .TP .B MediaWiki, DokuWiki It will be rendered inside \f[C]\f[] tags. .RS .RE .TP .B Textile It will be rendered inside \f[C]\f[] tags. .RS .RE .TP .B RTF, OpenDocument, ODT It will be rendered, if possible, using Unicode characters, and will otherwise appear verbatim. .RS .RE .TP .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. Otherwise it will be rendered, if possible, using Unicode characters. .RS .RE .TP .B Docx It will be rendered using OMML math markup. .RS .RE .TP .B FictionBook2 If the \f[C]\-\-webtex\f[] option is used, formulas are rendered as images using CodeCogs or other compatible web service, downloaded and embedded in the e\-book. Otherwise, they will appear verbatim. .RS .RE .TP .B HTML, Slidy, DZSlides, S5, EPUB The way math is rendered in HTML will depend on the command\-line options selected: .RS .IP "1." 3 The default is to render TeX math as far as possible using Unicode characters, as with RTF, DocBook, and OpenDocument output. Formulas are put inside a \f[C]span\f[] with \f[C]class="math"\f[], so that they may be styled differently from the surrounding text if needed. .IP "2." 3 If the \f[C]\-\-latexmathml\f[] option is used, TeX math will be displayed between \f[C]$\f[] or \f[C]$$\f[] characters and put in \f[C]\f[] tags with class \f[C]LaTeX\f[]. The LaTeXMathML script will be used to render it as formulas. (This trick does not work in all browsers, but it works in Firefox. In browsers that do not support LaTeXMathML, TeX math will appear verbatim between \f[C]$\f[] characters.) .IP "3." 3 If the \f[C]\-\-jsmath\f[] option is used, TeX math will be put inside \f[C]\f[] tags (for inline math) or \f[C]
        \f[] tags (for display math) with class \f[C]math\f[]. The jsMath script will be used to render it. .IP "4." 3 If the \f[C]\-\-mimetex\f[] option is used, the mimeTeX CGI script will be called to generate images for each TeX formula. This should work in all browsers. The \f[C]\-\-mimetex\f[] option takes an optional URL as argument. If no URL is specified, it will be assumed that the mimeTeX CGI script is at \f[C]/cgi\-bin/mimetex.cgi\f[]. .IP "5." 3 If the \f[C]\-\-gladtex\f[] option is used, TeX formulas will be enclosed in \f[C]\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 HTML file with links to these images. So, the procedure is: .RS 4 .IP .nf \f[C] pandoc\ \-s\ \-\-gladtex\ myfile.txt\ \-o\ myfile.htex gladtex\ \-d\ myfile\-images\ myfile.htex #\ produces\ myfile.html\ and\ images\ in\ myfile\-images \f[] .fi .RE .IP "6." 3 If the \f[C]\-\-webtex\f[] option is used, TeX formulas will be converted to \f[C]\f[] tags that link to an external script that converts formulas to images. The formula will be URL\-encoded and concatenated with the URL provided. If no URL is specified, the CodeCogs will be used (\f[C]https://latex.codecogs.com/png.latex?\f[]). .IP "7." 3 If the \f[C]\-\-mathjax\f[] option is used, TeX math will be displayed between \f[C]\\(...\\)\f[] (for inline math) or \f[C]\\[...\\]\f[] (for display math) and put in \f[C]\f[] tags with class \f[C]math\f[]. The MathJax script will be used to render it as formulas. .RE .SS Raw HTML .SS Extension: \f[C]raw_html\f[] .PP 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 it, but it has been made an extension so that it can be disabled if desired.) .PP The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous, DZSlides, EPUB, Markdown, Emacs Org mode, 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 \[lq]blocks\[rq]: 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 (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 .IP .nf \f[C]
        *one* [a\ link](http://google.com)
        \f[] .fi .PP into .IP .nf \f[C]
        one a\ link
        \f[] .fi .PP whereas \f[C]Markdown.pl\f[] will preserve it as is. .PP There is one exception to this rule: text between \f[C]

        Try pandoc!

        
            
         

        
            
        pandoc-1.19.2.4/tests/bodybg.gif0000644000000000000000000002360713155240142014504 0ustar0000000000000000GIF89aN絽ֽ!,N!u@BlM|?) Bc(, Fo1DEe,pmg٢pڈԸ< (8 e= qXdK Pq<8k:a D9U3 G  ;W[hQ[ L H5 2"A0g#p~T+uABU*4QmWJ`P2PUB t 恭tIJm!P:h( |!u nE Y$PLB,&^ C[b0KvsLP$ ԙ, x³(c- + f OR4ZC 7%# \ ;]?Z Cp6h,8X@7BUF-J@pFgyr_8`@Yh6Ɂbts%!QZP!uUw&H XBb Hw`aS,eF|@|< u%`2VNx@ژJU%T$M^;Ҁ<d$!^" p!{UsїbLg7p04X #SVksEA5CAd 玐**3haߎ4< E9X9{04C)މ{@,g#4o+'cp眫Z\M#@ 8L)o@^<YA~ N(7qfh(3B\a)ihƠ0@X(>$Qy)@"YL {4(Icɣg0.BQJC.!B%8 G?a FP^Tc e$WY5\8B9Ⳗdry#f E&dp Tk02o47q9m,4A_Q ![3PBkHF/ ~*@a:+9u?BFcŒ znB#RX"$ x8h|M8Ih^hTEbXmrBjl Hp`&Low`VGT@preXf[6@C$-42x'%ɐ\KQ4PX`n>|#^8t3/pB8[`X=T- =mF)z13NpAJkh!y8U&C+,C# `Plc!Lh6(=(J wڃ] 6g[DvY~롙 zTt0)O(UVix~6fzLC#P@ h7rʛr8uޭZ3am3ƍ) qDErg P;JB"@ɑ#ۦj0 +Cr(#R֐l$/P eY9;.}0FЙ[:/ Xl$X'p`8Qsp$l(\B [uVwzBfAs;8S%$:p 7C$ȿ\9f0m0 \jmDV-Gzm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v)}T  4.P~uA(_[vuh,Լ@U<dN؁G m&`_˷f9Ճ{y^!.ۜqe8,T7REō|&,5=YZXB`C48(X~ED `C^ D`t 7 bcY `PpAi|C)' 8(!Z3m`Ef[5a2 A] ufCf>L '" JP,z &$9pOu$"P񕔴G"UDb(ً̢qI -a !%(rb)>i>@,>#+ :E/fI)`h" ![c~.^F:I`<^m":^c11_N z=b>7y0$$e#"!E睢Vf$ɣz]mfZUPh2 wӽWej'M)L]s*}~RNP}'q%c-mڌ'"|.h~Vd0 ԧ>m8焖<\_'vΰh(]P [g-\u5a(2'e(3f (Y7h >ߎeV wf(B v v ܭYY(0X+5 6'A]]OliNQb6 m_¡(qU&>Vd_hƩi+t6"8VqcDʌ2ԜY1JF<@>]NL6+dD֌f(Ky<&7Yb)Pݤ՟9"-g[X(bfR d$<\He>LVah~?:,'|-#[E7i ebGYJl>`2Q}k (O)֙PRW!~e(a֞ î΋db\V)r=S$)µ NKEHl]aݵfTr^f=Z-iv!ōӣ$-Zkǒ&n[(F[вJ-n`4j*KR[:b&[!ł`n1֝&:d!1f\- -6˨2"B\^Bw*( c zG/ܪbY6 Qo͹R*V],$}Ʌa¡ѥ^ hwT/f҂9PL/(pUOlZN0-yX O=^́p:%1Pff\eڠf"b bިMnGs%X܂%H0[*f c`5 O.p+\Qo ZRZdO$$K.e8$%U()';pandoc-1.19.2.4/tests/docbook-reader.native0000644000000000000000000006424113155240142016636 0ustar0000000000000000Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",SoftBreak,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("date",MetaInlines [Str "July",Space,Str "17,",Space,Str "2006"]),("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",SoftBreak,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."] ,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"] ,Para [Str "Hi."] ,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 ("level-2",[],[]) [Str "Level",Space,Str "2"] ,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"] ,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"] ,Para [Str "Here\8217s",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",SoftBreak,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",SoftBreak,Str "a",Space,Str "list",Space,Str "item."] ,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."] ,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."]] ,BlockQuote [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"] ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}" ,CodeBlock ("",[],[]) "% ls" ,Para [Str "A",Space,Str "list:"] ,OrderedList (1,Decimal,DefaultDelim) [[Para [Str "item",Space,Str "one"]] ,[Para [Str "item",Space,Str "two"]]] ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"] ,BlockQuote [Para [Str "nested"]] ,BlockQuote [Para [Str "nested"]]] ,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",Space,Str ">",Space,Str "1."] ,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."] ,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: \\$ \\\\ \\> \\[ \\{" ,Header 1 ("lists",[],[]) [Str "Lists"] ,Header 2 ("unordered",[],[]) [Str "Unordered"] ,Para [Str "Asterisks",Space,Str "loose:"] ,BulletList [[Para [Str "asterisk",Space,Str "1"]] ,[Para [Str "asterisk",Space,Str "2"]] ,[Para [Str "asterisk",Space,Str "3"]]] ,Para [Str "Pluses",Space,Str "loose:"] ,BulletList [[Para [Str "Plus",Space,Str "1"]] ,[Para [Str "Plus",Space,Str "2"]] ,[Para [Str "Plus",Space,Str "3"]]] ,Para [Str "Minuses",Space,Str "loose:"] ,BulletList [[Para [Str "Minus",Space,Str "1"]] ,[Para [Str "Minus",Space,Str "2"]] ,[Para [Str "Minus",Space,Str "3"]]] ,Header 2 ("ordered",[],[]) [Str "Ordered"] ,OrderedList (1,Decimal,DefaultDelim) [[Para [Str "First"]] ,[Para [Str "Second"]] ,[Para [Str "Third"]]] ,Para [Str "and",Space,Str "using",Space,Str "spaces:"] ,OrderedList (1,Decimal,DefaultDelim) [[Para [Str "One"]] ,[Para [Str "Two"]] ,[Para [Str "Three"]]] ,Para [Str "Multiple",Space,Str "paragraphs:"] ,OrderedList (1,Decimal,DefaultDelim) [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."] ,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\8217s",SoftBreak,Str "back."]] ,[Para [Str "Item",Space,Str "2."]] ,[Para [Str "Item",Space,Str "3."]]] ,Header 2 ("nested",[],[]) [Str "Nested"] ,BulletList [[Para [Str "Tab"] ,BulletList [[Para [Str "Tab"] ,BulletList [[Para [Str "Tab"]]]]]]] ,Para [Str "Here\8217s",Space,Str "another:"] ,OrderedList (1,Decimal,DefaultDelim) [[Para [Str "First"]] ,[Para [Str "Second:"] ,BulletList [[Para [Str "Fee"]] ,[Para [Str "Fie"]] ,[Para [Str "Foe"]]]] ,[Para [Str "Third"]]] ,Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"] ,OrderedList (1,Decimal,DefaultDelim) [[Para [Str "First"]] ,[Para [Str "Second:"] ,BulletList [[Para [Str "Fee"]] ,[Para [Str "Fie"]] ,[Para [Str "Foe"]]]] ,[Para [Str "Third"]]] ,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"] ,BulletList [[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]] ,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]]]]] ,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"] ,OrderedList (2,Decimal,DefaultDelim) [[Para [Str "begins",Space,Str "with",Space,Str "2"]] ,[Para [Str "and",Space,Str "now",Space,Str "3"] ,Para [Str "with",Space,Str "a",Space,Str "continuation"] ,OrderedList (4,LowerRoman,DefaultDelim) [[Para [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"]] ,[Para [Str "more",Space,Str "items"] ,OrderedList (1,UpperAlpha,DefaultDelim) [[Para [Str "a",Space,Str "subsublist"]] ,[Para [Str "a",Space,Str "subsublist"]]]]]]] ,Para [Str "Nesting:"] ,OrderedList (1,UpperAlpha,DefaultDelim) [[Para [Str "Upper",Space,Str "Alpha"] ,OrderedList (1,UpperRoman,DefaultDelim) [[Para [Str "Upper",Space,Str "Roman."] ,OrderedList (6,Decimal,DefaultDelim) [[Para [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"] ,OrderedList (3,LowerAlpha,DefaultDelim) [[Para [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]] ,Para [Str "Autonumbering:"] ,OrderedList (1,Decimal,DefaultDelim) [[Para [Str "Autonumber."]] ,[Para [Str "More."] ,OrderedList (1,Decimal,DefaultDelim) [[Para [Str "Nested."]]]]] ,Para [Str "Should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "list",Space,Str "item:"] ,Para [Str "M.A.\160\&2007"] ,Para [Str "B.",Space,Str "Williams"] ,Header 2 ("callout",[],[]) [Str "Callout"] ,Para [Str "Simple."] ,BulletList [[Para [Str "A",Space,Code ("",[],[]) "__letrec",Space,Str "is",Space,Str "equivalent",Space,Str "to",Space,Str "a",Space,Str "normal",SoftBreak,Str "Haskell",Space,Str "LET."]] ,[Para [Str "GHC",Space,Str "compiled",Space,Str "the",Space,Str "body",Space,Str "of",Space,Str "our",Space,Str "list",Space,Str "comprehension",Space,Str "into",SoftBreak,Str "a",Space,Str "loop",Space,Str "named",Space,Code ("",[],[]) "go_s1YC",Str "."]] ,[Para [Str "If",Space,Str "our",Space,Str "CASE",Space,Str "expression",Space,Str "matches",Space,Str "the",Space,Str "empty",Space,Str "list,",Space,Str "we",SoftBreak,Str "return",Space,Str "the",Space,Str "empty",Space,Str "list.",Space,Str "This",Space,Str "is",Space,Str "reassuringly",SoftBreak,Str "familiar."]]] ,Header 1 ("definition-lists",[],[]) [Str "Definition",Space,Str "Lists"] ,DefinitionList [([Str "apple"], [[Para [Str "red",Space,Str "fruit"]]]) ,([Str "orange"], [[Para [Str "orange",Space,Str "fruit"]]]) ,([Str "banana"], [[Para [Str "yellow",Space,Str "fruit"]]])] ,Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"] ,DefinitionList [([Emph [Str "apple"]], [[Para [Str "red",Space,Str "fruit"] ,Para [Str "contains",Space,Str "seeds,",Space,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"]]]) ,([Emph [Str "orange"]], [[Para [Str "orange",Space,Str "fruit"] ,CodeBlock ("",[],[]) "{ orange code block }" ,BlockQuote [Para [Str "orange",Space,Str "block",Space,Str "quote"]]]])] ,Para [Str "Multiple",Space,Str "definitions,",Space,Str "loose:"] ,DefinitionList [([Str "apple"], [[Para [Str "red",Space,Str "fruit"]] ,[Para [Str "computer"]]]) ,([Str "orange"], [[Para [Str "orange",Space,Str "fruit"]] ,[Para [Str "bank"]]])] ,Para [Str "Blank",Space,Str "line",Space,Str "after",Space,Str "term,",Space,Str "indented",Space,Str "marker,",Space,Str "alternate",Space,Str "markers:"] ,DefinitionList [([Str "apple"], [[Para [Str "red",Space,Str "fruit"]] ,[Para [Str "computer"]]]) ,([Str "orange"], [[Para [Str "orange",Space,Str "fruit"] ,OrderedList (1,Decimal,DefaultDelim) [[Para [Str "sublist"]] ,[Para [Str "sublist"]]]]])] ,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",SoftBreak,Str "this"],Str "."] ,Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",SoftBreak,Strong [Str "is",Space,Str "this"],Str "."] ,Para [Str "An",Space,Emph [Link ("",[],[]) [Str "emphasized",Space,Str "link"] ("/url","")],Str "."] ,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",SoftBreak,Str "em."]]] ,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] ,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",SoftBreak,Str "em."]]] ,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] ,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",SoftBreak,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",SoftBreak,Code ("",[],[]) "",Str "."] ,Para [Str "More",Space,Str "code:",Space,Code ("",[],[]) "Class",Space,Str "and",Space,Code ("",[],[]) "Type"] ,Para [Strikeout [Str "This",Space,Str "is",SoftBreak,Emph [Str "strikeout"],Str "."]] ,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",SoftBreak,Str "a",Superscript [Emph [Str "hello"]],SoftBreak,Str "a",Superscript [Str "hello\160there"],Str "."] ,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",SoftBreak,Str "H",Subscript [Str "many\160of\160them"],Str "O."] ,Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",Space,Str "because",Space,Str "of",Space,Str "the",Space,Str "unescaped",SoftBreak,Str "spaces:",Space,Str "a^b",Space,Str "c^d,",Space,Str "a~b",Space,Str "c~d."] ,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"] ,Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",SoftBreak,Str "name."]] ,Para [Quoted DoubleQuote [Str "A"],Str ",",Space,Quoted DoubleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted DoubleQuote [Str "C"],Space,Str "are",Space,Str "letters."] ,Para [Quoted DoubleQuote [Str "He",Space,Str "said,",Space,Quoted SingleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",SoftBreak,Str "70\8217s?"] ,Para [Str "Some",Space,Str "dashes:",Space,Str "one\8212two",Space,Str "\8212",Space,Str "three\8212four",Space,Str "\8212",Space,Str "five."] ,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5\8211\&7,",Space,Str "255\8211\&66,",Space,Str "1987\8211\&1999."] ,Para [Str "Ellipses\8230and\8230and\8230."] ,Header 1 ("math",[],[]) [] ,Para [Math DisplayMath "e = mc^{2}",Math DisplayMath "1",SoftBreak,Math InlineMath "e = mc^{2}",SoftBreak,Math DisplayMath "e = mc^{2}"] ,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"] ,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"] ,BulletList [[Para [Str "I",Space,Str "hat:",Space,Str "\206"]] ,[Para [Str "o",Space,Str "umlaut:",Space,Str "\246"]] ,[Para [Str "section:",Space,Str "\167"]] ,[Para [Str "set",Space,Str "membership:",Space,Str "\8712"]] ,[Para [Str "copyright:",Space,Str "\169"]]] ,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."] ,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."] ,Para [Str "This",Space,Str "&",Space,Str "that."] ,Para [Str "4",Space,Str "<",Space,Str "5."] ,Para [Str "6",Space,Str ">",Space,Str "5."] ,Para [Str "Backslash:",Space,Str "\\"] ,Para [Str "Backtick:",Space,Str "`"] ,Para [Str "Asterisk:",Space,Str "*"] ,Para [Str "Underscore:",Space,Str "_"] ,Para [Str "Left",Space,Str "brace:",Space,Str "{"] ,Para [Str "Right",Space,Str "brace:",Space,Str "}"] ,Para [Str "Left",Space,Str "bracket:",Space,Str "["] ,Para [Str "Right",Space,Str "bracket:",Space,Str "]"] ,Para [Str "Left",Space,Str "paren:",Space,Str "("] ,Para [Str "Right",Space,Str "paren:",Space,Str ")"] ,Para [Str "Greater-than:",Space,Str ">"] ,Para [Str "Hash:",Space,Str "#"] ,Para [Str "Period:",Space,Str "."] ,Para [Str "Bang:",Space,Str "!"] ,Para [Str "Plus:",Space,Str "+"] ,Para [Str "Minus:",Space,Str "-"] ,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/",""),Str "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","")] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","")] ,Para [Link ("",[],[]) [Str "with_underscore"] ("/url/with_underscore","")] ,Para [Link ("",[],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")] ,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."] ,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 "."] ,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."] ,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "twice"] ("/url",""),Str "."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "thrice"] ("/url",""),Str "."] ,Para [Str "This",Space,Str "should",Space,Str "[not][]",Space,Str "be",Space,Str "a",Space,Str "link."] ,CodeBlock ("",[],[]) "[not]: /url" ,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."] ,Para [Str "Foo",Space,Link ("",[],[]) [Str "biz"] ("/url/",""),Str "."] ,Header 2 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"] ,Para [Str "Here\8217s",Space,Str "a",Space,Link ("",[],[]) [Str "link",Space,Str "with",Space,Str "an",SoftBreak,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."] ,Para [Str "Here\8217s",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:",SoftBreak,Link ("",[],[]) [Str "AT&T"] ("http://att.com/",""),Str "."] ,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."] ,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",SoftBreak,Str "braces"] ("/script?foo=1&bar=2",""),Str "."] ,Header 2 ("autolinks",[],[]) [Str "Autolinks"] ,Para [Str "With",Space,Str "an",Space,Str "ampersand:",SoftBreak,Link ("",[],[]) [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")] ,BulletList [[Para [Str "In",Space,Str "a",Space,Str "list?"]] ,[Para [Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] ,[Para [Str "It",Space,Str "should."]]] ,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link ("",[],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")] ,BlockQuote [Para [Str "Blockquoted:",SoftBreak,Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] ,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",SoftBreak,Code ("",[],[]) ""] ,CodeBlock ("",[],[]) "or here: " ,Header 1 ("images",[],[]) [Str "Images"] ,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"] ,Para [Image ("",[],[]) [Str "lalune",Space,Str "fig",Space,Str "caption"] ("lalune.jpg","fig:")] ,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image ("",[],[]) [] ("movie.jpg",""),Space,Str "icon.",SoftBreak,Str "And",Space,Str "here",Space,Str "a",Space,Str "second",Space,Str "movie",Space,Image ("",[],[]) [Str "alt",Space,Str "text"] ("movie.jpg",""),Space,Str "icon.",SoftBreak,Str "And",Space,Str "here",Space,Str "a",Space,Str "third",Space,Str "movie",Space,Image ("",[],[]) [Str "alt",Space,Str "text"] ("movie.jpg",""),Space,Str "icon."] ,Para [Image ("",[],[]) [Str "lalune",Space,Str "no",Space,Str "figure",Space,Str "alt",Space,Str "text"] ("lalune.jpg","")] ,Header 1 ("footnotes",[],[]) [Str "Footnotes"] ,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [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 "after",Space,Str "the",Space,Str "footnote",Space,Str "reference.",SoftBreak,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],Space,Str "and",Space,Str "another.",Note [Para [Str "Here\8217s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",SoftBreak,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock ("",[],[]) " { }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",SoftBreak,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",SoftBreak,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space.[^my",Space,Str "note]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note.",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",SoftBreak,Link ("",[],[]) [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",SoftBreak,Str "verbatim",Space,Str "characters,",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "[bracketed",Space,Str "text]."]]] ,BlockQuote [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]] ,OrderedList (1,Decimal,DefaultDelim) [[Para [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]]]] ,Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented."] ,Header 1 ("tables",[],[]) [Str "Tables"] ,Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption:"] ,Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] [AlignRight,AlignLeft,AlignCenter,AlignLeft] [0.0,0.0,0.0,0.0] [[Plain [Str "Right"]] ,[Plain [Str "Left"]] ,[Plain [Str "Center"]] ,[Plain [Str "Default"]]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Simple",Space,Str "table",Space,Str "without",Space,Str "caption:"] ,Table [] [AlignRight,AlignLeft,AlignCenter,AlignLeft] [0.0,0.0,0.0,0.0] [[Plain [Str "Right"]] ,[Plain [Str "Left"]] ,[Plain [Str "Center"]] ,[Plain [Str "Default"]]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Simple",Space,Str "table",Space,Str "indented",Space,Str "two",Space,Str "spaces:"] ,Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] [AlignRight,AlignLeft,AlignCenter,AlignLeft] [0.0,0.0,0.0,0.0] [[Plain [Str "Right"]] ,[Plain [Str "Left"]] ,[Plain [Str "Center"]] ,[Plain [Str "Default"]]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Multiline",Space,Str "table",Space,Str "with",Space,Str "caption:"] ,Table [Str "Here's",Space,Str "the",Space,Str "caption.",Space,Str "It",Space,Str "may",Space,Str "span",Space,Str "multiple",Space,Str "lines."] [AlignCenter,AlignLeft,AlignRight,AlignLeft] [0.2,0.2,0.3,0.3] [[Plain [Str "Centered",Space,Str "Header"]] ,[Plain [Str "Left",Space,Str "Aligned"]] ,[Plain [Str "Right",Space,Str "Aligned"]] ,[Plain [Str "Default",Space,Str "aligned"]]] [[[Plain [Str "First"]] ,[Plain [Str "row"]] ,[Plain [Str "12.0"]] ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",Space,Str "multiple",Space,Str "lines."]]] ,[[Plain [Str "Second"]] ,[Plain [Str "row"]] ,[Plain [Str "5.0"]] ,[Plain [Str "Here's",Space,Str "another",Space,Str "one.",Space,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]] ,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "caption:"] ,Table [] [AlignCenter,AlignLeft,AlignRight,AlignLeft] [0.1,0.2,0.3,0.4] [[Plain [Str "Centered",Space,Str "Header"]] ,[Plain [Str "Left",Space,Str "Aligned"]] ,[Plain [Str "Right",Space,Str "Aligned"]] ,[Plain [Str "Default",Space,Str "aligned"]]] [[[Plain [Str "First"]] ,[Plain [Str "row"]] ,[Plain [Str "12.0"]] ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",Space,Str "multiple",Space,Str "lines."]]] ,[[Plain [Str "Second"]] ,[Plain [Str "row"]] ,[Plain [Str "5.0"]] ,[Plain [Str "Here's",Space,Str "another",Space,Str "one.",Space,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]] ,Para [Str "Table",Space,Str "without",Space,Str "column",Space,Str "headers:"] ,Table [] [AlignRight,AlignLeft,AlignCenter,AlignRight] [0.0,0.0,0.0,0.0] [[] ,[] ,[] ,[]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "column",Space,Str "headers:"] ,Table [] [AlignCenter,AlignLeft,AlignRight,AlignLeft] [0.25,0.25,0.25,0.25] [[] ,[] ,[] ,[]] [[[Plain [Str "First"]] ,[Plain [Str "row"]] ,[Plain [Str "12.0"]] ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",Space,Str "multiple",Space,Str "lines."]]] ,[[Plain [Str "Second"]] ,[Plain [Str "row"]] ,[Plain [Str "5.0"]] ,[Plain [Str "Here's",Space,Str "another",Space,Str "one.",Space,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]]] pandoc-1.19.2.4/tests/docbook-xref.native0000644000000000000000000000357113155240142016337 0ustar0000000000000000Pandoc (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",SoftBreak,Str "XRef."] ,BulletList [[Para [Str "A",Space,Str "straight",Space,Str "link",Space,Str "generates",Space,Str "the",SoftBreak,Str "cross-reference",Space,Str "text:",Space,Link ("",[],[]) [Str "The",Space,Str "Second",Space,Str "Chapter"] ("#ch02",""),Str "."]] ,[Para [Str "A",Space,Str "link",Space,Str "to",Space,Str "an",Space,Str "element",Space,Str "with",Space,Str "an",SoftBreak,Str "XRefLabel:",SoftBreak,Link ("",[],[]) [Str "Chapter",Space,Str "the",Space,Str "Third"] ("#ch03",""),Str "."]] ,[Para [Str "A",Space,Str "link",Space,Str "with",Space,Str "an",SoftBreak,Str "EndTerm:",SoftBreak,Link ("",[],[]) [Str "Chapter",Space,Str "4"] ("#ch04",""),Str "."]] ,[Para [Str "A",Space,Str "link",Space,Str "to",Space,Str "an",SoftBreak,Str "cmdsynopsis",Space,Str "element:",Space,Link ("",[],[]) [Str "chgrp"] ("#cmd01",""),Str "."]] ,[Para [Str "A",Space,Str "link",Space,Str "to",Space,Str "an",SoftBreak,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"]] pandoc-1.19.2.4/tests/dokuwiki_external_images.native0000644000000000000000000000104513155240142021024 0ustar0000000000000000[Para [Image ("",[],[]) [Str "HTTPS",Space,Str "image"] ("https://cooluri.com/image.png",""),Space,Image ("",[],[]) [Str "HTTP",Space,Str "image"] ("http://cooluri.com/image.png",""),Space,Image ("",[],[]) [Str "FTP",Space,Str "image"] ("ftp://ftp.cooluri.com/image.png",""),Space,Image ("",[],[]) [Str "Filesystem",Space,Str "image"] ("file:///tmp/coolimage.png",""),Space,Image ("",[],[]) [Str "Relative",Space,Str "image",Space,Str "1"] ("/image.jpg",""),Space,Image ("",[],[]) [Str "Relative",Space,Str "image",Space,Str "2"] ("image.jpg","")]] pandoc-1.19.2.4/tests/dokuwiki_inline_formatting.native0000644000000000000000000000171413155240142021370 0ustar0000000000000000[Para [Str "Regular",Space,Str "text",Space,Emph [Str "italics"],Space,Strong [Str "bold",Space,Emph [Str "bold",Space,Str "italics"]],Str "."] ,Para [Str "This",Space,Str "is",Space,SmallCaps [Str "Small",Space,Str "Caps"],Str ",",Space,Str "and",Space,Str "this",Space,Str "is",Space,Strikeout [Str "strikethrough"],Str "."] ,Para [Str "Some",Space,Str "people",Space,Str "use",Space,Span ("",[],[("underline","single")]) [Str "single",Space,Str "underlines",Space,Str "for",Space,Emph [Str "emphasis"]],Str "."] ,Para [Str "Above",Space,Str "the",Space,Str "line",Space,Str "is",Space,Superscript [Str "superscript"],Space,Str "and",Space,Str "below",Space,Str "the",Space,Str "line",Space,Str "is",Space,Subscript [Str "subscript"],Str "."] ,Para [Str "A",Space,Str "line",LineBreak,Str "break."] ,Para [Str "hello",Space,Str "//",Space,Str "world",Space,Str "**",Space,Str "from",Space,Str "__",Space,Str "me"] ,Para [Code ("",[],[]) "hello // world ** from __ me"]] pandoc-1.19.2.4/tests/dokuwiki_multiblock_table.native0000644000000000000000000000077013155240142021175 0ustar0000000000000000[Table [Str "Sample",Space,Str "grid",Space,Str "table."] [AlignDefault,AlignDefault,AlignDefault] [0.2222222222222222,0.2222222222222222,0.2916666666666667] [[Plain [Str "Fruit"]] ,[Plain [Str "Price"]] ,[Plain [Str "Advantages"]]] [[[Para [Str "Bananas"]] ,[Para [Str "$1.34"]] ,[Para [Str "built-in",Space,Str "wrapper"] ,Para [Str "potassium"]]] ,[[Para [Str "Oranges"]] ,[Para [Str "$2.10"]] ,[BulletList [[Plain [Str "cures",Space,Str "scurvy"]] ,[Plain [Str "tasty"]]]]]]] pandoc-1.19.2.4/tests/haddock-reader.native0000644000000000000000000001044213155240142016605 0ustar0000000000000000Pandoc (Meta {unMeta = fromList []}) [Para [Str "This",Space,Str "file",Space,Str "tests",Space,Str "the",Space,Str "Pandoc",Space,Str "reader",Space,Str "for",Space,Str "Haddock.",SoftBreak,Str "We've",Space,Str "borrowed",Space,Str "examples",Space,Str "from",Space,Str "Haddock's",Space,Str "documentation:",Space,Link ("",[],[]) [Str "http://www.haskell.org/haddock/doc/html/ch03s08.html"] ("http://www.haskell.org/haddock/doc/html/ch03s08.html","http://www.haskell.org/haddock/doc/html/ch03s08.html"),Str "."] ,Para [Str "The",Space,Str "following",Space,Str "characters",Space,Str "have",Space,Str "special",Space,Str "meanings",Space,Str "in",Space,Str "Haddock,",Space,Str "/,",Space,Str "',",Space,Str "`,",Space,Str "\",",Space,Str "@,",Space,Str "<,",Space,Str "so",Space,Str "they",Space,Str "must",Space,Str "be",Space,Str "escaped."] ,Para [Str "*",Space,Str "This",Space,Str "is",Space,Str "a",Space,Str "paragraph,",Space,Str "not",Space,Str "a",Space,Str "list",Space,Str "item.",SoftBreak,Str ">",Space,Str "This",Space,Str "sentence",Space,Str "is",Space,Str "not",Space,Str "code.",SoftBreak,Str ">>>",Space,Str "This",Space,Str "is",Space,Str "not",Space,Str "an",Space,Str "example."] ,Para [Str "The",Space,Str "references",Space,Str "\955,",Space,Str "\955",Space,Str "and",Space,Str "\955",Space,Str "all",Space,Str "represent",Space,Str "the",Space,Str "lower-case",Space,Str "letter",Space,Str "lambda."] ,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "code",Space,Str "block:"] ,CodeBlock ("",[],[]) "map :: (a -> b) -> [a] -> [b]\nmap _ [] = []\nmap f (x:xs) = f x : map f xs" ,Para [Str "This",Space,Str "is",Space,Str "another",Space,Str "code",Space,Str "block:"] ,Para [Code ("",[],[]) "f x = x + x.",LineBreak,Code ("",[],[]) "The @...@ code block ",Emph [Code ("",[],[]) "interprets markup normally"],Code ("",[],[]) ".",Code ("",["haskell","module"],[]) "Module.Foo",Code ("",[],[]) "",LineBreak,Code ("",[],[]) "\"Hello World\""] ,Para [Str "Haddock",Space,Str "supports",Space,Str "REPL",Space,Str "examples:"] ,Para [Code ("",["prompt"],[]) ">>>",Space,Code ("",["haskell","expr"],[]) "fib 10",LineBreak,Code ("",["result"],[]) "55"] ,Para [Code ("",["prompt"],[]) ">>>",Space,Code ("",["haskell","expr"],[]) "putStrLn \"foo\\nbar\"",LineBreak,Code ("",["result"],[]) "foo",LineBreak,Code ("",["result"],[]) "bar"] ,Para [Str "That",Space,Str "was",Space,Emph [Str "really",Space,Str "cool"],Str "!",SoftBreak,Str "I",Space,Str "had",Space,Str "no",Space,Str "idea",Space,Code ("",[],[]) "fib 10 = 55",Str "."] ,Para [Str "This",Space,Str "module",Space,Str "defines",Space,Str "the",Space,Str "type",Space,Code ("",["haskell","identifier"],[]) "T",Str ".",SoftBreak,Str "The",Space,Str "identifier",Space,Code ("",["haskell","identifier"],[]) "M.T",Space,Str "is",Space,Str "not",Space,Str "in",Space,Str "scope",SoftBreak,Str "I",Space,Str "don't",Space,Str "have",Space,Str "to",Space,Str "escape",Space,Str "my",Space,Str "apostrophes;",Space,Str "great,",Space,Str "isn't",Space,Str "it?",SoftBreak,Str "This",Space,Str "is",Space,Str "a",Space,Str "reference",Space,Str "to",Space,Str "the",Space,Code ("",["haskell","module"],[]) "Foo",Space,Str "module."] ,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "bulleted",Space,Str "list:"] ,BulletList [[Para [Str "first",Space,Str "item"]] ,[Para [Str "second",Space,Str "item"]]] ,Para [Str "This",Space,Str "is",Space,Str "an",Space,Str "enumerated",Space,Str "list:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Para [Str "first",Space,Str "item"]] ,[Para [Str "second",Space,Str "item"]]] ,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "definition",Space,Str "list:"] ,DefinitionList [([Code ("",[],[]) "foo"], [[Para [Str "The",Space,Str "description",Space,Str "of",Space,Code ("",[],[]) "foo",Str "."]]]) ,([Code ("",[],[]) "bar"], [[Para [Str "The",Space,Str "description",Space,Str "of",Space,Code ("",[],[]) "bar",Str "."]]])] ,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "link:",Space,Link ("",[],[]) [Str "http://haskell.org"] ("http://haskell.org","http://haskell.org")] ,Para [Link ("",[],[]) [Str "Haskell"] ("http://haskell.org","http://haskell.org"),Space,Str "is",Space,Str "a",Space,Str "fun",Space,Str "language!"] ,Para [Link ("",[],[]) [Str "Click",Space,Str "Here!"] ("http://example.com","http://example.com")]] pandoc-1.19.2.4/tests/html-reader.native0000644000000000000000000006247013155240142016164 0ustar0000000000000000Pandoc (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 ("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 ("level-2",[],[]) [Str "Level",Space,Str "2"] ,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"] ,HorizontalRule ,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,Str "here."] ,HorizontalRule ,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."]] ,BlockQuote [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"] ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}" ,Para [Str "A",Space,Str "list:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "item",Space,Str "one"]] ,[Plain [Str "item",Space,Str "two"]]] ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"] ,BlockQuote [Para [Str "nested"]] ,BlockQuote [Para [Str "nested"]]] ,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",Space,Str ">",Space,Str "1."] ,Para [Str "Box-style:"] ,BlockQuote [Para [Str "Example:"] ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"] ,BlockQuote [OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "do",Space,Str "laundry"]] ,[Plain [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"]]]] ,Para [Str "Here's",Space,Str "a",Space,Str "nested",Space,Str "one:"] ,BlockQuote [Para [Str "Joe",Space,Str "said:"] ,BlockQuote [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 ("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 ("lists",[],[]) [Str "Lists"] ,Header 2 ("unordered",[],[]) [Str "Unordered"] ,Para [Str "Asterisks",Space,Str "tight:"] ,BulletList [[Plain [Str "asterisk",Space,Str "1"]] ,[Plain [Str "asterisk",Space,Str "2"]] ,[Plain [Str "asterisk",Space,Str "3"]]] ,Para [Str "Asterisks",Space,Str "loose:"] ,BulletList [[Para [Str "asterisk",Space,Str "1"]] ,[Para [Str "asterisk",Space,Str "2"]] ,[Para [Str "asterisk",Space,Str "3"]]] ,Para [Str "Pluses",Space,Str "tight:"] ,BulletList [[Plain [Str "Plus",Space,Str "1"]] ,[Plain [Str "Plus",Space,Str "2"]] ,[Plain [Str "Plus",Space,Str "3"]]] ,Para [Str "Pluses",Space,Str "loose:"] ,BulletList [[Para [Str "Plus",Space,Str "1"]] ,[Para [Str "Plus",Space,Str "2"]] ,[Para [Str "Plus",Space,Str "3"]]] ,Para [Str "Minuses",Space,Str "tight:"] ,BulletList [[Plain [Str "Minus",Space,Str "1"]] ,[Plain [Str "Minus",Space,Str "2"]] ,[Plain [Str "Minus",Space,Str "3"]]] ,Para [Str "Minuses",Space,Str "loose:"] ,BulletList [[Para [Str "Minus",Space,Str "1"]] ,[Para [Str "Minus",Space,Str "2"]] ,[Para [Str "Minus",Space,Str "3"]]] ,Header 2 ("ordered",[],[]) [Str "Ordered"] ,Para [Str "Tight:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "First"]] ,[Plain [Str "Second"]] ,[Plain [Str "Third"]]] ,Para [Str "and:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "One"]] ,[Plain [Str "Two"]] ,[Plain [Str "Three"]]] ,Para [Str "Loose",Space,Str "using",Space,Str "tabs:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Para [Str "First"]] ,[Para [Str "Second"]] ,[Para [Str "Third"]]] ,Para [Str "and",Space,Str "using",Space,Str "spaces:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Para [Str "One"]] ,[Para [Str "Two"]] ,[Para [Str "Three"]]] ,Para [Str "Multiple",Space,Str "paragraphs:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."] ,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."]]] ,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 [[Plain [Str "Tab"] ,BulletList [[Plain [Str "Tab"]]]]]]] ,Para [Str "Here's",Space,Str "another:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "First"]] ,[Plain [Str "Second:"] ,BulletList [[Plain [Str "Fee"]] ,[Plain [Str "Fie"]] ,[Plain [Str "Foe"]]]] ,[Plain [Str "Third"]]] ,Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Para [Str "First"]] ,[Para [Str "Second:"] ,BulletList [[Plain [Str "Fee"]] ,[Plain [Str "Fie"]] ,[Plain [Str "Foe"]]]] ,[Para [Str "Third"]]] ,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"] ,BulletList [[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]] ,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]]]]] ,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"] ,OrderedList (2,Decimal,DefaultDelim) [[Plain [Str "begins",Space,Str "with",Space,Str "2"]] ,[Para [Str "and",Space,Str "now",Space,Str "3"] ,Para [Str "with",Space,Str "a",Space,Str "continuation"] ,OrderedList (4,LowerRoman,DefaultDelim) [[Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"]] ,[Plain [Str "more",Space,Str "items"] ,OrderedList (1,UpperAlpha,DefaultDelim) [[Plain [Str "a",Space,Str "subsublist"]] ,[Plain [Str "a",Space,Str "subsublist"]]]]]]] ,Para [Str "Nesting:"] ,OrderedList (1,UpperAlpha,DefaultDelim) [[Plain [Str "Upper",Space,Str "Alpha"] ,OrderedList (1,UpperRoman,DefaultDelim) [[Plain [Str "Upper",Space,Str "Roman."] ,OrderedList (6,Decimal,DefaultDelim) [[Plain [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"] ,OrderedList (3,LowerAlpha,DefaultDelim) [[Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]] ,Para [Str "Autonumbering:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "Autonumber."]] ,[Plain [Str "More."] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "Nested."]]]]] ,HorizontalRule ,Header 2 ("definition",[],[]) [Str "Definition"] ,DefinitionList [([Str "Violin"], [[Plain [Str "Stringed",Space,Str "musical",Space,Str "instrument."]] ,[Plain [Str "Torture",Space,Str "device."]]]) ,([Str "Cello",LineBreak,Str "Violoncello"], [[Plain [Str "Low-voiced",Space,Str "stringed",Space,Str "instrument."]]])] ,HorizontalRule ,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 "."] ,Para [Str "An",Space,Emph [Link ("",[],[]) [Str "emphasized",Space,Str "link"] ("/url","")],Str "."] ,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] ,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] ,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] ,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] ,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "",Str "."] ,Para [Str "This",Space,Str "is",Space,SmallCaps [Str "small",Space,Str "caps"],Str "."] ,HorizontalRule ,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.'"] ,Para [Str "'He",Space,Str "said,",Space,Str "\"I",Space,Str "want",Space,Str "to",Space,Str "go.\"'",Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70's?"] ,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Str "'",Code ("",[],[]) "code",Str "'",Space,Str "and",Space,Str "a",Space,Str "\"",Link ("",[],[]) [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2",""),Str "\"."] ,Para [Str "Some",Space,Str "dashes:",Space,Str "one---two",Space,Str "---",Space,Str "three--four",Space,Str "--",Space,Str "five."] ,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 ("latex",[],[]) [Str "LaTeX"] ,BulletList [[Plain [Str "\\cite[22-23]{smith.1899}"]] ,[Plain [Str "\\doublespacing"]] ,[Plain [Str "$2+2=4$"]] ,[Plain [Str "$x",Space,Str "\\in",Space,Str "y$"]] ,[Plain [Str "$\\alpha",Space,Str "\\wedge",Space,Str "\\omega$"]] ,[Plain [Str "$223$"]] ,[Plain [Str "$p$-Tree"]] ,[Plain [Str "$\\frac{d}{dx}f(x)=\\lim_{h\\to",Space,Str "0}\\frac{f(x+h)-f(x)}{h}$"]] ,[Plain [Str "Here's",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",Space,Str "$\\alpha",Space,Str "+",Space,Str "\\omega",Space,Str "\\times",Space,Str "x^2$."]]] ,Para [Str "These",Space,Str "shouldn't",Space,Str "be",Space,Str "math:"] ,BulletList [[Plain [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]] ,[Plain [Str "$22,000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money.",Space,Str "So",Space,Str "is",Space,Str "$34,000.",Space,Str "(It",Space,Str "worked",Space,Str "if",Space,Str "\"lot\"",Space,Str "is",Space,Str "emphasized.)"]] ,[Plain [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23$."]]] ,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 ("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"]] ,[Plain [Str "o",Space,Str "umlaut:",Space,Str "\246"]] ,[Plain [Str "section:",Space,Str "\167"]] ,[Plain [Str "set",Space,Str "membership:",Space,Str "\8712"]] ,[Plain [Str "copyright:",Space,Str "\169"]]] ,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."] ,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."] ,Para [Str "This",Space,Str "&",Space,Str "that."] ,Para [Str "4",Space,Str "<",Space,Str "5."] ,Para [Str "6",Space,Str ">",Space,Str "5."] ,Para [Str "Backslash:",Space,Str "\\"] ,Para [Str "Backtick:",Space,Str "`"] ,Para [Str "Asterisk:",Space,Str "*"] ,Para [Str "Underscore:",Space,Str "_"] ,Para [Str "Left",Space,Str "brace:",Space,Str "{"] ,Para [Str "Right",Space,Str "brace:",Space,Str "}"] ,Para [Str "Left",Space,Str "bracket:",Space,Str "["] ,Para [Str "Right",Space,Str "bracket:",Space,Str "]"] ,Para [Str "Left",Space,Str "paren:",Space,Str "("] ,Para [Str "Right",Space,Str "paren:",Space,Str ")"] ,Para [Str "Greater-than:",Space,Str ">"] ,Para [Str "Hash:",Space,Str "#"] ,Para [Str "Period:",Space,Str "."] ,Para [Str "Bang:",Space,Str "!"] ,Para [Str "Plus:",Space,Str "+"] ,Para [Str "Minus:",Space,Str "-"] ,HorizontalRule ,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 "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by a tab"),Str "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with \"quotes\" in it")] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")] ,Para [Str "Email",Space,Str "link",Space,Str "(nobody",Space,Str "[at]",Space,Str "nowhere.net)"] ,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."] ,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 "."] ,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."] ,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "twice"] ("/url",""),Str "."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "thrice"] ("/url",""),Str "."] ,Para [Str "This",Space,Str "should",Space,Str "[not]",Space,Str "be",Space,Str "a",Space,Str "link."] ,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 ("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 ("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?"]] ,[Plain [Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] ,[Plain [Str "It",Space,Str "should."]]] ,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Str "nobody",Space,Str "[at]",Space,Str "nowhere.net"] ,BlockQuote [Para [Str "Blockquoted:",Space,Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] ,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) ""] ,CodeBlock ("",[],[]) "or here: " ,HorizontalRule ,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 ("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."] ,Para [Str "Caret",Space,Str "characters",Space,Str "are",Space,Str "used",Space,Str "to",Space,Str "indicate",Space,Str "that",Space,Str "the",Space,Str "blocks",Space,Str "all",Space,Str "belong",Space,Str "to",Space,Str "a",Space,Str "single",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "block",Space,Str "quotes)."] ,CodeBlock ("",[],[]) " { }" ,Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "use",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "every",Space,Str "line,",Space,Str "as",Space,Str "with",Space,Str "blockquotes,",Space,Str "but",Space,Str "all",Space,Str "that",Space,Str "you",Space,Str "need",Space,Str "is",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "the",Space,Str "block",Space,Str "and",Space,Str "any",Space,Str "preceding",Space,Str "blank",Space,Str "lines."] ,Para [Str "text",Space,Emph [Str "Leading",Space,Str "space"]] ,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 ("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"]] ,[Plain [Str "Z"]]] [[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] ,HorizontalRule ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[Plain [Str "X"]] ,[Plain [Str "Y"]] ,[Plain [Str "Z"]]] [[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] ,HorizontalRule ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[Plain [Str "X"]] ,[Plain [Str "Y"]] ,[Plain [Str "Z"]]] [[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] ,HorizontalRule ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[Plain [Str "X"]] ,[Plain [Str "Y"]] ,[Plain [Str "Z"]]] [[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] ,HorizontalRule ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[Plain [Str "X"]] ,[Plain [Str "Y"]] ,[Plain [Str "Z"]]] [[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] ,HorizontalRule ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[Plain [Str "X"]] ,[Plain [Str "Y"]] ,[Plain [Str "Z"]]] [[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] ,HorizontalRule ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[Plain [Str "X"]] ,[Plain [Str "Y"]] ,[Plain [Str "Z"]]] [[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] ,HorizontalRule ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[Plain [Str "X"]] ,[Plain [Str "Y"]] ,[Plain [Str "Z"]]] [[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] ,HorizontalRule ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.3333333333333333,0.3333333333333333,0.3333333333333333] [[Plain [Str "X"]] ,[Plain [Str "Y"]] ,[Plain [Str "Z"]]] [[[Plain [Str "1"]] ,[Para [Str "2"]] ,[Plain [Str "3"]]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] ,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"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] ,HorizontalRule ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [] [[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] ,HorizontalRule ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [] [[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] ,HorizontalRule ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [] [[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]]]] ,Header 2 ("empty-tables",[],[]) [Str "Empty",Space,Str "Tables"] ,Para [Str "This",Space,Str "section",Space,Str "should",Space,Str "be",Space,Str "empty."]] pandoc-1.19.2.4/tests/latex-reader.native0000644000000000000000000006307513155240142016337 0ustar0000000000000000Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Space,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("date",MetaInlines [Str "July",Space,Str "17,",Space,Str "2006"]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]}) [RawBlock (Format "latex") "\\maketitle" ,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",SoftBreak,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."] ,HorizontalRule ,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"]] ,Para [Str "Level",Space,Str "4"] ,Para [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 ("level-2",[],[]) [Str "Level",Space,Str "2"] ,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"] ,HorizontalRule ,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"] ,Para [Str "Here\8217s",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",SoftBreak,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",SoftBreak,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item."] ,Para [Str "Here\8217s",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,Str "here."] ,HorizontalRule ,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."]] ,BlockQuote [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"] ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}" ,Para [Str "A",Space,Str "list:"] ,OrderedList (1,Decimal,Period) [[Para [Str "item",Space,Str "one"]] ,[Para [Str "item",Space,Str "two"]]] ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"] ,BlockQuote [Para [Str "nested"]] ,BlockQuote [Para [Str "nested"]]] ,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",Space,Str ">",Space,Str "1."] ,Para [Str "Box-style:"] ,BlockQuote [Para [Str "Example:"] ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"] ,BlockQuote [OrderedList (1,Decimal,Period) [[Para [Str "do",Space,Str "laundry"]] ,[Para [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"]]]] ,Para [Str "Here\8217s",Space,Str "a",Space,Str "nested",Space,Str "one:"] ,BlockQuote [Para [Str "Joe",Space,Str "said:"] ,BlockQuote [Para [Str "Don\8217t",Space,Str "quote",Space,Str "me."]]] ,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."] ,HorizontalRule ,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: \\$ \\\\ \\> \\[ \\{" ,Para [Str "this",Space,Str "has",Space,Emph [Str "two",LineBreak,Str "lines"]] ,HorizontalRule ,Header 1 ("lists",[],[]) [Str "Lists"] ,Header 2 ("unordered",[],[]) [Str "Unordered"] ,Para [Str "Asterisks",Space,Str "tight:"] ,BulletList [[Para [Str "asterisk",Space,Str "1"]] ,[Para [Str "asterisk",Space,Str "2"]] ,[Para [Str "asterisk",Space,Str "3"]]] ,Para [Str "Asterisks",Space,Str "loose:"] ,BulletList [[Para [Str "asterisk",Space,Str "1"]] ,[Para [Str "asterisk",Space,Str "2"]] ,[Para [Str "asterisk",Space,Str "3"]]] ,Para [Str "Pluses",Space,Str "tight:"] ,BulletList [[Para [Str "Plus",Space,Str "1"]] ,[Para [Str "Plus",Space,Str "2"]] ,[Para [Str "Plus",Space,Str "3"]]] ,Para [Str "Pluses",Space,Str "loose:"] ,BulletList [[Para [Str "Plus",Space,Str "1"]] ,[Para [Str "Plus",Space,Str "2"]] ,[Para [Str "Plus",Space,Str "3"]]] ,Para [Str "Minuses",Space,Str "tight:"] ,BulletList [[Para [Str "Minus",Space,Str "1"]] ,[Para [Str "Minus",Space,Str "2"]] ,[Para [Str "Minus",Space,Str "3"]]] ,Para [Str "Minuses",Space,Str "loose:"] ,BulletList [[Para [Str "Minus",Space,Str "1"]] ,[Para [Str "Minus",Space,Str "2"]] ,[Para [Str "Minus",Space,Str "3"]]] ,Header 2 ("ordered",[],[]) [Str "Ordered"] ,Para [Str "Tight:"] ,OrderedList (1,Decimal,Period) [[Para [Str "First"]] ,[Para [Str "Second"]] ,[Para [Str "Third"]]] ,Para [Str "and:"] ,OrderedList (1,Decimal,Period) [[Para [Str "One"]] ,[Para [Str "Two"]] ,[Para [Str "Three"]]] ,Para [Str "Loose",Space,Str "using",Space,Str "tabs:"] ,OrderedList (1,Decimal,Period) [[Para [Str "First"]] ,[Para [Str "Second"]] ,[Para [Str "Third"]]] ,Para [Str "and",Space,Str "using",Space,Str "spaces:"] ,OrderedList (1,Decimal,Period) [[Para [Str "One"]] ,[Para [Str "Two"]] ,[Para [Str "Three"]]] ,Para [Str "Multiple",Space,Str "paragraphs:"] ,OrderedList (1,Decimal,Period) [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."] ,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\8217s",SoftBreak,Str "back."]] ,[Para [Str "Item",Space,Str "2."]] ,[Para [Str "Item",Space,Str "3."]]] ,Header 2 ("nested",[],[]) [Str "Nested"] ,BulletList [[Para [Str "Tab"] ,BulletList [[Para [Str "Tab"] ,BulletList [[Para [Str "Tab"]]]]]]] ,Para [Str "Here\8217s",Space,Str "another:"] ,OrderedList (1,Decimal,Period) [[Para [Str "First"]] ,[Para [Str "Second:"] ,BulletList [[Para [Str "Fee"]] ,[Para [Str "Fie"]] ,[Para [Str "Foe"]]]] ,[Para [Str "Third"]]] ,Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"] ,OrderedList (1,Decimal,Period) [[Para [Str "First"]] ,[Para [Str "Second:"] ,BulletList [[Para [Str "Fee"]] ,[Para [Str "Fie"]] ,[Para [Str "Foe"]]]] ,[Para [Str "Third"]]] ,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"] ,BulletList [[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]] ,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]]]]] ,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"] ,OrderedList (2,Decimal,TwoParens) [[Para [Str "begins",Space,Str "with",Space,Str "2"]] ,[Para [Str "and",Space,Str "now",Space,Str "3"] ,Para [Str "with",Space,Str "a",Space,Str "continuation"] ,OrderedList (4,LowerRoman,Period) [[Para [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"]] ,[Para [Str "more",Space,Str "items"] ,OrderedList (1,UpperAlpha,TwoParens) [[Para [Str "a",Space,Str "subsublist"]] ,[Para [Str "a",Space,Str "subsublist"]]]]]]] ,Para [Str "Nesting:"] ,OrderedList (1,UpperAlpha,Period) [[Para [Str "Upper",Space,Str "Alpha"] ,OrderedList (1,UpperRoman,Period) [[Para [Str "Upper",Space,Str "Roman."] ,OrderedList (6,Decimal,TwoParens) [[Para [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"] ,OrderedList (3,LowerAlpha,OneParen) [[Para [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]] ,Para [Str "Autonumbering:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Para [Str "Autonumber."]] ,[Para [Str "More."] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Para [Str "Nested."]]]]] ,Para [Str "Should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "list",Space,Str "item:"] ,Para [Str "M.A.",Space,Str "2007"] ,Para [Str "B.",Space,Str "Williams"] ,HorizontalRule ,Header 1 ("definition-lists",[],[]) [Str "Definition",Space,Str "Lists"] ,Para [Str "Tight",Space,Str "using",Space,Str "spaces:"] ,DefinitionList [([Str "apple"], [[Para [Str "red",Space,Str "fruit"]]]) ,([Str "orange"], [[Para [Str "orange",Space,Str "fruit"]]]) ,([Str "banana"], [[Para [Str "yellow",Space,Str "fruit"]]])] ,Para [Str "Tight",Space,Str "using",Space,Str "tabs:"] ,DefinitionList [([Str "apple"], [[Para [Str "red",Space,Str "fruit"]]]) ,([Str "orange"], [[Para [Str "orange",Space,Str "fruit"]]]) ,([Str "banana"], [[Para [Str "yellow",Space,Str "fruit"]]])] ,Para [Str "Loose:"] ,DefinitionList [([Str "apple"], [[Para [Str "red",Space,Str "fruit"]]]) ,([Str "orange"], [[Para [Str "orange",Space,Str "fruit"]]]) ,([Str "banana"], [[Para [Str "yellow",Space,Str "fruit"]]])] ,Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"] ,DefinitionList [([Emph [Str "apple"]], [[Para [Str "red",Space,Str "fruit"] ,Para [Str "contains",Space,Str "seeds,",Space,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"]]]) ,([Emph [Str "orange"]], [[Para [Str "orange",Space,Str "fruit"] ,CodeBlock ("",[],[]) "{ orange code block }" ,BlockQuote [Para [Str "orange",Space,Str "block",Space,Str "quote"]]]])] ,Header 1 ("html-blocks",[],[]) [Str "HTML",Space,Str "Blocks"] ,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"] ,Para [Str "foo",SoftBreak,Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"] ,Para [Str "foo",SoftBreak,Str "bar",SoftBreak,Str "Interpreted",Space,Str "markdown",Space,Str "in",Space,Str "a",Space,Str "table:"] ,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],SoftBreak,Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"],SoftBreak,Str "Here\8217s",Space,Str "a",Space,Str "simple",Space,Str "block:"] ,Para [Str "foo",SoftBreak,Str "This",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "code",Space,Str "block,",Space,Str "though:"] ,CodeBlock ("",[],[]) "
        \n foo\n
        " ,Para [Str "As",Space,Str "should",Space,Str "this:"] ,CodeBlock ("",[],[]) "
        foo
        " ,Para [Str "Now,",Space,Str "nested:"] ,Para [Str "foo",SoftBreak,Str "This",Space,Str "should",Space,Str "just",Space,Str "be",Space,Str "an",Space,Str "HTML",Space,Str "comment:"] ,Para [Str "Multiline:"] ,Para [Str "Code",Space,Str "block:"] ,CodeBlock ("",[],[]) "" ,Para [Str "Just",Space,Str "plain",Space,Str "comment,",Space,Str "with",Space,Str "trailing",Space,Str "spaces",Space,Str "on",Space,Str "the",Space,Str "line:"] ,Para [Str "Code:"] ,CodeBlock ("",[],[]) "
        " ,Para [Str "Hr\8217s:"] ,HorizontalRule ,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 "An",Space,Emph [Link ("",[],[]) [Str "emphasized",Space,Str "link"] ("/url","")],Str "."] ,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] ,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] ,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] ,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] ,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",SoftBreak,Code ("",[],[]) "",Str "."] ,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]] ,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",SoftBreak,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello",Space,Str "there"],Str "."] ,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",SoftBreak,Str "H",Subscript [Str "many",Space,Str "of",Space,Str "them"],Str "O."] ,Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",Space,Str "because",Space,Str "of",Space,Str "the",SoftBreak,Str "unescaped",Space,Str "spaces:",Space,Str "a^b",Space,Str "c^d,",Space,Str "a",Math InlineMath "\\sim",Str "b",SoftBreak,Str "c",Math InlineMath "\\sim",Str "d."] ,HorizontalRule ,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"] ,Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name."]] ,Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters."] ,Para [Quoted SingleQuote [Str "Oak,"],Space,Quoted SingleQuote [Str "elm,"],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",Space,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine."]] ,Para [Quoted SingleQuote [Str "He",Space,Str "said,",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70\8217s?"] ,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code ("",[],[]) "code"],Space,Str "and",Space,Str "a",SoftBreak,Quoted DoubleQuote [Link ("",[],[]) [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."] ,Para [Str "Some",Space,Str "dashes:",Space,Str "one\8212two\8212three\8212four\8212five."] ,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5\8211\&7,",Space,Str "255\8211\&66,",Space,Str "1987\8211\&1999."] ,Para [Str "Ellipses\8230and\8230and\8230."] ,HorizontalRule ,Header 1 ("latex",[],[]) [Str "LaTeX"] ,BulletList [[Para [Cite [Citation {citationId = "smith.1899", citationPrefix = [], citationSuffix = [Str "22-23"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cite[22-23]{smith.1899}"]]] ,[Para [RawInline (Format "latex") "\\doublespacing"]] ,[Para [Math InlineMath "2+2=4"]] ,[Para [Math InlineMath "x \\in y"]] ,[Para [Math InlineMath "\\alpha \\wedge \\omega"]] ,[Para [Math InlineMath "223"]] ,[Para [Math InlineMath "p",Str "-Tree"]] ,[Para [Math InlineMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]] ,[Para [Str "Here\8217s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",SoftBreak,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]] ,Para [Str "These",Space,Str "shouldn\8217t",Space,Str "be",Space,Str "math:"] ,BulletList [[Para [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]] ,[Para [Str "$22,000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money.",Space,Str "So",Space,Str "is",Space,Str "$34,000.",Space,Str "(It",Space,Str "worked",Space,Str "if",SoftBreak,Quoted DoubleQuote [Str "lot"],Space,Str "is",Space,Str "emphasized.)"]] ,[Para [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23$."]]] ,Para [Str "Here\8217s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"] ,Table [] [AlignLeft,AlignLeft] [0.0,0.0] [[Plain [Str "Animal"]] ,[Plain [Str "Number"]]] [[[Plain [Str "Dog"]] ,[Plain [Str "2"]]] ,[[Plain [Str "Cat"]] ,[Plain [Str "1"]]]] ,Para [Str "A",Space,Str "table",Space,Str "with",Space,Str "one",Space,Str "column:"] ,Table [] [AlignCenter] [0.0] [[]] [[[Plain [Str "Animal"]]] ,[[Plain [Str "Vegetable"]]]] ,HorizontalRule ,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"] ,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"] ,BulletList [[Para [Str "I",Space,Str "hat:",Space,Str "\206"]] ,[Para [Str "o",Space,Str "umlaut:",Space,Str "\246"]] ,[Para [Str "section:",Space,Str "\167"]] ,[Para [Str "set",Space,Str "membership:",Space,Str "\8712"]] ,[Para [Str "copyright:",Space,Str "\169"]]] ,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."] ,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."] ,Para [Str "This",Space,Str "&",Space,Str "that."] ,Para [Str "4",Space,Str "<",Space,Str "5."] ,Para [Str "6",Space,Str ">",Space,Str "5."] ,Para [Str "Backslash:",Space,Str "\\"] ,Para [Str "Backtick:",Space,Str "\8216"] ,Para [Str "Asterisk:",Space,Str "*"] ,Para [Str "Underscore:",Space,Str "_"] ,Para [Str "Left",Space,Str "brace:",Space,Str "{"] ,Para [Str "Right",Space,Str "brace:",Space,Str "}"] ,Para [Str "Left",Space,Str "bracket:",Space,Str "["] ,Para [Str "Right",Space,Str "bracket:",Space,Str "]"] ,Para [Str "Left",Space,Str "paren:",Space,Str "("] ,Para [Str "Right",Space,Str "paren:",Space,Str ")"] ,Para [Str "Greater-than:",Space,Str ">"] ,Para [Str "Hash:",Space,Str "#"] ,Para [Str "Period:",Space,Str "."] ,Para [Str "Bang:",Space,Str "!"] ,Para [Str "Plus:",Space,Str "+"] ,Para [Str "Minus:",Space,Str "-"] ,HorizontalRule ,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/",""),Str "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","")] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","")] ,Para [Link ("",[],[]) [Str "with_underscore"] ("/url/with_underscore","")] ,Para [Link ("",[],[]) [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")] ,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."] ,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 "."] ,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."] ,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "twice"] ("/url",""),Str "."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "thrice"] ("/url",""),Str "."] ,Para [Str "This",Space,Str "should",Space,Str "[not][]",Space,Str "be",Space,Str "a",Space,Str "link."] ,CodeBlock ("",[],[]) "[not]: /url" ,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."] ,Para [Str "Foo",Space,Link ("",[],[]) [Str "biz"] ("/url/",""),Str "."] ,Header 2 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"] ,Para [Str "Here\8217s",Space,Str "a",SoftBreak,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\8217s",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:",SoftBreak,Link ("",[],[]) [Str "AT&T"] ("http://att.com/",""),Str "."] ,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."] ,Para [Str "Here\8217s",Space,Str "an",SoftBreak,Link ("",[],[]) [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."] ,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 [[Para [Str "In",Space,Str "a",Space,Str "list?"]] ,[Para [Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] ,[Para [Str "It",Space,Str "should."]]] ,Para [Str "An",Space,Str "e-mail",Space,Str "address:",SoftBreak,Link ("",[],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")] ,BlockQuote [Para [Str "Blockquoted:",Space,Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] ,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) ""] ,CodeBlock ("",[],[]) "or here: " ,HorizontalRule ,Header 1 ("images",[],[]) [Str "Images"] ,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"] ,Para [Image ("",[],[]) [Str "image"] ("lalune.jpg","")] ,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image ("",[],[]) [Str "image"] ("movie.jpg",""),Space,Str "icon."] ,HorizontalRule ,Header 1 ("footnotes",[],[]) [Str "Footnotes"] ,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",SoftBreak,Str "reference,",Note [Para [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 "after",Space,Str "the",Space,Str "footnote",SoftBreak,Str "reference.",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],SoftBreak,Str "and",SoftBreak,Str "another.",Note [Para [Str "Here\8217s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",SoftBreak,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock ("",[],[]) " { }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",SoftBreak,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],SoftBreak,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",SoftBreak,Str "a",Space,Str "space.[^my",Space,Str "note]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",SoftBreak,Str "note.",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",SoftBreak,Link ("",[],[]) [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters,",SoftBreak,Str "as",Space,Str "well",Space,Str "as",Space,Str "[bracketed",Space,Str "text]."]]] ,BlockQuote [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]] ,OrderedList (1,Decimal,Period) [[Para [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]]]] ,Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",SoftBreak,Str "indented."] ,Header 1 ("escaped-characters",[],[]) [Str "Escaped",Space,Str "characters"] ,Para [Str "$",Space,Str "%",Space,Str "&",Space,Str "#",Space,Str "_",Space,Str "{",Space,Str "}"]] pandoc-1.19.2.4/tests/lhs-test-markdown.native0000644000000000000000000000250313155240142017332 0ustar0000000000000000[Header 1 ("lhs-test",[],[]) [Str "lhs",Space,Str "test"] ,Para [Code ("",[],[]) "unsplit",Space,Str "is",Space,Str "an",Space,Str "arrow",Space,Str "that",Space,Str "takes",Space,Str "a",Space,Str "pair",Space,Str "of",Space,Str "values",Space,Str "and",Space,Str "combines",Space,Str "them",Space,Str "to",SoftBreak,Str "return",Space,Str "a",Space,Str "single",Space,Str "value:"] ,CodeBlock ("",["sourceCode","literate","haskell"],[]) "unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d\nunsplit = arr . uncurry\n -- arr (\\op (x,y) -> x `op` y)" ,Para [Code ("",[],[]) "(***)",Space,Str "combines",Space,Str "two",Space,Str "arrows",Space,Str "into",Space,Str "a",Space,Str "new",Space,Str "arrow",Space,Str "by",Space,Str "running",Space,Str "the",Space,Str "two",Space,Str "arrows",Space,Str "on",Space,Str "a",SoftBreak,Str "pair",Space,Str "of",Space,Str "values",Space,Str "(one",Space,Str "arrow",Space,Str "on",Space,Str "the",Space,Str "first",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair",Space,Str "and",Space,Str "one",Space,Str "arrow",Space,Str "on",Space,Str "the",SoftBreak,Str "second",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair)."] ,CodeBlock ("",[],[]) "f *** g = first f >>> second g" ,Para [Str "Block",Space,Str "quote:"] ,BlockQuote [Para [Str "foo",Space,Str "bar"]]] pandoc-1.19.2.4/tests/lhs-test.native0000644000000000000000000000250313155240142015512 0ustar0000000000000000[Header 1 ("lhs-test",[],[]) [Str "lhs",Space,Str "test"] ,Para [Code ("",[],[]) "unsplit",Space,Str "is",Space,Str "an",Space,Str "arrow",Space,Str "that",Space,Str "takes",Space,Str "a",Space,Str "pair",Space,Str "of",Space,Str "values",Space,Str "and",Space,Str "combines",Space,Str "them",Space,Str "to",SoftBreak,Str "return",Space,Str "a",Space,Str "single",Space,Str "value:"] ,CodeBlock ("",["sourceCode","literate","haskell"],[]) "unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d\nunsplit = arr . uncurry\n -- arr (\\op (x,y) -> x `op` y)" ,Para [Code ("",[],[]) "(***)",Space,Str "combines",Space,Str "two",Space,Str "arrows",Space,Str "into",Space,Str "a",Space,Str "new",Space,Str "arrow",Space,Str "by",Space,Str "running",Space,Str "the",Space,Str "two",Space,Str "arrows",Space,Str "on",Space,Str "a",SoftBreak,Str "pair",Space,Str "of",Space,Str "values",Space,Str "(one",Space,Str "arrow",Space,Str "on",Space,Str "the",Space,Str "first",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair",Space,Str "and",Space,Str "one",Space,Str "arrow",Space,Str "on",Space,Str "the",SoftBreak,Str "second",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair)."] ,CodeBlock ("",[],[]) "f *** g = first f >>> second g" ,Para [Str "Block",Space,Str "quote:"] ,BlockQuote [Para [Str "foo",Space,Str "bar"]]] pandoc-1.19.2.4/tests/markdown-citations.native0000644000000000000000000001431313155240142017566 0ustar0000000000000000[Header 1 ("pandoc-with-citeproc-hs",[],[]) [Str "Pandoc",Space,Str "with",Space,Str "citeproc-hs"] ,BulletList [[Para [Cite [Citation {citationId = "nonexistent", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [Str "[@nonexistent]"]]] ,[Para [Cite [Citation {citationId = "nonexistent", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 0}] [Str "@nonexistent"]]] ,[Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 0}] [Str "@item1"],Space,Str "says",Space,Str "blah."]] ,[Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Str "p.",Space,Str "30"], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 0}] [Str "@item1",Space,Str "[p.",Space,Str "30]"],Space,Str "says",Space,Str "blah."]] ,[Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Str "p.",Space,Str "30,",Space,Str "with",Space,Str "suffix"], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 0}] [Str "@item1",Space,Str "[p.",Space,Str "30,",Space,Str "with",Space,Str "suffix]"],Space,Str "says",Space,Str "blah."]] ,[Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 0},Citation {citationId = "item2", citationPrefix = [], citationSuffix = [Space,Str "p.",Space,Str "30"], citationMode = SuppressAuthor, citationNoteNum = 0, citationHash = 0},Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [Str "see",Space,Str "also"], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [Str "@item1",Space,Str "[-@item2",Space,Str "p.",Space,Str "30;",Space,Str "see",Space,Str "also",Space,Str "@\1087\1091\1085\1082\1090\&3]"],Space,Str "says",Space,Str "blah."]] ,[Para [Str "In",Space,Str "a",Space,Str "note.",Note [Para [Cite [Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [], citationSuffix = [Str "p.",Space,Str "12"], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 0}] [Str "@\1087\1091\1085\1082\1090\&3",Space,Str "[p.",Space,Str "12]"],Space,Str "and",Space,Str "a",Space,Str "citation",Space,Str "without",Space,Str "locators",Space,Cite [Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [Str "[@\1087\1091\1085\1082\1090\&3]"],Str "."]]]] ,[Para [Str "A",Space,Str "citation",Space,Str "group",Space,Cite [Citation {citationId = "item1", citationPrefix = [Str "see"], citationSuffix = [Space,Str "chap.",Space,Str "3"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0},Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [Str "also"], citationSuffix = [Space,Str "p.",Space,Str "34-35"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [Str "[see",Space,Str "@item1",Space,Str "chap.",Space,Str "3;",Space,Str "also",Space,Str "@\1087\1091\1085\1082\1090\&3",Space,Str "p.",Space,Str "34-35]"],Str "."]] ,[Para [Str "Another",Space,Str "one",Space,Cite [Citation {citationId = "item1", citationPrefix = [Str "see"], citationSuffix = [Space,Str "p.",Space,Str "34-35"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [Str "[see",Space,Str "@item1",Space,Str "p.",Space,Str "34-35]"],Str "."]] ,[Para [Str "And",Space,Str "another",Space,Str "one",Space,Str "in",Space,Str "a",Space,Str "note.",Note [Para [Str "Some",Space,Str "citations",Space,Cite [Citation {citationId = "item1", citationPrefix = [Str "see"], citationSuffix = [Space,Str "chap.",Space,Str "3"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0},Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0},Citation {citationId = "item2", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [Str "[see",Space,Str "@item1",Space,Str "chap.",Space,Str "3;",Space,Str "@\1087\1091\1085\1082\1090\&3;",Space,Str "@item2]"],Str "."]]]] ,[Para [Str "Citation",Space,Str "with",Space,Str "a",Space,Str "suffix",Space,Str "and",Space,Str "locator",Space,Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Space,Str "pp.",Space,Str "33,",Space,Str "35-37,",Space,Str "and",Space,Str "nowhere",Space,Str "else"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [Str "[@item1",Space,Str "pp.",Space,Str "33,",Space,Str "35-37,",Space,Str "and",Space,Str "nowhere",Space,Str "else]"],Str "."]] ,[Para [Str "Citation",Space,Str "with",Space,Str "suffix",Space,Str "only",Space,Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Space,Str "and",Space,Str "nowhere",Space,Str "else"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [Str "[@item1",Space,Str "and",Space,Str "nowhere",Space,Str "else]"],Str "."]] ,[Para [Str "Now",Space,Str "some",Space,Str "modifiers.",Note [Para [Str "Like",Space,Str "a",Space,Str "citation",Space,Str "without",Space,Str "author:",Space,Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [], citationMode = SuppressAuthor, citationNoteNum = 0, citationHash = 0}] [Str "[-@item1]"],Str ",",Space,Str "and",Space,Str "now",Space,Str "Doe",Space,Str "with",Space,Str "a",Space,Str "locator",Space,Cite [Citation {citationId = "item2", citationPrefix = [], citationSuffix = [Space,Str "p.",Space,Str "44"], citationMode = SuppressAuthor, citationNoteNum = 0, citationHash = 0}] [Str "[-@item2",Space,Str "p.",Space,Str "44]"],Str "."]]]] ,[Para [Str "With",Space,Str "some",Space,Str "markup",Space,Cite [Citation {citationId = "item1", citationPrefix = [Emph [Str "see"]], citationSuffix = [Space,Str "p.",Space,Strong [Str "32"]], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [Str "[*see*",Space,Str "@item1",Space,Str "p.",Space,Str "**32**]"],Str "."]]] ,Header 1 ("references",[],[]) [Str "References"]] pandoc-1.19.2.4/tests/markdown-reader-more.native0000644000000000000000000003151113155240142017772 0ustar0000000000000000Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "Author",Space,Str "One"],MetaInlines [Str "Author",Space,Str "Two"],MetaInlines [Str "Author",Space,Str "Three"],MetaInlines [Str "Author",Space,Str "Four"]]),("title",MetaInlines [Str "Title",SoftBreak,Str "spanning",Space,Str "multiple",Space,Str "lines"])]}) [Header 1 ("additional-markdown-reader-tests",[],[]) [Str "Additional",Space,Str "markdown",Space,Str "reader",Space,Str "tests"] ,Header 2 ("blank-line-before-url-in-link-reference",[],[]) [Str "Blank",Space,Str "line",Space,Str "before",Space,Str "URL",Space,Str "in",Space,Str "link",Space,Str "reference"] ,Para [Link ("",[],[]) [Str "foo"] ("/url",""),Space,Str "and",Space,Link ("",[],[]) [Str "bar"] ("/url","title")] ,Header 2 ("raw-context-environments",[],[]) [Str "Raw",Space,Str "ConTeXt",Space,Str "environments"] ,Plain [RawInline (Format "tex") "\\placeformula "] ,RawBlock (Format "context") "\\startformula\n L_{1} = L_{2}\n \\stopformula" ,RawBlock (Format "context") "\\start[a2]\n\\start[a2]\n\\stop[a2]\n\\stop[a2]" ,Header 2 ("raw-latex-environments",[],[]) [Str "Raw",Space,Str "LaTeX",Space,Str "environments"] ,RawBlock (Format "latex") "\\begin{center}\n\\begin{tikzpicture}[baseline={([yshift=+-.5ex]current bounding box.center)}, level distance=24pt]\n\\Tree [.{S} [.NP John\\index{i} ] [.VP [.V likes ] [.NP himself\\index{i,*j} ]]]\n\\end{tikzpicture}\n\\end{center}" ,Header 2 ("urls-with-spaces-and-punctuation",[],[]) [Str "URLs",Space,Str "with",Space,Str "spaces",Space,Str "and",Space,Str "punctuation"] ,Para [Link ("",[],[]) [Str "foo"] ("/bar%20and%20baz",""),SoftBreak,Link ("",[],[]) [Str "foo"] ("/bar%20and%20baz",""),SoftBreak,Link ("",[],[]) [Str "foo"] ("/bar%20and%20baz",""),SoftBreak,Link ("",[],[]) [Str "foo"] ("bar%20baz","title")] ,Para [Link ("",[],[]) [Str "baz"] ("/foo%20foo",""),Space,Link ("",[],[]) [Str "bam"] ("/foo%20fee",""),Space,Link ("",[],[]) [Str "bork"] ("/foo/zee%20zob","title")] ,Para [Link ("",[],[]) [Str "Ward\8217s",Space,Str "method."] ("http://en.wikipedia.org/wiki/Ward's_method","")] ,Header 2 ("horizontal-rules-with-spaces-at-end",[],[]) [Str "Horizontal",Space,Str "rules",Space,Str "with",Space,Str "spaces",Space,Str "at",Space,Str "end"] ,HorizontalRule ,HorizontalRule ,Header 2 ("raw-html-before-header",[],[]) [Str "Raw",Space,Str "HTML",Space,Str "before",Space,Str "header"] ,Para [RawInline (Format "html") "",RawInline (Format "html") ""] ,Header 3 ("my-header",[],[]) [Str "my",Space,Str "header"] ,Header 2 ("in-math",[],[]) [Str "$",Space,Str "in",Space,Str "math"] ,Para [Math InlineMath "\\$2 + \\$3"] ,Para [Math InlineMath "x = \\text{the $n$th root of $y$}"] ,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "math:"] ,Para [Str "$PATH",Space,Str "90",Space,Str "$PATH"] ,Header 2 ("commented-out-list-item",[],[]) [Str "Commented-out",Space,Str "list",Space,Str "item"] ,BulletList [[Plain [Str "one",SoftBreak,RawInline (Format "html") ""]] ,[Plain [Str "three"]]] ,Header 2 ("indented-code-at-beginning-of-list",[],[]) [Str "Indented",Space,Str "code",Space,Str "at",Space,Str "beginning",Space,Str "of",Space,Str "list"] ,BulletList [[CodeBlock ("",[],[]) "code\ncode"]] ,OrderedList (1,Decimal,Period) [[CodeBlock ("",[],[]) "code\ncode"] ,[CodeBlock ("",[],[]) "code\ncode"]] ,BulletList [[CodeBlock ("",[],[]) "code\ncode"] ,[Plain [Str "no",Space,Str "code"]]] ,Header 2 ("backslash-newline",[],[]) [Str "Backslash",Space,Str "newline"] ,Para [Str "hi",LineBreak,Str "there"] ,Header 2 ("code-spans",[],[]) [Str "Code",Space,Str "spans"] ,Para [Code ("",[],[]) "hi\\"] ,Para [Code ("",[],[]) "hi there"] ,Para [Code ("",[],[]) "hi````there"] ,Para [Str "`hi"] ,Para [Str "there`"] ,Header 2 ("multilingual-urls",[],[]) [Str "Multilingual",Space,Str "URLs"] ,Para [Link ("",[],[]) [Str "http://\27979.com?\27979=\27979"] ("http://\27979.com?\27979=\27979","")] ,Para [Link ("",[],[]) [Str "foo"] ("/bar/\27979?x=\27979","title")] ,Para [Link ("",[],[]) [Str "\27979@foo.\27979.baz"] ("mailto:\27979@foo.\27979.baz","")] ,Header 2 ("numbered-examples",[],[]) [Str "Numbered",Space,Str "examples"] ,OrderedList (1,Example,TwoParens) [[Plain [Str "First",Space,Str "example."]] ,[Plain [Str "Second",Space,Str "example."]]] ,Para [Str "Explanation",Space,Str "of",Space,Str "examples",Space,Str "(2)",Space,Str "and",Space,Str "(3)."] ,OrderedList (3,Example,TwoParens) [[Plain [Str "Third",Space,Str "example."]]] ,Header 2 ("macros",[],[]) [Str "Macros"] ,Para [Math InlineMath "{\\langle x,y \\rangle}"] ,Header 2 ("case-insensitive-references",[],[]) [Str "Case-insensitive",Space,Str "references"] ,Para [Link ("",[],[]) [Str "Fum"] ("/fum","")] ,Para [Link ("",[],[]) [Str "FUM"] ("/fum","")] ,Para [Link ("",[],[]) [Str "bat"] ("/bat","")] ,Header 2 ("curly-smart-quotes",[],[]) [Str "Curly",Space,Str "smart",Space,Str "quotes"] ,Para [Quoted DoubleQuote [Str "Hi"]] ,Para [Quoted SingleQuote [Str "Hi"]] ,Header 2 ("consecutive-lists",[],[]) [Str "Consecutive",Space,Str "lists"] ,BulletList [[Plain [Str "one"]] ,[Plain [Str "two"]]] ,OrderedList (1,Decimal,Period) [[Plain [Str "one"]] ,[Plain [Str "two"]]] ,OrderedList (1,LowerAlpha,Period) [[Plain [Str "one"]] ,[Plain [Str "two"]]] ,Header 2 ("implicit-header-references",[],[]) [Str "Implicit",Space,Str "header",Space,Str "references"] ,Header 3 ("my-header-1",[],[]) [Str "My",Space,Str "header"] ,Header 3 ("my-other-header",[],[]) [Str "My",Space,Str "other",Space,Str "header"] ,Para [Str "A",Space,Str "link",Space,Str "to",Space,Link ("",[],[]) [Str "My",Space,Str "header"] ("#my-header-1",""),Str "."] ,Para [Str "Another",Space,Str "link",Space,Str "to",Space,Link ("",[],[]) [Str "it"] ("#my-header-1",""),Str "."] ,Para [Str "Should",Space,Str "be",Space,Link ("",[],[]) [Str "case",Space,Str "insensitive"] ("#my-header-1",""),Str "."] ,Para [Str "Link",Space,Str "to",Space,Link ("",[],[]) [Str "Explicit",Space,Str "header",Space,Str "attributes"] ("#foobar",""),Str "."] ,Para [Str "But",Space,Str "this",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "link",Space,Str "to",Space,Link ("",[],[]) [Str "My",Space,Str "other",Space,Str "header"] ("/foo",""),Str ",",Space,Str "since",Space,Str "the",Space,Str "reference",Space,Str "is",Space,Str "defined."] ,Header 2 ("foobar",["baz"],[("key","val")]) [Str "Explicit",Space,Str "header",Space,Str "attributes"] ,BlockQuote [Header 2 ("foobar",["baz"],[("key","val")]) [Str "Header",Space,Str "attributes",Space,Str "inside",Space,Str "block",Space,Str "quote"]] ,Header 2 ("line-blocks",[],[]) [Str "Line",Space,Str "blocks"] ,LineBlock [[Str "But",Space,Str "can",Space,Str "a",Space,Str "bee",Space,Str "be",Space,Str "said",Space,Str "to",Space,Str "be"] ,[Str "\160\160\160\160or",Space,Str "not",Space,Str "to",Space,Str "be",Space,Str "an",Space,Str "entire",Space,Str "bee,"] ,[Str "\160\160\160\160\160\160\160\160when",Space,Str "half",Space,Str "the",Space,Str "bee",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "bee,"] ,[Str "\160\160\160\160\160\160\160\160\160\160\160\160due",Space,Str "to",Space,Str "some",Space,Str "ancient",Space,Str "injury?"] ,[] ,[Str "Continuation",Space,Str "line"] ,[Str "\160\160and",Space,Str "another"]] ,Header 2 ("grid-tables",[],[]) [Str "Grid",Space,Str "Tables"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.2638888888888889,0.16666666666666666,0.18055555555555555] [[Plain [Str "col",Space,Str "1"]] ,[Plain [Str "col",Space,Str "2"]] ,[Plain [Str "col",Space,Str "3"]]] [[[Para [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]] ,[Para [Str "b",SoftBreak,Str "b",Space,Str "2"]] ,[Para [Str "c",SoftBreak,Str "c",Space,Str "2"]]] ,[[Para [Str "r2",Space,Str "d"]] ,[Para [Str "e"]] ,[Para [Str "f"]]]] ,Para [Str "Headless"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.2638888888888889,0.16666666666666666,0.18055555555555555] [[] ,[] ,[]] [[[Para [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]] ,[Para [Str "b",SoftBreak,Str "b",Space,Str "2"]] ,[Para [Str "c",SoftBreak,Str "c",Space,Str "2"]]] ,[[Para [Str "r2",Space,Str "d"]] ,[Para [Str "e"]] ,[Para [Str "f"]]]] ,Para [Str "With",Space,Str "alignments"] ,Table [] [AlignRight,AlignLeft,AlignCenter] [0.2638888888888889,0.16666666666666666,0.18055555555555555] [[Plain [Str "col",Space,Str "1"]] ,[Plain [Str "col",Space,Str "2"]] ,[Plain [Str "col",Space,Str "3"]]] [[[Para [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]] ,[Para [Str "b",SoftBreak,Str "b",Space,Str "2"]] ,[Para [Str "c",SoftBreak,Str "c",Space,Str "2"]]] ,[[Para [Str "r2",Space,Str "d"]] ,[Para [Str "e"]] ,[Para [Str "f"]]]] ,Para [Str "Headless",Space,Str "with",Space,Str "alignments"] ,Table [] [AlignRight,AlignLeft,AlignCenter] [0.2638888888888889,0.16666666666666666,0.18055555555555555] [[] ,[] ,[]] [[[Para [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]] ,[Para [Str "b",SoftBreak,Str "b",Space,Str "2"]] ,[Para [Str "c",SoftBreak,Str "c",Space,Str "2"]]] ,[[Para [Str "r2",Space,Str "d"]] ,[Para [Str "e"]] ,[Para [Str "f"]]]] ,Para [Str "Spaces",Space,Str "at",Space,Str "ends",Space,Str "of",Space,Str "lines"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.2638888888888889,0.16666666666666666,0.18055555555555555] [[] ,[] ,[]] [[[Para [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]] ,[Para [Str "b",SoftBreak,Str "b",Space,Str "2"]] ,[Para [Str "c",SoftBreak,Str "c",Space,Str "2"]]] ,[[Para [Str "r2",Space,Str "d"]] ,[Para [Str "e"]] ,[Para [Str "f"]]]] ,Para [Str "Multiple",Space,Str "blocks",Space,Str "in",Space,Str "a",Space,Str "cell"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.2638888888888889,0.16666666666666666,0.18055555555555555] [[] ,[] ,[]] [[[Header 1 ("col-1",[],[]) [Str "col",Space,Str "1"] ,Para [Str "col",Space,Str "1"]] ,[Header 1 ("col-2",[],[]) [Str "col",Space,Str "2"] ,Para [Str "col",Space,Str "2"]] ,[Header 1 ("col-3",[],[]) [Str "col",Space,Str "3"] ,Para [Str "col",Space,Str "3"]]] ,[[Para [Str "r1",Space,Str "a"] ,Para [Str "r1",Space,Str "bis"]] ,[BulletList [[Plain [Str "b"]] ,[Plain [Str "b",Space,Str "2"]] ,[Plain [Str "b",Space,Str "2"]]]] ,[Para [Str "c",SoftBreak,Str "c",Space,Str "2",SoftBreak,Str "c",Space,Str "2"]]]] ,Para [Str "Empty",Space,Str "cells"] ,Table [] [AlignDefault,AlignDefault] [5.555555555555555e-2,5.555555555555555e-2] [[] ,[]] [[[] ,[]]] ,Header 2 ("entities-in-links-and-titles",[],[]) [Str "Entities",Space,Str "in",Space,Str "links",Space,Str "and",Space,Str "titles"] ,Para [Link ("",[],[]) [Str "link"] ("/\252rl","\246\246!")] ,Para [Link ("",[],[]) [Str "http://g\246\246gle.com"] ("http://g\246\246gle.com","")] ,Para [Link ("",[],[]) [Str "me@ex\228mple.com"] ("mailto:me@ex\228mple.com","")] ,Para [Link ("",[],[]) [Str "foobar"] ("/\252rl","\246\246!")] ,Header 2 ("parentheses-in-urls",[],[]) [Str "Parentheses",Space,Str "in",Space,Str "URLs"] ,Para [Link ("",[],[]) [Str "link"] ("/hi(there)","")] ,Para [Link ("",[],[]) [Str "link"] ("/hithere)","")] ,Para [Link ("",[],[]) [Str "linky"] ("hi_(there_(nested))","")] ,Header 2 ("backslashes-in-link-references",[],[]) [Str "Backslashes",Space,Str "in",Space,Str "link",Space,Str "references"] ,Para [Link ("",[],[]) [Str "*",RawInline (Format "tex") "\\a"] ("b","")] ,Header 2 ("reference-link-fallbacks",[],[]) [Str "Reference",Space,Str "link",Space,Str "fallbacks"] ,Para [Str "[",Emph [Str "not",Space,Str "a",Space,Str "link"],Str "]",Space,Str "[",Emph [Str "nope"],Str "]\8230"] ,Header 2 ("reference-link-followed-by-a-citation",[],[]) [Str "Reference",Space,Str "link",Space,Str "followed",Space,Str "by",Space,Str "a",Space,Str "citation"] ,Para [Str "MapReduce",Space,Str "is",Space,Str "a",Space,Str "paradigm",Space,Str "popularized",Space,Str "by",Space,Link ("",[],[]) [Str "Google"] ("http://google.com",""),Space,Cite [Citation {citationId = "mapreduce", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [Str "[@mapreduce]"],Space,Str "as",Space,Str "its",SoftBreak,Str "most",Space,Str "vocal",Space,Str "proponent."] ,Header 2 ("empty-reference-links",[],[]) [Str "Empty",Space,Str "reference",Space,Str "links"] ,Para [Str "bar"] ,Para [Link ("",[],[]) [Str "foo2"] ("","")] ,Header 2 ("wrapping-shouldnt-introduce-new-list-items",[],[]) [Str "Wrapping",Space,Str "shouldn\8217t",Space,Str "introduce",Space,Str "new",Space,Str "list",Space,Str "items"] ,BulletList [[Plain [Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "2015."]]] ,Header 2 ("bracketed-spans",[],[]) [Str "Bracketed",Space,Str "spans"] ,Para [Span ("id",["class"],[("key","val")]) [Emph [Str "foo"],Space,Str "bar",Space,Str "baz",Space,Link ("",[],[]) [Str "link"] ("url","")]]] pandoc-1.19.2.4/tests/mediawiki-reader.native0000644000000000000000000003323213155240142017155 0ustar0000000000000000Pandoc (Meta {unMeta = fromList []}) [Header 1 ("header",[],[]) [Str "header"] ,Header 2 ("header-level-two",[],[]) [Str "header",Space,Str "level",Space,Str "two"] ,Header 3 ("header-level-3",[],[]) [Str "header",Space,Str "level",Space,Str "3"] ,Header 4 ("header-level-four",[],[]) [Str "header",Space,Emph [Str "level"],Space,Str "four"] ,Header 5 ("header-level-5",[],[]) [Str "header",Space,Str "level",Space,Str "5"] ,Header 6 ("header-level-6",[],[]) [Str "header",Space,Str "level",Space,Str "6"] ,Para [Str "=======",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "========"] ,Para [Code ("",[],[]) "==\160not\160a\160header\160=="] ,Header 2 ("emph-and-strong",[],[]) [Str "emph",Space,Str "and",Space,Str "strong"] ,Para [Emph [Str "emph"],Space,Strong [Str "strong"]] ,Para [Strong [Emph [Str "strong",Space,Str "and",Space,Str "emph"]]] ,Para [Strong [Emph [Str "emph",Space,Str "inside"],Space,Str "strong"]] ,Para [Strong [Str "strong",Space,Str "with",Space,Emph [Str "emph"]]] ,Para [Emph [Strong [Str "strong",Space,Str "inside"],Space,Str "emph"]] ,Header 2 ("horizontal-rule",[],[]) [Str "horizontal",Space,Str "rule"] ,Para [Str "top"] ,HorizontalRule ,Para [Str "bottom"] ,HorizontalRule ,Header 2 ("nowiki",[],[]) [Str "nowiki"] ,Para [Str "''not",Space,Str "emph''"] ,Header 2 ("strikeout",[],[]) [Str "strikeout"] ,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "struck",Space,Str "out"]]] ,Header 2 ("entities",[],[]) [Str "entities"] ,Para [Str "hi",Space,Str "&",Space,Str "low"] ,Para [Str "hi",Space,Str "&",Space,Str "low"] ,Para [Str "G\246del"] ,Para [Str "\777\2730"] ,Header 2 ("comments",[],[]) [Str "comments"] ,Para [Str "inline",Space,Str "comment"] ,Para [Str "between",Space,Str "blocks"] ,Header 2 ("linebreaks",[],[]) [Str "linebreaks"] ,Para [Str "hi",LineBreak,Str "there"] ,Para [Str "hi",LineBreak,Str "there"] ,Header 2 ("indents",[],[]) [Str ":",Space,Str "indents"] ,Para [Str "hi"] ,DefinitionList [([], [[Plain [Str "there"]]])] ,Para [Str "bud"] ,Para [Str "hi"] ,DefinitionList [([], [[DefinitionList [([], [[Plain [Str "there"]]])]]])] ,Para [Str "bud"] ,Header 2 ("p-tags",[],[]) [Str "p",Space,Str "tags"] ,Para [Str "hi",Space,Str "there"] ,Para [Str "bud"] ,Para [Str "another"] ,Header 2 ("raw-html",[],[]) [Str "raw",Space,Str "html"] ,Para [Str "hi",Space,RawInline (Format "html") "",Emph [Str "there"],RawInline (Format "html") "",Str "."] ,Para [RawInline (Format "html") "",Str "inserted",RawInline (Format "html") ""] ,RawBlock (Format "html") "
        " ,Para [Str "hi",Space,Emph [Str "there"]] ,RawBlock (Format "html") "
        " ,Header 2 ("sup-sub-del",[],[]) [Str "sup,",Space,Str "sub,",Space,Str "del"] ,Para [Str "H",Subscript [Str "2"],Str "O",Space,Str "base",Superscript [Emph [Str "exponent"]],SoftBreak,Strikeout [Str "hello"]] ,Header 2 ("inline-code",[],[]) [Str "inline",Space,Str "code"] ,Para [Code ("",[],[]) "*\8594*",Space,Code ("",[],[]) "typed",Space,Code ("",["haskell"],[]) ">>="] ,Header 2 ("code-blocks",[],[]) [Str "code",Space,Str "blocks"] ,CodeBlock ("",[],[]) "case xs of\n (_:_) -> reverse xs\n [] -> ['*']" ,CodeBlock ("",["haskell"],[]) "case xs of\n (_:_) -> reverse xs\n [] -> ['*']" ,CodeBlock ("",["ruby","numberLines"],[("startFrom","100")]) "widgets.each do |w|\n print w.price\nend" ,Header 2 ("block-quotes",[],[]) [Str "block",Space,Str "quotes"] ,Para [Str "Regular",Space,Str "paragraph"] ,BlockQuote [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote."] ,Para [Str "With",Space,Str "two",Space,Str "paragraphs."]] ,Para [Str "Nother",Space,Str "paragraph."] ,Header 2 ("external-links",[],[]) [Str "external",Space,Str "links"] ,Para [Link ("",[],[]) [Emph [Str "Google"],Space,Str "search",Space,Str "engine"] ("http://google.com","")] ,Para [Link ("",[],[]) [Str "http://pandoc.org"] ("http://pandoc.org","")] ,Para [Link ("",[],[]) [Str "1"] ("http://google.com",""),Space,Link ("",[],[]) [Str "2"] ("http://yahoo.com","")] ,Para [Link ("",[],[]) [Str "email",Space,Str "me"] ("mailto:info@example.org","")] ,Header 2 ("internal-links",[],[]) [Str "internal",Space,Str "links"] ,Para [Link ("",[],[]) [Str "Help"] ("Help","wikilink")] ,Para [Link ("",[],[]) [Str "the",Space,Str "help",Space,Str "page"] ("Help","wikilink")] ,Para [Link ("",[],[]) [Str "Helpers"] ("Help","wikilink")] ,Para [Link ("",[],[]) [Str "Help"] ("Help","wikilink"),Str "ers"] ,Para [Link ("",[],[]) [Str "Contents"] ("Help:Contents","wikilink")] ,Para [Link ("",[],[]) [Str "#My",Space,Str "anchor"] ("#My_anchor","wikilink")] ,Para [Link ("",[],[]) [Str "and",Space,Str "text"] ("Page#with_anchor","wikilink")] ,Header 2 ("images",[],[]) [Str "images"] ,Para [Image ("",[],[]) [Str "caption"] ("example.jpg","fig:caption")] ,Para [Image ("",[],[]) [Str "the",Space,Emph [Str "caption"],Space,Str "with",Space,Link ("",[],[]) [Str "external",Space,Str "link"] ("http://google.com","")] ("example.jpg","fig:the caption with external link")] ,Para [Image ("",[],[("width","30"),("height","40")]) [Str "caption"] ("example.jpg","fig:caption")] ,Para [Image ("",[],[("width","30")]) [Str "caption"] ("example.jpg","fig:caption")] ,Para [Image ("",[],[("width","30")]) [Str "caption"] ("example.jpg","fig:caption")] ,Para [Image ("",[],[]) [Str "example.jpg"] ("example.jpg","fig:example.jpg")] ,Para [Image ("",[],[]) [Str "example_es.jpg"] ("example_es.jpg","fig:example_es.jpg")] ,Header 2 ("lists",[],[]) [Str "lists"] ,BulletList [[Plain [Str "Start",Space,Str "each",Space,Str "line"]] ,[Plain [Str "with",Space,Str "an",Space,Str "asterisk",Space,Str "(*)."] ,BulletList [[Plain [Str "More",Space,Str "asterisks",Space,Str "gives",Space,Str "deeper"] ,BulletList [[Plain [Str "and",Space,Str "deeper",Space,Str "levels."]]]]]] ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels."] ,BulletList [[BulletList [[Plain [Str "But",Space,Str "jumping",Space,Str "levels",Space,Str "creates",Space,Str "empty",Space,Str "space."]]]]]]] ,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "ends",Space,Str "the",Space,Str "list."] ,BulletList [[BulletList [[Plain [Str "two"]]]] ,[Plain [Str "one"]]] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "Start",Space,Str "each",Space,Str "line"]] ,[Plain [Str "with",Space,Str "a",Space,Str "number",Space,Str "sign",Space,Str "(#)."] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "More",Space,Str "number",Space,Str "signs",Space,Str "gives",Space,Str "deeper"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "and",Space,Str "deeper"]] ,[Plain [Str "levels."]]]]]] ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels."] ,OrderedList (1,DefaultStyle,DefaultDelim) [[OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "But",Space,Str "jumping",Space,Str "levels",Space,Str "creates",Space,Str "empty",Space,Str "space."]]]]]] ,[Plain [Str "Blank",Space,Str "lines"]]] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "end",Space,Str "the",Space,Str "list",Space,Str "and",Space,Str "start",Space,Str "another."]]] ,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "also",SoftBreak,Str "ends",Space,Str "the",Space,Str "list."] ,DefinitionList [([Str "item",Space,Str "1"], [[Plain [Str "definition",Space,Str "1"]]]) ,([Str "item",Space,Str "2"], [[Plain [Str "definition",Space,Str "2-1"]] ,[Plain [Str "definition",Space,Str "2-2"]]])] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "one"]] ,[Plain [Str "two"] ,BulletList [[Plain [Str "two",Space,Str "point",Space,Str "one"]] ,[Plain [Str "two",Space,Str "point",Space,Str "two"]]]] ,[Plain [Str "three"] ,DefinitionList [([Str "three",Space,Str "item",Space,Str "one"], [[Plain [Str "three",Space,Str "def",Space,Str "one"]]])]] ,[Plain [Str "four"] ,DefinitionList [([], [[Plain [Str "four",Space,Str "def",Space,Str "one"]] ,[Plain [Str "this",Space,Str "looks",Space,Str "like",Space,Str "a",Space,Str "continuation"]] ,[Plain [Str "and",Space,Str "is",Space,Str "often",Space,Str "used"]] ,[Plain [Str "instead",LineBreak,Str "of",Space,Str "
        "]]])]] ,[Plain [RawInline (Format "mediawiki") "{{{template\n|author=John\n|title=My Book\n}}}"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "five",Space,Str "sub",Space,Str "1"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "five",Space,Str "sub",Space,Str "1",Space,Str "sub",Space,Str "1"]]]] ,[Plain [Str "five",Space,Str "sub",Space,Str "2"]]]]] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "list",Space,Str "item",Space,Emph [Str "emph"]] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "list",Space,Str "item",Space,Str "B1"]] ,[Plain [Str "list",Space,Str "item",Space,Str "B2"]]] ,Para [Str "continuing",Space,Str "list",Space,Str "item",Space,Str "A1"]] ,[Plain [Str "list",Space,Str "item",Space,Str "A2"]]] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "abc"]] ,[Plain [Str "def"]] ,[Plain [Str "ghi"]]] ,OrderedList (9,DefaultStyle,DefaultDelim) [[Plain [Str "Amsterdam"]] ,[Plain [Str "Rotterdam"]] ,[Plain [Str "The",Space,Str "Hague"]]] ,Header 2 ("math",[],[]) [Str "math"] ,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Math InlineMath "x=\\frac{y^\\pi}{z}",Str "."] ,Para [Str "With",Space,Str "spaces:",Space,Math InlineMath "x=\\frac{y^\\pi}{z}",Str "."] ,Header 2 ("preformatted-blocks",[],[]) [Str "preformatted",Space,Str "blocks"] ,Para [Code ("",[],[]) "Start\160each\160line\160with\160a\160space.",LineBreak,Code ("",[],[]) "Text\160is\160",Strong [Code ("",[],[]) "preformatted"],Code ("",[],[]) "\160and",LineBreak,Emph [Code ("",[],[]) "markups"],Code ("",[],[]) "\160",Strong [Emph [Code ("",[],[]) "can"]],Code ("",[],[]) "\160be\160done."] ,Para [Code ("",[],[]) "\160hell\160\160\160\160\160\160yeah"] ,Para [Code ("",[],[]) "Start\160with\160a\160space\160in\160the\160first\160column,",LineBreak,Code ("",[],[]) "(before\160the\160).",LineBreak,Code ("",[],[]) "",LineBreak,Code ("",[],[]) "Then\160your\160block\160format\160will\160be",LineBreak,Code ("",[],[]) "\160\160\160\160maintained.",LineBreak,Code ("",[],[]) "",LineBreak,Code ("",[],[]) "This\160is\160good\160for\160copying\160in\160code\160blocks:",LineBreak,Code ("",[],[]) "",LineBreak,Code ("",[],[]) "def\160function():",LineBreak,Code ("",[],[]) "\160\160\160\160\"\"\"documentation\160string\"\"\"",LineBreak,Code ("",[],[]) "",LineBreak,Code ("",[],[]) "\160\160\160\160if\160True:",LineBreak,Code ("",[],[]) "\160\160\160\160\160\160\160\160print\160True",LineBreak,Code ("",[],[]) "\160\160\160\160else:",LineBreak,Code ("",[],[]) "\160\160\160\160\160\160\160\160print\160False"] ,Para [Str "Not"] ,RawBlock (Format "html") "
        " ,Para [Str "preformatted"] ,Para [Str "Don't",Space,Str "need"] ,Para [Code ("",[],[]) "a\160blank\160line"] ,Para [Str "around",Space,Str "a",Space,Str "preformatted",Space,Str "block."] ,Header 2 ("templates",[],[]) [Str "templates"] ,RawBlock (Format "mediawiki") "{{Welcome}}" ,RawBlock (Format "mediawiki") "{{Foo:Bar}}" ,RawBlock (Format "mediawiki") "{{Thankyou|all your effort|Me}}" ,Para [Str "Written",Space,RawInline (Format "mediawiki") "{{{date}}}",Space,Str "by",Space,RawInline (Format "mediawiki") "{{{name}}}",Str "."] ,Header 2 ("tables",[],[]) [Str "tables"] ,Table [] [AlignDefault,AlignDefault] [0.0,0.0] [[] ,[]] [[[Para [Str "Orange"]] ,[Para [Str "Apple"]]] ,[[Para [Str "Bread"]] ,[Para [Str "Pie"]]] ,[[Para [Str "Butter"]] ,[Para [Str "Ice",Space,Str "cream"]]]] ,Table [Str "Food",Space,Str "complements"] [AlignDefault,AlignDefault] [0.0,0.0] [[Para [Str "Orange"]] ,[Para [Str "Apple"]]] [[[Para [Str "Bread"]] ,[Para [Str "Pie"]]] ,[[Para [Str "Butter"]] ,[Para [Str "Ice",Space,Str "cream"]]]] ,Table [Str "Food",Space,Str "complements"] [AlignDefault,AlignDefault] [0.0,0.0] [[Para [Str "Orange"]] ,[Para [Str "Apple"]]] [[[Para [Str "Bread"] ,Para [Str "and",Space,Str "cheese"]] ,[Para [Str "Pie"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "apple"]] ,[Plain [Str "carrot"]]]]]] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[] ,[] ,[]] [[[Para [Str "Orange"]] ,[Para [Str "Apple"]] ,[Para [Str "more"]]] ,[[Para [Str "Bread"]] ,[Para [Str "Pie"]] ,[Para [Str "more"]]] ,[[Para [Str "Butter"]] ,[Para [Str "Ice",Space,Str "cream"]] ,[Para [Str "and",Space,Str "more"]]]] ,Table [] [AlignLeft,AlignRight,AlignCenter] [0.25,0.125,0.125] [[Para [Str "Left"]] ,[Para [Str "Right"]] ,[Para [Str "Center"]]] [[[Para [Str "left"]] ,[Para [Str "15.00"]] ,[Para [Str "centered"]]] ,[[Para [Str "more"]] ,[Para [Str "2.0"]] ,[Para [Str "more"]]]] ,Table [] [AlignDefault,AlignDefault] [0.0,0.0] [[] ,[]] [[[Para [Str "Orange"]] ,[Para [Str "Apple"]]] ,[[Para [Str "Bread"]] ,[Table [] [AlignDefault,AlignDefault] [0.0,0.0] [[Para [Str "fruit"]] ,[Para [Str "topping"]]] [[[Para [Str "apple"]] ,[Para [Str "ice",Space,Str "cream"]]]]]] ,[[Para [Str "Butter"]] ,[Para [Str "Ice",Space,Str "cream"]]]] ,Table [] [AlignDefault] [0.0] [[]] [[[Para [Str "Orange"]]]] ,Para [Str "Paragraph",Space,Str "after",Space,Str "the",Space,Str "table."] ,Table [] [AlignDefault,AlignDefault] [0.0,0.0] [[Para [Str "fruit"]] ,[Para [Str "topping"]]] [[[Para [Str "apple"]] ,[Para [Str "ice",Space,Str "cream"]]]] ,Header 2 ("notes",[],[]) [Str "notes"] ,Para [Str "My",Space,Str "note!",Note [Plain [Str "This."]]] ,Para [Str "URL",Space,Str "note.",Note [Plain [Link ("",[],[]) [Str "http://docs.python.org/library/functions.html#range"] ("http://docs.python.org/library/functions.html#range","")]]]] pandoc-1.19.2.4/tests/opml-reader.native0000644000000000000000000000573013155240143016164 0ustar0000000000000000Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "Dave",Space,Str "Winer"]]),("date",MetaInlines [Str "Thu,",Space,Str "14",Space,Str "Jul",Space,Str "2005",Space,Str "23:41:05",Space,Str "GMT"]),("title",MetaInlines [Str "States"])]}) [Header 1 ("",[],[]) [Str "United",Space,Str "States"] ,Header 2 ("",[],[]) [Str "Far",Space,Str "West"] ,Header 3 ("",[],[]) [Str "Alaska"] ,Header 3 ("",[],[]) [Str "California"] ,Header 3 ("",[],[]) [Str "Hawaii"] ,Header 3 ("",[],[]) [Strong [Str "Nevada"]] ,Para [Str "I",Space,Str "lived",Space,Str "here",Space,Emph [Str "once"],Str "."] ,Para [Str "Loved",Space,Str "it."] ,Header 4 ("",[],[]) [Link ("",[],[]) [Str "Reno"] ("http://www.reno.gov","")] ,Header 4 ("",[],[]) [Str "Las",Space,Str "Vegas"] ,Header 4 ("",[],[]) [Str "Ely"] ,Header 4 ("",[],[]) [Str "Gerlach"] ,Header 3 ("",[],[]) [Str "Oregon"] ,Header 3 ("",[],[]) [Str "Washington"] ,Header 2 ("",[],[]) [Str "Great",Space,Str "Plains"] ,Header 3 ("",[],[]) [Str "Kansas"] ,Header 3 ("",[],[]) [Str "Nebraska"] ,Header 3 ("",[],[]) [Str "North",Space,Str "Dakota"] ,Header 3 ("",[],[]) [Str "Oklahoma"] ,Header 3 ("",[],[]) [Str "South",Space,Str "Dakota"] ,Header 2 ("",[],[]) [Str "Mid-Atlantic"] ,Header 3 ("",[],[]) [Str "Delaware"] ,Header 3 ("",[],[]) [Str "Maryland"] ,Header 3 ("",[],[]) [Str "New",Space,Str "Jersey"] ,Header 3 ("",[],[]) [Str "New",Space,Str "York"] ,Header 3 ("",[],[]) [Str "Pennsylvania"] ,Header 2 ("",[],[]) [Str "Midwest"] ,Header 3 ("",[],[]) [Str "Illinois"] ,Header 3 ("",[],[]) [Str "Indiana"] ,Header 3 ("",[],[]) [Str "Iowa"] ,Header 3 ("",[],[]) [Str "Kentucky"] ,Header 3 ("",[],[]) [Str "Michigan"] ,Header 3 ("",[],[]) [Str "Minnesota"] ,Header 3 ("",[],[]) [Str "Missouri"] ,Header 3 ("",[],[]) [Str "Ohio"] ,Header 3 ("",[],[]) [Str "West",Space,Str "Virginia"] ,Header 3 ("",[],[]) [Str "Wisconsin"] ,Header 2 ("",[],[]) [Str "Mountains"] ,Header 3 ("",[],[]) [Str "Colorado"] ,Header 3 ("",[],[]) [Str "Idaho"] ,Header 3 ("",[],[]) [Str "Montana"] ,Header 3 ("",[],[]) [Str "Utah"] ,Header 3 ("",[],[]) [Str "Wyoming"] ,Header 2 ("",[],[]) [Str "New",Space,Str "England"] ,Header 3 ("",[],[]) [Str "Connecticut"] ,Header 3 ("",[],[]) [Str "Maine"] ,Header 3 ("",[],[]) [Str "Massachusetts"] ,Header 3 ("",[],[]) [Str "New",Space,Str "Hampshire"] ,Header 3 ("",[],[]) [Str "Rhode",Space,Str "Island"] ,Header 3 ("",[],[]) [Str "Vermont"] ,Header 2 ("",[],[]) [Str "South"] ,Header 3 ("",[],[]) [Str "Alabama"] ,Header 3 ("",[],[]) [Str "Arkansas"] ,Header 3 ("",[],[]) [Str "Florida"] ,Header 3 ("",[],[]) [Str "Georgia"] ,Header 3 ("",[],[]) [Str "Louisiana"] ,Header 3 ("",[],[]) [Str "Mississippi"] ,Header 3 ("",[],[]) [Str "North",Space,Str "Carolina"] ,Header 3 ("",[],[]) [Str "South",Space,Str "Carolina"] ,Header 3 ("",[],[]) [Str "Tennessee"] ,Header 3 ("",[],[]) [Str "Virginia"] ,Header 2 ("",[],[]) [Str "Southwest"] ,Header 3 ("",[],[]) [Str "Arizona"] ,Header 3 ("",[],[]) [Str "New",Space,Str "Mexico"] ,Header 3 ("",[],[]) [Str "Texas"]] pandoc-1.19.2.4/tests/pipe-tables.native0000644000000000000000000000765313155240143016170 0ustar0000000000000000[Para [Str "Simplest",Space,Str "table",Space,Str "without",Space,Str "caption:"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[Plain [Str "Default1"]] ,[Plain [Str "Default2"]] ,[Plain [Str "Default3"]]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption:"] ,Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] [AlignRight,AlignLeft,AlignDefault,AlignCenter] [0.0,0.0,0.0,0.0] [[Plain [Str "Right"]] ,[Plain [Str "Left"]] ,[Plain [Str "Default"]] ,[Plain [Str "Center"]]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Simple",Space,Str "table",Space,Str "without",Space,Str "caption:"] ,Table [] [AlignRight,AlignLeft,AlignCenter] [0.0,0.0,0.0] [[Plain [Str "Right"]] ,[Plain [Str "Left"]] ,[Plain [Str "Center"]]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Headerless",Space,Str "table",Space,Str "without",Space,Str "caption:"] ,Table [] [AlignRight,AlignLeft,AlignCenter] [0.0,0.0,0.0] [[] ,[] ,[]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Table",Space,Str "without",Space,Str "sides:"] ,Table [] [AlignDefault,AlignRight] [0.0,0.0] [[Plain [Str "Fruit"]] ,[Plain [Str "Quantity"]]] [[[Plain [Str "apple"]] ,[Plain [Str "5"]]] ,[[Plain [Str "orange"]] ,[Plain [Str "17"]]] ,[[Plain [Str "pear"]] ,[Plain [Str "302"]]]] ,Para [Str "One-column:"] ,Table [] [AlignDefault] [0.0] [[Plain [Str "hi"]]] [[[Plain [Str "lo"]]]] ,Para [Str "Header-less",Space,Str "one-column:"] ,Table [] [AlignCenter] [0.0] [[]] [[[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"]]]] ,Para [Str "Pipe",Space,Str "table",Space,Str "with",Space,Str "no",Space,Str "body:"] ,Table [] [AlignDefault] [0.0] [[Plain [Str "Header"]]] [] ,Para [Str "Pipe",Space,Str "table",Space,Str "with",Space,Str "tricky",Space,Str "cell",Space,Str "contents",Space,Str "(see",Space,Str "#2765):"] ,Table [] [AlignLeft,AlignRight,AlignRight] [0.0,0.0,0.0] [[] ,[Plain [Str "IP_gene8-_1st"]] ,[Plain [Str "IP_gene8+_1st"]]] [[[Plain [Str "IP_gene8-_1st"]] ,[Plain [Str "1.0000000"]] ,[Plain [Str "0.4357325"]]] ,[[Plain [Str "IP_gene8+_1st"]] ,[Plain [Str "0.4357325"]] ,[Plain [Str "1.0000000"]]] ,[[Plain [Str "foo",Code ("",[],[]) "bar|baz"]] ,[Plain [Str "and|escaped"]] ,[Plain [Str "3.0000000"]]]]] pandoc-1.19.2.4/tests/rst-reader.native0000644000000000000000000004626413155240143016034 0ustar0000000000000000Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Space,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("date",MetaInlines [Str "July",Space,Str "17,",Space,Str "2006"]),("revision",MetaBlocks [Para [Str "3"]]),("subtitle",MetaInlines [Str "Subtitle"]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]}) [Header 1 ("level-one-header",[],[]) [Str "Level",Space,Str "one",Space,Str "header"] ,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",SoftBreak,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."] ,Header 2 ("level-two-header",[],[]) [Str "Level",Space,Str "two",Space,Str "header"] ,Header 3 ("level-three",[],[]) [Str "Level",Space,Str "three"] ,Header 4 ("level-four-with-emphasis",[],[]) [Str "Level",Space,Str "four",Space,Str "with",Space,Emph [Str "emphasis"]] ,Header 5 ("level-five",[],[]) [Str "Level",Space,Str "five"] ,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"] ,Para [Str "Here\8217s",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",SoftBreak,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",SoftBreak,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",SoftBreak,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",SoftBreak,Str "list",Space,Str "item."] ,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",SoftBreak,Str "*",Space,Str "criminey."] ,Para [Str "Horizontal",Space,Str "rule:"] ,HorizontalRule ,Para [Str "Another:"] ,HorizontalRule ,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"] ,Para [Str "Here\8217s",Space,Str "a",Space,Str "block",Space,Str "quote:"] ,BlockQuote [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",SoftBreak,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]] ,Para [Str "Here\8217s",Space,Str "another,",Space,Str "differently",Space,Str "indented:"] ,BlockQuote [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",SoftBreak,Str "It\8217s",Space,Str "indented",Space,Str "with",Space,Str "a",Space,Str "tab."] ,Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"] ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}" ,Para [Str "List",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "item",Space,Str "one"]] ,[Plain [Str "item",Space,Str "two"]]] ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"] ,BlockQuote [Para [Str "nested"] ,BlockQuote [Para [Str "nested"]]]] ,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"] ,Para [Str "Code:"] ,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}" ,CodeBlock ("",[],[]) "this code block is indented by one tab" ,Para [Str "And:"] ,CodeBlock ("",[],[]) "this block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{" ,Para [Str "And:"] ,CodeBlock ("",["sourceCode","python"],[]) "def my_function(x):\n return x + 1" ,Header 1 ("lists",[],[]) [Str "Lists"] ,Header 2 ("unordered",[],[]) [Str "Unordered"] ,Para [Str "Asterisks",Space,Str "tight:"] ,BulletList [[Plain [Str "asterisk",Space,Str "1"]] ,[Plain [Str "asterisk",Space,Str "2"]] ,[Plain [Str "asterisk",Space,Str "3"]]] ,Para [Str "Asterisks",Space,Str "loose:"] ,BulletList [[Plain [Str "asterisk",Space,Str "1"]] ,[Plain [Str "asterisk",Space,Str "2"]] ,[Plain [Str "asterisk",Space,Str "3"]]] ,Para [Str "Pluses",Space,Str "tight:"] ,BulletList [[Plain [Str "Plus",Space,Str "1"]] ,[Plain [Str "Plus",Space,Str "2"]] ,[Plain [Str "Plus",Space,Str "3"]]] ,Para [Str "Pluses",Space,Str "loose:"] ,BulletList [[Plain [Str "Plus",Space,Str "1"]] ,[Plain [Str "Plus",Space,Str "2"]] ,[Plain [Str "Plus",Space,Str "3"]]] ,Para [Str "Minuses",Space,Str "tight:"] ,BulletList [[Plain [Str "Minus",Space,Str "1"]] ,[Plain [Str "Minus",Space,Str "2"]] ,[Plain [Str "Minus",Space,Str "3"]]] ,Para [Str "Minuses",Space,Str "loose:"] ,BulletList [[Plain [Str "Minus",Space,Str "1"]] ,[Plain [Str "Minus",Space,Str "2"]] ,[Plain [Str "Minus",Space,Str "3"]]] ,Header 2 ("ordered",[],[]) [Str "Ordered"] ,Para [Str "Tight:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "First"]] ,[Plain [Str "Second"]] ,[Plain [Str "Third"]]] ,Para [Str "and:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "One"]] ,[Plain [Str "Two"]] ,[Plain [Str "Three"]]] ,Para [Str "Loose",Space,Str "using",Space,Str "tabs:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "First"]] ,[Plain [Str "Second"]] ,[Plain [Str "Third"]]] ,Para [Str "and",Space,Str "using",Space,Str "spaces:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "One"]] ,[Plain [Str "Two"]] ,[Plain [Str "Three"]]] ,Para [Str "Multiple",Space,Str "paragraphs:"] ,OrderedList (1,Decimal,Period) [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."] ,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\8217s",SoftBreak,Str "back."]] ,[Plain [Str "Item",Space,Str "2."]] ,[Plain [Str "Item",Space,Str "3."]]] ,Para [Str "Nested:"] ,BulletList [[Plain [Str "Tab"] ,BulletList [[Plain [Str "Tab"] ,BulletList [[Plain [Str "Tab"]]]]]]] ,Para [Str "Here\8217s",Space,Str "another:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "First"]] ,[Para [Str "Second:"] ,BlockQuote [BulletList [[Plain [Str "Fee"]] ,[Plain [Str "Fie"]] ,[Plain [Str "Foe"]]]]] ,[Plain [Str "Third"]]] ,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"] ,OrderedList (2,Decimal,TwoParens) [[Plain [Str "begins",Space,Str "with",Space,Str "2"]] ,[Para [Str "and",Space,Str "now",Space,Str "3"] ,Para [Str "with",Space,Str "a",Space,Str "continuation"] ,OrderedList (4,LowerRoman,Period) [[Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"]] ,[Plain [Str "more",Space,Str "items"] ,OrderedList (1,UpperAlpha,TwoParens) [[Plain [Str "a",Space,Str "subsublist"]] ,[Plain [Str "a",Space,Str "subsublist"]]]]]]] ,Para [Str "Nesting:"] ,OrderedList (1,UpperAlpha,Period) [[Plain [Str "Upper",Space,Str "Alpha"] ,OrderedList (1,UpperRoman,Period) [[Plain [Str "Upper",Space,Str "Roman."] ,OrderedList (6,Decimal,TwoParens) [[Plain [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"] ,OrderedList (3,LowerAlpha,OneParen) [[Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]] ,Para [Str "Autonumbering:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "Autonumber."]] ,[Plain [Str "More."] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "Nested."]]]]] ,Para [Str "Autonumbering",Space,Str "with",Space,Str "explicit",Space,Str "start:"] ,OrderedList (4,LowerAlpha,TwoParens) [[Plain [Str "item",Space,Str "1"]] ,[Plain [Str "item",Space,Str "2"]]] ,Header 2 ("definition",[],[]) [Str "Definition"] ,DefinitionList [([Str "term",Space,Str "1"], [[Para [Str "Definition",Space,Str "1."]]]) ,([Str "term",Space,Str "2"], [[Para [Str "Definition",Space,Str "2,",Space,Str "paragraph",Space,Str "1."] ,Para [Str "Definition",Space,Str "2,",Space,Str "paragraph",Space,Str "2."]]]) ,([Str "term",Space,Str "with",Space,Emph [Str "emphasis"]], [[Para [Str "Definition",Space,Str "3."]]])] ,Header 1 ("field-lists",[],[]) [Str "Field",Space,Str "Lists"] ,BlockQuote [DefinitionList [([Str "address"], [[Para [Str "61",Space,Str "Main",Space,Str "St."]]]) ,([Str "city"], [[Para [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",SoftBreak,Str "USA"]]]) ,([Str "phone"], [[Para [Str "123-4567"]]])]] ,DefinitionList [([Str "address"], [[Para [Str "61",Space,Str "Main",Space,Str "St."]]]) ,([Str "city"], [[Para [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",SoftBreak,Str "USA"]]]) ,([Str "phone"], [[Para [Str "123-4567"]]])] ,Header 1 ("html-blocks",[],[]) [Str "HTML",Space,Str "Blocks"] ,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"] ,RawBlock (Format "html") "
        foo
        " ,Para [Str "Now,",Space,Str "nested:"] ,RawBlock (Format "html") "
        \n
        \n
        \n foo\n
        \n
        \n
        " ,Header 1 ("latex-block",[],[]) [Str "LaTeX",Space,Str "Block"] ,RawBlock (Format "latex") "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}" ,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"] ,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ".",Space,Str "This",Space,Str "is",Space,Strong [Str "strong"],Str "."] ,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "",Str "."] ,Para [Str "This",Space,Str "is",Subscript [Str "subscripted"],Space,Str "and",Space,Str "this",Space,Str "is",Space,Superscript [Str "superscripted"],Str "."] ,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"]] ,[Plain [Str "o",Space,Str "umlaut:",Space,Str "\246"]] ,[Plain [Str "section:",Space,Str "\167"]] ,[Plain [Str "set",Space,Str "membership:",Space,Str "\8712"]] ,[Plain [Str "copyright:",Space,Str "\169"]]] ,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."] ,Para [Str "This",Space,Str "&",Space,Str "that."] ,Para [Str "4",Space,Str "<",Space,Str "5."] ,Para [Str "6",Space,Str ">",Space,Str "5."] ,Para [Str "Backslash:",Space,Str "\\"] ,Para [Str "Backtick:",Space,Str "`"] ,Para [Str "Asterisk:",Space,Str "*"] ,Para [Str "Underscore:",Space,Str "_"] ,Para [Str "Left",Space,Str "brace:",Space,Str "{"] ,Para [Str "Right",Space,Str "brace:",Space,Str "}"] ,Para [Str "Left",Space,Str "bracket:",Space,Str "["] ,Para [Str "Right",Space,Str "bracket:",Space,Str "]"] ,Para [Str "Left",Space,Str "paren:",Space,Str "("] ,Para [Str "Right",Space,Str "paren:",Space,Str ")"] ,Para [Str "Greater-than:",Space,Str ">"] ,Para [Str "Hash:",Space,Str "#"] ,Para [Str "Period:",Space,Str "."] ,Para [Str "Bang:",Space,Str "!"] ,Para [Str "Plus:",Space,Str "+"] ,Para [Str "Minus:",Space,Str "-"] ,Header 1 ("links",[],[]) [Str "Links"] ,Para [Str "Explicit:",Space,Str "a",Space,Link ("",[],[]) [Str "URL"] ("/url/",""),Str "."] ,Para [Str "Explicit",Space,Str "with",Space,Str "no",Space,Str "label:",Space,Link ("",[],[]) [Str "foo"] ("foo",""),Str "."] ,Para [Str "Two",Space,Str "anonymous",Space,Str "links:",Space,Link ("",[],[]) [Str "the",Space,Str "first"] ("/url1/",""),Space,Str "and",Space,Link ("",[],[]) [Str "the",Space,Str "second"] ("/url2/","")] ,Para [Str "Reference",Space,Str "links:",Space,Link ("",[],[]) [Str "link1"] ("/url1/",""),Space,Str "and",Space,Link ("",[],[]) [Str "link2"] ("/url2/",""),Space,Str "and",Space,Link ("",[],[]) [Str "link1"] ("/url1/",""),Space,Str "again."] ,Para [Str "Another",Space,Link ("",[],[]) [Str "style",Space,Str "of",Space,Str "reference",Space,Str "link"] ("/url1/",""),Str "."] ,Para [Str "Here\8217s",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\8217s",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"] ("/url/",""),Str "."] ,Para [Str "Autolinks:",Space,Link ("",[],[]) [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2",""),Space,Str "and",Space,Link ("",[],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net",""),Str "."] ,Para [Str "But",Space,Str "not",Space,Str "here:"] ,CodeBlock ("",[],[]) "http://example.com/" ,Header 1 ("images",[],[]) [Str "Images"] ,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"] ,Para [Image ("",[],[]) [Str "image"] ("lalune.jpg","")] ,Para [Image ("",[],[("height","2343")]) [Str "Voyage dans la Lune"] ("lalune.jpg","")] ,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image ("",[],[]) [Str "movie"] ("movie.jpg",""),Space,Str "icon."] ,Para [Str "And",Space,Str "an",Space,Link ("",[],[]) [Image ("",[],[]) [Str "A movie"] ("movie.jpg","")] ("/url",""),Str "."] ,Header 1 ("comments",[],[]) [Str "Comments"] ,Para [Str "First",Space,Str "paragraph"] ,Para [Str "Another",Space,Str "paragraph"] ,Para [Str "A",Space,Str "third",Space,Str "paragraph"] ,Header 1 ("line-blocks",[],[]) [Str "Line",Space,Str "blocks"] ,LineBlock [[Str "But",Space,Str "can",Space,Str "a",Space,Str "bee",Space,Str "be",Space,Str "said",Space,Str "to",Space,Str "be"] ,[Str "\160\160\160\160or",Space,Str "not",Space,Str "to",Space,Str "be",Space,Str "an",Space,Str "entire",Space,Str "bee,"] ,[Str "\160\160\160\160\160\160\160\160when",Space,Str "half",Space,Str "the",Space,Str "bee",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "bee,"] ,[Str "\160\160\160\160\160\160\160\160\160\160\160\160due",Space,Str "to",Space,Str "some",Space,Str "ancient",Space,Str "injury?"] ,[] ,[Str "Continuation",Space,Str "line"] ,[Str "\160\160and",Space,Str "another"]] ,Header 1 ("simple-tables",[],[]) [Str "Simple",Space,Str "Tables"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[Plain [Str "col",Space,Str "1"]] ,[Plain [Str "col",Space,Str "2"]] ,[Plain [Str "col",Space,Str "3"]]] [[[Plain [Str "r1",Space,Str "a"]] ,[Plain [Str "b"]] ,[Plain [Str "c"]]] ,[[Plain [Str "r2",Space,Str "d"]] ,[Plain [Str "e"]] ,[Plain [Str "f"]]]] ,Para [Str "Headless"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[] ,[] ,[]] [[[Plain [Str "r1",Space,Str "a"]] ,[Plain [Str "b"]] ,[Plain [Str "c"]]] ,[[Plain [Str "r2",Space,Str "d"]] ,[Plain [Str "e"]] ,[Plain [Str "f"]]]] ,Header 1 ("grid-tables",[],[]) [Str "Grid",Space,Str "Tables"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.2375,0.15,0.1625] [[Plain [Str "col",Space,Str "1"]] ,[Plain [Str "col",Space,Str "2"]] ,[Plain [Str "col",Space,Str "3"]]] [[[Plain [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]] ,[Plain [Str "b",SoftBreak,Str "b",Space,Str "2"]] ,[Plain [Str "c",SoftBreak,Str "c",Space,Str "2"]]] ,[[Plain [Str "r2",Space,Str "d"]] ,[Plain [Str "e"]] ,[Plain [Str "f"]]]] ,Para [Str "Headless"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.2375,0.15,0.1625] [[] ,[] ,[]] [[[Plain [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]] ,[Plain [Str "b",SoftBreak,Str "b",Space,Str "2"]] ,[Plain [Str "c",SoftBreak,Str "c",Space,Str "2"]]] ,[[Plain [Str "r2",Space,Str "d"]] ,[Plain [Str "e"]] ,[Plain [Str "f"]]]] ,Para [Str "Spaces",Space,Str "at",Space,Str "ends",Space,Str "of",Space,Str "lines"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.2375,0.15,0.1625] [[] ,[] ,[]] [[[Plain [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]] ,[Plain [Str "b",SoftBreak,Str "b",Space,Str "2"]] ,[Plain [Str "c",SoftBreak,Str "c",Space,Str "2"]]] ,[[Plain [Str "r2",Space,Str "d"]] ,[Plain [Str "e"]] ,[Plain [Str "f"]]]] ,Para [Str "Multiple",Space,Str "blocks",Space,Str "in",Space,Str "a",Space,Str "cell"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.2375,0.15,0.1625] [[] ,[] ,[]] [[[Para [Str "r1",Space,Str "a"] ,Para [Str "r1",Space,Str "bis"]] ,[BulletList [[Plain [Str "b"]] ,[Plain [Str "b",Space,Str "2"]] ,[Plain [Str "b",Space,Str "2"]]]] ,[Plain [Str "c",SoftBreak,Str "c",Space,Str "2",SoftBreak,Str "c",Space,Str "2"]]]] ,Header 1 ("footnotes",[],[]) [Str "Footnotes"] ,Para [Note [Para [Str "Note",Space,Str "with",Space,Str "one",Space,Str "line."]]] ,Para [Note [Para [Str "Note",Space,Str "with",SoftBreak,Str "continuation",Space,Str "line."]]] ,Para [Note [Para [Str "Note",Space,Str "with"],Para [Str "continuation",Space,Str "block."]]] ,Para [Note [Para [Str "Note",Space,Str "with",SoftBreak,Str "continuation",Space,Str "line"],Para [Str "and",Space,Str "a",Space,Str "second",Space,Str "para."]]] ,Para [Str "Not",Space,Str "in",Space,Str "note."] ,Header 1 ("math",[],[]) [Str "Math"] ,Para [Str "Some",Space,Str "inline",Space,Str "math",Space,Math InlineMath "E=mc^2",Str ".",Space,Str "Now",Space,Str "some",SoftBreak,Str "display",Space,Str "math:"] ,Para [Math DisplayMath "E=mc^2"] ,Para [Math DisplayMath "E = mc^2"] ,Para [Math DisplayMath "E = mc^2",Math DisplayMath "\\alpha = \\beta"] ,Para [Math DisplayMath "E &= mc^2\\\\\nF &= \\pi E",Math DisplayMath "F &= \\gamma \\alpha^2"] ,Para [Str "All",Space,Str "done."] ,Header 1 ("default-role",[],[]) [Str "Default-Role"] ,Para [Str "Try",Space,Str "changing",Space,Str "the",Space,Str "default",Space,Str "role",Space,Str "to",Space,Str "a",Space,Str "few",Space,Str "different",Space,Str "things."] ,Header 2 ("doesnt-break-title-parsing",[],[]) [Str "Doesn\8217t",Space,Str "Break",Space,Str "Title",Space,Str "Parsing"] ,Para [Str "Inline",Space,Str "math:",Space,Math InlineMath "E=mc^2",Space,Str "or",Space,Math InlineMath "E=mc^2",Space,Str "or",Space,Math InlineMath "E=mc^2",Str ".",SoftBreak,Str "Other",Space,Str "roles:",Space,Superscript [Str "super"],Str ",",Space,Subscript [Str "sub"],Str "."] ,Para [Math DisplayMath "\\alpha = beta",Math DisplayMath "E = mc^2"] ,Para [Str "Some",Space,Superscript [Str "of"],Space,Str "these",Space,Superscript [Str "words"],Space,Str "are",Space,Str "in",Space,Superscript [Str "superscript"],Str "."] ,Para [Str "Reset",Space,Str "default-role",Space,Str "to",Space,Str "the",Space,Str "default",Space,Str "default."] ,Para [Str "And",Space,Str "now",Space,Str "some-invalid-string-3231231",Space,Str "is",Space,Str "nonsense."] ,Null ,Para [Str "And",Space,Str "now",Space,Str "with",Space,RawInline (Format "html") "inline HTML",Str "."] ,Null ,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 ("",["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 "."] ,Header 2 ("literal-symbols",[],[]) [Str "Literal",Space,Str "symbols"] ,Para [Str "2*2",Space,Str "=",Space,Str "4*1"]] pandoc-1.19.2.4/tests/s5.native0000644000000000000000000000110413155240143014273 0ustar0000000000000000Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "Sam",Space,Str "Smith"],MetaInlines [Str "Jen",Space,Str "Jones"]]),("date",MetaInlines [Str "July",Space,Str "15,",Space,Str "2006"]),("title",MetaInlines [Str "My",Space,Str "S5",Space,Str "Document"])]}) [Header 1 ("first-slide",[],[]) [Str "First",Space,Str "slide"] ,BulletList [[Plain [Str "first",Space,Str "bullet"]] ,[Plain [Str "second",Space,Str "bullet"]]] ,Header 1 ("math",[],[]) [Str "Math"] ,BulletList [[Plain [Math InlineMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]]]] pandoc-1.19.2.4/tests/tables-rstsubset.native0000644000000000000000000001134013155240143017255 0ustar0000000000000000[Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption:"] ,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.125,0.1125,0.1375,0.15] [[Plain [Str "Right"]] ,[Plain [Str "Left"]] ,[Plain [Str "Center"]] ,[Plain [Str "Default"]]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Table:",Space,Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] ,Para [Str "Simple",Space,Str "table",Space,Str "without",Space,Str "caption:"] ,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.125,0.1125,0.1375,0.15] [[Plain [Str "Right"]] ,[Plain [Str "Left"]] ,[Plain [Str "Center"]] ,[Plain [Str "Default"]]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Simple",Space,Str "table",Space,Str "indented",Space,Str "two",Space,Str "spaces:"] ,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.125,0.1125,0.1375,0.15] [[Plain [Str "Right"]] ,[Plain [Str "Left"]] ,[Plain [Str "Center"]] ,[Plain [Str "Default"]]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Table:",Space,Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] ,Para [Str "Multiline",Space,Str "table",Space,Str "with",Space,Str "caption:"] ,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.175,0.1625,0.1875,0.3625] [[Plain [Str "Centered",Space,Str "Header"]] ,[Plain [Str "Left",Space,Str "Aligned"]] ,[Plain [Str "Right",Space,Str "Aligned"]] ,[Plain [Str "Default",Space,Str "aligned"]]] [[[Plain [Str "First"]] ,[Plain [Str "row"]] ,[Plain [Str "12.0"]] ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]] ,[[Plain [Str "Second"]] ,[Plain [Str "row"]] ,[Plain [Str "5.0"]] ,[Plain [Str "Here's",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",SoftBreak,Str "rows."]]]] ,Para [Str "Table:",Space,Str "Here's",Space,Str "the",Space,Str "caption.",Space,Str "It",Space,Str "may",Space,Str "span",Space,Str "multiple",Space,Str "lines."] ,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "caption:"] ,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.175,0.1625,0.1875,0.3625] [[Plain [Str "Centered",Space,Str "Header"]] ,[Plain [Str "Left",Space,Str "Aligned"]] ,[Plain [Str "Right",Space,Str "Aligned"]] ,[Plain [Str "Default",Space,Str "aligned"]]] [[[Plain [Str "First"]] ,[Plain [Str "row"]] ,[Plain [Str "12.0"]] ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]] ,[[Plain [Str "Second"]] ,[Plain [Str "row"]] ,[Plain [Str "5.0"]] ,[Plain [Str "Here's",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",SoftBreak,Str "rows."]]]] ,Para [Str "Table",Space,Str "without",Space,Str "column",Space,Str "headers:"] ,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.1,0.1,0.1,0.1] [[] ,[] ,[] ,[]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "column",Space,Str "headers:"] ,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.175,0.1625,0.1875,0.3625] [[] ,[] ,[] ,[]] [[[Plain [Str "First"]] ,[Plain [Str "row"]] ,[Plain [Str "12.0"]] ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]] ,[[Plain [Str "Second"]] ,[Plain [Str "row"]] ,[Plain [Str "5.0"]] ,[Plain [Str "Here's",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",SoftBreak,Str "rows."]]]]] pandoc-1.19.2.4/tests/tables.native0000644000000000000000000001111413155240143015220 0ustar0000000000000000[Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption:"] ,Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] [AlignRight,AlignLeft,AlignCenter,AlignDefault] [0.0,0.0,0.0,0.0] [[Plain [Str "Right"]] ,[Plain [Str "Left"]] ,[Plain [Str "Center"]] ,[Plain [Str "Default"]]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Simple",Space,Str "table",Space,Str "without",Space,Str "caption:"] ,Table [] [AlignRight,AlignLeft,AlignCenter,AlignDefault] [0.0,0.0,0.0,0.0] [[Plain [Str "Right"]] ,[Plain [Str "Left"]] ,[Plain [Str "Center"]] ,[Plain [Str "Default"]]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Simple",Space,Str "table",Space,Str "indented",Space,Str "two",Space,Str "spaces:"] ,Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] [AlignRight,AlignLeft,AlignCenter,AlignDefault] [0.0,0.0,0.0,0.0] [[Plain [Str "Right"]] ,[Plain [Str "Left"]] ,[Plain [Str "Center"]] ,[Plain [Str "Default"]]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Multiline",Space,Str "table",Space,Str "with",Space,Str "caption:"] ,Table [Str "Here's",Space,Str "the",Space,Str "caption.",SoftBreak,Str "It",Space,Str "may",Space,Str "span",Space,Str "multiple",Space,Str "lines."] [AlignCenter,AlignLeft,AlignRight,AlignLeft] [0.15,0.1375,0.1625,0.3375] [[Plain [Str "Centered",SoftBreak,Str "Header"]] ,[Plain [Str "Left",SoftBreak,Str "Aligned"]] ,[Plain [Str "Right",SoftBreak,Str "Aligned"]] ,[Plain [Str "Default",Space,Str "aligned"]]] [[[Plain [Str "First"]] ,[Plain [Str "row"]] ,[Plain [Str "12.0"]] ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",SoftBreak,Str "multiple",Space,Str "lines."]]] ,[[Plain [Str "Second"]] ,[Plain [Str "row"]] ,[Plain [Str "5.0"]] ,[Plain [Str "Here's",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]] ,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "caption:"] ,Table [] [AlignCenter,AlignLeft,AlignRight,AlignLeft] [0.15,0.1375,0.1625,0.3375] [[Plain [Str "Centered",SoftBreak,Str "Header"]] ,[Plain [Str "Left",SoftBreak,Str "Aligned"]] ,[Plain [Str "Right",SoftBreak,Str "Aligned"]] ,[Plain [Str "Default",Space,Str "aligned"]]] [[[Plain [Str "First"]] ,[Plain [Str "row"]] ,[Plain [Str "12.0"]] ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",SoftBreak,Str "multiple",Space,Str "lines."]]] ,[[Plain [Str "Second"]] ,[Plain [Str "row"]] ,[Plain [Str "5.0"]] ,[Plain [Str "Here's",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]] ,Para [Str "Table",Space,Str "without",Space,Str "column",Space,Str "headers:"] ,Table [] [AlignRight,AlignLeft,AlignCenter,AlignRight] [0.0,0.0,0.0,0.0] [[] ,[] ,[] ,[]] [[[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]] ,[Plain [Str "12"]]] ,[[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]] ,[Plain [Str "123"]]] ,[[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]] ,[Plain [Str "1"]]]] ,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "column",Space,Str "headers:"] ,Table [] [AlignCenter,AlignLeft,AlignRight,AlignDefault] [0.15,0.1375,0.1625,0.3375] [[] ,[] ,[] ,[]] [[[Plain [Str "First"]] ,[Plain [Str "row"]] ,[Plain [Str "12.0"]] ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",SoftBreak,Str "multiple",Space,Str "lines."]]] ,[[Plain [Str "Second"]] ,[Plain [Str "row"]] ,[Plain [Str "5.0"]] ,[Plain [Str "Here's",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]]] pandoc-1.19.2.4/tests/testsuite.native0000644000000000000000000006554713155240143016022 0ustar0000000000000000Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Space,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("date",MetaInlines [Str "July",Space,Str "17,",Space,Str "2006"]),("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",SoftBreak,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."] ,HorizontalRule ,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 ("level-2",[],[]) [Str "Level",Space,Str "2"] ,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"] ,HorizontalRule ,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"] ,Para [Str "Here\8217s",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",SoftBreak,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",SoftBreak,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",SoftBreak,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",SoftBreak,Str "list",Space,Str "item."] ,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",SoftBreak,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,Str "here."] ,HorizontalRule ,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.",SoftBreak,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]] ,BlockQuote [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"] ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}" ,Para [Str "A",Space,Str "list:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "item",Space,Str "one"]] ,[Plain [Str "item",Space,Str "two"]]] ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"] ,BlockQuote [Para [Str "nested"]] ,BlockQuote [Para [Str "nested"]]] ,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",SoftBreak,Str ">",Space,Str "1."] ,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."] ,HorizontalRule ,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 ("lists",[],[]) [Str "Lists"] ,Header 2 ("unordered",[],[]) [Str "Unordered"] ,Para [Str "Asterisks",Space,Str "tight:"] ,BulletList [[Plain [Str "asterisk",Space,Str "1"]] ,[Plain [Str "asterisk",Space,Str "2"]] ,[Plain [Str "asterisk",Space,Str "3"]]] ,Para [Str "Asterisks",Space,Str "loose:"] ,BulletList [[Para [Str "asterisk",Space,Str "1"]] ,[Para [Str "asterisk",Space,Str "2"]] ,[Para [Str "asterisk",Space,Str "3"]]] ,Para [Str "Pluses",Space,Str "tight:"] ,BulletList [[Plain [Str "Plus",Space,Str "1"]] ,[Plain [Str "Plus",Space,Str "2"]] ,[Plain [Str "Plus",Space,Str "3"]]] ,Para [Str "Pluses",Space,Str "loose:"] ,BulletList [[Para [Str "Plus",Space,Str "1"]] ,[Para [Str "Plus",Space,Str "2"]] ,[Para [Str "Plus",Space,Str "3"]]] ,Para [Str "Minuses",Space,Str "tight:"] ,BulletList [[Plain [Str "Minus",Space,Str "1"]] ,[Plain [Str "Minus",Space,Str "2"]] ,[Plain [Str "Minus",Space,Str "3"]]] ,Para [Str "Minuses",Space,Str "loose:"] ,BulletList [[Para [Str "Minus",Space,Str "1"]] ,[Para [Str "Minus",Space,Str "2"]] ,[Para [Str "Minus",Space,Str "3"]]] ,Header 2 ("ordered",[],[]) [Str "Ordered"] ,Para [Str "Tight:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "First"]] ,[Plain [Str "Second"]] ,[Plain [Str "Third"]]] ,Para [Str "and:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "One"]] ,[Plain [Str "Two"]] ,[Plain [Str "Three"]]] ,Para [Str "Loose",Space,Str "using",Space,Str "tabs:"] ,OrderedList (1,Decimal,Period) [[Para [Str "First"]] ,[Para [Str "Second"]] ,[Para [Str "Third"]]] ,Para [Str "and",Space,Str "using",Space,Str "spaces:"] ,OrderedList (1,Decimal,Period) [[Para [Str "One"]] ,[Para [Str "Two"]] ,[Para [Str "Three"]]] ,Para [Str "Multiple",Space,Str "paragraphs:"] ,OrderedList (1,Decimal,Period) [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."] ,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\8217s",SoftBreak,Str "back."]] ,[Para [Str "Item",Space,Str "2."]] ,[Para [Str "Item",Space,Str "3."]]] ,Header 2 ("nested",[],[]) [Str "Nested"] ,BulletList [[Plain [Str "Tab"] ,BulletList [[Plain [Str "Tab"] ,BulletList [[Plain [Str "Tab"]]]]]]] ,Para [Str "Here\8217s",Space,Str "another:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "First"]] ,[Plain [Str "Second:"] ,BulletList [[Plain [Str "Fee"]] ,[Plain [Str "Fie"]] ,[Plain [Str "Foe"]]]] ,[Plain [Str "Third"]]] ,Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"] ,OrderedList (1,Decimal,Period) [[Para [Str "First"]] ,[Para [Str "Second:"] ,BulletList [[Plain [Str "Fee"]] ,[Plain [Str "Fie"]] ,[Plain [Str "Foe"]]]] ,[Para [Str "Third"]]] ,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",SoftBreak,Str "indented",Space,Str "with",Space,Str "tabs"]] ,[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "spaces"] ,BulletList [[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "tabs"]] ,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "spaces"]]]]] ,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"] ,OrderedList (2,Decimal,TwoParens) [[Plain [Str "begins",Space,Str "with",Space,Str "2"]] ,[Para [Str "and",Space,Str "now",Space,Str "3"] ,Para [Str "with",Space,Str "a",Space,Str "continuation"] ,OrderedList (4,LowerRoman,Period) [[Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",SoftBreak,Str "starting",Space,Str "with",Space,Str "4"]] ,[Plain [Str "more",Space,Str "items"] ,OrderedList (1,UpperAlpha,TwoParens) [[Plain [Str "a",Space,Str "subsublist"]] ,[Plain [Str "a",Space,Str "subsublist"]]]]]]] ,Para [Str "Nesting:"] ,OrderedList (1,UpperAlpha,Period) [[Plain [Str "Upper",Space,Str "Alpha"] ,OrderedList (1,UpperRoman,Period) [[Plain [Str "Upper",Space,Str "Roman."] ,OrderedList (6,Decimal,TwoParens) [[Plain [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"] ,OrderedList (3,LowerAlpha,OneParen) [[Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]] ,Para [Str "Autonumbering:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "Autonumber."]] ,[Plain [Str "More."] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "Nested."]]]]] ,Para [Str "Should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "list",Space,Str "item:"] ,Para [Str "M.A.\160\&2007"] ,Para [Str "B.",Space,Str "Williams"] ,HorizontalRule ,Header 1 ("definition-lists",[],[]) [Str "Definition",Space,Str "Lists"] ,Para [Str "Tight",Space,Str "using",Space,Str "spaces:"] ,DefinitionList [([Str "apple"], [[Plain [Str "red",Space,Str "fruit"]]]) ,([Str "orange"], [[Plain [Str "orange",Space,Str "fruit"]]]) ,([Str "banana"], [[Plain [Str "yellow",Space,Str "fruit"]]])] ,Para [Str "Tight",Space,Str "using",Space,Str "tabs:"] ,DefinitionList [([Str "apple"], [[Plain [Str "red",Space,Str "fruit"]]]) ,([Str "orange"], [[Plain [Str "orange",Space,Str "fruit"]]]) ,([Str "banana"], [[Plain [Str "yellow",Space,Str "fruit"]]])] ,Para [Str "Loose:"] ,DefinitionList [([Str "apple"], [[Para [Str "red",Space,Str "fruit"]]]) ,([Str "orange"], [[Para [Str "orange",Space,Str "fruit"]]]) ,([Str "banana"], [[Para [Str "yellow",Space,Str "fruit"]]])] ,Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"] ,DefinitionList [([Emph [Str "apple"]], [[Para [Str "red",Space,Str "fruit"] ,Para [Str "contains",Space,Str "seeds,",SoftBreak,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"]]]) ,([Emph [Str "orange"]], [[Para [Str "orange",Space,Str "fruit"] ,CodeBlock ("",[],[]) "{ orange code block }" ,BlockQuote [Para [Str "orange",Space,Str "block",Space,Str "quote"]]]])] ,Para [Str "Multiple",Space,Str "definitions,",Space,Str "tight:"] ,DefinitionList [([Str "apple"], [[Plain [Str "red",Space,Str "fruit"]] ,[Plain [Str "computer"]]]) ,([Str "orange"], [[Plain [Str "orange",Space,Str "fruit"]] ,[Plain [Str "bank"]]])] ,Para [Str "Multiple",Space,Str "definitions,",Space,Str "loose:"] ,DefinitionList [([Str "apple"], [[Para [Str "red",Space,Str "fruit"]] ,[Para [Str "computer"]]]) ,([Str "orange"], [[Para [Str "orange",Space,Str "fruit"]] ,[Para [Str "bank"]]])] ,Para [Str "Blank",Space,Str "line",Space,Str "after",Space,Str "term,",Space,Str "indented",Space,Str "marker,",Space,Str "alternate",Space,Str "markers:"] ,DefinitionList [([Str "apple"], [[Para [Str "red",Space,Str "fruit"]] ,[Para [Str "computer"]]]) ,([Str "orange"], [[Para [Str "orange",Space,Str "fruit"] ,OrderedList (1,Decimal,Period) [[Plain [Str "sublist"]] ,[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"]] ,Para [Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"] ,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") "" ,RawBlock (Format "html") "" ,RawBlock (Format "html") "" ,RawBlock (Format "html") "" ,RawBlock (Format "html") "" ,RawBlock (Format "html") "
        " ,Plain [Str "This",Space,Str "is",Space,Emph [Str "emphasized"]] ,RawBlock (Format "html") "" ,Plain [Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"]] ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "" ,Para [Str "Here\8217s",Space,Str "a",Space,Str "simple",Space,Str "block:"] ,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 ("",[],[]) "
        \n foo\n
        " ,Para [Str "As",Space,Str "should",Space,Str "this:"] ,CodeBlock ("",[],[]) "
        foo
        " ,Para [Str "Now,",Space,Str "nested:"] ,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") "" ,Para [Str "Multiline:"] ,RawBlock (Format "html") "" ,RawBlock (Format "html") "" ,Para [Str "Code",Space,Str "block:"] ,CodeBlock ("",[],[]) "" ,Para [Str "Just",Space,Str "plain",Space,Str "comment,",Space,Str "with",Space,Str "trailing",Space,Str "spaces",Space,Str "on",Space,Str "the",Space,Str "line:"] ,RawBlock (Format "html") "" ,Para [Str "Code:"] ,CodeBlock ("",[],[]) "
        " ,Para [Str "Hr\8217s:"] ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,HorizontalRule ,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 "An",Space,Emph [Link ("",[],[]) [Str "emphasized",Space,Str "link"] ("/url","")],Str "."] ,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] ,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] ,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] ,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] ,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "",Str "."] ,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]] ,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello\160there"],Str "."] ,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",Space,Str "H",Subscript [Str "many\160of\160them"],Str "O."] ,Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",SoftBreak,Str "because",Space,Str "of",Space,Str "the",Space,Str "unescaped",Space,Str "spaces:",Space,Str "a^b",Space,Str "c^d,",Space,Str "a~b",Space,Str "c~d."] ,HorizontalRule ,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"] ,Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name."]] ,Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters."] ,Para [Quoted SingleQuote [Str "Oak,"],Space,Quoted SingleQuote [Str "elm,"],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",SoftBreak,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine."]] ,Para [Quoted SingleQuote [Str "He",Space,Str "said,",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",SoftBreak,Str "70\8217s?"] ,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code ("",[],[]) "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link ("",[],[]) [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."] ,Para [Str "Some",Space,Str "dashes:",Space,Str "one\8212two",Space,Str "\8212",Space,Str "three\8212four",Space,Str "\8212",Space,Str "five."] ,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5\8211\&7,",Space,Str "255\8211\&66,",Space,Str "1987\8211\&1999."] ,Para [Str "Ellipses\8230and\8230and\8230."] ,HorizontalRule ,Header 1 ("latex",[],[]) [Str "LaTeX"] ,BulletList [[Plain [RawInline (Format "tex") "\\cite[22-23]{smith.1899}"]] ,[Plain [Math InlineMath "2+2=4"]] ,[Plain [Math InlineMath "x \\in y"]] ,[Plain [Math InlineMath "\\alpha \\wedge \\omega"]] ,[Plain [Math InlineMath "223"]] ,[Plain [Math InlineMath "p",Str "-Tree"]] ,[Plain [Str "Here\8217s",Space,Str "some",Space,Str "display",Space,Str "math:",SoftBreak,Math DisplayMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]] ,[Plain [Str "Here\8217s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",Space,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]] ,Para [Str "These",Space,Str "shouldn\8217t",Space,Str "be",Space,Str "math:"] ,BulletList [[Plain [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]] ,[Plain [Str "$22,000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money.",Space,Str "So",Space,Str "is",Space,Str "$34,000.",SoftBreak,Str "(It",Space,Str "worked",Space,Str "if",Space,Quoted DoubleQuote [Str "lot"],Space,Str "is",Space,Str "emphasized.)"]] ,[Plain [Str "Shoes",Space,Str "($20)",Space,Str "and",Space,Str "socks",Space,Str "($5)."]] ,[Plain [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23$."]]] ,Para [Str "Here\8217s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"] ,RawBlock (Format "latex") "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}" ,HorizontalRule ,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"]] ,[Plain [Str "o",Space,Str "umlaut:",Space,Str "\246"]] ,[Plain [Str "section:",Space,Str "\167"]] ,[Plain [Str "set",Space,Str "membership:",Space,Str "\8712"]] ,[Plain [Str "copyright:",Space,Str "\169"]]] ,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."] ,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."] ,Para [Str "This",Space,Str "&",Space,Str "that."] ,Para [Str "4",Space,Str "<",Space,Str "5."] ,Para [Str "6",Space,Str ">",Space,Str "5."] ,Para [Str "Backslash:",Space,Str "\\"] ,Para [Str "Backtick:",Space,Str "`"] ,Para [Str "Asterisk:",Space,Str "*"] ,Para [Str "Underscore:",Space,Str "_"] ,Para [Str "Left",Space,Str "brace:",Space,Str "{"] ,Para [Str "Right",Space,Str "brace:",Space,Str "}"] ,Para [Str "Left",Space,Str "bracket:",Space,Str "["] ,Para [Str "Right",Space,Str "bracket:",Space,Str "]"] ,Para [Str "Left",Space,Str "paren:",Space,Str "("] ,Para [Str "Right",Space,Str "paren:",Space,Str ")"] ,Para [Str "Greater-than:",Space,Str ">"] ,Para [Str "Hash:",Space,Str "#"] ,Para [Str "Period:",Space,Str "."] ,Para [Str "Bang:",Space,Str "!"] ,Para [Str "Plus:",Space,Str "+"] ,Para [Str "Minus:",Space,Str "-"] ,HorizontalRule ,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 "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by a tab"),Str "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with \"quotes\" in it")] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")] ,Para [Link ("",[],[]) [Str "with_underscore"] ("/url/with_underscore","")] ,Para [Link ("",[],[]) [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")] ,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."] ,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 "."] ,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."] ,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "twice"] ("/url",""),Str "."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "thrice"] ("/url",""),Str "."] ,Para [Str "This",Space,Str "should",Space,Str "[not][]",Space,Str "be",Space,Str "a",Space,Str "link."] ,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 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"] ,Para [Str "Here\8217s",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\8217s",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\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."] ,Para [Str "Here\8217s",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 ("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?"]] ,[Plain [Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] ,[Plain [Str "It",Space,Str "should."]]] ,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link ("",[],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")] ,BlockQuote [Para [Str "Blockquoted:",Space,Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] ,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) ""] ,CodeBlock ("",[],[]) "or here: " ,HorizontalRule ,Header 1 ("images",[],[]) [Str "Images"] ,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"] ,Para [Image ("",[],[]) [Str "lalune"] ("lalune.jpg","fig: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 ("footnotes",[],[]) [Str "Footnotes"] ,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [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 "after",Space,Str "the",Space,Str "footnote",SoftBreak,Str "reference.",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],Space,Str "and",Space,Str "another.",Note [Para [Str "Here\8217s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",SoftBreak,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",SoftBreak,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock ("",[],[]) " { }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",SoftBreak,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],SoftBreak,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",SoftBreak,Str "contains",Space,Str "a",Space,Str "space.[^my",Space,Str "note]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note.",Note [Para [Str "This",SoftBreak,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",SoftBreak,Link ("",[],[]) [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters,",SoftBreak,Str "as",Space,Str "well",Space,Str "as",Space,Str "[bracketed",Space,Str "text]."]]] ,BlockQuote [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]] ,OrderedList (1,Decimal,Period) [[Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]]]] ,Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented."]] pandoc-1.19.2.4/tests/textile-reader.native0000644000000000000000000003101313155240143016664 0ustar0000000000000000Pandoc (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'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","")] ,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Strong [Str "emphasis"]] ,Header 4 ("level-4",[],[]) [Str "Level",Space,Str "4"] ,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'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'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"] ,Para [Str "and",Space,Str "here."] ,Para [Str "pandoc",Space,Str "converts",Space,Str "textile."] ,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"] ,BlockQuote [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "famous",Space,Str "quote",Space,Str "from",Space,Str "somebody.",Space,Str "He",Space,Str "had",Space,Str "a",Space,Str "lot",Space,Str "of",Space,Str "things",Space,Str "to",LineBreak,Str "say,",Space,Str "so",Space,Str "the",Space,Str "text",Space,Str "is",Space,Str "really",Space,Str "really",Space,Str "long",Space,Str "and",Space,Str "spans",Space,Str "on",Space,Str "multiple",Space,Str "lines."]] ,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."] ,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"] ,Para [Str "Code:"] ,CodeBlock ("",[],[]) " ---- (should be four hyphens)\n\n sub status {\n print \"working\";\n }\n\n this code block is indented by one tab" ,Para [Str "And:"] ,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\n These should not be escaped: \\$ \\\\ \\> \\[ \\{" ,CodeBlock ("",[],[]) "Code block with .bc\n continued\n @",Str ",",Space,Code ("",[],[]) "@",Str "."] ,Header 1 ("notextile",[],[]) [Str "Notextile"] ,Para [Str "A",Space,Str "block",Space,Str "of",Space,Str "text",Space,Str "can",Space,Str "be",Space,Str "protected",Space,Str "with",Space,Str "notextile",Space,Str ":"] ,Para [Str "\nNo *bold* and\n* no bullet\n"] ,Para [Str "and",Space,Str "inlines",Space,Str "can",Space,Str "be",Space,Str "protected",Space,Str "with",Space,Str "double *equals (=)* markup."] ,Header 1 ("lists",[],[]) [Str "Lists"] ,Header 2 ("unordered",[],[]) [Str "Unordered"] ,Para [Str "Asterisks",Space,Str "tight:"] ,BulletList [[Plain [Str "asterisk",Space,Str "1"]] ,[Plain [Str "asterisk",Space,Str "2"]] ,[Plain [Str "asterisk",Space,Str "3"]]] ,Para [Str "With",Space,Str "line",Space,Str "breaks:"] ,BulletList [[Plain [Str "asterisk",Space,Str "1",LineBreak,Str "newline"]] ,[Plain [Str "asterisk",Space,Str "2"]]] ,Header 2 ("ordered",[],[]) [Str "Ordered"] ,Para [Str "Tight:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "First"]] ,[Plain [Str "Second"]] ,[Plain [Str "Third"]]] ,Header 2 ("nested",[],[]) [Str "Nested"] ,BulletList [[Plain [Str "ui",Space,Str "1"] ,BulletList [[Plain [Str "ui",Space,Str "1.1"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "oi",Space,Str "1.1.1"]] ,[Plain [Str "oi",Space,Str "1.1.2"]]]] ,[Plain [Str "ui",Space,Str "1.2"]]]] ,[Plain [Str "ui",Space,Str "2"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "oi",Space,Str "2.1"] ,BulletList [[Plain [Str "ui",Space,Str "2.1.1"]] ,[Plain [Str "ui",Space,Str "2.1.2"]]]]]]] ,Header 2 ("issue-1500",[],[]) [Str "Issue",Space,Str "#1500"] ,BulletList [[Plain [Str "one"]] ,[Plain [Str "two",LineBreak,Str "->",Space,Str "and",Space,Str "more"]]] ,Header 2 ("issue-1513",[],[]) [Str "Issue",Space,Str "#1513"] ,Para [Str "List:"] ,BulletList [[Plain [Str "one"]] ,[Plain [Str "two"]]] ,Header 2 ("definition-list",[],[]) [Str "Definition",Space,Str "List"] ,DefinitionList [([Str "coffee"], [[Plain [Str "Hot",Space,Str "and",Space,Str "black"]]]) ,([Str "tea"], [[Plain [Str "Also",Space,Str "hot,",Space,Str "but",Space,Str "a",Space,Str "little",Space,Str "less",Space,Str "black"]]]) ,([Str "milk"], [[Para [Str "Nourishing",Space,Str "beverage",Space,Str "for",Space,Str "baby",Space,Str "cows."] ,Para [Str "Cold",Space,Str "drink",Space,Str "that",Space,Str "goes",Space,Str "great",Space,Str "with",Space,Str "cookies."]]]) ,([Str "beer"], [[Plain [Str "fresh",Space,Str "and",Space,Str "bitter"]]])] ,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 ".",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 "--",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","")] ,Para [Link ("",[],[]) [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")] ,Para [Str "\"not",Space,Str "a",Space,Str "link\":",Space,Str "foo"] ,Para [Str "Automatic",Space,Str "linking",Space,Str "to",Space,Link ("",[],[]) [Str "http://www.example.com"] ("http://www.example.com",""),Str "."] ,Para [Link ("",[],[]) [Str "Example"] ("http://www.example.com/",""),Str ":",Space,Str "Example",Space,Str "of",Space,Str "a",Space,Str "link",Space,Str "followed",Space,Str "by",Space,Str "a",Space,Str "colon."] ,Para [Str "A",Space,Str "link",Link ("",[],[]) [Str "with",Space,Str "brackets"] ("http://www.example.com",""),Str "and",Space,Str "no",Space,Str "spaces."] ,Header 1 ("tables",[],[]) [Str "Tables"] ,Para [Str "Textile",Space,Str "allows",Space,Str "tables",Space,Str "with",Space,Str "and",Space,Str "without",Space,Str "headers",Space,Str ":"] ,Header 2 ("without-headers",[],[]) [Str "Without",Space,Str "headers"] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [] [[[Plain [Str "name"]] ,[Plain [Str "age"]] ,[Plain [Str "sex"]]] ,[[Plain [Str "joan"]] ,[Plain [Str "24"]] ,[Plain [Str "f"]]] ,[[Plain [Str "archie"]] ,[Plain [Str "29"]] ,[Plain [Str "m"]]] ,[[Plain [Str "bella"]] ,[Plain [Str "45"]] ,[Plain [Str "f"]]]] ,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"]] ,[Plain [Str "age"]] ,[Plain [Str "sex"]]] [[[Plain [Str "joan"]] ,[Plain [Str "24"]] ,[Plain [Str "f"]]] ,[[Plain [Str "archie"]] ,[Plain [Str "29"]] ,[Plain [Str "m"]]] ,[[Plain [Str "bella"]] ,[Plain [Str "45"]] ,[Plain [Str "f"]]]] ,Header 1 ("images",[],[]) [Str "Images"] ,Para [Str "Textile",Space,Str "inline",Space,Str "image",Space,Str "syntax,",Space,Str "like",LineBreak,Str "here",Space,Image ("",[],[]) [Str "this is the alt text"] ("this_is_an_image.png","this is the alt text"),LineBreak,Str "and",Space,Str "here",Space,Image ("",[],[]) [Str ""] ("this_is_an_image.png",""),Str "."] ,Header 1 ("attributes",[],[]) [Str "Attributes"] ,Header 2 ("ident",["bar","foo"],[("style","color:red;"),("lang","en")]) [Str "HTML",Space,Str "and",Space,Str "CSS",Space,Str "attributes",Space,Str "are",Space,Str "parsed",Space,Str "in",Space,Str "headers."] ,Header 2 ("centered",[],[("style","text-align:center;")]) [Str "Centered"] ,Header 2 ("right",[],[("style","text-align:right;")]) [Str "Right"] ,Header 2 ("justified",[],[("lang","en"),("style","color:blue;text-align:justify;")]) [Str "Justified"] ,Para [Str "as",Space,Str "well",Space,Str "as",Space,Strong [Span ("",["foo"],[]) [Str "inline",Space,Str "attributes"]],Space,Str "of",Space,Span ("",[],[("style","color:red;")]) [Str "all",Space,Str "kind"]] ,Para [Str "and",Space,Str "paragraph",Space,Str "attributes,",Space,Str "and",Space,Str "table",Space,Str "attributes."] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [] [[[Plain [Str "name"]] ,[Plain [Str "age"]] ,[Plain [Str "sex"]]] ,[[Plain [Str "joan"]] ,[Plain [Str "24"]] ,[Plain [Str "f"]]]] ,Para [Emph [Str "(class#id)",Space,Str "emph"]] ,Para [Emph [Str "(no",Space,Str "class#id)",Space,Str "emph"]] ,Header 1 ("entities",[],[]) [Str "Entities"] ,Para [Str "*",LineBreak,Str "&"] ,Header 1 ("raw-html",[],[]) [Str "Raw",Space,Str "HTML"] ,Para [Str "However,",Space,RawInline (Format "html") "",Space,Str "raw",Space,Str "HTML",Space,Str "inlines",Space,RawInline (Format "html") "",Space,Str "are",Space,Str "accepted,",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str ":"] ,RawBlock (Format "html") "
        " ,Para [Str "any",Space,Strong [Str "Raw",Space,Str "HTML",Space,Str "Block"],Space,Str "with",Space,Str "bold"] ,RawBlock (Format "html") "
        " ,Para [Str "Html",Space,Str "blocks",Space,Str "can"] ,RawBlock (Format "html") "
        " ,Para [Str "interrupt",Space,Str "paragraphs"] ,RawBlock (Format "html") "
        " ,Para [Str "as",Space,Str "well."] ,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"] ,Para [Str "PBS (Public Broadcasting System)"] ,Para [Str "Hi\8482"] ,Para [Str "Hi",Space,Str "\8482"] ,Para [Str "\174",Space,Str "Hi\174"] ,Para [Str "Hi\169\&2008",Space,Str "\169",Space,Str "2008"] ,Header 1 ("footnotes",[],[]) [Str "Footnotes"] ,Para [Str "A",Space,Str "note.",Note [Para [Str "The",Space,Str "note",LineBreak,Str "is",Space,Str "here!"]],Space,Str "Another",Space,Str "note",Note [Para [Str "Other",Space,Str "note."]],Str "."] ,Header 1 ("comment-blocks",[],[]) [Str "Comment",Space,Str "blocks"] ,Para [Str "not",Space,Str "a",Space,Str "comment."]] pandoc-1.19.2.4/tests/twiki-reader.native0000644000000000000000000002047113155240143016343 0ustar0000000000000000Pandoc (Meta {unMeta = fromList []}) [Header 1 ("header",[],[]) [Str "header"] ,Header 2 ("header-level-two",[],[]) [Str "header",Space,Str "level",Space,Str "two"] ,Header 3 ("header-level-3",[],[]) [Str "header",Space,Str "level",Space,Str "3"] ,Header 4 ("header-level-four",[],[]) [Str "header",Space,Emph [Str "level"],Space,Str "four"] ,Header 5 ("header-level-5",[],[]) [Str "header",Space,Str "level",Space,Str "5"] ,Header 6 ("header-level-6",[],[]) [Str "header",Space,Str "level",Space,Str "6"] ,Para [Str "---+++++++",Space,Str "not",Space,Str "a",Space,Str "header"] ,Para [Str "--++",Space,Str "not",Space,Str "a",Space,Str "header"] ,Header 1 ("emph-and-strong",[],[]) [Str "emph",Space,Str "and",Space,Str "strong"] ,Para [Emph [Str "emph"],Space,Strong [Str "strong"]] ,Para [Emph [Strong [Str "strong",Space,Str "and",Space,Str "emph"]]] ,Para [Strong [Emph [Str "emph",Space,Str "inside"],Space,Str "strong"]] ,Para [Strong [Str "strong",Space,Str "with",Space,Emph [Str "emph"]]] ,Para [Emph [Strong [Str "strong",Space,Str "inside"],Space,Str "emph"]] ,Header 1 ("horizontal-rule",[],[]) [Str "horizontal",Space,Str "rule"] ,Para [Str "top"] ,HorizontalRule ,Para [Str "bottom"] ,HorizontalRule ,Header 1 ("nop",[],[]) [Str "nop"] ,Para [Str "_not",Space,Str "emph_"] ,Header 1 ("entities",[],[]) [Str "entities"] ,Para [Str "hi",Space,Str "&",Space,Str "low"] ,Para [Str "hi",Space,Str "&",Space,Str "low"] ,Para [Str "G\246del"] ,Para [Str "\777\2730"] ,Header 1 ("comments",[],[]) [Str "comments"] ,Para [Str "inline",Space,Str "comment"] ,Para [Str "between",Space,Str "blocks"] ,Header 1 ("linebreaks",[],[]) [Str "linebreaks"] ,Para [Str "hi",LineBreak,Str "there"] ,Para [Str "hi",LineBreak,Str "there"] ,Header 1 ("inline-code",[],[]) [Str "inline",Space,Str "code"] ,Para [Code ("",[],[]) "*\8594*",Space,Code ("",[],[]) "typed",Space,Code ("",["haskell"],[]) ">>="] ,Header 1 ("code-blocks",[],[]) [Str "code",Space,Str "blocks"] ,CodeBlock ("",[],[]) "case xs of\n (_:_) -> reverse xs\n [] -> ['*']" ,CodeBlock ("",["haskell"],[]) "case xs of\n (_:_) -> reverse xs\n [] -> ['*']" ,Header 1 ("block-quotes",[],[]) [Str "block",Space,Str "quotes"] ,Para [Str "Regular",Space,Str "paragraph"] ,BlockQuote [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote."] ,Para [Str "With",Space,Str "two",Space,Str "paragraphs."]] ,Para [Str "Nother",Space,Str "paragraph."] ,Header 1 ("external-links",[],[]) [Str "external",Space,Str "links"] ,Para [Link ("",[],[]) [Emph [Str "Google"],Space,Str "search",Space,Str "engine"] ("http://google.com","")] ,Para [Link ("",[],[]) [Str "http://pandoc.org"] ("http://pandoc.org","")] ,Para [Link ("",[],[]) [Str "http://google.com"] ("http://google.com",""),Space,Link ("",[],[]) [Str "http://yahoo.com"] ("http://yahoo.com","")] ,Para [Link ("",[],[]) [Str "email",Space,Str "me"] ("mailto:info@example.org","")] ,Para [Str "http://google.com"] ,Para [Str "http://google.com"] ,Para [Str "http://google.com"] ,Para [Str "info@example.org"] ,Para [Str "info@example.org"] ,Para [Str "info@example.org"] ,Header 1 ("lists",[],[]) [Str "lists"] ,BulletList [[Plain [Str "Start",Space,Str "each",Space,Str "line"]] ,[Plain [Str "with",Space,Str "an",Space,Str "asterisk",Space,Str "(*)."] ,BulletList [[Plain [Str "More",Space,Str "asterisks",Space,Str "gives",Space,Str "deeper"] ,BulletList [[Plain [Str "and",Space,Str "deeper",Space,Str "levels."]]]]]] ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels."]] ,[Plain [Str "Continuations",Space,Str "are",Space,Str "also",Space,Str "possible"] ,BulletList [[Plain [Str "and",Space,Str "do",Space,Str "not",Space,Str "break",Space,Str "the",Space,Str "list",Space,Str "flow"]]]] ,[Plain [Str "Level",Space,Str "one"]]] ,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "ends",Space,Str "the",Space,Str "list."] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "Start",Space,Str "each",Space,Str "line"]] ,[Plain [Str "with",Space,Str "a",Space,Str "number",Space,Str "(1.)."] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "More",Space,Str "number",Space,Str "signs",Space,Str "gives",Space,Str "deeper"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "and",Space,Str "deeper"]] ,[Plain [Str "levels."]]]]]] ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels."]] ,[Plain [Str "Blank",Space,Str "lines"]]] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "end",Space,Str "the",Space,Str "list",Space,Str "and",Space,Str "start",Space,Str "another."]]] ,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "also",Space,Str "ends",Space,Str "the",Space,Str "list."] ,DefinitionList [([Str "item",Space,Str "1"], [[Plain [Str "definition",Space,Str "1"]]]) ,([Str "item",Space,Str "2"], [[Plain [Str "definition",Space,Str "2-1",Space,Str "definition",Space,Str "2-2"]]]) ,([Str "item",Space,Emph [Str "3"]], [[Plain [Str "definition",Space,Emph [Str "3"]]]])] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "one"]] ,[Plain [Str "two"] ,BulletList [[Plain [Str "two",Space,Str "point",Space,Str "one"]] ,[Plain [Str "two",Space,Str "point",Space,Str "two"]]]] ,[Plain [Str "three"] ,DefinitionList [([Str "three",Space,Str "item",Space,Str "one"], [[Plain [Str "three",Space,Str "def",Space,Str "one"]]])]] ,[Plain [Str "four"] ,DefinitionList [([Str "four",Space,Str "def",Space,Str "one"], [[Plain [Str "this",Space,Str "is",Space,Str "a",Space,Str "continuation"]]])]] ,[Plain [Str "five"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "five",Space,Str "sub",Space,Str "1"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "five",Space,Str "sub",Space,Str "1",Space,Str "sub",Space,Str "1"]]]] ,[Plain [Str "five",Space,Str "sub",Space,Str "2"]]]]] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "other"] ,OrderedList (1,UpperRoman,DefaultDelim) [[Plain [Str "list"]] ,[Plain [Str "styles"]]]] ,[Plain [Str "are"] ,OrderedList (1,LowerRoman,DefaultDelim) [[Plain [Str "also"]] ,[Plain [Str "possible"]]]] ,[Plain [Str "all"] ,OrderedList (1,LowerAlpha,DefaultDelim) [[Plain [Str "the"]] ,[Plain [Str "different"]] ,[Plain [Str "styles"]]]] ,[Plain [Str "are"] ,OrderedList (1,UpperAlpha,DefaultDelim) [[Plain [Str "implemented"]] ,[Plain [Str "and"]] ,[Plain [Str "supported"]]]]] ,Header 1 ("tables",[],[]) [Str "tables"] ,Table [] [AlignDefault,AlignDefault] [0.0,0.0] [[] ,[]] [[[Plain [Str "Orange"]] ,[Plain [Str "Apple"]]] ,[[Plain [Str "Bread"]] ,[Plain [Str "Pie"]]] ,[[Plain [Str "Butter"]] ,[Plain [Str "Ice",Space,Str "cream"]]]] ,Table [] [AlignLeft,AlignLeft] [0.0,0.0] [[Plain [Str "Orange"]] ,[Plain [Str "Apple"]]] [[[Plain [Str "Bread"]] ,[Plain [Str "Pie"]]] ,[[Plain [Strong [Str "Butter"]]] ,[Plain [Str "Ice",Space,Str "cream"]]]] ,Table [] [AlignLeft,AlignLeft] [0.0,0.0] [[Plain [Str "Orange"]] ,[Plain [Str "Apple"]]] [[[Plain [Str "Bread",LineBreak,LineBreak,Str "and",Space,Str "cheese"]] ,[Plain [Str "Pie",LineBreak,LineBreak,Strong [Str "apple"],Space,Str "and",Space,Emph [Str "carrot"]]]]] ,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[] ,[] ,[]] [[[Plain [Str "Orange"]] ,[Plain [Str "Apple"]] ,[Plain [Str "more"]]] ,[[Plain [Str "Bread"]] ,[Plain [Str "Pie"]] ,[Plain [Str "more"]]] ,[[Plain [Str "Butter"]] ,[Plain [Str "Ice",Space,Str "cream"]] ,[Plain [Str "and",Space,Str "more"]]]] ,Header 1 ("macros",[],[]) [Str "macros"] ,Para [Span ("",["twiki-macro","TEST"],[]) []] ,Para [Span ("",["twiki-macro","TEST"],[]) [Str ""]] ,Para [Span ("",["twiki-macro","TEST"],[]) [Str "content with spaces"]] ,Para [Span ("",["twiki-macro","TEST"],[]) [Str "content with spaces"]] ,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test")]) [Str "content with spaces"]] ,Para [Span ("",["twiki-macro","TEST"],[]) [Str "content with spaces ARG1=test"]] ,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test")]) [Str "content with spaces"]] ,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test"),("ARG2","test2")]) [Str ""]] ,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test"),("ARG2","test2")]) [Str ""]] ,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test"),("ARG2","test2")]) [Str "multiline\ndoes also work"]]] pandoc-1.19.2.4/tests/txt2tags.native0000644000000000000000000012775713155240143015553 0ustar0000000000000000Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]),("date",MetaInlines [Str "date"]),("includeconf",MetaString "rules.conf"),("title",MetaInlines [Str "Txt2tags",Space,Str "Markup",Space,Str "Rules"])]}) [Para [Str "This",Space,Str "document",Space,Str "describes",Space,Str "all",Space,Str "the",Space,Str "details",Space,Str "about",Space,Str "each",Space,Str "txt2tags",Space,Str "mark.",SoftBreak,Str "The",Space,Str "target",Space,Str "audience",Space,Str "are",Space,Strong [Str "experienced"],Space,Str "users.",Space,Str "You",Space,Str "may",Space,Str "find",Space,Str "it",SoftBreak,Str "useful",Space,Str "if",Space,Str "you",Space,Str "want",Space,Str "to",Space,Str "master",Space,Str "the",Space,Str "marks",Space,Str "or",Space,Str "solve",Space,Str "a",Space,Str "specific",Space,Str "problem",SoftBreak,Str "about",Space,Str "a",Space,Str "mark."] ,Para [Str "If",Space,Str "you",Space,Str "are",Space,Str "new",Space,Str "to",Space,Str "txt2tags",Space,Str "or",Space,Str "just",Space,Str "want",Space,Str "to",Space,Str "know",Space,Str "which",Space,Str "are",Space,Str "the",SoftBreak,Str "available",Space,Str "marks,",Space,Str "please",Space,Str "read",Space,Str "the",Space,Link ("",[],[]) [Str "Markup",Space,Str "Demo"] ("MARKUPDEMO",""),Str "."] ,Para [Str "Note",Space,Str "1:",Space,Str "This",Space,Str "document",Space,Str "is",Space,Str "generated",Space,Str "directly",Space,Str "from",Space,Str "the",Space,Str "txt2tags",SoftBreak,Str "test-suite.",Space,Str "All",Space,Str "the",Space,Str "rules",Space,Str "mentioned",Space,Str "here",Space,Str "are",Space,Str "100%",Space,Str "in",Space,Str "sync",Space,Str "with",Space,Str "the",SoftBreak,Str "current",Space,Str "program",Space,Str "code."] ,Para [Str "Note",Space,Str "2:",Space,Str "A",Space,Str "good",Space,Str "practice",Space,Str "is",Space,Str "to",Space,Str "consult",Space,Link ("",[],[]) [Str "the",Space,Str "sources"] ("rules.t2t",""),Space,Str "when",SoftBreak,Str "reading,",Space,Str "to",Space,Str "see",Space,Str "how",Space,Str "the",Space,Str "texts",Space,Str "were",Space,Str "made."] ,Para [Str "Table",Space,Str "of",Space,Str "Contents:"] ,HorizontalRule ,Header 1 ("paragraph",[],[]) [Str "Paragraph"] ,Para [Str "A",Space,Str "paragraph",Space,Str "is",Space,Str "composed",Space,Str "by",Space,Str "one",Space,Str "or",Space,Str "more",Space,Str "lines.",SoftBreak,Str "A",Space,Str "blank",Space,Str "line",Space,Str "(or",Space,Str "a",Space,Str "table,",Space,Str "or",Space,Str "a",Space,Str "list)",Space,Str "ends",Space,Str "the",SoftBreak,Str "current",Space,Str "paragraph."] ,Para [Str "Leading",Space,Str "and",Space,Str "trailing",Space,Str "spaces",Space,Str "are",Space,Str "ignored."] ,Para [Str "A",Space,Str "comment",Space,Str "line",Space,Str "can",Space,Str "be",Space,Str "placed",Space,Str "inside",Space,Str "a",Space,Str "paragraph.",SoftBreak,Str "It",Space,Str "will",Space,Str "not",Space,Str "affect",Space,Str "it."] ,Para [Str "The",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "file",Space,Str "(EOF)",Space,Str "closes",Space,Str "the",SoftBreak,Str "currently",Space,Str "open",Space,Str "paragraph."] ,Header 1 ("comment",[],[]) [Str "Comment"] ,Para [Str "%",Space,Str "not",Space,Str "on",Space,Str "the",Space,Str "line",Space,Str "beginning",Space,Str "(at",Space,Str "column",Space,Str "2)"] ,Para [Str "some",Space,Str "text",Space,Str "%",Space,Str "half",Space,Str "line",Space,Str "comments",Space,Str "are",Space,Str "not",Space,Str "allowed"] ,Header 1 ("line",[],[]) [Str "Line"] ,HorizontalRule ,HorizontalRule ,HorizontalRule ,HorizontalRule ,HorizontalRule ,HorizontalRule ,HorizontalRule ,HorizontalRule ,HorizontalRule ,HorizontalRule ,HorizontalRule ,Para [Strikeout [Str "-----"],SoftBreak,Strikeout [Str "-------",Space,Str "--------"]] ,Para [Strikeout [Str "-------+--------"]] ,Para [Str "(",Space,Strikeout [Str "----------------"],Space,Str ")"] ,Header 1 ("inline",[],[]) [Str "Inline"] ,Para [Str "i)",Space,Strong [Str "b"],Space,Emph [Str "i"],Space,Emph [Str "u"],Space,Strikeout [Str "s"],Space,Code ("",[],[]) "m",Space,Str "r",Space,RawInline (Format "html") "t",SoftBreak,Str "i)",Space,Strong [Str "bo"],Space,Emph [Str "it"],Space,Emph [Str "un"],Space,Strikeout [Str "st"],Space,Code ("",[],[]) "mo",Space,Str "ra",Space,RawInline (Format "html") "tg",SoftBreak,Str "i)",Space,Strong [Str "bold"],Space,Emph [Str "ital"],Space,Emph [Str "undr"],Space,Strikeout [Str "strk"],Space,Code ("",[],[]) "mono",Space,Str "raw",Space,RawInline (Format "html") "tggd",SoftBreak,Str "i)",Space,Strong [Str "bo",Space,Str "ld"],Space,Emph [Str "it",Space,Str "al"],Space,Emph [Str "un",Space,Str "dr"],Space,Strikeout [Str "st",Space,Str "rk"],Space,Code ("",[],[]) "mo no",Space,Str "r",Space,Str "aw",Space,RawInline (Format "html") "tg gd",SoftBreak,Str "i)",Space,Strong [Str "bo",Space,Str "*",Space,Str "ld"],Space,Emph [Str "it",Space,Str "/",Space,Str "al"],Space,Emph [Str "un",Space,Str "_",Space,Str "dr"],Space,Strikeout [Str "st",Space,Str "-",Space,Str "rk"],Space,Code ("",[],[]) "mo ` no",Space,Str "r",Space,Str "\"",Space,Str "aw",Space,RawInline (Format "html") "tg ' gd",SoftBreak,Str "i)",Space,Strong [Str "bo",Space,Str "**ld"],Space,Emph [Str "it",Space,Str "//al"],Space,Emph [Str "un",Space,Str "__dr"],Space,Strikeout [Str "st",Space,Str "--rk"],Space,Code ("",[],[]) "mo ``no",Space,Str "r",Space,Str "\"\"aw",Space,RawInline (Format "html") "tg ''gd",SoftBreak,Str "i)",Space,Strong [Str "bo",Space,Str "**",Space,Str "ld"],Space,Emph [Str "it",Space,Str "//",Space,Str "al"],Space,Emph [Str "un",Space,Str "__",Space,Str "dr"],Space,Strikeout [Str "st",Space,Str "--",Space,Str "rk"],Space,Code ("",[],[]) "mo `` no",Space,Str "r",Space,Str "\"\"",Space,Str "aw",Space,RawInline (Format "html") "tg '' gd",SoftBreak,Str "i)",Space,Strong [Str "**bold**"],Space,Emph [Str "//ital//"],Space,Emph [Str "__undr__"],Space,Strikeout [Str "--strk--"],Space,Code ("",[],[]) "``mono``",Space,Str "\"\"raw\"\"",Space,RawInline (Format "html") "''tggd''",SoftBreak,Str "i)",Space,Strong [Str "*bold*"],Space,Emph [Str "/ital/"],Space,Emph [Str "_undr_"],Space,Strikeout [Str "-strk-"],Space,Code ("",[],[]) "`mono`",Space,Str "\"raw\"",Space,RawInline (Format "html") "'tggd'"] ,Para [Str "i)",Space,Strong [Str "*"],Space,Emph [Str "/"],Space,Emph [Str "_"],Space,Strikeout [Str "-"],Space,Code ("",[],[]) "`",Space,Str "\"",Space,RawInline (Format "html") "'",SoftBreak,Str "i)",Space,Strong [Str "**"],Space,Emph [Str "//"],Space,Emph [Str "__"],Space,Strikeout [Str "--"],Space,Code ("",[],[]) "``",Space,Str "\"\"",Space,RawInline (Format "html") "''",SoftBreak,Str "i)",Space,Strong [Str "***"],Space,Emph [Str "///"],Space,Emph [Str "___"],Space,Strikeout [Str "---"],Space,Code ("",[],[]) "```",Space,Str "\"\"\"",Space,RawInline (Format "html") "'''",SoftBreak,Str "i)",Space,Strong [Str "****"],Space,Emph [Str "////"],Space,Emph [Str "____"],Space,Strikeout [Str "----"],Space,Code ("",[],[]) "````",Space,Str "\"\"\"\"",Space,RawInline (Format "html") "''''",SoftBreak,Str "i)",Space,Strong [Str "*****"],Space,Emph [Str "/////"],Space,Emph [Str "_____"],Space,Strikeout [Str "-----"],Space,Code ("",[],[]) "`````",Space,Str "\"\"\"\"\"",Space,RawInline (Format "html") "'''''",SoftBreak,Str "i)",Space,Strong [Str "******"],Space,Emph [Str "//////"],Space,Emph [Str "______"],Space,Strikeout [Str "------"],Space,Code ("",[],[]) "``````",Space,Str "\"\"\"\"\"\"",Space,RawInline (Format "html") "''''''"] ,Para [Str "i)",Space,Str "****",Space,Str "////",Space,Str "____",Space,Str "----",Space,Str "````",Space,Str "\"\"\"\"",Space,Str "''''",SoftBreak,Str "i)",Space,Str "**",Space,Str "**",Space,Str "//",Space,Str "//",Space,Str "__",Space,Str "__",Space,Str "--",Space,Str "--",Space,Str "``",Space,Str "``",Space,Str "\"\"",Space,Str "\"\"",Space,Str "''",Space,Str "''"] ,Para [Str "i)",Space,Str "**",Space,Str "bold**",Space,Str "//",Space,Str "ital//",Space,Str "__",Space,Str "undr__",Space,Str "--",Space,Str "strk--",Space,Str "``",Space,Str "mono``",Space,Str "\"\"",Space,Str "raw\"\"",Space,Str "''",Space,Str "tggd''",SoftBreak,Str "i)",Space,Str "**bold",Space,Str "**",Space,Str "//ital",Space,Str "//",Space,Str "__undr",Space,Str "__",Space,Str "--strk",Space,Str "--",Space,Str "``mono",Space,Str "``",Space,Str "\"\"raw",Space,Str "\"\"",Space,Str "''tggd",Space,Str "''",SoftBreak,Str "i)",Space,Str "**",Space,Str "bold",Space,Str "**",Space,Str "//",Space,Str "ital",Space,Str "//",Space,Str "__",Space,Str "undr",Space,Str "__",Space,Str "--",Space,Str "strk",Space,Str "--",Space,Str "``",Space,Str "mono",Space,Str "``",Space,Str "\"\"",Space,Str "raw",Space,Str "\"\"",Space,Str "''",Space,Str "tggd",Space,Str "''"] ,Header 1 ("link",[],[]) [Str "Link"] ,Para [Link ("",[],[]) [Str "mailto:user@domain.com"] ("user@domain.com",""),SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com"] ("user@domain.com",""),Str ".",SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com"] ("user@domain.com",""),Str ".",Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "mailto:user@domain.com"] ("user@domain.com",""),Str ".",Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "label"] ("user@domain.com",""),SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla"] ("user@domain.com?subject=bla",""),SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla"] ("user@domain.com?subject=bla",""),Str ".",SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla"] ("user@domain.com?subject=bla",""),Str ",",SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla&cc=otheruser@domain.com"] ("user@domain.com?subject=bla&cc=otheruser@domain.com",""),SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla&cc=otheruser@domain.com"] ("user@domain.com?subject=bla&cc=otheruser@domain.com",""),Str ".",SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla&cc=otheruser@domain.com"] ("user@domain.com?subject=bla&cc=otheruser@domain.com",""),Str ",",SoftBreak,Link ("",[],[]) [Str "label"] ("user@domain.com?subject=bla&cc=otheruser@domain.com",""),Str ".",SoftBreak,Link ("",[],[]) [Str "label"] ("user@domain.com?subject=bla&cc=otheruser@domain.com.",""),Str ".",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com"] ("http://www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/"] ("http://www.domain.com/dir/",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir///"] ("http://www.domain.com/dir///",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com."] ("http://www.domain.com.",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com,"] ("http://www.domain.com,",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com."] ("http://www.domain.com.",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com,"] ("http://www.domain.com,",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/."] ("http://www.domain.com/dir/.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com."] ("http://www.domain.com.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/."] ("http://www.domain.com/dir/.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html."] ("http://www.domain.com/dir/index.html.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html,"] ("http://www.domain.com/dir/index.html,",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/#anchor"] ("http://www.domain.com/dir/#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html#anchor"] ("http://www.domain.com/dir/index.html#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html#anchor."] ("http://www.domain.com/dir/index.html#anchor.",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/#anchor."] ("http://www.domain.com/dir/#anchor.",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html#anchor."] ("http://www.domain.com/dir/index.html#anchor.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/#anchor."] ("http://www.domain.com/dir/#anchor.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html#anchor."] ("http://www.domain.com/dir/index.html#anchor.",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://domain.com?a=a@a.a&b=a+b+c."] ("http://domain.com?a=a@a.a&b=a+b+c.",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com?a=a@a.a&b=a+b+c,"] ("http://domain.com?a=a@a.a&b=a+b+c,",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c."] ("http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@."] ("http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com?a=a@a.a&b=a+b+c.#anchor"] ("http://domain.com?a=a@a.a&b=a+b+c.#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor"] ("http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.#anchor"] ("http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com/bla.html."] ("http://user:password@domain.com/bla.html.",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com/dir/."] ("http://user:password@domain.com/dir/.",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com."] ("http://user:password@domain.com.",""),SoftBreak,Link ("",[],[]) [Str "http://user:@domain.com."] ("http://user:@domain.com.",""),SoftBreak,Link ("",[],[]) [Str "http://user@domain.com."] ("http://user@domain.com.",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor"] ("http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c@#anchor"] ("http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c@#anchor",""),SoftBreak,Link ("",[],[]) [Str "label"] ("www.domain.com",""),SoftBreak,Str "[",Space,Str "label",Space,Link ("",[],[]) [Str "www.domain.com"] ("www.domain.com",""),Str "]",SoftBreak,Link ("",[],[]) [Str "label",Space] ("www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "anchor",Space] ("http://www.domain.com/dir/index.html#anchor.",""),SoftBreak,Link ("",[],[]) [Str "login",Space] ("http://user:password@domain.com/bla.html",""),SoftBreak,Link ("",[],[]) [Str "form",Space] ("http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.",""),SoftBreak,Link ("",[],[]) [Str "form",Space,Str "&",Space,Str "anchor"] ("http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor",""),SoftBreak,Link ("",[],[]) [Str "login",Space,Str "&",Space,Str "form",Space] ("http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "up",Space] ("..",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "file",Space] ("bla.html",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "anchor",Space] ("#anchor",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "file/anchor"] ("bla.html#anchor",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "file/anchor"] ("bla.html#anchor.",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "img",Space] ("abc.gif",""),SoftBreak,Link ("",[],[]) [Str "www.fake.com"] ("www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm"] ("http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-"] ("http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_"] ("http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_",""),Str "-1%.",SoftBreak,Link ("",[],[]) [Str "http://foo._user-9:pass!#$%&*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_"] ("http://foo._user-9:pass!#$%&*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_",""),Str "-1%.",SoftBreak,Link ("",[],[]) [Str "http://L1.com"] ("http://L1.com",""),Space,Str "!",Space,Link ("",[],[]) [Str "mailto:L2@www.com"] ("L2@www.com",""),Space,Str "!",Space,Link ("",[],[]) [Str "L3"] ("www.com",""),Space,Str "!",Space,Link ("",[],[]) [Str "L4"] ("w@ww.com",""),Space,Str "!",Space,Link ("",[],[]) [Str "www.L5.com"] ("www.L5.com",""),SoftBreak,Link ("",[],[]) [Str "www.domain.com"] ("www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "www2.domain.com"] ("www2.domain.com",""),SoftBreak,Link ("",[],[]) [Str "ftp.domain.com"] ("ftp.domain.com",""),SoftBreak,Link ("",[],[]) [Str "WWW.DOMAIN.COM"] ("WWW.DOMAIN.COM",""),SoftBreak,Link ("",[],[]) [Str "FTP.DOMAIN.COM"] ("FTP.DOMAIN.COM",""),SoftBreak,Link ("",[],[]) [Str "label"] ("www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "label"] ("ftp.domain.com",""),SoftBreak,Link ("",[],[]) [Str "label"] ("WWW.DOMAIN.COM",""),SoftBreak,Link ("",[],[]) [Str "label"] ("FTP.DOMAIN.COM",""),SoftBreak,Str "[label",Space,Link ("",[],[]) [Str "www.domain.com"] ("www.domain.com",""),Space,Str "]",SoftBreak,Str "[label]",Space,Link ("",[],[]) [Str "www.domain.com"] ("www.domain.com",""),Str "]"] ,Header 1 ("image",[],[]) [Str "Image"] ,Para [Image ("",[],[]) [] ("img.png","")] ,Para [Link ("",[],[]) [Image ("",[],[]) [] ("img.png","")] ("http://txt2tags.org","")] ,Para [Image ("",[],[]) [] ("img.png",""),Space,Str "Image",Space,Str "at",Space,Str "the",Space,Str "line",Space,Str "beginning."] ,Para [Str "Image",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Image ("",[],[]) [] ("img.png",""),Space,Str "of",Space,Str "the",Space,Str "line."] ,Para [Str "Image",Space,Str "at",Space,Str "the",Space,Str "line",Space,Str "end.",Space,Image ("",[],[]) [] ("img.png","")] ,Para [Image ("",[],[]) [] ("img.png",""),SoftBreak,Image ("",[],[]) [] ("img.png",""),SoftBreak,Image ("",[],[]) [] ("img.png","")] ,Para [Image ("",[],[]) [] ("img.png",""),Image ("",[],[]) [] ("img.png","")] ,Para [Str "Images",Space,Image ("",[],[]) [] ("img.png",""),Space,Str "mixed",Space,Image ("",[],[]) [] ("img.png",""),Space,Str "with",Space,Image ("",[],[]) [] ("img.png",""),Space,Str "text."] ,Para [Str "Images",Space,Str "glued",Space,Str "together:",Space,Image ("",[],[]) [] ("img.png",""),Image ("",[],[]) [] ("img.png",""),Image ("",[],[]) [] ("img.png",""),Str "."] ,Para [Str "[img.png",Space,Str "]"] ,Para [Str "[",Space,Str "img.png]"] ,Para [Str "[",Space,Str "img.png",Space,Str "]"] ,Header 1 ("numtitle",[],[]) [Str "Numbered",Space,Str "Title"] ,Header 1 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "1"] ,Header 2 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "2"] ,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 4 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "4"] ,Header 5 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "5"] ,Header 1 ("lab_el-1",[],[]) [Str "Title",Space,Str "Level",Space,Str "1"] ,Header 2 ("lab_el-2",[],[]) [Str "Title",Space,Str "Level",Space,Str "2"] ,Header 3 ("lab_el-3",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 4 ("lab_el-4",[],[]) [Str "Title",Space,Str "Level",Space,Str "4"] ,Header 5 ("lab_el-5",[],[]) [Str "Title",Space,Str "Level",Space,Str "5"] ,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 3 ("lab_el-9",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Para [Str "+Not",Space,Str "Title"] ,Para [Str "++Not",Space,Str "Title+"] ,Para [Str "+++Not",Space,Str "Title++++",SoftBreak,Str "++++++Not",Space,Str "Title",Space,Str "6++++++"] ,Para [Str "+++++++Not",Space,Str "Title",Space,Str "7+++++++",SoftBreak,Str "+Not",Space,Str "Title+",Space,Str "[label1]",SoftBreak,Str "+Not",Space,Str "Title+[",Space,Str "label",Space,Str "]",SoftBreak,Str "+Not",Space,Str "Title+[la/bel]"] ,Header 1 ("title",[],[]) [Str "Title"] ,Header 1 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "1"] ,Header 2 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "2"] ,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 4 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "4"] ,Header 5 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "5"] ,Header 1 ("lab_el-1",[],[]) [Str "Title",Space,Str "Level",Space,Str "1"] ,Header 2 ("lab_el-2",[],[]) [Str "Title",Space,Str "Level",Space,Str "2"] ,Header 3 ("lab_el-3",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 4 ("lab_el-4",[],[]) [Str "Title",Space,Str "Level",Space,Str "4"] ,Header 5 ("lab_el-5",[],[]) [Str "Title",Space,Str "Level",Space,Str "5"] ,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Header 3 ("lab_el-9",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] ,Para [Str "=Not",Space,Str "Title"] ,Para [Str "==Not",Space,Str "Title="] ,Para [Str "===Not",Space,Str "Title====",SoftBreak,Str "======Not",Space,Str "Title",Space,Str "6======"] ,Para [Str "=======Not",Space,Str "Title",Space,Str "7=======",SoftBreak,Str "=Not",Space,Str "Title=",Space,Str "[label1]",SoftBreak,Str "=Not",Space,Str "Title=[",Space,Str "label",Space,Str "]",SoftBreak,Str "=Not",Space,Str "Title=[la/bel]"] ,Header 1 ("quote",[],[]) [Str "Quote"] ,BlockQuote [Para [Str "To",Space,Str "quote",Space,Str "a",Space,Str "paragraph,",Space,Str "just",Space,Str "prefix",Space,Str "it",Space,Str "by",Space,Str "a",Space,Str "TAB",SoftBreak,Str "character.",Space,Str "All",Space,Str "the",Space,Str "lines",Space,Str "of",Space,Str "the",Space,Str "paragraph",Space,Str "must",SoftBreak,Str "begin",Space,Str "with",Space,Str "a",Space,Str "TAB."]] ,Para [Str "Any",Space,Str "non-tabbed",Space,Str "line",Space,Str "closes",Space,Str "the",Space,Str "quote",Space,Str "block."] ,BlockQuote [Para [Str "The",Space,Str "number",Space,Str "of",Space,Str "leading",Space,Str "TABs",Space,Str "identifies",Space,Str "the",Space,Str "quote",SoftBreak,Str "block",Space,Str "depth.",Space,Str "This",Space,Str "is",Space,Str "quote",Space,Str "level",Space,Str "1."] ,BlockQuote [Para [Str "With",Space,Str "two",Space,Str "TABs,",Space,Str "we",Space,Str "are",Space,Str "on",Space,Str "the",Space,Str "quote",SoftBreak,Str "level",Space,Str "2."] ,BlockQuote [Para [Str "The",Space,Str "more",Space,Str "TABs,",Space,Str "more",Space,Str "deep",Space,Str "is",SoftBreak,Str "the",Space,Str "quote",Space,Str "level."] ,BlockQuote [Para [Str "There",Space,Str "isn't",Space,Str "a",Space,Str "limit."]]]]] ,BlockQuote [BlockQuote [BlockQuote [BlockQuote [Para [Str "This",Space,Str "quote",Space,Str "starts",Space,Str "at",SoftBreak,Str "level",Space,Str "4."]] ,Para [Str "Then",Space,Str "its",Space,Str "depth",Space,Str "is",Space,Str "decreased."]] ,Para [Str "Counting",Space,Str "down,",Space,Str "one",Space,Str "by",Space,Str "one."]] ,Para [Str "Until",Space,Str "the",Space,Str "level",Space,Str "1."]] ,BlockQuote [BlockQuote [BlockQuote [Para [Str "Unlike",Space,Str "lists,",Space,Str "any",Space,Str "quote",Space,Str "block",Space,Str "is",SoftBreak,Str "independent,",Space,Str "not",Space,Str "part",Space,Str "of",Space,Str "a",Space,Str "tree."]]] ,Para [Str "The",Space,Str "TAB",Space,Str "count",Space,Str "don't",Space,Str "need",Space,Str "to",Space,Str "be",Space,Str "incremental",SoftBreak,Str "by",Space,Str "one."] ,BlockQuote [BlockQuote [BlockQuote [Para [Str "The",Space,Str "nesting",Space,Str "don't",Space,Str "need",SoftBreak,Str "to",Space,Str "follow",Space,Str "any",Space,Str "rule."]]] ,Para [Str "Quotes",Space,Str "can",Space,Str "be",Space,Str "opened",Space,Str "and",Space,Str "closed",SoftBreak,Str "in",Space,Str "any",Space,Str "way."] ,BlockQuote [BlockQuote [BlockQuote [Para [Str "You",Space,Str "choose."]]]]]] ,BlockQuote [Para [Str "Some",Space,Str "targets",Space,Str "(as",Space,Str "sgml)",Space,Str "don't",Space,Str "support",Space,Str "the",SoftBreak,Str "nesting",Space,Str "of",Space,Str "quotes.",Space,Str "There",Space,Str "is",Space,Str "only",Space,Str "one",Space,Str "quote",SoftBreak,Str "level."] ,BlockQuote [Para [Str "In",Space,Str "this",Space,Str "case,",Space,Str "no",Space,Str "matter",Space,Str "how",Space,Str "much",SoftBreak,Str "TABs",Space,Str "are",Space,Str "used",Space,Str "to",Space,Str "define",Space,Str "the",Space,Str "quote",SoftBreak,Str "block,",Space,Str "it",Space,Str "always",Space,Str "will",Space,Str "be",Space,Str "level",Space,Str "1."]]] ,BlockQuote [Para [Str "Spaces",Space,Str "AFTER",Space,Str "the",Space,Str "TAB",Space,Str "character",Space,Str "are",Space,Str "allowed.",SoftBreak,Str "But",Space,Str "be",Space,Str "careful,",Space,Str "it",Space,Str "can",Space,Str "be",Space,Str "confusing."]] ,Para [Str "Spaces",Space,Str "BEFORE",Space,Str "the",Space,Str "TAB",Space,Str "character",SoftBreak,Str "invalidate",Space,Str "the",Space,Str "mark.",Space,Str "It's",Space,Str "not",Space,Str "quote."] ,BlockQuote [Para [Str "Paragraph",Space,Str "breaks",Space,Str "inside",Space,Str "a",Space,Str "quote",Space,Str "aren't",SoftBreak,Str "possible."] ,Para [Str "This",Space,Str "sample",Space,Str "are",Space,Str "two",Space,Str "separated",Space,Str "quoted",SoftBreak,Str "paragraphs,",Space,Str "not",Space,Str "a",Space,Str "quote",Space,Str "block",Space,Str "with",SoftBreak,Str "two",Space,Str "paragraphs",Space,Str "inside."]] ,BlockQuote [Para [Str "The",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "file",Space,Str "(EOF)",Space,Str "closes",Space,Str "the",SoftBreak,Str "currently",Space,Str "open",Space,Str "quote",Space,Str "block."]] ,Header 1 ("raw",[],[]) [Str "Raw"] ,Para [Str "A raw line.\n"] ,Para [Str " Another raw line, with leading spaces.\n"] ,Para [Str "A raw area delimited\n by lines with marks.\n"] ,Para [Str "Trailing spaces and TABs after the area marks\nare allowed, but not encouraged nor documented.\n"] ,Para [Str "\"\"\"Not",Space,Str "a",Space,Str "raw",Space,Str "line,",Space,Str "need",Space,Str "one",Space,Str "space",Space,Str "after",Space,Str "mark."] ,Para [Str "\"\"\"",SoftBreak,Str "Not",Space,Str "a",Space,Str "raw",Space,Str "area.",SoftBreak,Str "The",Space,Str "marks",Space,Str "must",Space,Str "be",Space,Str "at",Space,Str "the",Space,Str "line",Space,Str "beginning,",SoftBreak,Str "no",Space,Str "leading",Space,Str "spaces.",SoftBreak,Str "\"\"\""] ,Para [Str "The end of the file (EOF) closes\nthe currently open raw area.\n"] ,Header 1 ("verbatim",[],[]) [Str "Verbatim"] ,CodeBlock ("",[],[]) "A verbatim line.\n" ,CodeBlock ("",[],[]) " Another verbatim line, with leading spaces.\n" ,CodeBlock ("",[],[]) "A verbatim area delimited\n by lines with marks.\n" ,CodeBlock ("",[],[]) "Trailing spaces and TABs after the area marks\nare allowed, but not encouraged nor documented.\n" ,Para [Str "```Not",Space,Str "a",Space,Str "verbatim",Space,Str "line,",Space,Str "need",Space,Str "one",Space,Str "space",Space,Str "after",Space,Str "mark."] ,Para [Str "```",SoftBreak,Str "Not",Space,Str "a",Space,Str "verbatim",Space,Str "area.",SoftBreak,Str "The",Space,Str "marks",Space,Str "must",Space,Str "be",Space,Str "at",Space,Str "the",Space,Str "line",Space,Str "beginning,",SoftBreak,Str "no",Space,Str "leading",Space,Str "spaces.",SoftBreak,Str "```"] ,CodeBlock ("",[],[]) "The end of the file (EOF) closes\nthe currently open verbatim area.\n" ,Header 1 ("deflist",[],[]) [Str "Definition",Space,Str "List"] ,DefinitionList [([Str "Definition",Space,Str "list"], [[Plain [Str "A",Space,Str "list",Space,Str "with",Space,Str "terms"]]]) ,([Str "Start",Space,Str "term",Space,Str "with",Space,Str "colon"], [[Plain [Str "And",Space,Str "its",Space,Str "definition",Space,Str "follows"]]])] ,Header 1 ("numlist",[],[]) [Str "Numbered",Space,Str "List"] ,Para [Str "See",Space,Link ("",[],[]) [Str "List"] ("#list",""),Str ",",Space,Str "the",Space,Str "same",Space,Str "rules",Space,Str "apply."] ,Header 1 ("list",[],[]) [Str "List"] ,BulletList [[Plain [Str "Use",Space,Str "the",Space,Str "hyphen",Space,Str "to",Space,Str "prefix",Space,Str "list",Space,Str "items."]] ,[Plain [Str "There",Space,Str "must",Space,Str "be",Space,Str "one",Space,Str "space",Space,Str "after",Space,Str "the",Space,Str "hyphen."]] ,[Plain [Str "The",Space,Str "list",Space,Str "is",Space,Str "closed",Space,Str "by",Space,Str "two",Space,Str "consecutive",Space,Str "blank",Space,Str "lines."]]] ,BulletList [[Plain [Str "The",Space,Str "list",Space,Str "can",Space,Str "be",Space,Str "indented",Space,Str "on",Space,Str "the",Space,Str "source",Space,Str "document."]] ,[Plain [Str "You",Space,Str "can",Space,Str "use",Space,Str "any",Space,Str "number",Space,Str "of",Space,Str "spaces."]] ,[Plain [Str "The",Space,Str "result",Space,Str "will",Space,Str "be",Space,Str "the",Space,Str "same."]]] ,BulletList [[Para [Str "Let",Space,Str "one",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "the",Space,Str "list",Space,Str "items."]] ,[Para [Str "It",Space,Str "will",Space,Str "be",Space,Str "maintained",Space,Str "on",Space,Str "the",Space,Str "conversion."]] ,[Para [Str "Some",Space,Str "targets",Space,Str "don't",Space,Str "support",Space,Str "this",Space,Str "behavior."]] ,[Para [Str "This",Space,Str "one",Space,Str "was",Space,Str "separated",Space,Str "by",Space,Str "a",Space,Str "line",Space,Str "with",Space,Str "blanks.",SoftBreak,Str "You",Space,Str "can",Space,Str "also",Space,Str "put",Space,Str "a",Space,Str "blank",Space,Str "line",Space,Str "inside"] ,Para [Str "the",Space,Str "item",Space,Str "contents",Space,Str "and",Space,Str "it",Space,Str "will",Space,Str "be",Space,Str "preserved."]]] ,Para [Str "-This",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "list",Space,Str "(no",Space,Str "space)"] ,Para [Str "-",Space,Str "This",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "list",Space,Str "(more",Space,Str "than",Space,Str "one",Space,Str "space)"] ,Para [Str "-",Space,Str "This",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "list",Space,Str "(a",Space,Str "TAB",Space,Str "instead",Space,Str "the",Space,Str "space)"] ,BulletList [[BulletList [[Plain [Str "This",Space,Str "is",Space,Str "a",Space,Str "list"]]]] ,[OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "This",Space,Str "is",Space,Str "a",Space,Str "list"]]]] ,[DefinitionList [([Str "This",Space,Str "is",Space,Str "a",Space,Str "list"], [[]])]]] ,BulletList [[Plain [Str "This",Space,Str "is",Space,Str "the",Space,Str "\"mother\"",Space,Str "list",Space,Str "first",Space,Str "item."]] ,[Plain [Str "Here",Space,Str "is",Space,Str "the",Space,Str "second,",Space,Str "but",Space,Str "inside",Space,Str "this",Space,Str "item,"] ,BulletList [[Plain [Str "there",Space,Str "is",Space,Str "a",Space,Str "sublist,",Space,Str "with",Space,Str "its",Space,Str "own",Space,Str "items."]] ,[Plain [Str "Note",Space,Str "that",Space,Str "the",Space,Str "items",Space,Str "of",Space,Str "the",Space,Str "same",Space,Str "sublist"]] ,[Plain [Str "must",Space,Str "have",Space,Str "the",Space,Str "same",Space,Str "indentation."] ,BulletList [[Plain [Str "And",Space,Str "this",Space,Str "can",Space,Str "go",Space,Str "on,",Space,Str "opening",Space,Str "sublists."] ,BulletList [[Plain [Str "Just",Space,Str "add",Space,Str "leading",Space,Str "spaces",Space,Str "before",Space,Str "the"]] ,[Plain [Str "hyphen",Space,Str "and",Space,Str "sublists",Space,Str "will",Space,Str "be",Space,Str "opened."]] ,[Plain [Str "The",Space,Str "two",Space,Str "blank",Space,Str "lines",Space,Str "closes",Space,Str "them",Space,Str "all."]]]]]]]]] ,BulletList [[Plain [Str "When",Space,Str "nesting",Space,Str "lists,",Space,Str "the",Space,Str "additional",Space,Str "spaces",Space,Str "are",Space,Str "free."]] ,[Plain [Str "You",Space,Str "can",Space,Str "add",Space,Str "just",Space,Str "one,"] ,BulletList [[Plain [Str "or",Space,Str "many."] ,BulletList [[Plain [Str "What",Space,Str "matters",Space,Str "is",Space,Str "to",Space,Str "put",Space,Str "more",Space,Str "than",Space,Str "the",Space,Str "previous."]] ,[Plain [Str "But",Space,Str "remember",Space,Str "that",Space,Str "the",Space,Str "other",Space,Str "items",Space,Str "of",Space,Str "the",Space,Str "same",Space,Str "list"]] ,[Plain [Str "must",Space,Str "use",Space,Str "the",Space,Str "same",Space,Str "indentation."]]]]]]] ,BulletList [[Plain [Str "There",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "depth",Space,Str "limit,"] ,BulletList [[Plain [Str "you",Space,Str "can",Space,Str "go",Space,Str "deeper",Space,Str "and",Space,Str "deeper."] ,BulletList [[Plain [Str "But",Space,Str "some",Space,Str "targets",Space,Str "may",Space,Str "have",Space,Str "restrictions."] ,BulletList [[Plain [Str "The",Space,Str "LaTeX",Space,Str "maximum",Space,Str "is",Space,Str "here,",Space,Str "4",Space,Str "levels."]]]]]]]]] ,BulletList [[Plain [Str "Reverse",Space,Str "nesting",Space,Str "doesn't",Space,Str "work."]] ,[Plain [Str "Because",Space,Str "a",Space,Str "sublist",Space,Str "*must*",Space,Str "have",Space,Str "a",Space,Str "mother",Space,Str "list."]] ,[Plain [Str "It's",Space,Str "the",Space,Str "list",Space,Str "concept,",Space,Str "not",Space,Str "a",Space,Str "txt2tags",Space,Str "limitation."]] ,[Plain [Str "All",Space,Str "this",Space,Str "sublists",Space,Str "will",Space,Str "be",Space,Str "bumped",Space,Str "to",Space,Str "mother",Space,Str "lists."]] ,[Plain [Str "At",Space,Str "level",Space,Str "1,",Space,Str "like",Space,Str "this",Space,Str "one."]]] ,BulletList [[Plain [Str "Level",Space,Str "1"] ,BulletList [[Plain [Str "Level",Space,Str "2"] ,BulletList [[Plain [Str "Level",Space,Str "3"] ,BulletList [[Plain [Str "Level",Space,Str "4"]]]] ,[Plain [Str "Level",Space,Str "3",Space,Str "--",Space,Str "(closed",Space,Str "Level",Space,Str "4)"]]]] ,[Plain [Str "Level",Space,Str "2",Space,Str "--",Space,Str "(closed",Space,Str "Level",Space,Str "3)"]]]] ,[Plain [Str "Level",Space,Str "1",Space,Str "--",Space,Str "(closed",Space,Str "Level",Space,Str "2)"]]] ,BulletList [[Plain [Str "Level",Space,Str "1"] ,BulletList [[Plain [Str "Level",Space,Str "2"] ,BulletList [[Plain [Str "Level",Space,Str "3"] ,BulletList [[Plain [Str "Level",Space,Str "4"]]]]]]]] ,[Plain [Str "Level",Space,Str "1",Space,Str "--",Space,Str "(closed",Space,Str "Level",Space,Str "4,",Space,Str "Level",Space,Str "3",Space,Str "and",Space,Str "Level",Space,Str "2)"]]] ,BulletList [[Para [Str "Level",Space,Str "1"] ,BulletList [[Para [Str "Level",Space,Str "2",Space,Str "--",Space,Str "blank",Space,Str "BEFORE",Space,Str "and",Space,Str "AFTER",Space,Str "(in)"] ,BulletList [[Plain [Str "Level",Space,Str "3"]]]]]]] ,BulletList [[Plain [Str "Level",Space,Str "4"]]] ,BulletList [[Para [Str "Level",Space,Str "3"]] ,[Para [Str "Level",Space,Str "2",Space,Str "--",Space,Str "blank",Space,Str "BEFORE",Space,Str "and",Space,Str "AFTER",Space,Str "(out)"]] ,[Para [Str "Level",Space,Str "1"] ,BulletList [[Para [Str "Level",Space,Str "2",Space,Str "--",Space,Str "blank",Space,Str "BEFORE",Space,Str "(spaces)",Space,Str "and",Space,Str "AFTER",Space,Str "(TAB)"] ,BulletList [[Plain [Str "Level",Space,Str "3"]]]]]]] ,BulletList [[Plain [Str "Level",Space,Str "1"] ,BulletList [[Plain [Str "Level",Space,Str "2"] ,BulletList [[Plain [Str "Level",Space,Str "3"] ,BulletList [[Plain [Str "Level",Space,Str "4"]] ,[Plain [Str "Level",Space,Str "3.5",Space,Str "???"]]]] ,[Plain [Str "Level",Space,Str "3"]] ,[Plain [Str "Level",Space,Str "2.5",Space,Str "???"]]]] ,[Plain [Str "Level",Space,Str "2"]] ,[Plain [Str "Level",Space,Str "1.5",Space,Str "???"]]]] ,[Plain [Str "Level",Space,Str "1"]]] ,BulletList [[Plain [Str "This",Space,Str "list",Space,Str "is",Space,Str "closed",Space,Str "by",Space,Str "a",Space,Str "line",Space,Str "with",Space,Str "spaces",Space,Str "and",Space,Str "other",Space,Str "with",Space,Str "TABs"]]] ,BulletList [[Plain [Str "This",Space,Str "list",Space,Str "is",Space,Str "NOT",Space,Str "closed",Space,Str "by",Space,Str "two",Space,Str "comment",Space,Str "lines"]]] ,BulletList [[Plain [Str "This",Space,Str "list",Space,Str "is",Space,Str "closed",Space,Str "by",Space,Str "a",Space,Str "line",Space,Str "with",Space,Str "spaces",Space,Str "and",Space,Str "TAB,"]] ,[Plain [Str "then",Space,Str "a",Space,Str "comment",Space,Str "line,",Space,Str "then",Space,Str "an",Space,Str "empty",Space,Str "line."]]] ,BulletList [[Plain [Str "Level",Space,Str "1"] ,BulletList [[Plain [Str "Level",Space,Str "2"] ,BulletList [[Plain [Str "Level",Space,Str "3"]]] ,Plain [Str "-",SoftBreak,Str "Level",Space,Str "2"]]] ,Plain [Str "-",SoftBreak,Str "Level",Space,Str "1"]]] ,Para [Str "-"] ,BulletList [[Plain [Str "Empty",Space,Str "item",Space,Str "with",Space,Str "trailing",Space,Str "spaces."]]] ,Para [Str "-"] ,BulletList [[Plain [Str "Empty",Space,Str "item",Space,Str "with",Space,Str "trailing",Space,Str "TAB."]]] ,Para [Str "-"] ,BulletList [[Plain [Str "If",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "file",Space,Str "(EOF)",Space,Str "is",Space,Str "hit,"] ,BulletList [[Plain [Str "all",Space,Str "the",Space,Str "currently",Space,Str "opened",Space,Str "list",Space,Str "are",Space,Str "closed,"] ,BulletList [[Plain [Str "just",Space,Str "like",Space,Str "when",Space,Str "using",Space,Str "the",Space,Str "two",Space,Str "blank",Space,Str "lines."]]]]]]] ,Header 1 ("table",[],[]) [Str "Table"] ,Table [] [AlignRight] [0.0] [] [[[Plain [Str "Cell",Space,Str "1"]]]] ,Table [] [AlignCenter,AlignCenter,AlignRight] [0.0,0.0,0.0] [] [[[Plain [Str "Cell",Space,Str "1"]] ,[Plain [Str "Cell",Space,Str "2"]] ,[Plain [Str "Cell",Space,Str "3"]]]] ,Table [] [AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0] [] [[[Plain [Str "Cell",Space,Str "1"]] ,[Plain [Str "Cell",Space,Str "2"]] ,[Plain [Str "Cell",Space,Str "3"]]]] ,Para [Str "||",Space,Str "Cell",Space,Str "1",Space,Str "|",Space,Str "Cell",Space,Str "2",Space,Str "|",Space,Str "Cell",Space,Str "3",Space,Str "|"] ,Table [] [AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0] [] [[[Plain [Str "Cell",Space,Str "1"]] ,[Plain [Str "Cell",Space,Str "2"]] ,[Plain [Str "Cell",Space,Str "3"]]]] ,Table [] [AlignDefault,AlignCenter,AlignDefault] [0.0,0.0,0.0] [[Plain [Str "Heading"]] ,[Plain [Str "Heading"]] ,[Plain [Str "Heading"]]] [[[Plain [Str "<-"]] ,[Plain [Str "--"]] ,[Plain [Str "->"]]] ,[[Plain [Str "--"]] ,[Plain [Str "--"]] ,[Plain [Str "--"]]] ,[[Plain [Str "->"]] ,[Plain [Str "--"]] ,[Plain [Str "<-"]]]] ,Table [] [AlignDefault,AlignDefault,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0] [[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3+4"]] ,[]] [[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]] ,[Plain [Str "4"]]] ,[[Plain [Str "1+2+3"]] ,[Plain [Str "4"]] ,[] ,[]] ,[[Plain [Str "1"]] ,[Plain [Str "2+3"]] ,[Plain [Str "4"]] ,[]] ,[[Plain [Str "1+2+3+4"]] ,[] ,[] ,[]]] ,Table [] [AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0] [] [[[Plain [Str "0"]] ,[Plain [Str "1"]] ,[Plain [Str "2"]] ,[]] ,[[Plain [Str "4"]] ,[Plain [Str "5"]] ,[] ,[Plain [Str "7"]]] ,[[Plain [Str "8"]] ,[] ,[Plain [Str "A"]] ,[Plain [Str "B"]]] ,[[] ,[Plain [Str "D"]] ,[Plain [Str "E"]] ,[Plain [Str "F"]]]] ,Table [] [AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0,0.0] [] [[[Plain [Str "1"]] ,[] ,[] ,[] ,[]] ,[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[] ,[] ,[]] ,[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]] ,[] ,[]] ,[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]] ,[Plain [Str "4"]] ,[]] ,[[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]] ,[Plain [Str "4"]] ,[Plain [Str "5"]]]] ,Table [] [AlignDefault,AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0,0.0] [] [[[Plain [Str "Jan"]] ,[] ,[] ,[] ,[]] ,[[Plain [Str "Fev"]] ,[] ,[] ,[] ,[]] ,[[Plain [Str "Mar"]] ,[] ,[] ,[] ,[]] ,[[Plain [Str "Apr"]] ,[] ,[] ,[] ,[]] ,[[Plain [Str "May"]] ,[] ,[] ,[] ,[]] ,[[Plain [Str "20%"]] ,[Plain [Str "40%"]] ,[Plain [Str "60%"]] ,[Plain [Str "80%"]] ,[Plain [Str "100%"]]]] ,Table [] [AlignCenter,AlignDefault,AlignDefault,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0,0.0] [] [[[] ,[] ,[Plain [Str "/"]] ,[] ,[]] ,[[] ,[Plain [Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/"]] ,[] ,[] ,[]] ,[[Plain [Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/"]] ,[] ,[] ,[] ,[]] ,[[] ,[Plain [Str "o"]] ,[] ,[Plain [Str "o"]] ,[]] ,[[] ,[] ,[Plain [Str "."]] ,[] ,[]] ,[[] ,[Plain [Str "=",Space,Str "=",Space,Str "=",Space,Str "="]] ,[] ,[] ,[]]] ,Table [] [AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0] [] [[[Plain [Str "01"]] ,[Plain [Str "02"]] ,[] ,[] ,[Plain [Str "05"]] ,[] ,[Plain [Str "07"]] ,[]] ,[[] ,[] ,[Plain [Str "11"]] ,[] ,[Plain [Str "13"]] ,[] ,[] ,[Plain [Str "16"]]] ,[[Plain [Str "17"]] ,[] ,[Plain [Str "19"]] ,[Plain [Str "20"]] ,[] ,[] ,[Plain [Str "23"]] ,[]] ,[[Plain [Str "25"]] ,[Plain [Str "26"]] ,[] ,[] ,[Plain [Str "29"]] ,[Plain [Str "30"]] ,[] ,[Plain [Str "32"]]] ,[[] ,[] ,[Plain [Str "35"]] ,[] ,[Plain [Str "37"]] ,[] ,[Plain [Str "39"]] ,[Plain [Str "40"]]]] ,Table [] [AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0] [] [[[Plain [Str "0"]] ,[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]] ,[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]] ,[Plain [Str "7"]] ,[Plain [Str "8"]] ,[Plain [Str "9"]] ,[Plain [Str "A"]] ,[Plain [Str "B"]] ,[Plain [Str "C"]] ,[Plain [Str "D"]] ,[Plain [Str "E"]] ,[Plain [Str "F"]] ,[Plain [Str "0"]] ,[Plain [Str "1"]] ,[Plain [Str "2"]] ,[Plain [Str "3"]] ,[Plain [Str "4"]] ,[Plain [Str "5"]] ,[Plain [Str "6"]] ,[Plain [Str "7"]] ,[Plain [Str "8"]] ,[Plain [Str "9"]] ,[Plain [Str "A"]] ,[Plain [Str "B"]] ,[Plain [Str "C"]] ,[Plain [Str "D"]] ,[Plain [Str "E"]] ,[Plain [Str "F"]]]] ,Table [] [AlignCenter] [0.0] [] [[[]] ,[[]] ,[[]]] ,Para [Str "|this|is|not|a|table|"] ,Para [Str "|this|",Space,Str "is|",Space,Str "not|",Space,Str "a|",Space,Str "table|"] ,Para [Str "|this",Space,Str "|is",Space,Str "|not",Space,Str "|a",Space,Str "|table",Space,Str "|"] ,Para [Str "|",Space,Str "this\t|",Space,Str "is\t|",Space,Str "not\t|",Space,Str "a\t|",Space,Str "table\t|"] ,HorizontalRule ,Para [Str "The",Space,Str "End."]] pandoc-1.19.2.4/tests/writer.native0000644000000000000000000006554713155240143015305 0ustar0000000000000000Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Space,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("date",MetaInlines [Str "July",Space,Str "17,",Space,Str "2006"]),("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",SoftBreak,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."] ,HorizontalRule ,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 ("level-2",[],[]) [Str "Level",Space,Str "2"] ,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"] ,HorizontalRule ,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"] ,Para [Str "Here\8217s",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",SoftBreak,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",SoftBreak,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",SoftBreak,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",SoftBreak,Str "list",Space,Str "item."] ,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",SoftBreak,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,Str "here."] ,HorizontalRule ,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.",SoftBreak,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]] ,BlockQuote [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"] ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}" ,Para [Str "A",Space,Str "list:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "item",Space,Str "one"]] ,[Plain [Str "item",Space,Str "two"]]] ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"] ,BlockQuote [Para [Str "nested"]] ,BlockQuote [Para [Str "nested"]]] ,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",SoftBreak,Str ">",Space,Str "1."] ,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."] ,HorizontalRule ,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 ("lists",[],[]) [Str "Lists"] ,Header 2 ("unordered",[],[]) [Str "Unordered"] ,Para [Str "Asterisks",Space,Str "tight:"] ,BulletList [[Plain [Str "asterisk",Space,Str "1"]] ,[Plain [Str "asterisk",Space,Str "2"]] ,[Plain [Str "asterisk",Space,Str "3"]]] ,Para [Str "Asterisks",Space,Str "loose:"] ,BulletList [[Para [Str "asterisk",Space,Str "1"]] ,[Para [Str "asterisk",Space,Str "2"]] ,[Para [Str "asterisk",Space,Str "3"]]] ,Para [Str "Pluses",Space,Str "tight:"] ,BulletList [[Plain [Str "Plus",Space,Str "1"]] ,[Plain [Str "Plus",Space,Str "2"]] ,[Plain [Str "Plus",Space,Str "3"]]] ,Para [Str "Pluses",Space,Str "loose:"] ,BulletList [[Para [Str "Plus",Space,Str "1"]] ,[Para [Str "Plus",Space,Str "2"]] ,[Para [Str "Plus",Space,Str "3"]]] ,Para [Str "Minuses",Space,Str "tight:"] ,BulletList [[Plain [Str "Minus",Space,Str "1"]] ,[Plain [Str "Minus",Space,Str "2"]] ,[Plain [Str "Minus",Space,Str "3"]]] ,Para [Str "Minuses",Space,Str "loose:"] ,BulletList [[Para [Str "Minus",Space,Str "1"]] ,[Para [Str "Minus",Space,Str "2"]] ,[Para [Str "Minus",Space,Str "3"]]] ,Header 2 ("ordered",[],[]) [Str "Ordered"] ,Para [Str "Tight:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "First"]] ,[Plain [Str "Second"]] ,[Plain [Str "Third"]]] ,Para [Str "and:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "One"]] ,[Plain [Str "Two"]] ,[Plain [Str "Three"]]] ,Para [Str "Loose",Space,Str "using",Space,Str "tabs:"] ,OrderedList (1,Decimal,Period) [[Para [Str "First"]] ,[Para [Str "Second"]] ,[Para [Str "Third"]]] ,Para [Str "and",Space,Str "using",Space,Str "spaces:"] ,OrderedList (1,Decimal,Period) [[Para [Str "One"]] ,[Para [Str "Two"]] ,[Para [Str "Three"]]] ,Para [Str "Multiple",Space,Str "paragraphs:"] ,OrderedList (1,Decimal,Period) [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."] ,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\8217s",SoftBreak,Str "back."]] ,[Para [Str "Item",Space,Str "2."]] ,[Para [Str "Item",Space,Str "3."]]] ,Header 2 ("nested",[],[]) [Str "Nested"] ,BulletList [[Plain [Str "Tab"] ,BulletList [[Plain [Str "Tab"] ,BulletList [[Plain [Str "Tab"]]]]]]] ,Para [Str "Here\8217s",Space,Str "another:"] ,OrderedList (1,Decimal,Period) [[Plain [Str "First"]] ,[Plain [Str "Second:"] ,BulletList [[Plain [Str "Fee"]] ,[Plain [Str "Fie"]] ,[Plain [Str "Foe"]]]] ,[Plain [Str "Third"]]] ,Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"] ,OrderedList (1,Decimal,Period) [[Para [Str "First"]] ,[Para [Str "Second:"] ,BulletList [[Plain [Str "Fee"]] ,[Plain [Str "Fie"]] ,[Plain [Str "Foe"]]]] ,[Para [Str "Third"]]] ,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",SoftBreak,Str "indented",Space,Str "with",Space,Str "tabs"]] ,[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "spaces"] ,BulletList [[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "tabs"]] ,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "spaces"]]]]] ,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"] ,OrderedList (2,Decimal,TwoParens) [[Plain [Str "begins",Space,Str "with",Space,Str "2"]] ,[Para [Str "and",Space,Str "now",Space,Str "3"] ,Para [Str "with",Space,Str "a",Space,Str "continuation"] ,OrderedList (4,LowerRoman,Period) [[Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",SoftBreak,Str "starting",Space,Str "with",Space,Str "4"]] ,[Plain [Str "more",Space,Str "items"] ,OrderedList (1,UpperAlpha,TwoParens) [[Plain [Str "a",Space,Str "subsublist"]] ,[Plain [Str "a",Space,Str "subsublist"]]]]]]] ,Para [Str "Nesting:"] ,OrderedList (1,UpperAlpha,Period) [[Plain [Str "Upper",Space,Str "Alpha"] ,OrderedList (1,UpperRoman,Period) [[Plain [Str "Upper",Space,Str "Roman."] ,OrderedList (6,Decimal,TwoParens) [[Plain [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"] ,OrderedList (3,LowerAlpha,OneParen) [[Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]] ,Para [Str "Autonumbering:"] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "Autonumber."]] ,[Plain [Str "More."] ,OrderedList (1,DefaultStyle,DefaultDelim) [[Plain [Str "Nested."]]]]] ,Para [Str "Should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "list",Space,Str "item:"] ,Para [Str "M.A.\160\&2007"] ,Para [Str "B.",Space,Str "Williams"] ,HorizontalRule ,Header 1 ("definition-lists",[],[]) [Str "Definition",Space,Str "Lists"] ,Para [Str "Tight",Space,Str "using",Space,Str "spaces:"] ,DefinitionList [([Str "apple"], [[Plain [Str "red",Space,Str "fruit"]]]) ,([Str "orange"], [[Plain [Str "orange",Space,Str "fruit"]]]) ,([Str "banana"], [[Plain [Str "yellow",Space,Str "fruit"]]])] ,Para [Str "Tight",Space,Str "using",Space,Str "tabs:"] ,DefinitionList [([Str "apple"], [[Plain [Str "red",Space,Str "fruit"]]]) ,([Str "orange"], [[Plain [Str "orange",Space,Str "fruit"]]]) ,([Str "banana"], [[Plain [Str "yellow",Space,Str "fruit"]]])] ,Para [Str "Loose:"] ,DefinitionList [([Str "apple"], [[Para [Str "red",Space,Str "fruit"]]]) ,([Str "orange"], [[Para [Str "orange",Space,Str "fruit"]]]) ,([Str "banana"], [[Para [Str "yellow",Space,Str "fruit"]]])] ,Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"] ,DefinitionList [([Emph [Str "apple"]], [[Para [Str "red",Space,Str "fruit"] ,Para [Str "contains",Space,Str "seeds,",SoftBreak,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"]]]) ,([Emph [Str "orange"]], [[Para [Str "orange",Space,Str "fruit"] ,CodeBlock ("",[],[]) "{ orange code block }" ,BlockQuote [Para [Str "orange",Space,Str "block",Space,Str "quote"]]]])] ,Para [Str "Multiple",Space,Str "definitions,",Space,Str "tight:"] ,DefinitionList [([Str "apple"], [[Plain [Str "red",Space,Str "fruit"]] ,[Plain [Str "computer"]]]) ,([Str "orange"], [[Plain [Str "orange",Space,Str "fruit"]] ,[Plain [Str "bank"]]])] ,Para [Str "Multiple",Space,Str "definitions,",Space,Str "loose:"] ,DefinitionList [([Str "apple"], [[Para [Str "red",Space,Str "fruit"]] ,[Para [Str "computer"]]]) ,([Str "orange"], [[Para [Str "orange",Space,Str "fruit"]] ,[Para [Str "bank"]]])] ,Para [Str "Blank",Space,Str "line",Space,Str "after",Space,Str "term,",Space,Str "indented",Space,Str "marker,",Space,Str "alternate",Space,Str "markers:"] ,DefinitionList [([Str "apple"], [[Para [Str "red",Space,Str "fruit"]] ,[Para [Str "computer"]]]) ,([Str "orange"], [[Para [Str "orange",Space,Str "fruit"] ,OrderedList (1,Decimal,Period) [[Plain [Str "sublist"]] ,[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"]] ,Para [Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"] ,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") "" ,RawBlock (Format "html") "" ,RawBlock (Format "html") "" ,RawBlock (Format "html") "" ,RawBlock (Format "html") "" ,RawBlock (Format "html") "
        " ,Plain [Str "This",Space,Str "is",Space,Emph [Str "emphasized"]] ,RawBlock (Format "html") "" ,Plain [Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"]] ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "" ,Para [Str "Here\8217s",Space,Str "a",Space,Str "simple",Space,Str "block:"] ,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 ("",[],[]) "
        \n foo\n
        " ,Para [Str "As",Space,Str "should",Space,Str "this:"] ,CodeBlock ("",[],[]) "
        foo
        " ,Para [Str "Now,",Space,Str "nested:"] ,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") "" ,Para [Str "Multiline:"] ,RawBlock (Format "html") "" ,RawBlock (Format "html") "" ,Para [Str "Code",Space,Str "block:"] ,CodeBlock ("",[],[]) "" ,Para [Str "Just",Space,Str "plain",Space,Str "comment,",Space,Str "with",Space,Str "trailing",Space,Str "spaces",Space,Str "on",Space,Str "the",Space,Str "line:"] ,RawBlock (Format "html") "" ,Para [Str "Code:"] ,CodeBlock ("",[],[]) "
        " ,Para [Str "Hr\8217s:"] ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,RawBlock (Format "html") "
        " ,HorizontalRule ,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 "An",Space,Emph [Link ("",[],[]) [Str "emphasized",Space,Str "link"] ("/url","")],Str "."] ,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] ,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] ,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] ,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] ,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "",Str "."] ,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]] ,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello\160there"],Str "."] ,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",Space,Str "H",Subscript [Str "many\160of\160them"],Str "O."] ,Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",SoftBreak,Str "because",Space,Str "of",Space,Str "the",Space,Str "unescaped",Space,Str "spaces:",Space,Str "a^b",Space,Str "c^d,",Space,Str "a~b",Space,Str "c~d."] ,HorizontalRule ,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"] ,Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name."]] ,Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters."] ,Para [Quoted SingleQuote [Str "Oak,"],Space,Quoted SingleQuote [Str "elm,"],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",SoftBreak,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine."]] ,Para [Quoted SingleQuote [Str "He",Space,Str "said,",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",SoftBreak,Str "70\8217s?"] ,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code ("",[],[]) "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link ("",[],[]) [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."] ,Para [Str "Some",Space,Str "dashes:",Space,Str "one\8212two",Space,Str "\8212",Space,Str "three\8212four",Space,Str "\8212",Space,Str "five."] ,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5\8211\&7,",Space,Str "255\8211\&66,",Space,Str "1987\8211\&1999."] ,Para [Str "Ellipses\8230and\8230and\8230."] ,HorizontalRule ,Header 1 ("latex",[],[]) [Str "LaTeX"] ,BulletList [[Plain [RawInline (Format "tex") "\\cite[22-23]{smith.1899}"]] ,[Plain [Math InlineMath "2+2=4"]] ,[Plain [Math InlineMath "x \\in y"]] ,[Plain [Math InlineMath "\\alpha \\wedge \\omega"]] ,[Plain [Math InlineMath "223"]] ,[Plain [Math InlineMath "p",Str "-Tree"]] ,[Plain [Str "Here\8217s",Space,Str "some",Space,Str "display",Space,Str "math:",SoftBreak,Math DisplayMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]] ,[Plain [Str "Here\8217s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",Space,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]] ,Para [Str "These",Space,Str "shouldn\8217t",Space,Str "be",Space,Str "math:"] ,BulletList [[Plain [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]] ,[Plain [Str "$22,000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money.",Space,Str "So",Space,Str "is",Space,Str "$34,000.",SoftBreak,Str "(It",Space,Str "worked",Space,Str "if",Space,Quoted DoubleQuote [Str "lot"],Space,Str "is",Space,Str "emphasized.)"]] ,[Plain [Str "Shoes",Space,Str "($20)",Space,Str "and",Space,Str "socks",Space,Str "($5)."]] ,[Plain [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23$."]]] ,Para [Str "Here\8217s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"] ,RawBlock (Format "latex") "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}" ,HorizontalRule ,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"]] ,[Plain [Str "o",Space,Str "umlaut:",Space,Str "\246"]] ,[Plain [Str "section:",Space,Str "\167"]] ,[Plain [Str "set",Space,Str "membership:",Space,Str "\8712"]] ,[Plain [Str "copyright:",Space,Str "\169"]]] ,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."] ,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."] ,Para [Str "This",Space,Str "&",Space,Str "that."] ,Para [Str "4",Space,Str "<",Space,Str "5."] ,Para [Str "6",Space,Str ">",Space,Str "5."] ,Para [Str "Backslash:",Space,Str "\\"] ,Para [Str "Backtick:",Space,Str "`"] ,Para [Str "Asterisk:",Space,Str "*"] ,Para [Str "Underscore:",Space,Str "_"] ,Para [Str "Left",Space,Str "brace:",Space,Str "{"] ,Para [Str "Right",Space,Str "brace:",Space,Str "}"] ,Para [Str "Left",Space,Str "bracket:",Space,Str "["] ,Para [Str "Right",Space,Str "bracket:",Space,Str "]"] ,Para [Str "Left",Space,Str "paren:",Space,Str "("] ,Para [Str "Right",Space,Str "paren:",Space,Str ")"] ,Para [Str "Greater-than:",Space,Str ">"] ,Para [Str "Hash:",Space,Str "#"] ,Para [Str "Period:",Space,Str "."] ,Para [Str "Bang:",Space,Str "!"] ,Para [Str "Plus:",Space,Str "+"] ,Para [Str "Minus:",Space,Str "-"] ,HorizontalRule ,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 "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by a tab"),Str "."] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with \"quotes\" in it")] ,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")] ,Para [Link ("",[],[]) [Str "with_underscore"] ("/url/with_underscore","")] ,Para [Link ("",[],[]) [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")] ,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."] ,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 "."] ,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."] ,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "twice"] ("/url",""),Str "."] ,Para [Str "Indented",Space,Link ("",[],[]) [Str "thrice"] ("/url",""),Str "."] ,Para [Str "This",Space,Str "should",Space,Str "[not][]",Space,Str "be",Space,Str "a",Space,Str "link."] ,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 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"] ,Para [Str "Here\8217s",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\8217s",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\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."] ,Para [Str "Here\8217s",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 ("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?"]] ,[Plain [Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] ,[Plain [Str "It",Space,Str "should."]]] ,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link ("",[],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")] ,BlockQuote [Para [Str "Blockquoted:",Space,Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] ,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) ""] ,CodeBlock ("",[],[]) "or here: " ,HorizontalRule ,Header 1 ("images",[],[]) [Str "Images"] ,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"] ,Para [Image ("",[],[]) [Str "lalune"] ("lalune.jpg","fig: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 ("footnotes",[],[]) [Str "Footnotes"] ,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [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 "after",Space,Str "the",Space,Str "footnote",SoftBreak,Str "reference.",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],Space,Str "and",Space,Str "another.",Note [Para [Str "Here\8217s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",SoftBreak,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",SoftBreak,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock ("",[],[]) " { }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",SoftBreak,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],SoftBreak,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",SoftBreak,Str "contains",Space,Str "a",Space,Str "space.[^my",Space,Str "note]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note.",Note [Para [Str "This",SoftBreak,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",SoftBreak,Link ("",[],[]) [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters,",SoftBreak,Str "as",Space,Str "well",Space,Str "as",Space,Str "[bracketed",Space,Str "text]."]]] ,BlockQuote [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]] ,OrderedList (1,Decimal,Period) [[Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]]]] ,Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented."]] pandoc-1.19.2.4/tests/writers-lang-and-dir.native0000644000000000000000000000466613155240143017716 0ustar0000000000000000Pandoc (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?"]] pandoc-1.19.2.4/tests/docbook-reader.docbook0000644000000000000000000010067013155240142016765 0ustar0000000000000000
        Pandoc Test Suite 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. Headers Level 2 with an <ulink url="/url">embedded link</ulink> Level 3 with <emphasis>emphasis</emphasis> Level 4 Level 5 Hi. Level 1 Level 2 with <emphasis>emphasis</emphasis> Level 3 with no blank line Level 2 with no blank line Paragraphs Here’s a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here’s one with a bullet. * criminey. Block Quotes E-mail style:
        This is a block quote. It is pretty short.
        Code in a block quote: sub status { print "working"; } % ls A list: item one item two Nested block quotes:
        nested
        nested
        This should not be a block quote: 2 > 1. And a following paragraph.
        Code Blocks Code: ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab And: this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ Lists Unordered Asterisks loose: asterisk 1 asterisk 2 asterisk 3 Pluses loose: Plus 1 Plus 2 Plus 3 Minuses loose: Minus 1 Minus 2 Minus 3 Ordered First Second Third and using spaces: One Two Three Multiple paragraphs: Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. Item 2. Item 3. Nested Tab Tab Tab Here’s another: First Second: Fee Fie Foe Third Same thing but with paragraphs: First Second: Fee Fie Foe Third Tabs and spaces this is a list item indented with tabs this is a list item indented with spaces this is an example list item indented with tabs this is an example list item indented with spaces Fancy list markers begins with 2 and now 3 with a continuation sublist with roman numerals, starting with 4 more items a subsublist a subsublist Nesting: Upper Alpha Upper Roman. Decimal start with 6 Lower alpha with paren Autonumbering: Autonumber. More. Nested. Should not be a list item: M.A. 2007 B. Williams Callout Simple. A __letrec is equivalent to a normal Haskell &let;. &GHC; compiled the body of our list comprehension into a loop named go_s1YC. If our &case; expression matches the empty list, we return the empty list. This is reassuringly familiar. Definition Lists apple red fruit orange orange fruit banana yellow fruit Multiple blocks with italics: apple red fruit contains seeds, crisp, pleasant to taste orange orange fruit { orange code block }
        orange block quote
        Multiple definitions, loose: apple red fruit computer orange orange fruit bank Blank line after term, indented marker, alternate markers: apple red fruit computer orange orange fruit sublist sublist
        Inline Markup This is emphasized, and so is this. This is strong, and so is this. An emphasized link. This is strong and em. So is this word. This is strong and em. So is this word. This is code: >, $, \, \$, <html>. More code: Class and Type This is strikeout. Superscripts: abcd ahello ahello there. Subscripts: H2O, H23O, Hmany of themO. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. Smart quotes, ellipses, dashes Hello, said the spider. Shelob is my name. A, B, and C are letters. He said, I want to go. Were you alive in the 70’s? Some dashes: one—two — three—four — five. Dashes between numbers: 5–7, 255–66, 1987–1999. Ellipses…and…and…. e = m c 2 1 e = m c 2 e = m c 2 Special Characters Here is some unicode: I hat: Î o umlaut: ö section: § set membership: ∈ copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \ Backtick: ` Asterisk: * Underscore: _ Left brace: { Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: - Links Explicit Just a URL. URL and title. URL and title. URL and title. URL and title URL and title with_underscore nobody@nowhere.net Empty. Reference Foo bar. Foo bar. Foo bar. With embedded [brackets]. b by itself should be a link. Indented once. Indented twice. Indented thrice. This should [not][] be a link. [not]: /url Foo bar. Foo biz. With ampersands Here’s a link with an ampersand in the URL. Here’s a link with an amersand in the link text: AT&T. Here’s an inline link. Here’s an inline link in pointy braces. Autolinks With an ampersand: http://example.com/?foo=1&bar=2 In a list? http://example.com/ It should. An e-mail address: nobody@nowhere.net
        Blockquoted: http://example.com/
        Auto-links should not occur here: <http://example.com/> or here: <http://example.com/>
        Images From Voyage dans la Lune by Georges Melies (1902):
        lalune fig caption lalune alt text shadowed by fig caption
        Here is a movie icon. And here a second movie alt text icon. And here a third movie alt text icon. lalune no figure alt text
        Footnotes Here is a footnote reference, Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. and another. Here’s the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). { <code> } If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. This should not be a footnote reference, because it contains a space.[^my note] Here is an inline note. This is easier to type. Inline notes may contain links and ] verbatim characters, as well as [bracketed text].
        Notes can go in quotes. In quote.
        And in list items. In list. This paragraph should not be part of the note, as it is not indented.
        Tables Simple table with caption: Demonstration of simple table syntax. Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1
        Simple table without caption: Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1 Simple table indented two spaces: Demonstration of simple table syntax. Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1
        Multiline table with caption: Here's the caption. It may span multiple lines. Centered Header Left Aligned Right Aligned Default aligned First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows.
        Multiline table without caption: Centered Header Left Aligned Right Aligned Default aligned First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. Table without column headers: 12 12 12 12 123 123 123 123 1 1 1 1 Multiline table without column headers: First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows.
        pandoc-1.19.2.4/tests/docbook-xref.docbook0000644000000000000000000000356613155240142016475 0ustar0000000000000000 An Example Book XRef Samples This paragraph demonstrates several features of XRef. A straight link generates the cross-reference text: . A link to an element with an XRefLabel: . A link with an EndTerm: . A link to an cmdsynopsis element: . A link to an funcsynopsis element: . The Second Chapter Some content here The Third Chapter Some content here The Fourth Chapter Chapter 4 Some content here chgrp -R -H -L -P -f group file int max int int1 int int2 pandoc-1.19.2.4/tests/html-reader.html0000644000000000000000000003532513155240142015641 0ustar0000000000000000 Pandoc Test Suite

        Pandoc Test Suite

        This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite.


        Headers

        Level 2 with an embedded link

        Level 3 with emphasis

        Level 4

        Level 5

        Level 1

        Level 2 with emphasis

        Level 3

        with no blank line

        Level 2

        with no blank line


        Paragraphs

        Here's a regular paragraph.

        In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.

        Here's one with a bullet. * criminey.

        There should be a hard line break
        here.


        Block Quotes

        E-mail style:

        This is a block quote. It is pretty short.

        Code in a block quote:

        sub status {
            print "working";
        }
        

        A list:

        1. item one
        2. item two

        Nested block quotes:

        nested

        nested

        This should not be a block quote: 2 > 1.

        Box-style:

        Example:

        sub status {
            print "working";
        }
        
        1. do laundry
        2. take out the trash

        Here's a nested one:

        Joe said:

        Don't quote me.

        And a following paragraph.


        Code Blocks

        Code:

        ---- (should be four hyphens)
        
        sub status {
            print "working";
        }
        
        this code block is indented by one tab
        

        And:

            this code block is indented by two tabs
        
        These should not be escaped:  \$ \\ \> \[ \{
        

        Lists

        Unordered

        Asterisks tight:

        • asterisk 1
        • asterisk 2
        • asterisk 3

        Asterisks loose:

        • asterisk 1

        • asterisk 2

        • asterisk 3

        Pluses tight:

        • Plus 1
        • Plus 2
        • Plus 3

        Pluses loose:

        • Plus 1

        • Plus 2

        • Plus 3

        Minuses tight:

        • Minus 1
        • Minus 2
        • Minus 3

        Minuses loose:

        • Minus 1

        • Minus 2

        • Minus 3

        Ordered

        Tight:

        1. First
        2. Second
        3. Third

        and:

        1. One
        2. Two
        3. Three

        Loose using tabs:

        1. First

        2. Second

        3. Third

        and using spaces:

        1. One

        2. Two

        3. Three

        Multiple paragraphs:

        1. Item 1, graf one.

          Item 1. graf two. The quick brown fox jumped over the lazy dog's back.

        2. Item 2.

        3. Item 3.

        List styles:

                    Nested

                    • Tab
                      • Tab
                        • Tab

                    Here's another:

                    1. First
                    2. Second:
                      • Fee
                      • Fie
                      • Foe
                    3. Third

                    Same thing but with paragraphs:

                    1. First

                    2. Second:

                      • Fee
                      • Fie
                      • Foe
                    3. Third

                    Tabs and spaces

                    • this is a list item indented with tabs

                    • this is a list item indented with spaces

                      • this is an example list item indented with tabs

                      • this is an example list item indented with spaces

                    Fancy list markers

                    1. begins with 2
                    2. and now 3

                      with a continuation

                      1. sublist with roman numerals, starting with 4
                      2. more items
                        1. a subsublist
                        2. a subsublist

                    Nesting:

                    1. Upper Alpha
                      1. Upper Roman.
                        1. Decimal start with 6
                          1. Lower alpha with paren

                    Autonumbering:

                    1. Autonumber.
                    2. More.
                      1. Nested.

                    Definition

                    Violin
                    Stringed musical instrument.
                    Torture device.
                    Cello
                    Violoncello
                    Low-voiced stringed instrument.

                    Inline Markup

                    This is emphasized, and so is this.

                    This is strong, and so is this.

                    Empty and .

                    An emphasized link.

                    This is strong and em.

                    So is this word.

                    This is strong and em.

                    So is this word.

                    This is code: >, $, \, \$, <html>.

                    This is small caps.


                    Smart quotes, ellipses, dashes

                    "Hello," said the spider. "'Shelob' is my name."

                    'A', 'B', and 'C' are letters.

                    'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.'

                    'He said, "I want to go."' Were you alive in the 70's?

                    Here is some quoted 'code' and a "quoted link".

                    Some dashes: one---two --- three--four -- five.

                    Dashes between numbers: 5-7, 255-66, 1987-1999.

                    Ellipses...and. . .and . . . .


                    LaTeX

                    • \cite[22-23]{smith.1899}
                    • \doublespacing
                    • $2+2=4$
                    • $x \in y$
                    • $\alpha \wedge \omega$
                    • $223$
                    • $p$-Tree
                    • $\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: $\alpha + \omega \times x^2$.

                    These shouldn't be math:

                    • To get the famous equation, write $e = mc^2$.
                    • $22,000 is a lot of money. So is $34,000. (It worked if "lot" is emphasized.)
                    • Escaped $: $73 this should be emphasized 23$.

                    Here's a LaTeX table:

                    \begin{tabular}{|l|l|}\hline Animal & Number \\ \hline Dog & 2 \\ Cat & 1 \\ \hline \end{tabular}


                    Special Characters

                    Here is some unicode:

                    • I hat: Î
                    • o umlaut: ö
                    • section: §
                    • set membership: ∈
                    • copyright: ©

                    AT&T has an ampersand in their name.

                    AT&T is another way to write it.

                    This & that.

                    4 < 5.

                    6 > 5.

                    Backslash: \

                    Backtick: `

                    Asterisk: *

                    Underscore: _

                    Left brace: {

                    Right brace: }

                    Left bracket: [

                    Right bracket: ]

                    Left paren: (

                    Right paren: )

                    Greater-than: >

                    Hash: #

                    Period: .

                    Bang: !

                    Plus: +

                    Minus: -


                    Links

                    Explicit

                    Just a URL.

                    URL and title.

                    URL and title.

                    URL and title.

                    URL and title

                    URL and title

                    Email link (nobody [at] nowhere.net)

                    Empty.

                    Reference

                    Foo bar.

                    Foo bar.

                    Foo bar.

                    With embedded [brackets].

                    b by itself should be a link.

                    Indented once.

                    Indented twice.

                    Indented thrice.

                    This should [not] be a link.

                    [not]: /url
                    

                    Foo bar.

                    Foo biz.

                    With ampersands

                    Here's a link with an ampersand in the URL.

                    Here's a link with an amersand in the link text: AT&T.

                    Here's an inline link.

                    Here's an inline link in pointy braces.

                    Autolinks

                    With an ampersand: http://example.com/?foo=1&bar=2

                    An e-mail address: nobody [at] nowhere.net

                    Blockquoted: http://example.com/

                    Auto-links should not occur here: <http://example.com/>

                    or here: <http://example.com/>
                    

                    Images

                    From "Voyage dans la Lune" by Georges Melies (1902):

                    lalune

                    Here is a movie movie icon.


                    Footnotes

                    Here is a footnote reference(1), and another(longnote). This should not be a footnote reference, because it contains a space^(my note).

                    (1) Here is the footnote. It can go anywhere in the document, not just at the end.

                    (longnote) Here's the other note. This one contains multiple blocks.

                    Caret characters are used to indicate that the blocks all belong to a single footnote (as with block quotes).

                      { <code> }
                    

                    If you want, you can use a caret at the beginning of every line, as with blockquotes, but all that you need is a caret at the beginning of the first line of the block and any preceding blank lines.

                    text Leading space

                    Trailing space text

                    text Leading spaces

                    Trailing spaces text

                    Tables

                    Tables with Headers

                    X Y Z
                    1 2 3
                    4 5 6

                    X Y Z
                    1 2 3
                    4 5 6

                    X Y Z
                    1 2 3
                    4 5 6

                    X Y Z
                    1 2 3
                    4 5 6

                    X Y Z
                    1 2 3
                    4 5 6

                    X Y Z
                    1 2 3
                    4 5 6

                    X Y Z
                    1 2 3
                    4 5 6

                    X Y Z
                    1 2 3
                    4 5 6

                    X Y Z
                    1

                    2

                    3
                    4 5 6

                    Tables without Headers

                    1 2 3
                    4 5 6

                    1 2 3
                    4 5 6

                    1 2 3
                    4 5 6

                    1 2 3
                    4 5 6

                    Empty Tables

                    This section should be empty.

                    pandoc-1.19.2.4/tests/opml-reader.opml0000644000000000000000000000553013155240143015643 0ustar0000000000000000 States Thu, 14 Jul 2005 23:41:05 GMT Dave Winer pandoc-1.19.2.4/tests/haddock-reader.haddock0000644000000000000000000000250013155240142016710 0ustar0000000000000000This file tests the Pandoc reader for Haddock. We've borrowed examples from Haddock's documentation: . The following characters have special meanings in Haddock, \/, \', \`, \", \@, \<, so they must be escaped. \* This is a paragraph, not a list item. \> This sentence is not code. \>\>\> This is not an example. The references λ, λ and λ all represent the lower-case letter lambda. This is a code block: > map :: (a -> b) -> [a] -> [b] > map _ [] = [] > map f (x:xs) = f x : map f xs This is another code block: @ f x = x + x. The \@...\@ code block /interprets markup normally/. "Module.Foo" \"Hello World\" @ Haddock supports REPL examples: >>> fib 10 55 >>> putStrLn "foo\nbar" foo bar That was /really cool/! I had no idea @fib 10 = 55@. This module defines the type 'T'. The identifier 'M.T' is not in scope I don't have to escape my apostrophes; great, isn't it? This is a reference to the "Foo" module. This is a bulleted list: * first item * second item This is an enumerated list: (1) first item 2. second item This is a definition list: [@foo@] The description of @foo@. [@bar@] The description of @bar@. Here is a link: is a fun language! pandoc-1.19.2.4/tests/insert0000644000000000000000000000001713155240142013764 0ustar0000000000000000STUFF INSERTED pandoc-1.19.2.4/tests/lalune.jpg0000644000000000000000000003761613155240142014536 0ustar0000000000000000JFIFxxC   %# , #&')*)-0-(0%()(C   (((((((((((((((((((((((((((((((((((((((((((((((((((>!1"AQaq2#BR3br$C&S!1A ? pOj~7u .|TF~J#{4&'a\'8h6o%&)d?S5̗Wo53I!,za[ sEvܸ'@ )lq'?Nv@ 1vx,z#f}@!( QpOx0c% |fw 獣 cކ |Q\Qr ;v4J>7|3Bh'+.|g*IǮ}{Ph h% b@YP+a($恻)|*qڀG@W>Ss4ݴIbB $F[aFIb$EnW ZnֺѭeRIFV544}*/5jqȇ˾ZD1ʚ.mo!E]{odh=>Ux j ހd{UhVi Hb(nAh-3SMQlm+^/UgMYӮm@ξSn&=Qtv}iP22IQ\O}4IIH2W'.qDc6MBv~xQ| 2GAg٠BNN=(:RK'l}4 P)9ݨ-Ė$aD N3҉OzsBԺVOa%qbp}_{K]\]Ȋ l>ѭimj[@8TƎC)a"T{ \\Gn84{hXfq@rMz*@{h8 ʂ{/ أdA} ]Y ӯKNO#n|UtaZhg=f؊۞=EPvۃP7$|9'$ǭ `zQ*zsPpq7(&na^ֳ[4<81+ށWh2d*pO| z{{d'@|IA9JNP &>Sh, :Xm±WėRpcG:ގ1X+Is(k8~2p;A(8d4̀Kg2h1~mVR3Y/cSJAv>q){Uh(\jW^wt&O'('KU H6@(7)z wwh9WːH 'JnдvXkqC"Jv>e]1;ԃ[Hua.r!S^⠄랋5Ibxz>zgA"Wu H$A9#hy47͒wsbıe40PFGހF;Pϟ'>{@X EJ@rh+6!b] 'f-j 2)U@pۆsށsbhmdp㷶>tbR뵽F@v<Ο:g0pc1q}`z8hХyh,'èk Ë;uk8zOu.\^27an‚zM\ڀ6JIb䌒#sFu[WA w0X~.}#\F8E~ZBPFk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ژ/|t4JHGb+z-#\[@fA,o^1`5ތԣeb75ֳFn:Ey"Iku-5fϕW#qZCM"u2]kOo*28 \_Sw,ĉ$1'V\ g`H|;SB+,@'8 \O=@(w?JOFP-ʌ}j? s@pF{˜h'Kڤ@vRIGl@&H#4h g@phM<{ $g2ۈE1P`9P&2yh #H=@[ yPn!@"8wPߜo(y "=G&cF 4rc@``ǁP$ ׵qC.]NodNH{P;N9X3 #0^2 LZ+ {hq(w1总ݻ1(7df$<%!%NO!榀۞x)F=tJl8WDZ7+yN9 $$ G hQst9L#zP@o6(7s;(~S@H ##<WnzCw'(p9T`ځPpandoc-1.19.2.4/tests/movie.jpg0000644000000000000000000000202613155240142014360 0ustar0000000000000000JFIFHHPThis art is in the public domain. Kevin Hughes, kevinh@eit.com, September 1995CC"  # 9v& !146QTqtu ? f* j81sE+oWmFd3ݕO.-IwSIʑ} [s}S6OʚHkzu:"mlE$WEQևuu{:N1+AX~$C0 AaMFQ:vhc(cRp߰_[6e*Ҏ"Ec?GD< [I { )FqSGȑ_J Xaq^j #}r4ىRNFd5e61U~=30$ jФy7[ ZtaǣSP16`ղO0Y_aw:Q#Qu}9_89 5 n*QoPPödv:ɅhfW(DT r.\hHbU>SӶQ߭z:Ȱ)Xˠ*%up9#>jLJ>ֲ4"}}FإZ>]+# *n./< % $ebR3jܤP]=N ~OǏໞXBI,_~pandoc-1.19.2.4/tests/media/rId25.jpg0000644000000000000000000000246413155240142015213 0ustar0000000000000000JFIFxxC   %# , #&')*)-0-(0%()(C   (((((((((((((((((((((((((((((((((((((((((((((((((((221!1Q"Aaq#$23Bb ?"Ku-}_:\{ i˧\ z%0Z|E Ei%T!ϠeI=: ÕHlWҳgh2O /1 qeHxvN joHEd|fI!brq1JeôJUU="Dj#lM;9_5 񬁹0>PI$:h>RB>X) ]?xSGب姥yuQr'Tv#mqU[_ZlWS0Ɍ:ǹA:s;H }|U<0SMDnLf :qM1UTZNX$Ùi]cGZFQjUPߣvMAYyM憵bIOd W.*j^2hj-= s6CU pq\(mI4a"DN9zÂf"hpe#;Ol~A~PY C?TAu~'l59m4N{~)knz󂭎$L.dPH79` ;jOv!D;>gml Z:b3v''>[mdC򖞦hxFf lzc;$W}6nƉu 0ƨnIm'ԤyH*('adeKU+*Ȋ ԖI;gu` =ƨ,74  (~f8ז d:7:*N1\i[ )Tq=S2q s]kp٘+\'7OsA))ir_p! 92TET,r$AVtXnB$:"z ~O}pandoc-1.19.2.4/tests/media/rId26.jpg0000644000000000000000000000246413155240142015214 0ustar0000000000000000JFIFxxC   %# , #&')*)-0-(0%()(C   (((((((((((((((((((((((((((((((((((((((((((((((((((221!1Q"Aaq#$23Bb ?"Ku-}_:\{ i˧\ z%0Z|E Ei%T!ϠeI=: ÕHlWҳgh2O /1 qeHxvN joHEd|fI!brq1JeôJUU="Dj#lM;9_5 񬁹0>PI$:h>RB>X) ]?xSGب姥yuQr'Tv#mqU[_ZlWS0Ɍ:ǹA:s;H }|U<0SMDnLf :qM1UTZNX$Ùi]cGZFQjUPߣvMAYyM憵bIOd W.*j^2hj-= s6CU pq\(mI4a"DN9zÂf"hpe#;Ol~A~PY C?TAu~'l59m4N{~)knz󂭎$L.dPH79` ;jOv!D;>gml Z:b3v''>[mdC򖞦hxFf lzc;$W}6nƉu 0ƨnIm'ԤyH*('adeKU+*Ȋ ԖI;gu` =ƨ,74  (~f8ז d:7:*N1\i[ )Tq=S2q s]kp٘+\'7OsA))ir_p! 92TET,r$AVtXnB$:"z ~O}pandoc-1.19.2.4/tests/media/rId27.jpg0000644000000000000000000000246413155240142015215 0ustar0000000000000000JFIFxxC   %# , #&')*)-0-(0%()(C   (((((((((((((((((((((((((((((((((((((((((((((((((((221!1Q"Aaq#$23Bb ?"Ku-}_:\{ i˧\ z%0Z|E Ei%T!ϠeI=: ÕHlWҳgh2O /1 qeHxvN joHEd|fI!brq1JeôJUU="Dj#lM;9_5 񬁹0>PI$:h>RB>X) ]?xSGب姥yuQr'Tv#mqU[_ZlWS0Ɍ:ǹA:s;H }|U<0SMDnLf :qM1UTZNX$Ùi]cGZFQjUPߣvMAYyM憵bIOd W.*j^2hj-= s6CU pq\(mI4a"DN9zÂf"hpe#;Ol~A~PY C?TAu~'l59m4N{~)knz󂭎$L.dPH79` ;jOv!D;>gml Z:b3v''>[mdC򖞦hxFf lzc;$W}6nƉu 0ƨnIm'ԤyH*('adeKU+*Ȋ ԖI;gu` =ƨ,74  (~f8ז d:7:*N1\i[ )Tq=S2q s]kp٘+\'7OsA))ir_p! 92TET,r$AVtXnB$:"z ~O}pandoc-1.19.2.4/tests/latex-reader.latex0000644000000000000000000003130313155240142016153 0ustar0000000000000000\documentclass{article} \usepackage[mathletters]{ucs} \usepackage[utf8x]{inputenc} \setlength{\parindent}{0pt} \setlength{\parskip}{6pt plus 2pt minus 1pt} \newcommand{\textsubscript}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}} \usepackage[breaklinks=true,unicode=true]{hyperref} \usepackage[normalem]{ulem} % avoid problems with \sout in headers with hyperref: \pdfstringdefDisableCommands{\renewcommand{\sout}{}} \usepackage{enumerate} \usepackage{fancyvrb} \usepackage{graphicx} \usepackage{url} \setcounter{secnumdepth}{0} \VerbatimFootnotes % allows verbatim text in footnotes \title{Pandoc Test Suite} \author{John MacFarlane \and Anonymous} \date{July 17, 2006} \begin{document} \maketitle This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite. \begin{center}\rule{3in}{0.4pt}\end{center} \section{Headers} \subsection{Level 2 with an \href{/url}{embedded link}} \subsubsection{Level 3 with \emph{emphasis}} Level 4 Level 5 \section[alt title ignored]{Level 1} \subsection{Level 2 with \emph{emphasis}} \subsubsection{Level 3} with no blank line \subsection{Level 2} with no blank line \begin{center}\rule{3in}{0.4pt}\end{center} \section{Paragraphs} Here's a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here's one with a bullet. * criminey. There should be a hard line break\\here. \begin{center}\rule{3in}{0.4pt}\end{center} \section{Block Quotes} E-mail style: \begin{quote} This is a block quote. It is pretty short. \end{quote} \begin {quote} Code in a block quote: \begin{verbatim} sub status { print "working"; } \end{verbatim} A list: \begin{enumerate}[1.] \item item one \item item two \end{enumerate} Nested block quotes: \begin{quote} nested \end{quote} \begin{quote} nested \end{quote} \end{quote} This should not be a block quote: 2 \textgreater{} 1. Box-style: \begin{quote} Example: \begin{verbatim} sub status { print "working"; } \end{verbatim} \end{quote} \begin{quote} \begin{enumerate}[1.] \item do laundry \item take out the trash \end{enumerate} \end{quote} Here's a nested one: \begin{quote} Joe said: \begin{quote} Don't quote me. \end{quote} \end{quote} And a following paragraph. \begin{center}\rule{3in}{0.4pt}\end{center} \section{Code Blocks} Code: \begin{verbatim} ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab \end{verbatim} And: \begin{verbatim} this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ \end{verbatim} \begin{obeylines} this has \emph{two lines} \end{obeylines} \begin{center}\rule{3in}{0.4pt}\end{center} \section{Lists} \subsection{Unordered} Asterisks tight: \begin{itemize} \item asterisk 1 \item asterisk 2 \item asterisk 3 \end{itemize} Asterisks loose: \begin{itemize} \item asterisk 1 \item asterisk 2 \item asterisk 3 \end{itemize} Pluses tight: \begin{itemize} \item Plus 1 \item Plus 2 \item Plus 3 \end{itemize} Pluses loose: \begin{itemize} \item Plus 1 \item Plus 2 \item Plus 3 \end{itemize} Minuses tight: \begin{itemize} \item Minus 1 \item Minus 2 \item Minus 3 \end{itemize} Minuses loose: \begin{itemize} \item Minus 1 \item Minus 2 \item Minus 3 \end{itemize} \subsection{Ordered} Tight: \begin{enumerate}[1.] \item First \item Second \item Third \end{enumerate} and: \begin{enumerate}[1.] \item One \item Two \item Three \end{enumerate} Loose using tabs: \begin{enumerate}[1.] \item First \item Second \item Third \end{enumerate} and using spaces: \begin{enumerate}[1.] \item One \item Two \item Three \end{enumerate} Multiple paragraphs: \begin{enumerate}[1.] \item Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog's back. \item Item 2. \item Item 3. \end{enumerate} \subsection{Nested} \begin{itemize} \item Tab \begin{itemize} \item Tab \begin{itemize} \item Tab \end{itemize} \end{itemize} \end{itemize} Here's another: \begin{enumerate}[1.] \item First \item Second: \begin{itemize} \item Fee \item Fie \item Foe \end{itemize} \item Third \end{enumerate} Same thing but with paragraphs: \begin{enumerate}[1.] \item First \item Second: \begin{itemize} \item Fee \item Fie \item Foe \end{itemize} \item Third \end{enumerate} \subsection{Tabs and spaces} \begin{itemize} \item this is a list item indented with tabs \item this is a list item indented with spaces \begin{itemize} \item this is an example list item indented with tabs \item this is an example list item indented with spaces \end{itemize} \end{itemize} \subsection{Fancy list markers} \begin{enumerate}[(1)] \setcounter{enumi}{1} \item begins with 2 \item and now 3 with a continuation \begin{enumerate}[i.] \setcounter{enumii}{3} \item sublist with roman numerals, starting with 4 \item more items \begin{enumerate}[(A)] \item a subsublist \item a subsublist \end{enumerate} \end{enumerate} \end{enumerate} Nesting: \begin{enumerate}[A.] \item Upper Alpha \begin{enumerate}[I.] \item Upper Roman. \begin{enumerate}[(1)] \setcounter{enumiii}{5} \item Decimal start with 6 \begin{enumerate}[a)] \setcounter{enumiv}{2} \item Lower alpha with paren \end{enumerate} \end{enumerate} \end{enumerate} \end{enumerate} Autonumbering: \begin{enumerate} \item Autonumber. \item More. \begin{enumerate} \item Nested. \end{enumerate} \end{enumerate} Should not be a list item: M.A. 2007 B. Williams \begin{center}\rule{3in}{0.4pt}\end{center} \section{Definition Lists} Tight using spaces: \begin{description} \item[apple] red fruit \item[orange] orange fruit \item[banana] yellow fruit \end{description} Tight using tabs: \begin{description} \item[apple] red fruit \item[orange] orange fruit \item[banana] yellow fruit \end{description} Loose: \begin{description} \item[apple] red fruit \item[orange] orange fruit \item[banana] yellow fruit \end{description} Multiple blocks with italics: \begin{description} \item[\emph{apple}] red fruit contains seeds, crisp, pleasant to taste \item[\emph{orange}] orange fruit \begin{verbatim} { orange code block } \end{verbatim} \begin{quote} orange block quote \end{quote} \end{description} \section{HTML Blocks} Simple block on one line: foo And nested without indentation: foo bar Interpreted markdown in a table: This is \emph{emphasized} And this is \textbf{strong} Here's a simple block: foo This should be a code block, though: \begin{verbatim}
                    foo
                    \end{verbatim} As should this: \begin{verbatim}
                    foo
                    \end{verbatim} Now, nested: foo This should just be an HTML comment: Multiline: Code block: \begin{verbatim} \end{verbatim} Just plain comment, with trailing spaces on the line: Code: \begin{verbatim}
                    \end{verbatim} Hr's: \begin{center}\rule{3in}{0.4pt}\end{center} \section{Inline Markup} This is \emph{emphasized}, and so \emph{is this}. This is \textbf{strong}, and so \textbf{is this}. An \emph{\href{/url}{emphasized link}}. \textbf{\emph{This is strong and em.}} So is \textbf{\emph{this}} word. \textbf{\emph{This is strong and em.}} So is \textbf{\emph{this}} word. This is code: \verb!>!, \verb!$!, \verb!\!, \verb!\$!, \verb!!. \sout{This is \emph{strikeout}.} Superscripts: a\textsuperscript{bc}d a\textsuperscript{\emph{hello}} a\textsuperscript{hello there}. Subscripts: H\textsubscript{2}O, H\textsubscript{23}O, H\textsubscript{many of them}O. These should not be superscripts or subscripts, because of the unescaped spaces: a\^{}b c\^{}d, a\ensuremath{\sim}b c\ensuremath{\sim}d. \begin{center}\rule{3in}{0.4pt}\end{center} \section{Smart quotes, ellipses, dashes} ``Hello,'' said the spider. ``\,`Shelob' is my name.'' `A', `B', and `C' are letters. `Oak,' `elm,' and `beech' are names of trees. So is `pine.' `He said, ``I want to go.''\,' Were you alive in the 70's? Here is some quoted `\verb!code!' and a ``\href{http://example.com/?foo=1&bar=2}{quoted link}''. Some dashes: one---two---three---four---five. Dashes between numbers: 5--7, 255--66, 1987--1999. Ellipses\ldots{}and\ldots{}and\ldots{}. \begin{center}\rule{3in}{0.4pt}\end{center} \section{LaTeX} \begin{itemize} \item \cite[22-23]{smith.1899} \item \doublespacing \item $2+2=4$ \item $x \in y$ \item $\alpha \wedge \omega$ \item $223$ \item $p$-Tree \item $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$ \item Here's one that has a line break in it: $\alpha + \omega \times x^2$. \end{itemize} These shouldn't be math: \begin{itemize} \item To get the famous equation, write \verb!$e = mc^2$!. \item \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if ``lot'' is emphasized.) \item Escaped \verb!$!: \$73 \emph{this should be emphasized} 23\$. \end{itemize} Here's a LaTeX table: \begin{tabular}{|l|l|}\hline Animal & Number \\ \hline Dog & 2 \\ Cat & 1 \\ \hline \end{tabular} A table with one column: \begin{tabular}{c} Animal \\ Vegetable \end{tabular} \begin{center}\rule{3in}{0.4pt}\end{center} \section{Special Characters} Here is some unicode: \begin{itemize} \item I hat: Î \item o umlaut: ö \item section: § \item set membership: ∈ \item copyright: © \end{itemize} AT\&T has an ampersand in their name. AT\&T is another way to write it. This \& that. 4 \textless{} 5. 6 \textgreater{} 5. Backslash: \textbackslash{} Backtick: ` Asterisk: * Underscore: \_ Left brace: \{ Right brace: \} Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: \textgreater{} Hash: \# Period: . Bang: ! Plus: + Minus: - \begin{center}\rule{3in}{0.4pt}\end{center} \section{Links} \subsection{Explicit} Just a \href{/url/}{URL}. \href{/url/}{URL and title}. \href{/url/}{URL and title}. \href{/url/}{URL and title}. \href{/url/}{URL and title} \href{/url/}{URL and title} \href{/url/with_underscore}{with\_underscore} \href{mailto:nobody@nowhere.net}{Email link} \href{}{Empty}. \subsection{Reference} Foo \href{/url/}{bar}. Foo \href{/url/}{bar}. Foo \href{/url/}{bar}. With \href{/url/}{embedded [brackets]}. \href{/url/}{b} by itself should be a link. Indented \href{/url}{once}. Indented \href{/url}{twice}. Indented \href{/url}{thrice}. This should [not][] be a link. \begin{verbatim} [not]: /url \end{verbatim} Foo \href{/url/}{bar}. Foo \href{/url/}{biz}. \subsection{With ampersands} Here's a \href{http://example.com/?foo=1&bar=2}{link with an ampersand in the URL}. Here's a link with an amersand in the link text: \href{http://att.com/}{AT\&T}. Here's an \href{/script?foo=1&bar=2}{inline link}. Here's an \href{/script?foo=1&bar=2}{inline link in pointy braces}. \subsection{Autolinks} With an ampersand: \url{http://example.com/?foo=1&bar=2} \begin{itemize} \item In a list? \item \url{http://example.com/} \item It should. \end{itemize} An e-mail address: \href{mailto:nobody@nowhere.net}{nobody@nowhere.net} \begin{quote} Blockquoted: \url{http://example.com/} \end{quote} Auto-links should not occur here: \verb!! \begin{verbatim} or here: \end{verbatim} \begin{center}\rule{3in}{0.4pt}\end{center} \section{Images} From ``Voyage dans la Lune'' by Georges Melies (1902): \includegraphics{lalune.jpg} Here is a movie \includegraphics{movie.jpg} icon. \begin{center}\rule{3in}{0.4pt}\end{center} \section{Footnotes} Here is a footnote reference,\footnote{ Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. } and another.\footnote{ Here's the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). \begin{Verbatim} { } \end{Verbatim} If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. } This should \emph{not} be a footnote reference, because it contains a space.[\^{}my note] Here is an inline note.\footnote{ This is \emph{easier} to type. Inline notes may contain \href{http://google.com}{links} and \verb!]! verbatim characters, as well as [bracketed text]. } \begin{quote} Notes can go in quotes.\footnote{ In quote. } \end{quote} \begin{enumerate}[1.] \item And in list items.\footnote{ In list. } \end{enumerate} This paragraph should not be part of the note, as it is not indented. \section{Escaped characters} \$ \% \& \# \_ \{ \} \end{document} pandoc-1.19.2.4/tests/textile-reader.textile0000644000000000000000000001017613155240143017063 0ustar0000000000000000This is a set of tests for pandoc Textile Reader. Part of it comes from John Gruber's markdown test suite. ----- h1. Headers h2. Level 2 with an "embeded link":http://www.example.com h3. Level 3 with *emphasis* h4. Level 4 h5. Level 5 h6. Level 6 h1. Paragraphs Here's a regular paragraph. Line breaks are preserved in textile, so you can not wrap your very long paragraph with your favourite text editor and have it rendered with no break. Here's one with a bullet. * criminey. There should be a paragraph break between here and here. pandoc converts textile. h1. Block Quotes bq. This is a famous quote from somebody. He had a lot of things to say, so the text is really really long and spans on multiple lines. And a following paragraph. h1. Code Blocks Code:
                        ---- (should be four hyphens)
                    
                        sub status {
                            print "working";
                        }
                    
                    	this code block is indented by one tab
                    
                    And:
                    		this code block is indented by two tabs
                    
                        These should not be escaped:  \$ \\ \> \[ \{
                    
                    bc. Code block with .bc continued @@, @. h1. Notextile A block of text can be protected with notextile : No *bold* and * no bullet and inlines can be protected with ==double *equals (=)* markup==. h1. Lists h2. Unordered Asterisks tight: * asterisk 1 * asterisk 2 * asterisk 3 With line breaks: * asterisk 1 newline * asterisk 2 h2. Ordered Tight: # First # Second # Third h2. Nested * ui 1 ** ui 1.1 ### oi 1.1.1 ### oi 1.1.2 ** ui 1.2 * ui 2 ## oi 2.1 *** ui 2.1.1 *** ui 2.1.2 h2. Issue #1500 * one * two -> and more h2. Issue #1513 List: * one * two h2. Definition List - coffee := Hot and black - tea := Also hot, but a little less black - milk := Nourishing beverage for baby cows. Cold drink that goes great with cookies.=: - beer := fresh and bitter h1. Inline Markup This is _emphasized_, and so __is this__. This is *strong*, and so **is this**. Hyphenated-words-are-ok, as well as strange_underscore_notation. A "*strong link*":http://www.foobar.com. _*This is strong and em.*_ So is *_this_* word and __**that one**__. -This is strikeout and *strong*- Superscripts: a[^bc^]d a ^*hello*^ a[^hello there^]. Subscripts: ~here~ H[ ~2~]O, H[ ~23~]O, H[ ~many of them~]O. Dashes : How cool -- automatic dashes. Elipses : He thought and thought ... and then thought some more. Quotes and apostrophes : "I'd like to thank you" for example. h1. Links h2. Explicit Just a "url":http://www.url.com "Email link":mailto:nobody@nowhere.net "not a link": foo Automatic linking to "$":http://www.example.com. "Example":http://www.example.com/: Example of a link followed by a colon. A link["with brackets":http://www.example.com]and no spaces. h1. Tables Textile allows tables with and without headers : h2. Without headers | name | age | sex | | joan | 24 | f | | archie | 29 | m | | bella | 45 | f | and some text following ... h2. With headers |_. name |_. age |_. sex | | joan | 24 | f | | archie | 29 | m | | bella | 45 | f | h1. Images Textile inline image syntax, like here !this_is_an_image.png(this is the alt text)! and here !this_is_an_image.png!. h1. Attributes h2[en]{color:red}(foo bar #ident). HTML and CSS attributes are parsed in headers. h2=. Centered h2>. Right h2<>{color:blue}[en]. Justified as well as *(foo)inline attributes* of %{color:red}all kind% p{color:green}. and paragraph attributes, and table attributes. table{foo:bar}. | name | age | sex | | joan | 24 | f | _(class#id) emph_ _(no class#id) emph_ h1. Entities * & h1. Raw HTML However, raw HTML inlines are accepted, as well as :
                    any *Raw HTML Block* with bold
                    Html blocks can
                    interrupt paragraphs
                    as well. Can you prove that 2 < 3 ? h1. Acronyms and marks PBS(Public Broadcasting System) Hi(tm) Hi (TM) (r) Hi(r) Hi(c)2008 (C) 2008 h1. Footnotes A note.[1] Another note[2]. fn1. The note is here! fn2. Other note. h1. Comment blocks ###. my comment is here. not a comment. pandoc-1.19.2.4/tests/markdown-reader-more.txt0000644000000000000000000001253213155240142017325 0ustar0000000000000000% Title spanning multiple lines % Author One Author Two; Author Three; Author Four # Additional markdown reader tests ## Blank line before URL in link reference [foo] and [bar] [foo]: /url [bar]: /url "title" ## Raw ConTeXt environments \placeformula \startformula L_{1} = L_{2} \stopformula \start[a2] \start[a2] \stop[a2] \stop[a2] ## Raw LaTeX environments \begin{center} \begin{tikzpicture}[baseline={([yshift=+-.5ex]current bounding box.center)}, level distance=24pt] \Tree [.{S} [.NP John\index{i} ] [.VP [.V likes ] [.NP himself\index{i,*j} ]]] \end{tikzpicture} \end{center} ## URLs with spaces and punctuation [foo](/bar and baz) [foo](/bar and baz ) [foo]( /bar and baz ) [foo](bar baz "title" ) [baz][] [bam][] [bork][] [baz]: /foo foo [bam]: /foo fee [bork]: /foo/zee zob (title) [Ward's method.](http://en.wikipedia.org/wiki/Ward's_method) ## Horizontal rules with spaces at end * * * * * -- - -- -- - ## Raw HTML before header ### my header ## $ in math $\$2 + \$3$ $x = \text{the $n$th root of $y$}$ This should not be math: $PATH 90 $PATH ## Commented-out list item - one - three ## Indented code at beginning of list - code code 1. code code 12345678. code code - code code - no code ## Backslash newline hi\ there ## Code spans `hi\` `hi there` `` hi````there `` `hi there` ## Multilingual URLs [foo](/bar/测?x=测 "title") <测@foo.测.baz> ## Numbered examples (@) First example. (@foo) Second example. Explanation of examples (@foo) and (@bar). (@bar) Third example. ## Macros \newcommand{\tuple}[1]{\langle #1 \rangle} $\tuple{x,y}$ ## Case-insensitive references [Fum] [FUM] [bat] [fum]: /fum [BAT]: /bat ## Curly smart quotes “Hi” ‘Hi’ ## Consecutive lists - one - two 1. one 2. two a. one b. two ## Implicit header references ### My header ### My other header A link to [My header]. Another link to [it][My header]. Should be [case insensitive][my header]. Link to [Explicit header attributes]. [my other header]: /foo But this is not a link to [My other header], since the reference is defined. ## Explicit header attributes {#foobar .baz key="val"} > ## Header attributes inside block quote {#foobar .baz key="val"} ## Line blocks | But can a bee be said to be | or not to be an entire bee, | when half the bee is not a bee, | due to some ancient injury? | | Continuation line | and another ## Grid Tables +------------------+-----------+------------+ | col 1 | col 2 | col 3 | +==================+===========+============+ | r1 a | b | c | | r1 bis | b 2 | c 2 | +------------------+-----------+------------+ | r2 d | e | f | +------------------+-----------+------------+ Headless +------------------+-----------+------------+ | r1 a | b | c | | r1 bis | b 2 | c 2 | +------------------+-----------+------------+ | r2 d | e | f | +------------------+-----------+------------+ With alignments +------------------+-----------+------------+ | col 1 | col 2 | col 3 | +=================:+:==========+:==========:+ | r1 a | b | c | | r1 bis | b 2 | c 2 | +------------------+-----------+------------+ | r2 d | e | f | +------------------+-----------+------------+ Headless with alignments +-----------------:+:----------+:----------:+ | r1 a | b | c | | r1 bis | b 2 | c 2 | +------------------+-----------+------------+ | r2 d | e | f | +------------------+-----------+------------+ Spaces at ends of lines +------------------+-----------+------------+ | r1 a | b | c | | r1 bis | b 2 | c 2 | +------------------+-----------+------------+ | r2 d | e | f | +------------------+-----------+------------+ Multiple blocks in a cell +------------------+-----------+------------+ | # col 1 | # col 2 | # col 3 | | col 1 | col 2 | col 3 | +------------------+-----------+------------+ | r1 a | - b | c | | | - b 2 | c 2 | | r1 bis | - b 2 | c 2 | +------------------+-----------+------------+ Empty cells +---+---+ | | | +---+---+ ## Entities in links and titles [link](/ürl "öö!") [foobar] [foobar]: /ürl "öö!" ## Parentheses in URLs [link](/hi(there)) [link](/hithere\)) [linky] [linky]: hi_(there_(nested)) ## Backslashes in link references [\*\a](b) ## Reference link fallbacks [*not a link*] [*nope*]... ## Reference link followed by a citation MapReduce is a paradigm popularized by [Google] [@mapreduce] as its most vocal proponent. [Google]: http://google.com ## Empty reference links [foo2]: bar [foo2] ## Wrapping shouldn't introduce new list items - blah blah blah blah blah blah blah blah blah blah blah blah blah blah 2015. ## Bracketed spans [*foo* bar baz [link](url)]{.class #id key=val} pandoc-1.19.2.4/tests/markdown-citations.txt0000644000000000000000000000157213155240142017122 0ustar0000000000000000Pandoc with citeproc-hs ======================= - [@nonexistent] - @nonexistent - @item1 says blah. - @item1 [p. 30] says blah. - @item1 [p. 30, with suffix] says blah. - @item1 [-@item2 p. 30; see also @пункт3] says blah. - In a note.[^1] - A citation group [see @item1 chap. 3; also @пункт3 p. 34-35]. - Another one [see @item1 p. 34-35]. - And another one in a note.[^2] - Citation with a suffix and locator [@item1 pp. 33, 35-37, and nowhere else]. - Citation with suffix only [@item1 and nowhere else]. - Now some modifiers.[^3] - With some markup [*see* @item1 p. **32**]. References ========== [^1]: @пункт3 [p. 12] and a citation without locators [@пункт3]. [^2]: Some citations [see @item1 chap. 3; @пункт3; @item2]. [^3]: Like a citation without author: [-@item1], and now Doe with a locator [-@item2 p. 44]. pandoc-1.19.2.4/tests/mediawiki-reader.wiki0000644000000000000000000001136313155240142016633 0ustar0000000000000000= header = == header level two == ===header level 3=== ====header ''level'' four==== ===== header level 5 ===== ====== header level 6 ====== ======= not a header ======== == not a header == == emph and strong == ''emph'' '''strong''' '''''strong and emph''''' '''''emph inside'' strong''' '''strong with ''emph''''' '''''strong inside''' emph'' == horizontal rule == top ---- bottom ---- == nowiki == ''not emph'' == strikeout == This is ''struck out'' == entities == hi & low hi & low Gödel ̉પ == comments == inline comment between blocks == linebreaks == hi
                    there hi
                    there == : indents == hi : there bud hi :: there bud == p tags == hi there

                    bud

                    another

                    == raw html == hi ''there''. inserted
                    hi ''there''
                    == sup, sub, del == H2O base''exponent'' hello == inline code == *→* typed >>= == code blocks ==
                    case xs of
                         (_:_) -> reverse xs
                         []    -> ['*']
                    
                    case xs of (_:_) -> reverse xs [] -> ['*'] widgets.each do |w| print w.price end == block quotes == Regular paragraph
                    This is a block quote. With two paragraphs.
                    Nother paragraph. == external links == [http://google.com ''Google'' search engine] http://pandoc.org [http://google.com] [http://yahoo.com] [mailto:info@example.org email me] == internal links == [[Help]] [[Help|the help page]] [[Help]]ers [[Help]]ers [[Help:Contents|]] [[#My anchor]] [[Page#with anchor|and text]] == images == [[File:example.jpg|caption]] [[File:example.jpg|border|the ''caption'' with [http://google.com external link]]] [[File:example.jpg|frameless|border|30x40px|caption]] [[File:example.jpg|frameless|border|30px|caption]] [[File:example.jpg|page=4|30px|border|caption]] [[File:example.jpg]] [[Archivo:example_es.jpg]] == lists == * Start each line * with an asterisk (*). ** More asterisks gives deeper *** and deeper levels. * Line breaks
                    don't break levels. *** But jumping levels creates empty space. Any other start ends the list. ** two * one # Start each line # with a number sign (#). ## More number signs gives deeper ### and deeper ### levels. # Line breaks
                    don't break levels. ### But jumping levels creates empty space. # Blank lines # end the list and start another. Any other start also ends the list. ;item 1 : definition 1 ;item 2 : definition 2-1 : definition 2-2 # one # two #* two point one #* two point two # three #; three item one #: three def one # four #: four def one #: this looks like a continuation #: and is often used #: instead
                    of
                    # {{{template |author=John |title=My Book }}} ## five sub 1 ### five sub 1 sub 1 ## five sub 2
                    1. list item ''emph''
                      1. list item B1
                      2. list item B2
                      continuing list item A1
                    2. list item A2
                      #abc #def #ghi
                    1. Amsterdam
                    2. Rotterdam
                    3. The Hague
                    == math == Here is some x=\frac{y^\pi}{z}. With spaces: x=\frac{y^\pi}{z} . == preformatted blocks == Start each line with a space. Text is '''preformatted''' and ''markups'' '''''can''''' be done. hell yeah Start with a space in the first column, (before the ). Then your block format will be maintained. This is good for copying in code blocks: def function(): """documentation string""" if True: print True else: print False Not
                    preformatted Don't need a blank line around a preformatted block. == templates == {{Welcome}} {{Foo:Bar}} {{Thankyou|all your effort|Me}} Written {{{date}}} by {{{name}}}. == tables == {| |- |Orange |Apple |- |Bread |Pie |- |Butter |Ice cream |} {| |+Food complements !Orange !Apple |- |Bread |Pie |- !Butter |Ice cream |} {| |+Food complements !Orange !Apple |- |Bread and cheese |Pie # apple # carrot |} {| | Orange || Apple || more |- | Bread || Pie || more |- | Butter || Ice cream || and more |} {|width=50% ! align="left" width="50%"| Left ! align="right"|Right ! align="center"|Center |- | left || 15.00 || centered |- | more || 2.0 || more |} {| |- |Orange |Apple |- |Bread | {| !fruit !topping |- |apple |ice cream |} |- |Butter |Ice cream |} {| |Orange |}Paragraph after the table. {| !fruit !topping |- |apple |ice cream |} == notes == My note!This. URL note.http://docs.python.org/library/functions.html#range pandoc-1.19.2.4/tests/rst-reader.rst0000644000000000000000000002077713155240143015357 0ustar0000000000000000Pandoc Test Suite ################# Subtitle ^^^^^^^^ :Authors: John MacFarlane; Anonymous :Date: July 17, 2006 :Revision: 3 Level one header ================ This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite. Level two header ---------------- Level three +++++++++++ Level four with *emphasis* ~~~~~~~~~~~~~~~~~~~~~~~~~~ Level five '''''''''' Paragraphs ========== Here's a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here's one with a bullet. * criminey. Horizontal rule: ----- Another: **** Block Quotes ============ Here's a block quote: This is a block quote. It is pretty short. Here's another, differently indented: This is a block quote. It's indented with a tab. Code in a block quote:: sub status { print "working"; } List in a block quote: 1. item one 2. item two Nested block quotes: nested nested Code Blocks =========== Code: :: ---- (should be four hyphens) sub status { print "working"; } :: this code block is indented by one tab And:: this block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ And: .. code-block:: python def my_function(x): return x + 1 Lists ===== Unordered --------- Asterisks tight: * asterisk 1 * asterisk 2 * asterisk 3 Asterisks loose: * asterisk 1 * asterisk 2 * asterisk 3 Pluses tight: + Plus 1 + Plus 2 + Plus 3 Pluses loose: + Plus 1 + Plus 2 + Plus 3 Minuses tight: - Minus 1 - Minus 2 - Minus 3 Minuses loose: - Minus 1 - Minus 2 - Minus 3 Ordered ------- Tight: 1. First 2. Second 3. Third and: 1. One 2. Two 3. Three Loose using tabs: 1. First 2. Second 3. Third and using spaces: 1. One 2. Two 3. Three Multiple paragraphs: 1. Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog's back. 2. Item 2. 3. Item 3. Nested: * Tab * Tab * Tab Here's another: 1. First 2. Second: * Fee * Fie * Foe 3. Third Fancy list markers ------------------ (2) begins with 2 (3) and now 3 with a continuation iv. sublist with roman numerals, starting with 4 v. more items (A) a subsublist (B) a subsublist Nesting: A. Upper Alpha I. Upper Roman. (6) Decimal start with 6 c) Lower alpha with paren Autonumbering: #. Autonumber. #. More. #. Nested. Autonumbering with explicit start: (d) item 1 (#) item 2 Definition ---------- term 1 Definition 1. term 2 Definition 2, paragraph 1. Definition 2, paragraph 2. term with *emphasis* Definition 3. Field Lists =========== :address: 61 Main St. :city: *Nowhere*, MA, USA :phone: 123-4567 :address: 61 Main St. :city: *Nowhere*, MA, USA :phone: 123-4567 HTML Blocks =========== Simple block on one line: .. raw:: html
                    foo
                    Now, nested: .. raw:: html
                    foo
                    LaTeX Block =========== .. raw:: latex \begin{tabular}{|l|l|}\hline Animal & Number \\ \hline Dog & 2 \\ Cat & 1 \\ \hline \end{tabular} Inline Markup ============= This is *emphasized*. This is **strong**. This is code: ``>``, ``$``, ``\``, ``\$``, ````. This is\ :sub:`subscripted` and this is :sup:`superscripted`\ . Special Characters ================== Here is some unicode: - I hat: Î - o umlaut: ö - section: § - set membership: ∈ - copyright: © AT&T has an ampersand in their name. This & that. 4 < 5. 6 > 5. Backslash: \\ Backtick: \` Asterisk: \* Underscore: \_ Left brace: \{ Right brace: \} Left bracket: \[ Right bracket: \] Left paren: \( Right paren: \) Greater-than: \> Hash: \# Period: \. Bang: \! Plus: \+ Minus: \- Links ===== Explicit: a `URL `_. Explicit with no label: ``_. Two anonymous links: `the first`__ and `the second`__ __ /url1/ __ /url2/ Reference links: `link1`_ and `link2`_ and link1_ again. .. _link1: /url1/ .. _`link2`: /url2/ Another `style of reference link `_. Here's a `link with an ampersand in the URL`_. Here's a link with an amersand in the link text: `AT&T `_. .. _link with an ampersand in the URL: http://example.com/?foo=1&bar=2 Autolinks: http://example.com/?foo=1&bar=2 and nobody@nowhere.net. But not here:: http://example.com/ Images ====== From "Voyage dans la Lune" by Georges Melies (1902): .. image:: lalune.jpg .. image:: lalune.jpg :height: 2343 :alt: Voyage dans la Lune Here is a movie |movie| icon. .. |movie| image:: movie.jpg And an |image with a link|. .. |image with a link| image:: movie.jpg :alt: A movie :target: /url Comments ======== First paragraph .. comment .. Comment block, should not appear in output as defined by reStructuredText Another paragraph .. Another comment block. This one spans several text elements. It doesn't end until indentation is restored to the preceding level. A third paragraph Line blocks =========== | But can a bee be said to be | or not to be an entire bee, | when half the bee is not a bee, | due to some ancient injury? | | Continuation line | and another Simple Tables ============= ================== =========== ========== col 1 col 2 col 3 ================== =========== ========== r1 a b c r2 d e f ================== =========== ========== Headless ================== =========== ========== r1 a b c r2 d e f ================== =========== ========== Grid Tables =========== +------------------+-----------+------------+ | col 1 | col 2 | col 3 | +==================+===========+============+ | r1 a | b | c | | r1 bis | b 2 | c 2 | +------------------+-----------+------------+ | r2 d | e | f | +------------------+-----------+------------+ Headless +------------------+-----------+------------+ | r1 a | b | c | | r1 bis | b 2 | c 2 | +------------------+-----------+------------+ | r2 d | e | f | +------------------+-----------+------------+ Spaces at ends of lines +------------------+-----------+------------+ | r1 a | b | c | | r1 bis | b 2 | c 2 | +------------------+-----------+------------+ | r2 d | e | f | +------------------+-----------+------------+ Multiple blocks in a cell +------------------+-----------+------------+ | r1 a | - b | c | | | - b 2 | c 2 | | r1 bis | - b 2 | c 2 | +------------------+-----------+------------+ Footnotes ========= [1]_ [#]_ [#]_ [*]_ .. [1] Note with one line. .. [#] Note with continuation line. .. [#] Note with continuation block. .. [*] Note with continuation line and a second para. Not in note. Math ==== Some inline math :math:`E=mc^2`\ . Now some display math: .. math:: E=mc^2 .. math:: E = mc^2 .. math:: E = mc^2 \alpha = \beta .. math:: :label: hithere :nowrap: E &= mc^2\\ F &= \pi E F &= \gamma \alpha^2 All done. Default-Role ============ Try changing the default role to a few different things. .. default-role:: math Doesn't Break Title Parsing --------------------------- Inline math: `E=mc^2` or :math:`E=mc^2` or `E=mc^2`:math:. Other roles: :sup:`super`, `sub`:sub:. .. math:: \alpha = beta E = mc^2 .. default-role:: sup Some `of` these :sup:`words` are in `superscript`:sup:. Reset default-role to the default default. .. default-role:: And now `some-invalid-string-3231231` is nonsense. .. role:: html(raw) :format: html And now with :html:`inline HTML`. .. role:: haskell(code) :language: haskell And some inline haskell :haskell:`fmap id [1,2..10]`. .. role:: indirect(code) .. role:: py(indirect) :language: python Indirect python role :py:`[x*x for x in [1,2,3,4,5]]`. .. role:: different-indirect(code) :language: c .. role:: c(different-indirect) Different indirect C :c:`int x = 15;`. Literal symbols --------------- 2*2 = 4*1 pandoc-1.19.2.4/tests/s5-basic.html0000644000000000000000000000400613155240143015034 0ustar0000000000000000 My S5 Document

                    My S5 Document

                    Sam Smith
                    Jen Jones

                    July 15, 2006

                    First slide

                    • first bullet
                    • second bullet

                    Math

                    • $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
                    pandoc-1.19.2.4/tests/s5-fragment.html0000644000000000000000000000034113155240143015554 0ustar0000000000000000

                    First slide

                    • first bullet
                    • second bullet

                    Math

                    • $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
                    pandoc-1.19.2.4/tests/s5-inserts.html0000644000000000000000000000212113155240143015436 0ustar0000000000000000 My S5 Document STUFF INSERTED STUFF INSERTED

                    First slide

                    • first bullet
                    • second bullet

                    Math

                    • $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
                    STUFF INSERTED pandoc-1.19.2.4/tests/tables.context0000644000000000000000000000431313155240143015421 0ustar0000000000000000Simple table with caption: \placetable{Demonstration of simple table syntax.} \starttable[|r|l|c|l|] \HL \NC Right \NC Left \NC Center \NC Default \NC\AR \HL \NC 12 \NC 12 \NC 12 \NC 12 \NC\AR \NC 123 \NC 123 \NC 123 \NC 123 \NC\AR \NC 1 \NC 1 \NC 1 \NC 1 \NC\AR \HL \stoptable Simple table without caption: \placetable[none]{} \starttable[|r|l|c|l|] \HL \NC Right \NC Left \NC Center \NC Default \NC\AR \HL \NC 12 \NC 12 \NC 12 \NC 12 \NC\AR \NC 123 \NC 123 \NC 123 \NC 123 \NC\AR \NC 1 \NC 1 \NC 1 \NC 1 \NC\AR \HL \stoptable Simple table indented two spaces: \placetable{Demonstration of simple table syntax.} \starttable[|r|l|c|l|] \HL \NC Right \NC Left \NC Center \NC Default \NC\AR \HL \NC 12 \NC 12 \NC 12 \NC 12 \NC\AR \NC 123 \NC 123 \NC 123 \NC 123 \NC\AR \NC 1 \NC 1 \NC 1 \NC 1 \NC\AR \HL \stoptable Multiline table with caption: \placetable{Here's the caption. It may span multiple lines.} \starttable[|cp(0.15\textwidth)|lp(0.14\textwidth)|rp(0.16\textwidth)|lp(0.34\textwidth)|] \HL \NC Centered Header \NC Left Aligned \NC Right Aligned \NC Default aligned \NC\AR \HL \NC First \NC row \NC 12.0 \NC Example of a row that spans multiple lines. \NC\AR \NC Second \NC row \NC 5.0 \NC Here's another one. Note the blank line between rows. \NC\AR \HL \stoptable Multiline table without caption: \placetable[none]{} \starttable[|cp(0.15\textwidth)|lp(0.14\textwidth)|rp(0.16\textwidth)|lp(0.34\textwidth)|] \HL \NC Centered Header \NC Left Aligned \NC Right Aligned \NC Default aligned \NC\AR \HL \NC First \NC row \NC 12.0 \NC Example of a row that spans multiple lines. \NC\AR \NC Second \NC row \NC 5.0 \NC Here's another one. Note the blank line between rows. \NC\AR \HL \stoptable Table without column headers: \placetable[none]{} \starttable[|r|l|c|r|] \HL \NC 12 \NC 12 \NC 12 \NC 12 \NC\AR \NC 123 \NC 123 \NC 123 \NC 123 \NC\AR \NC 1 \NC 1 \NC 1 \NC 1 \NC\AR \HL \stoptable Multiline table without column headers: \placetable[none]{} \starttable[|cp(0.15\textwidth)|lp(0.14\textwidth)|rp(0.16\textwidth)|lp(0.34\textwidth)|] \HL \NC First \NC row \NC 12.0 \NC Example of a row that spans multiple lines. \NC\AR \NC Second \NC row \NC 5.0 \NC Here's another one. Note the blank line between rows. \NC\AR \HL \stoptable pandoc-1.19.2.4/tests/tables.docbook0000644000000000000000000001653613155240143015367 0ustar0000000000000000 Simple table with caption: Demonstration of simple table syntax. Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1
                    Simple table without caption: Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1 Simple table indented two spaces: Demonstration of simple table syntax. Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1
                    Multiline table with caption: Here's the caption. It may span multiple lines. Centered Header Left Aligned Right Aligned Default aligned First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows.
                    Multiline table without caption: Centered Header Left Aligned Right Aligned Default aligned First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. Table without column headers: 12 12 12 12 123 123 123 123 1 1 1 1 Multiline table without column headers: First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. pandoc-1.19.2.4/tests/tables.docbook50000644000000000000000000001653613155240143015454 0ustar0000000000000000 Simple table with caption: Demonstration of simple table syntax. Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1
                    Simple table without caption: Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1 Simple table indented two spaces: Demonstration of simple table syntax. Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1
                    Multiline table with caption: Here's the caption. It may span multiple lines. Centered Header Left Aligned Right Aligned Default aligned First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows.
                    Multiline table without caption: Centered Header Left Aligned Right Aligned Default aligned First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. Table without column headers: 12 12 12 12 123 123 123 123 1 1 1 1 Multiline table without column headers: First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. pandoc-1.19.2.4/tests/tables.dokuwiki0000644000000000000000000000323413155240143015564 0ustar0000000000000000Simple table with caption: Demonstration of simple table syntax. ^ Right^Left ^ Center ^Default^ | 12|12 | 12 |12 | | 123|123 | 123 |123 | | 1|1 | 1 |1 | Simple table without caption: ^ Right^Left ^ Center ^Default^ | 12|12 | 12 |12 | | 123|123 | 123 |123 | | 1|1 | 1 |1 | Simple table indented two spaces: Demonstration of simple table syntax. ^ Right^Left ^ Center ^Default^ | 12|12 | 12 |12 | | 123|123 | 123 |123 | | 1|1 | 1 |1 | Multiline table with caption: Here's the caption. It may span multiple lines. ^ Centered Header ^Left Aligned ^ Right Aligned^Default aligned ^ | First |row | 12.0|Example of a row that spans multiple lines. | | Second |row | 5.0|Here's another one. Note the blank line between rows. | Multiline table without caption: ^ Centered Header ^Left Aligned ^ Right Aligned^Default aligned ^ | First |row | 12.0|Example of a row that spans multiple lines. | | Second |row | 5.0|Here's another one. Note the blank line between rows. | Table without column headers: | 12|12 | 12 | 12| | 123|123 | 123 | 123| | 1|1 | 1 | 1| Multiline table without column headers: | First |row | 12.0|Example of a row that spans multiple lines. | | Second |row | 5.0|Here's another one. Note the blank line between rows.| pandoc-1.19.2.4/tests/tables.zimwiki0000644000000000000000000000427213155240143015424 0ustar0000000000000000Simple table with caption: Demonstration of simple table syntax. | Right|Left | Center |Default| |------:|:-----|:--------:|-------| | 12|12 | 12 |12 | | 123|123 | 123 |123 | | 1|1 | 1 |1 | Simple table without caption: | Right|Left | Center |Default| |------:|:-----|:--------:|-------| | 12|12 | 12 |12 | | 123|123 | 123 |123 | | 1|1 | 1 |1 | Simple table indented two spaces: Demonstration of simple table syntax. | Right|Left | Center |Default| |------:|:-----|:--------:|-------| | 12|12 | 12 |12 | | 123|123 | 123 |123 | | 1|1 | 1 |1 | Multiline table with caption: Here's the caption. It may span multiple lines. | Centered Header |Left Aligned | Right Aligned|Default aligned | |:-----------------:|:-------------|--------------:|:------------------------------------------------------| | First |row | 12.0|Example of a row that spans multiple lines. | | Second |row | 5.0|Here's another one. Note the blank line between rows. | Multiline table without caption: | Centered Header |Left Aligned | Right Aligned|Default aligned | |:-----------------:|:-------------|--------------:|:------------------------------------------------------| | First |row | 12.0|Example of a row that spans multiple lines. | | Second |row | 5.0|Here's another one. Note the blank line between rows. | Table without column headers: | 12|12 | 12 | 12| |----:|:----|:-----:|----:| | 12|12 | 12 | 12| | 123|123 | 123 | 123| | 1|1 | 1 | 1| Multiline table without column headers: | First |row | 12.0|Example of a row that spans multiple lines. | |:--------:|:----|-----:|-----------------------------------------------------| | First |row | 12.0|Example of a row that spans multiple lines. | | Second |row | 5.0|Here's another one. Note the blank line between rows.| pandoc-1.19.2.4/tests/tables.icml0000644000000000000000000010311113155240143014655 0ustar0000000000000000 Simple table with caption:
                    Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1
                    Demonstration of simple table syntax.
                    Simple table without caption:
                    Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1

                    Simple table indented two spaces:
                    Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1
                    Demonstration of simple table syntax.
                    Multiline table with caption:
                    Centered Header Left Aligned Right Aligned Default aligned First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows.
                    Here's the caption. It may span multiple lines.
                    Multiline table without caption:
                    Centered Header Left Aligned Right Aligned Default aligned First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows.

                    Table without column headers:
                    12 12 12 12 123 123 123 123 1 1 1 1

                    Multiline table without column headers:
                    First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows.
                    pandoc-1.19.2.4/tests/tables.html0000644000000000000000000001035413155240143014703 0ustar0000000000000000

                    Simple table with caption:

                    Demonstration of simple table syntax.
                    Right Left Center Default
                    12 12 12 12
                    123 123 123 123
                    1 1 1 1

                    Simple table without caption:

                    Right Left Center Default
                    12 12 12 12
                    123 123 123 123
                    1 1 1 1

                    Simple table indented two spaces:

                    Demonstration of simple table syntax.
                    Right Left Center Default
                    12 12 12 12
                    123 123 123 123
                    1 1 1 1

                    Multiline table with caption:

                    Here's the caption. It may span multiple lines.
                    Centered Header Left Aligned Right Aligned Default aligned
                    First row 12.0 Example of a row that spans multiple lines.
                    Second row 5.0 Here's another one. Note the blank line between rows.

                    Multiline table without caption:

                    Centered Header Left Aligned Right Aligned Default aligned
                    First row 12.0 Example of a row that spans multiple lines.
                    Second row 5.0 Here's another one. Note the blank line between rows.

                    Table without column headers:

                    12 12 12 12
                    123 123 123 123
                    1 1 1 1

                    Multiline table without column headers:

                    First row 12.0 Example of a row that spans multiple lines.
                    Second row 5.0 Here's another one. Note the blank line between rows.
                    pandoc-1.19.2.4/tests/tables.latex0000644000000000000000000001215713155240143015057 0ustar0000000000000000Simple table with caption: \begin{longtable}[]{@{}rlcl@{}} \caption{Demonstration of simple table syntax.}\tabularnewline \toprule Right & Left & Center & Default\tabularnewline \midrule \endfirsthead \toprule Right & Left & Center & Default\tabularnewline \midrule \endhead 12 & 12 & 12 & 12\tabularnewline 123 & 123 & 123 & 123\tabularnewline 1 & 1 & 1 & 1\tabularnewline \bottomrule \end{longtable} Simple table without caption: \begin{longtable}[]{@{}rlcl@{}} \toprule Right & Left & Center & Default\tabularnewline \midrule \endhead 12 & 12 & 12 & 12\tabularnewline 123 & 123 & 123 & 123\tabularnewline 1 & 1 & 1 & 1\tabularnewline \bottomrule \end{longtable} Simple table indented two spaces: \begin{longtable}[]{@{}rlcl@{}} \caption{Demonstration of simple table syntax.}\tabularnewline \toprule Right & Left & Center & Default\tabularnewline \midrule \endfirsthead \toprule Right & Left & Center & Default\tabularnewline \midrule \endhead 12 & 12 & 12 & 12\tabularnewline 123 & 123 & 123 & 123\tabularnewline 1 & 1 & 1 & 1\tabularnewline \bottomrule \end{longtable} Multiline table with caption: \begin{longtable}[]{@{}clrl@{}} \caption{Here's the caption. It may span multiple lines.}\tabularnewline \toprule \begin{minipage}[b]{0.13\columnwidth}\centering\strut Centered Header\strut \end{minipage} & \begin{minipage}[b]{0.12\columnwidth}\raggedright\strut Left Aligned\strut \end{minipage} & \begin{minipage}[b]{0.14\columnwidth}\raggedleft\strut Right Aligned\strut \end{minipage} & \begin{minipage}[b]{0.30\columnwidth}\raggedright\strut Default aligned\strut \end{minipage}\tabularnewline \midrule \endfirsthead \toprule \begin{minipage}[b]{0.13\columnwidth}\centering\strut Centered Header\strut \end{minipage} & \begin{minipage}[b]{0.12\columnwidth}\raggedright\strut Left Aligned\strut \end{minipage} & \begin{minipage}[b]{0.14\columnwidth}\raggedleft\strut Right Aligned\strut \end{minipage} & \begin{minipage}[b]{0.30\columnwidth}\raggedright\strut Default aligned\strut \end{minipage}\tabularnewline \midrule \endhead \begin{minipage}[t]{0.13\columnwidth}\centering\strut First\strut \end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright\strut row\strut \end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft\strut 12.0\strut \end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright\strut Example of a row that spans multiple lines.\strut \end{minipage}\tabularnewline \begin{minipage}[t]{0.13\columnwidth}\centering\strut Second\strut \end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright\strut row\strut \end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft\strut 5.0\strut \end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright\strut Here's another one. Note the blank line between rows.\strut \end{minipage}\tabularnewline \bottomrule \end{longtable} Multiline table without caption: \begin{longtable}[]{@{}clrl@{}} \toprule \begin{minipage}[b]{0.13\columnwidth}\centering\strut Centered Header\strut \end{minipage} & \begin{minipage}[b]{0.12\columnwidth}\raggedright\strut Left Aligned\strut \end{minipage} & \begin{minipage}[b]{0.14\columnwidth}\raggedleft\strut Right Aligned\strut \end{minipage} & \begin{minipage}[b]{0.30\columnwidth}\raggedright\strut Default aligned\strut \end{minipage}\tabularnewline \midrule \endhead \begin{minipage}[t]{0.13\columnwidth}\centering\strut First\strut \end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright\strut row\strut \end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft\strut 12.0\strut \end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright\strut Example of a row that spans multiple lines.\strut \end{minipage}\tabularnewline \begin{minipage}[t]{0.13\columnwidth}\centering\strut Second\strut \end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright\strut row\strut \end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft\strut 5.0\strut \end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright\strut Here's another one. Note the blank line between rows.\strut \end{minipage}\tabularnewline \bottomrule \end{longtable} Table without column headers: \begin{longtable}[]{@{}rlcr@{}} \toprule 12 & 12 & 12 & 12\tabularnewline 123 & 123 & 123 & 123\tabularnewline 1 & 1 & 1 & 1\tabularnewline \bottomrule \end{longtable} Multiline table without column headers: \begin{longtable}[]{@{}clrl@{}} \toprule \begin{minipage}[t]{0.13\columnwidth}\centering\strut First\strut \end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright\strut row\strut \end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft\strut 12.0\strut \end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright\strut Example of a row that spans multiple lines.\strut \end{minipage}\tabularnewline \begin{minipage}[t]{0.13\columnwidth}\centering\strut Second\strut \end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright\strut row\strut \end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft\strut 5.0\strut \end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright\strut Here's another one. Note the blank line between rows.\strut \end{minipage}\tabularnewline \bottomrule \end{longtable} pandoc-1.19.2.4/tests/tables.man0000644000000000000000000000366613155240143014522 0ustar0000000000000000.PP Simple table with caption: .PP Demonstration of simple table syntax. .TS tab(@); r l c l. T{ Right T}@T{ Left T}@T{ Center T}@T{ Default T} _ T{ 12 T}@T{ 12 T}@T{ 12 T}@T{ 12 T} T{ 123 T}@T{ 123 T}@T{ 123 T}@T{ 123 T} T{ 1 T}@T{ 1 T}@T{ 1 T}@T{ 1 T} .TE .PP Simple table without caption: .PP .TS tab(@); r l c l. T{ Right T}@T{ Left T}@T{ Center T}@T{ Default T} _ T{ 12 T}@T{ 12 T}@T{ 12 T}@T{ 12 T} T{ 123 T}@T{ 123 T}@T{ 123 T}@T{ 123 T} T{ 1 T}@T{ 1 T}@T{ 1 T}@T{ 1 T} .TE .PP Simple table indented two spaces: .PP Demonstration of simple table syntax. .TS tab(@); r l c l. T{ Right T}@T{ Left T}@T{ Center T}@T{ Default T} _ T{ 12 T}@T{ 12 T}@T{ 12 T}@T{ 12 T} T{ 123 T}@T{ 123 T}@T{ 123 T}@T{ 123 T} T{ 1 T}@T{ 1 T}@T{ 1 T}@T{ 1 T} .TE .PP Multiline table with caption: .PP Here\[aq]s the caption. It may span multiple lines. .TS tab(@); cw(10.5n) lw(9.6n) rw(11.4n) lw(23.6n). T{ Centered Header T}@T{ Left Aligned T}@T{ Right Aligned T}@T{ Default aligned T} _ T{ First T}@T{ row T}@T{ 12.0 T}@T{ Example of a row that spans multiple lines. T} T{ Second T}@T{ row T}@T{ 5.0 T}@T{ Here\[aq]s another one. Note the blank line between rows. T} .TE .PP Multiline table without caption: .PP .TS tab(@); cw(10.5n) lw(9.6n) rw(11.4n) lw(23.6n). T{ Centered Header T}@T{ Left Aligned T}@T{ Right Aligned T}@T{ Default aligned T} _ T{ First T}@T{ row T}@T{ 12.0 T}@T{ Example of a row that spans multiple lines. T} T{ Second T}@T{ row T}@T{ 5.0 T}@T{ Here\[aq]s another one. Note the blank line between rows. T} .TE .PP Table without column headers: .PP .TS tab(@); r l c r. T{ 12 T}@T{ 12 T}@T{ 12 T}@T{ 12 T} T{ 123 T}@T{ 123 T}@T{ 123 T}@T{ 123 T} T{ 1 T}@T{ 1 T}@T{ 1 T}@T{ 1 T} .TE .PP Multiline table without column headers: .PP .TS tab(@); cw(10.5n) lw(9.6n) rw(11.4n) lw(23.6n). T{ First T}@T{ row T}@T{ 12.0 T}@T{ Example of a row that spans multiple lines. T} T{ Second T}@T{ row T}@T{ 5.0 T}@T{ Here\[aq]s another one. Note the blank line between rows. T} .TE pandoc-1.19.2.4/tests/tables.plain0000644000000000000000000000477013155240143015047 0ustar0000000000000000Simple table with caption: Right Left Center Default ------- ------ -------- --------- 12 12 12 12 123 123 123 123 1 1 1 1 : Demonstration of simple table syntax. Simple table without caption: Right Left Center Default ------- ------ -------- --------- 12 12 12 12 123 123 123 123 1 1 1 1 Simple table indented two spaces: Right Left Center Default ------- ------ -------- --------- 12 12 12 12 123 123 123 123 1 1 1 1 : Demonstration of simple table syntax. Multiline table with caption: -------------------------------------------------------------- Centered Left Right Default aligned Header Aligned Aligned ----------- ---------- ------------ -------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. -------------------------------------------------------------- : Here's the caption. It may span multiple lines. Multiline table without caption: -------------------------------------------------------------- Centered Left Right Default aligned Header Aligned Aligned ----------- ---------- ------------ -------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. -------------------------------------------------------------- Table without column headers: ----- ----- ----- ----- 12 12 12 12 123 123 123 123 1 1 1 1 ----- ----- ----- ----- Multiline table without column headers: ----------- ---------- ------------ -------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. ----------- ---------- ------------ -------------------------- pandoc-1.19.2.4/tests/tables.markdown0000644000000000000000000000477013155240143015566 0ustar0000000000000000Simple table with caption: Right Left Center Default ------- ------ -------- --------- 12 12 12 12 123 123 123 123 1 1 1 1 : Demonstration of simple table syntax. Simple table without caption: Right Left Center Default ------- ------ -------- --------- 12 12 12 12 123 123 123 123 1 1 1 1 Simple table indented two spaces: Right Left Center Default ------- ------ -------- --------- 12 12 12 12 123 123 123 123 1 1 1 1 : Demonstration of simple table syntax. Multiline table with caption: -------------------------------------------------------------- Centered Left Right Default aligned Header Aligned Aligned ----------- ---------- ------------ -------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. -------------------------------------------------------------- : Here's the caption. It may span multiple lines. Multiline table without caption: -------------------------------------------------------------- Centered Left Right Default aligned Header Aligned Aligned ----------- ---------- ------------ -------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. -------------------------------------------------------------- Table without column headers: ----- ----- ----- ----- 12 12 12 12 123 123 123 123 1 1 1 1 ----- ----- ----- ----- Multiline table without column headers: ----------- ---------- ------------ -------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. ----------- ---------- ------------ -------------------------- pandoc-1.19.2.4/tests/tables.mediawiki0000644000000000000000000000425613155240143015706 0ustar0000000000000000Simple table with caption: {| |+ Demonstration of simple table syntax. !align="right"| Right ! Left !align="center"| Center ! Default |- |align="right"| 12 | 12 |align="center"| 12 | 12 |- |align="right"| 123 | 123 |align="center"| 123 | 123 |- |align="right"| 1 | 1 |align="center"| 1 | 1 |} Simple table without caption: {| !align="right"| Right ! Left !align="center"| Center ! Default |- |align="right"| 12 | 12 |align="center"| 12 | 12 |- |align="right"| 123 | 123 |align="center"| 123 | 123 |- |align="right"| 1 | 1 |align="center"| 1 | 1 |} Simple table indented two spaces: {| |+ Demonstration of simple table syntax. !align="right"| Right ! Left !align="center"| Center ! Default |- |align="right"| 12 | 12 |align="center"| 12 | 12 |- |align="right"| 123 | 123 |align="center"| 123 | 123 |- |align="right"| 1 | 1 |align="center"| 1 | 1 |} Multiline table with caption: {| |+ Here's the caption. It may span multiple lines. !align="center" width="15%"| Centered Header !width="13%"| Left Aligned !align="right" width="16%"| Right Aligned !width="33%"| Default aligned |- |align="center"| First | row |align="right"| 12.0 | Example of a row that spans multiple lines. |- |align="center"| Second | row |align="right"| 5.0 | Here's another one. Note the blank line between rows. |} Multiline table without caption: {| !align="center" width="15%"| Centered Header !width="13%"| Left Aligned !align="right" width="16%"| Right Aligned !width="33%"| Default aligned |- |align="center"| First | row |align="right"| 12.0 | Example of a row that spans multiple lines. |- |align="center"| Second | row |align="right"| 5.0 | Here's another one. Note the blank line between rows. |} Table without column headers: {| |align="right"| 12 | 12 |align="center"| 12 |align="right"| 12 |- |align="right"| 123 | 123 |align="center"| 123 |align="right"| 123 |- |align="right"| 1 | 1 |align="center"| 1 |align="right"| 1 |} Multiline table without column headers: {| |align="center" width="15%"| First |width="13%"| row |align="right" width="16%"| 12.0 |width="33%"| Example of a row that spans multiple lines. |- |align="center"| Second | row |align="right"| 5.0 | Here's another one. Note the blank line between rows. |} pandoc-1.19.2.4/tests/tables.tei0000644000000000000000000000762013155240143014522 0ustar0000000000000000

                    Simple table with caption:

                    Right

                    Left

                    Center

                    Default

                    12

                    12

                    12

                    12

                    123

                    123

                    123

                    123

                    1

                    1

                    1

                    1

                    Simple table without caption:

                    Right

                    Left

                    Center

                    Default

                    12

                    12

                    12

                    12

                    123

                    123

                    123

                    123

                    1

                    1

                    1

                    1

                    Simple table indented two spaces:

                    Right

                    Left

                    Center

                    Default

                    12

                    12

                    12

                    12

                    123

                    123

                    123

                    123

                    1

                    1

                    1

                    1

                    Multiline table with caption:

                    Centered Header

                    Left Aligned

                    Right Aligned

                    Default aligned

                    First

                    row

                    12.0

                    Example of a row that spans multiple lines.

                    Second

                    row

                    5.0

                    Here's another one. Note the blank line between rows.

                    Multiline table without caption:

                    Centered Header

                    Left Aligned

                    Right Aligned

                    Default aligned

                    First

                    row

                    12.0

                    Example of a row that spans multiple lines.

                    Second

                    row

                    5.0

                    Here's another one. Note the blank line between rows.

                    Table without column headers:

                    12

                    12

                    12

                    12

                    123

                    123

                    123

                    123

                    1

                    1

                    1

                    1

                    Multiline table without column headers:

                    First

                    row

                    12.0

                    Example of a row that spans multiple lines.

                    Second

                    row

                    5.0

                    Here's another one. Note the blank line between rows.

                    pandoc-1.19.2.4/tests/tables.textile0000644000000000000000000000673713155240143015427 0ustar0000000000000000Simple table with caption:
                    Demonstration of simple table syntax.
                    Right Left Center Default
                    12 12 12 12
                    123 123 123 123
                    1 1 1 1
                    Simple table without caption: |_. Right|_. Left|_. Center|_. Default| |>. 12|<. 12|=. 12|12| |>. 123|<. 123|=. 123|123| |>. 1|<. 1|=. 1|1| Simple table indented two spaces:
                    Demonstration of simple table syntax.
                    Right Left Center Default
                    12 12 12 12
                    123 123 123 123
                    1 1 1 1
                    Multiline table with caption:
                    Here's the caption. It may span multiple lines.
                    Centered Header Left Aligned Right Aligned Default aligned
                    First row 12.0 Example of a row that spans multiple lines.
                    Second row 5.0 Here's another one. Note the blank line between rows.
                    Multiline table without caption:
                    Centered Header Left Aligned Right Aligned Default aligned
                    First row 12.0 Example of a row that spans multiple lines.
                    Second row 5.0 Here's another one. Note the blank line between rows.
                    Table without column headers: |>. 12|<. 12|=. 12|>. 12| |>. 123|<. 123|=. 123|>. 123| |>. 1|<. 1|=. 1|>. 1| Multiline table without column headers:
                    First row 12.0 Example of a row that spans multiple lines.
                    Second row 5.0 Here's another one. Note the blank line between rows.
                    pandoc-1.19.2.4/tests/tables.opendocument0000644000000000000000000004534313155240143016445 0ustar0000000000000000Simple table with caption: Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1 Demonstration of simple table syntax. Simple table without caption: Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1 Simple table indented two spaces: Right Left Center Default 12 12 12 12 123 123 123 123 1 1 1 1 Demonstration of simple table syntax. Multiline table with caption: Centered Header Left Aligned Right Aligned Default aligned First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. Here's the caption. It may span multiple lines. Multiline table without caption: Centered Header Left Aligned Right Aligned Default aligned First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. Table without column headers: 12 12 12 12 123 123 123 123 1 1 1 1 Multiline table without column headers: First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. pandoc-1.19.2.4/tests/tables.org0000644000000000000000000000431413155240143014525 0ustar0000000000000000Simple table with caption: | Right | Left | Center | Default | |---------+--------+----------+-----------| | 12 | 12 | 12 | 12 | | 123 | 123 | 123 | 123 | | 1 | 1 | 1 | 1 | #+CAPTION: Demonstration of simple table syntax. Simple table without caption: | Right | Left | Center | Default | |---------+--------+----------+-----------| | 12 | 12 | 12 | 12 | | 123 | 123 | 123 | 123 | | 1 | 1 | 1 | 1 | Simple table indented two spaces: | Right | Left | Center | Default | |---------+--------+----------+-----------| | 12 | 12 | 12 | 12 | | 123 | 123 | 123 | 123 | | 1 | 1 | 1 | 1 | #+CAPTION: Demonstration of simple table syntax. Multiline table with caption: | Centered Header | Left Aligned | Right Aligned | Default aligned | |-------------------+----------------+-----------------+---------------------------------------------------------| | First | row | 12.0 | Example of a row that spans multiple lines. | | Second | row | 5.0 | Here's another one. Note the blank line between rows. | #+CAPTION: Here's the caption. It may span multiple lines. Multiline table without caption: | Centered Header | Left Aligned | Right Aligned | Default aligned | |-------------------+----------------+-----------------+---------------------------------------------------------| | First | row | 12.0 | Example of a row that spans multiple lines. | | Second | row | 5.0 | Here's another one. Note the blank line between rows. | Table without column headers: | 12 | 12 | 12 | 12 | | 123 | 123 | 123 | 123 | | 1 | 1 | 1 | 1 | Multiline table without column headers: | First | row | 12.0 | Example of a row that spans multiple lines. | | Second | row | 5.0 | Here's another one. Note the blank line between rows. | pandoc-1.19.2.4/tests/tables.asciidoc0000644000000000000000000000410513155240143015512 0ustar0000000000000000Simple table with caption: .Demonstration of simple table syntax. [cols=">,<,^,",options="header",] |============================ |Right |Left |Center |Default |12 |12 |12 |12 |123 |123 |123 |123 |1 |1 |1 |1 |============================ Simple table without caption: [cols=">,<,^,",options="header",] |============================ |Right |Left |Center |Default |12 |12 |12 |12 |123 |123 |123 |123 |1 |1 |1 |1 |============================ Simple table indented two spaces: .Demonstration of simple table syntax. [cols=">,<,^,",options="header",] |============================ |Right |Left |Center |Default |12 |12 |12 |12 |123 |123 |123 |123 |1 |1 |1 |1 |============================ Multiline table with caption: .Here's the caption. It may span multiple lines. [width="78%",cols="^21%,<17%,>20%,<42%",options="header",] |======================================================================= |Centered Header |Left Aligned |Right Aligned |Default aligned |First |row |12.0 |Example of a row that spans multiple lines. |Second |row |5.0 |Here's another one. Note the blank line between rows. |======================================================================= Multiline table without caption: [width="78%",cols="^21%,<17%,>20%,<42%",options="header",] |======================================================================= |Centered Header |Left Aligned |Right Aligned |Default aligned |First |row |12.0 |Example of a row that spans multiple lines. |Second |row |5.0 |Here's another one. Note the blank line between rows. |======================================================================= Table without column headers: [cols=">,<,^,>",] |================== |12 |12 |12 |12 |123 |123 |123 |123 |1 |1 |1 |1 |================== Multiline table without column headers: [width="78%",cols="^21%,<17%,>20%,42%",] |======================================================================= |First |row |12.0 |Example of a row that spans multiple lines. |Second |row |5.0 |Here's another one. Note the blank line between rows. |======================================================================= pandoc-1.19.2.4/tests/tables.haddock0000644000000000000000000000513613155240143015336 0ustar0000000000000000Simple table with caption: > Right Left Center Default > ------- ------ -------- --------- > 12 12 12 12 > 123 123 123 123 > 1 1 1 1 > > Demonstration of simple table syntax. Simple table without caption: > Right Left Center Default > ------- ------ -------- --------- > 12 12 12 12 > 123 123 123 123 > 1 1 1 1 Simple table indented two spaces: > Right Left Center Default > ------- ------ -------- --------- > 12 12 12 12 > 123 123 123 123 > 1 1 1 1 > > Demonstration of simple table syntax. Multiline table with caption: > -------------------------------------------------------------- > Centered Left Right Default aligned > Header Aligned Aligned > ----------- ---------- ------------ -------------------------- > First row 12.0 Example of a row that > spans multiple lines. > > Second row 5.0 Here\'s another one. Note > the blank line between > rows. > -------------------------------------------------------------- > > Here\'s the caption. It may span multiple lines. Multiline table without caption: > -------------------------------------------------------------- > Centered Left Right Default aligned > Header Aligned Aligned > ----------- ---------- ------------ -------------------------- > First row 12.0 Example of a row that > spans multiple lines. > > Second row 5.0 Here\'s another one. Note > the blank line between > rows. > -------------------------------------------------------------- Table without column headers: > ----- ----- ----- ----- > 12 12 12 12 > 123 123 123 123 > 1 1 1 1 > ----- ----- ----- ----- Multiline table without column headers: > ----------- ---------- ------------ -------------------------- > First row 12.0 Example of a row that > spans multiple lines. > > Second row 5.0 Here\'s another one. Note > the blank line between > rows. > ----------- ---------- ------------ -------------------------- pandoc-1.19.2.4/tests/tables.texinfo0000644000000000000000000000425513155240143015416 0ustar0000000000000000@node Top @top Top Simple table with caption: @float @multitable {Right} {Left} {Center} {Default} @headitem Right @tab Left @tab Center @tab Default @item 12 @tab 12 @tab 12 @tab 12 @item 123 @tab 123 @tab 123 @tab 123 @item 1 @tab 1 @tab 1 @tab 1 @end multitable @caption{Demonstration of simple table syntax.} @end float Simple table without caption: @multitable {Right} {Left} {Center} {Default} @headitem Right @tab Left @tab Center @tab Default @item 12 @tab 12 @tab 12 @tab 12 @item 123 @tab 123 @tab 123 @tab 123 @item 1 @tab 1 @tab 1 @tab 1 @end multitable Simple table indented two spaces: @float @multitable {Right} {Left} {Center} {Default} @headitem Right @tab Left @tab Center @tab Default @item 12 @tab 12 @tab 12 @tab 12 @item 123 @tab 123 @tab 123 @tab 123 @item 1 @tab 1 @tab 1 @tab 1 @end multitable @caption{Demonstration of simple table syntax.} @end float Multiline table with caption: @float @multitable @columnfractions 0.15 0.14 0.16 0.34 @headitem Centered Header @tab Left Aligned @tab Right Aligned @tab Default aligned @item First @tab row @tab 12.0 @tab Example of a row that spans multiple lines. @item Second @tab row @tab 5.0 @tab Here's another one. Note the blank line between rows. @end multitable @caption{Here's the caption. It may span multiple lines.} @end float Multiline table without caption: @multitable @columnfractions 0.15 0.14 0.16 0.34 @headitem Centered Header @tab Left Aligned @tab Right Aligned @tab Default aligned @item First @tab row @tab 12.0 @tab Example of a row that spans multiple lines. @item Second @tab row @tab 5.0 @tab Here's another one. Note the blank line between rows. @end multitable Table without column headers: @multitable {123} {123} {123} {123} @item 12 @tab 12 @tab 12 @tab 12 @item 123 @tab 123 @tab 123 @tab 123 @item 1 @tab 1 @tab 1 @tab 1 @end multitable Multiline table without column headers: @multitable @columnfractions 0.15 0.14 0.16 0.34 @item First @tab row @tab 12.0 @tab Example of a row that spans multiple lines. @item Second @tab row @tab 5.0 @tab Here's another one. Note the blank line between rows. @end multitable pandoc-1.19.2.4/tests/tables.rst0000644000000000000000000000764113155240143014554 0ustar0000000000000000Simple table with caption: +---------+--------+----------+-----------+ | Right | Left | Center | Default | +=========+========+==========+===========+ | 12 | 12 | 12 | 12 | +---------+--------+----------+-----------+ | 123 | 123 | 123 | 123 | +---------+--------+----------+-----------+ | 1 | 1 | 1 | 1 | +---------+--------+----------+-----------+ Table: Demonstration of simple table syntax. Simple table without caption: +---------+--------+----------+-----------+ | Right | Left | Center | Default | +=========+========+==========+===========+ | 12 | 12 | 12 | 12 | +---------+--------+----------+-----------+ | 123 | 123 | 123 | 123 | +---------+--------+----------+-----------+ | 1 | 1 | 1 | 1 | +---------+--------+----------+-----------+ Simple table indented two spaces: +---------+--------+----------+-----------+ | Right | Left | Center | Default | +=========+========+==========+===========+ | 12 | 12 | 12 | 12 | +---------+--------+----------+-----------+ | 123 | 123 | 123 | 123 | +---------+--------+----------+-----------+ | 1 | 1 | 1 | 1 | +---------+--------+----------+-----------+ Table: Demonstration of simple table syntax. Multiline table with caption: +-------------+------------+--------------+----------------------------+ | Centered | Left | Right | Default aligned | | Header | Aligned | Aligned | | +=============+============+==============+============================+ | First | row | 12.0 | Example of a row that | | | | | spans multiple lines. | +-------------+------------+--------------+----------------------------+ | Second | row | 5.0 | Here's another one. Note | | | | | the blank line between | | | | | rows. | +-------------+------------+--------------+----------------------------+ Table: Here's the caption. It may span multiple lines. Multiline table without caption: +-------------+------------+--------------+----------------------------+ | Centered | Left | Right | Default aligned | | Header | Aligned | Aligned | | +=============+============+==============+============================+ | First | row | 12.0 | Example of a row that | | | | | spans multiple lines. | +-------------+------------+--------------+----------------------------+ | Second | row | 5.0 | Here's another one. Note | | | | | the blank line between | | | | | rows. | +-------------+------------+--------------+----------------------------+ Table without column headers: +-------+-------+-------+-------+ | 12 | 12 | 12 | 12 | +-------+-------+-------+-------+ | 123 | 123 | 123 | 123 | +-------+-------+-------+-------+ | 1 | 1 | 1 | 1 | +-------+-------+-------+-------+ Multiline table without column headers: +-------------+------------+--------------+----------------------------+ | First | row | 12.0 | Example of a row that | | | | | spans multiple lines. | +-------------+------------+--------------+----------------------------+ | Second | row | 5.0 | Here's another one. Note | | | | | the blank line between | | | | | rows. | +-------------+------------+--------------+----------------------------+ pandoc-1.19.2.4/tests/tables.rtf0000644000000000000000000002043313155240143014531 0ustar0000000000000000{\pard \ql \f0 \sa180 \li0 \fi0 Simple table with caption:\par} { \trowd \trgaph120 \clbrdrb\brdrs\cellx2160\clbrdrb\brdrs\cellx4320\clbrdrb\brdrs\cellx6480\clbrdrb\brdrs\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Center\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} \cell} } \intbl\row} {\pard \ql \f0 \sa180 \li0 \fi0 Demonstration of simple table syntax.\par} {\pard \ql \f0 \sa180 \li0 \fi0 Simple table without caption:\par} { \trowd \trgaph120 \clbrdrb\brdrs\cellx2160\clbrdrb\brdrs\cellx4320\clbrdrb\brdrs\cellx6480\clbrdrb\brdrs\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Center\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} \cell} } \intbl\row} {\pard \ql \f0 \sa180 \li0 \fi0 \par} {\pard \ql \f0 \sa180 \li0 \fi0 Simple table indented two spaces:\par} { \trowd \trgaph120 \clbrdrb\brdrs\cellx2160\clbrdrb\brdrs\cellx4320\clbrdrb\brdrs\cellx6480\clbrdrb\brdrs\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Center\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} \cell} } \intbl\row} {\pard \ql \f0 \sa180 \li0 \fi0 Demonstration of simple table syntax.\par} {\pard \ql \f0 \sa180 \li0 \fi0 Multiline table with caption:\par} { \trowd \trgaph120 \clbrdrb\brdrs\cellx1296\clbrdrb\brdrs\cellx2484\clbrdrb\brdrs\cellx3888\clbrdrb\brdrs\cellx6804 \trkeep\intbl { {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Centered Header\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left Aligned\par} \cell} {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right Aligned\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default aligned\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx1296\cellx2484\cellx3888\cellx6804 \trkeep\intbl { {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 First\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par} \cell} {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12.0\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx1296\cellx2484\cellx3888\cellx6804 \trkeep\intbl { {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Second\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par} \cell} {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 5.0\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Here's another one. Note the blank line between rows.\par} \cell} } \intbl\row} {\pard \ql \f0 \sa180 \li0 \fi0 Here's the caption. It may span multiple lines.\par} {\pard \ql \f0 \sa180 \li0 \fi0 Multiline table without caption:\par} { \trowd \trgaph120 \clbrdrb\brdrs\cellx1296\clbrdrb\brdrs\cellx2484\clbrdrb\brdrs\cellx3888\clbrdrb\brdrs\cellx6804 \trkeep\intbl { {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Centered Header\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left Aligned\par} \cell} {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right Aligned\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default aligned\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx1296\cellx2484\cellx3888\cellx6804 \trkeep\intbl { {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 First\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par} \cell} {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12.0\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx1296\cellx2484\cellx3888\cellx6804 \trkeep\intbl { {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Second\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par} \cell} {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 5.0\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Here's another one. Note the blank line between rows.\par} \cell} } \intbl\row} {\pard \ql \f0 \sa180 \li0 \fi0 \par} {\pard \ql \f0 \sa180 \li0 \fi0 Table without column headers:\par} { \trowd \trgaph120 \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par} \cell} {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par} \cell} {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl { {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} \cell} {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par} \cell} {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par} \cell} } \intbl\row} {\pard \ql \f0 \sa180 \li0 \fi0 \par} {\pard \ql \f0 \sa180 \li0 \fi0 Multiline table without column headers:\par} { \trowd \trgaph120 \cellx1296\cellx2484\cellx3888\cellx6804 \trkeep\intbl { {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 First\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par} \cell} {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12.0\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par} \cell} } \intbl\row} { \trowd \trgaph120 \cellx1296\cellx2484\cellx3888\cellx6804 \trkeep\intbl { {{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Second\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par} \cell} {{\pard\intbl \qr \f0 \sa0 \li0 \fi0 5.0\par} \cell} {{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Here's another one. Note the blank line between rows.\par} \cell} } \intbl\row} {\pard \ql \f0 \sa180 \li0 \fi0 \par} pandoc-1.19.2.4/tests/tables.txt0000644000000000000000000000513613155240143014560 0ustar0000000000000000Simple table with caption: Right Left Center Default ------- ------ ---------- ------- 12 12 12 12 123 123 123 123 1 1 1 1 Table: Demonstration of simple table syntax. Simple table without caption: Right Left Center Default ------- ------ ---------- ------- 12 12 12 12 123 123 123 123 1 1 1 1 Simple table indented two spaces: Right Left Center Default ------- ------ ---------- ------- 12 12 12 12 123 123 123 123 1 1 1 1 : Demonstration of simple table syntax. Multiline table with caption: : Here's the caption. It may span multiple lines. --------------------------------------------------------------- Centered Left Right Header Aligned Aligned Default aligned ---------- --------- ----------- --------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. --------------------------------------------------------------- Multiline table without caption: --------------------------------------------------------------- Centered Left Right Header Aligned Aligned Default aligned ---------- --------- ----------- --------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. --------------------------------------------------------------- Table without column headers: ------- ------ ---------- ------- 12 12 12 12 123 123 123 123 1 1 1 1 ------- ------ ---------- ------- Multiline table without column headers: ---------- --------- ----------- --------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. ---------- --------- ----------- --------------------------- pandoc-1.19.2.4/tests/tables.fb20000644000000000000000000001003713155240143014406 0ustar0000000000000000 pandoc<p />

                    Simple table with caption:

                    RightLeftCenterDefault
                    12121212
                    123123123123
                    1111

                    Demonstration of simple table syntax.

                    Simple table without caption:

                    RightLeftCenterDefault
                    12121212
                    123123123123
                    1111

                    Simple table indented two spaces:

                    RightLeftCenterDefault
                    12121212
                    123123123123
                    1111

                    Demonstration of simple table syntax.

                    Multiline table with caption:

                    Centered HeaderLeft AlignedRight AlignedDefault aligned
                    Firstrow12.0Example of a row that spans multiple lines.
                    Secondrow5.0Here's another one. Note the blank line between rows.

                    Here's the caption. It may span multiple lines.

                    Multiline table without caption:

                    Centered HeaderLeft AlignedRight AlignedDefault aligned
                    Firstrow12.0Example of a row that spans multiple lines.
                    Secondrow5.0Here's another one. Note the blank line between rows.

                    Table without column headers:

                    12121212
                    123123123123
                    1111

                    Multiline table without column headers:

                    Firstrow12.0Example of a row that spans multiple lines.
                    Secondrow5.0Here's another one. Note the blank line between rows.

                    pandoc-1.19.2.4/tests/testsuite.txt0000644000000000000000000002203213155240143015331 0ustar0000000000000000% Pandoc Test Suite % 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. ----- # Headers ## Level 2 with an [embedded link](/url) ### Level 3 with *emphasis* #### Level 4 ##### Level 5 Level 1 ======= Level 2 with *emphasis* ----------------------- ### Level 3 with no blank line Level 2 ------- with no blank line ---------- # Paragraphs Here's a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here's one with a bullet. * criminey. There should be a hard line break here. --- # Block Quotes E-mail style: > This is a block quote. > It is pretty short. > Code in a block quote: > > sub status { > print "working"; > } > > A list: > > 1. item one > 2. item two > > Nested block quotes: > > > nested > >> nested > This should not be a block quote: 2 > 1. And a following paragraph. * * * * # Code Blocks Code: ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab And: this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ ___________ # Lists ## Unordered Asterisks tight: * asterisk 1 * asterisk 2 * asterisk 3 Asterisks loose: * asterisk 1 * asterisk 2 * asterisk 3 Pluses tight: + Plus 1 + Plus 2 + Plus 3 Pluses loose: + Plus 1 + Plus 2 + Plus 3 Minuses tight: - Minus 1 - Minus 2 - Minus 3 Minuses loose: - Minus 1 - Minus 2 - Minus 3 ## Ordered Tight: 1. First 2. Second 3. Third and: 1. One 2. Two 3. Three Loose using tabs: 1. First 2. Second 3. Third and using spaces: 1. One 2. Two 3. Three Multiple paragraphs: 1. Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog's back. 2. Item 2. 3. Item 3. ## Nested * Tab * Tab * Tab Here's another: 1. First 2. Second: * Fee * Fie * Foe 3. Third Same thing but with paragraphs: 1. First 2. Second: * Fee * Fie * Foe 3. Third ## Tabs and spaces + this is a list item indented with tabs + this is a list item indented with spaces + this is an example list item indented with tabs + this is an example list item indented with spaces ## Fancy list markers (2) begins with 2 (3) and now 3 with a continuation iv. sublist with roman numerals, starting with 4 v. more items (A) a subsublist (B) a subsublist Nesting: A. Upper Alpha I. Upper Roman. (6) Decimal start with 6 c) Lower alpha with paren Autonumbering: #. Autonumber. #. More. #. Nested. Should not be a list item: M.A. 2007 B. Williams * * * * * # Definition Lists Tight using spaces: apple : red fruit orange : orange fruit banana : yellow fruit Tight using tabs: apple : red fruit orange : orange fruit banana : yellow fruit Loose: apple : red fruit orange : orange fruit banana : yellow fruit Multiple blocks with italics: *apple* : red fruit contains seeds, crisp, pleasant to taste *orange* : orange fruit { orange code block } > orange block quote Multiple definitions, tight: apple : red fruit : computer orange : orange fruit : bank Multiple definitions, loose: apple : red fruit : computer orange : orange fruit : bank Blank line after term, indented marker, alternate markers: apple ~ red fruit ~ computer orange ~ orange fruit 1. sublist 2. sublist # HTML Blocks Simple block on one line:
                    foo
                    And nested without indentation:
                    foo
                    bar
                    Interpreted markdown in a table:
                    This is *emphasized* And this is **strong**
                    Here's a simple block:
                    foo
                    This should be a code block, though:
                    foo
                    As should this:
                    foo
                    Now, nested:
                    foo
                    This should just be an HTML comment: Multiline: Code block: Just plain comment, with trailing spaces on the line: Code:
                    Hr's:








                    ----- # Inline Markup This is *emphasized*, and so _is this_. This is **strong**, and so __is this__. An *[emphasized link](/url)*. ***This is strong and em.*** So is ***this*** word. ___This is strong and em.___ So is ___this___ word. This is code: `>`, `$`, `\`, `\$`, ``. ~~This is *strikeout*.~~ Superscripts: a^bc^d a^*hello*^ a^hello\ there^. Subscripts: H~2~O, H~23~O, H~many\ of\ them~O. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. ----- # Smart quotes, ellipses, dashes "Hello," said the spider. "'Shelob' is my name." 'A', 'B', and 'C' are letters. 'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.' 'He said, "I want to go."' Were you alive in the 70's? Here is some quoted '`code`' and a "[quoted link][1]". Some dashes: one---two --- three---four --- five. Dashes between numbers: 5--7, 255--66, 1987--1999. Ellipses...and...and.... ----- # LaTeX - \cite[22-23]{smith.1899} - $2+2=4$ - $x \in y$ - $\alpha \wedge \omega$ - $223$ - $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: $\alpha + \omega \times x^2$. These shouldn't be math: - To get the famous equation, write `$e = mc^2$`. - $22,000 is a *lot* of money. So is $34,000. (It worked if "lot" is emphasized.) - Shoes ($20) and socks ($5). - Escaped `$`: $73 *this should be emphasized* 23\$. Here's a LaTeX table: \begin{tabular}{|l|l|}\hline Animal & Number \\ \hline Dog & 2 \\ Cat & 1 \\ \hline \end{tabular} * * * * * # Special Characters Here is some unicode: - I hat: Î - o umlaut: ö - section: § - set membership: ∈ - copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \\ Backtick: \` Asterisk: \* Underscore: \_ Left brace: \{ Right brace: \} Left bracket: \[ Right bracket: \] Left paren: \( Right paren: \) Greater-than: \> Hash: \# Period: \. Bang: \! Plus: \+ Minus: \- - - - - - - - - - - - - - # Links ## Explicit Just a [URL](/url/). [URL and title](/url/ "title"). [URL and title](/url/ "title preceded by two spaces"). [URL and title](/url/ "title preceded by a tab"). [URL and title](/url/ "title with "quotes" in it") [URL and title](/url/ 'title with single quotes') [with\_underscore](/url/with_underscore) [Email link](mailto:nobody@nowhere.net) [Empty](). ## Reference Foo [bar] [a]. Foo [bar][a]. Foo [bar] [a]. [a]: /url/ With [embedded [brackets]] [b]. [b] by itself should be a link. Indented [once][]. Indented [twice][]. Indented [thrice][]. This should [not][] be a link. [once]: /url [twice]: /url [thrice]: /url [not]: /url [b]: /url/ Foo [bar][]. Foo [biz](/url/ "Title with "quote" inside"). [bar]: /url/ "Title with "quotes" inside" ## With ampersands Here's a [link with an ampersand in the URL] [1]. Here's a link with an amersand in the link text: [AT&T] [2]. Here's an [inline link](/script?foo=1&bar=2). Here's an [inline link in pointy braces](). [1]: http://example.com/?foo=1&bar=2 [2]: http://att.com/ "AT&T" ## Autolinks With an ampersand: * In a list? * * It should. An e-mail address: > Blockquoted: Auto-links should not occur here: `` or here: ---- # Images From "Voyage dans la Lune" by Georges Melies (1902): ![lalune][] [lalune]: lalune.jpg "Voyage dans la Lune" Here is a movie ![movie](movie.jpg) icon. ---- # Footnotes Here is a footnote reference,[^1] and another.[^longnote] This should *not* be a footnote reference, because it contains a space.[^my note] Here is an inline note.^[This is *easier* to type. Inline notes may contain [links](http://google.com) and `]` verbatim characters, as well as [bracketed text].] > Notes can go in quotes.^[In quote.] 1. And in list items.^[In list.] [^longnote]: Here's the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). { } If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. This paragraph should not be part of the note, as it is not indented. [^1]: Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. pandoc-1.19.2.4/tests/writer.latex0000644000000000000000000004102113155240143015111 0ustar0000000000000000\documentclass[]{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} \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 }{} \PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref \usepackage{fancyvrb} \usepackage[unicode=true]{hyperref} \hypersetup{ pdftitle={Pandoc Test Suite}, pdfauthor={John MacFarlane; Anonymous}, pdfborder={0 0 0}, breaklinks=true} \urlstyle{same} % don't use monospace font for urls \VerbatimFootnotes % allows verbatim text in footnotes \usepackage{graphicx,grffile} \makeatletter \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} \makeatother % Scale images if necessary, so that they will not overflow the page % margins by default, and it is still possible to overwrite the defaults % using explicit options in \includegraphics[width, height, ...]{} \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} \usepackage[normalem]{ulem} % avoid problems with \sout in headers with hyperref: \pdfstringdefDisableCommands{\renewcommand{\sout}{}} \IfFileExists{parskip.sty}{% \usepackage{parskip} }{% else \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} % 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 % set default figure placement to htbp \makeatletter \def\fps@figure{htbp} \makeatother \title{Pandoc Test Suite} \author{John MacFarlane \and Anonymous} \date{July 17, 2006} \begin{document} \maketitle This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite. \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} \section{Headers}\label{headers} \subsection{\texorpdfstring{Level 2 with an \href{/url}{embedded link}}{Level 2 with an embedded link}}\label{level-2-with-an-embedded-link} \subsubsection{\texorpdfstring{Level 3 with \emph{emphasis}}{Level 3 with emphasis}}\label{level-3-with-emphasis} \paragraph{Level 4}\label{level-4} \subparagraph{Level 5}\label{level-5} \section{Level 1}\label{level-1} \subsection{\texorpdfstring{Level 2 with \emph{emphasis}}{Level 2 with emphasis}}\label{level-2-with-emphasis} \subsubsection{Level 3}\label{level-3} with no blank line \subsection{Level 2}\label{level-2} with no blank line \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} \section{Paragraphs}\label{paragraphs} Here's a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here's one with a bullet. * criminey. There should be a hard line break\\ here. \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} \section{Block Quotes}\label{block-quotes} E-mail style: \begin{quote} This is a block quote. It is pretty short. \end{quote} \begin{quote} Code in a block quote: \begin{verbatim} sub status { print "working"; } \end{verbatim} A list: \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item item one \item item two \end{enumerate} Nested block quotes: \begin{quote} nested \end{quote} \begin{quote} nested \end{quote} \end{quote} This should not be a block quote: 2 \textgreater{} 1. And a following paragraph. \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} \section{Code Blocks}\label{code-blocks} Code: \begin{verbatim} ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab \end{verbatim} And: \begin{verbatim} this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ \end{verbatim} \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} \section{Lists}\label{lists} \subsection{Unordered}\label{unordered} Asterisks tight: \begin{itemize} \tightlist \item asterisk 1 \item asterisk 2 \item asterisk 3 \end{itemize} Asterisks loose: \begin{itemize} \item asterisk 1 \item asterisk 2 \item asterisk 3 \end{itemize} Pluses tight: \begin{itemize} \tightlist \item Plus 1 \item Plus 2 \item Plus 3 \end{itemize} Pluses loose: \begin{itemize} \item Plus 1 \item Plus 2 \item Plus 3 \end{itemize} Minuses tight: \begin{itemize} \tightlist \item Minus 1 \item Minus 2 \item Minus 3 \end{itemize} Minuses loose: \begin{itemize} \item Minus 1 \item Minus 2 \item Minus 3 \end{itemize} \subsection{Ordered}\label{ordered} Tight: \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item First \item Second \item Third \end{enumerate} and: \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item One \item Two \item Three \end{enumerate} Loose using tabs: \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \item First \item Second \item Third \end{enumerate} and using spaces: \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \item One \item Two \item Three \end{enumerate} Multiple paragraphs: \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \item Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog's back. \item Item 2. \item Item 3. \end{enumerate} \subsection{Nested}\label{nested} \begin{itemize} \tightlist \item Tab \begin{itemize} \tightlist \item Tab \begin{itemize} \tightlist \item Tab \end{itemize} \end{itemize} \end{itemize} Here's another: \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item First \item Second: \begin{itemize} \tightlist \item Fee \item Fie \item Foe \end{itemize} \item Third \end{enumerate} Same thing but with paragraphs: \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \item First \item Second: \begin{itemize} \tightlist \item Fee \item Fie \item Foe \end{itemize} \item Third \end{enumerate} \subsection{Tabs and spaces}\label{tabs-and-spaces} \begin{itemize} \item this is a list item indented with tabs \item this is a list item indented with spaces \begin{itemize} \item this is an example list item indented with tabs \item this is an example list item indented with spaces \end{itemize} \end{itemize} \subsection{Fancy list markers}\label{fancy-list-markers} \begin{enumerate} \def\labelenumi{(\arabic{enumi})} \setcounter{enumi}{1} \item begins with 2 \item and now 3 with a continuation \begin{enumerate} \def\labelenumii{\roman{enumii}.} \setcounter{enumii}{3} \tightlist \item sublist with roman numerals, starting with 4 \item more items \begin{enumerate} \def\labelenumiii{(\Alph{enumiii})} \tightlist \item a subsublist \item a subsublist \end{enumerate} \end{enumerate} \end{enumerate} Nesting: \begin{enumerate} \def\labelenumi{\Alph{enumi}.} \tightlist \item Upper Alpha \begin{enumerate} \def\labelenumii{\Roman{enumii}.} \tightlist \item Upper Roman. \begin{enumerate} \def\labelenumiii{(\arabic{enumiii})} \setcounter{enumiii}{5} \tightlist \item Decimal start with 6 \begin{enumerate} \def\labelenumiv{\alph{enumiv})} \setcounter{enumiv}{2} \tightlist \item Lower alpha with paren \end{enumerate} \end{enumerate} \end{enumerate} \end{enumerate} Autonumbering: \begin{enumerate} \tightlist \item Autonumber. \item More. \begin{enumerate} \tightlist \item Nested. \end{enumerate} \end{enumerate} Should not be a list item: M.A.~2007 B. Williams \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} \section{Definition Lists}\label{definition-lists} Tight using spaces: \begin{description} \tightlist \item[apple] red fruit \item[orange] orange fruit \item[banana] yellow fruit \end{description} Tight using tabs: \begin{description} \tightlist \item[apple] red fruit \item[orange] orange fruit \item[banana] yellow fruit \end{description} Loose: \begin{description} \item[apple] red fruit \item[orange] orange fruit \item[banana] yellow fruit \end{description} Multiple blocks with italics: \begin{description} \item[\emph{apple}] red fruit contains seeds, crisp, pleasant to taste \item[\emph{orange}] orange fruit \begin{verbatim} { orange code block } \end{verbatim} \begin{quote} orange block quote \end{quote} \end{description} Multiple definitions, tight: \begin{description} \tightlist \item[apple] red fruit computer \item[orange] orange fruit bank \end{description} Multiple definitions, loose: \begin{description} \item[apple] red fruit computer \item[orange] orange fruit bank \end{description} Blank line after term, indented marker, alternate markers: \begin{description} \item[apple] red fruit computer \item[orange] orange fruit \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item sublist \item sublist \end{enumerate} \end{description} \section{HTML Blocks}\label{html-blocks} Simple block on one line: foo And nested without indentation: foo bar Interpreted markdown in a table: This is \emph{emphasized} And this is \textbf{strong} Here's a simple block: foo This should be a code block, though: \begin{verbatim}
                    foo
                    \end{verbatim} As should this: \begin{verbatim}
                    foo
                    \end{verbatim} Now, nested: foo This should just be an HTML comment: Multiline: Code block: \begin{verbatim} \end{verbatim} Just plain comment, with trailing spaces on the line: Code: \begin{verbatim}
                    \end{verbatim} Hr's: \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} \section{Inline Markup}\label{inline-markup} This is \emph{emphasized}, and so \emph{is this}. This is \textbf{strong}, and so \textbf{is this}. An \emph{\href{/url}{emphasized link}}. \textbf{\emph{This is strong and em.}} So is \textbf{\emph{this}} word. \textbf{\emph{This is strong and em.}} So is \textbf{\emph{this}} word. This is code: \texttt{\textgreater{}}, \texttt{\$}, \texttt{\textbackslash{}}, \texttt{\textbackslash{}\$}, \texttt{\textless{}html\textgreater{}}. \sout{This is \emph{strikeout}.} Superscripts: a\textsuperscript{bc}d a\textsuperscript{\emph{hello}} a\textsuperscript{hello~there}. Subscripts: H\textsubscript{2}O, H\textsubscript{23}O, H\textsubscript{many~of~them}O. These should not be superscripts or subscripts, because of the unescaped spaces: a\^{}b c\^{}d, a\textasciitilde{}b c\textasciitilde{}d. \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} \section{Smart quotes, ellipses, dashes}\label{smart-quotes-ellipses-dashes} ``Hello,'' said the spider. ``\,`Shelob' is my name.'' `A', `B', and `C' are letters. `Oak,' `elm,' and `beech' are names of trees. So is `pine.' `He said, ``I want to go.''\,' Were you alive in the 70's? Here is some quoted `\texttt{code}' and a ``\href{http://example.com/?foo=1\&bar=2}{quoted link}''. Some dashes: one---two --- three---four --- five. Dashes between numbers: 5--7, 255--66, 1987--1999. Ellipses\ldots{}and\ldots{}and\ldots{}. \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} \section{LaTeX}\label{latex} \begin{itemize} \tightlist \item \cite[22-23]{smith.1899} \item \(2+2=4\) \item \(x \in y\) \item \(\alpha \wedge \omega\) \item \(223\) \item \(p\)-Tree \item Here's some display math: \[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\] \item Here's one that has a line break in it: \(\alpha + \omega \times x^2\). \end{itemize} These shouldn't be math: \begin{itemize} \tightlist \item To get the famous equation, write \texttt{\$e\ =\ mc\^{}2\$}. \item \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if ``lot'' is emphasized.) \item Shoes (\$20) and socks (\$5). \item Escaped \texttt{\$}: \$73 \emph{this should be emphasized} 23\$. \end{itemize} Here's a LaTeX table: \begin{tabular}{|l|l|}\hline Animal & Number \\ \hline Dog & 2 \\ Cat & 1 \\ \hline \end{tabular} \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} \section{Special Characters}\label{special-characters} Here is some unicode: \begin{itemize} \tightlist \item I hat: Î \item o umlaut: ö \item section: § \item set membership: ∈ \item copyright: © \end{itemize} AT\&T has an ampersand in their name. AT\&T is another way to write it. This \& that. 4 \textless{} 5. 6 \textgreater{} 5. Backslash: \textbackslash{} Backtick: ` Asterisk: * Underscore: \_ Left brace: \{ Right brace: \} Left bracket: {[} Right bracket: {]} Left paren: ( Right paren: ) Greater-than: \textgreater{} Hash: \# Period: . Bang: ! Plus: + Minus: - \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} \section{Links}\label{links} \subsection{Explicit}\label{explicit} Just a \href{/url/}{URL}. \href{/url/}{URL and title}. \href{/url/}{URL and title}. \href{/url/}{URL and title}. \href{/url/}{URL and title} \href{/url/}{URL and title} \href{/url/with_underscore}{with\_underscore} \href{mailto:nobody@nowhere.net}{Email link} \href{}{Empty}. \subsection{Reference}\label{reference} Foo \href{/url/}{bar}. Foo \href{/url/}{bar}. Foo \href{/url/}{bar}. With \href{/url/}{embedded {[}brackets{]}}. \href{/url/}{b} by itself should be a link. Indented \href{/url}{once}. Indented \href{/url}{twice}. Indented \href{/url}{thrice}. This should {[}not{]}{[}{]} be a link. \begin{verbatim} [not]: /url \end{verbatim} Foo \href{/url/}{bar}. Foo \href{/url/}{biz}. \subsection{With ampersands}\label{with-ampersands} Here's a \href{http://example.com/?foo=1\&bar=2}{link with an ampersand in the URL}. Here's a link with an amersand in the link text: \href{http://att.com/}{AT\&T}. Here's an \href{/script?foo=1\&bar=2}{inline link}. Here's an \href{/script?foo=1\&bar=2}{inline link in pointy braces}. \subsection{Autolinks}\label{autolinks} With an ampersand: \url{http://example.com/?foo=1\&bar=2} \begin{itemize} \tightlist \item In a list? \item \url{http://example.com/} \item It should. \end{itemize} An e-mail address: \href{mailto:nobody@nowhere.net}{\nolinkurl{nobody@nowhere.net}} \begin{quote} Blockquoted: \url{http://example.com/} \end{quote} Auto-links should not occur here: \texttt{\textless{}http://example.com/\textgreater{}} \begin{verbatim} or here: \end{verbatim} \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} \section{Images}\label{images} From ``Voyage dans la Lune'' by Georges Melies (1902): \begin{figure} \centering \includegraphics{lalune.jpg} \caption{lalune} \end{figure} Here is a movie \includegraphics{movie.jpg} icon. \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} \section{Footnotes}\label{footnotes} Here is a footnote reference,\footnote{Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.} and another.\footnote{Here's the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). \begin{Verbatim} { } \end{Verbatim} If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.} This should \emph{not} be a footnote reference, because it contains a space.{[}\^{}my note{]} Here is an inline note.\footnote{This is \emph{easier} to type. Inline notes may contain \href{http://google.com}{links} and \texttt{{]}} verbatim characters, as well as {[}bracketed text{]}.} \begin{quote} Notes can go in quotes.\footnote{In quote.} \end{quote} \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item And in list items.\footnote{In list.} \end{enumerate} This paragraph should not be part of the note, as it is not indented. \end{document} pandoc-1.19.2.4/tests/writer.context0000644000000000000000000003556713155240143015502 0ustar0000000000000000% Enable hyperlinks \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][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes] \definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes] \setupalign[hz,hanging] \setupitaliccorrection[global, always] \setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted \usemodule[simplefonts] \setmainfontfallback[DejaVu Serif][range={greekandcoptic, greekextended}, force=yes, rscale=auto] \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 \starttext \startalignment[middle] {\tfd Pandoc Test Suite} \smallskip {\tfa John MacFarlane\crlf Anonymous} \smallskip {\tfa July 17, 2006} \bigskip \stopalignment This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite. \thinrule \section[headers]{Headers} \subsection[level-2-with-an-embedded-link]{Level 2 with an \useURL[url1][/url][][embedded link]\from[url1]} \subsubsection[level-3-with-emphasis]{Level 3 with {\em emphasis}} \subsubsubsection[level-4]{Level 4} \subsubsubsubsection[level-5]{Level 5} \section[level-1]{Level 1} \subsection[level-2-with-emphasis]{Level 2 with {\em emphasis}} \subsubsection[level-3]{Level 3} with no blank line \subsection[level-2]{Level 2} with no blank line \thinrule \section[paragraphs]{Paragraphs} Here's a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here's one with a bullet. * criminey. There should be a hard line break\crlf here. \thinrule \section[block-quotes]{Block Quotes} E-mail style: \startblockquote This is a block quote. It is pretty short. \stopblockquote \startblockquote Code in a block quote: \starttyping sub status { print "working"; } \stoptyping A list: \startitemize[n,packed][stopper=.] \item item one \item item two \stopitemize Nested block quotes: \startblockquote nested \stopblockquote \startblockquote nested \stopblockquote \stopblockquote This should not be a block quote: 2 > 1. And a following paragraph. \thinrule \section[code-blocks]{Code Blocks} Code: \starttyping ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab \stoptyping And: \starttyping this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ \stoptyping \thinrule \section[lists]{Lists} \subsection[unordered]{Unordered} Asterisks tight: \startitemize[packed] \item asterisk 1 \item asterisk 2 \item asterisk 3 \stopitemize Asterisks loose: \startitemize \item asterisk 1 \item asterisk 2 \item asterisk 3 \stopitemize Pluses tight: \startitemize[packed] \item Plus 1 \item Plus 2 \item Plus 3 \stopitemize Pluses loose: \startitemize \item Plus 1 \item Plus 2 \item Plus 3 \stopitemize Minuses tight: \startitemize[packed] \item Minus 1 \item Minus 2 \item Minus 3 \stopitemize Minuses loose: \startitemize \item Minus 1 \item Minus 2 \item Minus 3 \stopitemize \subsection[ordered]{Ordered} Tight: \startitemize[n,packed][stopper=.] \item First \item Second \item Third \stopitemize and: \startitemize[n,packed][stopper=.] \item One \item Two \item Three \stopitemize Loose using tabs: \startitemize[n][stopper=.] \item First \item Second \item Third \stopitemize and using spaces: \startitemize[n][stopper=.] \item One \item Two \item Three \stopitemize Multiple paragraphs: \startitemize[n][stopper=.] \item Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog's back. \item Item 2. \item Item 3. \stopitemize \subsection[nested]{Nested} \startitemize[packed] \item Tab \startitemize[packed] \item Tab \startitemize[packed] \item Tab \stopitemize \stopitemize \stopitemize Here's another: \startitemize[n,packed][stopper=.] \item First \item Second: \startitemize[packed] \item Fee \item Fie \item Foe \stopitemize \item Third \stopitemize Same thing but with paragraphs: \startitemize[n][stopper=.] \item First \item Second: \startitemize[packed] \item Fee \item Fie \item Foe \stopitemize \item Third \stopitemize \subsection[tabs-and-spaces]{Tabs and spaces} \startitemize \item this is a list item indented with tabs \item this is a list item indented with spaces \startitemize \item this is an example list item indented with tabs \item this is an example list item indented with spaces \stopitemize \stopitemize \subsection[fancy-list-markers]{Fancy list markers} \startitemize[n][start=2,left=(,stopper=),width=2.0em] \item begins with 2 \item and now 3 with a continuation \startitemize[r,packed][start=4,stopper=.,width=2.0em] \item sublist with roman numerals, starting with 4 \item more items \startitemize[A,packed][left=(,stopper=),width=2.0em] \item a subsublist \item a subsublist \stopitemize \stopitemize \stopitemize Nesting: \startitemize[A,packed][stopper=.] \item Upper Alpha \startitemize[R,packed][stopper=.] \item Upper Roman. \startitemize[n,packed][start=6,left=(,stopper=),width=2.0em] \item Decimal start with 6 \startitemize[a,packed][start=3,stopper=)] \item Lower alpha with paren \stopitemize \stopitemize \stopitemize \stopitemize Autonumbering: \startitemize[n,packed] \item Autonumber. \item More. \startitemize[a,packed] \item Nested. \stopitemize \stopitemize Should not be a list item: M.A.~2007 B. Williams \thinrule \section[definition-lists]{Definition Lists} Tight using spaces: \startdescription{apple} red fruit \stopdescription \startdescription{orange} orange fruit \stopdescription \startdescription{banana} yellow fruit \stopdescription Tight using tabs: \startdescription{apple} red fruit \stopdescription \startdescription{orange} orange fruit \stopdescription \startdescription{banana} yellow fruit \stopdescription Loose: \startdescription{apple} red fruit \stopdescription \startdescription{orange} orange fruit \stopdescription \startdescription{banana} yellow fruit \stopdescription Multiple blocks with italics: \startdescription{{\em apple}} red fruit contains seeds, crisp, pleasant to taste \stopdescription \startdescription{{\em orange}} orange fruit \starttyping { orange code block } \stoptyping \startblockquote orange block quote \stopblockquote \stopdescription Multiple definitions, tight: \startdescription{apple} red fruit computer \stopdescription \startdescription{orange} orange fruit bank \stopdescription Multiple definitions, loose: \startdescription{apple} red fruit computer \stopdescription \startdescription{orange} orange fruit bank \stopdescription Blank line after term, indented marker, alternate markers: \startdescription{apple} red fruit computer \stopdescription \startdescription{orange} orange fruit \startitemize[n,packed][stopper=.] \item sublist \item sublist \stopitemize \stopdescription \section[html-blocks]{HTML Blocks} Simple block on one line: foo And nested without indentation: foo bar Interpreted markdown in a table: This is {\em emphasized} And this is {\bf strong} Here's a simple block: foo This should be a code block, though: \starttyping
                    foo
                    \stoptyping As should this: \starttyping
                    foo
                    \stoptyping Now, nested: foo This should just be an HTML comment: Multiline: Code block: \starttyping \stoptyping Just plain comment, with trailing spaces on the line: Code: \starttyping
                    \stoptyping Hr's: \thinrule \section[inline-markup]{Inline Markup} This is {\em emphasized}, and so {\em is this}. This is {\bf strong}, and so {\bf is this}. An {\em \useURL[url2][/url][][emphasized link]\from[url2]}. {\bf {\em This is strong and em.}} So is {\bf {\em this}} word. {\bf {\em This is strong and em.}} So is {\bf {\em this}} word. This is code: \type{>}, \type{$}, \type{\}, \type{\$}, \type{}. \overstrikes{This is {\em strikeout}.} Superscripts: a\high{bc}d a\high{{\em hello}} a\high{hello~there}. Subscripts: H\low{2}O, H\low{23}O, H\low{many~of~them}O. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a\lettertilde{}b c\lettertilde{}d. \thinrule \section[smart-quotes-ellipses-dashes]{Smart quotes, ellipses, dashes} \quotation{Hello,} said the spider. \quotation{\quote{Shelob} is my name.} \quote{A}, \quote{B}, and \quote{C} are letters. \quote{Oak,} \quote{elm,} and \quote{beech} are names of trees. So is \quote{pine.} \quote{He said, \quotation{I want to go.}} Were you alive in the 70's? Here is some quoted \quote{\type{code}} and a \quotation{\useURL[url3][http://example.com/?foo=1&bar=2][][quoted link]\from[url3]}. Some dashes: one---two --- three---four --- five. Dashes between numbers: 5--7, 255--66, 1987--1999. Ellipses\ldots{}and\ldots{}and\ldots{}. \thinrule \section[latex]{LaTeX} \startitemize[packed] \item \cite[22-23]{smith.1899} \item $2+2=4$ \item $x \in y$ \item $\alpha \wedge \omega$ \item $223$ \item $p$-Tree \item Here's some display math: \startformula \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h} \stopformula \item Here's one that has a line break in it: $\alpha + \omega \times x^2$. \stopitemize These shouldn't be math: \startitemize[packed] \item To get the famous equation, write \type{$e = mc^2$}. \item \$22,000 is a {\em lot} of money. So is \$34,000. (It worked if \quotation{lot} is emphasized.) \item Shoes (\$20) and socks (\$5). \item Escaped \type{$}: \$73 {\em this should be emphasized} 23\$. \stopitemize Here's a LaTeX table: \thinrule \section[special-characters]{Special Characters} Here is some unicode: \startitemize[packed] \item I hat: Î \item o umlaut: ö \item section: § \item set membership: ∈ \item copyright: © \stopitemize AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \letterbackslash{} Backtick: ` Asterisk: * Underscore: _ Left brace: \{ Right brace: \} Left bracket: {[} Right bracket: {]} Left paren: ( Right paren: ) Greater-than: > Hash: \# Period: . Bang: ! Plus: + Minus: - \thinrule \section[links]{Links} \subsection[explicit]{Explicit} Just a \useURL[url4][/url/][][URL]\from[url4]. \useURL[url5][/url/][][URL and title]\from[url5]. \useURL[url6][/url/][][URL and title]\from[url6]. \useURL[url7][/url/][][URL and title]\from[url7]. \useURL[url8][/url/][][URL and title]\from[url8] \useURL[url9][/url/][][URL and title]\from[url9] \useURL[url10][/url/with_underscore][][with_underscore]\from[url10] \useURL[url11][mailto:nobody@nowhere.net][][Email link]\from[url11] \useURL[url12][][][Empty]\from[url12]. \subsection[reference]{Reference} Foo \useURL[url13][/url/][][bar]\from[url13]. Foo \useURL[url14][/url/][][bar]\from[url14]. Foo \useURL[url15][/url/][][bar]\from[url15]. With \useURL[url16][/url/][][embedded {[}brackets{]}]\from[url16]. \useURL[url17][/url/][][b]\from[url17] by itself should be a link. Indented \useURL[url18][/url][][once]\from[url18]. Indented \useURL[url19][/url][][twice]\from[url19]. Indented \useURL[url20][/url][][thrice]\from[url20]. This should {[}not{]}{[}{]} be a link. \starttyping [not]: /url \stoptyping Foo \useURL[url21][/url/][][bar]\from[url21]. Foo \useURL[url22][/url/][][biz]\from[url22]. \subsection[with-ampersands]{With ampersands} Here's a \useURL[url23][http://example.com/?foo=1&bar=2][][link with an ampersand in the URL]\from[url23]. Here's a link with an amersand in the link text: \useURL[url24][http://att.com/][][AT&T]\from[url24]. Here's an \useURL[url25][/script?foo=1&bar=2][][inline link]\from[url25]. Here's an \useURL[url26][/script?foo=1&bar=2][][inline link in pointy braces]\from[url26]. \subsection[autolinks]{Autolinks} With an ampersand: \useURL[url27][http://example.com/?foo=1&bar=2]\from[url27] \startitemize[packed] \item In a list? \item \useURL[url28][http://example.com/]\from[url28] \item It should. \stopitemize An e-mail address: \useURL[url29][mailto:nobody@nowhere.net][][nobody@nowhere.net]\from[url29] \startblockquote Blockquoted: \useURL[url30][http://example.com/]\from[url30] \stopblockquote Auto-links should not occur here: \type{} \starttyping or here: \stoptyping \thinrule \section[images]{Images} From \quotation{Voyage dans la Lune} by Georges Melies (1902): \placefigure{lalune}{\externalfigure[lalune.jpg]} Here is a movie {\externalfigure[movie.jpg]} icon. \thinrule \section[footnotes]{Footnotes} Here is a footnote reference,\footnote{Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.} and another.\startbuffer Here's the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). \starttyping { } \stoptyping If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.\stopbuffer\footnote{\getbuffer} This should {\em not} be a footnote reference, because it contains a space.{[}^my note{]} Here is an inline note.\footnote{This is {\em easier} to type. Inline notes may contain \useURL[url31][http://google.com][][links]\from[url31] and \type{]} verbatim characters, as well as {[}bracketed text{]}.} \startblockquote Notes can go in quotes.\footnote{In quote.} \stopblockquote \startitemize[n,packed][stopper=.] \item And in list items.\footnote{In list.} \stopitemize This paragraph should not be part of the note, as it is not indented. \stoptext pandoc-1.19.2.4/tests/writer.docbook0000644000000000000000000007215113155240143015424 0ustar0000000000000000
                    Pandoc Test Suite 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. Headers Level 2 with an <ulink url="/url">embedded link</ulink> Level 3 with <emphasis>emphasis</emphasis> Level 4 Level 5 Level 1 Level 2 with <emphasis>emphasis</emphasis> Level 3 with no blank line Level 2 with no blank line Paragraphs Here’s a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here’s one with a bullet. * criminey. There should be a hard line break here. Block Quotes E-mail style:
                    This is a block quote. It is pretty short.
                    Code in a block quote: sub status { print "working"; } A list: item one item two Nested block quotes:
                    nested
                    nested
                    This should not be a block quote: 2 > 1. And a following paragraph.
                    Code Blocks Code: ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab And: this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ Lists Unordered Asterisks tight: asterisk 1 asterisk 2 asterisk 3 Asterisks loose: asterisk 1 asterisk 2 asterisk 3 Pluses tight: Plus 1 Plus 2 Plus 3 Pluses loose: Plus 1 Plus 2 Plus 3 Minuses tight: Minus 1 Minus 2 Minus 3 Minuses loose: Minus 1 Minus 2 Minus 3 Ordered Tight: First Second Third and: One Two Three Loose using tabs: First Second Third and using spaces: One Two Three Multiple paragraphs: Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. Item 2. Item 3. Nested Tab Tab Tab Here’s another: First Second: Fee Fie Foe Third Same thing but with paragraphs: First Second: Fee Fie Foe Third Tabs and spaces this is a list item indented with tabs this is a list item indented with spaces this is an example list item indented with tabs this is an example list item indented with spaces Fancy list markers begins with 2 and now 3 with a continuation sublist with roman numerals, starting with 4 more items a subsublist a subsublist Nesting: Upper Alpha Upper Roman. Decimal start with 6 Lower alpha with paren Autonumbering: Autonumber. More. Nested. Should not be a list item: M.A. 2007 B. Williams Definition Lists Tight using spaces: apple red fruit orange orange fruit banana yellow fruit Tight using tabs: apple red fruit orange orange fruit banana yellow fruit Loose: apple red fruit orange orange fruit banana yellow fruit Multiple blocks with italics: apple red fruit contains seeds, crisp, pleasant to taste orange orange fruit { orange code block }
                    orange block quote
                    Multiple definitions, tight: apple red fruit computer orange orange fruit bank Multiple definitions, loose: apple red fruit computer orange orange fruit bank Blank line after term, indented marker, alternate markers: apple red fruit computer orange orange fruit sublist sublist
                    HTML Blocks Simple block on one line: foo And nested without indentation: foo bar Interpreted markdown in a table:
                    This is emphasized And this is strong
                    Here’s a simple block: foo This should be a code block, though: <div> foo </div> As should this: <div>foo</div> Now, nested: foo This should just be an HTML comment: Multiline: Code block: <!-- Comment --> Just plain comment, with trailing spaces on the line: Code: <hr /> Hr’s:








                    Inline Markup This is emphasized, and so is this. This is strong, and so is this. An emphasized link. This is strong and em. So is this word. This is strong and em. So is this word. This is code: >, $, \, \$, <html>. This is strikeout. Superscripts: abcd ahello ahello there. Subscripts: H2O, H23O, Hmany of themO. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. Smart quotes, ellipses, dashes Hello, said the spider. Shelob is my name. A, B, and C are letters. Oak, elm, and beech are names of trees. So is pine. He said, I want to go. Were you alive in the 70’s? Here is some quoted code and a quoted link. Some dashes: one—two — three—four — five. Dashes between numbers: 5–7, 255–66, 1987–1999. Ellipses…and…and…. LaTeX 2 + 2 = 4 x ∈ y α ∧ ω 223 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. These shouldn’t be math: To get the famous equation, write $e = mc^2$. $22,000 is a lot of money. So is $34,000. (It worked if lot is emphasized.) Shoes ($20) and socks ($5). Escaped $: $73 this should be emphasized 23$. Here’s a LaTeX table: Special Characters Here is some unicode: I hat: Î o umlaut: ö section: § set membership: ∈ copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \ Backtick: ` Asterisk: * Underscore: _ Left brace: { Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: - Links Explicit Just a URL. URL and title. URL and title. URL and title. URL and title URL and title with_underscore Email link (nobody@nowhere.net) Empty. Reference Foo bar. Foo bar. Foo bar. With embedded [brackets]. b by itself should be a link. Indented once. Indented twice. Indented thrice. This should [not][] be a link. [not]: /url Foo bar. Foo biz. With ampersands Here’s a link with an ampersand in the URL. Here’s a link with an amersand in the link text: AT&T. Here’s an inline link. Here’s an inline link in pointy braces. Autolinks With an ampersand: http://example.com/?foo=1&bar=2 In a list? http://example.com/ It should. An e-mail address: nobody@nowhere.net
                    Blockquoted: http://example.com/
                    Auto-links should not occur here: <http://example.com/> or here: <http://example.com/>
                    Images From Voyage dans la Lune by Georges Melies (1902):
                    lalune lalune
                    Here is a movie icon.
                    Footnotes Here is a footnote reference, Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. and another. Here’s the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). { <code> } If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. This should not be a footnote reference, because it contains a space.[^my note] Here is an inline note. This is easier to type. Inline notes may contain links and ] verbatim characters, as well as [bracketed text].
                    Notes can go in quotes. In quote.
                    And in list items. In list. This paragraph should not be part of the note, as it is not indented.
                    pandoc-1.19.2.4/tests/writer.docbook50000644000000000000000000007206613155240143015516 0ustar0000000000000000
                    Pandoc Test Suite 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.
                    Headers
                    Level 2 with an <link xlink:href="/url">embedded link</link>
                    Level 3 with <emphasis>emphasis</emphasis>
                    Level 4
                    Level 5
                    Level 1
                    Level 2 with <emphasis>emphasis</emphasis>
                    Level 3 with no blank line
                    Level 2 with no blank line
                    Paragraphs Here’s a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here’s one with a bullet. * criminey. There should be a hard line break here.
                    Block Quotes E-mail style:
                    This is a block quote. It is pretty short.
                    Code in a block quote: sub status { print "working"; } A list: item one item two Nested block quotes:
                    nested
                    nested
                    This should not be a block quote: 2 > 1. And a following paragraph.
                    Code Blocks Code: ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab And: this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{
                    Lists
                    Unordered Asterisks tight: asterisk 1 asterisk 2 asterisk 3 Asterisks loose: asterisk 1 asterisk 2 asterisk 3 Pluses tight: Plus 1 Plus 2 Plus 3 Pluses loose: Plus 1 Plus 2 Plus 3 Minuses tight: Minus 1 Minus 2 Minus 3 Minuses loose: Minus 1 Minus 2 Minus 3
                    Ordered Tight: First Second Third and: One Two Three Loose using tabs: First Second Third and using spaces: One Two Three Multiple paragraphs: Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. Item 2. Item 3.
                    Nested Tab Tab Tab Here’s another: First Second: Fee Fie Foe Third Same thing but with paragraphs: First Second: Fee Fie Foe Third
                    Tabs and spaces this is a list item indented with tabs this is a list item indented with spaces this is an example list item indented with tabs this is an example list item indented with spaces
                    Fancy list markers begins with 2 and now 3 with a continuation sublist with roman numerals, starting with 4 more items a subsublist a subsublist Nesting: Upper Alpha Upper Roman. Decimal start with 6 Lower alpha with paren Autonumbering: Autonumber. More. Nested. Should not be a list item: M.A. 2007 B. Williams
                    Definition Lists Tight using spaces: apple red fruit orange orange fruit banana yellow fruit Tight using tabs: apple red fruit orange orange fruit banana yellow fruit Loose: apple red fruit orange orange fruit banana yellow fruit Multiple blocks with italics: apple red fruit contains seeds, crisp, pleasant to taste orange orange fruit { orange code block }
                    orange block quote
                    Multiple definitions, tight: apple red fruit computer orange orange fruit bank Multiple definitions, loose: apple red fruit computer orange orange fruit bank Blank line after term, indented marker, alternate markers: apple red fruit computer orange orange fruit sublist sublist
                    HTML Blocks Simple block on one line: foo And nested without indentation: foo bar Interpreted markdown in a table: This is emphasized And this is strong Here’s a simple block: foo This should be a code block, though: <div> foo </div> As should this: <div>foo</div> Now, nested: foo This should just be an HTML comment: Multiline: Code block: <!-- Comment --> Just plain comment, with trailing spaces on the line: Code: <hr /> Hr’s:
                    Inline Markup This is emphasized, and so is this. This is strong, and so is this. An emphasized link. This is strong and em. So is this word. This is strong and em. So is this word. This is code: >, $, \, \$, <html>. This is strikeout. Superscripts: abcd ahello ahello there. Subscripts: H2O, H23O, Hmany of themO. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.
                    Smart quotes, ellipses, dashes Hello, said the spider. Shelob is my name. A, B, and C are letters. Oak, elm, and beech are names of trees. So is pine. He said, I want to go. Were you alive in the 70’s? Here is some quoted code and a quoted link. Some dashes: one—two — three—four — five. Dashes between numbers: 5–7, 255–66, 1987–1999. Ellipses…and…and….
                    LaTeX 2 + 2 = 4 x ∈ y α ∧ ω 223 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. These shouldn’t be math: To get the famous equation, write $e = mc^2$. $22,000 is a lot of money. So is $34,000. (It worked if lot is emphasized.) Shoes ($20) and socks ($5). Escaped $: $73 this should be emphasized 23$. Here’s a LaTeX table:
                    Special Characters Here is some unicode: I hat: Î o umlaut: ö section: § set membership: ∈ copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \ Backtick: ` Asterisk: * Underscore: _ Left brace: { Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: -
                    Links
                    Explicit Just a URL. URL and title. URL and title. URL and title. URL and title URL and title with_underscore Email link (nobody@nowhere.net) Empty.
                    Reference Foo bar. Foo bar. Foo bar. With embedded [brackets]. b by itself should be a link. Indented once. Indented twice. Indented thrice. This should [not][] be a link. [not]: /url Foo bar. Foo biz.
                    With ampersands Here’s a link with an ampersand in the URL. Here’s a link with an amersand in the link text: AT&T. Here’s an inline link. Here’s an inline link in pointy braces.
                    Autolinks With an ampersand: http://example.com/?foo=1&bar=2 In a list? http://example.com/ It should. An e-mail address: nobody@nowhere.net
                    Blockquoted: http://example.com/
                    Auto-links should not occur here: <http://example.com/> or here: <http://example.com/>
                    Images From Voyage dans la Lune by Georges Melies (1902):
                    lalune lalune
                    Here is a movie icon.
                    Footnotes Here is a footnote reference, Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. and another. Here’s the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). { <code> } If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. This should not be a footnote reference, because it contains a space.[^my note] Here is an inline note. This is easier to type. Inline notes may contain links and ] verbatim characters, as well as [bracketed text].
                    Notes can go in quotes. In quote.
                    And in list items. In list. This paragraph should not be part of the note, as it is not indented.
                    pandoc-1.19.2.4/tests/writer.html0000644000000000000000000003653613155240143014757 0ustar0000000000000000 Pandoc Test Suite

                    This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite.


                    Headers

                    Level 3 with emphasis

                    Level 4

                    Level 5

                    Level 1

                    Level 2 with emphasis

                    Level 3

                    with no blank line

                    Level 2

                    with no blank line


                    Paragraphs

                    Here’s a regular paragraph.

                    In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.

                    Here’s one with a bullet. * criminey.

                    There should be a hard line break
                    here.


                    Block Quotes

                    E-mail style:

                    This is a block quote. It is pretty short.

                    Code in a block quote:

                    sub status {
                        print "working";
                    }

                    A list:

                    1. item one
                    2. item two

                    Nested block quotes:

                    nested

                    nested

                    This should not be a block quote: 2 > 1.

                    And a following paragraph.


                    Code Blocks

                    Code:

                    ---- (should be four hyphens)
                    
                    sub status {
                        print "working";
                    }
                    
                    this code block is indented by one tab

                    And:

                        this code block is indented by two tabs
                    
                    These should not be escaped:  \$ \\ \> \[ \{

                    Lists

                    Unordered

                    Asterisks tight:

                    • asterisk 1
                    • asterisk 2
                    • asterisk 3

                    Asterisks loose:

                    • asterisk 1

                    • asterisk 2

                    • asterisk 3

                    Pluses tight:

                    • Plus 1
                    • Plus 2
                    • Plus 3

                    Pluses loose:

                    • Plus 1

                    • Plus 2

                    • Plus 3

                    Minuses tight:

                    • Minus 1
                    • Minus 2
                    • Minus 3

                    Minuses loose:

                    • Minus 1

                    • Minus 2

                    • Minus 3

                    Ordered

                    Tight:

                    1. First
                    2. Second
                    3. Third

                    and:

                    1. One
                    2. Two
                    3. Three

                    Loose using tabs:

                    1. First

                    2. Second

                    3. Third

                    and using spaces:

                    1. One

                    2. Two

                    3. Three

                    Multiple paragraphs:

                    1. Item 1, graf one.

                      Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.

                    2. Item 2.

                    3. Item 3.

                    Nested

                    • Tab
                      • Tab
                        • Tab

                    Here’s another:

                    1. First
                    2. Second:
                      • Fee
                      • Fie
                      • Foe
                    3. Third

                    Same thing but with paragraphs:

                    1. First

                    2. Second:

                      • Fee
                      • Fie
                      • Foe
                    3. Third

                    Tabs and spaces

                    • this is a list item indented with tabs

                    • this is a list item indented with spaces

                      • this is an example list item indented with tabs

                      • this is an example list item indented with spaces

                    Fancy list markers

                    1. begins with 2
                    2. and now 3

                      with a continuation

                      1. sublist with roman numerals, starting with 4
                      2. more items
                        1. a subsublist
                        2. a subsublist

                    Nesting:

                    1. Upper Alpha
                      1. Upper Roman.
                        1. Decimal start with 6
                          1. Lower alpha with paren

                    Autonumbering:

                    1. Autonumber.
                    2. More.
                      1. Nested.

                    Should not be a list item:

                    M.A. 2007

                    B. Williams


                    Definition Lists

                    Tight using spaces:

                    apple
                    red fruit
                    orange
                    orange fruit
                    banana
                    yellow fruit

                    Tight using tabs:

                    apple
                    red fruit
                    orange
                    orange fruit
                    banana
                    yellow fruit

                    Loose:

                    apple

                    red fruit

                    orange

                    orange fruit

                    banana

                    yellow fruit

                    Multiple blocks with italics:

                    apple

                    red fruit

                    contains seeds, crisp, pleasant to taste

                    orange

                    orange fruit

                    { orange code block }

                    orange block quote

                    Multiple definitions, tight:

                    apple
                    red fruit
                    computer
                    orange
                    orange fruit
                    bank

                    Multiple definitions, loose:

                    apple

                    red fruit

                    computer

                    orange

                    orange fruit

                    bank

                    Blank line after term, indented marker, alternate markers:

                    apple

                    red fruit

                    computer

                    orange

                    orange fruit

                    1. sublist
                    2. sublist

                    HTML Blocks

                    Simple block on one line:

                    foo

                    And nested without indentation:

                    foo

                    bar

                    Interpreted markdown in a table:

                    This is emphasized And this is strong

                    Here’s a simple block:

                    foo

                    This should be a code block, though:

                    <div>
                        foo
                    </div>

                    As should this:

                    <div>foo</div>

                    Now, nested:

                    foo

                    This should just be an HTML comment:

                    Multiline:

                    Code block:

                    <!-- Comment -->

                    Just plain comment, with trailing spaces on the line:

                    Code:

                    <hr />

                    Hr’s:











                    Inline Markup

                    This is emphasized, and so is this.

                    This is strong, and so is this.

                    An emphasized link.

                    This is strong and em.

                    So is this word.

                    This is strong and em.

                    So is this word.

                    This is code: >, $, \, \$, <html>.

                    This is strikeout.

                    Superscripts: abcd ahello ahello there.

                    Subscripts: H2O, H23O, Hmany of themO.

                    These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.


                    Smart quotes, ellipses, dashes

                    “Hello,” said the spider. “‘Shelob’ is my name.”

                    ‘A’, ‘B’, and ‘C’ are letters.

                    ‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’

                    ‘He said, “I want to go.”’ Were you alive in the 70’s?

                    Here is some quoted ‘code’ and a “quoted link”.

                    Some dashes: one—two — three—four — five.

                    Dashes between numbers: 5–7, 255–66, 1987–1999.

                    Ellipses…and…and….


                    LaTeX

                    • 2 + 2 = 4
                    • x ∈ y
                    • α ∧ ω
                    • 223
                    • 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.

                    These shouldn’t be math:

                    • To get the famous equation, write $e = mc^2$.
                    • $22,000 is a lot of money. So is $34,000. (It worked if “lot” is emphasized.)
                    • Shoes ($20) and socks ($5).
                    • Escaped $: $73 this should be emphasized 23$.

                    Here’s a LaTeX table:


                    Special Characters

                    Here is some unicode:

                    • I hat: Î
                    • o umlaut: ö
                    • section: §
                    • set membership: ∈
                    • copyright: ©

                    AT&T has an ampersand in their name.

                    AT&T is another way to write it.

                    This & that.

                    4 < 5.

                    6 > 5.

                    Backslash: \

                    Backtick: `

                    Asterisk: *

                    Underscore: _

                    Left brace: {

                    Right brace: }

                    Left bracket: [

                    Right bracket: ]

                    Left paren: (

                    Right paren: )

                    Greater-than: >

                    Hash: #

                    Period: .

                    Bang: !

                    Plus: +

                    Minus: -


                    Links

                    Explicit

                    Just a URL.

                    URL and title.

                    URL and title.

                    URL and title.

                    URL and title

                    URL and title

                    with_underscore

                    Email link

                    Empty.

                    Reference

                    Foo bar.

                    Foo bar.

                    Foo bar.

                    With embedded [brackets].

                    b by itself should be a link.

                    Indented once.

                    Indented twice.

                    Indented thrice.

                    This should [not][] be a link.

                    [not]: /url

                    Foo bar.

                    Foo biz.

                    With ampersands

                    Here’s a link with an ampersand in the URL.

                    Here’s a link with an amersand in the link text: AT&T.

                    Here’s an inline link.

                    Here’s an inline link in pointy braces.

                    With an ampersand: http://example.com/?foo=1&bar=2

                    An e-mail address: nobody@nowhere.net

                    Blockquoted: http://example.com/

                    Auto-links should not occur here: <http://example.com/>

                    or here: <http://example.com/>

                    Images

                    From “Voyage dans la Lune” by Georges Melies (1902):

                    lalune

                    lalune

                    Here is a movie movie icon.


                    Footnotes

                    Here is a footnote reference,1 and another.2 This should not be a footnote reference, because it contains a space.[^my note] Here is an inline note.3

                    Notes can go in quotes.4

                    1. And in list items.5

                    This paragraph should not be part of the note, as it is not indented.


                    1. Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.

                    2. Here’s the long note. This one contains multiple blocks.

                      Subsequent blocks are indented to show that they belong to the footnote (as with list items).

                        { <code> }

                      If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.

                    3. This is easier to type. Inline notes may contain links and ] verbatim characters, as well as [bracketed text].

                    4. In quote.

                    5. In list.

                    pandoc-1.19.2.4/tests/writer.man0000644000000000000000000002447713155240143014567 0ustar0000000000000000.TH "Pandoc Test Suite" "" "July 17, 2006" "" "" .hy .PP This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite. .PP * * * * * .SH Headers .SS Level 2 with an embedded link (/url) .SS Level 3 with \f[I]emphasis\f[] .SS Level 4 .SS Level 5 .SH Level 1 .SS Level 2 with \f[I]emphasis\f[] .SS Level 3 .PP with no blank line .SS Level 2 .PP with no blank line .PP * * * * * .SH Paragraphs .PP Here's a regular paragraph. .PP In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard\-wrapped line in the middle of a paragraph looked like a list item. .PP Here's one with a bullet. * criminey. .PP There should be a hard line break .PD 0 .P .PD here. .PP * * * * * .SH Block Quotes .PP E\-mail style: .RS .PP This is a block quote. It is pretty short. .RE .RS .PP Code in a block quote: .IP .nf \f[C] sub\ status\ { \ \ \ \ print\ "working"; } \f[] .fi .PP A list: .IP "1." 3 item one .IP "2." 3 item two .PP Nested block quotes: .RS .PP nested .RE .RS .PP nested .RE .RE .PP This should not be a block quote: 2 > 1. .PP And a following paragraph. .PP * * * * * .SH Code Blocks .PP Code: .IP .nf \f[C] \-\-\-\-\ (should\ be\ four\ hyphens) sub\ status\ { \ \ \ \ print\ "working"; } this\ code\ block\ is\ indented\ by\ one\ tab \f[] .fi .PP And: .IP .nf \f[C] \ \ \ \ this\ code\ block\ is\ indented\ by\ two\ tabs These\ should\ not\ be\ escaped:\ \ \\$\ \\\\\ \\>\ \\[\ \\{ \f[] .fi .PP * * * * * .SH Lists .SS Unordered .PP Asterisks tight: .IP \[bu] 2 asterisk 1 .IP \[bu] 2 asterisk 2 .IP \[bu] 2 asterisk 3 .PP Asterisks loose: .IP \[bu] 2 asterisk 1 .IP \[bu] 2 asterisk 2 .IP \[bu] 2 asterisk 3 .PP Pluses tight: .IP \[bu] 2 Plus 1 .IP \[bu] 2 Plus 2 .IP \[bu] 2 Plus 3 .PP Pluses loose: .IP \[bu] 2 Plus 1 .IP \[bu] 2 Plus 2 .IP \[bu] 2 Plus 3 .PP Minuses tight: .IP \[bu] 2 Minus 1 .IP \[bu] 2 Minus 2 .IP \[bu] 2 Minus 3 .PP Minuses loose: .IP \[bu] 2 Minus 1 .IP \[bu] 2 Minus 2 .IP \[bu] 2 Minus 3 .SS Ordered .PP Tight: .IP "1." 3 First .IP "2." 3 Second .IP "3." 3 Third .PP and: .IP "1." 3 One .IP "2." 3 Two .IP "3." 3 Three .PP Loose using tabs: .IP "1." 3 First .IP "2." 3 Second .IP "3." 3 Third .PP and using spaces: .IP "1." 3 One .IP "2." 3 Two .IP "3." 3 Three .PP Multiple paragraphs: .IP "1." 3 Item 1, graf one. .RS 4 .PP Item 1. graf two. The quick brown fox jumped over the lazy dog's back. .RE .IP "2." 3 Item 2. .IP "3." 3 Item 3. .SS Nested .IP \[bu] 2 Tab .RS 2 .IP \[bu] 2 Tab .RS 2 .IP \[bu] 2 Tab .RE .RE .PP Here's another: .IP "1." 3 First .IP "2." 3 Second: .RS 4 .IP \[bu] 2 Fee .IP \[bu] 2 Fie .IP \[bu] 2 Foe .RE .IP "3." 3 Third .PP Same thing but with paragraphs: .IP "1." 3 First .IP "2." 3 Second: .RS 4 .IP \[bu] 2 Fee .IP \[bu] 2 Fie .IP \[bu] 2 Foe .RE .IP "3." 3 Third .SS Tabs and spaces .IP \[bu] 2 this is a list item indented with tabs .IP \[bu] 2 this is a list item indented with spaces .RS 2 .IP \[bu] 2 this is an example list item indented with tabs .IP \[bu] 2 this is an example list item indented with spaces .RE .SS Fancy list markers .IP "(2)" 4 begins with 2 .IP "(3)" 4 and now 3 .RS 4 .PP with a continuation .IP "iv." 4 sublist with roman numerals, starting with 4 .IP " v." 4 more items .RS 4 .IP "(A)" 4 a subsublist .IP "(B)" 4 a subsublist .RE .RE .PP Nesting: .IP "A." 3 Upper Alpha .RS 4 .IP "I." 3 Upper Roman. .RS 4 .IP "(6)" 4 Decimal start with 6 .RS 4 .IP "c)" 3 Lower alpha with paren .RE .RE .RE .PP Autonumbering: .IP "1." 3 Autonumber. .IP "2." 3 More. .RS 4 .IP "1." 3 Nested. .RE .PP Should not be a list item: .PP M.A.\ 2007 .PP B. Williams .PP * * * * * .SH Definition Lists .PP Tight using spaces: .TP .B apple red fruit .RS .RE .TP .B orange orange fruit .RS .RE .TP .B banana yellow fruit .RS .RE .PP Tight using tabs: .TP .B apple red fruit .RS .RE .TP .B orange orange fruit .RS .RE .TP .B banana yellow fruit .RS .RE .PP Loose: .TP .B apple red fruit .RS .RE .TP .B orange orange fruit .RS .RE .TP .B banana yellow fruit .RS .RE .PP Multiple blocks with italics: .TP .B \f[I]apple\f[] red fruit .RS .PP contains seeds, crisp, pleasant to taste .RE .TP .B \f[I]orange\f[] orange fruit .RS .IP .nf \f[C] {\ orange\ code\ block\ } \f[] .fi .RS .PP orange block quote .RE .RE .PP Multiple definitions, tight: .TP .B apple red fruit .RS .RE computer .RS .RE .TP .B orange orange fruit .RS .RE bank .RS .RE .PP Multiple definitions, loose: .TP .B apple red fruit .RS .RE computer .RS .RE .TP .B orange orange fruit .RS .RE bank .RS .RE .PP Blank line after term, indented marker, alternate markers: .TP .B apple red fruit .RS .RE computer .RS .RE .TP .B orange orange fruit .RS .IP "1." 3 sublist .IP "2." 3 sublist .RE .SH HTML Blocks .PP Simple block on one line: foo .PP And nested without indentation: .PP foo bar .PP Interpreted markdown in a table: This is \f[I]emphasized\f[] And this is \f[B]strong\f[] .PP Here's a simple block: .PP foo .PP This should be a code block, though: .IP .nf \f[C]
                    \ \ \ \ foo
                    \f[] .fi .PP As should this: .IP .nf \f[C]
                    foo
                    \f[] .fi .PP Now, nested: foo .PP This should just be an HTML comment: .PP Multiline: .PP Code block: .IP .nf \f[C] \f[] .fi .PP Just plain comment, with trailing spaces on the line: .PP Code: .IP .nf \f[C] \f[] .fi .PP Hr's: .PP * * * * * .SH Inline Markup .PP This is \f[I]emphasized\f[], and so \f[I]is this\f[]. .PP This is \f[B]strong\f[], and so \f[B]is this\f[]. .PP An \f[I]emphasized link (/url)\f[]. .PP \f[B]\f[I]This is strong and em.\f[]\f[] .PP So is \f[B]\f[I]this\f[]\f[] word. .PP \f[B]\f[I]This is strong and em.\f[]\f[] .PP So is \f[B]\f[I]this\f[]\f[] word. .PP This is code: \f[C]>\f[], \f[C]$\f[], \f[C]\\\f[], \f[C]\\$\f[], \f[C]\f[]. .PP [STRIKEOUT:This is \f[I]strikeout\f[].] .PP Superscripts: a^bc^d a^\f[I]hello\f[]^ a^hello\ there^. .PP Subscripts: H~2~O, H~23~O, H~many\ of\ them~O. .PP These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. .PP * * * * * .SH Smart quotes, ellipses, dashes .PP \[lq]Hello,\[rq] said the spider. \[lq]`Shelob' is my name.\[rq] .PP `A', `B', and `C' are letters. .PP `Oak,' `elm,' and `beech' are names of trees. So is `pine.' .PP `He said, \[lq]I want to go.\[rq]' Were you alive in the 70's? .PP Here is some quoted `\f[C]code\f[]' and a \[lq]quoted link (http://example.com/?foo=1&bar=2)\[rq]. .PP Some dashes: one\[em]two \[em] three\[em]four \[em] five. .PP Dashes between numbers: 5\[en]7, 255\[en]66, 1987\[en]1999. .PP Ellipses\&...and\&...and\&.... .PP * * * * * .SH LaTeX .IP \[bu] 2 .IP \[bu] 2 2 + 2 = 4 .IP \[bu] 2 \f[I]x\f[] ∈ \f[I]y\f[] .IP \[bu] 2 \f[I]α\f[] ∧ \f[I]ω\f[] .IP \[bu] 2 223 .IP \[bu] 2 \f[I]p\f[]\-Tree .IP \[bu] 2 Here's some display math: .RS $$\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)\-f(x)}{h}$$ .RE .IP \[bu] 2 Here's one that has a line break in it: \f[I]α\f[] + \f[I]ω\f[] × \f[I]x\f[]^2^. .PP These shouldn't be math: .IP \[bu] 2 To get the famous equation, write \f[C]$e\ =\ mc^2$\f[]. .IP \[bu] 2 $22,000 is a \f[I]lot\f[] of money. So is $34,000. (It worked if \[lq]lot\[rq] is emphasized.) .IP \[bu] 2 Shoes ($20) and socks ($5). .IP \[bu] 2 Escaped \f[C]$\f[]: $73 \f[I]this should be emphasized\f[] 23$. .PP Here's a LaTeX table: .PP * * * * * .SH Special Characters .PP Here is some unicode: .IP \[bu] 2 I hat: Î .IP \[bu] 2 o umlaut: ö .IP \[bu] 2 section: § .IP \[bu] 2 set membership: ∈ .IP \[bu] 2 copyright: © .PP AT&T has an ampersand in their name. .PP AT&T is another way to write it. .PP This & that. .PP 4 < 5. .PP 6 > 5. .PP Backslash: \\ .PP Backtick: ` .PP Asterisk: * .PP Underscore: _ .PP Left brace: { .PP Right brace: } .PP Left bracket: [ .PP Right bracket: ] .PP Left paren: ( .PP Right paren: ) .PP Greater\-than: > .PP Hash: # .PP Period: . .PP Bang: ! .PP Plus: + .PP Minus: \- .PP * * * * * .SH Links .SS Explicit .PP Just a URL (/url/). .PP URL and title (/url/). .PP URL and title (/url/). .PP URL and title (/url/). .PP URL and title (/url/) .PP URL and title (/url/) .PP with_underscore (/url/with_underscore) .PP Email link (mailto:nobody@nowhere.net) .PP Empty (). .SS Reference .PP Foo bar (/url/). .PP Foo bar (/url/). .PP Foo bar (/url/). .PP With embedded [brackets] (/url/). .PP b (/url/) by itself should be a link. .PP Indented once (/url). .PP Indented twice (/url). .PP Indented thrice (/url). .PP This should [not][] be a link. .IP .nf \f[C] [not]:\ /url \f[] .fi .PP Foo bar (/url/). .PP Foo biz (/url/). .SS With ampersands .PP Here's a link with an ampersand in the URL (http://example.com/?foo=1&bar=2). .PP Here's a link with an amersand in the link text: AT&T (http://att.com/). .PP Here's an inline link (/script?foo=1&bar=2). .PP Here's an inline link in pointy braces (/script?foo=1&bar=2). .SS Autolinks .PP With an ampersand: .IP \[bu] 2 In a list? .IP \[bu] 2 .IP \[bu] 2 It should. .PP An e\-mail address: .RS .PP Blockquoted: .RE .PP Auto\-links should not occur here: \f[C]\f[] .IP .nf \f[C] or\ here:\ \f[] .fi .PP * * * * * .SH Images .PP From \[lq]Voyage dans la Lune\[rq] by Georges Melies (1902): .PP [IMAGE: lalune (lalune.jpg)] .PP Here is a movie [IMAGE: movie (movie.jpg)] icon. .PP * * * * * .SH Footnotes .PP Here is a footnote reference,[1] and another.[2] This should \f[I]not\f[] be a footnote reference, because it contains a space.[^my note] Here is an inline note.[3] .RS .PP Notes can go in quotes.[4] .RE .IP "1." 3 And in list items.[5] .PP This paragraph should not be part of the note, as it is not indented. .SH NOTES .SS [1] .PP Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. .SS [2] .PP Here's the long note. This one contains multiple blocks. .PP Subsequent blocks are indented to show that they belong to the footnote (as with list items). .IP .nf \f[C] \ \ {\ \ } \f[] .fi .PP If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. .SS [3] .PP This is \f[I]easier\f[] to type. Inline notes may contain links (http://google.com) and \f[C]]\f[] verbatim characters, as well as [bracketed text]. .SS [4] .PP In quote. .SS [5] .PP In list. .SH AUTHORS John MacFarlane; Anonymous. pandoc-1.19.2.4/tests/writer.markdown0000644000000000000000000002463413155240143015631 0ustar0000000000000000--- author: - John MacFarlane - Anonymous date: 'July 17, 2006' title: Pandoc Test Suite --- This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite. ------------------------------------------------------------------------------ Headers ======= Level 2 with an [embedded link](/url) ------------------------------------- ### Level 3 with *emphasis* #### Level 4 ##### Level 5 Level 1 ======= Level 2 with *emphasis* ----------------------- ### Level 3 with no blank line Level 2 ------- with no blank line ------------------------------------------------------------------------------ Paragraphs ========== Here’s a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here’s one with a bullet. \* criminey. There should be a hard line break\ here. ------------------------------------------------------------------------------ Block Quotes ============ E-mail style: > This is a block quote. It is pretty short. > Code in a block quote: > > sub status { > print "working"; > } > > A list: > > 1. item one > 2. item two > > Nested block quotes: > > > nested > > > nested This should not be a block quote: 2 > 1. And a following paragraph. ------------------------------------------------------------------------------ Code Blocks =========== Code: ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab And: this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ ------------------------------------------------------------------------------ Lists ===== Unordered --------- Asterisks tight: - asterisk 1 - asterisk 2 - asterisk 3 Asterisks loose: - asterisk 1 - asterisk 2 - asterisk 3 Pluses tight: - Plus 1 - Plus 2 - Plus 3 Pluses loose: - Plus 1 - Plus 2 - Plus 3 Minuses tight: - Minus 1 - Minus 2 - Minus 3 Minuses loose: - Minus 1 - Minus 2 - Minus 3 Ordered ------- Tight: 1. First 2. Second 3. Third and: 1. One 2. Two 3. Three Loose using tabs: 1. First 2. Second 3. Third and using spaces: 1. One 2. Two 3. Three Multiple paragraphs: 1. Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. 2. Item 2. 3. Item 3. Nested ------ - Tab - Tab - Tab Here’s another: 1. First 2. Second: - Fee - Fie - Foe 3. Third Same thing but with paragraphs: 1. First 2. Second: - Fee - Fie - Foe 3. Third Tabs and spaces --------------- - this is a list item indented with tabs - this is a list item indented with spaces - this is an example list item indented with tabs - this is an example list item indented with spaces Fancy list markers ------------------ (2) begins with 2 (3) and now 3 with a continuation iv. sublist with roman numerals, starting with 4 v. more items (A) a subsublist (B) a subsublist Nesting: A. Upper Alpha I. Upper Roman. (6) Decimal start with 6 c) Lower alpha with paren Autonumbering: 1. Autonumber. 2. More. 1. Nested. Should not be a list item: M.A. 2007 B. Williams ------------------------------------------------------------------------------ Definition Lists ================ Tight using spaces: apple : red fruit orange : orange fruit banana : yellow fruit Tight using tabs: apple : red fruit orange : orange fruit banana : yellow fruit Loose: apple : red fruit orange : orange fruit banana : yellow fruit Multiple blocks with italics: *apple* : red fruit contains seeds, crisp, pleasant to taste *orange* : orange fruit { orange code block } > orange block quote Multiple definitions, tight: apple : red fruit : computer orange : orange fruit : bank Multiple definitions, loose: apple : red fruit : computer orange : orange fruit : bank Blank line after term, indented marker, alternate markers: apple : red fruit : computer orange : orange fruit 1. sublist 2. sublist HTML Blocks =========== Simple block on one line:
                    foo
                    And nested without indentation:
                    foo
                    bar
                    Interpreted markdown in a table:
                    This is *emphasized* And this is **strong**
                    Here’s a simple block:
                    foo
                    This should be a code block, though:
                    foo
                    As should this:
                    foo
                    Now, nested:
                    foo
                    This should just be an HTML comment: Multiline: Code block: Just plain comment, with trailing spaces on the line: Code:
                    Hr’s:








                    ------------------------------------------------------------------------------ Inline Markup ============= This is *emphasized*, and so *is this*. This is **strong**, and so **is this**. An *[emphasized link](/url)*. ***This is strong and em.*** So is ***this*** word. ***This is strong and em.*** So is ***this*** word. This is code: `>`, `$`, `\`, `\$`, ``. ~~This is *strikeout*.~~ Superscripts: a^bc^d a^*hello*^ a^hello there^. Subscripts: H~2~O, H~23~O, H~many of them~O. These should not be superscripts or subscripts, because of the unescaped spaces: a\^b c\^d, a\~b c\~d. ------------------------------------------------------------------------------ Smart quotes, ellipses, dashes ============================== “Hello,” said the spider. “‘Shelob’ is my name.” ‘A’, ‘B’, and ‘C’ are letters. ‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ ‘He said, “I want to go.”’ Were you alive in the 70’s? Here is some quoted ‘`code`’ and a “[quoted link](http://example.com/?foo=1&bar=2)”. Some dashes: one—two — three—four — five. Dashes between numbers: 5–7, 255–66, 1987–1999. Ellipses…and…and…. ------------------------------------------------------------------------------ LaTeX ===== - \cite[22-23]{smith.1899} - $2+2=4$ - $x \in y$ - $\alpha \wedge \omega$ - $223$ - $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: $\alpha + \omega \times x^2$. These shouldn’t be math: - To get the famous equation, write `$e = mc^2$`. - \$22,000 is a *lot* of money. So is \$34,000. (It worked if “lot” is emphasized.) - Shoes (\$20) and socks (\$5). - Escaped `$`: \$73 *this should be emphasized* 23\$. Here’s a LaTeX table: \begin{tabular}{|l|l|}\hline Animal & Number \\ \hline Dog & 2 \\ Cat & 1 \\ \hline \end{tabular} ------------------------------------------------------------------------------ Special Characters ================== Here is some unicode: - I hat: Î - o umlaut: ö - section: § - set membership: ∈ - copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \\ Backtick: \` Asterisk: \* Underscore: \_ Left brace: { Right brace: } Left bracket: \[ Right bracket: \] Left paren: ( Right paren: ) Greater-than: > Hash: \# Period: . Bang: ! Plus: + Minus: - ------------------------------------------------------------------------------ Links ===== Explicit -------- Just a [URL](/url/). [URL and title](/url/ "title"). [URL and title](/url/ "title preceded by two spaces"). [URL and title](/url/ "title preceded by a tab"). [URL and title](/url/ "title with "quotes" in it") [URL and title](/url/ "title with single quotes") [with\_underscore](/url/with_underscore) [Email link](mailto:nobody@nowhere.net) [Empty](). Reference --------- Foo [bar](/url/). Foo [bar](/url/). Foo [bar](/url/). With [embedded \[brackets\]](/url/). [b](/url/) by itself should be a link. Indented [once](/url). Indented [twice](/url). Indented [thrice](/url). This should \[not\]\[\] be a link. [not]: /url Foo [bar](/url/ "Title with "quotes" inside"). Foo [biz](/url/ "Title with "quote" inside"). With ampersands --------------- Here’s a [link with an ampersand in the URL](http://example.com/?foo=1&bar=2). Here’s a link with an amersand in the link text: [AT&T](http://att.com/ "AT&T"). Here’s an [inline link](/script?foo=1&bar=2). Here’s an [inline link in pointy braces](/script?foo=1&bar=2). Autolinks --------- With an ampersand: - In a list? - - It should. An e-mail address: > Blockquoted: Auto-links should not occur here: `` or here: ------------------------------------------------------------------------------ Images ====== From “Voyage dans la Lune” by Georges Melies (1902): ![lalune](lalune.jpg "Voyage dans la Lune") Here is a movie ![movie](movie.jpg) icon. ------------------------------------------------------------------------------ Footnotes ========= Here is a footnote reference,[^1] and another.[^2] This should *not* be a footnote reference, because it contains a space.\[\^my note\] Here is an inline note.[^3] > Notes can go in quotes.[^4] 1. And in list items.[^5] This paragraph should not be part of the note, as it is not indented. [^1]: Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. [^2]: Here’s the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). { } If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. [^3]: This is *easier* to type. Inline notes may contain [links](http://google.com) and `]` verbatim characters, as well as \[bracketed text\]. [^4]: In quote. [^5]: In list. pandoc-1.19.2.4/tests/writer.plain0000644000000000000000000002127713155240143015112 0ustar0000000000000000Pandoc Test Suite 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. ------------------------------------------------------------------------------ HEADERS Level 2 with an embedded link Level 3 with _emphasis_ Level 4 Level 5 LEVEL 1 Level 2 with _emphasis_ Level 3 with no blank line Level 2 with no blank line ------------------------------------------------------------------------------ PARAGRAPHS Here’s a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here’s one with a bullet. * criminey. There should be a hard line break here. ------------------------------------------------------------------------------ BLOCK QUOTES E-mail style: This is a block quote. It is pretty short. Code in a block quote: sub status { print "working"; } A list: 1. item one 2. item two Nested block quotes: nested nested This should not be a block quote: 2 > 1. And a following paragraph. ------------------------------------------------------------------------------ CODE BLOCKS Code: ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab And: this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ ------------------------------------------------------------------------------ LISTS Unordered Asterisks tight: - asterisk 1 - asterisk 2 - asterisk 3 Asterisks loose: - asterisk 1 - asterisk 2 - asterisk 3 Pluses tight: - Plus 1 - Plus 2 - Plus 3 Pluses loose: - Plus 1 - Plus 2 - Plus 3 Minuses tight: - Minus 1 - Minus 2 - Minus 3 Minuses loose: - Minus 1 - Minus 2 - Minus 3 Ordered Tight: 1. First 2. Second 3. Third and: 1. One 2. Two 3. Three Loose using tabs: 1. First 2. Second 3. Third and using spaces: 1. One 2. Two 3. Three Multiple paragraphs: 1. Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. 2. Item 2. 3. Item 3. Nested - Tab - Tab - Tab Here’s another: 1. First 2. Second: - Fee - Fie - Foe 3. Third Same thing but with paragraphs: 1. First 2. Second: - Fee - Fie - Foe 3. Third Tabs and spaces - this is a list item indented with tabs - this is a list item indented with spaces - this is an example list item indented with tabs - this is an example list item indented with spaces Fancy list markers (2) begins with 2 (3) and now 3 with a continuation iv. sublist with roman numerals, starting with 4 v. more items (A) a subsublist (B) a subsublist Nesting: A. Upper Alpha I. Upper Roman. (6) Decimal start with 6 c) Lower alpha with paren Autonumbering: 1. Autonumber. 2. More. 1. Nested. Should not be a list item: M.A. 2007 B. Williams ------------------------------------------------------------------------------ DEFINITION LISTS Tight using spaces: apple red fruit orange orange fruit banana yellow fruit Tight using tabs: apple red fruit orange orange fruit banana yellow fruit Loose: apple red fruit orange orange fruit banana yellow fruit Multiple blocks with italics: _apple_ red fruit contains seeds, crisp, pleasant to taste _orange_ orange fruit { orange code block } orange block quote Multiple definitions, tight: apple red fruit computer orange orange fruit bank Multiple definitions, loose: apple red fruit computer orange orange fruit bank Blank line after term, indented marker, alternate markers: apple red fruit computer orange orange fruit 1. sublist 2. sublist HTML BLOCKS Simple block on one line: foo And nested without indentation: foo bar Interpreted markdown in a table: This is _emphasized_ And this is STRONG Here’s a simple block: foo This should be a code block, though:
                    foo
                    As should this:
                    foo
                    Now, nested: foo This should just be an HTML comment: Multiline: Code block: Just plain comment, with trailing spaces on the line: Code:
                    Hr’s: ------------------------------------------------------------------------------ INLINE MARKUP This is _emphasized_, and so _is this_. This is STRONG, and so IS THIS. An _emphasized link_. _THIS IS STRONG AND EM._ So is _THIS_ word. _THIS IS STRONG AND EM._ So is _THIS_ word. This is code: >, $, \, \$, . ~~This is _strikeout_.~~ Superscripts: abcd a_hello_ ahello there. 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. ------------------------------------------------------------------------------ SMART QUOTES, ELLIPSES, DASHES “Hello,” said the spider. “‘Shelob’ is my name.” ‘A’, ‘B’, and ‘C’ are letters. ‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ ‘He said, “I want to go.”’ Were you alive in the 70’s? Here is some quoted ‘code’ and a “quoted link”. Some dashes: one—two — three—four — five. Dashes between numbers: 5–7, 255–66, 1987–1999. Ellipses…and…and…. ------------------------------------------------------------------------------ LATEX - - 2 + 2 = 4 - x ∈ y - α ∧ ω - 223 - 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: α + ω × x². These shouldn’t be math: - To get the famous equation, write $e = mc^2$. - $22,000 is a _lot_ of money. So is $34,000. (It worked if “lot” is emphasized.) - Shoes ($20) and socks ($5). - Escaped $: $73 _this should be emphasized_ 23$. Here’s a LaTeX table: ------------------------------------------------------------------------------ SPECIAL CHARACTERS Here is some unicode: - I hat: Î - o umlaut: ö - section: § - set membership: ∈ - copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \ Backtick: ` Asterisk: * Underscore: _ Left brace: { Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: - ------------------------------------------------------------------------------ LINKS Explicit Just a URL. URL and title. URL and title. URL and title. URL and title URL and title with_underscore Email link Empty. Reference Foo bar. Foo bar. Foo bar. With embedded [brackets]. b by itself should be a link. Indented once. Indented twice. Indented thrice. This should [not][] be a link. [not]: /url Foo bar. Foo biz. With ampersands Here’s a link with an ampersand in the URL. Here’s a link with an amersand in the link text: AT&T. Here’s an inline link. Here’s an inline link in pointy braces. Autolinks With an ampersand: http://example.com/?foo=1&bar=2 - In a list? - http://example.com/ - It should. An e-mail address: nobody@nowhere.net Blockquoted: http://example.com/ Auto-links should not occur here: or here: ------------------------------------------------------------------------------ IMAGES From “Voyage dans la Lune” by Georges Melies (1902): [lalune] Here is a movie [movie] icon. ------------------------------------------------------------------------------ FOOTNOTES Here is a footnote reference,[1] and another.[2] This should _not_ be a footnote reference, because it contains a space.[^my note] Here is an inline note.[3] Notes can go in quotes.[4] 1. And in list items.[5] This paragraph should not be part of the note, as it is not indented. [1] Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. [2] Here’s the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). { } If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. [3] This is _easier_ to type. Inline notes may contain links and ] verbatim characters, as well as [bracketed text]. [4] In quote. [5] In list. pandoc-1.19.2.4/tests/writer.mediawiki0000644000000000000000000002330013155240143015737 0ustar0000000000000000This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite. ----- = Headers = == Level 2 with an [[url|embedded link]] == === Level 3 with ''emphasis'' === ==== Level 4 ==== ===== Level 5 ===== = Level 1 = == Level 2 with ''emphasis'' == === Level 3 === with no blank line == Level 2 == with no blank line ----- = Paragraphs = Here’s a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here’s one with a bullet. * criminey. There should be a hard line break
                    here. ----- = Block Quotes = E-mail style:
                    This is a block quote. It is pretty short.
                    Code in a block quote:
                    sub status {
                        print "working";
                    }
                    A list: # item one # item two Nested block quotes:
                    nested
                    nested
                    This should not be a block quote: 2 > 1. And a following paragraph. ----- = Code Blocks = Code:
                    ---- (should be four hyphens)
                    
                    sub status {
                        print "working";
                    }
                    
                    this code block is indented by one tab
                    And:
                        this code block is indented by two tabs
                    
                    These should not be escaped:  \$ \\ \> \[ \{
                    ----- = Lists = == Unordered == Asterisks tight: * asterisk 1 * asterisk 2 * asterisk 3 Asterisks loose: * asterisk 1 * asterisk 2 * asterisk 3 Pluses tight: * Plus 1 * Plus 2 * Plus 3 Pluses loose: * Plus 1 * Plus 2 * Plus 3 Minuses tight: * Minus 1 * Minus 2 * Minus 3 Minuses loose: * Minus 1 * Minus 2 * Minus 3 == Ordered == Tight: # First # Second # Third and: # One # Two # Three Loose using tabs: # First # Second # Third and using spaces: # One # Two # Three Multiple paragraphs:
                    1. Item 1, graf one.

                      Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.

                    2. Item 2.

                    3. Item 3.

                    == Nested == * Tab ** Tab *** Tab Here’s another: # First # Second: #* Fee #* Fie #* Foe # Third Same thing but with paragraphs: # First # Second: #* Fee #* Fie #* Foe # Third == Tabs and spaces == * this is a list item indented with tabs * this is a list item indented with spaces ** this is an example list item indented with tabs ** this is an example list item indented with spaces == Fancy list markers ==
                    1. begins with 2
                    2. and now 3

                      with a continuation

                      1. sublist with roman numerals, starting with 4
                      2. more items
                        1. a subsublist
                        2. a subsublist
                    Nesting:
                    1. Upper Alpha
                      1. Upper Roman.
                        1. Decimal start with 6
                          1. Lower alpha with paren
                    Autonumbering: # Autonumber. # More. ## Nested. Should not be a list item: M.A. 2007 B. Williams ----- = Definition Lists = Tight using spaces: ; apple : red fruit ; orange : orange fruit ; banana : yellow fruit Tight using tabs: ; apple : red fruit ; orange : orange fruit ; banana : yellow fruit Loose: ; apple : red fruit ; orange : orange fruit ; banana : yellow fruit Multiple blocks with italics:
                    ''apple''

                    red fruit

                    contains seeds, crisp, pleasant to taste

                    ''orange''

                    orange fruit

                    { orange code block }

                    orange block quote

                    Multiple definitions, tight: ; apple : red fruit : computer ; orange : orange fruit : bank Multiple definitions, loose: ; apple : red fruit : computer ; orange : orange fruit : bank Blank line after term, indented marker, alternate markers: ; apple : red fruit : computer ; orange : orange fruit ;# sublist ;# sublist = HTML Blocks = Simple block on one line:
                    foo
                    And nested without indentation:
                    foo
                    bar
                    Interpreted markdown in a table:
                    This is ''emphasized'' And this is '''strong'''
                    Here’s a simple block:
                    foo
                    This should be a code block, though:
                    <div>
                        foo
                    </div>
                    As should this:
                    <div>foo</div>
                    Now, nested:
                    foo
                    This should just be an HTML comment: Multiline: Code block:
                    <!-- Comment -->
                    Just plain comment, with trailing spaces on the line: Code:
                    <hr />
                    Hr’s:








                    ----- = Inline Markup = This is ''emphasized'', and so ''is this''. This is '''strong''', and so '''is this'''. An ''[[url|emphasized link]]''. '''''This is strong and em.''''' So is '''''this''''' word. '''''This is strong and em.''''' So is '''''this''''' word. This is code: >, $, \, \$, <html>. This is ''strikeout''. Superscripts: abcd a''hello'' ahello there. Subscripts: H2O, H23O, Hmany of themO. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. ----- = Smart quotes, ellipses, dashes = “Hello,” said the spider. “‘Shelob’ is my name.” ‘A’, ‘B’, and ‘C’ are letters. ‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ ‘He said, “I want to go.”’ Were you alive in the 70’s? Here is some quoted ‘code’ and a “[http://example.com/?foo=1&bar=2 quoted link]”. Some dashes: one—two — three—four — five. Dashes between numbers: 5–7, 255–66, 1987–1999. Ellipses…and…and…. ----- = LaTeX = * * 2+2=4 * x \in y * \alpha \wedge \omega * 223 * 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: \alpha + \omega \times x^2. These shouldn’t be math: * To get the famous equation, write $e = mc^2$. * $22,000 is a ''lot'' of money. So is $34,000. (It worked if “lot” is emphasized.) * Shoes ($20) and socks ($5). * Escaped $: $73 ''this should be emphasized'' 23$. Here’s a LaTeX table: ----- = Special Characters = Here is some unicode: * I hat: Î * o umlaut: ö * section: § * set membership: ∈ * copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \ Backtick: ` Asterisk: * Underscore: _ Left brace: { Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: - ----- = Links = == Explicit == Just a [[url/|URL]]. [[url/|URL and title]]. [[url/|URL and title]]. [[url/|URL and title]]. [[url/|URL and title]] [[url/|URL and title]] [[url/with_underscore|with_underscore]] [mailto:nobody@nowhere.net Email link] [[|Empty]]. == Reference == Foo [[url/|bar]]. Foo [[url/|bar]]. Foo [[url/|bar]]. With [[url/|embedded [brackets]]]. [[url/|b]] by itself should be a link. Indented [[url|once]]. Indented [[url|twice]]. Indented [[url|thrice]]. This should [not][] be a link.
                    [not]: /url
                    Foo [[url/|bar]]. Foo [[url/|biz]]. == With ampersands == Here’s a [http://example.com/?foo=1&bar=2 link with an ampersand in the URL]. Here’s a link with an amersand in the link text: [http://att.com/ AT&T]. Here’s an [[script?foo=1&bar=2|inline link]]. Here’s an [[script?foo=1&bar=2|inline link in pointy braces]]. == Autolinks == With an ampersand: http://example.com/?foo=1&bar=2 * In a list? * http://example.com/ * It should. An e-mail address: [mailto:nobody@nowhere.net nobody@nowhere.net]
                    Blockquoted: http://example.com/
                    Auto-links should not occur here: <http://example.com/>
                    or here: <http://example.com/>
                    ----- = Images = From “Voyage dans la Lune” by Georges Melies (1902): [[File:lalune.jpg|frame|none|alt=Voyage dans la Lune|caption lalune]] Here is a movie [[File:movie.jpg|movie]] icon. ----- = Footnotes = Here is a footnote reference,Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. and another.Here’s the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items).
                      { <code> }
                    If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
                    This should ''not'' be a footnote reference, because it contains a space.[^my note] Here is an inline note.This is ''easier'' to type. Inline notes may contain [http://google.com links] and ] verbatim characters, as well as [bracketed text].
                    Notes can go in quotes.In quote.
                    # And in list items.In list. This paragraph should not be part of the note, as it is not indented. pandoc-1.19.2.4/tests/writer.textile0000644000000000000000000002411413155240143015456 0ustar0000000000000000This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite.
                    h1(#headers). Headers h2(#level-2-with-an-embedded-link). Level 2 with an "embedded link":/url h3(#level-3-with-emphasis). Level 3 with _emphasis_ h4(#level-4). Level 4 h5(#level-5). Level 5 h1(#level-1). Level 1 h2(#level-2-with-emphasis). Level 2 with _emphasis_ h3(#level-3). Level 3 with no blank line h2(#level-2). Level 2 with no blank line
                    h1(#paragraphs). Paragraphs Here's a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here's one with a bullet. * criminey. There should be a hard line break here.
                    h1(#block-quotes). Block Quotes E-mail style: bq. This is a block quote. It is pretty short.
                    Code in a block quote: bc. sub status { print "working"; } A list: # item one # item two Nested block quotes: bq. nested bq. nested
                    This should not be a block quote: 2 > 1. And a following paragraph.
                    h1(#code-blocks). Code Blocks Code:
                    ---- (should be four hyphens)
                    
                    sub status {
                        print "working";
                    }
                    
                    this code block is indented by one tab
                    
                    And:
                        this code block is indented by two tabs
                    
                    These should not be escaped:  \$ \\ \> \[ \{
                    

                    h1(#lists). Lists h2(#unordered). Unordered Asterisks tight: * asterisk 1 * asterisk 2 * asterisk 3 Asterisks loose: * asterisk 1 * asterisk 2 * asterisk 3 Pluses tight: * Plus 1 * Plus 2 * Plus 3 Pluses loose: * Plus 1 * Plus 2 * Plus 3 Minuses tight: * Minus 1 * Minus 2 * Minus 3 Minuses loose: * Minus 1 * Minus 2 * Minus 3 h2(#ordered). Ordered Tight: # First # Second # Third and: # One # Two # Three Loose using tabs: # First # Second # Third and using spaces: # One # Two # Three Multiple paragraphs:
                    1. Item 1, graf one.

                      Item 1. graf two. The quick brown fox jumped over the lazy dog's back.

                    2. Item 2.

                    3. Item 3.

                    h2(#nested). Nested * Tab ** Tab *** Tab Here's another: # First # Second: #* Fee #* Fie #* Foe # Third Same thing but with paragraphs: # First # Second: #* Fee #* Fie #* Foe # Third h2(#tabs-and-spaces). Tabs and spaces * this is a list item indented with tabs * this is a list item indented with spaces ** this is an example list item indented with tabs ** this is an example list item indented with spaces h2(#fancy-list-markers). Fancy list markers
                    1. begins with 2
                    2. and now 3

                      with a continuation

                      1. sublist with roman numerals, starting with 4
                      2. more items
                        1. a subsublist
                        2. a subsublist
                    Nesting:
                    1. Upper Alpha
                      1. Upper Roman.
                        1. Decimal start with 6
                          1. Lower alpha with paren
                    Autonumbering: # Autonumber. # More. ## Nested. Should not be a list item: M.A. 2007 B. Williams
                    h1(#definition-lists). Definition Lists Tight using spaces:
                    apple
                    red fruit
                    orange
                    orange fruit
                    banana
                    yellow fruit
                    Tight using tabs:
                    apple
                    red fruit
                    orange
                    orange fruit
                    banana
                    yellow fruit
                    Loose:
                    apple

                    red fruit

                    orange

                    orange fruit

                    banana

                    yellow fruit

                    Multiple blocks with italics:
                    _apple_

                    red fruit

                    contains seeds, crisp, pleasant to taste

                    _orange_

                    orange fruit

                    bc. { orange code block } bq.

                    orange block quote

                    Multiple definitions, tight:
                    apple
                    red fruit
                    computer
                    orange
                    orange fruit
                    bank
                    Multiple definitions, loose:
                    apple

                    red fruit

                    computer

                    orange

                    orange fruit

                    bank

                    Blank line after term, indented marker, alternate markers:
                    apple

                    red fruit

                    computer

                    orange

                    orange fruit

                    1. sublist
                    2. sublist
                    h1(#html-blocks). HTML Blocks Simple block on one line:
                    foo
                    And nested without indentation:
                    foo
                    bar
                    Interpreted markdown in a table:
                    This is _emphasized_ And this is *strong*
                    Here's a simple block:
                    foo
                    This should be a code block, though: bc.
                    foo
                    As should this: bc.
                    foo
                    Now, nested:
                    foo
                    This should just be an HTML comment: Multiline: Code block: bc. Just plain comment, with trailing spaces on the line: Code: bc.
                    Hr's:









                    h1(#inline-markup). Inline Markup This is _emphasized_, and so _is this_. This is *strong*, and so *is this*. An _"emphasized link":/url_. *_This is strong and em._* So is *_this_* word. *_This is strong and em._* So is *_this_* word. This is code: @>@, @$@, @\@, @\$@, @@. -This is _strikeout_.- Superscripts: a[^bc^]d a[^_hello_^] a[^hello there^]. Subscripts: H[~2~]O, H[~23~]O, H[~many of them~]O. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.
                    h1(#smart-quotes-ellipses-dashes). Smart quotes, ellipses, dashes "Hello," said the spider. "'Shelob' is my name." 'A', 'B', and 'C' are letters. 'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.' 'He said, "I want to go."' Were you alive in the 70's? Here is some quoted '@code@' and a ""quoted link":http://example.com/?foo=1&bar=2". Some dashes: one -- two -- three -- four -- five. Dashes between numbers: 5 - 7, 255 - 66, 1987 - 1999. Ellipses...and...and....
                    h1(#latex). LaTeX * * 2+2=4 * x \in y * \alpha \wedge \omega * 223 * 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: \alpha + \omega \times x^2. These shouldn't be math: * To get the famous equation, write @$e = mc^2$@. * $22,000 is a _lot_ of money. So is $34,000. (It worked if "lot" is emphasized.) * Shoes ($20) and socks ($5). * Escaped @$@: $73 _this should be emphasized_ 23$. Here's a LaTeX table:
                    h1(#special-characters). Special Characters Here is some unicode: * I hat: Î * o umlaut: ö * section: § * set membership: ∈ * copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \ Backtick: ` Asterisk: * Underscore: _ Left brace: { Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: -
                    h1(#links). Links h2(#explicit). Explicit Just a "URL":/url/. "URL and title":/url/. "URL and title":/url/. "URL and title":/url/. "URL and title":/url/ "URL and title":/url/ "with_underscore":/url/with_underscore "Email link":mailto:nobody@nowhere.net "Empty":. h2(#reference). Reference Foo "bar":/url/. Foo "bar":/url/. Foo "bar":/url/. With "embedded [brackets]":/url/. "b":/url/ by itself should be a link. Indented "once":/url. Indented "twice":/url. Indented "thrice":/url. This should [not][] be a link. bc. [not]: /url Foo "bar":/url/. Foo "biz":/url/. h2(#with-ampersands). With ampersands Here's a "link with an ampersand in the URL":http://example.com/?foo=1&bar=2. Here's a link with an amersand in the link text: "AT&T":http://att.com/. Here's an "inline link":/script?foo=1&bar=2. Here's an "inline link in pointy braces":/script?foo=1&bar=2. h2(#autolinks). Autolinks With an ampersand: "$":http://example.com/?foo=1&bar=2 * In a list? * "$":http://example.com/ * It should. An e-mail address: "nobody@nowhere.net":mailto:nobody@nowhere.net bq. Blockquoted: "$":http://example.com/ Auto-links should not occur here: @@ bc. or here:
                    h1(#images). Images From "Voyage dans la Lune" by Georges Melies (1902): !lalune.jpg(Voyage dans la Lune)! lalune Here is a movie !movie.jpg(movie)! icon.
                    h1(#footnotes). Footnotes Here is a footnote reference,[1] and another.[2] This should _not_ be a footnote reference, because it contains a space.[^my note] Here is an inline note.[3] bq. Notes can go in quotes.[4] # And in list items.[5] This paragraph should not be part of the note, as it is not indented. fn1. Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. fn2. Here's the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). bc. { } If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. fn3. This is _easier_ to type. Inline notes may contain "links":http://google.com and @]@ verbatim characters, as well as [bracketed text]. fn4. In quote. fn5. In list. pandoc-1.19.2.4/tests/writer.opendocument0000644000000000000000000031465713155240143016516 0ustar0000000000000000 Pandoc Test Suite 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. Headers Level 2 with an embedded link Level 3 with emphasis Level 4 Level 5 Level 1 Level 2 with emphasis Level 3 with no blank line Level 2 with no blank line Paragraphs Here’s a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here’s one with a bullet. * criminey. There should be a hard line breakhere. Block Quotes E-mail style: This is a block quote. It is pretty short. Code in a block quote: sub status { print "working"; } A list: item one item two Nested block quotes: nested nested This should not be a block quote: 2 > 1. And a following paragraph. Code Blocks Code: ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab And: this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ Lists Unordered Asterisks tight: asterisk 1 asterisk 2 asterisk 3 Asterisks loose: asterisk 1 asterisk 2 asterisk 3 Pluses tight: Plus 1 Plus 2 Plus 3 Pluses loose: Plus 1 Plus 2 Plus 3 Minuses tight: Minus 1 Minus 2 Minus 3 Minuses loose: Minus 1 Minus 2 Minus 3 Ordered Tight: First Second Third and: One Two Three Loose using tabs: First Second Third and using spaces: One Two Three Multiple paragraphs: Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. Item 2. Item 3. Nested Tab Tab Tab Here’s another: First Second: Fee Fie Foe Third Same thing but with paragraphs: First Second: Fee Fie Foe Third Tabs and spaces this is a list item indented with tabs this is a list item indented with spaces this is an example list item indented with tabs this is an example list item indented with spaces Fancy list markers begins with 2 and now 3 with a continuation sublist with roman numerals, starting with 4 more items a subsublist a subsublist Nesting: Upper Alpha Upper Roman. Decimal start with 6 Lower alpha with paren Autonumbering: Autonumber. More. Nested. Should not be a list item: M.A. 2007 B. Williams Definition Lists Tight using spaces: apple red fruit orange orange fruit banana yellow fruit Tight using tabs: apple red fruit orange orange fruit banana yellow fruit Loose: apple red fruit orange orange fruit banana yellow fruit Multiple blocks with italics: apple red fruitcontains seeds, crisp, pleasant to taste orange orange fruit{ orange code block }orange block quote Multiple definitions, tight: apple red fruit computer orange orange fruit bank Multiple definitions, loose: apple red fruit computer orange orange fruit bank Blank line after term, indented marker, alternate markers: apple red fruit computer orange orange fruit sublist sublist HTML Blocks Simple block on one line: foo And nested without indentation: foo bar Interpreted markdown in a table: This is emphasized And this is strong Here’s a simple block: foo This should be a code block, though: <div> foo </div> As should this: <div>foo</div> Now, nested: foo This should just be an HTML comment: Multiline: Code block: <!-- Comment --> Just plain comment, with trailing spaces on the line: Code: <hr /> Hr’s: Inline Markup This is emphasized, and so is this. This is strong, and so is this. An emphasized link. This is strong and em. So is this word. This is strong and em. So is this word. This is code: >, $, \, \$, <html>. This is strikeout. Superscripts: abcd ahello ahello there. Subscripts: H2O, H23O, Hmany of themO. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. Smart quotes, ellipses, dashes “Hello,” said the spider. “‘Shelob’ is my name.” ‘A’, ‘B’, and ‘C’ are letters. ‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ ‘He said, “I want to go.”’ Were you alive in the 70’s? Here is some quoted ‘code’ and a “quoted link”. Some dashes: one—two — three—four — five. Dashes between numbers: 5–7, 255–66, 1987–1999. Ellipses…and…and…. LaTeX 2 + 2 = 4 x ∈ y α ∧ ω 223 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. These shouldn’t be math: To get the famous equation, write $e = mc^2$. $22,000 is a lot of money. So is $34,000. (It worked if “lot” is emphasized.) Shoes ($20) and socks ($5). Escaped $: $73 this should be emphasized 23$. Here’s a LaTeX table: Special Characters Here is some unicode: I hat: Î o umlaut: ö section: § set membership: ∈ copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \ Backtick: ` Asterisk: * Underscore: _ Left brace: { Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: - Links Explicit Just a URL. URL and title. URL and title. URL and title. URL and title URL and title with_underscore Email link Empty. Reference Foo bar. Foo bar. Foo bar. With embedded [brackets]. b by itself should be a link. Indented once. Indented twice. Indented thrice. This should [not][] be a link. [not]: /url Foo bar. Foo biz. With ampersands Here’s a link with an ampersand in the URL. Here’s a link with an amersand in the link text: AT&T. Here’s an inline link. Here’s an inline link in pointy braces. Autolinks With an ampersand: http://example.com/?foo=1&bar=2 In a list? http://example.com/ It should. An e-mail address: nobody@nowhere.net Blockquoted: http://example.com/ Auto-links should not occur here: <http://example.com/> or here: <http://example.com/> Images From “Voyage dans la Lune” by Georges Melies (1902): lalune Here is a movie icon. Footnotes Here is a footnote reference,1Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. and another.2Here’s the long note. This one contains multiple blocks.Subsequent blocks are indented to show that they belong to the footnote (as with list items).{ <code> }If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. This should not be a footnote reference, because it contains a space.[^my note] Here is an inline note.3This is easier to type. Inline notes may contain links and ] verbatim characters, as well as [bracketed text]. Notes can go in quotes.4In quote. And in list items.5In list. This paragraph should not be part of the note, as it is not indented. pandoc-1.19.2.4/tests/writer.org0000644000000000000000000002707313155240143014576 0ustar0000000000000000#+TITLE: Pandoc Test Suite #+AUTHOR: John MacFarlane; Anonymous #+DATE: July 17, 2006 This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite. -------------- * Headers :PROPERTIES: :CUSTOM_ID: headers :END: ** Level 2 with an [[/url][embedded link]] :PROPERTIES: :CUSTOM_ID: level-2-with-an-embedded-link :END: *** Level 3 with /emphasis/ :PROPERTIES: :CUSTOM_ID: level-3-with-emphasis :END: **** Level 4 :PROPERTIES: :CUSTOM_ID: level-4 :END: ***** Level 5 :PROPERTIES: :CUSTOM_ID: level-5 :END: * Level 1 :PROPERTIES: :CUSTOM_ID: level-1 :END: ** Level 2 with /emphasis/ :PROPERTIES: :CUSTOM_ID: level-2-with-emphasis :END: *** Level 3 :PROPERTIES: :CUSTOM_ID: level-3 :END: with no blank line ** Level 2 :PROPERTIES: :CUSTOM_ID: level-2 :END: with no blank line -------------- * Paragraphs :PROPERTIES: :CUSTOM_ID: paragraphs :END: Here's a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here's one with a bullet. * criminey. There should be a hard line break\\ here. -------------- * Block Quotes :PROPERTIES: :CUSTOM_ID: block-quotes :END: E-mail style: #+BEGIN_QUOTE This is a block quote. It is pretty short. #+END_QUOTE #+BEGIN_QUOTE Code in a block quote: #+BEGIN_EXAMPLE sub status { print "working"; } #+END_EXAMPLE A list: 1. item one 2. item two Nested block quotes: #+BEGIN_QUOTE nested #+END_QUOTE #+BEGIN_QUOTE nested #+END_QUOTE #+END_QUOTE This should not be a block quote: 2 > 1. And a following paragraph. -------------- * Code Blocks :PROPERTIES: :CUSTOM_ID: code-blocks :END: Code: #+BEGIN_EXAMPLE ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab #+END_EXAMPLE And: #+BEGIN_EXAMPLE this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ #+END_EXAMPLE -------------- * Lists :PROPERTIES: :CUSTOM_ID: lists :END: ** Unordered :PROPERTIES: :CUSTOM_ID: unordered :END: Asterisks tight: - asterisk 1 - asterisk 2 - asterisk 3 Asterisks loose: - asterisk 1 - asterisk 2 - asterisk 3 Pluses tight: - Plus 1 - Plus 2 - Plus 3 Pluses loose: - Plus 1 - Plus 2 - Plus 3 Minuses tight: - Minus 1 - Minus 2 - Minus 3 Minuses loose: - Minus 1 - Minus 2 - Minus 3 ** Ordered :PROPERTIES: :CUSTOM_ID: ordered :END: Tight: 1. First 2. Second 3. Third and: 1. One 2. Two 3. Three Loose using tabs: 1. First 2. Second 3. Third and using spaces: 1. One 2. Two 3. Three Multiple paragraphs: 1. Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog's back. 2. Item 2. 3. Item 3. ** Nested :PROPERTIES: :CUSTOM_ID: nested :END: - Tab - Tab - Tab Here's another: 1. First 2. Second: - Fee - Fie - Foe 3. Third Same thing but with paragraphs: 1. First 2. Second: - Fee - Fie - Foe 3. Third ** Tabs and spaces :PROPERTIES: :CUSTOM_ID: tabs-and-spaces :END: - this is a list item indented with tabs - this is a list item indented with spaces - this is an example list item indented with tabs - this is an example list item indented with spaces ** Fancy list markers :PROPERTIES: :CUSTOM_ID: fancy-list-markers :END: 2) begins with 2 3) and now 3 with a continuation 4. sublist with roman numerals, starting with 4 5. more items 1) a subsublist 2) a subsublist Nesting: 1. Upper Alpha 1. Upper Roman. 6) Decimal start with 6 3) Lower alpha with paren Autonumbering: 1. Autonumber. 2. More. 1. Nested. Should not be a list item: M.A. 2007 B. Williams -------------- * Definition Lists :PROPERTIES: :CUSTOM_ID: definition-lists :END: Tight using spaces: - apple :: red fruit - orange :: orange fruit - banana :: yellow fruit Tight using tabs: - apple :: red fruit - orange :: orange fruit - banana :: yellow fruit Loose: - apple :: red fruit - orange :: orange fruit - banana :: yellow fruit Multiple blocks with italics: - /apple/ :: red fruit contains seeds, crisp, pleasant to taste - /orange/ :: orange fruit #+BEGIN_EXAMPLE { orange code block } #+END_EXAMPLE #+BEGIN_QUOTE orange block quote #+END_QUOTE Multiple definitions, tight: - apple :: red fruit computer - orange :: orange fruit bank Multiple definitions, loose: - apple :: red fruit computer - orange :: orange fruit bank Blank line after term, indented marker, alternate markers: - apple :: red fruit computer - orange :: orange fruit 1. sublist 2. sublist * HTML Blocks :PROPERTIES: :CUSTOM_ID: html-blocks :END: Simple block on one line: foo And nested without indentation: foo bar Interpreted markdown in a table: #+BEGIN_HTML #+END_HTML #+BEGIN_HTML #+END_HTML #+BEGIN_HTML #+END_HTML #+BEGIN_HTML #+END_HTML #+BEGIN_HTML #+END_HTML #+BEGIN_HTML
                    #+END_HTML This is /emphasized/ #+BEGIN_HTML #+END_HTML And this is *strong* #+BEGIN_HTML
                    #+END_HTML #+BEGIN_HTML #+END_HTML Here's a simple block: foo This should be a code block, though: #+BEGIN_EXAMPLE
                    foo
                    #+END_EXAMPLE As should this: #+BEGIN_EXAMPLE
                    foo
                    #+END_EXAMPLE Now, nested: foo This should just be an HTML comment: #+BEGIN_HTML #+END_HTML Multiline: #+BEGIN_HTML #+END_HTML #+BEGIN_HTML #+END_HTML Code block: #+BEGIN_EXAMPLE #+END_EXAMPLE Just plain comment, with trailing spaces on the line: #+BEGIN_HTML #+END_HTML Code: #+BEGIN_EXAMPLE
                    #+END_EXAMPLE Hr's: #+BEGIN_HTML
                    #+END_HTML #+BEGIN_HTML
                    #+END_HTML #+BEGIN_HTML
                    #+END_HTML #+BEGIN_HTML
                    #+END_HTML #+BEGIN_HTML
                    #+END_HTML #+BEGIN_HTML
                    #+END_HTML #+BEGIN_HTML
                    #+END_HTML #+BEGIN_HTML
                    #+END_HTML #+BEGIN_HTML
                    #+END_HTML -------------- * Inline Markup :PROPERTIES: :CUSTOM_ID: inline-markup :END: This is /emphasized/, and so /is this/. This is *strong*, and so *is this*. An /[[/url][emphasized link]]/. */This is strong and em./* So is */this/* word. */This is strong and em./* So is */this/* word. This is code: =>=, =$=, =\=, =\$=, ==. +This is /strikeout/.+ Superscripts: a^{bc}d a^{/hello/} a^{hello there}. Subscripts: H_{2}O, H_{23}O, H_{many of them}O. These should not be superscripts or subscripts, because of the unescaped spaces: a\^b c\^d, a~b c~d. -------------- * Smart quotes, ellipses, dashes :PROPERTIES: :CUSTOM_ID: smart-quotes-ellipses-dashes :END: "Hello," said the spider. "'Shelob' is my name." 'A', 'B', and 'C' are letters. 'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.' 'He said, "I want to go."' Were you alive in the 70's? Here is some quoted '=code=' and a "[[http://example.com/?foo=1&bar=2][quoted link]]". Some dashes: one---two --- three---four --- five. Dashes between numbers: 5--7, 255--66, 1987--1999. Ellipses...and...and.... -------------- * LaTeX :PROPERTIES: :CUSTOM_ID: latex :END: - \cite[22-23]{smith.1899} - $2+2=4$ - $x \in y$ - $\alpha \wedge \omega$ - $223$ - $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: $\alpha + \omega \times x^2$. These shouldn't be math: - To get the famous equation, write =$e = mc^2$=. - $22,000 is a /lot/ of money. So is $34,000. (It worked if "lot" is emphasized.) - Shoes ($20) and socks ($5). - Escaped =$=: $73 /this should be emphasized/ 23$. Here's a LaTeX table: \begin{tabular}{|l|l|}\hline Animal & Number \\ \hline Dog & 2 \\ Cat & 1 \\ \hline \end{tabular} -------------- * Special Characters :PROPERTIES: :CUSTOM_ID: special-characters :END: Here is some unicode: - I hat: Î - o umlaut: ö - section: § - set membership: ∈ - copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \ Backtick: ` Asterisk: * Underscore: \_ Left brace: { Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: - -------------- * Links :PROPERTIES: :CUSTOM_ID: links :END: ** Explicit :PROPERTIES: :CUSTOM_ID: explicit :END: Just a [[/url/][URL]]. [[/url/][URL and title]]. [[/url/][URL and title]]. [[/url/][URL and title]]. [[/url/][URL and title]] [[/url/][URL and title]] [[/url/with_underscore][with\_underscore]] [[mailto:nobody@nowhere.net][Email link]] [[][Empty]]. ** Reference :PROPERTIES: :CUSTOM_ID: reference :END: Foo [[/url/][bar]]. Foo [[/url/][bar]]. Foo [[/url/][bar]]. With [[/url/][embedded [brackets]]]. [[/url/][b]] by itself should be a link. Indented [[/url][once]]. Indented [[/url][twice]]. Indented [[/url][thrice]]. This should [not][] be a link. #+BEGIN_EXAMPLE [not]: /url #+END_EXAMPLE Foo [[/url/][bar]]. Foo [[/url/][biz]]. ** With ampersands :PROPERTIES: :CUSTOM_ID: with-ampersands :END: Here's a [[http://example.com/?foo=1&bar=2][link with an ampersand in the URL]]. Here's a link with an amersand in the link text: [[http://att.com/][AT&T]]. Here's an [[/script?foo=1&bar=2][inline link]]. Here's an [[/script?foo=1&bar=2][inline link in pointy braces]]. ** Autolinks :PROPERTIES: :CUSTOM_ID: autolinks :END: With an ampersand: [[http://example.com/?foo=1&bar=2]] - In a list? - [[http://example.com/]] - It should. An e-mail address: [[mailto:nobody@nowhere.net][nobody@nowhere.net]] #+BEGIN_QUOTE Blockquoted: [[http://example.com/]] #+END_QUOTE Auto-links should not occur here: == #+BEGIN_EXAMPLE or here: #+END_EXAMPLE -------------- * Images :PROPERTIES: :CUSTOM_ID: images :END: From "Voyage dans la Lune" by Georges Melies (1902): #+CAPTION: lalune [[file:lalune.jpg]] Here is a movie [[file:movie.jpg]] icon. -------------- * Footnotes :PROPERTIES: :CUSTOM_ID: footnotes :END: Here is a footnote reference,[fn:1] and another.[fn:2] This should /not/ be a footnote reference, because it contains a space.[\^my note] Here is an inline note.[fn:3] #+BEGIN_QUOTE Notes can go in quotes.[fn:4] #+END_QUOTE 1. And in list items.[fn:5] This paragraph should not be part of the note, as it is not indented. [fn:1] Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. [fn:2] Here's the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). #+BEGIN_EXAMPLE { } #+END_EXAMPLE If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. [fn:3] This is /easier/ to type. Inline notes may contain [[http://google.com][links]] and =]= verbatim characters, as well as [bracketed text]. [fn:4] In quote. [fn:5] In list. pandoc-1.19.2.4/tests/writer.asciidoc0000644000000000000000000002206113155240143015555 0ustar0000000000000000Pandoc Test Suite ================= 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. ''''' [[headers]] Headers ------- [[level-2-with-an-embedded-link]] Level 2 with an link:/url[embedded link] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [[level-3-with-emphasis]] Level 3 with _emphasis_ ^^^^^^^^^^^^^^^^^^^^^^^ [[level-4]] Level 4 +++++++ [[level-5]] Level 5 [[level-1]] Level 1 ------- [[level-2-with-emphasis]] Level 2 with _emphasis_ ~~~~~~~~~~~~~~~~~~~~~~~ [[level-3]] Level 3 ^^^^^^^ with no blank line [[level-2]] Level 2 ~~~~~~~ with no blank line ''''' [[paragraphs]] Paragraphs ---------- Here’s a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here’s one with a bullet. * criminey. There should be a hard line break + here. ''''' [[block-quotes]] Block Quotes ------------ E-mail style: __________________________________________ This is a block quote. It is pretty short. __________________________________________ ______________________ -- Code in a block quote: .... sub status { print "working"; } .... A list: 1. item one 2. item two Nested block quotes: ______ nested ______ ______ nested ______ -- ______________________ This should not be a block quote: 2 > 1. And a following paragraph. ''''' [[code-blocks]] Code Blocks ----------- Code: .... ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab .... And: .... this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ .... ''''' [[lists]] Lists ----- [[unordered]] Unordered ~~~~~~~~~ Asterisks tight: * asterisk 1 * asterisk 2 * asterisk 3 Asterisks loose: * asterisk 1 * asterisk 2 * asterisk 3 Pluses tight: * Plus 1 * Plus 2 * Plus 3 Pluses loose: * Plus 1 * Plus 2 * Plus 3 Minuses tight: * Minus 1 * Minus 2 * Minus 3 Minuses loose: * Minus 1 * Minus 2 * Minus 3 [[ordered]] Ordered ~~~~~~~ Tight: 1. First 2. Second 3. Third and: 1. One 2. Two 3. Three Loose using tabs: 1. First 2. Second 3. Third and using spaces: 1. One 2. Two 3. Three Multiple paragraphs: 1. Item 1, graf one. + Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. 2. Item 2. 3. Item 3. [[nested]] Nested ~~~~~~ * Tab ** Tab *** Tab Here’s another: 1. First 2. Second: * Fee * Fie * Foe 3. Third Same thing but with paragraphs: 1. First 2. Second: * Fee * Fie * Foe 3. Third [[tabs-and-spaces]] Tabs and spaces ~~~~~~~~~~~~~~~ * this is a list item indented with tabs * this is a list item indented with spaces ** this is an example list item indented with tabs ** this is an example list item indented with spaces [[fancy-list-markers]] Fancy list markers ~~~~~~~~~~~~~~~~~~ 1. begins with 2 2. and now 3 + with a continuation a. sublist with roman numerals, starting with 4 b. more items A. a subsublist B. a subsublist Nesting: A. Upper Alpha A. Upper Roman. 1. Decimal start with 6 a. Lower alpha with paren Autonumbering: 1. Autonumber. 2. More. 1. Nested. Should not be a list item: M.A. 2007 B. Williams ''''' [[definition-lists]] Definition Lists ---------------- Tight using spaces: apple:: red fruit orange:: orange fruit banana:: yellow fruit Tight using tabs: apple:: red fruit orange:: orange fruit banana:: yellow fruit Loose: apple:: red fruit orange:: orange fruit banana:: yellow fruit Multiple blocks with italics: _apple_:: red fruit + contains seeds, crisp, pleasant to taste _orange_:: orange fruit + .... { orange code block } .... + __________________ orange block quote __________________ Multiple definitions, tight: apple:: red fruit + computer orange:: orange fruit + bank Multiple definitions, loose: apple:: red fruit + computer orange:: orange fruit + bank Blank line after term, indented marker, alternate markers: apple:: red fruit + computer orange:: orange fruit + 1. sublist 2. sublist [[html-blocks]] HTML Blocks ----------- Simple block on one line: foo And nested without indentation: foo bar Interpreted markdown in a table: This is _emphasized_ And this is *strong* Here’s a simple block: foo This should be a code block, though: ....
                    foo
                    .... As should this: ....
                    foo
                    .... Now, nested: foo This should just be an HTML comment: Multiline: Code block: .... .... Just plain comment, with trailing spaces on the line: Code: ....
                    .... Hr’s: ''''' [[inline-markup]] Inline Markup ------------- This is _emphasized_, and so _is this_. This is *strong*, and so *is this*. An _link:/url[emphasized link]_. *_This is strong and em._* So is *_this_* word. *_This is strong and em._* So is *_this_* word. This is code: `>`, `$`, `\`, `\$`, ``. [line-through]*This is _strikeout_.* Superscripts: a^bc^d a^_hello_^ a^hello there^. Subscripts: H~2~O, H~23~O, H~many of them~O. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. ''''' [[smart-quotes-ellipses-dashes]] Smart quotes, ellipses, dashes ------------------------------ ``Hello,'' said the spider. ```Shelob' is my name.'' `A', `B', and `C' are letters. `Oak,' `elm,' and `beech' are names of trees. So is `pine.' `He said, ``I want to go.''' Were you alive in the 70’s? Here is some quoted ``code`' and a ``http://example.com/?foo=1&bar=2[quoted link]''. Some dashes: one—two — three—four — five. Dashes between numbers: 5–7, 255–66, 1987–1999. Ellipses…and…and…. ''''' [[latex]] LaTeX ----- * * latexmath:[$2+2=4$] * latexmath:[$x \in y$] * latexmath:[$\alpha \wedge \omega$] * latexmath:[$223$] * latexmath:[$p$]-Tree * Here’s some display math: latexmath:[\[\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: latexmath:[$\alpha + \omega \times x^2$]. These shouldn’t be math: * To get the famous equation, write `$e = mc^2$`. * $22,000 is a _lot_ of money. So is $34,000. (It worked if ``lot'' is emphasized.) * Shoes ($20) and socks ($5). * Escaped `$`: $73 _this should be emphasized_ 23$. Here’s a LaTeX table: ''''' [[special-characters]] Special Characters ------------------ Here is some unicode: * I hat: Î * o umlaut: ö * section: § * set membership: ∈ * copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \ Backtick: ` Asterisk: * Underscore: _ Left brace: \{ Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: - ''''' [[links]] Links ----- [[explicit]] Explicit ~~~~~~~~ Just a link:/url/[URL]. link:/url/[URL and title]. link:/url/[URL and title]. link:/url/[URL and title]. link:/url/[URL and title] link:/url/[URL and title] link:/url/with_underscore[with_underscore] mailto:nobody@nowhere.net[Email link] link:[Empty]. [[reference]] Reference ~~~~~~~~~ Foo link:/url/[bar]. Foo link:/url/[bar]. Foo link:/url/[bar]. With link:/url/[embedded [brackets]]. link:/url/[b] by itself should be a link. Indented link:/url[once]. Indented link:/url[twice]. Indented link:/url[thrice]. This should [not][] be a link. .... [not]: /url .... Foo link:/url/[bar]. Foo link:/url/[biz]. [[with-ampersands]] With ampersands ~~~~~~~~~~~~~~~ Here’s a http://example.com/?foo=1&bar=2[link with an ampersand in the URL]. Here’s a link with an amersand in the link text: http://att.com/[AT&T]. Here’s an link:/script?foo=1&bar=2[inline link]. Here’s an link:/script?foo=1&bar=2[inline link in pointy braces]. [[autolinks]] Autolinks ~~~~~~~~~ With an ampersand: http://example.com/?foo=1&bar=2 * In a list? * http://example.com/ * It should. An e-mail address: nobody@nowhere.net ________________________________ Blockquoted: http://example.com/ ________________________________ Auto-links should not occur here: `` .... or here: .... ''''' [[images]] Images ------ From ``Voyage dans la Lune'' by Georges Melies (1902): image:lalune.jpg[lalune,title="Voyage dans la Lune"] Here is a movie image:movie.jpg[movie] icon. ''''' [[footnotes]] Footnotes --------- Here is a footnote reference,footnote:[Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.] and another.[multiblock footnote omitted] This should _not_ be a footnote reference, because it contains a space.[^my note] Here is an inline note.footnote:[This is _easier_ to type. Inline notes may contain http://google.com[links] and `]` verbatim characters, as well as [bracketed text].] ___________________________________________ Notes can go in quotes.footnote:[In quote.] ___________________________________________ 1. And in list items.footnote:[In list.] This paragraph should not be part of the note, as it is not indented. pandoc-1.19.2.4/tests/writer.haddock0000644000000000000000000002314613155240143015401 0ustar0000000000000000This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite. ______________________________________________________________________________ = Headers #headers# == Level 2 with an #level-2-with-an-embedded-link# === Level 3 with /emphasis/ #level-3-with-emphasis# ==== Level 4 #level-4# ===== Level 5 #level-5# = Level 1 #level-1# == Level 2 with /emphasis/ #level-2-with-emphasis# === Level 3 #level-3# with no blank line == Level 2 #level-2# with no blank line ______________________________________________________________________________ = Paragraphs #paragraphs# Here’s a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here’s one with a bullet. * criminey. There should be a hard line break here. ______________________________________________________________________________ = Block Quotes #block-quotes# E-mail style: This is a block quote. It is pretty short. Code in a block quote: > sub status { > print "working"; > } A list: 1. item one 2. item two Nested block quotes: nested nested This should not be a block quote: 2 > 1. And a following paragraph. ______________________________________________________________________________ = Code Blocks #code-blocks# Code: > ---- (should be four hyphens) > > sub status { > print "working"; > } > > this code block is indented by one tab And: > this code block is indented by two tabs > > These should not be escaped: \$ \\ \> \[ \{ ______________________________________________________________________________ = Lists #lists# == Unordered #unordered# Asterisks tight: - asterisk 1 - asterisk 2 - asterisk 3 Asterisks loose: - asterisk 1 - asterisk 2 - asterisk 3 Pluses tight: - Plus 1 - Plus 2 - Plus 3 Pluses loose: - Plus 1 - Plus 2 - Plus 3 Minuses tight: - Minus 1 - Minus 2 - Minus 3 Minuses loose: - Minus 1 - Minus 2 - Minus 3 == Ordered #ordered# Tight: 1. First 2. Second 3. Third and: 1. One 2. Two 3. Three Loose using tabs: 1. First 2. Second 3. Third and using spaces: 1. One 2. Two 3. Three Multiple paragraphs: 1. Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. 2. Item 2. 3. Item 3. == Nested #nested# - Tab - Tab - Tab Here’s another: 1. First 2. Second: - Fee - Fie - Foe 3. Third Same thing but with paragraphs: 1. First 2. Second: - Fee - Fie - Foe 3. Third == Tabs and spaces #tabs-and-spaces# - this is a list item indented with tabs - this is a list item indented with spaces - this is an example list item indented with tabs - this is an example list item indented with spaces == Fancy list markers #fancy-list-markers# (2) begins with 2 (3) and now 3 with a continuation 4. sublist with roman numerals, starting with 4 5. more items (1) a subsublist (2) a subsublist Nesting: 1. Upper Alpha 1. Upper Roman. (6) Decimal start with 6 3) Lower alpha with paren Autonumbering: 1. Autonumber. 2. More. 1. Nested. Should not be a list item: M.A. 2007 B. Williams ______________________________________________________________________________ = Definition Lists #definition-lists# Tight using spaces: [apple] red fruit [orange] orange fruit [banana] yellow fruit Tight using tabs: [apple] red fruit [orange] orange fruit [banana] yellow fruit Loose: [apple] red fruit [orange] orange fruit [banana] yellow fruit Multiple blocks with italics: [/apple/] red fruit contains seeds, crisp, pleasant to taste [/orange/] orange fruit > { orange code block } orange block quote Multiple definitions, tight: [apple] red fruit computer [orange] orange fruit bank Multiple definitions, loose: [apple] red fruit computer [orange] orange fruit bank Blank line after term, indented marker, alternate markers: [apple] red fruit computer [orange] orange fruit 1. sublist 2. sublist = HTML Blocks #html-blocks# Simple block on one line: foo And nested without indentation: foo bar Interpreted markdown in a table: This is /emphasized/ And this is __strong__ Here’s a simple block: foo This should be a code block, though: >
                    > foo >
                    As should this: >
                    foo
                    Now, nested: foo This should just be an HTML comment: Multiline: Code block: > Just plain comment, with trailing spaces on the line: Code: >
                    Hr’s: ______________________________________________________________________________ = Inline Markup #inline-markup# This is /emphasized/, and so /is this/. This is __strong__, and so __is this__. An //. __/This is strong and em./__ So is __/this/__ word. __/This is strong and em./__ So is __/this/__ word. This is code: @>@, @$@, @\\@, @\\$@, @\@. ~~This is /strikeout/.~~ Superscripts: abcd a/hello/ ahello there. Subscripts: H2O, H23O, Hmany of themO. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. ______________________________________________________________________________ = Smart quotes, ellipses, dashes #smart-quotes-ellipses-dashes# “Hello,” said the spider. “‘Shelob’ is my name.” ‘A’, ‘B’, and ‘C’ are letters. ‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ ‘He said, “I want to go.”’ Were you alive in the 70’s? Here is some quoted ‘@code@’ and a “”. Some dashes: one—two — three—four — five. Dashes between numbers: 5–7, 255–66, 1987–1999. Ellipses…and…and…. ______________________________________________________________________________ = LaTeX #latex# - - 2 + 2 = 4 - /x/ ∈ /y/ - /α/ ∧ /ω/ - 223 - /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: /α/ + /ω/ × /x/2. These shouldn’t be math: - To get the famous equation, write @$e = mc^2$@. - $22,000 is a /lot/ of money. So is $34,000. (It worked if “lot” is emphasized.) - Shoes ($20) and socks ($5). - Escaped @$@: $73 /this should be emphasized/ 23$. Here’s a LaTeX table: ______________________________________________________________________________ = Special Characters #special-characters# Here is some unicode: - I hat: Î - o umlaut: ö - section: § - set membership: ∈ - copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 \< 5. 6 > 5. Backslash: \\ Backtick: \` Asterisk: * Underscore: _ Left brace: { Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: - ______________________________________________________________________________ = Links #links# == Explicit #explicit# Just a . . . . < Empty>. == Reference #reference# Foo . Foo . Foo . With . by itself should be a link. Indented . Indented . Indented . This should [not][] be a link. > [not]: /url Foo . Foo . == With ampersands #with-ampersands# Here’s a . Here’s a link with an amersand in the link text: . Here’s an . Here’s an . == Autolinks #autolinks# With an ampersand: - In a list? - - It should. An e-mail address: Blockquoted: Auto-links should not occur here: @\@ > or here: ______________________________________________________________________________ = Images #images# From “Voyage dans la Lune” by Georges Melies (1902): <> Here is a movie <> icon. ______________________________________________________________________________ = Footnotes #footnotes# Here is a footnote reference,<#notes [1]> and another.<#notes [2]> This should /not/ be a footnote reference, because it contains a space.[^my note] Here is an inline note.<#notes [3]> Notes can go in quotes.<#notes [4]> 1. And in list items.<#notes [5]> This paragraph should not be part of the note, as it is not indented. #notes# 1. Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. 2. Here’s the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). > { } If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. 3. This is /easier/ to type. Inline notes may contain and @]@ verbatim characters, as well as [bracketed text]. 4. In quote. 5. In list. pandoc-1.19.2.4/tests/writer.rst0000644000000000000000000002503613155240143014614 0ustar0000000000000000================= Pandoc Test Suite ================= :Author: John MacFarlane :Author: Anonymous :Date: July 17, 2006 .. role:: math(raw) :format: html latex .. .. role:: raw-latex(raw) :format: latex .. This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite. -------------- Headers ======= Level 2 with an `embedded link `__ ---------------------------------------- Level 3 with *emphasis* ~~~~~~~~~~~~~~~~~~~~~~~ Level 4 ^^^^^^^ Level 5 ''''''' Level 1 ======= Level 2 with *emphasis* ----------------------- Level 3 ~~~~~~~ with no blank line Level 2 ------- with no blank line -------------- Paragraphs ========== Here’s a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here’s one with a bullet. \* criminey. | There should be a hard line break | here. -------------- Block Quotes ============ E-mail style: This is a block quote. It is pretty short. Code in a block quote: :: sub status { print "working"; } A list: 1. item one 2. item two Nested block quotes: nested nested This should not be a block quote: 2 > 1. And a following paragraph. -------------- Code Blocks =========== Code: :: ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab And: :: this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ -------------- Lists ===== Unordered --------- Asterisks tight: - asterisk 1 - asterisk 2 - asterisk 3 Asterisks loose: - asterisk 1 - asterisk 2 - asterisk 3 Pluses tight: - Plus 1 - Plus 2 - Plus 3 Pluses loose: - Plus 1 - Plus 2 - Plus 3 Minuses tight: - Minus 1 - Minus 2 - Minus 3 Minuses loose: - Minus 1 - Minus 2 - Minus 3 Ordered ------- Tight: 1. First 2. Second 3. Third and: 1. One 2. Two 3. Three Loose using tabs: 1. First 2. Second 3. Third and using spaces: 1. One 2. Two 3. Three Multiple paragraphs: 1. Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. 2. Item 2. 3. Item 3. Nested ------ - Tab - Tab - Tab Here’s another: 1. First 2. Second: - Fee - Fie - Foe 3. Third Same thing but with paragraphs: 1. First 2. Second: - Fee - Fie - Foe 3. Third Tabs and spaces --------------- - this is a list item indented with tabs - this is a list item indented with spaces - this is an example list item indented with tabs - this is an example list item indented with spaces Fancy list markers ------------------ (2) begins with 2 (3) and now 3 with a continuation iv. sublist with roman numerals, starting with 4 v. more items (A) a subsublist (B) a subsublist Nesting: A. Upper Alpha I. Upper Roman. (6) Decimal start with 6 c) Lower alpha with paren Autonumbering: #. Autonumber. #. More. #. Nested. Should not be a list item: M.A. 2007 B. Williams -------------- Definition Lists ================ Tight using spaces: apple red fruit orange orange fruit banana yellow fruit Tight using tabs: apple red fruit orange orange fruit banana yellow fruit Loose: apple red fruit orange orange fruit banana yellow fruit Multiple blocks with italics: *apple* red fruit contains seeds, crisp, pleasant to taste *orange* orange fruit :: { orange code block } orange block quote Multiple definitions, tight: apple red fruit computer orange orange fruit bank Multiple definitions, loose: apple red fruit computer orange orange fruit bank Blank line after term, indented marker, alternate markers: apple red fruit computer orange orange fruit 1. sublist 2. sublist HTML Blocks =========== Simple block on one line: .. raw:: html
                    foo .. raw:: html
                    And nested without indentation: .. raw:: html
                    .. raw:: html
                    .. raw:: html
                    foo .. raw:: html
                    .. raw:: html
                    .. raw:: html
                    bar .. raw:: html
                    .. raw:: html
                    Interpreted markdown in a table: .. raw:: html .. raw:: html .. raw:: html .. raw:: html .. raw:: html .. raw:: html
                    This is *emphasized* .. raw:: html And this is **strong** .. raw:: html
                    .. raw:: html Here’s a simple block: .. raw:: html
                    foo .. raw:: html
                    This should be a code block, though: ::
                    foo
                    As should this: ::
                    foo
                    Now, nested: .. raw:: html
                    .. raw:: html
                    .. raw:: html
                    foo .. raw:: html
                    .. raw:: html
                    .. raw:: html
                    This should just be an HTML comment: .. raw:: html Multiline: .. raw:: html .. raw:: html Code block: :: Just plain comment, with trailing spaces on the line: .. raw:: html Code: ::
                    Hr’s: .. raw:: html
                    .. raw:: html
                    .. raw:: html
                    .. raw:: html
                    .. raw:: html
                    .. raw:: html
                    .. raw:: html
                    .. raw:: html
                    .. raw:: html
                    -------------- Inline Markup ============= This is *emphasized*, and so *is this*. This is **strong**, and so **is this**. An *`emphasized link `__*. ***This is strong and em.*** So is ***this*** word. ***This is strong and em.*** So is ***this*** word. This is code: ``>``, ``$``, ``\``, ``\$``, ````. [STRIKEOUT:This is *strikeout*.] Superscripts: a\ :sup:`bc`\ d a\ :sup:`*hello*` a\ :sup:`hello there`. Subscripts: H\ :sub:`2`\ O, H\ :sub:`23`\ O, H\ :sub:`many of them`\ O. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. -------------- Smart quotes, ellipses, dashes ============================== “Hello,” said the spider. “‘Shelob’ is my name.” ‘A’, ‘B’, and ‘C’ are letters. ‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ ‘He said, “I want to go.”’ Were you alive in the 70’s? Here is some quoted ‘``code``’ and a “`quoted link `__”. Some dashes: one—two — three—four — five. Dashes between numbers: 5–7, 255–66, 1987–1999. Ellipses…and…and…. -------------- LaTeX ===== - :raw-latex:`\cite[22-23]{smith.1899}` - :math:`2+2=4` - :math:`x \in y` - :math:`\alpha \wedge \omega` - :math:`223` - :math:`p`-Tree - Here’s some display math: .. 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: :math:`\alpha + \omega \times x^2`. These shouldn’t be math: - To get the famous equation, write ``$e = mc^2$``. - $22,000 is a *lot* of money. So is $34,000. (It worked if “lot” is emphasized.) - Shoes ($20) and socks ($5). - Escaped ``$``: $73 *this should be emphasized* 23$. Here’s a LaTeX table: .. raw:: latex \begin{tabular}{|l|l|}\hline Animal & Number \\ \hline Dog & 2 \\ Cat & 1 \\ \hline \end{tabular} -------------- Special Characters ================== Here is some unicode: - I hat: Î - o umlaut: ö - section: § - set membership: ∈ - copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \\ Backtick: \` Asterisk: \* Underscore: \_ Left brace: { Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: - -------------- Links ===== Explicit -------- Just a `URL `__. `URL and title `__. `URL and title `__. `URL and title `__. `URL and title `__ `URL and title `__ `with\_underscore `__ `Email link `__ `Empty <>`__. Reference --------- Foo `bar `__. Foo `bar `__. Foo `bar `__. With `embedded [brackets] `__. `b `__ by itself should be a link. Indented `once `__. Indented `twice `__. Indented `thrice `__. This should [not][] be a link. :: [not]: /url Foo `bar `__. Foo `biz `__. With ampersands --------------- Here’s a `link with an ampersand in the URL `__. Here’s a link with an amersand in the link text: `AT&T `__. Here’s an `inline link `__. Here’s an `inline link in pointy braces `__. Autolinks --------- With an ampersand: http://example.com/?foo=1&bar=2 - In a list? - http://example.com/ - It should. An e-mail address: nobody@nowhere.net Blockquoted: http://example.com/ Auto-links should not occur here: ```` :: or here: -------------- Images ====== From “Voyage dans la Lune” by Georges Melies (1902): .. figure:: lalune.jpg :alt: Voyage dans la Lune lalune Here is a movie |movie| icon. -------------- Footnotes ========= Here is a footnote reference, [1]_ and another. [2]_ This should *not* be a footnote reference, because it contains a space.[^my note] Here is an inline note. [3]_ Notes can go in quotes. [4]_ 1. And in list items. [5]_ This paragraph should not be part of the note, as it is not indented. .. [1] Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. .. [2] Here’s the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). :: { } If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. .. [3] This is *easier* to type. Inline notes may contain `links `__ and ``]`` verbatim characters, as well as [bracketed text]. .. [4] In quote. .. [5] In list. .. |movie| image:: movie.jpg pandoc-1.19.2.4/tests/writer.icml0000644000000000000000000044446113155240143014737 0ustar0000000000000000 $ID/NormalCharacterStyle $ID/NormalCharacterStyle $ID/NormalCharacterStyle $ID/NormalCharacterStyle Courier New $ID/NormalCharacterStyle $ID/NormalCharacterStyle $ID/NormalCharacterStyle $ID/NormalCharacterStyle $ID/NormalCharacterStyle $ID/NormalCharacterStyle $ID/NormalCharacterStyle $ID/NormalCharacterStyle LeftAlign . 10 $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle Courier New $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle LeftAlign . 10 $ID/NormalParagraphStyle LeftAlign . 30 $ID/NormalParagraphStyle LeftAlign . 20 $ID/NormalParagraphStyle LeftAlign . 20 $ID/NormalParagraphStyle LeftAlign . 20 $ID/NormalParagraphStyle LeftAlign . 10 $ID/NormalParagraphStyle LeftAlign . 10 $ID/NormalParagraphStyle LeftAlign . 10 $ID/NormalParagraphStyle $ID/NormalParagraphStyle Courier New $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle Courier New $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle Courier New $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle LeftAlign . 20 $ID/NormalParagraphStyle LeftAlign . 20 $ID/NormalParagraphStyle a, b, c, d... $ID/NormalParagraphStyle $ID/NormalParagraphStyle A, B, C, D... $ID/NormalParagraphStyle A, B, C, D... $ID/NormalParagraphStyle i, ii, iii, iv... $ID/NormalParagraphStyle $ID/NormalParagraphStyle i, ii, iii, iv... $ID/NormalParagraphStyle I, II, III, IV... $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle $ID/NormalParagraphStyle A, B, C, D... $ID/NormalParagraphStyle $ID/NormalParagraphStyle This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite.
                    Headers
                    Level 2 with an
                    Level 3 with emphasis
                    Level 4
                    Level 5
                    Level 1
                    Level 2 with emphasis
                    Level 3
                    with no blank line
                    Level 2
                    with no blank line
                    Paragraphs
                    Here’s a regular paragraph.
                    In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.
                    Here’s one with a bullet. * criminey.
                    There should be a hard line break here.
                    Block Quotes
                    E-mail style:
                    This is a block quote. It is pretty short.
                    Code in a block quote:
                    sub status { print "working"; }
                    A list:
                    item one
                    item two
                    Nested block quotes:
                    nested
                    nested
                    This should not be a block quote: 2 > 1.
                    And a following paragraph.
                    Code Blocks
                    Code:
                    ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab
                    And:
                    this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{
                    Lists
                    Unordered
                    Asterisks tight:
                    asterisk 1
                    asterisk 2
                    asterisk 3
                    Asterisks loose:
                    asterisk 1
                    asterisk 2
                    asterisk 3
                    Pluses tight:
                    Plus 1
                    Plus 2
                    Plus 3
                    Pluses loose:
                    Plus 1
                    Plus 2
                    Plus 3
                    Minuses tight:
                    Minus 1
                    Minus 2
                    Minus 3
                    Minuses loose:
                    Minus 1
                    Minus 2
                    Minus 3
                    Ordered
                    Tight:
                    First
                    Second
                    Third
                    and:
                    One
                    Two
                    Three
                    Loose using tabs:
                    First
                    Second
                    Third
                    and using spaces:
                    One
                    Two
                    Three
                    Multiple paragraphs:
                    Item 1, graf one.
                    Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
                    Item 2.
                    Item 3.
                    Nested
                    Tab
                    Tab
                    Tab
                    Here’s another:
                    First
                    Second:
                    Fee
                    Fie
                    Foe
                    Third
                    Same thing but with paragraphs:
                    First
                    Second:
                    Fee
                    Fie
                    Foe
                    Third
                    Tabs and spaces
                    this is a list item indented with tabs
                    this is a list item indented with spaces
                    this is an example list item indented with tabs
                    this is an example list item indented with spaces
                    Fancy list markers
                    begins with 2
                    and now 3
                    with a continuation
                    sublist with roman numerals, starting with 4
                    more items
                    a subsublist
                    a subsublist
                    Nesting:
                    Upper Alpha
                    Upper Roman.
                    Decimal start with 6
                    Lower alpha with paren
                    Autonumbering:
                    Autonumber.
                    More.
                    Nested.
                    Should not be a list item:
                    M.A. 2007
                    B. Williams
                    Definition Lists
                    Tight using spaces:
                    apple
                    red fruit
                    orange
                    orange fruit
                    banana
                    yellow fruit
                    Tight using tabs:
                    apple
                    red fruit
                    orange
                    orange fruit
                    banana
                    yellow fruit
                    Loose:
                    apple
                    red fruit
                    orange
                    orange fruit
                    banana
                    yellow fruit
                    Multiple blocks with italics:
                    apple
                    red fruit
                    contains seeds, crisp, pleasant to taste
                    orange
                    orange fruit
                    { orange code block }
                    orange block quote
                    Multiple definitions, tight:
                    apple
                    red fruit
                    computer
                    orange
                    orange fruit
                    bank
                    Multiple definitions, loose:
                    apple
                    red fruit
                    computer
                    orange
                    orange fruit
                    bank
                    Blank line after term, indented marker, alternate markers:
                    apple
                    red fruit
                    computer
                    orange
                    orange fruit
                    sublist
                    sublist
                    HTML Blocks
                    Simple block on one line:
                    foo
                    And nested without indentation:
                    foo
                    bar
                    Interpreted markdown in a table:
                    This is emphasized
                    And this is strong
                    Here’s a simple block:
                    foo
                    This should be a code block, though:
                    <div> foo </div>
                    As should this:
                    <div>foo</div>
                    Now, nested:
                    foo
                    This should just be an HTML comment:
                    Multiline:
                    Code block:
                    <!-- Comment -->
                    Just plain comment, with trailing spaces on the line:
                    Code:
                    <hr />
                    Hr’s:
                    Inline Markup
                    This is emphasized , and so is this .
                    This is strong , and so is this .
                    An .
                    This is strong and em.
                    So is this word.
                    This is strong and em.
                    So is this word.
                    This is code: > , $ , \ , \$ , <html> .
                    This is strikeout .
                    Superscripts: a bc d a hello a hello there .
                    Subscripts: H 2 O, H 23 O, H many of them O.
                    These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.
                    Smart quotes, ellipses, dashes
                    Hello, said the spider. Shelob is my name.
                    A , B , and C are letters.
                    Oak, elm, and beech are names of trees. So is pine.
                    He said, I want to go. Were you alive in the 70’s?
                    Here is some quoted code and a .
                    Some dashes: one—two — three—four — five.
                    Dashes between numbers: 5–7, 255–66, 1987–1999.
                    Ellipses…and…and….
                    LaTeX

                    2 + 2 = 4
                    x y
                    α ω
                    223
                    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: α + ω × x 2 .
                    These shouldn’t be math:
                    To get the famous equation, write $e = mc^2$ .
                    $22,000 is a lot of money. So is $34,000. (It worked if lot is emphasized.)
                    Shoes ($20) and socks ($5).
                    Escaped $ : $73 this should be emphasized 23$.
                    Here’s a LaTeX table:
                    Special Characters
                    Here is some unicode:
                    I hat: Î
                    o umlaut: ö
                    section: §
                    set membership: ∈
                    copyright: ©
                    AT&T has an ampersand in their name.
                    AT&T is another way to write it.
                    This & that.
                    4 < 5.
                    6 > 5.
                    Backslash: \
                    Backtick: `
                    Asterisk: *
                    Underscore: _
                    Left brace: {
                    Right brace: }
                    Left bracket: [
                    Right bracket: ]
                    Left paren: (
                    Right paren: )
                    Greater-than: >
                    Hash: #
                    Period: .
                    Bang: !
                    Plus: +
                    Minus: -
                    Links
                    Explicit
                    Just a .
                    .
                    .
                    .




                    .
                    Reference
                    Foo .
                    Foo .
                    Foo .
                    With .
                    by itself should be a link.
                    Indented .
                    Indented .
                    Indented .
                    This should [not][] be a link.
                    [not]: /url
                    Foo .
                    Foo .
                    With ampersands
                    Here’s a .
                    Here’s a link with an amersand in the link text: .
                    Here’s an .
                    Here’s an .
                    Autolinks
                    With an ampersand:
                    In a list?

                    It should.
                    An e-mail address:
                    Blockquoted:
                    Auto-links should not occur here: <http://example.com/>
                    or here: <http://example.com/>
                    Images
                    From Voyage dans la Lune by Georges Melies (1902):
                    $ID/Embedded
                    lalune
                    Here is a movie $ID/Embedded icon.
                    Footnotes
                    Here is a footnote reference, Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. and another. Here’s the long note. This one contains multiple blocks.
                    Subsequent blocks are indented to show that they belong to the footnote (as with list items).
                    { <code> }
                    If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
                    This should not be a footnote reference, because it contains a space.[^my note] Here is an inline note. This is easier to type. Inline notes may contain and ] verbatim characters, as well as [bracketed text].

                    Notes can go in quotes. In quote.
                    And in list items. In list.
                    This paragraph should not be part of the note, as it is not indented.
                    Black HyperlinkURLDestination/http%3a//google.com Black HyperlinkURLDestination/http%3a//example.com/ Black HyperlinkURLDestination/mailto%3anobody@nowhere.net Black HyperlinkURLDestination/http%3a//example.com/ Black HyperlinkURLDestination/http%3a//example.com/?foo=1&bar=2 Black HyperlinkURLDestination//script?foo=1&bar=2 Black HyperlinkURLDestination//script?foo=1&bar=2 Black HyperlinkURLDestination/http%3a//att.com/ Black HyperlinkURLDestination/http%3a//example.com/?foo=1&bar=2 Black HyperlinkURLDestination//url/ Black HyperlinkURLDestination//url/ Black HyperlinkURLDestination//url Black HyperlinkURLDestination//url Black HyperlinkURLDestination//url Black HyperlinkURLDestination//url/ Black HyperlinkURLDestination//url/ Black HyperlinkURLDestination//url/ Black HyperlinkURLDestination//url/ Black HyperlinkURLDestination//url/ Black HyperlinkURLDestination/ Black HyperlinkURLDestination/mailto%3anobody@nowhere.net Black HyperlinkURLDestination//url/with_underscore Black HyperlinkURLDestination//url/ Black HyperlinkURLDestination//url/ Black HyperlinkURLDestination//url/ Black HyperlinkURLDestination//url/ Black HyperlinkURLDestination//url/ Black HyperlinkURLDestination//url/ Black HyperlinkURLDestination/http%3a//example.com/?foo=1&bar=2 Black HyperlinkURLDestination//url Black HyperlinkURLDestination//url
                    pandoc-1.19.2.4/tests/writer.rtf0000644000000000000000000016527013155240143014604 0ustar0000000000000000{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 Courier;}} {\colortbl;\red255\green0\blue0;\red0\green0\blue255;} \widowctrl\hyphauto {\pard \qc \f0 \sa180 \li0 \fi0 \b \fs36 Pandoc Test Suite\par} {\pard \qc \f0 \sa180 \li0 \fi0 John MacFarlane\par} {\pard \qc \f0 \sa180 \li0 \fi0 Anonymous\par} {\pard \qc \f0 \sa180 \li0 \fi0 July 17, 2006\par} {\pard \ql \f0 \sa180 \li0 \fi0 \par} {\pard \ql \f0 \sa180 \li0 \fi0 This is a set of tests for pandoc. Most of them are adapted from John Gruber\u8217's markdown test suite.\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Headers\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Level 2 with an {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul embedded link }}} \par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs28 Level 3 with {\i emphasis}\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs24 Level 4\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs20 Level 5\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Level 1\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Level 2 with {\i emphasis}\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs28 Level 3\par} {\pard \ql \f0 \sa180 \li0 \fi0 with no blank line\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Level 2\par} {\pard \ql \f0 \sa180 \li0 \fi0 with no blank line\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Paragraphs\par} {\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a regular paragraph.\par} {\pard \ql \f0 \sa180 \li0 \fi0 In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.\par} {\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's one with a bullet. * criminey.\par} {\pard \ql \f0 \sa180 \li0 \fi0 There should be a hard line break\line here.\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Block Quotes\par} {\pard \ql \f0 \sa180 \li0 \fi0 E-mail style:\par} {\pard \ql \f0 \sa180 \li720 \fi0 This is a block quote. It is pretty short.\par} {\pard \ql \f0 \sa180 \li720 \fi0 Code in a block quote:\par} {\pard \ql \f0 \sa180 \li720 \fi0 \f1 sub status \{\line print "working";\line \}\par} {\pard \ql \f0 \sa180 \li720 \fi0 A list:\par} {\pard \ql \f0 \sa0 \li1080 \fi-360 1.\tx360\tab item one\par} {\pard \ql \f0 \sa0 \li1080 \fi-360 2.\tx360\tab item two\sa180\par} {\pard \ql \f0 \sa180 \li720 \fi0 Nested block quotes:\par} {\pard \ql \f0 \sa180 \li1440 \fi0 nested\par} {\pard \ql \f0 \sa180 \li1440 \fi0 nested\par} {\pard \ql \f0 \sa180 \li0 \fi0 This should not be a block quote: 2 > 1.\par} {\pard \ql \f0 \sa180 \li0 \fi0 And a following paragraph.\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Code Blocks\par} {\pard \ql \f0 \sa180 \li0 \fi0 Code:\par} {\pard \ql \f0 \sa180 \li0 \fi0 \f1 ---- (should be four hyphens)\line \line sub status \{\line print "working";\line \}\line \line this code block is indented by one tab\par} {\pard \ql \f0 \sa180 \li0 \fi0 And:\par} {\pard \ql \f0 \sa180 \li0 \fi0 \f1 this code block is indented by two tabs\line \line These should not be escaped: \\$ \\\\ \\> \\[ \\\{\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Lists\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Unordered\par} {\pard \ql \f0 \sa180 \li0 \fi0 Asterisks tight:\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab asterisk 1\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab asterisk 2\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab asterisk 3\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Asterisks loose:\par} {\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab asterisk 1\par} {\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab asterisk 2\par} {\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab asterisk 3\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Pluses tight:\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Plus 1\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Plus 2\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Plus 3\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Pluses loose:\par} {\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Plus 1\par} {\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Plus 2\par} {\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Plus 3\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Minuses tight:\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Minus 1\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Minus 2\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Minus 3\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Minuses loose:\par} {\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Minus 1\par} {\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Minus 2\par} {\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Minus 3\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Ordered\par} {\pard \ql \f0 \sa180 \li0 \fi0 Tight:\par} {\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab First\par} {\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab Second\par} {\pard \ql \f0 \sa0 \li360 \fi-360 3.\tx360\tab Third\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 and:\par} {\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab One\par} {\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab Two\par} {\pard \ql \f0 \sa0 \li360 \fi-360 3.\tx360\tab Three\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Loose using tabs:\par} {\pard \ql \f0 \sa180 \li360 \fi-360 1.\tx360\tab First\par} {\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab Second\par} {\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Third\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 and using spaces:\par} {\pard \ql \f0 \sa180 \li360 \fi-360 1.\tx360\tab One\par} {\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab Two\par} {\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Three\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Multiple paragraphs:\par} {\pard \ql \f0 \sa180 \li360 \fi-360 1.\tx360\tab Item 1, graf one.\par} {\pard \ql \f0 \sa180 \li360 \fi0 Item 1. graf two. The quick brown fox jumped over the lazy dog\u8217's back.\par} {\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab Item 2.\par} {\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Item 3.\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Nested\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Tab\par} {\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Tab\par} {\pard \ql \f0 \sa0 \li1080 \fi-360 \bullet \tx360\tab Tab\sa180\sa180\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's another:\par} {\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab First\par} {\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab Second:\par} {\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Fee\par} {\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Fie\par} {\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Foe\sa180\par} {\pard \ql \f0 \sa0 \li360 \fi-360 3.\tx360\tab Third\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Same thing but with paragraphs:\par} {\pard \ql \f0 \sa180 \li360 \fi-360 1.\tx360\tab First\par} {\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab Second:\par} {\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Fee\par} {\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Fie\par} {\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Foe\sa180\par} {\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Third\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Tabs and spaces\par} {\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab this is a list item indented with tabs\par} {\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab this is a list item indented with spaces\par} {\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with tabs\par} {\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with spaces\sa180\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Fancy list markers\par} {\pard \ql \f0 \sa0 \li360 \fi-360 (2)\tx360\tab begins with 2\par} {\pard \ql \f0 \sa180 \li360 \fi-360 (3)\tx360\tab and now 3\par} {\pard \ql \f0 \sa180 \li360 \fi0 with a continuation\par} {\pard \ql \f0 \sa0 \li720 \fi-360 iv.\tx360\tab sublist with roman numerals, starting with 4\par} {\pard \ql \f0 \sa0 \li720 \fi-360 v.\tx360\tab more items\par} {\pard \ql \f0 \sa0 \li1080 \fi-360 (A)\tx360\tab a subsublist\par} {\pard \ql \f0 \sa0 \li1080 \fi-360 (B)\tx360\tab a subsublist\sa180\sa180\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Nesting:\par} {\pard \ql \f0 \sa0 \li360 \fi-360 A.\tx360\tab Upper Alpha\par} {\pard \ql \f0 \sa0 \li720 \fi-360 I.\tx360\tab Upper Roman.\par} {\pard \ql \f0 \sa0 \li1080 \fi-360 (6)\tx360\tab Decimal start with 6\par} {\pard \ql \f0 \sa0 \li1440 \fi-360 c)\tx360\tab Lower alpha with paren\sa180\sa180\sa180\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Autonumbering:\par} {\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab Autonumber.\par} {\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab More.\par} {\pard \ql \f0 \sa0 \li720 \fi-360 a.\tx360\tab Nested.\sa180\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Should not be a list item:\par} {\pard \ql \f0 \sa180 \li0 \fi0 M.A.\u160?2007\par} {\pard \ql \f0 \sa180 \li0 \fi0 B. Williams\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Definition Lists\par} {\pard \ql \f0 \sa180 \li0 \fi0 Tight using spaces:\par} {\pard \ql \f0 \sa0 \li0 \fi0 apple\par} {\pard \ql \f0 \sa0 \li360 \fi0 red fruit\par} {\pard \ql \f0 \sa0 \li0 \fi0 orange\par} {\pard \ql \f0 \sa0 \li360 \fi0 orange fruit\par} {\pard \ql \f0 \sa0 \li0 \fi0 banana\par} {\pard \ql \f0 \sa0 \li360 \fi0 yellow fruit\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Tight using tabs:\par} {\pard \ql \f0 \sa0 \li0 \fi0 apple\par} {\pard \ql \f0 \sa0 \li360 \fi0 red fruit\par} {\pard \ql \f0 \sa0 \li0 \fi0 orange\par} {\pard \ql \f0 \sa0 \li360 \fi0 orange fruit\par} {\pard \ql \f0 \sa0 \li0 \fi0 banana\par} {\pard \ql \f0 \sa0 \li360 \fi0 yellow fruit\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Loose:\par} {\pard \ql \f0 \sa0 \li0 \fi0 apple\par} {\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par} {\pard \ql \f0 \sa0 \li0 \fi0 orange\par} {\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par} {\pard \ql \f0 \sa0 \li0 \fi0 banana\par} {\pard \ql \f0 \sa180 \li360 \fi0 yellow fruit\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Multiple blocks with italics:\par} {\pard \ql \f0 \sa0 \li0 \fi0 {\i apple}\par} {\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par} {\pard \ql \f0 \sa180 \li360 \fi0 contains seeds, crisp, pleasant to taste\par} {\pard \ql \f0 \sa0 \li0 \fi0 {\i orange}\par} {\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par} {\pard \ql \f0 \sa180 \li360 \fi0 \f1 \{ orange code block \}\par} {\pard \ql \f0 \sa180 \li1080 \fi0 orange block quote\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Multiple definitions, tight:\par} {\pard \ql \f0 \sa0 \li0 \fi0 apple\par} {\pard \ql \f0 \sa0 \li360 \fi0 red fruit\par} {\pard \ql \f0 \sa0 \li360 \fi0 computer\par} {\pard \ql \f0 \sa0 \li0 \fi0 orange\par} {\pard \ql \f0 \sa0 \li360 \fi0 orange fruit\par} {\pard \ql \f0 \sa0 \li360 \fi0 bank\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Multiple definitions, loose:\par} {\pard \ql \f0 \sa0 \li0 \fi0 apple\par} {\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par} {\pard \ql \f0 \sa180 \li360 \fi0 computer\par} {\pard \ql \f0 \sa0 \li0 \fi0 orange\par} {\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par} {\pard \ql \f0 \sa180 \li360 \fi0 bank\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Blank line after term, indented marker, alternate markers:\par} {\pard \ql \f0 \sa0 \li0 \fi0 apple\par} {\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par} {\pard \ql \f0 \sa180 \li360 \fi0 computer\par} {\pard \ql \f0 \sa0 \li0 \fi0 orange\par} {\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par} {\pard \ql \f0 \sa0 \li720 \fi-360 1.\tx360\tab sublist\par} {\pard \ql \f0 \sa0 \li720 \fi-360 2.\tx360\tab sublist\sa180\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 HTML Blocks\par} {\pard \ql \f0 \sa180 \li0 \fi0 Simple block on one line:\par} {\pard \ql \f0 \sa0 \li0 \fi0 foo\par} {\pard \ql \f0 \sa180 \li0 \fi0 And nested without indentation:\par} {\pard \ql \f0 \sa180 \li0 \fi0 foo\par} {\pard \ql \f0 \sa0 \li0 \fi0 bar\par} {\pard \ql \f0 \sa180 \li0 \fi0 Interpreted markdown in a table:\par} {\pard \ql \f0 \sa0 \li0 \fi0 This is {\i emphasized}\par} {\pard \ql \f0 \sa0 \li0 \fi0 And this is {\b strong}\par} {\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a simple block:\par} {\pard \ql \f0 \sa180 \li0 \fi0 foo\par} {\pard \ql \f0 \sa180 \li0 \fi0 This should be a code block, though:\par} {\pard \ql \f0 \sa180 \li0 \fi0 \f1
                    \line foo\line
                    \par} {\pard \ql \f0 \sa180 \li0 \fi0 As should this:\par} {\pard \ql \f0 \sa180 \li0 \fi0 \f1
                    foo
                    \par} {\pard \ql \f0 \sa180 \li0 \fi0 Now, nested:\par} {\pard \ql \f0 \sa0 \li0 \fi0 foo\par} {\pard \ql \f0 \sa180 \li0 \fi0 This should just be an HTML comment:\par} {\pard \ql \f0 \sa180 \li0 \fi0 Multiline:\par} {\pard \ql \f0 \sa180 \li0 \fi0 Code block:\par} {\pard \ql \f0 \sa180 \li0 \fi0 \f1 \par} {\pard \ql \f0 \sa180 \li0 \fi0 Just plain comment, with trailing spaces on the line:\par} {\pard \ql \f0 \sa180 \li0 \fi0 Code:\par} {\pard \ql \f0 \sa180 \li0 \fi0 \f1
                    \par} {\pard \ql \f0 \sa180 \li0 \fi0 Hr\u8217's:\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Inline Markup\par} {\pard \ql \f0 \sa180 \li0 \fi0 This is {\i emphasized}, and so {\i is this}.\par} {\pard \ql \f0 \sa180 \li0 \fi0 This is {\b strong}, and so {\b is this}.\par} {\pard \ql \f0 \sa180 \li0 \fi0 An {\i {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul emphasized link }}} }.\par} {\pard \ql \f0 \sa180 \li0 \fi0 {\b {\i This is strong and em.}}\par} {\pard \ql \f0 \sa180 \li0 \fi0 So is {\b {\i this}} word.\par} {\pard \ql \f0 \sa180 \li0 \fi0 {\b {\i This is strong and em.}}\par} {\pard \ql \f0 \sa180 \li0 \fi0 So is {\b {\i this}} word.\par} {\pard \ql \f0 \sa180 \li0 \fi0 This is code: {\f1 >}, {\f1 $}, {\f1 \\}, {\f1 \\$}, {\f1 }.\par} {\pard \ql \f0 \sa180 \li0 \fi0 {\strike This is {\i strikeout}.}\par} {\pard \ql \f0 \sa180 \li0 \fi0 Superscripts: a{\super bc}d a{\super {\i hello}} a{\super hello\u160?there}.\par} {\pard \ql \f0 \sa180 \li0 \fi0 Subscripts: H{\sub 2}O, H{\sub 23}O, H{\sub many\u160?of\u160?them}O.\par} {\pard \ql \f0 \sa180 \li0 \fi0 These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Smart quotes, ellipses, dashes\par} {\pard \ql \f0 \sa180 \li0 \fi0 \u8220"Hello,\u8221" said the spider. \u8220"\u8216'Shelob\u8217' is my name.\u8221"\par} {\pard \ql \f0 \sa180 \li0 \fi0 \u8216'A\u8217', \u8216'B\u8217', and \u8216'C\u8217' are letters.\par} {\pard \ql \f0 \sa180 \li0 \fi0 \u8216'Oak,\u8217' \u8216'elm,\u8217' and \u8216'beech\u8217' are names of trees. So is \u8216'pine.\u8217'\par} {\pard \ql \f0 \sa180 \li0 \fi0 \u8216'He said, \u8220"I want to go.\u8221"\u8217' Were you alive in the 70\u8217's?\par} {\pard \ql \f0 \sa180 \li0 \fi0 Here is some quoted \u8216'{\f1 code}\u8217' and a \u8220"{\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul quoted link }}} \u8221".\par} {\pard \ql \f0 \sa180 \li0 \fi0 Some dashes: one\u8212-two \u8212- three\u8212-four \u8212- five.\par} {\pard \ql \f0 \sa180 \li0 \fi0 Dashes between numbers: 5\u8211-7, 255\u8211-66, 1987\u8211-1999.\par} {\pard \ql \f0 \sa180 \li0 \fi0 Ellipses\u8230?and\u8230?and\u8230?.\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 LaTeX\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab \par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab 2\u8197?+\u8197?2\u8196?=\u8196?4\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\i x}\u8196?\u8712?\u8196?{\i y}\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\i \u945?}\u8197?\u8743?\u8197?{\i \u969?}\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab 223\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\i p}-Tree\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Here\u8217's some display math: $$\\frac\{d\}\{dx\}f(x)=\\lim_\{h\\to 0\}\\frac\{f(x+h)-f(x)\}\{h\}$$\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Here\u8217's one that has a line break in it: {\i \u945?}\u8197?+\u8197?{\i \u969?}\u8197?\u215?\u8197?{\i x}{\super 2}.\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 These shouldn\u8217't be math:\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab To get the famous equation, write {\f1 $e = mc^2$}.\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab $22,000 is a {\i lot} of money. So is $34,000. (It worked if \u8220"lot\u8221" is emphasized.)\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Shoes ($20) and socks ($5).\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Escaped {\f1 $}: $73 {\i this should be emphasized} 23$.\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a LaTeX table:\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Special Characters\par} {\pard \ql \f0 \sa180 \li0 \fi0 Here is some unicode:\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab I hat: \u206?\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab o umlaut: \u246?\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab section: \u167?\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab set membership: \u8712?\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab copyright: \u169?\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 AT&T has an ampersand in their name.\par} {\pard \ql \f0 \sa180 \li0 \fi0 AT&T is another way to write it.\par} {\pard \ql \f0 \sa180 \li0 \fi0 This & that.\par} {\pard \ql \f0 \sa180 \li0 \fi0 4 < 5.\par} {\pard \ql \f0 \sa180 \li0 \fi0 6 > 5.\par} {\pard \ql \f0 \sa180 \li0 \fi0 Backslash: \\\par} {\pard \ql \f0 \sa180 \li0 \fi0 Backtick: `\par} {\pard \ql \f0 \sa180 \li0 \fi0 Asterisk: *\par} {\pard \ql \f0 \sa180 \li0 \fi0 Underscore: _\par} {\pard \ql \f0 \sa180 \li0 \fi0 Left brace: \{\par} {\pard \ql \f0 \sa180 \li0 \fi0 Right brace: \}\par} {\pard \ql \f0 \sa180 \li0 \fi0 Left bracket: [\par} {\pard \ql \f0 \sa180 \li0 \fi0 Right bracket: ]\par} {\pard \ql \f0 \sa180 \li0 \fi0 Left paren: (\par} {\pard \ql \f0 \sa180 \li0 \fi0 Right paren: )\par} {\pard \ql \f0 \sa180 \li0 \fi0 Greater-than: >\par} {\pard \ql \f0 \sa180 \li0 \fi0 Hash: #\par} {\pard \ql \f0 \sa180 \li0 \fi0 Period: .\par} {\pard \ql \f0 \sa180 \li0 \fi0 Bang: !\par} {\pard \ql \f0 \sa180 \li0 \fi0 Plus: +\par} {\pard \ql \f0 \sa180 \li0 \fi0 Minus: -\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Links\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Explicit\par} {\pard \ql \f0 \sa180 \li0 \fi0 Just a {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul URL }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul URL and title }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul URL and title }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul URL and title }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul URL and title }}} \par} {\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul URL and title }}} \par} {\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/with_underscore"}}{\fldrslt{\ul with_underscore }}} \par} {\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "mailto:nobody@nowhere.net"}}{\fldrslt{\ul Email link }}} \par} {\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK ""}}{\fldrslt{\ul Empty }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Reference\par} {\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul bar }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul bar }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul bar }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 With {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul embedded [brackets] }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul b }}} by itself should be a link.\par} {\pard \ql \f0 \sa180 \li0 \fi0 Indented {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul once }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 Indented {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul twice }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 Indented {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul thrice }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 This should [not][] be a link.\par} {\pard \ql \f0 \sa180 \li0 \fi0 \f1 [not]: /url\par} {\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul bar }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul biz }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 With ampersands\par} {\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a {\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul link with an ampersand in the URL }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a link with an amersand in the link text: {\field{\*\fldinst{HYPERLINK "http://att.com/"}}{\fldrslt{\ul AT&T }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's an {\field{\*\fldinst{HYPERLINK "/script?foo=1&bar=2"}}{\fldrslt{\ul inline link }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's an {\field{\*\fldinst{HYPERLINK "/script?foo=1&bar=2"}}{\fldrslt{\ul inline link in pointy braces }}} .\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Autolinks\par} {\pard \ql \f0 \sa180 \li0 \fi0 With an ampersand: {\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul http://example.com/?foo=1&bar=2 }}} \par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab In a list?\par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "http://example.com/"}}{\fldrslt{\ul http://example.com/ }}} \par} {\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab It should.\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 An e-mail address: {\field{\*\fldinst{HYPERLINK "mailto:nobody@nowhere.net"}}{\fldrslt{\ul nobody@nowhere.net }}} \par} {\pard \ql \f0 \sa180 \li720 \fi0 Blockquoted: {\field{\*\fldinst{HYPERLINK "http://example.com/"}}{\fldrslt{\ul http://example.com/ }}} \par} {\pard \ql \f0 \sa180 \li0 \fi0 Auto-links should not occur here: {\f1 }\par} {\pard \ql \f0 \sa180 \li0 \fi0 \f1 or here: \par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Images\par} {\pard \ql \f0 \sa180 \li0 \fi0 From \u8220"Voyage dans la Lune\u8221" by Georges Melies (1902):\par} {\pard \ql \f0 \sa180 \li0 \fi0 {\pict\jpegblip\picw250\pich250\picwgoal3000\pichgoal3000\bin ffd8ffe000104a46494600010101007800780000ffdb00430006040506050406060506070706080a100a0a09090a140e0f0c1017141818171416161a1d251f1a1b231c1616202c20232627292a29191f2d302d283025282928ffdb0043010707070a080a130a0a13281a161a2828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828ffc000110800fa00fa03011100021101031101ffc4001c0000000701010000000000000000000000010203040506070008ffc4003e100002010303020404040502050500030001020300041105122106311322415107617181143291a1234252b1c115f016336272d1082443e1f1265382ffc40017010101010100000000000000000000000000010204ffc4001b11010101010003010000000000000000000001110212213141ffda000c03010002110311003f00dadd18a10a704f6a95ccc57e37750782b0d8d9ea0cd32e7c5446e07e9f4ad723119a7b89e61e348f260719278aad613cbb640002938c76a182b264fc87bd13009c0c019c76e3d68a072e1cf6f4cd502d330c28269a61bb39c923923d4fad44c08dccb95cfd28b8280769ee08a263891e1808739e4f1d8d149392172cc714050dbb9fde8960ed8c60b79b1ed44103b05c331dbdb1dc5026ac1946d20ff8140aa631c773ec738a0346a003bf93e9cf02801895e7b9a01886796c923bd0090a06393c76a0142003ce3d86680d8dd9392303f5341ccc1b3cf7a2c812c37e4923d381429757013209fa511c18146c9247a0f6a007900c0c671c6280854e086c673eb45c27c038fd68aedff2fda836ef881f136f25d5e6b7d1262964aa02b03f98fbf153131935edcc97576f35c33349212cc4f39f7ab26186dfce5b200f73451f7600dcb8cf27e7400c0b291914046c9e0718fde81371b8e7273f4ef4007691919240e714097f31f376e7b5008caee27807b0f5a02c8e1b3c6d27d33cd0201d839523144d1a149ae084b78da47638211771fd050d582c3a0faab5119b6d12f8ab1c06788a0fd4e2ac356fd1fe08754ddccaba849696309e598c9e2103fed1dcfdeadc44fea5ff00a7f956366d375e492403ca935bedcf1eea4ff6ac68a55efc1beb3b552574f8e7009ff933a927ec715bc82b3a8f4d6bba5ca1352d22fe061cf9a0383f71dea5119cc6c0baed3eaac0f1fad40897dcc3d81f7a052366c1007df3400f21edefc5008c28f30c9c5170ee4fc37830086395250a7c66770c18e78da31c0c63de8609b41f7c515c5172a30c3b76344a3e377cb2339cf7a242aea89808cce368272b8c1a2e107c672a49f5c1a181c9c7ae7da8a2119e7b1f5068099ffa68258a132062d8f9e0f34059502b61bf2824e681bb297ced2a71efda80f19c47b9c77fdbe74057c13e539cf3c1a0eeeb9c73f33405ddb4f18249c1e28062b79ae242902024465b9214614649e7bd0362a7249eddc513456e5720f38f5a1a98e96e95d6baa6ebc2d1ad1e65521649bb469f563534d6d7d31f04347d2a2fc5f535db6a0e83718906c887cbbe5a9a8bef44dce9f731ca9a2e89169d6d6f2184b1455dc07b11dcfeb4d16f119c649a681285b03d3e5500f87820ff006a0e098191de80ac9b8904647b55d11da9681a56a31f87a869f6970b8ffe4883629a289aefc16e92d441682da5b098f21ed9f033f353914d19b751fc08d66cc16d12fe2bf45ec92ff0df1fdbfb559ec667aff4eeb1a04db359d3ae6d40eccebe53f46ec7f5ab82263da7dcf3eb5174e5181076918c7de869503232491ee4515c1803824f03b51287f30e0e7d803449494832c157278a2e8c71fcb9f9d144639236824d01e142efb1768cfb9c7ef40512a818de78ff00a682518e7cc30ab9e00a02cce9953247bd41e467191ed9a04205ee99da4e4e3d283a524b0427b5026c18a8e082067db8341ce0e39ed409b6502907391edda80f2dfdc496f0c124ac6184b144cf0a4e338fd2894f7a7342d4ba9b568f4fd261f12571966270a8bfd47d8511bae85f02b47b7fc34bac5d5c5dc88a0c90ab6c8d9bedce3ef4d1ad691a6dae976a96d616d15b409f9638d70054a1dbc68ea51d4329f4619a8022b78e04548515117b05000a035c5c4702a995c26e3819f534047bcb68a458cce866719540724d02e41c0f7a012a40f6141cbc8e7bd01719e38e6838af1c0a04ca8206d3cd037bdb082fad9e0bd8a39e0718649141047d0d5d18f759fc0cd3af164b8e9999acae4e4f81236e898f7c0f55fed574615aee83a96817ef67abda3db4ebdb7f66f983d88a061bb8db9e3d45165076db83c1f950a53780d8247c80a2398f182724f1c7ad080c608cfa7a51a0062adc7afbd0130173bb9c5070f071cb37e82826106e8f615e01c9e680d6b35bc534be3c1e3831b2aa962bb188f2b71df1de819ae4b1048c7f57bd01a58268e332642ae0704f7cf6207af6a01b99e17b7b6416e227407c494139909ed9f4c0a04a4e501e0f1eb40d263e53dce7fa682c9d0bd13abf58dd6db18bc2b157c4975270ab8ef8f563f21447a73a03a1f4de8eb031582b497328066b97fcd21ff038edfde88b7e32703bd64188e7e6283864b73400cd804b67ca3268317eacea6d56ff005233592f8b6303f953fa4af7c2fa93417fe98b763e0ea171297bab98558068f695ce0e08fdbd281e5c6a57ba5e9d14d716ef7774f2ec112601da4f27ec2827ada74bab559a20e148fcae36b0f91140283729c77a0e0a7777a01dac68395719e39a029607cb901b19c501480ab9279f4a086ea8d0b48d76c0586b7143224a76c61ce1831fe93e86b43cd1f12fe19ea7d2533dcdbeebcd20b612651e68f9ece3fcf6fa5067cbcf20ff009a051724905411e94032799060723da8406d6c67e7ea68d0e1770fe5cfb5026c37039ef9a02eca098c91e6e01e71c500b1d8a49c12786cf6a06a4e256008e3d050119958007920e2801154e32fb4120927b014017eb1c523ac5209a356215c291b87be28957ef853f0d66eaa99352d515e1d190f947669ce7b0ffa7e74a8f4be996569a5d9c56b6704705b46bb5238d42851f2ac875712bc70b3c30f892019540704d01ad2669a0491936330c95ce7140b2e4939a03638c7e8680ae485e33bbe540d60d3ada162c90a02c7270a39340a4f28b68da4645007a8f6a069a746f73235ddcefc391e12b2e1916824948742c99382473c73404791c617695279dc0640f9502c578c9efeb4095cb4cb0830ba21cf999c6401f4f5a05061d430c8079a02e03b3004311c7d281b5e3cd676c65489ee594e4aafe6c7ae07a9a0a075bbea3a8ea96f047d3935ebc404f04ad29411e08e011d98fed416fd212ee5b05b4d5ad6300c615807f1171eaa49eff5ad418c7c55f8466dd66d57a521f20cbcd66a7247a9283dbe5418a63862479877cf1f6c5008e400bdf1ce684016fe53dfbd1a73794600e08ce3d6800377c8c7d6800a9cf75fd4503d91492460f7ee3d28247a7b459f5fd592d22711c206f9e563858a31f99cfd050583518ba75247b1d134f9aed21396d4669769931dc01c003f7a329c4d17458ac5b55d36c12e040a3f1da75c1cb04ede2447f7f6a94567ad7a66db4fbbb29ba7d65b8b4bd8ccd09c8231eaa07b8ab04a7c2cf87b3f53ea8d77abc72c1a5dabe2452bb5a561fc83e5ee7e541e988218ed2dd22b7855228d76a46a00000ec00a510bd4dd511f4fe84da95cc31f880022da4902b1e7d3e99ac86fd03d631f565b4ee6d4dbbc649009cab2e48c83f514165b8b94b6895c44f279c280839e78ce28178ae6de46748a789e453865570483ec6812d42e85a421fc37918b00a883924d024c6e99b7a2a966c0009e17dc9f9fed40f81c77e28139218e4ff9815b9cf23340a01c907b9140201038ed402fcafd28386464e4fd33c50272bc60032609cf00fbd024f722dc66f24822ddf972f8feff00e280f69b24844919cac9ce7de83a447f30ded823007b50459d6ecacb528349b979127651b1dc795f1f3f7a0990148054823dc5015d491c0a0c3be337c2ff00c489b5ee9c87172016b9b541c49ff5a8f7f71eb560c1fc43e0a47e1aa94277310431f91fa551c1727f29ed409b641c86e31839a3454805739c1f6a026f1fd740f64665fc8c31cfde82db79bb40e9e8f49b62eb7d7e8b717ec832c91ff247fa1dc7df2281bcc9369d671493c422b7911654c1215f92bb8827bf068624ba635392df5eb4b9924558ee5bc19b71cee43c6dc7cf34c657be8db0b0b9d0f51d2afe668934dbf9628ddb8c2b8c0073f3a80da37546a7d25174fd95dc125c69f7313ee5655dfc313bd483cf07b1f6a68d5b48d5ec758b612e9d7293211c8fe653f35ee2a084eb9e8bb1eafb3582fe496278f3e1c919fcb9f97ad03ee8dd017a6741b6d3229dae161057c5750a48249ec3eb4139238568f6a9e7b103b5037934cb3793c610a2cd9277a8da73f5140ee38f6280c4b11c65b934023006d50050030e4647de80c846de3b500fcf9fbd0197273ed4007b91400e580c8e45074a82400e72682b36fd2162b7f25ddc09af2766ceeb872db79cf00f6a0b3229550140e07007a50092db860673de818df473c862686dad6470d9cce3b7b63e740fa1de6252ebb5bd81cd00bee2d800d003a6464004763ce683ce9f1cbe1f1d3a67ea1d1a30b68edffba814708c7f9c63d0fafceaca31e6dc71e1f07daa82608c83819f7a1a11ce149238fd68d0a579ec682cfd27a7c3a86bd10bc38b3b756b8b93c1fe1a8c91f7381f7a034f752ea5aa5c5eb292f732128037619c018f6ec282e5a2cb047abda74d5ce9b6da80f136de4a496219b3e48c92000323ea73467519d3da5bb757dbda410ac90c77c23058f99007ee7ec31416882ee47d23acb5185caf8bab4691b1efe57fff0038a9457ee75a82f6e7429350466b482f2742c0f74241c80c38c64541a9cfa1e89ac0177d33ab3d8de28f2b5bca429f91140e2c7a9b5ae9fb85b6ea9b46b9b3c796fe040768f76ec0fafb1f9505df4ebdb3d4edd6e74db98ee216fe68ce47d280648f75e2485a44da385ddc13f4a025ddbdbea16a633286566ce55f9c8f6c502ad750db2c514f30dec428247e6340bbf04100b73402afb943ed2b9e30683836defe9403bc1e06734020e06280cafe8683a375941d841c77c1a0151b467b50159f00e4127e5402872371040c5046eb5aadbe9b1c02e2f6dad25b89047099c677b7b0140fe3f1010afc803f3018e68160c3041ee2823f5dba92d34db89a1d9e2843b03b6d05bd013560c1748d57aa2797c6b35bab78e6959dc47231580ff336dcfb03c1a58364b5bbb7d7fa7b7427f1f673830c8664285bd1815238fad20f2c7c41e979ba43aa2e2c1cb1b663bede438f3a13c7dc76fb5515e9065b851f7a02950002a09c51a1b83cf14176e90d3645e9ad7752752aac23b3439c066665c827e944d29a6410aea725c4567135bd840d3c88a723728c29c9efe6c50d3ee9545b0bf8ef2e6e3c2fc2c6f72f2920e5f19039ee4938a9a875d03278377acf52ddf867f036ef71923932bfe51fbd3475cdc369df0db4fb389d4ea37970fa9cc0b00511795ce7d4f181eb4cd2451755fc45ac16d637381b14ca36b641dfce723e4053170d6cb52bbb362f6d3cb19241f2b9029862f09f143549ba7e7d2eef6caf2797c66ee17fdfd69862d1a069da7dfdac579d17adcda5ea9e1a992376c4723e39e3b024fd7e94c458ac3e25dee8d31d3bae74e7b79002bf8b8549471db38f5f4ed4c165e943a06a328d4ba605b4b22a1523c420c64fbaf38a82d36f0ce7cf7463790729b53017e940e0b0ceceed8ce0500e1b70daa08f5c9ed41d271cd0132476e7d7ff00aa069797d2411168ed9a41fcc858211f73c5075acb25ca6fb82aa31e58a36c81f561dcd033d42169e158ac64b98151b3981c2966cf639f4a064c7a8ac55e4865b7d493701e1c8e52403ea3cbfda827e390ca3f2c914aa81991bd281cdacc2747215c60e0ee5c67e940cb51b0b2bcbd824bfb08ee1a252d1caea1821cfa67b1fa504982b2283ce08f518a08abb82f6dd0369a5662081e14ce40c7ae1b04fda82275cb0bfd4f4536f7114589a5412461f3e4ce4e0e060f63f6ab2893d3b4b5b5b78e22ed22aae3cc3cc7e64fad3449a22a461500007602a0cd7e3b74c26b5d2ad79147baf34eccca40e4a7f30ff3f6aba3cd0543267eb5427b86f1f4c76ef45d0eca1ad5ef224d13e1cf4fd9b22192fa67bc955f8c8c617fba9fb510d7a6ed3fd43a735e5b54964be658c048fb6cdd9e7eb8a186bac97d174e6d22e23437b7ac26b95e77c68bf950fa7279e2b22dba45b59e97a669fa4ea36aeff89cea9a90451fc355ff0096ad9f4ce3f41570675d4fa8c77da8de5cde5be26bc653171ca47dc1f6c9fed5562b97f70276808da7c24f0c1c63804e33fa8a2928c0e0383c8f7ed41d92a41393f4a2548595c2c37493db4cd04e8a08f139566edfef3445b6e7aeaf65d2df48ea2b11776ae02a93e564c772adef409f4ee8ba9a21d73a36fa579ad9f325afe599171ed9c30a960d5ba0fe2843abb47a6f510fc26a4c36890f9558fcc6783506a1147b510024e30339ce680d2c6ae9861eb9a009178a0205443b989e39cd01d8075e3047ce80563057ca381ed4011c4531e503d85013c91b804a21279c903341131cda8c3abdc8650f6d20c4321232adec3dc504bab2c113c9293bb1963df3408dd4b75e1efb2856463dbc43b4631fad047e9177ad4fe32ea16b1db4b8fe1aa92571f5f5a0916bc8e0895af5c46c17cd8c9ff7da80f6d736f7f6915c59cab35bc837238ed8a072a31c1ef4062870718a06f7702dc5b3c522ee4752ae0fa8230683c75d6ba3b74ef535fe984929149e4278ca9e47edfdab42058003763ed409f88ffd6dfad06b1f12ae612fa0c76e0b471e9916d23f973eb4158d3efeff004a984da5debc1295d8e4018dbf3145d583a2ad96f356bbd7f5d90dc59587f1e79a6392f28fcaa3ee47159444ea3aa5ddfc7acf50dcdc344d7a4dbc317f52641200f6000fdeb41b5ef51d8eab672ffa9e971c97c11638268e431a46000012a3b9a351567db823b11f3ef40948e428048207a8340ab48ae83cb83ee0f3428a982719edf3e68c9cc97d3fe15ad8c9be138f2bf38e7b8f6ef40f7a5f55bdd3f56b46d3649127f1405f08e7249c76f5fa50689d48ba5f545cdcbdb462cba9206411b2b055bb07d4fb1c73528d4fa8f52d62cf47b6b8d2e65fc458c49f8a818795c151939f977a823ba0fe253750eb7fe937b04293f9f6c90be41dbdc7ff006283473c1efc1a06f69776d73bbf0f2aca32572bc80470450284a46dfca19f819f5a04e799614def26c0bdce09cfd85045dc75769d12dc3c3e2491db0dd3c85195235f7c91cfd066ae0cdba9be31f4ec61a386c1ef9d4ee473e45cfb1cf34c101d3ff1ac9d481d46c628ed24751881880833f988e7b0fa5328dfed2f2def2ce2b9b79925b791772ca87208f7a60182ee2b95cc0c48f53823fbd40ac658b30f4f4a086d4ee1d75bb6b78f4e965596366fc5211b23238008fde81f43692da5bc30d97831a0397dc09e3d714087506bf61a2c4cd77324726d2caaec141f9fd2ae0c435bf8c57173ad7876f7a2daca10489121244cdf319ce3dbf5a834fe81f881a6f57bcb6ba7c53c72c11873e28cee1db391dbef4199ff00ea4348116a5a66a8a8a04aad04847a90723f6ad7d18c312ddc02a3815423ba0f63fa541687bd9efe1b533b3c9e0a78473e899e318a09bd0ba6eef543e3b2bd8e9b10064bd9e4da001dc81401aeeb29a984d0ba7d5e1d06d4e6594f06523bc8e7f5c0ac8af752dfc17d7090d9218ec6d9447129ee71fcc4fb9cd6842ab10dc0014f3e5a2c1704b671dfdc734525226dc939e283a362c7f940344a380393df144733e2276e38f5efcd01b4bbbfc3dda4a9298a44395902e4a9c70682660d4265d62de40b1bdc1545054f95c8fe627df141af7c3af8808f3dd68dd5d2a45765884b8908d8c3b6c27b7a77a945d7a5fa474bd2ba8e4d5748b28624955d5d8b13b79ee9e983d8d40a753758c7a46b96f6114725dc92279a2810b3a64f94900763cfafa503fd3b59b79ed84da34713c0cd890f0a158fa1f981de826e1b548959fc4dc5cee24b6467e59ed4101ff19e9f676baa5d6a72c50adb4ad1ac790ccc076200f7ad41e7df881d79a87576a5f87b0f161d381db1c2a36e7e6d8ff3416bf87ff082c6f208ef7a82f22b9761bd6d619785f6dc477fa53705ab57f83bd297ceb1e9caf67708db9c4526723e849e3e94f212dd25d117fd29a8c09a76b534fa39cf8b6b71ced38e36fb73417f52e64548e34007e673e9f21ef590a1c918c90718dc281a69b68f67118d9da5058b798f6fa7fe280daadd1b2d36eae70710c4d263df0a4d583cc7a668fd4bf11b5837d7c93dcd9a3146959822a0e781f4cfa55161e9dd7fa67a4f55b9e9aea3e9f81fc09ca0ba118998fcdb2338c7b528d39f4cd2ba76e2d357d292df4eb391809963420ce1b1b576fa1e7359119f1eb4e17dd033ca172d6b2a4df303383fdeb5c8f2eef3bce4e0e335684cb0c9f354160d36f64b0baf16072b91b5f03391f43c51aab23a5debe91c4fad4d73689e6fc3a290573ff4f03e59f4a3280d67581ce916567f84b58ce0a1fccec3d58fa9a084de08c90464e4d1a8e419059b201f4a05630a176918efc50176293872c17bf14042aa0125b03db14046c60b60123fde6827fa0c68edd5365ff11346ba6292ee64194240c807e59a32b7fc51bfe8bd5ed5db424860beb62b89218422ce09c11c01dbbd0660ae110bf1bf2154838dbebfefeb41a8f4cdac7f117458f4d9ecd2df53b4cf81a822808c47255c0f7c8e7fb54a2ec2cfabba3b4b4b8d3af12eedad40926b0f070a13f9b633649f7a82eba6ea4357d321d4ecad512daf20df26e016507fa4fbfaf3e98f9d067dd2bd2faac9aa4d72d72d1e9510ca46a7631c7a320e18f1dfd7bd059afb7da816d23de4ba5de211346a1e4785f190548e4648c63b64e6b43ce9d5baafe3b539c5b452dbda46c638a167cb281c73ee4ff9340e3a3fa5f5aea4ba58f4bb57dbfcf2b02a8bf7f7a0de3a5fa0b50d2a2d92eb3e048c0a97c867dbedcf6a944e5cf4f6b76d1b3d8ea42795066266c87c81c65b9cfaf15048e83af3cd64abac08edaf01546c38dae4e0657ee6826e5b892de3702292e2545ddb55700fd0fbfca81c4b3bc718716eef9eeaa402280d14ab3c0b2c65c06fe571823ed40df56b217fa6dd5ab9216689a33f2c8c558307e83b8d77a37aaa7d22f2512c28768800c9954671b3d33ebef568d0ef7a7749eb0b5bbbb162d657b32b46d2e1564c8ed9c5644d1b0b9bbd261d2a440af6cb0e2e5b1e7dbc1238e0f7a0375b696daa7496a3a4dac8a92cf078685b271db04d391e40d5ec4586a1716de2a49e0c8c85d3b120f715ba1899173ff305413070abd89cfe9f5a2d3ee9c8639fa874eb6b804c52dc46b20c9f302c3bd11e84d47e1af4d5dc6521d3e3b662c19a58721ff5a9a321f89bd27a374b456d158dccd34d333332c9b4b2afbe47a7cb1f7aa33d2bc0d8c0f1c8f6a2c14b6d501b39cf63450897380c319e3de8065031c038f7ed40d8faf1ce41e4d004876a8dc3cc7e743025c956c818028c904579e7f0e15695c9c0541924f6c00283d0bf07f42d6b48820b8d62d20b2b58d656404959e52f83c8ff00fcfafbd4a35bb06f12391a48dd55cee2b2f3818ed8f6a8158a159890f02242079147623e631c502b0db436d1ecb7458d4738038fb0a087d6eeb508f48bb7d32d95750752b6c26c905b3ddb6f61eb574794f5cb6b9d0fa9678b512b25d24bbe52b8c1638278fbd582c57ff12afaed45b5bc0d0d8a8c08a2731ee3eec5793f40450466a1d59af446293c186cd53ca0c36eab93dc649e49fbd048e89f1675ed35e301e293919dcbf9867b37cbe94a35fe94ea4d33aba6824306dc48015750d86c6e247b0cf63591a40b8dc23fc30f14138dcac3000f9d03687547f12e8dd5af816b13148dddbcd29039c0f6f6f7a0eb5d62caf5636825db70c9bc4328f0dc0271c8a090627d3073ce681acf6505ccf14d35bc2f2c2731bb28254fb8a075144a83ca806792400334049ee6281e2496408656d880ff0031f61fa50446bd76058ea1b9e21025a3bb48afe71df9c7b71de9c8f196a0de23ca7b827d4f7add117e0cbfd4b5059392369663ff004e71c51aa97e8f555eadd258f2bf8a889cff00dc28cbd0bf123a926e96d163bdb74490bca2321c678209ff001591e71eafd7a7d7ef45cde2c20aae144638033fb9ad2e1b5e69d058da431ccf21d4a5c3b4631b62523807feaf5c7a50222f2d648c25f5aeec8c2cd19dae3d3e87e944d3eb7e90d425b49ef2292de38224f1505c3f8724a9eeaa7bd0d57a60406059436306868a7803839c7ad1a158039c13f4a33a716767f8cb9b6b55e1ae2458813e9938cd07a9f42d0b4de99b4b7d1f41b58ff19b03c93ba06607fa8b1f5f619a5b8266d74a65d42da6ba90cce996dcdc8c9fff006a5a2c2635083b05ef83eb5028076341db4b1ed9f7a04651fc41db18ed419d75b744dbea335fcb0db0335f2057901c05da73c8f9d5d18a75174a3f4c47335e35da4ce418a489374254f707d463d33565d1529b569a489a17944b06ec8057d71dcd037b4b6b8bfba31584124b27e62a8a4f1ea68357f83da7ea5a76bfe0912453ccabb49194653cb60f6ce3dfda983d196cd108c2401711f9768e306b2297d73fc6d02773a8b591922693c5004bb9d72542fa2f6efde8314ff867aeeec27500b77bb5670e36ca19b1dff2e7f2fd2837ce8bd5dd348b78b552219022870d9c46e792a4f6c608a0b846c8e03232b29ec41cd0199f1410fd4b24b1e8f712c0a5e4452d851e6c639dbf3238a0afa42ba77475e4ba8470896681da45180b18da76af3c9029c8f26dc1df2b9c606e273e86b743331924f27f4a82c12280e59b008e79f6a2d4d74188ff00e30d203a82ad7519c1ff00b860d11ba7c5e86c9fa3afae6f4091e043e021270b21e01c7dcd6479ab4dd3aeb56be4b7b184cf2b301b57d07bfd2b4bad0fe25e9f6960ba7c7a55ac50cd750335ccaade7723b83b8f6e38a2207a5ba4e7ea3d93780cb616ca53781f99fbff009a0b675a5be9765d43a75a6ad3b25adb4185429b831c70303dfdfd2831eb8954ca48f3827819c71ed406b2b1b9bf9a5fc1c4ce2253238047957dc9345d122b792eee522811a495ce1157b93ed444ff0049f476b1aaf51c761345269d25be269259570c833c6077249e062a68f53e8ef0da69509d4ae225b92a04af232ab16f98cf1f4a5a266d4dbca8af13a329ecca723f51502d14f0cb9f05d1c8ee01c91f6a0393b4edfe63c8a031608859b38f97340d84d04e5846eae50f9829ce3eb400fb24466041f5e3d2823f56d22db57b192d6e61468a41c823ff0035651916bbf04ada7badda5cad6d1b72c09dc33f2a6875d25f0865d06fe2bc6d4c4d3282026cca8cfafcfd29a34cd234a10c768f711a78f1bb392a3001208e3ec69a26a58d640c832091c90706a084ea1d3eeafdadf4f86da3166c0b4b397c18f046140f5ce4d04f4702436e91c28a9122e028ed8a0a9f5a5b6a09a1bc5a135bc72cce048b3c5bc15c638f9d59043fc2db997481aa69dae49e1cb6bb643239211939e467818f97bd305965ebce9a10bc8da9dbaa2679dd9ce3d8530572cfac87566ab05ae9f1490692b9696e1f833738555f96793504df5f25945d2576b7ec16dc46792381c7b7ad5e60f234980e42f6c9c56a82ec3eff00bd4124e49700f1c646e3cd169ce9575f83d52cee324347323f6e3861ff008a23d47d4ba6a75074fdcd8ef317e2e2ff0098bdd4706a60c3f4ae8cd5f44eb8fc3e97248a638cbc73bf90483d463b373e9574685abf42a6b5649fea72bbdeac4a8d3b018cfae31f7a6895b6b29b41d30d8e9f6bbed9213e1b7a994e724fcbb5064bd7835a9752d3af75d8116354778f660788cbd9483dbb0a0cd20b2b8d43528ad2088bdcccf854039cff00e2827a0d34e9da1de896f2182492efc0976f998aa827d3d334113a74aa9a9298628e74570478bc0c7cf1da83724bb8246d3e6416b0384da61b5501c9f5c3704f152c037561a95f5fce61d3ad6db4ab950f34b331dd9f4191db8fdcd406d67a675ab4b6d325d1af248272a43430315ddec7038f6ad4b3f448bf47eb71cb69abddebf21d5e26896203846c30c8603b9c6452d9835901405660376319ac84bf13180779d8bb82827d4fb0a06f777367a75acd7170f1430a9f331200cfceae061a0cf6dac692d7365266191db0578f5edf3a6075a6c9278b3433188a467860d96fbd40fe540471409aa0c1140750001ed8ed4058e15133c983960077edf6a06faade5c5b7822d2d926766cb967da2341dd8f0727d85033d27597d62e2ee3163756915bbf8799d71e2f19dcbf2a092b88dd9a311950a0e5b70ce47fe6ac18af53f5b69da9752dd69da9ca906876e24465d9e69881c6ff005c679c0aa2bfd267a347512c93dbb5d42d90d3c800b68c9ce0ec3cfa528db74ad034db5905ee8be1ac728dc153984f3f980f4fb56453be2de8f647a6aff53796596f0aed46798ec033ce149c0fb0ad71479c9bb9dc3bf3c55a0b95f65a825150b481a407b93c0fda8a29c06671dc93803bd131eafd0af6dffe18d2ee25982a4b04603b7a9c631fad03bbe586381bc5945b96385718c827db3eb5288eb8ba934eb15fc3c535f05427796dcccdec7150637d5bd55d5362b7975aa4d0d919018adec8637807bb60723000e4f7cd58203538aefa8aeb478a7b9beba924547b8774cf8608036a80704639cf1f9855d1a7f4c68b67a03de5e5d59dad8d988c62e1c0f107a1e7fdf7a082ea6d07a6e3e99375a7cb6b3db093c727701e2360f7f53dfb50653d4130d42ee18f48b3f0232a15218936963ebf5fbd06dbf0cfa74855b9d46e04b730c6144691e12307d33ea7de8348ba6b5478a279a004f98c479247b81f5a9438805ac0be2e02e73c9ef8fbd40c2346d43578eefc40da7da1dc8b8eefea4fcb9fef419beabf12a4bcebcb2d2fa7ee0dc58492084b30236bb6467dce383f6a0b87556a67a7f4d95a0bbb5468816f0a69c78b2e072572719ce78357079dfab3af2e7a92c963b88d94abbbf91cedc93edf418aa2c5f0dbe2a6a9a0c90d8de34773a6a8da1186d6403fa48fec682d9adeb7a9b4c9d572dacc9a6c9700456e5ca910e000ecbd8e580352fb1ae7476bd6dd49a325e5a9f3025245fe961dea097523cc0919a032af039a006936c81423104649c703ef40dcce64bc3035a87b6f0c378f9fe7cf2b8fdf340a4b6e25962915d94a67807839f7a043586922b5636ec44c061063f31f6ab079d7fe19b7eb2d4efeef55d5d74f992e9a0fc3a441dcb13927b838c9aa2d4bf042c618e178efee6e18104870172318edf5c1e6945bbe1a748ea7d2315edbea3a99bcb190030c401010e4e783ee0fa56455be3d6b90c1a6268d69e17f1486900ee98ec29ccc183119419e7e55ba11f089f523ef5058363a8059fb8e31e9421b491056c01819e28d3d0ff07eea3d53a1e3b6b8db235aca63c139c0eea68ca47a9fa6ef757b83ff00bf68ad428c2f248c7a8f9fcea518df516adac74e7544f63a2ea172f1800291e6cee19ec78cd5826344e85b6bad25ba8fade5b99dae0ee11efc71e858f7e7d054a2d7d39a75ae8f7b6b00b8917f1516624b78429da327cec493db1db1d8540cf4aea28f58d6aeae2f6dd64b498082d880488d149fcea7d4939ab04175e6850a8d32de3b78e380c8de32c4db4e18e430fef543cf86fd0d691b4fabdf6648b3b2db69ce7dd87be68342d2f4fb9b5b891af1a28a2dc05bc5036d001e0eef7352884b961a2ea9aa7555c885e08d45b5bc52b61b686c120fb939fb541276bd4b61d53624d942e2f6200bc32290633e99f4233416dd3ad3f0d611c0c77b632e71dc9ef41156dd27a45addcb3dbd9c513b1dd941821bdc7b558333b9f873757fd69a85e3f813e9c7723b5d93265d872473c11544a68ff08fa75e290b42ec4e4124e70738fa5048e89f0f745d2aeadd2decedda6525c975121183c77f7a945c754d0e0d563682ed43425369403bff00bcd58308ba7d5fe13f5a05889974a9d8b46aede4914f707d88ff001528ddf4fd7edb54d1a1d56c312dab2e64dbc9418e78f5c541296d70b716d1cd6f8789977230ecc280cb7519b816f212b205de4e0843ce300f6cfcb39a0545c42cee88e0b458ddec33ee680eac92266360debc7b5056fad2d354b9b189745744be121daf27e550548ce3d4d58324d07a725e98ea2b7ff5381f5169a7579d021fe13904ee43ddfbe49038ab46e76cf05cc714f6d309232a4a98ce54fd6b2196bb7f2e9b631b2c427b891b6851db3eff002007341e5bf887aa2ea3d4f77378be381e42fdb711ed5a1554395caf1cd07617dcd04fc85402101da791421b49920331381c60d1a69bf02f56f03a925b12c162b98c955f775e47df19a32d99b518268e4491668704a79d4aeec7b7bd4a30feb7e9144d76e265697c3e2693631674273803e556087d76f35fd49859e9925ccf611141106f2e182e3241f727f5a94681a268f79ad1b1b8b9dd66b1c2b1ce9bb06361c1e7bf3fe6a096b0d3ba57488e485b52b40909c386901607d47bf7a0ae758eb69ac4d15be81a748f0a9c35cc90b2eff4c03c1c638a0b77405c5d5d45f87be5fe359a88b81b401dc1c7d38fb50586fed18ea3015790091591e447c1518c8c7a0a0a5754d8c9d49a8d9f4ee9dba0b3b5224b9692327728f627e7c6682f9a7e996b6b3a8b6b748a348820c7720761412c064e3041ce282b5d4bd73d3bd3f33daea97ac2e540dd0a292dc8cd043c1f15ba2a7923b65bb910371b9a12141f9d02edf13ba2ade56857551e5e77244c54fd0e280746ebfe99bbbd655d56dcdc9ce08465565f4ee3bfca82d53eb3a6dac3e25c5f5ba646402e33fa77a0aff5b74ad8757e9ca972844aa37c520fcca7d3f5ab067bd369a8f467544d626c98e9f7118f0200e4465c903049c8c9e6ad1b24334b6fa6249716cab20037c309dd83db03b5640dddac3764a4f02cb1103863919fa7a1a06d6f600c37162911b7b252b87dc773f1927393f4a079f868edae1ae6328a8b1ed38e30050226e85d5dc1f879011b3c47c2f604719f9d01eff4f4b83e3c6b18bb452b1cac9b8a83de80b16e8208a3b7b58e1407cc061427cc0ff1560ce7a8f592d69a97504cad2dac01a2b53900c3e9e51ea58f727d0551e73bfb86b99a49a46dcf21c96340dc13804f20f6f9501c0e3b8a0963316fcc4607007f57bd084d64dec01200ce483468ff0040d525d1755b4d4206ff0095207c11dc67ff0019a18f56584f6daad9dade4211e39104a8ded9152b235cd8c530613229c8c1c8ef50472e81690ee00322b0c100f0debdbb7ca8111ace856371358cba85aa5cc407891ccf83f2ef4048b4ad2e59bf116769672c72f99dd1437239078e2824a4d3e1b94559234110e781839fa0a0561b38ad532a12319c86c6307e740a9732a3a00cac870cd8e0faf0681be8b6db965bb909df3c85806eeabced5a09523647e6e0fef419a6adf116daf7ac34be9dd1da686e7f1ca2e243b76320ce57df9ff1560cc3e3f470ff00c78255b842b35bc6c4af9b6e323d3e95467b6365f8dbcf062beb68c119595d8aaff6e282422e9899b4f6bb5d46cda2562a76316c1078f4a0859e1b9b762c0bf94f0e84feb4125a57505c58ea70dd5d0174a986d92b1c13f6f5a0de7a5be366877260b5d42dee2d2423124a487507ebdf15289dd3fac7a7bab6feded74d61733473acdb5a162142ff00313d81ed505fa58fc6d809380c1b9f5c502e0e05040ea367a85dea454de2ff00a610375b04c16c7a16ef8340b5f6930dce9375636acf6a278f04c5dd4f1dbf4a084e91d06f3a52dee62bbd4a2b882494ced3c8a448063b63b638fde803ab7ae749b2b3096d792c93c8c109b55dcd18ce3710473ffdd043dc758dc5869044565aa5dda4c3c2b7bc78c1f14e3963db03e7c0ab066bf1327d41ba76ca6bc48ecad24c456f6b0c87cf8e4bbfa138c0fa9aa3297c83dd4e28395811cf2680a5b93c7ed413cd1ff0f3c797b8031406645236b0508406f30e68ba49c051b97d0e0e7d28ad57e19f575c5be8f269515dac772877c11bc464dea7ba8c739ce78f9d3193bb8ebfea2bcbd6b5b6b8b58bb7f13c2f0ce31cf0deb4c0f2dbad6d743d2ee99efae752d6c02a86e0054524f6383c7ff94c0b6af274c75149a46a5a82c46f1e1479fc3190bd8156fbe7f4a960bf74e9d253f1167a3ac09e0856610e3041ec7f6c540f67b892cee7f8d18368232ef2af2508c7047cf340ead5bf130accc9b1186541e723d09ffc5033bbb1b82d74d6b37f1244daa1b38073df3f4a08eeb1d3b50d4fa6a5b4d32f12cef1902ee73e523d476fde8306eb0d3fabfa4ba92c278af67bb7281606472f90bdd58558253a6afb40ea1d62283a8b461a66a6f931cf6a7c2466f7cfb939e7b5515fbed3747b5eb8f06eb78d35080a2ec9719c76f98049a0b4ebdd37d1bad869acbf0b03c5c16b29444adf50ded41995f68564a263a66b31cd02be152505493f51c1a088bab69ad1bc179e320f07c37c8a0692b46c4995f0381db39a0b2fc34e971d57d4705bc8db6c50ef9dd97b81fcbf7381528f5ae97a1d8e996d1db69b0c7648855b10a81b80f43c739c54134147b9a036063279fb5046e957726a0f2cfe04915b06db1788305ffeac7a0a00d72f8d9c491c06337533050ac7185cf2df6a06da2da4293488f34973328c34aea428c9ec3eded40ee7d2ad249448f6b133820ee2833df3fde819ea96897461b05b87815f2ee919e5d47704fa039ab079b3e326b70eafd4ef6d6650d8e9ebf868b69c8247723efebf2aa280eb9193ebedc5002a124e015340018fb8fde82cf32b1603d0678cd02406dce3008e47ce81b499c331383c9c9f5a2e9c69377369f7d6f796a4acf148acb83fb511e91b3b3d0bab745b7d45acedd8e3732b71b1fd73f7a5a19eafd09a56a0a96b1c705b49c48510761ce4fcfbd4d0d752826b2b583476fc3daacb295b79d768de8a32b1e71f989e49f6a7d14dd1af5ba275a45b8b093c054492ea769092373765c1da4679fbd306e36ba9595fe9f0dcdbcc92c33e1579cf27d0d409ea178f68521b6b76926ee8a7853f7ff140bc768d78f6f73748d1cd103b543f0091cf6efc502f7319dac194371d8b6326829f0c501d7ae6fa568d5d4942c806d4db81839f53c8cd59456fae6e628749b5bab8b1865b08e4726588ec11e7f2e49071c93da9a31dd4341d675e9a5bad374f9858162d0b4ac70e18f0573df35a0c759f87bd53a404f174f965dfff00f479b1ef570576e34bd4b4cc0bdb3b9b7258a00e846e3f2a94376475cee4914af7ca9150685f09ba61efb52fc7dd69bf8eb7c158d1d0b47bb38f37efde968d6eeb4eb5e91d6ad25b660aee59974db6881690918e31ce39279e062a5a34bb57b88adedd1e379679065d80036679e6a07e8391bce7e940c659ef5afe1286de3b16f2b8903094b7b2fa7ce81eb380c4260ed193f2a0cd6fa5d4a4ea0fc7bdadcce923158a3039db83c038e3ef41a0e96b2ad8a35e009291b8a939d9f227e43bd590436bbd6fa269202c974b7123602c76e779624e00e29833bf897d493e896525dbcb2a6b5a9c3e1456b91b6d60cf989c7f31f7a60c02490961ebcf3eb541308e39e067b507007b96007a67fb50178f97eb4165ce18165c2927b773fad023202d9c8dbb7818ff003408300b87f2f1c107d0d0c15a4f2e339c90467f6a18bdfc2cea8ff4bd561b4b9ba686d6e64552c4f954e7d7e46a60f4688d240af1b2bc6cbf5047ca960617ba658de1b792f2d94a5ab33461b18524633fa1a81b5c8b5168967369d23c0e0a24622dc981d81c76aba29df0bb48d660d52fceb88d069f04aeb69130037127f37b9c0ed9a8350781240bbc06da72323b1f7a0eb8816e633192ebc8c9472a78fa50349b4c83c068e24f0ddbcc1c13b837be4d055b57e98b996d4db5b4a893dc1e6620b6ccf2c467efc504ce97a38d3f4d874bf09af6d46e2f25cb82724e791db15650a43f878b51fc34f3da8f132b6d6a98c80a39ff007e99aba249631b58b9047239ec3e55368aeeb7d2da6f52c0eb7f16e87f2c6e836ba90724ab7a67b55d115ac7c3e8aed2182def4c56a14096368959a423d77e3229a27b41e9d8343b01069c8a8dc9660aa3713df3c64d4a1c695d3d6b67a8cba94b9b8d4e61869e4e4a8c636a7f4afcaa09a485519caae19b966f7a0435196582c656b74df3e308beec7b50629375775b691ac5bdb6b16d6378779f019b00a31cf391c9c2f1daae0b35ef52f5374de88d77aa45a6cd25ddc0108694ee2188c28007603d6a0d16c92430a4b2ed3230dc401855cfa0a0a07c45d7b5db9d462e9ee960b14b2ee134ef8c850012147ec78ab0670b643a2efae753d72686e6e2da211db42176079c8e768f65e39f7aa332d6f58bbd635096f6fe6692695b24f603d801e82823cb900ee00e68006460051dfd680ed9f0c905b713d8d006d5f5419fa505a18f94e40501b1b81a04186d62402c87be3d6810b81290aea8467201231cd1749dbc437f9f1e201db3de8ba07dc0175c027f28a335b17c26f888d6b6d0e8fabf892a29c453b1e547f49f7a946d6424f08236491c833ee0835073294888894120700f0280813c40a6711bc8843e00fca7d3ef40e41dc081f9a811681c6f7565329185623b7e9de812b3bcf11ff0b74563bd50494cf120071b97e5fda80d7577046c9019d5669dbc340324eec67fb734103d5da96bf67a7cf0e916f6e2765f25ddc4c11107ab1c8c647cce2816d3ec7f0f6564cae6e67da375e6d52cc4af2e4fb13ed4145f899d47b3499f4bb6d46cda49b69b92921565c3648e3dd40c81cd5c0ae89f13ec246d3e379ed2d6da180b5d34849da1780b128e49271c9f4a60ba685d5fa36bc42d95c324ec7090cc9b1d87b81ed50588958977cacaaa3b9341c655f12348d1dcb8dc1946540f99a019e2134454eeda7bed3839cd052fe2136b536b5d3563a1ca53c49da4b9507198940ce7e5c9fbe281c6b7a974cf4ee4ea7242d76dc784a3c595b3e9b464e3f6ad0ac745ccbd4fadcbabea42da56959a382ce7460d6b1a93c01f97272093ebf6a82f1ad6af0e9da5cb3cecf6902216919f82aa3818c7a9f4c530649a9f5269ba7429d472239bc991a1b0d3c3152880f0f23039e7bf3de90635ab6a377aa5ebdcdecef2c9239e59f3827e5ed54302195fcc38cd01245395c1f5f4a05b606538e483c501b6939e3b5077860f3914165754c33e549000dbe87de813b820c27fa7baafb8a04a69c98e281e42618c795338033df1f3a06c03e4e029247007ad010093c35674da71f977640340081a190658e41c820f141b0fc33f8926c218b4ed609366a02249bb2d19ce3ea4528dbece68eead926b7916689c643a9e0d643387521fea2f693c2d6efc786ee46d9bfed3eff2a04669edf5295ff057a60bd865309246d3bbbedc1efef41d63a8dec9ab4fa7dd4510fc3c69234ca186e2d9c003b7a67bd034bad0a5bb96e25d575267889cc1b54446d9bd0a37bfbfbd02925945a72cba8dddc48b3f87b1e58f23c623f292bdb7fa7cf38a0a5750f54ebba56a9a67fc516b6d6fd3970ea9234677c8dc7f38f6e4640ce282d1ac4b16bfa72c1d2bad430cd1ba822061865f5007d3daac19cf547c189357d561bbd3eee683c62cd786e9b73337b8c7bd512bd39f06adedec2de0d5ae639da372e6485363107f97767b505cee755d03a5e58ac228659af123184b7b733322e38c91dbf5a943ab3d52e64b49ee755d2e64950e238e35f10c884e17cbe87dc540e6d7509a4f110e9f7566a471712850abf6ce463e6280bacea36fd33a4497f773cf32c698dcc4beee33938edc7ad05534aea683ae61d64c4d2a69b6b88d16d5ca5c303f3e386cf61db140e27b5e99e96b64bdd562b6b30aa36c6c37cac7dc9eec6b42c1a66a962fa70beb6b516d0cbe76322f86c78f6c66831bf8b5d5d2dfa35a5dce60b1933b6ce3c788769f2b331ec1b8fd2831b79649984b239773c1dc68129725c1c640e73400ec781d8fb1a03c4a85d0c8582640257bd01e51fc42236263c9c67be280429c6037eb405dbf5fd682c2a0bb976cf07d3fc5009279ef8ec4e68193a9902b28e7dc71fb501d95b098e0f6dd9e0d0049131019b047b8390281bb292484e47c8500c4f242c3076bf704704739a0be7c3febfbae9a5daf23cd017c7e19fb107bb67d0f6fd6837cd2757d1fab34f4f05e37dde630b1c3a91edf4f7159103d6eb7da65fdbdf59dadb5e2460ac876ed9e1c8c060f9efe9c8a0a75cfc42d5742d2ee5a7e9dbb494b6d6b9bc930cce4f940e3cd81ed4160e98f88315e689fff0022b57664199cc5196f0c7a164ef8f98cd0589baffa68590985eb15c0db1985839f6c2919340b69d03f5285bdd6f4bf021424db4329cb153fccc3d09c76a090d3340d2f479a7bab3b38e2924e5e451cfd280d7dafe936f6c5e4bd89813b02a36589ce318a0358dc35cc4e17f9bf234cdbb78fa0c607a7340e6cec20b1596610c6934b8323226379edda81da8dcb9ec40a042f50b5bb21645473b58b11dbd7bfca8304f8add5d67a9ea8ba5d8ea72c1a4d8a952f10f2c920e368cf71e99fad5833dd0754d6ed66bdb2e9a91a5babb2a310465a57c1ddc1038e7bd5171d3748b8d46ee1ff005298dc6a764c27d4eeaee7fe1c01795881c9e7804fe940dbe287c4b6d75a1b1d1c986d62277c91bf131f4c0f6fad0663737135d3b497124924871f98e7803007d2811dc5b83903dc0a0333f03be7de8122df2c9a05a11e5f51f7a05ce7071804fca8033e5da0734020b0183bb23e5416269577ed0e5323078ceeefdff6a03dbcd62914c2f629a47c622689800879e4fbd046f9d8a2a03e31385c0e73da8b83ca590947dcaead8208e73da8849b3e19ce704f7c5015586d006431f5cf61f3a04ee586ff002481c8fe6191408f0011eb8e30682774dea9bbb5784492ca6385832e1ca95e3d2834be9df8c312e2db5eb4375080337000f1303d18763591a469baef4d755989ec6f6dae5a23e20b599406dd8e080ddbed41272f4dd8caf1c86d163910f9595882a3d718a035edd695d3b6a926b57d0ac65b10b4e06eedd863bf141077fd7af2782bd3fa26a1a8891d57c630948c0279393dcd04cf5875258f4de9f0cb7b7b6d66d2b81ba752d85f5214724fed41036bd79d2fe319d7a8f4b9c81e58de2f04827b9ce09a07a3acecf54b790685ace8697606009e52c377b7f2e682b097d7d36acf0f55df5edbdc0977412468cb6ce3be10af3c63b9c8a0b0751f505be9690dd5d752436f62a3fe4c6448f3b7b0c64e38f615734651f107e3045ac42b67a7693018633b965bc1bc838ee173807bf7cd33065baaeb1a95f2c11dfcd2bc51fe48880aa3e8a062a8b059f595df4ae9a74de9e9ec499d43c97b1427c6e47e525bb63e4282ad3ea3712893c599dbc4259c1627713c927de81043950df97db1406da8411c92063be280230839627078e79a0390a71b5bb5003a8c1232338e4507025573e9fbd02a0e41dc0e680c3691cf714053bb34160895dc16f291d98d02322aa39f3e14707ffaa06f202a5bb0c7201f4a343aca51090497efdfbfce89840c8db8e46573923ff14410b00490d9f5c1a0425dd8ce4673e873cd0265e4dbe7041ed814009b8cbb8e5863bd07163b7716e0607b6698060b96b7b9478dc8643918247ee39a60b7e97f133a8b4e0c63d4ee597380923970a3ef4c0e13e25dfcfab457ba95bdbddb212016501867b9cfbfda982f907c74b282da34874a9048aa479c83838edc62982b7ac7c42d235cd67f15ac5b40c366418a2cb0c1c81e6f5e31db14c160d035de8cd4a3f18ea96562cc37359dfe9cac887fef039fd6b39446f56ea5d13a9dca4579a922496b1975b8d22dfc3566cf9557230703be715ac1431d4d2275325d7fae6b4f6f182a93ef1e32a9f41938f6a60afeb1a95c5fea53dccf772cf2c8c489240031f627e7565c0d67bbf160487c1801073bc0c31f91f953420f2bc8c7c52cc540032738a809905c0f4fa501940208e73df34028e703938a0577ae013f4a001300db4f03b71407461ce0502dca8c9c7dcf6a003fafcbdcd0070bc1e0fd734070db467b8a04cb9c9e68274b93bcb1daa40200ed4099765249ec476cf340849b8b264823bf34689ee009cb671df1409bc8e8b8e770e3ec68984d9c953cf97be2860b248caaebc107dc67f7a184c31232db88fd451031ce50e76039f5c8045026efb8f93279e0fd680b239504f0483d88ef409ee25bb90c79c0e050151c6e21b39ce783eb40adbcc2cefa17bdb61322387781c950e3dbdf9c8a066f28790b22e013db3dbef54726081e63c6460d34191b1bb0720f634060e7600412c781502409c8e3d7b500ed71dbef8ed40243f181c0a02e5d4e0fad006f644e4819e3b501f7e3049e7b501bc43b4e391da80558003392d40a23305e320d02e64cf998e1bf5a032b0c927b8e68049c8c8e71c6280377043118f4e680bbff00de0504ddbb3128371c1c64668024e59f3cd02521254e4fad1a2107e48fe6a6809ddb9e78a029e1463d05027ffc744a6c3857c7b1a205ff00e637fbf4a02b12b1794e39f4a02024e7249ed409924720906800005173fd7404989698ee39e4f7a04cf723d07a501fff0097ed406ffe36a018ff00281e99a037f4d0731f3bfd28007e53400ff99a810248c0cf140bc60123233cff008a0557f9beb4056eff007a07109243e79a03778b27bfbd02b128c27039a054001b818a06609de793da815006070283ffd9}\par} {\pard \ql \f0 \sa180 \li0 \fi0 Here is a movie {\pict\jpegblip\picw20\pich22\picwgoal400\pichgoal440\bin ffd8ffe000104a46494600010101004800480000fffe0050546869732061727420697320696e20746865207075626c696320646f6d61696e2e204b6576696e204875676865732c206b6576696e68406569742e636f6d2c2053657074656d6265722031393935ffdb00430001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101ffdb00430101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101ffc00011080016001403012200021101031101ffc4001a000100020301000000000000000000000000080905060a07ffc400231000010501000300010500000000000000060304050708020001090a11153976b7ffc400160101010100000000000000000000000000060800ffc400261101000102050109000000000000000000010200030405061121b33134365154717475b4ffda000c03010002110311003f00a90cf388f366a62aa720ed6ae07f96901f3831d973452b8cf36fe3570fc908e46d466433e5dd954f2e96992d9e498c7753faa44916e016ca91cc7d88b38fe60a5b97737defcbcc539c98d336a57f4fc2ca9a486bf07ab575ad9a3af4df221d8215e36df86c4504ff0024574551b3d687ee0575757b3ad64e311ee62bd94158d37e24198c43973099f1fc0c41614d950246513a081abf76cfe7061f6863281e6352fd1670949c148dd6dfb0d25f5b3689b1d5c965b0eacbf4e0932ad28e22ab9ae945633f4744bd3c8cee0a7fdf085b9000f449c5f7afa30b83e0b6fd7b0c8429c9467ff9715347c891e25fa24a205861aa715e6a09bd0488237dc2723414d9891381524e8ca7c0894664f835653631ab55ee7e3de433e4ff001b30949124e4c10c8b6ad0a479b3f9c937b2cf5bc0095ad600a0a41a0e9faee174a1c605e161c6c7a313539650b0113190f1a8368e60d5b24f30ff008ea7f0bf867fa6595feeb6978f1fe0f9c26177f4d63a51a9235184750e7d18811339cd000000c75f000e00380380ae390c350def826ed42ad051fa6f501c50f9b699c3b69cbeb76476d202bf3ac985b6e0e968be66572893e6a744540bd9722e5c87956848629bc2559306bd113e8653d3b6aff651dfad7a3ac8b02958cba02a93ccf525757039bae6cff090e1d90688e8aa233ee86a4c4a3e0586d6b2340522e47dcb7d0046d8a5acb05a123ee25d2b230b2ada6e2e2f9ede3c05202520ec2487b0d56562529d8b3393bca76adca4ec1bca508abb001babc007915d84fe3dd14e207e3c62f8379da2a3b861fb6629d28dba53b6ea388ebfed866bf6dfb553455e91ed547ae92e9445253a4fdf3efb4f8ebdfbe7d3c78f1ee0bb9e13e358e942a4ed49e22cff00eeb35fdd7ebfffd9} icon.\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Footnotes\par} {\pard \ql \f0 \sa180 \li0 \fi0 Here is a footnote reference,{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.\par} } and another.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's the long note. This one contains multiple blocks.\par} {\pard \ql \f0 \sa180 \li0 \fi0 Subsequent blocks are indented to show that they belong to the footnote (as with list items).\par} {\pard \ql \f0 \sa180 \li0 \fi0 \f1 \{ \}\par} {\pard \ql \f0 \sa180 \li0 \fi0 If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.\par} } This should {\i not} be a footnote reference, because it contains a space.[^my note] Here is an inline note.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 This is {\i easier} to type. Inline notes may contain {\field{\*\fldinst{HYPERLINK "http://google.com"}}{\fldrslt{\ul links }}} and {\f1 ]} verbatim characters, as well as [bracketed text].\par} }\par} {\pard \ql \f0 \sa180 \li720 \fi0 Notes can go in quotes.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 In quote.\par} }\par} {\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab And in list items.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 In list.\par} }\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 This paragraph should not be part of the note, as it is not indented.\par} } pandoc-1.19.2.4/tests/writer.tei0000644000000000000000000005257513155240143014575 0ustar0000000000000000 Pandoc Test Suite John MacFarlane Anonymous

                    Produced by pandoc.

                    This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite.

                    Headers
                    Level 2 with an embedded link
                    Level 3 with emphasis
                    Level 4
                    Level 5

                    Level 1
                    Level 2 with emphasis
                    Level 3

                    with no blank line

                    Level 2

                    with no blank line

                    Paragraphs

                    Here’s a regular paragraph.

                    In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.

                    Here’s one with a bullet. * criminey.

                    There should be a hard line breakhere.

                    Block Quotes

                    E-mail style:

                    This is a block quote. It is pretty short.

                    Code in a block quote:

                    sub status { print "working"; }

                    A list:

                    item one

                    item two

                    Nested block quotes:

                    nested

                    nested

                    This should not be a block quote: 2 > 1.

                    And a following paragraph.

                    Code Blocks

                    Code:

                    ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab

                    And:

                    this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{
                    Lists
                    Unordered

                    Asterisks tight:

                    asterisk 1

                    asterisk 2

                    asterisk 3

                    Asterisks loose:

                    asterisk 1

                    asterisk 2

                    asterisk 3

                    Pluses tight:

                    Plus 1

                    Plus 2

                    Plus 3

                    Pluses loose:

                    Plus 1

                    Plus 2

                    Plus 3

                    Minuses tight:

                    Minus 1

                    Minus 2

                    Minus 3

                    Minuses loose:

                    Minus 1

                    Minus 2

                    Minus 3

                    Ordered

                    Tight:

                    First

                    Second

                    Third

                    and:

                    One

                    Two

                    Three

                    Loose using tabs:

                    First

                    Second

                    Third

                    and using spaces:

                    One

                    Two

                    Three

                    Multiple paragraphs:

                    Item 1, graf one.

                    Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.

                    Item 2.

                    Item 3.

                    Nested

                    Tab

                    Tab

                    Tab

                    Here’s another:

                    First

                    Second:

                    Fee

                    Fie

                    Foe

                    Third

                    Same thing but with paragraphs:

                    First

                    Second:

                    Fee

                    Fie

                    Foe

                    Third

                    Tabs and spaces

                    this is a list item indented with tabs

                    this is a list item indented with spaces

                    this is an example list item indented with tabs

                    this is an example list item indented with spaces

                    Fancy list markers

                    begins with 2

                    and now 3

                    with a continuation

                    sublist with roman numerals, starting with 4

                    more items

                    a subsublist

                    a subsublist

                    Nesting:

                    Upper Alpha

                    Upper Roman.

                    Decimal start with 6

                    Lower alpha with paren

                    Autonumbering:

                    Autonumber.

                    More.

                    Nested.

                    Should not be a list item:

                    M.A. 2007

                    B. Williams

                    Definition Lists

                    Tight using spaces:

                    red fruit

                    orange fruit

                    yellow fruit

                    Tight using tabs:

                    red fruit

                    orange fruit

                    yellow fruit

                    Loose:

                    red fruit

                    orange fruit

                    yellow fruit

                    Multiple blocks with italics:

                    red fruit

                    contains seeds, crisp, pleasant to taste

                    orange fruit

                    { orange code block }

                    orange block quote

                    Multiple definitions, tight:

                    red fruit

                    computer

                    orange fruit

                    bank

                    Multiple definitions, loose:

                    red fruit

                    computer

                    orange fruit

                    bank

                    Blank line after term, indented marker, alternate markers:

                    red fruit

                    computer

                    orange fruit

                    sublist

                    sublist

                    HTML Blocks

                    Simple block on one line:

                    foo

                    And nested without indentation:

                    foo

                    bar

                    Interpreted markdown in a table:

                    This is emphasized

                    And this is strong

                    Here’s a simple block:

                    foo

                    This should be a code block, though:

                    <div> foo </div>

                    As should this:

                    <div>foo</div>

                    Now, nested:

                    foo

                    This should just be an HTML comment:

                    Multiline:

                    Code block:

                    <!-- Comment -->

                    Just plain comment, with trailing spaces on the line:

                    Code:

                    <hr />

                    Hr’s:

                    Inline Markup

                    This is emphasized, and so is this.

                    This is strong, and so is this.

                    An emphasized link.

                    This is strong and em.

                    So is this word.

                    This is strong and em.

                    So is this word.

                    This is code: >, $, \, \$, <html>.

                    This is strikeout.

                    Superscripts: abcd ahello ahello there.

                    Subscripts: H2O, H23O, Hmany of themO.

                    These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.

                    Smart quotes, ellipses, dashes

                    Hello, said the spider. Shelob is my name.

                    A, B, and C are letters.

                    Oak, elm, and beech are names of trees. So is pine.

                    He said, I want to go. Were you alive in the 70’s?

                    Here is some quoted code and a quoted link.

                    Some dashes: one—two — three—four — five.

                    Dashes between numbers: 5–7, 255–66, 1987–1999.

                    Ellipses…and…and….

                    LaTeX

                    2+2=4

                    x \in y

                    \alpha \wedge \omega

                    223

                    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: \alpha + \omega \times x^2.

                    These shouldn’t be math:

                    To get the famous equation, write $e = mc^2$.

                    $22,000 is a lot of money. So is $34,000. (It worked if lot is emphasized.)

                    Shoes ($20) and socks ($5).

                    Escaped $: $73 this should be emphasized 23$.

                    Here’s a LaTeX table:

                    Special Characters

                    Here is some unicode:

                    I hat: Î

                    o umlaut: ö

                    section: §

                    set membership: ∈

                    copyright: ©

                    AT&T has an ampersand in their name.

                    AT&T is another way to write it.

                    This & that.

                    4 < 5.

                    6 > 5.

                    Backslash: \

                    Backtick: `

                    Asterisk: *

                    Underscore: _

                    Left brace: {

                    Right brace: }

                    Left bracket: [

                    Right bracket: ]

                    Left paren: (

                    Right paren: )

                    Greater-than: >

                    Hash: #

                    Period: .

                    Bang: !

                    Plus: +

                    Minus: -

                    Links
                    Explicit

                    Just a URL.

                    URL and title.

                    URL and title.

                    URL and title.

                    URL and title

                    URL and title

                    with_underscore

                    Email link (nobody@nowhere.net)

                    Empty.

                    Reference

                    Foo bar.

                    Foo bar.

                    Foo bar.

                    With embedded [brackets].

                    b by itself should be a link.

                    Indented once.

                    Indented twice.

                    Indented thrice.

                    This should [not][] be a link.

                    [not]: /url

                    Foo bar.

                    Foo biz.

                    With ampersands

                    Here’s a link with an ampersand in the URL.

                    Here’s a link with an amersand in the link text: AT&T.

                    Here’s an inline link.

                    Here’s an inline link in pointy braces.

                    Autolinks

                    With an ampersand: http://example.com/?foo=1&bar=2

                    In a list?

                    http://example.com/

                    It should.

                    An e-mail address: nobody@nowhere.net

                    Blockquoted: http://example.com/

                    Auto-links should not occur here: <http://example.com/>

                    or here: <http://example.com/>
                    Images

                    From Voyage dans la Lune by Georges Melies (1902):

                    lalune fig:Voyage dans la Lune

                    Here is a movie

                    movie
                    icon.

                    Footnotes

                    Here is a footnote reference,

                    Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.

                    and another.

                    Here’s the long note. This one contains multiple blocks.

                    Subsequent blocks are indented to show that they belong to the footnote (as with list items).

                    { <code> }

                    If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.

                    This should not be a footnote reference, because it contains a space.[^my note] Here is an inline note.

                    This is easier to type. Inline notes may contain links and ] verbatim characters, as well as [bracketed text].

                    Notes can go in quotes.

                    In quote.

                    And in list items.

                    In list.

                    This paragraph should not be part of the note, as it is not indented.

                    pandoc-1.19.2.4/tests/writer.texinfo0000644000000000000000000003463113155240143015461 0ustar0000000000000000\input texinfo @documentencoding UTF-8 @macro textstrikeout{text} ~~\text\~~ @end macro @macro textsubscript{text} @iftex @textsubscript{\text\} @end iftex @ifnottex _@{\text\@} @end ifnottex @end macro @macro textsuperscript{text} @iftex @textsuperscript{\text\} @end iftex @ifnottex ^@{\text\@} @end ifnottex @end macro @ifnottex @paragraphindent 0 @end ifnottex @titlepage @title Pandoc Test Suite @author John MacFarlane @author Anonymous July 17, 2006 @end titlepage @node Top @top Pandoc Test Suite This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite. @iftex @bigskip@hrule@bigskip @end iftex @ifnottex ------------------------------------------------------------------------ @end ifnottex @menu * Headers:: * Level 1:: * Paragraphs:: * Block Quotes:: * Code Blocks:: * Lists:: * Definition Lists:: * HTML Blocks:: * Inline Markup:: * Smart quotes ellipses dashes:: * LaTeX:: * Special Characters:: * Links:: * Images:: * Footnotes:: @end menu @node Headers @chapter Headers @anchor{#headers} @menu * Level 2 with an embedded link:: @end menu @node Level 2 with an embedded link @section Level 2 with an @uref{/url,embedded link} @anchor{#level-2-with-an-embedded-link} @menu * Level 3 with emphasis:: @end menu @node Level 3 with emphasis @subsection Level 3 with @emph{emphasis} @anchor{#level-3-with-emphasis} @menu * Level 4:: @end menu @node Level 4 @subsubsection Level 4 @anchor{#level-4} Level 5 @node Level 1 @chapter Level 1 @anchor{#level-1} @menu * Level 2 with emphasis:: * Level 2:: @end menu @node Level 2 with emphasis @section Level 2 with @emph{emphasis} @anchor{#level-2-with-emphasis} @menu * Level 3:: @end menu @node Level 3 @subsection Level 3 @anchor{#level-3} with no blank line @node Level 2 @section Level 2 @anchor{#level-2} with no blank line @iftex @bigskip@hrule@bigskip @end iftex @ifnottex ------------------------------------------------------------------------ @end ifnottex @node Paragraphs @chapter Paragraphs @anchor{#paragraphs} Here's a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here's one with a bullet. * criminey. There should be a hard line break@* here. @iftex @bigskip@hrule@bigskip @end iftex @ifnottex ------------------------------------------------------------------------ @end ifnottex @node Block Quotes @chapter Block Quotes @anchor{#block-quotes} E-mail style: @quotation This is a block quote. It is pretty short. @end quotation @quotation Code in a block quote: @verbatim sub status { print "working"; } @end verbatim A list: @enumerate @item item one @item item two @end enumerate Nested block quotes: @quotation nested @end quotation @quotation nested @end quotation @end quotation This should not be a block quote: 2 > 1. And a following paragraph. @iftex @bigskip@hrule@bigskip @end iftex @ifnottex ------------------------------------------------------------------------ @end ifnottex @node Code Blocks @chapter Code Blocks @anchor{#code-blocks} Code: @verbatim ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab @end verbatim And: @verbatim this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ @end verbatim @iftex @bigskip@hrule@bigskip @end iftex @ifnottex ------------------------------------------------------------------------ @end ifnottex @node Lists @chapter Lists @anchor{#lists} @menu * Unordered:: * Ordered:: * Nested:: * Tabs and spaces:: * Fancy list markers:: @end menu @node Unordered @section Unordered @anchor{#unordered} Asterisks tight: @itemize @item asterisk 1 @item asterisk 2 @item asterisk 3 @end itemize Asterisks loose: @itemize @item asterisk 1 @item asterisk 2 @item asterisk 3 @end itemize Pluses tight: @itemize @item Plus 1 @item Plus 2 @item Plus 3 @end itemize Pluses loose: @itemize @item Plus 1 @item Plus 2 @item Plus 3 @end itemize Minuses tight: @itemize @item Minus 1 @item Minus 2 @item Minus 3 @end itemize Minuses loose: @itemize @item Minus 1 @item Minus 2 @item Minus 3 @end itemize @node Ordered @section Ordered @anchor{#ordered} Tight: @enumerate @item First @item Second @item Third @end enumerate and: @enumerate @item One @item Two @item Three @end enumerate Loose using tabs: @enumerate @item First @item Second @item Third @end enumerate and using spaces: @enumerate @item One @item Two @item Three @end enumerate Multiple paragraphs: @enumerate @item Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog's back. @item Item 2. @item Item 3. @end enumerate @node Nested @section Nested @anchor{#nested} @itemize @item Tab @itemize @item Tab @itemize @item Tab @end itemize @end itemize @end itemize Here's another: @enumerate @item First @item Second: @itemize @item Fee @item Fie @item Foe @end itemize @item Third @end enumerate Same thing but with paragraphs: @enumerate @item First @item Second: @itemize @item Fee @item Fie @item Foe @end itemize @item Third @end enumerate @node Tabs and spaces @section Tabs and spaces @anchor{#tabs-and-spaces} @itemize @item this is a list item indented with tabs @item this is a list item indented with spaces @itemize @item this is an example list item indented with tabs @item this is an example list item indented with spaces @end itemize @end itemize @node Fancy list markers @section Fancy list markers @anchor{#fancy-list-markers} @enumerate 2 @item begins with 2 @item and now 3 with a continuation @enumerate 4 @item sublist with roman numerals, starting with 4 @item more items @enumerate A @item a subsublist @item a subsublist @end enumerate @end enumerate @end enumerate Nesting: @enumerate A @item Upper Alpha @enumerate @item Upper Roman. @enumerate 6 @item Decimal start with 6 @enumerate c @item Lower alpha with paren @end enumerate @end enumerate @end enumerate @end enumerate Autonumbering: @enumerate @item Autonumber. @item More. @enumerate @item Nested. @end enumerate @end enumerate Should not be a list item: M.A.@ 2007 B. Williams @iftex @bigskip@hrule@bigskip @end iftex @ifnottex ------------------------------------------------------------------------ @end ifnottex @node Definition Lists @chapter Definition Lists @anchor{#definition-lists} Tight using spaces: @table @asis @item apple red fruit @item orange orange fruit @item banana yellow fruit @end table Tight using tabs: @table @asis @item apple red fruit @item orange orange fruit @item banana yellow fruit @end table Loose: @table @asis @item apple red fruit @item orange orange fruit @item banana yellow fruit @end table Multiple blocks with italics: @table @asis @item @emph{apple} red fruit contains seeds, crisp, pleasant to taste @item @emph{orange} orange fruit @verbatim { orange code block } @end verbatim @quotation orange block quote @end quotation @end table Multiple definitions, tight: @table @asis @item apple red fruit computer @item orange orange fruit bank @end table Multiple definitions, loose: @table @asis @item apple red fruit computer @item orange orange fruit bank @end table Blank line after term, indented marker, alternate markers: @table @asis @item apple red fruit computer @item orange orange fruit @enumerate @item sublist @item sublist @end enumerate @end table @node HTML Blocks @chapter HTML Blocks @anchor{#html-blocks} Simple block on one line: foo And nested without indentation: foo bar Interpreted markdown in a table: This is @emph{emphasized} And this is @strong{strong} Here's a simple block: foo This should be a code block, though: @verbatim
                    foo
                    @end verbatim As should this: @verbatim
                    foo
                    @end verbatim Now, nested: foo This should just be an HTML comment: Multiline: Code block: @verbatim @end verbatim Just plain comment, with trailing spaces on the line: Code: @verbatim
                    @end verbatim Hr's: @iftex @bigskip@hrule@bigskip @end iftex @ifnottex ------------------------------------------------------------------------ @end ifnottex @node Inline Markup @chapter Inline Markup @anchor{#inline-markup} This is @emph{emphasized}, and so @emph{is this}. This is @strong{strong}, and so @strong{is this}. An @emph{@uref{/url,emphasized link}}. @strong{@emph{This is strong and em.}} So is @strong{@emph{this}} word. @strong{@emph{This is strong and em.}} So is @strong{@emph{this}} word. This is code: @code{>}, @code{$}, @code{\}, @code{\$}, @code{}. @textstrikeout{This is @emph{strikeout}.} Superscripts: a@textsuperscript{bc}d a@textsuperscript{@emph{hello}} a@textsuperscript{hello@ there}. Subscripts: H@textsubscript{2}O, H@textsubscript{23}O, H@textsubscript{many@ of@ them}O. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. @iftex @bigskip@hrule@bigskip @end iftex @ifnottex ------------------------------------------------------------------------ @end ifnottex @node Smart quotes ellipses dashes @chapter Smart quotes, ellipses, dashes @anchor{#smart-quotes-ellipses-dashes} ``Hello,'' said the spider. ```Shelob' is my name.'' `A', `B', and `C' are letters. `Oak,' `elm,' and `beech' are names of trees. So is `pine.' `He said, ``I want to go.''' Were you alive in the 70's? Here is some quoted `@code{code}' and a ``@uref{http://example.com/?foo=1&bar=2,quoted link}''. Some dashes: one---two --- three---four --- five. Dashes between numbers: 5--7, 255--66, 1987--1999. Ellipses@dots{}and@dots{}and@dots{}. @iftex @bigskip@hrule@bigskip @end iftex @ifnottex ------------------------------------------------------------------------ @end ifnottex @node LaTeX @chapter LaTeX @anchor{#latex} @itemize @item @tex \cite[22-23]{smith.1899} @end tex @item @math{2+2=4} @item @math{x \in y} @item @math{\alpha \wedge \omega} @item @math{223} @item @math{p}-Tree @item Here's some display math: @math{\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}} @item Here's one that has a line break in it: @math{\alpha + \omega \times x^2}. @end itemize These shouldn't be math: @itemize @item To get the famous equation, write @code{$e = mc^2$}. @item $22,000 is a @emph{lot} of money. So is $34,000. (It worked if ``lot'' is emphasized.) @item Shoes ($20) and socks ($5). @item Escaped @code{$}: $73 @emph{this should be emphasized} 23$. @end itemize Here's a LaTeX table: @tex \begin{tabular}{|l|l|}\hline Animal & Number \\ \hline Dog & 2 \\ Cat & 1 \\ \hline \end{tabular} @end tex @iftex @bigskip@hrule@bigskip @end iftex @ifnottex ------------------------------------------------------------------------ @end ifnottex @node Special Characters @chapter Special Characters @anchor{#special-characters} Here is some unicode: @itemize @item I hat: Î @item o umlaut: ö @item section: § @item set membership: ∈ @item copyright: © @end itemize AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \ Backtick: ` Asterisk: * Underscore: _ Left brace: @{ Right brace: @} Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: - @iftex @bigskip@hrule@bigskip @end iftex @ifnottex ------------------------------------------------------------------------ @end ifnottex @node Links @chapter Links @anchor{#links} @menu * Explicit:: * Reference:: * With ampersands:: * Autolinks:: @end menu @node Explicit @section Explicit @anchor{#explicit} Just a @uref{/url/,URL}. @uref{/url/,URL and title}. @uref{/url/,URL and title}. @uref{/url/,URL and title}. @uref{/url/,URL and title} @uref{/url/,URL and title} @uref{/url/with_underscore,with_underscore} @uref{mailto:nobody@@nowhere.net,Email link} @uref{,Empty}. @node Reference @section Reference @anchor{#reference} Foo @uref{/url/,bar}. Foo @uref{/url/,bar}. Foo @uref{/url/,bar}. With @uref{/url/,embedded [brackets]}. @uref{/url/,b} by itself should be a link. Indented @uref{/url,once}. Indented @uref{/url,twice}. Indented @uref{/url,thrice}. This should [not][] be a link. @verbatim [not]: /url @end verbatim Foo @uref{/url/,bar}. Foo @uref{/url/,biz}. @node With ampersands @section With ampersands @anchor{#with-ampersands} Here's a @uref{http://example.com/?foo=1&bar=2,link with an ampersand in the URL}. Here's a link with an amersand in the link text: @uref{http://att.com/,AT&T}. Here's an @uref{/script?foo=1&bar=2,inline link}. Here's an @uref{/script?foo=1&bar=2,inline link in pointy braces}. @node Autolinks @section Autolinks @anchor{#autolinks} With an ampersand: @url{http://example.com/?foo=1&bar=2} @itemize @item In a list? @item @url{http://example.com/} @item It should. @end itemize An e-mail address: @uref{mailto:nobody@@nowhere.net,nobody@@nowhere.net} @quotation Blockquoted: @url{http://example.com/} @end quotation Auto-links should not occur here: @code{} @verbatim or here: @end verbatim @iftex @bigskip@hrule@bigskip @end iftex @ifnottex ------------------------------------------------------------------------ @end ifnottex @node Images @chapter Images @anchor{#images} From ``Voyage dans la Lune'' by Georges Melies (1902): @float @image{lalune,,,lalune,jpg} @caption{lalune} @end float Here is a movie @image{movie,,,movie,jpg} icon. @iftex @bigskip@hrule@bigskip @end iftex @ifnottex ------------------------------------------------------------------------ @end ifnottex @node Footnotes @chapter Footnotes @anchor{#footnotes} Here is a footnote reference,@footnote{Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.} and another.@footnote{Here's the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). @verbatim { } @end verbatim If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.} This should @emph{not} be a footnote reference, because it contains a space.[^my note] Here is an inline note.@footnote{This is @emph{easier} to type. Inline notes may contain @uref{http://google.com,links} and @code{]} verbatim characters, as well as [bracketed text].} @quotation Notes can go in quotes.@footnote{In quote.} @end quotation @enumerate @item And in list items.@footnote{In list.} @end enumerate This paragraph should not be part of the note, as it is not indented. @bye pandoc-1.19.2.4/tests/writer.fb20000644000000000000000000012657013155240143014462 0ustar0000000000000000 Pandoc Test SuiteJohnMacFarlaneAnonymousJuly 17, 2006pandoc<p>Pandoc Test Suite</p>

                    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.

                    ——————————

                    <p>Headers</p>
                    <p>Level 2 with an embedded link </url></p>
                    <p>Level 3 with emphasis</p>
                    <p>Level 4</p>
                    <p>Level 5</p>
                    <p>Level 1</p>
                    <p>Level 2 with emphasis</p>
                    <p>Level 3</p>

                    with no blank line

                    <p>Level 2</p>

                    with no blank line

                    ——————————

                    <p>Paragraphs</p>

                    Here’s a regular paragraph.

                    In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.

                    Here’s one with a bullet. * criminey.

                    There should be a hard line breakhere.

                    ——————————

                    <p>Block Quotes</p>

                    E-mail style:

                    This is a block quote. It is pretty short.

                    Code in a block quote:

                    sub status {

                    print "working";

                    }

                    A list:

                     1. item one

                     2. item two

                    Nested block quotes:

                    nested

                    nested

                    This should not be a block quote: 2 > 1.

                    And a following paragraph.

                    ——————————

                    <p>Code Blocks</p>

                    Code:

                    ---- (should be four hyphens)

                    sub status {

                    print "working";

                    }

                    this code block is indented by one tab

                    And:

                    this code block is indented by two tabs

                    These should not be escaped: \$ \\ \> \[ \{

                    ——————————

                    <p>Lists</p>
                    <p>Unordered</p>

                    Asterisks tight:

                    • asterisk 1

                    • asterisk 2

                    • asterisk 3

                    Asterisks loose:

                    • asterisk 1

                    • asterisk 2

                    • asterisk 3

                    Pluses tight:

                    • Plus 1

                    • Plus 2

                    • Plus 3

                    Pluses loose:

                    • Plus 1

                    • Plus 2

                    • Plus 3

                    Minuses tight:

                    • Minus 1

                    • Minus 2

                    • Minus 3

                    Minuses loose:

                    • Minus 1

                    • Minus 2

                    • Minus 3

                    <p>Ordered</p>

                    Tight:

                     1. First

                     2. Second

                     3. Third

                    and:

                     1. One

                     2. Two

                     3. Three

                    Loose using tabs:

                     1. First

                     2. Second

                     3. Third

                    and using spaces:

                     1. One

                     2. Two

                     3. Three

                    Multiple paragraphs:

                     1. Item 1, graf one.Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.

                     2. Item 2.

                     3. Item 3.

                    <p>Nested</p>

                    • Tab

                    ◦ Tab

                    * Tab

                    Here’s another:

                     1. First

                     2. Second:

                       • Fee

                       • Fie

                       • Foe

                     3. Third

                    Same thing but with paragraphs:

                     1. First

                     2. Second:

                       • Fee

                       • Fie

                       • Foe

                     3. Third

                    <p>Tabs and spaces</p>

                    • this is a list item indented with tabs

                    • this is a list item indented with spaces

                    ◦ this is an example list item indented with tabs

                    ◦ this is an example list item indented with spaces

                    <p>Fancy list markers</p>

                     (2) begins with 2

                     (3) and now 3with a continuation

                     (3) iv. sublist with roman numerals, starting with 4

                     (3) v. more items

                     (3) v. (A) a subsublist

                     (3) v. (B) a subsublist

                    Nesting:

                     A. Upper Alpha

                     A. I. Upper Roman.

                     A. I. (6) Decimal start with 6

                     A. I. (6) c) Lower alpha with paren

                    Autonumbering:

                     1. Autonumber.

                     2. More.

                     2. 1. Nested.

                    Should not be a list item:

                    M.A. 2007

                    B. Williams

                    ——————————

                    <p>Definition Lists</p>

                    Tight using spaces:

                    apple

                        red fruit

                    orange

                        orange fruit

                    banana

                        yellow fruit

                    Tight using tabs:

                    apple

                        red fruit

                    orange

                        orange fruit

                    banana

                        yellow fruit

                    Loose:

                    apple

                        red fruit

                    orange

                        orange fruit

                    banana

                        yellow fruit

                    Multiple blocks with italics:

                    apple

                        red fruit    contains seeds, crisp, pleasant to taste

                    orange

                        orange fruit

                        { orange code block }

                        orange block quote

                    Multiple definitions, tight:

                    apple

                        red fruit    computer

                    orange

                        orange fruit    bank

                    Multiple definitions, loose:

                    apple

                        red fruit    computer

                    orange

                        orange fruit    bank

                    Blank line after term, indented marker, alternate markers:

                    apple

                        red fruit    computer

                    orange

                        orange fruit

                     1. sublist

                     2. sublist

                    <p>HTML Blocks</p>

                    Simple block on one line:

                    foo

                    And nested without indentation:

                    foo

                    bar

                    Interpreted markdown in a table:

                    <table>

                    <tr>

                    <td>

                    This is emphasized

                    </td>

                    <td>

                    And this is strong

                    </td>

                    </tr>

                    </table>

                    <script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>

                    Here’s a simple block:

                    foo

                    This should be a code block, though:

                    <div>

                    foo

                    </div>

                    As should this:

                    <div>foo</div>

                    Now, nested:

                    foo

                    This should just be an HTML comment:

                    <!-- Comment -->

                    Multiline:

                    <!--

                    Blah

                    Blah

                    -->

                    <!--

                    This is another comment.

                    -->

                    Code block:

                    <!-- Comment -->

                    Just plain comment, with trailing spaces on the line:

                    <!-- foo -->

                    Code:

                    <hr />

                    Hr’s:

                    <hr>

                    <hr />

                    <hr />

                    <hr>

                    <hr />

                    <hr />

                    <hr class="foo" id="bar" />

                    <hr class="foo" id="bar" />

                    <hr class="foo" id="bar">

                    ——————————

                    <p>Inline Markup</p>

                    This is emphasized, and so is this.

                    This is strong, and so is this.

                    An emphasized link[1].

                    This is strong and em.

                    So is this word.

                    This is strong and em.

                    So is this word.

                    This is code: >, $, \, \$, <html>.

                    This is strikeout.

                    Superscripts: abcd ahello ahello there.

                    Subscripts: H2O, H23O, Hmany of themO.

                    These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.

                    ——————————

                    <p>Smart quotes, ellipses, dashes</p>

                    “Hello,” said the spider. “‘Shelob’ is my name.”

                    ‘A’, ‘B’, and ‘C’ are letters.

                    ‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’

                    ‘He said, “I want to go.”’ Were you alive in the 70’s?

                    Here is some quoted ‘code’ and a “quoted link[2]”.

                    Some dashes: one—two — three—four — five.

                    Dashes between numbers: 5–7, 255–66, 1987–1999.

                    Ellipses…and…and….

                    ——————————

                    <p>LaTeX</p>

                    • 

                    • 2+2=4

                    • x \in y

                    • \alpha \wedge \omega

                    • 223

                    • 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: \alpha + \omega \times x^2.

                    These shouldn’t be math:

                    • To get the famous equation, write $e = mc^2$.

                    • $22,000 is a lot of money. So is $34,000. (It worked if “lot” is emphasized.)

                    • Shoes ($20) and socks ($5).

                    • Escaped $: $73 this should be emphasized 23$.

                    Here’s a LaTeX table:

                    \begin{tabular}{|l|l|}\hline

                    Animal & Number \\ \hline

                    Dog & 2 \\

                    Cat & 1 \\ \hline

                    \end{tabular}

                    ——————————

                    <p>Special Characters</p>

                    Here is some unicode:

                    • I hat: Î

                    • o umlaut: ö

                    • section: §

                    • set membership: ∈

                    • copyright: ©

                    AT&T has an ampersand in their name.

                    AT&T is another way to write it.

                    This & that.

                    4 < 5.

                    6 > 5.

                    Backslash: \

                    Backtick: `

                    Asterisk: *

                    Underscore: _

                    Left brace: {

                    Right brace: }

                    Left bracket: [

                    Right bracket: ]

                    Left paren: (

                    Right paren: )

                    Greater-than: >

                    Hash: #

                    Period: .

                    Bang: !

                    Plus: +

                    Minus: -

                    ——————————

                    <p>Links</p>
                    <p>Explicit</p>

                    Just a URL[3].

                    URL and title[4].

                    URL and title[5].

                    URL and title[6].

                    URL and title[7]

                    URL and title[8]

                    with_underscore[9]

                    Email link[10]

                    Empty[11].

                    <p>Reference</p>

                    Foo bar[12].

                    Foo bar[13].

                    Foo bar[14].

                    With embedded [brackets][15].

                    b[16] by itself should be a link.

                    Indented once[17].

                    Indented twice[18].

                    Indented thrice[19].

                    This should [not][] be a link.

                    [not]: /url

                    Foo bar[20].

                    Foo biz[21].

                    <p>With ampersands</p>

                    Here’s a link with an ampersand in the URL[22].

                    Here’s a link with an amersand in the link text: AT&T[23].

                    Here’s an inline link[24].

                    Here’s an inline link in pointy braces[25].

                    <p>Autolinks</p>

                    With an ampersand: http://example.com/?foo=1&bar=2[26]

                    • In a list?

                    • http://example.com/[27]

                    • It should.

                    An e-mail address: nobody@nowhere.net[28]

                    Blockquoted: http://example.com/[29]

                    Auto-links should not occur here: <http://example.com/>

                    or here: <http://example.com/>

                    ——————————

                    <p>Images</p>

                    From “Voyage dans la Lune” by Georges Melies (1902):

                    lalune

                    Here is a movie movie icon.

                    ——————————

                    <p>Footnotes</p>

                    Here is a footnote reference,[30] and another.[31] This should not be a footnote reference, because it contains a space.[^my note] Here is an inline note.[32]

                    Notes can go in quotes.[33]

                     1. And in list items.[34]

                    This paragraph should not be part of the note, as it is not indented.

                    <p>1</p>

                    /url

                    <p>2</p>

                    http://example.com/?foo=1&bar=2

                    <p>3</p>

                    /url/

                    <p>4</p>

                    title: /url/

                    <p>5</p>

                    title preceded by two spaces: /url/

                    <p>6</p>

                    title preceded by a tab: /url/

                    <p>7</p>

                    title with "quotes" in it: /url/

                    <p>8</p>

                    title with single quotes: /url/

                    <p>9</p>

                    /url/with_underscore

                    <p>10</p>

                    mailto:nobody@nowhere.net

                    <p>11</p>

                    <p>12</p>

                    /url/

                    <p>13</p>

                    /url/

                    <p>14</p>

                    /url/

                    <p>15</p>

                    /url/

                    <p>16</p>

                    /url/

                    <p>17</p>

                    /url

                    <p>18</p>

                    /url

                    <p>19</p>

                    /url

                    <p>20</p>

                    Title with "quotes" inside: /url/

                    <p>21</p>

                    Title with "quote" inside: /url/

                    <p>22</p>

                    http://example.com/?foo=1&bar=2

                    <p>23</p>

                    AT&T: http://att.com/

                    <p>24</p>

                    /script?foo=1&bar=2

                    <p>25</p>

                    /script?foo=1&bar=2

                    <p>26</p>

                    http://example.com/?foo=1&bar=2

                    <p>27</p>

                    http://example.com/

                    <p>28</p>

                    mailto:nobody@nowhere.net

                    <p>29</p>

                    http://example.com/

                    <p>30</p>

                    Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.

                    <p>31</p>

                    Here’s the long note. This one contains multiple blocks.

                    Subsequent blocks are indented to show that they belong to the footnote (as with list items).

                    { <code> }

                    If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.

                    <p>32</p>

                    This is easier to type. Inline notes may contain links[32] and ] verbatim characters, as well as [bracketed text].

                    <p>33</p>

                    In quote.

                    <p>34</p>

                    In list.

                    /9j/4AAQSkZJRgABAQEASABIAAD//gBQVGhpcyBhcnQgaXMgaW4gdGhlIHB1YmxpYyBkb21haW4uIEtldmluIEh1Z2hlcywga2V2aW5oQGVpdC5jb20sIFNlcHRlbWJlciAxOTk1/9sAQwABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB/9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Y7jnk96BM9yPQelAf/wCX7UBv/jagGP8AKB6ZoDf00HMfO/0oAH5TQA/5moECSMDPFAvGASMjPP8AigVX+b60BW7/AHoHEJJD55oDd4snv70CsSjCcDmgVAAbgYoGYJ3nk9qBUAYHAoP/2Q==
                    pandoc-1.19.2.4/tests/writer.opml0000644000000000000000000003424213155240143014752 0ustar0000000000000000 Pandoc Test Suite Mon, 17 Jul 2006 00:00:00 UTC John MacFarlane; Anonymous pandoc-1.19.2.4/tests/writer.dokuwiki0000644000000000000000000002507113155240143015631 0ustar0000000000000000This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite. ---- ====== Headers ====== ===== Level 2 with an embedded link ===== ==== Level 3 with emphasis ==== === Level 4 === == Level 5 == ====== Level 1 ====== ===== Level 2 with emphasis ===== ==== Level 3 ==== with no blank line ===== Level 2 ===== with no blank line ---- ====== Paragraphs ====== Here’s a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here’s one with a bullet. * criminey. There should be a hard line break\\ here. ---- ====== Block Quotes ====== E-mail style: > This is a block quote. It is pretty short.
                    Code in a block quote: sub status { print "working"; } A list: - item one - item two Nested block quotes: > nested > nested
                    This should not be a block quote: 2 > 1. And a following paragraph. ---- ====== Code Blocks ====== Code: ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab And: this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ ---- ====== Lists ====== ===== Unordered ===== Asterisks tight: * asterisk 1 * asterisk 2 * asterisk 3 Asterisks loose: * asterisk 1 * asterisk 2 * asterisk 3 Pluses tight: * Plus 1 * Plus 2 * Plus 3 Pluses loose: * Plus 1 * Plus 2 * Plus 3 Minuses tight: * Minus 1 * Minus 2 * Minus 3 Minuses loose: * Minus 1 * Minus 2 * Minus 3 ===== Ordered ===== Tight: - First - Second - Third and: - One - Two - Three Loose using tabs: - First - Second - Third and using spaces: - One - Two - Three Multiple paragraphs:
                    1. Item 1, graf one.

                      Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.

                    2. Item 2.

                    3. Item 3.

                    ===== Nested ===== * Tab * Tab * Tab Here’s another: - First - Second: * Fee * Fie * Foe - Third Same thing but with paragraphs: - First - Second: * Fee * Fie * Foe - Third ===== Tabs and spaces ===== * this is a list item indented with tabs * this is a list item indented with spaces * this is an example list item indented with tabs * this is an example list item indented with spaces ===== Fancy list markers =====
                    1. begins with 2
                    2. and now 3

                      with a continuation

                      1. sublist with roman numerals, starting with 4
                      2. more items
                        1. a subsublist
                        2. a subsublist
                    Nesting:
                    1. Upper Alpha
                      1. Upper Roman.
                        1. Decimal start with 6
                          1. Lower alpha with paren
                    Autonumbering: - Autonumber. - More. - Nested. Should not be a list item: M.A. 2007 B. Williams ---- ====== Definition Lists ====== Tight using spaces: * **apple** red fruit * **orange** orange fruit * **banana** yellow fruit Tight using tabs: * **apple** red fruit * **orange** orange fruit * **banana** yellow fruit Loose: * **apple** red fruit * **orange** orange fruit * **banana** yellow fruit Multiple blocks with italics:
                    //apple//

                    red fruit

                    contains seeds, crisp, pleasant to taste

                    //orange//

                    orange fruit

                    { orange code block } >

                    orange block quote

                    Multiple definitions, tight: * **apple** red fruitcomputer * **orange** orange fruitbank Multiple definitions, loose: * **apple** red fruitcomputer * **orange** orange fruitbank Blank line after term, indented marker, alternate markers: * **apple** red fruitcomputer * **orange** orange fruit - sublist - sublist ====== HTML Blocks ====== Simple block on one line: foo And nested without indentation: foo bar Interpreted markdown in a table:
                    This is //emphasized// And this is **strong**
                    Here’s a simple block: foo This should be a code block, though:
                    foo
                    As should this:
                    foo
                    Now, nested: foo This should just be an HTML comment: Multiline: Code block: Just plain comment, with trailing spaces on the line: Code:
                    Hr’s:








                    ---- ====== Inline Markup ====== This is //emphasized//, and so //is this//. This is **strong**, and so **is this**. An //[[url|emphasized link]]//. **//This is strong and em.//** So is **//this//** word. **//This is strong and em.//** So is **//this//** word. This is code: ''%%>%%'', ''%%$%%'', ''%%\%%'', ''%%\$%%'', ''%%%%''. This is //strikeout//. Superscripts: abcd a//hello// ahello there. Subscripts: H2O, H23O, Hmany of themO. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. ---- ====== Smart quotes, ellipses, dashes ====== “Hello,” said the spider. “‘Shelob’ is my name.” ‘A’, ‘B’, and ‘C’ are letters. ‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ ‘He said, “I want to go.”’ Were you alive in the 70’s? Here is some quoted ‘''%%code%%''’ and a “[[http://example.com/?foo=1&bar=2|quoted link]]”. Some dashes: one—two — three—four — five. Dashes between numbers: 5–7, 255–66, 1987–1999. Ellipses…and…and…. ---- ====== LaTeX ====== * * $2+2=4$ * $x \in y$ * $\alpha \wedge \omega$ * $223$ * $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: $\alpha + \omega \times x^2$. These shouldn’t be math: * To get the famous equation, write ''%%$e = mc^2$%%''. * $22,000 is a //lot// of money. So is $34,000. (It worked if “lot” is emphasized.) * Shoes ($20) and socks ($5). * Escaped ''%%$%%'': $73 //this should be emphasized// 23$. Here’s a LaTeX table: ---- ====== Special Characters ====== Here is some unicode: * I hat: Î * o umlaut: ö * section: § * set membership: ∈ * copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \ Backtick: ` Asterisk: * Underscore: _ Left brace: { Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: - ---- ====== Links ====== ===== Explicit ===== Just a [[url/|URL]]. [[url/|URL and title]]. [[url/|URL and title]]. [[url/|URL and title]]. [[url/|URL and title]] [[url/|URL and title]] [[url/with_underscore|with_underscore]] [[mailto:nobody@nowhere.net|Email link]] [[|Empty]]. ===== Reference ===== Foo [[url/|bar]]. Foo [[url/|bar]]. Foo [[url/|bar]]. With [[url/|embedded [brackets]]]. [[url/|b]] by itself should be a link. Indented [[url|once]]. Indented [[url|twice]]. Indented [[url|thrice]]. This should [not][] be a link. [not]: /url Foo [[url/|bar]]. Foo [[url/|biz]]. ===== With ampersands ===== Here’s a [[http://example.com/?foo=1&bar=2|link with an ampersand in the URL]]. Here’s a link with an amersand in the link text: [[http://att.com/|AT&T]]. Here’s an [[script?foo=1&bar=2|inline link]]. Here’s an [[script?foo=1&bar=2|inline link in pointy braces]]. ===== Autolinks ===== With an ampersand: http://example.com/?foo=1&bar=2 * In a list? * http://example.com/ * It should. An e-mail address: > Blockquoted: http://example.com/ Auto-links should not occur here: ''%%%%'' or here: ---- ====== Images ====== From “Voyage dans la Lune” by Georges Melies (1902): {{:lalune.jpg|Voyage dans la Lune lalune}} Here is a movie {{:movie.jpg|movie}} icon. ---- ====== Footnotes ====== Here is a footnote reference,((Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. )) and another.((Here’s the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). { } If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. )) This should //not// be a footnote reference, because it contains a space.[^my note] Here is an inline note.((This is //easier// to type. Inline notes may contain [[http://google.com|links]] and ''%%]%%'' verbatim characters, as well as [bracketed text]. )) > Notes can go in quotes.((In quote. > )) - And in list items.((In list.)) This paragraph should not be part of the note, as it is not indented. pandoc-1.19.2.4/tests/writer.zimwiki0000644000000000000000000002071313155240143015464 0ustar0000000000000000Content-Type: text/x-zim-wiki Wiki-Format: zim 0.4 This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite. ---- ====== Headers ====== ===== Level 2 with an embedded link ===== ==== Level 3 with emphasis ==== === Level 4 === == Level 5 == ====== Level 1 ====== ===== Level 2 with emphasis ===== ==== Level 3 ==== with no blank line ===== Level 2 ===== with no blank line ---- ====== Paragraphs ====== Here’s a regular paragraph. In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here’s one with a bullet. * criminey. There should be a hard line break here. ---- ====== Block Quotes ====== E-mail style: > This is a block quote. It is pretty short. > Code in a block quote: > > ''' > sub status { > print "working"; > } > ''' > > A list: > > 1. item one > 1. item two > > Nested block quotes: > > > nested > > > nested This should not be a block quote: 2 > 1. And a following paragraph. ---- ====== Code Blocks ====== Code: ''' ---- (should be four hyphens) sub status { print "working"; } this code block is indented by one tab ''' And: ''' this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ ''' ---- ====== Lists ====== ===== Unordered ===== Asterisks tight: * asterisk 1 * asterisk 2 * asterisk 3 Asterisks loose: * asterisk 1 * asterisk 2 * asterisk 3 Pluses tight: * Plus 1 * Plus 2 * Plus 3 Pluses loose: * Plus 1 * Plus 2 * Plus 3 Minuses tight: * Minus 1 * Minus 2 * Minus 3 Minuses loose: * Minus 1 * Minus 2 * Minus 3 ===== Ordered ===== Tight: 1. First 1. Second 1. Third and: 1. One 1. Two 1. Three Loose using tabs: 1. First 1. Second 1. Third and using spaces: 1. One 1. Two 1. Three Multiple paragraphs: 1. Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. 1. Item 2. 1. Item 3. ===== Nested ===== * Tab * Tab * Tab Here’s another: 1. First 1. Second: * Fee * Fie * Foe 1. Third Same thing but with paragraphs: 1. First 1. Second: * Fee * Fie * Foe 1. Third ===== Tabs and spaces ===== * this is a list item indented with tabs * this is a list item indented with spaces * this is an example list item indented with tabs * this is an example list item indented with spaces ===== Fancy list markers ===== 1. begins with 2 1. and now 3 with a continuation 1. sublist with roman numerals, starting with 4 1. more items 1. a subsublist 1. a subsublist Nesting: 1. Upper Alpha 1. Upper Roman. 1. Decimal start with 6 1. Lower alpha with paren Autonumbering: 1. Autonumber. 1. More. 1. Nested. Should not be a list item: M.A. 2007 B. Williams ---- ====== Definition Lists ====== Tight using spaces: * **apple** red fruit * **orange** orange fruit * **banana** yellow fruit Tight using tabs: * **apple** red fruit * **orange** orange fruit * **banana** yellow fruit Loose: * **apple** red fruit * **orange** orange fruit * **banana** yellow fruit Multiple blocks with italics: * **//apple//** red fruit contains seeds, crisp, pleasant to taste * **//orange//** orange fruit ''' { orange code block } ''' > orange block quote Multiple definitions, tight: * **apple** red fruitcomputer * **orange** orange fruitbank Multiple definitions, loose: * **apple** red fruit computer * **orange** orange fruit bank Blank line after term, indented marker, alternate markers: * **apple** red fruit computer * **orange** orange fruit 1. sublist 1. sublist ====== HTML Blocks ====== Simple block on one line: foo And nested without indentation: foo bar Interpreted markdown in a table: This is //emphasized// And this is **strong** Here’s a simple block: foo This should be a code block, though: '''
                    foo
                    ''' As should this: '''
                    foo
                    ''' Now, nested: foo This should just be an HTML comment: Multiline: Code block: ''' ''' Just plain comment, with trailing spaces on the line: Code: '''
                    ''' Hr’s: ---- ====== Inline Markup ====== This is //emphasized//, and so //is this//. This is **strong**, and so **is this**. An //[[url|emphasized link]]//. **//This is strong and em.//** So is **//this//** word. **//This is strong and em.//** So is **//this//** word. This is code: ''>'', ''$'', ''\'', ''\$'', ''''. ~~This is //strikeout//.~~ Superscripts: a^{bc}d a^{//hello//} a^{hello there}. Subscripts: H_{2}O, H_{23}O, H_{many of them}O. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. ---- ====== Smart quotes, ellipses, dashes ====== “Hello,” said the spider. “‘Shelob’ is my name.” ‘A’, ‘B’, and ‘C’ are letters. ‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ ‘He said, “I want to go.”’ Were you alive in the 70’s? Here is some quoted ‘''code''’ and a “[[http://example.com/?foo=1&bar=2|quoted link]]”. Some dashes: one—two — three—four — five. Dashes between numbers: 5–7, 255–66, 1987–1999. Ellipses…and…and…. ---- ====== LaTeX ====== * * $2+2=4$ * $x \in y$ * $\alpha \wedge \omega$ * $223$ * $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: $\alpha + \omega \times x^2$. These shouldn’t be math: * To get the famous equation, write ''$e = mc^2$''. * $22,000 is a //lot// of money. So is $34,000. (It worked if “lot” is emphasized.) * Shoes ($20) and socks ($5). * Escaped ''$'': $73 //this should be emphasized// 23$. Here’s a LaTeX table: ---- ====== Special Characters ====== Here is some unicode: * I hat: Î * o umlaut: ö * section: § * set membership: ∈ * copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Backslash: \ Backtick: ` Asterisk: * Underscore: _ Left brace: { Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: > Hash: # Period: . Bang: ! Plus: + Minus: - ---- ====== Links ====== ===== Explicit ===== Just a [[url/|URL]]. [[url/|URL and title]]. [[url/|URL and title]]. [[url/|URL and title]]. [[url/|URL and title]] [[url/|URL and title]] [[url/with_underscore|with_underscore]] [[mailto:nobody@nowhere.net|Email link]] [[|Empty]]. ===== Reference ===== Foo [[url/|bar]]. Foo [[url/|bar]]. Foo [[url/|bar]]. With [[url/|embedded [brackets]]]. [[url/|b]] by itself should be a link. Indented [[url|once]]. Indented [[url|twice]]. Indented [[url|thrice]]. This should [not][] be a link. ''' [not]: /url ''' Foo [[url/|bar]]. Foo [[url/|biz]]. ===== With ampersands ===== Here’s a [[http://example.com/?foo=1&bar=2|link with an ampersand in the URL]]. Here’s a link with an amersand in the link text: [[http://att.com/|AT&T]]. Here’s an [[script?foo=1&bar=2|inline link]]. Here’s an [[script?foo=1&bar=2|inline link in pointy braces]]. ===== Autolinks ===== With an ampersand: http://example.com/?foo=1&bar=2 * In a list? * http://example.com/ * It should. An e-mail address: > Blockquoted: http://example.com/ Auto-links should not occur here: '''' ''' or here: ''' ---- ====== Images ====== From “Voyage dans la Lune” by Georges Melies (1902): {{:lalune.jpg|Voyage dans la Lune lalune}} Here is a movie {{:movie.jpg|movie}} icon. ---- ====== Footnotes ====== Here is a footnote reference,((Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. )) and another.((Here’s the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). ''' { } ''' If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. )) This should //not// be a footnote reference, because it contains a space.[^my note] Here is an inline note.((This is //easier// to type. Inline notes may contain [[http://google.com|links]] and '']'' verbatim characters, as well as [bracketed text]. )) > Notes can go in quotes.((In quote. > )) 1. And in list items.((In list.)) This paragraph should not be part of the note, as it is not indented. pandoc-1.19.2.4/tests/writers-lang-and-dir.latex0000644000000000000000000001002313155240143017525 0ustar0000000000000000\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} \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 }{} \PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref \usepackage[unicode=true]{hyperref} \hypersetup{ 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,nswissgerman,spanish,french,main=english]{babel} \newcommand{\textgerman}[2][]{\foreignlanguage{ngerman}{#2}} \newenvironment{german}[2][]{\begin{otherlanguage}{ngerman}}{\end{otherlanguage}} \newcommand{\textenglish}[2][]{\foreignlanguage{british}{#2}} \newenvironment{english}[2][]{\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}[2][]{\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 \IfFileExists{parskip.sty}{% \usepackage{parskip} }{% else \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} % 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 \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 % set default figure placement to htbp \makeatletter \def\fps@figure{htbp} \makeatother \date{} \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-thatincludesa{span}right? \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} pandoc-1.19.2.4/tests/writers-lang-and-dir.context0000644000000000000000000000535613155240143020111 0ustar0000000000000000% 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][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes] \definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes] \setupalign[hz,hanging] \setupitaliccorrection[global, always] \setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted \usemodule[simplefonts] \setmainfontfallback[DejaVu Serif][range={greekandcoptic, greekextended}, force=yes, rscale=auto] \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 \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 pandoc-1.19.2.4/tests/dokuwiki_inline_formatting.dokuwiki0000644000000000000000000000053313155240142021726 0ustar0000000000000000Regular text //italics// **bold //bold italics//**. This is Small Caps, and this is strikethrough. Some people use single underlines for //emphasis//. Above the line is superscript and below the line is subscript. A line\\ break. hello %%//%% world %%**%% from %%__%% me ''%%hello // world ** from __ me%%'' pandoc-1.19.2.4/tests/lhs-test.markdown0000644000000000000000000000100113155240142016036 0ustar0000000000000000lhs test ======== `unsplit` is an arrow that takes a pair of values and combines them to return a single value: ``` {.sourceCode .literate .haskell} unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d unsplit = arr . uncurry -- arr (\op (x,y) -> x `op` y) ``` `(***)` combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair). f *** g = first f >>> second g Block quote: > foo bar pandoc-1.19.2.4/tests/lhs-test.markdown+lhs0000644000000000000000000000073713155240142016637 0ustar0000000000000000lhs test ======== `unsplit` is an arrow that takes a pair of values and combines them to return a single value: > unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d > unsplit = arr . uncurry > -- arr (\op (x,y) -> x `op` y) `(***)` combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair). f *** g = first f >>> second g Block quote: > foo bar pandoc-1.19.2.4/tests/lhs-test.rst0000644000000000000000000000100113155240142015024 0ustar0000000000000000lhs test ======== ``unsplit`` is an arrow that takes a pair of values and combines them to return a single value: .. code:: haskell unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d unsplit = arr . uncurry -- arr (\op (x,y) -> x `op` y) ``(***)`` combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair). :: f *** g = first f >>> second g Block quote: foo bar pandoc-1.19.2.4/tests/lhs-test.rst+lhs0000644000000000000000000000075013155240142015620 0ustar0000000000000000lhs test ======== ``unsplit`` is an arrow that takes a pair of values and combines them to return a single value: > unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d > unsplit = arr . uncurry > -- arr (\op (x,y) -> x `op` y) ``(***)`` combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair). :: f *** g = first f >>> second g Block quote: foo bar pandoc-1.19.2.4/tests/lhs-test.latex0000644000000000000000000001133613155240142015345 0ustar0000000000000000\documentclass[]{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} \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 }{} \PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref \usepackage[unicode=true]{hyperref} \hypersetup{ pdfborder={0 0 0}, breaklinks=true} \urlstyle{same} % don't use monospace font for urls \usepackage{color} \usepackage{fancyvrb} \newcommand{\VerbBar}{|} \newcommand{\VERB}{\Verb[commandchars=\\\{\}]} \DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}} % Add ',fontsize=\small' for more characters per line \newenvironment{Shaded}{}{} \newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}} \newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{#1}} \newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}} \newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}} \newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}} \newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}} \newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} \newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} \newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} \newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} \newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}} \newcommand{\ImportTok}[1]{#1} \newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{#1}}} \newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{#1}}} \newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} \newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} \newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{#1}} \newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{#1}} \newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}} \newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}} \newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}} \newcommand{\BuiltInTok}[1]{#1} \newcommand{\ExtensionTok}[1]{#1} \newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}} \newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}} \newcommand{\RegionMarkerTok}[1]{#1} \newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} \newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} \newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}} \newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}} \newcommand{\NormalTok}[1]{#1} \IfFileExists{parskip.sty}{% \usepackage{parskip} }{% else \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} % 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 % set default figure placement to htbp \makeatletter \def\fps@figure{htbp} \makeatother \date{} \begin{document} \section{lhs test}\label{lhs-test} \texttt{unsplit} is an arrow that takes a pair of values and combines them to return a single value: \begin{Shaded} \begin{Highlighting}[] \OtherTok{unsplit ::}\NormalTok{ (}\DataTypeTok{Arrow}\NormalTok{ a) }\OtherTok{=>}\NormalTok{ (b }\OtherTok{->}\NormalTok{ c }\OtherTok{->}\NormalTok{ d) }\OtherTok{->}\NormalTok{ a (b, c) d} \NormalTok{unsplit }\FunctionTok{=}\NormalTok{ arr }\FunctionTok{.}\NormalTok{ uncurry} \CommentTok{-- arr (\textbackslash{}op (x,y) -> x `op` y)} \end{Highlighting} \end{Shaded} \texttt{(***)} combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair). \begin{verbatim} f *** g = first f >>> second g \end{verbatim} Block quote: \begin{quote} foo bar \end{quote} \end{document} pandoc-1.19.2.4/tests/lhs-test.latex+lhs0000644000000000000000000000450413155240142016126 0ustar0000000000000000\documentclass[]{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} \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 }{} \PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref \usepackage[unicode=true]{hyperref} \hypersetup{ 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}}{} \IfFileExists{parskip.sty}{% \usepackage{parskip} }{% else \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} % 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 % set default figure placement to htbp \makeatletter \def\fps@figure{htbp} \makeatother \date{} \begin{document} \section{lhs test}\label{lhs-test} \texttt{unsplit} is an arrow that takes a pair of values and combines them to return a single value: \begin{code} unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d unsplit = arr . uncurry -- arr (\op (x,y) -> x `op` y) \end{code} \texttt{(***)} combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair). \begin{verbatim} f *** g = first f >>> second g \end{verbatim} Block quote: \begin{quote} foo bar \end{quote} \end{document} pandoc-1.19.2.4/tests/lhs-test.html0000644000000000000000000000664413155240142015202 0ustar0000000000000000

                    lhs test

                    unsplit is an arrow that takes a pair of values and combines them to return a single value:

                    unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
                    unsplit = arr . uncurry
                              -- arr (\op (x,y) -> x `op` y)

                    (***) combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).

                    f *** g = first f >>> second g

                    Block quote:

                    foo bar

                    pandoc-1.19.2.4/tests/lhs-test.html+lhs0000644000000000000000000000676313155240142015766 0ustar0000000000000000

                    lhs test

                    unsplit is an arrow that takes a pair of values and combines them to return a single value:

                    > unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
                    > unsplit = arr . uncurry
                    >           -- arr (\op (x,y) -> x `op` y)

                    (***) combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).

                    f *** g = first f >>> second g

                    Block quote:

                    foo bar

                    pandoc-1.19.2.4/tests/lhs-test.fragment.html+lhs0000644000000000000000000000166713155240142017566 0ustar0000000000000000

                    lhs test

                    unsplit is an arrow that takes a pair of values and combines them to return a single value:

                    > unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
                    > unsplit = arr . uncurry
                    > -- arr (\op (x,y) -> x `op` y)

                    (***) combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).

                    f *** g = first f >>> second g

                    Block quote:

                    foo bar

                    pandoc-1.19.2.4/tests/pipe-tables.txt0000644000000000000000000000275413155240143015516 0ustar0000000000000000Simplest table without caption: | Default1 | Default2 | Default3 | |----------|----------|----------| |12|12|12| |123|123|123| |1|1|1| Simple table with caption: | Right | Left | Default | Center | | ----: | :--- | ------- | :----: | | 12 | 12 | 12 | 12 | | 123 | 123 | 123 | 123 | | 1 | 1 | 1 | 1 | : Demonstration of simple table syntax. Simple table without caption: | Right | Left | Center | |------:|:-----|:------:| |12|12|12| |123|123|123| |1|1|1| Headerless table without caption: | | | | |------:|:-----|:------:| |12|12|12| |123|123|123| |1|1|1| Table without sides: Fruit |Quantity ------|-------: apple | 5 orange| 17 pear | 302 One-column: |hi| |--| |lo| 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| Pipe table with no body: | Header | | ------ | Pipe table with tricky cell contents (see #2765): | | IP_gene8-_1st| IP_gene8+_1st| |:--------------|-------------:|-------------:| |IP_gene8-_1st | 1.0000000| 0.4357325| |IP_gene8+_1st | 0.4357325| 1.0000000| |foo`bar|baz` | and\|escaped | 3.0000000| pandoc-1.19.2.4/tests/dokuwiki_external_images.dokuwiki0000644000000000000000000000037013155240142021364 0ustar0000000000000000{{https://cooluri.com/image.png|HTTPS image}} {{http://cooluri.com/image.png|HTTP image}} {{ftp://ftp.cooluri.com/image.png|FTP image}} {{file:///tmp/coolimage.png|Filesystem image}} {{:/image.jpg|Relative image 1}} {{:image.jpg|Relative image 2}} pandoc-1.19.2.4/tests/dokuwiki_multiblock_table.dokuwiki0000644000000000000000000000024313155240142021530 0ustar0000000000000000Sample grid table. ^Fruit ^Price^Advantages ^ |Bananas|$1.34|built-in wrapper\\ \\ potassium| |Oranges|$2.10|* cures scurvy\\ * tasty | pandoc-1.19.2.4/tests/fb2/basic.markdown0000644000000000000000000000066413155240142016043 0ustar0000000000000000# Top-level title ## Section ### Subsection This *emphasized* **strong** `verbatim` markdown. See this [link](http://example.com/). Ordered list: 1. one 1. two 1. three > Blockquote > is > for > citatons. Code block is for code. ~~Strikeout~~ is Pandoc's extension. Superscript and subscripts too: H~2~O is a liquid[^1]. 2^10^ is 1024. Math is another Pandoc extension: $E = m c^2$. [^1]: Sometimes. pandoc-1.19.2.4/tests/fb2/images.markdown0000644000000000000000000000056513155240142016227 0ustar0000000000000000This example test if Pandoc correctly embeds images into FictionBook. Small inline image: ![alt text a small PNG image][inline-image]. Paragraph image: ![alt text of a big JPEG image](fb2/test.jpg "image title text") ![alt text of a big missing image](missing.jpg) A missing image inline: ![alt text of missing image](missing.jpg). [inline-image]: fb2/test-small.png pandoc-1.19.2.4/tests/fb2/math.markdown0000644000000000000000000000023113155240142015701 0ustar0000000000000000List math: - $E = m c^2$ - $A = \pi r^2$ Inline math: $x=\frac{-b \pm \sqrt {b^2-4ac}}{2a}$. Display math: $$\int_a^b \! f(x)\,dx = F(b) - F(a).$$ pandoc-1.19.2.4/tests/fb2/titles.markdown0000644000000000000000000000024313155240142016257 0ustar0000000000000000# Simple title This example tests if Pandoc doesn't insert forbidden elements in FictionBook titles. # *Emphasized* **Strong** Title # Title with\ line break pandoc-1.19.2.4/tests/fb2/basic.fb20000644000000000000000000000251513155240142014667 0ustar0000000000000000 pandoc<p />

                    <p>Top-level title</p>
                    <p>Section</p>
                    <p>Subsection</p>

                    This emphasized strong verbatim markdown. See this link[1].

                    Ordered list:

                     1. one

                     2. two

                     3. three

                    Blockquote is for citatons.

                    Code

                    block

                    is

                    for

                    code.

                    Strikeout is Pandoc's extension. Superscript and subscripts too: H2O is a liquid[2]. 210 is 1024.

                    Math is another Pandoc extension: E = m c^2.

                    <p>1</p>

                    http://example.com/

                    <p>2</p>

                    Sometimes.

                    pandoc-1.19.2.4/tests/fb2/images-embedded.fb20000644000000000000000000001357513155240142016612 0ustar0000000000000000 pandoc<p />

                    This image was embedded using data URI scheme

                    This image was embedded using data URI scheme

                    iVBORw0KGgoAAAANSUhEUgAAADAAAAAgCAIAAADbtmxLAAABmGlDQ1BpY2MAAHjapdG/axMBGMbxTy4tldJSwSAiHW4ootKCqIOrVShIkRIrJNUluUvaQi4Nd1dEXAQHF4cOXVRcLOLirJv4BygIggqCi7sUBRcpcbiDgtBBfOGF5/315eV9qR7qRUk2EpL087S+MB82mivh2BeBcUcddrwVZYOLS0uLDrRfH1Xgw1wvSjL/ZpNxJ4uohFiKBmlOZYC7t/JBTmUXtWitFROMYDZtNFcIzqDWLvRl1FYL3UAtXa5fIughXC30A4TtQr9AGK2lCcFbzMRJPybYxWScxDFVGE16m1G5ZwUTnf71aziPaXUsYB4h2tjEOnrIMVfG/QJyAC/GtKvYKFlRqQe4jbTkrGKtZM+WvZvI0CnjbtnfKb1XMtBoroR//yzrnjtbbDRxhdFvw+HP04w9Zu/+cPj76XC4t0P1M2+29+c3trnwnerWfm7mCVP3ePl6P9d+xqstjn0dtNIWitMG3S4/njPZ5Mh7xm/8b734Z1m384nlOyy+4+EjTnSZunkyzsP1ft5J+63eKWT1hXn4AzDofghlJQBJAAAACXBIWXMAAAsSAAALEgHS3X78AAACInpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjahVRJtiQhCNx7ijpCMIhyHNPU9/oGffxeaNY3p/5VC5IAQkAhtL9/evh8Pp+PiwaNKZubAYDuugNcMH4ZIAN6A6ATo68kdAA8VQ1DkoEIq2EILiBiALIQDTISWvz3SSQNJHwnilWTGgC/ZMSa1Fc8TDznZH4rgWOtRrwQKGh8VyNZ8bAY9Ccj1EGXUI0JwNE3n3itxrzis7Sq1TgBiNMwesKo1TjfcdZqXBai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RVh0ZGF0ZTpjcmVhdGUAMjAxMS0wMi0yOFQwMjo1NTowMiswMTowMGbLlncAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTEtMDItMjhUMDI6NTU6MDIrMDE6MDAXli7LAAAAEXRFWHRqcGVnOmNvbG9yc3BhY2UAMix1VZ8AAAAgdEVYdGpwZWc6c2FtcGxpbmctZmFjdG9yADF4MSwxeDEsMXgx6ZX8cAAAAABJRU5ErkJggg==
                    pandoc-1.19.2.4/tests/fb2/images.fb20000644000000000000000000063430313155240142015061 0ustar0000000000000000 pandoc<p />

                    This example test if Pandoc correctly embeds images into FictionBook.

                    Small inline image: alt text a small PNG image.

                    Paragraph image:

                    alt text of a big JPEG image

                    alt text of a big missing image

                    A missing image inline: alt text of missing image.

                    /9j/4AAQSkZJRgABAQEASABIAAD/4QOoRXhpZgAATU0AKgAAAAgAFgD+AAQAAAABAAAAAQEPAAIAAAAUAAABFgEQAAIAAAAUAAABKgESAAMAAAABAAEAAAExAAIAAAAdAAABPgEyAAIAAAAUAAABXEdGAAkAAAABAAAAAkdJAAkAAAABAAAAKIdpAAQAAAABAAACXMYSAAEAAAAEAQEAAMYTAAEAAAAEAQEAAMYUAAIAAAAMAAABcMYhAAoAAAAJAAABfMYiAAoAAAAJAAABxMYnAAUAAAADAAACDMYoAAUAAAADAAACJMYqAAoAAAABAAACPMYrAAUAAAABAAACRMYsAAUAAAABAAACTMYuAAUAAAABAAACVMZaAAMAAAABABEAAMZbAAMAAAABABUAAAAAAABQRU5UQVggICAgICAgICAgICAgAFBFTlRBWCBLMjBEICAgICAgICAAZGFya3RhYmxlIDAuNy4xKzkxM35nYTA5MzllYQAAMjAxMTowMjowNiAwNzoyOToxNgBQRU5UQVggSzIwRAAAAZM/AAEAAP//NuAAAQAA///jlgABAAD//2viAAEAAAABh0EAAQAAAABNLwABAAD//+62AAEAAAAAKd8AAQAAAAFHQAABAAAAASNbAAEAAP//py8AAQAA///Z7gABAAD//4X3AAEAAAABWGsAAQAAA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QSxheTPnHIAYCaNzTlXNzKg+YWRQpgKQRjGIB8Pyb0BJnv1ikFoYOwBEBKAEqFQlaRalFtqkc440n3IZrNp7Z4LExMpgy4SAVBaFVp9zhBCIaBQnDqhPSQgKIAJPksal+AG8ogpRnQCIUVRFoSEE9QIaLNCpqiPFQUK0/wPxadi/ncvxsAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxMS0wMi0yOFQwMjo1NTowMiswMTowMGbLlncAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTEtMDItMjhUMDI6NTU6MDIrMDE6MDAXli7LAAAAEXRFWHRqcGVnOmNvbG9yc3BhY2UAMix1VZ8AAAAgdEVYdGpwZWc6c2FtcGxpbmctZmFjdG9yADF4MSwxeDEsMXgx6ZX8cAAAAABJRU5ErkJggg==
                    pandoc-1.19.2.4/tests/fb2/math.fb20000644000000000000000000000107313155240142014535 0ustar0000000000000000 pandoc<p />

                    List math:

                    • E = m c^2

                    • A = \pi r^2

                    Inline math: x=\frac{-b \pm \sqrt {b^2-4ac}}{2a}.

                    Display math:

                    \int_a^b \! f(x)\,dx = F(b) - F(a).
                    pandoc-1.19.2.4/tests/fb2/titles.fb20000644000000000000000000000115713155240142015113 0ustar0000000000000000 pandoc<p />

                    <p>Simple title</p>

                    This example tests if Pandoc doesn't insert forbidden elements in FictionBook titles.

                    <p>Emphasized Strong Title</p>
                    <p>Title with</p><empty-line /><p>line break</p>
                    pandoc-1.19.2.4/tests/fb2/images-embedded.html0000644000000000000000000001363213155240142017077 0ustar0000000000000000
                    This image was embedded using data URI scheme

                    This image was embedded using data URI scheme

                    pandoc-1.19.2.4/tests/fb2/test-small.png0000644000000000000000000000777213155240142016020 0ustar0000000000000000PNG  IHDR0 ۶lKiCCPiccxڥѿkO.-R "n(҂U(H+$%KB. wWD\]T\,⬛( )qA|}EI606+qGveKK_U\/J2fq'XiNeANeh`6m4WΠ.eV @-]_"!\-B@ [I?&d1UMzQgk8iu,`!:z1Wr/ƴ(YQbdϖ)n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%YE{[O!e!-Z RԯW7adPF1o@IbZ;DT%iڤs4r{g`˄TVsh'OI Oƥ QQTE!,Щ#ABiؿ%tEXtdate:create2011-02-28T02:55:02+01:00f˖w%tEXtdate:modify2011-02-28T02:55:02+01:00.tEXtjpeg:colorspace2,uU tEXtjpeg:sampling-factor1x1,1x1,1x1pIENDB`pandoc-1.19.2.4/tests/fb2/test.jpg0000644000000000000000000045401213155240142014677 0ustar0000000000000000JFIFHHExifMM**1>2\GF GI (i\ p! |" ' ($* <+D,L.TZ[PENTAX PENTAX K20D darktable 0.7.1+913~ga0939ea2011:02:06 07:29:16PENTAX K20D?6kAM/)G@#[/XkVڬPte^f"'n      2 2011:02:06 07:29:162011:02:06 07:29:16 ICC_PROFILElcms mntrRGB XYZ  acspAPPL-lcms desc Pcprtpwtptchad,rXYZ0bXYZDgXYZXrTRCl gTRC bTRC chrm$dmnd dmddmluc enUS4RGB built-inmluc enUSdNo copyright, use freelyXYZ -sf32 J*XYZ o8XYZ $XYZ bparaff Y [paraff Y [paraff Y [chrmT{L&f\(dt internal)sRGBC   C T  !1"AQa 2q#3Br$4Rb %CSs5c&Td6D D!1A"Qa2qB#R3b$rC4Sc ?-tkf_`ctrD\zl 6tRe!+qhf*|t Ep%[g:rX?tu~̄+0rp*ƈrPAԐPʂOD%WO#e]#2@ n}Vh0[(BI\Ԕ@W̤$S2EX53&Ϧ:5*iX\eJ\G$F  H#8jgnp~̌?]BRzFs6d!'׾1PJB,T=tsW g:(!:-r#IR3 $-H+L dv9tH $|{z臕AQjl ts& c@T 0z6H##룝I) jʏΛ6Ȅ2/Op|ƈ("!2;TԔGqۣe>]C"̤!2B!=BC'w! ΚTLm >!J&2@/(l0/PO =$(,鳢qΈ! ~Lg9it_^`JL2uwfQ!H 綜9, ߶4C@ePN%T!bWG.A[4ٔ_єU5$(Etv>@8%Uя]O'Re o@P)e]FSE9:#@tCWSʷGS2U]D9 %q(0U{v:t rr}u3"W9̀HR(T]BQ@~C:>]壙E˩.{zd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BHdocProps/app.xmlOk0 -](I;l\[I=[-鷟Ayǧ'$)&J&rK)a }!RMΈaGig"v}}%xy(NZH+K-d^[m4h9(L-4\ h)0?9S4XrS.cjS5toHl|F-לQD1Di SY̿h~PKPKBHdocProps/core.xmlAo  a-Yfn~VB ?Zs%x_^+G$p^D4#(#JD2a*ѴJtk-'d-?ZW6=5$#MkLj-/Ե[Dk)swurr i 8_<fB=7p ,Q5Rp'lr!=>ΌɰeSp+qT8}PKݵ0ANPKBHrD _rels/.relsPKBH%W !word/document.xmlPKBH=Rword/theme/theme1.xmlPKBH &SY word/styles.xmlPKBH5|XmWword/_rels/document.xml.relsPKBHPword/settings.xmlPKBHxN),\word/fontTable.xmlPKBH @docProps/custom.xmlPKBHFdocProps/app.xmlPKBHhhAkdocProps/core.xmlPKBHݵ0AN[Content_Types].xmlPK pandoc-1.19.2.4/tests/docx/already_auto_ident.docx0000644000000000000000000002041713155240142020213 0ustar0000000000000000PKFD ]$[Content_Types].xmlN0E|E-Jܲ@5*Q>u&_g*h̽WL; 8t˜}_6-n&󽇘P9[!GΣ\1s,U*@z KKw="XL`*֘sK,yjj ﵒ̛*?:@Ǟɍ-?hM6=q|=XSAD7aHo](HĬ*%trmh$}pb$=_$vm0EZ$lFfس"Xh;^ #'I%)x?\w>ղ6kƮ5 ʞ~kdIwPKFD? _rels/.relsJA >Ő{7*"^ЛH}0!#ZGr;R|̛ GcVw5R&=t0[b'T9֟!I O1}qѶ(?0u 7}|; |sGFJT2kT,d3\h<@#HP:lhv".lѕ:i˃Kun$b77*Ei 0`r~?PKFDz0word/_rels/document.xml.relsӻN0N(邐NrrE)зE8E ,ٲ7o5Ot~4Z@P7u/z}my$)Lh= k0g}3>3uH:㔤0t==U[v@yɪ4|1A?>]۵ܮ-UH0 x2~&"$1n!d _XfG"N-錦JΎ k`?9._!mh6Wq g PKFD4o}word/_rels/footnotes.xml.relsMA! Et]c0z+B(1_.{^y3n88L /$~ݟa]v7Cјш: șt*eWi-`%x .?PKF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_rels/.relsPKFD~Fword/document.xmlPKFDz0@word/_rels/document.xml.relsPKFD4o}uword/_rels/footnotes.xml.relsPKFDOihword/numbering.xmlPKFDa|9word/styles.xmlPKFD(*bs word/footnotes.xmlPKFDudocProps/core.xmlPKDdNFddocProps/app.xmlPKD= nword/theme/theme1.xmlPKD{H: word/fontTable.xmlPKDҟVword/settings.xmlPKDTΜword/webSettings.xmlPKmpandoc-1.19.2.4/tests/docx/codeblock.docx0000644000000000000000000002042113155240142016277 0ustar0000000000000000PK]D ]$[Content_Types].xmlN0E|E-Jܲ@5*Q>u&_g*h̽WL; 8t˜}_6-n&󽇘P9[!GΣ\1s,U*@z KKw="XL`*֘sK,yjj ﵒ̛*?:@Ǟɍ-?hM6=q|=XSAD7aHo](HĬ*%trmh$}pb$=_$vm0EZ$lFfس"Xh;^ #'I%)x?\w>ղ6kƮ5 ʞ~kdIwPK]D? _rels/.relsJA >Ő{7*"^ЛH}0!#ZGr;R|̛ GcVw5R&=t0[b'T9֟!I O1}qѶ(?0u 7}|; |sGFJT2kT,:-rCVt):fvu{8PB՟9`R=mW0NK4-i0`ƞ1( ^6&2z%A9ц7NxIa-^v-Q#)9`r3uH:㔤0t==U[v@yɪ4|1A?>]۵ܮ-UH0 x2~&"$1n!d _XfG"N-錦JΎ k`?9._!mh6Wq g PK]D4o}word/_rels/footnotes.xml.relsMA! Et]c0z+B(1_.{^y3n88L /$~ݟa]v7Cјш: șt*eWi-`%x .?PK]Dkgword/numbering.xmlŕo0+HP,(P--v1\{i\ZtY3yLUQcm/R6"c dHkX)`3#$-6_2a*[;iq" CvKo1g>Ea_u_80 ghJ,ƿԖѴQ)3$|B&@݈P .  9YaE|!s U[Nwj4DtnPL_^ 7AuTw9T5_ `8*F-I/J.vwj%f{B}:ᦨnTtJ%d}| 1v\u+x\^%Y}]LQ}qY) vjiXG=z@Úh^g> tCvq@ [@/B/XƝrVP^3^xJbʉ«ה(FI 3>Ix8e_aiZ w-#%K\훣&{-Ӗh.@+)ON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d,kc=r2=yN]%oɯX+7Z jOLȾtͥPN"'$s}`zCH=R\vABIXK՜[&%g5FURk]z]uN\Qs_b*Z37{ ?~.a)*>2k>:SvX7cm//.WGkMLDcH<(qDKsrn% b0W*qBmތa/fM&530G?c2e{PZΪ\2oX]2Y&_>$!˾W@WυjgN_ZoKZt Jn Ne"%!L2ikC,~ ^=e!ChW䞞"͙w|yS̓"2JZ E[cMkl ˇ9wRU,b[auXe_6knȋH?d##vDd KB'_XZKeSGN]Rx.(<]CSm//X[OUt|O*ߖW)fx"G.|S6&G#Hf5u;3 .jtkg]wkK}5p?ӳPK]DҟVword/settings.xmlUMo0WD9/%|Z-PCBMwǙG!KN NjhO'f2[u 2fz꾿-[{w3 :Sw@ [Q%LLJ$aT1& Rt+3HKV'BҝԴ7l+`yz2m͆&_^pw+KWk+ n dM5yN3QF/!p E Sw߸]r "Ã6 25".@΀㋠VkE BNIay,pɸ{W<_4oC}t qFjGFٱ"9X$ 3BkoPo™89ԹPƦBA7o)KQJry\Lita` _1jv * 8źڽJit<gwG~1b/hp~vGC3iϟ 0*m128wyT$>BXj"w i%K'oY+𚜺dl1 wQ˚\l"6ߠmAgR!1#\ ɲӸFEa‰ bM\uOqCh].jkF\b[_c jlhamhh[r,Dr.sj԰ BxQm5ϙ6!d(FV/}PK]DTΜword/webSettings.xml];0DrOl(M"L$loBAA9FS6/ ,Js-GJo$:+bG)1!VJ)-R4 @`M'a:h}T LqkwWa gsZ^;PK]D ]$[Content_Types].xmlPK]D? _rels/.relsPK]D}word/document.xmlPK]Dz0dword/_rels/document.xml.relsPK]D4o}word/_rels/footnotes.xml.relsPK]DkgCword/numbering.xmlPK]DY.word/styles.xmlPK]D(*bs word/footnotes.xmlPK]DudocProps/core.xmlPK]DdNFddocProps/app.xmlPK]D= pword/theme/theme1.xmlPK]D{H: word/fontTable.xmlPK]DҟVword/settings.xmlPK]DTΜword/webSettings.xmlPKopandoc-1.19.2.4/tests/docx/comments.docx0000644000000000000000000004132513155240142016205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knWQ8=IUP<}*lS|\I0M’Urc/Lޞ wy, ]3%1FtZ:^=]TWY`a#^IDI0xXI~QL nĭ=g ;#/R &x6Fbz&f53ȈKī?,1$ӑt| ^A_(c-d>9>@E&WYd-]2 Yb:f` PK!1u1Bword/commentsExtended.xml]o0?kA ͢xd@#H~Eď-1WsޞCdc%JSCm`EBy7.OP!8 h0L* `RG;`*C 8' >X -ҲoCX ؇/&ZsķH# ILb4SAz#{.QIWްQ!(Z4CPm$ 7u" Ω<_Q[%hUqB g=FĊmcQqRc:f!ρJEr` Fi9ڒOuw`|y5I Ȕ2YL/i:L"I\?ra594+[`/}h8u <4wyo87f)s^w/PK![m word/webSettings.xmlJ1;,Y-T>@ζL&̤kH/I23; X֌ yZj|pm*).-]قl7=,)*IYků )Cǎ]ђWnfW"Pv\Wf) u]pK~ʮ2D):dSx<>=t!3 ue'Q>w'@ܯ[D@'3S̀r >`N| v1RpPK!zdocProps/core.xml (QO0MKG;D15<Mb46m0\ lS78TFOI2`$-Tz5%y|E"\K^ S$"63WQ0iL6J@P\WrR _26%x.ƶ3RNihRP(&YijT~g,z(vjP4LJ檱<"g_ |%!7.D ypZ= *$C/ NY޲]pq S[#OXtyv(L)mgznsY28f׋!KqGboQX;8E2J}ANS_PK-!إͣA[Content_Types].xmlPK-!N _rels/.relsPK-!2*9^Dword/_rels/document.xml.relsPK-!,p  word/document.xmlPK-!˼u; word/endnotes.xmlPK-![dword/footnotes.xmlPK-!R%#word/theme/theme1.xmlPK-!ʅM word/comments.xmlPK-!Ct , word/settings.xmlPK-!WU%customXml/itemProps1.xmlPK-!﯑ e word/styles.xmlPK-!i!#.docProps/app.xmlPK-!t?9z(=1customXml/_rels/item1.xml.relsPK-!K4C3word/people.xmlPK-!5eX 5customXml/item1.xmlPK-!)ϓ6word/fontTable.xmlPK-!1u1B8word/commentsExtended.xmlPK-![m 9word/webSettings.xmlPK-!z8;docProps/core.xmlPK=pandoc-1.19.2.4/tests/docx/comments_warning.docx0000644000000000000000000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ʱxKҪs;1OH8dbD3iF]&<8Hj;Gy)<]o 8QKGoM<6*=)6:.֦vԪe.:>ed|9[|PK!5eX(customXml/item1.xml $( M 0}w9.\ BBn8@~$Ao 'r^FPK!)ϓword/fontTable.xmln0' !MJ6KJ.ǀ5l#',o!lh@ aTU&Bs޲hrIs8_CxFJ4 B1Zh,*bǮFɍ;1פs(&%_ )ZQ!h(e GZs1v[[YUO1L@JrknWQ8=IUP<}*lS|\I0M’Urc/Lޞ wy, ]3%1FtZ:^=]TWY`a#^IDI0xXI~QL nĭ=g ;#/R &x6Fbz&f53ȈKī?,1$ӑt| ^A_(c-d>9>@E&WYd-]2 Yb:f` PK!j'~word/commentsExtended.xmln0AU"B[qnqx$u69yog>)TxS8cQc mP&8 hV`pߏp 5FjQP1BEpzn=J`A@8&$0!c* C.'.{QslÈ-brTv,VJB*Y >Gi0 ŭ uJ`Pi8D~Q~*R!C$\0Dy\$[d\q>eOh;~8}-ehzIw  3Ȗ̱Ywg ˮcNH]m3_.sPFur WSPK![m word/webSettings.xmlJ1;,Y-T>@ζL&̤kH/I23; X֌ yZj|pm*).-]قl7=,)*IYků )Cǎ]ђWnfW"Pv\Wf) u]pK~ʮ2D):dSx<>=t!3 ue'Q>w'@ܯ[D@'3S̀r >`N| v1RpPK!LEpdocProps/core.xml (QO0MKG7 YH`$1V*[ oop'zf}Y;(xBՄ/f &HMMʵ X'0fBΙRk(<|qmɜO7ltE#Zc9Fkt()x'ihP@ !1=lW`*z*veVU5s֬JU{Ł੓.docProps/app.xmlPK-!t?9z(V1customXml/_rels/item1.xml.relsPK-!K4\3word/people.xmlPK-!5eX$5customXml/item1.xmlPK-!)ϓ!6word/fontTable.xmlPK-!j'~38word/commentsExtended.xmlPK-![m 9word/webSettings.xmlPK-!LEp#;docProps/core.xmlPK=pandoc-1.19.2.4/tests/docx/custom-style-reference.docx0000644000000000000000000003477613155240142021000 0ustar0000000000000000PK! j' z[Content_Types].xml (N0EHC-Jܲ@5*Q>'E=}=&*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QPIwqn69 T?aBK7 Cnޟnk̰.GzczݐJ):צfX_[-uXkTlZ1!"* އP4 (l(Ej'l Eq6Bw 'be:)f( M]miAU5HaE2p)GaFB@J>qCK~b$A鍎U\-.|*W?.[o%T{FޢԔwӨO kS:)Y6}=,-I/,w;ؚClK;re J+xNV+'qόo2-]uB/̗ڀ=v6ڒG/mV>٪4#3KJzN3ԮձBųSEVK>^e~a: Kz 3XRWZ'?f`>5u^T|.QuQߧ<VfmF^q%=-)3jw8n+{RL Ro-g%v9ɞqο{ҪRɊq7[mJ[Oj47K{Dz;K9I(|p'l/ue6J*tM& eKR+:GyCz:)\+)NܣbI/k5iSjÊy<l*aoaI}Dp& CoߎO0ݝ3yw=1y?zm|j6tv9&$1"ϔ`#E ?iq@ &eV{IXaR5X^{%{~55= os|ѷw#?wĿPK-! j' z[Content_Types].xmlPK-!N _rels/.relsPK-!6Hhword/_rels/document.xml.relsPK-!3&z  2 word/document.xmlPK-!gкY word/footnotes.xmlPK-!:'Cword/endnotes.xmlPK-!\S;word/theme/theme1.xmlPK-!'CJ word/settings.xmlPK-!::word/webSettings.xmlPK-!Aßhword/styles.xmlPK-! Ļ;,word/numbering.xmlPK-!'uQ/docProps/core.xmlPK-!瀓1word/fontTable.xmlPK-!g<3docProps/app.xmlPKh6pandoc-1.19.2.4/tests/docx/definition_list.docx0000644000000000000000000002040713155240142017541 0ustar0000000000000000PK}D ]$[Content_Types].xmlN0E|E-Jܲ@5*Q>u&_g*h̽WL; 8t˜}_6-n&󽇘P9[!GΣ\1s,U*@z KKw="XL`*֘sK,yjj ﵒ̛*?:@Ǟɍ-?hM6=q|=XSAD7aHo](HĬ*%trmh$}pb$=_$vm0EZ$lFfس"Xh;^ #'I%)x?\w>ղ6kƮ5 ʞ~kdIwPK}D? _rels/.relsJA >Ő{7*"^ЛH}0!#ZGr;R|̛ GcVw5R&=t0[b'T9֟!I O1}qѶ(?0u 7}|; |sGFJT2kT,3uH:㔤0t==U[v@yɪ4|1A?>]۵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"9X$ 3BkoPo™89ԹPƦBA7o)KQJry\Lita` _1jv * 8źڽJit<gwG~1b/hp~vGC3iϟ 0*m128wyT$>BXj"w i%K'oY+𚜺dl1 wQ˚\l"6ߠmAgR!1#\ ɲӸFEa‰ bM\uOqCh].jkF\b[_c jlhamhh[r,Dr.sj԰ BxQm5ϙ6!d(FV/}PK}DTΜword/webSettings.xml];0DrOl(M"L$loBAA9FS6/ ,Js-GJo$:+bG)1!VJ)-R4 @`M'a:h}T LqkwWa gsZ^;PK}D ]$[Content_Types].xmlPK}D? _rels/.relsPK}Ddd#word/document.xmlPK}Dz0Xword/_rels/document.xml.relsPK}D4o}word/_rels/footnotes.xml.relsPK}D^{i7word/numbering.xmlPK}DY.word/styles.xmlPK}D(*bs word/footnotes.xmlPK}DudocProps/core.xmlPK}DdNFddocProps/app.xmlPK}D= fword/theme/theme1.xmlPK}D{H: word/fontTable.xmlPK}DҟV}word/settings.xmlPK}DTΜword/webSettings.xmlPKepandoc-1.19.2.4/tests/docx/dummy_item_after_list_item.docx0000644000000000000000000021106513155240142021763 0ustar0000000000000000PK!aDե[Content_Types].xml (n0ED(,g@]tM#g&ȹpH]-֐_a5xZ}+Iy;@q?a4E=bIJz Na"xiBr5-dTZ<I<: 1=BV-->$hQW-TՊTǥ<:T\Kcy֡lpI@1U+r&5T/˜ Mc5ZLA"ܵU?'~搸Az,Ү|--'MO\~S]竃ųڼq1?(s;G,?oFL< ҄@>-B77b8)gΩp{襳 rc/%4?}J뮺Bw1`x6~PK!N _rels/.rels (JA a}7 "Hw"w̤ھ P^O֛;<aYՠ؛`GkxmPY[g Gΰino/<<1ⳆA$>"f3\ȾTI SWY ig@X6_]7~ fˉao.b*lIrj),l0%b 6iD_, |uZ^t٢yǯ;!Y,}{C/h>PK!iNFword/_rels/document.xml.rels (N0HC;q[Ԥ@8:VM\,Xv:U ֕h6,#1+M $l T!Wq +'Ν,@ c (Z/mk!D|4m{ͳy'_FJ (W -IJo*lF=)!n@RZt(6?wҽ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Yu>L|' MD^Ժˉ9[U}'˖UGݚyN9ڀ~'K,ێ>򍆒;Y0"q3B+m]dvj ˫$߽w| jv$|LYyE^rM"r/{ġ}Ii@R ` DϮօ,R< *ArY$Zv84GO VwgDֳQΙP*+l(kd!tEK.sY6X0vco H b+6т#Ꭺ !,Z>v!̬;YB׷Rl5@PCkl^x2LZ3@vXΠۋYbRɄe5-PZgAUp!AHZQJ벆 yskp1׊e#( b@TBvVOI9p6t54) .`/E#-<*ۅ{+YG5Ѹ7ϣ*k Oa&gaiY/V02aEF9HXè 1EHz9 b=-?G~81 rL&  Ɨ3c. O>PK-!aDե[Content_Types].xmlPK-!N _rels/.relsPK-!iNFword/_rels/document.xml.relsPK-!޼ word/document.xmlPK-!:} word/endnotes.xmlPK-!word/footnotes.xmlPK-!9^(word/theme/theme1.xmlPK-!fword/settings.xmlPK-!4-pword/fontTable.xmlPK-!\Gnword/styles.xmlPK-!~oword/stylesWithEffects.xmlPK-!HsdocProps/app.xmlPK-!9]YdocProps/core.xmlPK-!mšword/webSettings.xmlPK-!eKg@word/numbering.xmlPKWpandoc-1.19.2.4/tests/docx/dummy_item_after_paragraph.docx0000644000000000000000000021113213155240142021732 0ustar0000000000000000PK!aDե[Content_Types].xml (n0ED(,g@]tM#g&ȹpH]-֐_a5xZ}+Iy;@q?a4E=bIJz Na"xiBr5-dTZ<I<: 1=BV-->$hQW-TՊTǥ<:T\Kcy֡lpI@1U+r&5T/˜ Mc5ZLA"ܵU?'~搸Az,Ү|--'MO\~S]竃ųڼq1?(s;G,?oFL< ҄@>-B77b8)gΩp{襳 rc/%4?}J뮺Bw1`x6~PK!N _rels/.rels (JA a}7 "Hw"w̤ھ P^O֛;<aYՠ؛`GkxmPY[g Gΰino/<<1ⳆA$>"f3\ȾTI SWY ig@X6_]7~ fˉao.b*lIrj),l0%b 6iD_, |uZ^t٢yǯ;!Y,}{C/h>PK!iNFword/_rels/document.xml.rels (N0HC;q[Ԥ@8:VM\,Xv:U ֕h6,#1+M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UGݚyN9ڀ~'K,ێ>򍆒;Y0"q3B+m]dvj ˫$߽w| jv$|LYyE^rM"r/{ġ}Ii@R ` DϮօ,R< *ArY$Zv84GO VwgDֳQΙP*+l(kd!tEK.sY6X0vco H b+6т#Ꭺ !,Z>v!̬;YB׷Rl5@PCkl^x2LZ3@vXΠۋYbRɄe5-PZgAUp!AHZQJ벆 yskp1׊e#( b@TBvVOI9p6t54) .`/E#-<*ۅ{+YG5Ѹ7ϣ*k Oa&gaiY/V02aEF9HXè 1EHz9 b=-?G~81 rL&  Ɨ3c. O>PK-!aDե[Content_Types].xmlPK-!N _rels/.relsPK-!iNFword/_rels/document.xml.relsPK-!]b word/document.xmlPK-!: word/endnotes.xmlPK-!word/footnotes.xmlPK-!9^(word/theme/theme1.xmlPK-! word/settings.xmlPK-!4-word/fontTable.xmlPK-!\Gnword/styles.xmlPK-!~oword/stylesWithEffects.xmlPK-!?<vdocProps/app.xmlPK-!p.`{docProps/core.xmlPK-!mšword/webSettings.xmlPK-!eKg@word/numbering.xmlPK|pandoc-1.19.2.4/tests/docx/enumerated_headings.docx0000644000000000000000000003037313155240142020354 0ustar0000000000000000PK!2oWf[Content_Types].xml (j0EѶJ(ɢeh4NDB81$14 {1ښl w%=^i7+-d&0A6l4L60#ÒS OX*V$:B~^Kڃ /PI~7$ iJ&B0ZDutOJK(HxG L+vdcӻW>*\XRmpZ}HwnMVn-")/ZwB`4 sDXj;A*ʝc֝4[S9> {V4pW&A|d?PK!N _rels/.rels (j0 @ѽQN/c[ILj<]aGӓzsFu]U ^[x1xp f#I)ʃY*D i")c$qU~31jH[{=E~ f?3-޲]Tꓸ2j),l0/%b zʼn, /|f\Z?6!Y_o]APK!word/_rels/document.xml.rels (j0{-;mC s)\[d{CcMZ}EJӃ3bgz;5$uoZ'ijA#zw7TbhXqЄ:-)HAVEH%w ȯ2ٮv#b?ٶi _mhFH6!SIIB4*\}u.l|!8[s˘fpf6 Y ٚx '~PK!=word/document.xmlĕn0'#DڸIz(`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,2%XV( ,W 1/ BA sJ\QǔZ5ׅlf|6@Ga89  }+ཤޛB9(4 "zfLn/4_d.p=}˲ q#|~mKU{Ł1J M9t}Ƕ'.&2PH6LWAUFX7=&r#5wlGg=Zm!49ܮsĭ]}ZtFS?d5 Mv`~Zӡb'4PK!1 word/numbering.xml[O0';DHnFEai&>/뷟\L@RI{yBBbRx.nV P Hϟ.kV :LER: eGʀLpɷ*8 v3$#Vz ;3'8Nm8q"FSBͶ 1s hkln<@\؝v8/ OScj)<=, nǸ+G]c tˁԯz]Ȇ0s іm,Ah<$ D"1JR ]*d^{HeXZ1 u3(6Ž:n.ۤiG ڪF0f՘S0;O!m:6lC# .F;Hr#1Ad2I9G,c0ބ |ɳZzS_)xU|']H8V=&kOewQcy%X b2q \{5 -'C(wcf~ӰAdt |>pwkx0~7~ hoz\PK!# word/fontTable.xml]k0Fe2uJ&0(PӇQHvBb6=G?* Қd3JaJTe}qKlFT <̿~ 7Pj^LS fuyuM.r#4kœ;-S'Vvpm;g3k54fd HK,0" g4z\'X6 Nh?K4^}l53cƂȰgTEh5W/QA[@HfZ1u ={dP`aZ4_dH,1-1Z)!#g5ĉ%Srd]6+9 s|@/[W|!7'>||h"܈ebb9%g݌0 PK!docProps/app.xml (SMo0 0toxEEn(ӞUNȒ A_?N\e۩>GROO$-_Z[ &݂&SVӾ6n`V$TV;X#$v-߿D4 pivay;hUPQUH4nor:P_Q Uc =)*hUWwNjcTTL HJm!ə>I~|bSQir*xFMhXoqA/X~r*~7يjU؝LFn+e:@E2i%+Tc vP(l(HmHeeВ{|Lರ'—}Cof{N|_KJW{ޙ}N<%&T[S[/<ܭ47"K5ESm'OgsͿnW>MKuj?PK-!2oWf[Content_Types].xmlPK-!N _rels/.relsPK-!word/_rels/document.xml.relsPK-!= word/document.xmlPK-!R%# word/theme/theme1.xmlPK-!oE~m  word/settings.xmlPK-![m word/webSettings.xmlPK-!rek  _vword/styles.xmlPK-! x&q>#docProps/core.xmlPK-!1 %word/numbering.xmlPK-!# (word/fontTable.xmlPK-!*docProps/app.xmlPK -pandoc-1.19.2.4/tests/docx/german_styled_lists.docx0000644000000000000000000012566513155240142020445 0ustar0000000000000000PK!a'M[Content_Types].xml (V;o0?\ N"(,gh id Is1 ӭED}izfB캚tJe͞ +" D,l ξ\Mk 5kΣlX9V@ K+M&߹tbͦwЈU=?T̈́(O|/NGd[ŪzM-!{;>~xM ZA(WWN U].mk-a'6iJ#+@&";w0)Gc{4 ibb:_ [ؼ R唹 s+,.b\nUƖZ$G$uV<%맫,2J+H,Y../P1t/٢m\MIXSjyXנ܉F2ti;ˁG 5}8VYJ*&zW'޲F[-0ZR-DcWjqW}+x8ZL:qͷ\Z@t Y~mHOؼQD$$F7Wi%4$ܿ18X _Bojompp6t/$ Inu%?QdP[DD+hcGԇh/PK!h}H8word/document.xmlXO0~!;MB@D5önϓ8c[P&miA1i4s%gT&EŝT21߿X,R̥}4 ~9T!LR)G* CCrZ`)v,Beа: 8)- 5b r;x?3b3 I]`k:ROCߗj*l٘qfg/0>*HQQ9$ӂ7@y[_j^)REvE| ^ R|mzY++XfJmHF S8bEDa s6LW햚*[-FRQ)6[qbJ fQˡWՊQEAAۉ90Nhi,әJw}A9<8Gpɭ{ҍEd4T u}=ż1祘f$G4ZZk03䌢,'c?u^l鲟+QP=hlN)[+ }< %ΊSc-FKnq xoV)Oy~u]Kv5)Ǿ³te 6aQ_R`?u|rXv}PbulnhH;xwSR}G35M}ߋ]gRߦ>wv;&GA|ޘaR;w* y PK!'word/header1.xmlXYo6~/깉%_u@k$-ڗ(D$m%;CRM@ч97gF,5U > ( (OEb~ @3RNG_P%LuRt.I%->,Y9LEyRڪZ(J*RA՘5ѡW$h* ㍌]DBRxsJbP Pw+y%1l f_oĬGJ[uX< HeQiSsCXD*)7^K LnVie Ed׸g)RAkŕ32TP4^b`c5M&Un{.ԅ+X%]F@U6MZq$A&W .<`FP̼?S桠AI1 gsXpTB(~ A Y_ qW3GK3͍ 6cQJ,yaIF,7v)҉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oRl!MRqkh|EGb1}'t%0 _z) +Y`,*kMIx1&{R 0-@nƤR@Xr|#E亁XSumPއ`bՓ'_Q8ɺ R$E Lq(SSPG͉ɭkDU`JqIG0XhcA|̒_$\;][ * k}|167ັKp͎7XL?+RCOuDgL]6;j;dOϡN^'G&x5lhW6ܲg]򑥏s߅`/̎9c PK-!a'M[Content_Types].xmlPK-!`N _rels/.relsPK-!jHword/_rels/document.xml.relsPK-!h}H8 word/document.xmlPK-!' word/header1.xmlPK-!%8Uword/footer1.xmlPK-!ϝword/endnotes.xmlPK-!&!Nword/_rels/header1.xml.relsPK-!CGCword/footnotes.xmlPK-!UQ0zword/theme/theme1.xmlPK- !* WWJ word/media/image1.pngPK-!zxword/settings.xmlPK-!ig~word/_rels/settings.xml.relsPK-!| H Wword/styles.xmlPK-!<3 E[Yword/stylesWithEffects.xmlPK-!ءmuword/fontTable.xmlPK-!,d2fdocProps/core.xmlPK-!9,9word/numbering.xmlPK-!NP word/webSettings.xmlPK-!HZdocProps/app.xmlPKpandoc-1.19.2.4/tests/docx/i18n_blocks.docx0000644000000000000000000003256013155240142016475 0ustar0000000000000000PK!2oWf[Content_Types].xml (j0EѶJ(ɢeh4NDB81$14 {1ښl w%=^i7+-d&0A6l4L60#ÒS OX*V$:B~^Kڃ /PI~7$ iJ&B0ZDutOJK(HxG L+vdcӻW>*\XRmpZ}HwnMVn-")/ZwB`4 sDXj;A*ʝc֝4[S9> {V4pW&A|d?PK!N _rels/.rels (j0 @ѽQN/c[ILj<]aGӓzsFu]U ^[x1xp f#I)ʃY*D i")c$qU~31jH[{=E~ f?3-޲]Tꓸ2j),l0/%b zʼn, /|f\Z?6!Y_o]APK!word/_rels/document.xml.rels (j0{-;mC s)\[d{CcMZ}EJӃ3bgz;5$uoZ'ijA#zw7TbhXqЄ:-)HAVEH%w ȯ2ٮv#b?ٶi _mhFH6!SIIB4*\}u.l|!8[s˘fpf6 Y ٚx '~PK!O word/document.xmlVn0?;+&Ms(ɹ)J"Hʊ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~@< !0#gE"yo* IMnX "LmSYߊHVrߢ:f M^q~-mqrǡiu@@aЅjψDO/ P_^H`#i%EP[iҭ_{O<6L/ȗ9иy%t@`?,l!96T6.ortNfdwsGX%, <ӿӧ]Sc=%N2OPK-!2oWf[Content_Types].xmlPK-!N _rels/.relsPK-!word/_rels/document.xml.relsPK-!O  word/document.xmlPK-!:K word/theme/theme1.xmlPK-!-)2O hword/settings.xmlPK-![m word/webSettings.xmlPK-!nxPd 0y9$gti|P s 3=& Ó:5;ߦ1iЕ IilUI-?9o9Ih&;!n˧ht!F$\#N3 WKK3H6Uptgk[S{.S9v<׵(}v?H@8M+qPK!N _rels/.rels (j0 @ѽQN/c[ILj<]aGӓzsFu]U ^[x1xp f#I)ʃY*D i")c$qU~31jH[{=E~ f?3-޲]Tꓸ2j),l0/%b zʼn, /|f\Z?6!Y_o]APK!Dword/_rels/document.xml.rels (N0EH5{@PnR>M&!~{L+h* /ZsbV/=AY#r`hj( x5(`bzDPeȬC_Z뵤8;Y"ϗOP1٦75jtx۶ }FwH&aO,RɜBTy~.w>,nS:P%/I)tF}XdqGV~PK!nR word/document.xmlVKo6 tIc[:N ]^Z$IoR~dٸKCqoSS ӆK1 Q@dE9 } G1RIc&8mˬm I**LVgZY؋L6=YǣYO|$.8h1Ldԟu?I[Ek~%baߎb\fpZ/ЎqWF|*toA\vS&AhL6(pp`U*Os'}373ya.llw;[|[ljȃQg(AJOe[9kVV 0vBJ{,[떝Lx uw 0Ho50 KuP.NiNPK !-yYYword/media/image1.jpgJFIFHH@"zޔczqK{(=8CA^hPqq)s94{d{w9C=(8RH .A@ Ӛ^=J:Rqis@$cIӚq' ๢AcP\wu84cP2>``v4zNM!?J:IGF9+8'CF惌Tp1IߊPn>SQF*8@с0;tOF23Eg4uRsi(9z1Όh4cތ{Q4˚:Qhsw^d⎣(osGQAP=(=9*ڊO9CҁźR)@G4>(ւ(֏zfJ)1җhyH)1h8~4ctiO=8}h^hA8ǵSF=J8 PzRg R3@ 4ё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/image1.jpgPK-!0C)gword/theme/theme1.xmlPK-!r mword/settings.xmlPK-![m qword/webSettings.xmlPK-!`sdocProps/core.xmlPK-!Ѵ suword/styles.xmlPK-!w,Y|word/fontTable.xmlPK-!$2docProps/app.xmlPK 5pandoc-1.19.2.4/tests/docx/image_vml.docx0000644000000000000000000005600713155240142016323 0ustar0000000000000000PK95F _rels/.relsMKA Cl+"Bo"3iA PǼymNAêiAq0Ѻ0jx=/`/W>J\*ބaIL41q!fOR8w/+PKB~PK95Fword/footer1.xmlTr0}W0kf:JpMu2i2Ъ88{vSVX'Ad>+H&tɿ!5WEI‘凋5h3lfjE]ʂ :M#+1aK"F4#5`;ծi j tQg їZiȶ}/S_Llm,T9?NzG4xsLQʧ\'#Yɛwkz$?"4Xᕏ&%(=A ⷽHR f+׭>9o-("۔=Yp@tSFV2+*T >+1EF`a& b|@mPƖ糅6ʼn&e8X^̊ϯ ߱#VjYS4r|g$a(awل)n`IDh^O~QR[@?h+M 3+Z SS/8g(=OxKKtT꫖lzX>? {?ev,XS7r8a(FNHCzyp2LEpJH'$q _PPK5]PK95Fword/header1.xmlRMo WD=LSԴU;N>~"Al T킅{fv5ArQA}_/oE8ha=}KE"{|ͪNr"dbuF 3>P I 'Cr2+L١QQ2V7/j_ J38;:iUfYΕqnIN,o lxsm$gAR%F}i{r9+iE&7)k՞*3PKSPK95Fword/media/image4.jpegg@Y׾.b%*ȭ, ""( B% ,,b%@5e RBbIAz&x?}!frι~fگ-\`Vi'`?k k׮Ymǟ~M:l޺yӦ-;l߶}t vضSomYΚ׮ݸMgζχ Wu꭫08 juZ6 êիXuؚkzzǕS=Ǯ޾;w69hz+k'N:|ܥ^>~׮wn<6GSӞ=/UXW߼#7465w|=08gsg<9X"v^GBvf5۵ꇻoغf_X%Z{){a1Oal6}73/a׮qOWA[I[Di"|s=<W2gFYۓ&9=_13/%+$ǣH:IDb▥›wDQ:"] t!7 t@-Z Khs kp46Ι/KfoÄ5.BZ)04 osy?1+N.L}LbTw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%e,Iu>WB@|k^r9l2?L3.Wm\VQG$k)\uvkQF)$]e|4 Th݆ʫc"~wSQ=B-Aβg@U/$ 5ƊB:7hNk7fO/P#m'%L"޽(i7rא/Ss<2r[ˋ!WJF%e]WѠ\Z.\@C)ӈߊdB3nk7"=qY7I@gi#٦^d:eKplab$QWVl;*erƿI6^Ixs:&~_b1x7G,Sv<`κnR3gqI` ok &űzܛ;3] ׍c?-zr)+.6wvuuU_m/rnn2PK0s PK95FdocProps/app.xmlN0E|Edu8DQ*'Ex"cOZ#dOqA*]wyΜlr%EI2Ie-y5"r+vZrH { C@1K@J8HMdS7J*ˆ‚`%ܟ䏸Ztt_|>:փ#tϧI=| s!F6r+]gJpL)u;w-+Ni>EÐJS&eЗ4 ` ;,9G`MDtF|Bv{@1 A9$_^Fګ A \^}b2}`m B_`suJD3$3RY9?Ogmjl,蝤2RP&8Y 8sԅ< ` }Yxt p-Rpzo0e#d@ PKc fPK95F[Content_Types].xmlMO0 U͆BHaqF!q@$t[Z۸Dlq>]6YL1I@s# 4Ooȴ`iBzހb>34F* jjc5r萆AqN Hf̅ AiOܭ " Vr]hCK7XFZ L0Nlpw ]!a^ZMUI(g=-B/=hCXOa|@L79G &_ ɨT8AW٫zE]`L7t2V-ct:AW{Z}D1ę3SmX)@ł rz67;dbw(ݦ/?PK|_PK95F#= _rels/.relsPK95Frv"word/_rels/document.xml.relsPK95FdQ`word/fontTable.xmlPK95FB~word/settings.xmlPK95F5]word/footer1.xmlPK95FS2word/header1.xmlPK95Fj\q79word/media/image4.jpegPK95F(>?@word/theme/theme1.xmlPK95F@v o6Fword/styles.xmlPK95F0s Pword/document.xmlPK95F %5TdocProps/app.xmlPK95Fc fmUdocProps/core.xmlPK95F|_W[Content_Types].xmlPK ?Xpandoc-1.19.2.4/tests/docx/inline_code.docx0000644000000000000000000002027313155240142016627 0ustar0000000000000000PKlD ]$[Content_Types].xmlN0E|E-Jܲ@5*Q>u&_g*h̽WL; 8t˜}_6-n&󽇘P9[!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k>:SvX7cm//.WGkMLDcH<(qDKsrn% b0W*qBmތa/fM&530G?c2e{PZΪ\2oX]2Y&_>$!˾W@WυjgN_ZoKZt Jn Ne"%!L2ikC,~ ^=e!ChW䞞"͙w|yS̓"2JZ E[cMkl ˇ9wRU,b[auXe_6knȋH?d##vDd KB'_XZKeSGN]Rx.(<]CSm//X[OUt|O*ߖW)fx"G.|S6&G#Hf5u;3 .jtkg]wkK}5p?ӳPKlDҟVword/settings.xmlUMo0WD9/%|Z-PCBMwǙG!KN NjhO'f2[u 2fz꾿-[{w3 :Sw@ [Q%LLJ$aT1& Rt+3HKV'BҝԴ7l+`yz2m͆&_^pw+KWk+ n dM5yN3QF/!p E Sw߸]r "Ã6 25".@΀㋠VkE BNIay,pɸ{W<_4oC}t qFjGFٱ"9X$ 3BkoPo™89ԹPƦBA7o)KQJry\Lita` _1jv * 8źڽJit<gwG~1b/hp~vGC3iϟ 0*m128wyT$>BXj"w i%K'oY+𚜺dl1 wQ˚\l"6ߠmAgR!1#\ ɲӸFEa‰ bM\uOqCh].jkF\b[_c jlhamhh[r,Dr.sj԰ BxQm5ϙ6!d(FV/}PKlDTΜword/webSettings.xml];0DrOl(M"L$loBAA9FS6/ ,Js-GJo$:+bG)1!VJ)-R4 @`M'a:h}T LqkwWa gsZ^;PKlD ]$[Content_Types].xmlPKlD? _rels/.relsPKlD0OLword/document.xmlPKlDz0word/_rels/document.xml.relsPKlD4o}Cword/_rels/footnotes.xml.relsPKlDgword/numbering.xmlPKlDY.word/styles.xmlPKlD(*bst word/footnotes.xmlPKlDudocProps/core.xmlPKlDdNFddocProps/app.xmlPKlD= word/theme/theme1.xmlPKlD{H: fword/fontTable.xmlPKlDҟV1word/settings.xmlPKlDTΜKword/webSettings.xmlPKpandoc-1.19.2.4/tests/docx/nested_anchors_in_header.docx0000644000000000000000000004217713155240142021363 0ustar0000000000000000PK!G[Content_Types].xml (TN0#(qjʁH8›Tx\3Zxs|H9UOHatԃ&goi$;NpaӠsn-ZSs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!C(JSjD8>;IU54aHU߼rV63XgmfDJ፷zd7boQoh_B29F4K Q(d񰓽\l @w Z6r"1݃oB DI` ԨFkm ;j MP $jw8/`7,UJ{tkI`*.WS5][=;{g#~.e2@aҒ՘cR:PC |s} *#^k-ҞHdPK!>+U(customXml/itemProps1.xml $( j0 =uڬ\tMױ®$ 36};uǝ'!}?*f$yfQVbm$O@|#Z"CC+eHlX/g_;˛&SՏYª KTW}>700(rPF5NaΈNKuF9eݦiN͌P.y~_Tq6;_MF ,w(PK!JZdocProps/core.xml (]K0C}1K]w!yonuCLyr%h *%)@1ͅVyg(r*NB{phN./Jf -LR5rGǣ. %rJR%YAW/.^5Kf04t1 1 DiA,ԳPi]P%2bܮ*i9,*I8eo]&mjf3ea˕fZQf YO.w4QHpQmfBQA{o"Ew34]Р.{$͋BF2,ڒ}c?~V;6p*\ ̓RIaS8/_?j3 ~PK!|word/webSettings.xmlQK1 wp} cė!L@mŦ)I:ݦI>L=8 jƵ X]tu1S$z)@ j>6z)JE۩mJZȘ"ѤF]Yh[;AfYx$Cԯ|)E%Z&#ƅ_Y&!2<>RO/B>oYrLԬbr>aAX_O%ý\C?ן}PK!8@docProps/app.xml (SAn0cI&ZAȡi XI,J$AnE{.X0;\K|ld>hkfd4N4ڬfm+U4customXml/itemProps1.xmlPK-!JZ 6docProps/core.xmlPK-!\8customXml/item1.xmlPK-!-mf9word/fontTable.xmlPK-!|<word/webSettings.xmlPK-!8@[=docProps/app.xmlPK@pandoc-1.19.2.4/tests/docx/special_punctuation.docx0000644000000000000000000002033013155240142020422 0ustar0000000000000000PKMDG ]$[Content_Types].xmlN0E|E-Jܲ@5*Q>u&_g*h̽WL; 8t˜}_6-n&󽇘P9[!GΣ\1s,U*@z KKw="XL`*֘sK,yjj ﵒ̛*?:@Ǟɍ-?hM6=q|=XSAD7aHo](HĬ*%trmh$}pb$=_$vm0EZ$lFfس"Xh;^ #'I%)x?\w>ղ6kƮ5 ʞ~kdIwPKMDG? _rels/.relsJA >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W)fx"G.|S6&G#Hf5u;3 .jtkg]wkK}5p?ӳPKMDGҟVword/settings.xmlUMo0WD9/%|Z-PCBMwǙG!KN NjhO'f2[u 2fz꾿-[{w3 :Sw@ [Q%LLJ$aT1& Rt+3HKV'BҝԴ7l+`yz2m͆&_^pw+KWk+ n dM5yN3QF/!p E Sw߸]r "Ã6 25".@΀㋠VkE BNIay,pɸ{W<_4oC}t qFjGFٱ"9X$ 3BkoPo™89ԹPƦBA7o)KQJry\Lita` _1jv * 8źڽJit<gwG~1b/hp~vGC3iϟ 0*m128wyT$>BXj"w i%K'oY+𚜺dl1 wQ˚\l"6ߠmAgR!1#\ ɲӸFEa‰ bM\uOqCh].jkF\b[_c jlhamhh[r,Dr.sj԰ BxQm5ϙ6!d(FV/}PKMDGTΜword/webSettings.xml];0DrOl(M"L$loBAA9FS6/ ,Js-GJo$:+bG)1!VJ)-R4 @`M'a:h}T LqkwWa gsZ^;PKMDG ]$[Content_Types].xmlPKMDG? _rels/.relsPK-DGH"4word/document.xmlUTVux PKMDGz0word/_rels/document.xml.relsPKMDG4o}Gword/_rels/footnotes.xml.relsPKMDG4hword/numbering.xmlPKMDGY.word/styles.xmlPKMDG(*bsy word/footnotes.xmlPKMDGudocProps/core.xmlPKMDGdNFddocProps/app.xmlPKMDG= word/theme/theme1.xmlPKMDG{H: kword/fontTable.xmlPKMDGҟV6word/settings.xmlPKMDGTΜPword/webSettings.xmlPKpandoc-1.19.2.4/tests/docx/table_one_row.docx0000644000000000000000000006124313155240142017200 0ustar0000000000000000PK!Q[Content_Types].xml (MO@&f]`pP<*v ݏ,_iI(ziN}fڝ`h5)&6Sfc|" dRdEor l:0Tɭ"Эp'䧘tn& q(=X!.,_WFL8W()u <"l.ސ%q^Np0KPl*3ӫ Ihb 3Y9wrFJB/ݜ;"+Z(e?ȁaU=7<I?H<4e:bG۞!АN mCǍs+_bǼ$40n#WͱH:#oh{JuLG΁ tDZXgF kPK!'  _rels/.rels (N0 HCn ]n0$J<ޞJQMbΟjwb)%rDbt;H uQjmH"eR&R\l|162,dHS67 }?G[hQjib&lQclu:tifc5=z ϒvLΐF$3<)4/͡cTZ LֲPK!hu word/_rels/document.xml.rels (N0H;qR T@8:^~TZ%K+|kW/ӐA;iԶx$hN;t/ZD8;Ƃl(XB "M5h>$S)/))6:|7` 7 QS }'FG Y,Ķc sB` /YfS ٜ &_ao.8tÛqUcH<2loPK!jf word/document.xmlVo0~$JiTv6*8$ϲRl'J;VBbᄏs8;,ΊI{a7:S37G#41Ɂf;|pVE1в`\wtZMYATȨ ݥPXda`߄ʔxWjC+m{A0 cƑdALC.Kq <3F~YRDH Zysi|)G!}s%|r$ \V4#m(5d+RkI*}{pψ;"w:ڴS08"pݘ &ͦ*#P6+3_X&x`hG};5*bNA I92B;# NsyLs֩ރY'7!zRCkl=Ȥ^I / s6f:(n͡%o >ql;PK@|43fvDoM֚YdIu!ق~l3+pD-,D!4_&RY]u .]4g~'}xPiB$IO1Êk9IcLHY<;*v7'aE\h>=^,*8q;^*4?Wq{nԉogAߤ>8f2*<")QHxK |]Zz)ӁMSm@\&>!7;wP3[EBU`1OC5VD Xa?p S4[NS28;Y[꫙,T1|n;+/ʕj\\,E:! t4.T̡ e1 }; [z^pl@ok0e g@GGHPXNT,مde|*YdT\Y䀰+(T7$ow2缂#G֛ʥ?q NK-/M,WgxFV/FQⷶO&ecx\QLW@H!+{[|{!KAi `cm2iU|Y+ ި [[vxrNE3pmR =Y04,!&0+WC܃@oOS2'Sٮ05$ɤ]pm3Ft GɄ-!y"ӉV . `עv,O.%вKasSƭvMz`3{9+e@eՔLy7W_XtlPK !..docProps/thumbnail.jpegJFIFHHtExifMM*>F(iNHH8Photoshop 3.08BIM8BIM%ُ B~ICC_PROFILEappl mntrRGB XYZ   acspAPPLappl-appl descodscmxlcprt8wtptrXYZ0gXYZDbXYZXrTRClchad|,bTRClgTRCldescGeneric RGB ProfileGeneric RGB Profilemluc skSK(xhrHR(caES$ptBR&ukUA*frFU(Vaeobecn RGB profilGeneri ki RGB profilPerfil RGB genricPerfil RGB Genrico030;L=89 ?@>D09; RGBProfil gnrique RVBu( RGB r_icϏProfilo RGB genericoGenerisk RGB-profil| RGB \ |Obecn RGB profil RGB Allgemeines RGB-Profilltalnos RGB profilfn RGB cϏeNN, RGB 000000Profil RGB generic  RGBPerfil RGB genricoAlgemeen RGB-profielB#D%L RGB 1H'DGenel RGB ProfiliYleinen RGB-profiiliUniwersalny profil RGB1I89 ?@>D8;L RGBEDA *91JA RGB 'D9'EGeneric RGB ProfileGenerel RGB-beskrivelsetextCopyright 2007 Apple Inc., all rights reserved.XYZ RXYZ tM=XYZ Zus4XYZ (6curvsf32 B&l }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzCC2 ?( ( ( ( ( ( ( ( ( ( ( ( (( ( ( ( ( ( ( ( ( ( ( ( (( ( ( ( ( ( ( ( ( ( ( ( (( ( ( ( ( ( ( ( ( ( ( ( (( ( ( ( ( ( ( ( ( ( ( ( (( (g6'_<' kqk^\Adaiחw7ڥcgckswy{wommJ@3dO',H|y¿d(+!7|xg@<+M2? x Ǐvt¿d(+!7|xg@<+M2? x Ǐvt¿d(+!7|xg@RMҭ5z݅޻~Vk{{}ƳEĺn ]GPHu]ZK;543Qhŭ̱hdg`!1~ɿP<&@_~ɿP<&@_~ɿPmu{|Ei[ѵ+qoh:%?<7}-6z}>#@kvvjm;ǁҴxiӿm/O?l_ٓSR?~ٝB(;i eyʹ'ʃQV.l~w_ ~~W@6gGq1U]W5tl~w_ ~~W@6gGq1U]W5toMdjn4MSoj˦iWIRmI̩%ٳ6f<K>+i '.~ izcۇOx'U]__GAOOCºgF|SOhhoGykKm'i㯋MOYEk׊W׋j |MxFFχM.CBn: 'Rjj]\OGg׆&_!4jHR:\Vp,5ѿW5tl~w_ ~~W@6gGq1U]W5tl~w_ ~~W@6gG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G LM#{pq4x<G O ,6XM7Ė 7}΋N[zΠ<@ZD~kBG?2Xz J}wh- BFU(~S:FIG's44aJ=?y=Fv!iҍC017 vs`huuiLʃ/[ޮff@cnTl͡Gˋ hrFnLhl@{ɳdpl$_hZ|kͥF` *W~MW=͐PK!y&Cword/fontTable.xmlԔn0}{,JVR׈i tP@ӔMxuG(:@yQ8[A?J`ŌZ(a0Ey>N'XGԌX̢g0Js0 -]0IlOLA0FfJb>-eNr:1>C9Eg썦Kɔa ƭ8ĭfMP$\6Qg$95QXZAz(tn!S(A\P  ^95@N,؊'3]ckJΈbݨdtE#|S,C`i8Eo1x~I>m>:gϷ_uh\vNNFKJY:g#>b}8G8x_jpFy t|u8 Y|e%]Rv)JRR[ -y@^A.kwCS0ԇf^_o7?:ԻܝH=c=;Dpb;xJ*oؿ,UkGPK!7xdocProps/app.xml (RN0WYgQ[Uh-8 iG$pl4l>{c?y6\z\\ ziꊂօ~W??Ua } T+}sLQD"]=0KhIJvN,0*v3tHE|W,ֳ+fWcZG&{76jau#F=T\S̶ Ps3+딼3s&;и դj $8XCd.Y>c-=e|ݡ/ꃀ}JCj͔j'!|[jAR!+Orʋd?)aiϿ)kJFNgPK-!Q[Content_Types].xmlPK-!'  _rels/.relsPK-!hu word/_rels/document.xml.relsPK-!jf e word/document.xmlPK-!!Z! word/theme/theme1.xmlPK- !..docProps/thumbnail.jpegPK-!WHBword/settings.xmlPK-!ʳCFword/webSettings.xmlPK-!4@;Gword/stylesWithEffects.xmlPK-!>]͡yOdocProps/core.xmlPK-!TV=WRword/styles.xmlPK-!y&CZword/fontTable.xmlPK-!7x\docProps/app.xmlPK N?_pandoc-1.19.2.4/tests/docx/tabs.docx0000644000000000000000000003116713155240142015314 0ustar0000000000000000PK! $[Content_Types].xml (MO@&Wz0ƔM.C~dgJKZ2 3J<*kROz,#m,eEDi l Fˋt#6"w9:0t[E[?N1~piMPir1/C4^C,_R&+Hd\CBwPV*h"|x0gV5iy$4V"eˤ9BA )jT(y>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ȌPK!0MdocProps/app.xml (SMo0 0|ot>FŐba[ mϚL'dIؠٯe74i鑂Vxy]Ӿ5n/*r>b7p}HS-\Z{"=*88+0:gBb{qumzX`X'eӣ\0=pv27xMf;ECF+bO7Ov}Q;E DWF#`YQ mS[,nڲS6!WnP)r@jJ~٬u}P(GlZ.ې(Ɛޜe%6l 28/䨁m7]b BN3}PȇO CxxNC4y8OlyGyڽpnGq;lO5'B=oT.98PK-! $[Content_Types].xmlPK-!N _rels/.relsPK-!|;9"word/_rels/document.xml.relsPK-!SeB word/document.xmlPK-!0C) word/theme/theme1.xmlPK-!Fwword/settings.xmlPK-!Nword/webSettings.xmlPK-!ua=word/stylesWithEffects.xmlPK-!eJ}docProps/core.xmlPK-!Oz Gp:M"word/styles.xmlPK-!TG[)word/fontTable.xmlPK-!0ML,docProps/app.xmlPK X/pandoc-1.19.2.4/tests/docx/track_changes_deletion.docx0000644000000000000000000003204613155240142021037 0ustar0000000000000000PK! $[Content_Types].xml (MO@&Wz0ƔM.C~dgJKZ2 3J<*kROz,#m,eEDi l Fˋt#6"w9:0t[E[?N1~piMPir1/C4^C,_R&+Hd\CBwPV*h"|x0gV5iy$4V"eˤ9BA )jT(y>vw餶ثv(SLqWUDX˿Qw4S^ 0F"м\gsldYdLuH݂c9>(hVDۈ5{A7t PK!N _rels/.rels (JA a}7 "Hw"w̤ھ P^O֛;<aYՠ؛`GkxmPY[g Gΰino/<<1ⳆA$>"f3\ȾTI SWY ig@X6_]7~ fˉao.b*lIrj),l0%b 6iD_, |uZ^t٢yǯ;!Y,}{C/h>PK!|;9"word/_rels/document.xml.rels (MO0&һV]ٲ5٫-Sht ʢ.MfIZUq"=loO.Y$m.+gAT!,MQH(XI\qZbaG;_K /x#Փ,/d}?eh 7)mg;kk4Df2/wBmw4A^#࣡FkPܚHxȽAt~9' ozWnMtVWkJlNWz^>\PK!"ļiword/document.xmlUMo0!hJQ.aj^2$Hl6߱-UUZ )=7puTRLh)^.$0R/WuJ@!IjŦV%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e&@e&6o\ MSTJ`Ta9&N0, nΤoŒoh&oxwCo NSMMaxfMTo흊:#xX/śG h&h&oxwCo NSMMaxMTo흊:&XÈ7[ | E7 #ބ #P '[śb˃śbk9g ES A@=g=@ND.2:+}:'p;C!Z? ݓ7P=T.$S8Pޞ,7֠@Ȕv%@X%w AEYl|A,*>;Q XTD wN@J2,N?Cvh;7'[ƌ'[GW,ReȖ$B :3|?QY`AZ͏FrۻC̀S :nq>K38I6BPղ_XkC(PWyl;mw"N$5X{?k!m#(۶=P)kBgG" 1cwl(?;3Zt,/dW9>)ϧ"NӶљ`AbdU֪ 9U,M3l.ݑPK!>@ word/fontTable.xmlܔN0'VT vuZlGK w`0I6 (VKyLdm<&q9ѧVy9#,FW̠Ãoa5f(hRk2A̶ʙDiA,|s_yoQ%rbg^!=TMTTpʎ]&my,E%MsR+6Q+ZQf Yd \62A&$8ʨne#ID(Ad{`.[yRtۦq@FW_CeO SlsB CnvQxDY#|DS6/1Z^Z^^,t1:L]0 9.L]ڽ=+nqS3V1/#PK!docProps/app.xml (Sn0 ?7r(FŐba[mϚLdIT׏WvO4HK}Pl* 466C,BܔG v:Qa( ѭ ^ eZ{)fVIGeU]1|hl.ܰ:M+X Pcﴈ$9L@mе/؉Mo6v :9)o_߁%@Q>{MIH/\m`/-]BF4ҝP$PF닠~P/ڔJH)v!z^7xyY*H 9iĹpM?.sIj&'nm93"W۴(ПTNHOiGyڽpGn{Τ1lN5'B=No/WqNxPK-! $[Content_Types].xmlPK-!N _rels/.relsPK-!|;9"word/_rels/document.xml.relsPK-!"ļiB word/document.xmlPK-!0C)= word/theme/theme1.xmlPK-!word/settings.xmlPK-!Nword/webSettings.xmlPK-!3/ju@word/stylesWithEffects.xmlPK-!]_J} docProps/core.xmlPK-!=1#word/styles.xmlPK-!>@ D+word/fontTable.xmlPK-!-docProps/app.xmlPK 1pandoc-1.19.2.4/tests/docx/track_changes_insertion.docx0000644000000000000000000003123413155240142021244 0ustar0000000000000000PK! $[Content_Types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]pm3Ft GɄ-!y"ӉV . `עv,O.%вKasSƭvMz`3{9+e@eՔLy7W_XtlPK !,cL0L0docProps/thumbnail.jpegJFIFHHtExifMM*>F(iNHH8Photoshop 3.08BIM8BIM%ُ B~ICC_PROFILEappl mntrRGB XYZ   acspAPPLappl-appl descodscmxlcprt8wtptrXYZ0gXYZDbXYZXrTRClchad|,bTRClgTRCldescGeneric RGB ProfileGeneric RGB Profilemluc skSK(xhrHR(caES$ptBR&ukUA*frFU(Vaeobecn RGB profilGeneri ki RGB profilPerfil RGB genricPerfil RGB Genrico030;L=89 ?@>D09; RGBProfil gnrique RVBu( RGB r_icϏProfilo RGB genericoGenerisk RGB-profil| RGB \ |Obecn RGB profil RGB Allgemeines RGB-Profilltalnos RGB profilfn RGB cϏeNN, RGB 000000Profil RGB generic  RGBPerfil RGB genricoAlgemeen RGB-profielB#D%L RGB 1H'DGenel RGB ProfiliYleinen RGB-profiiliUniwersalny profil RGB1I89 ?@>D8;L RGBEDA *91JA RGB 'D9'EGeneric RGB ProfileGenerel RGB-beskrivelsetextCopyright 2007 Apple Inc., all rights reserved.XYZ RXYZ tM=XYZ Zus4XYZ (6curvsf32 B&l }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzCC2 ?( ( ( ( ( ( ( ( ( ( ( ( (( ( ( ( ( ( ( ( ( ( ( ( (( ( ( ( ( ( ( ( ( ( ( ( (( ( ( ( ( ( ( ( ( ( ( ( (( ( ( ( ( ( ( ( ( ( ( ( (( ( ( ( ( ( ( ( ( ( ( ( (( (?+?j٧GEjS!e( &Gk,tfNJ$hG੷ $ 3]ώڣV~ßlhVZ_u;&xK:' Z~鶠׏~ڗ?So:?/C0WYVֿM3ƠE_UMFM Ot= n-MzJUuOjZ}eWH-u,>xT='F}/H {4!|T߈߂> ׼?^<]qPhD$m,@GLuO<NuWU//@#_]u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J @tnb ޷f}  tATg,Ӆ{/ qؠeL"zK&Z2/KB/'x$8;_iD.(xVѦ,M^pf çmy@b.I*gV]sg*㟥C! ]u?PK!aYword/fontTable.xmlԕn0HC'FN0(BBPyqZ؎lYݝ3H\6v+ujʡL|7}}zv!RgɴJF`0IU'$ᔽR4L*,G%͂gu+q+3(3ri' N2*HƭWVI4|;JY /@SωiNHecKF8x@-hl7rBOWJrj=.ZyIsz9 f#C'T+^R :Ň553ʧ=|@. V֕盯W8ZǨVzTvs6]eyO/X wRm*3=+U%j*)jexj)6R+mC@ʸ @yhb㗀ʷz4??` w3q14gfsܬBiVI"T{ÍǓr KsoPK!jiWMydocProps/app.xml (RN0W?D΢h-z(8Ibؖ= ;i[}~~lz}Bvv o},hWW'1QfGPv.*fFA:]#ܫuM4#VMs)Xgig_Q<$54&LdolB}F[wSǘ Ps3sP+)yg%Y}L%v\ݢqcIzH42Q7~0[ Ϙ7 AO{_w z'`DŽrx3v#pHh&/ī$NOyK%Г=1e0NidMɻ,FPK-!Q[Content_Types].xmlPK-!'  _rels/.relsPK-!hu word/_rels/document.xml.relsPK-!F e word/document.xmlPK-!!Z!D word/theme/theme1.xmlPK- !,cL0L0docProps/thumbnail.jpegPK-!p Eword/settings.xmlPK-!ʳC1Iword/webSettings.xmlPK-!jtS@hJword/stylesWithEffects.xmlPK-! 9!|RdocProps/core.xmlPK-!PL=Uword/styles.xmlPK-!aY]word/fontTable.xmlPK-!jiWMy`docProps/app.xmlPK Nbpandoc-1.19.2.4/tests/docx/trailing_spaces_in_formatting.docx0000644000000000000000000003116413155240142022447 0ustar0000000000000000PK! $[Content_Types].xml (MO@&Wz0ƔM.C~dgJKZ2 3J<*kROz,#m,eEDi l Fˋt#6"w9:0t[E[?N1~piMPir1/C4^C,_R&+Hd\CBwPV*h"|x0gV5iy$4V"eˤ9BA )jT(y>vw餶ثv(SLqWUDX˿Qw4S^ 0F"м\gsldYdLuH݂c9>(hVDۈ5{A7t PK!N _rels/.rels (JA a}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iκvw?oPK!J}docProps/core.xml (QO M -e]%mٓKLq]G,ۿ[>^^ȗGUGN6@$IQ7B@oU|"n4-ۛ /1`v7cKCqX|(m 㟬e2T04ȩsFkb5gW6\ເ wŅoƘWiWi;ly[=ZtG9+ .4ؓO{?O<%OٱxQGFMTcaZEbb*]5{e_g-G\&sI.=m2"\cxXcU@hX)dZ}SD:dxqdز\V1L;2/\x%`IX\hMf$PѩղnXMjǨu *Woh&ohxCo VśW8_KPU 68+~3:=v&Pj7ŽNxX 'jRqěG qěG qě.ěbkCU&PM+mxRqt&Pj7ŽNMPE*PU7p`arsG #8M#p'[JM7ĖTo O7NƟ. ;@M&Pѩ js;@5V)`&8#oh&w?d<&PjjU \&!xf.pɍqOXkp8)θKD{$x-381_xqJ-@釾>PK!TG[word/fontTable.xmlܔn0}{,JVȁTEdhi"*I[;Pth.yY V렝j}.y|݈Y1m!:9LR5rw99',Dkf|+i l了&LQPWp U"#x1FSvR0if)8*i[~[<ӊ2c"Ჱ=#VFŶq {$R:zJY r/@$ NIgHeIC},O4!0,ĕN597*ddECUfCQ* Qd(>4Un@rҧ\ KPUV#qֹ&dAR{vM?}yps}=Z>!x58HK9߰VőM":4<<58W,w(AdKz ]`)jХocS4Y} JxGyRz^)pl7߷k[ ݸ!CS"`SdÿTL4ijnb5f#ȌPK!%docProps/app.xml (Sn0 ?7rYŐba[mϜL'dIT׏WvO4H^* 4Ҷr,Bӂ򄡼}T jaB]ctƂh"[U5× ˩f۴2 ɑ`읆{9 Q=%swp ' 9d,䟝JB$O7% x"Y^ɑ=gIT!$c$;j#qK耜!t!n"_4UYɬ+0LKeS0bBQQSoMu2j \&r@Ku ᾣ]bG LN3躵sgD iQ^=$?x;4*{livo#Ng皿i7*EE߸Agvt~<7PK-! $[Content_Types].xmlPK-!N _rels/.relsPK-!|;9"word/_rels/document.xml.relsPK-!i;8B word/document.xmlPK-!0C) word/theme/theme1.xmlPK-! word/settings.xmlPK-!Nword/webSettings.xmlPK-!ua=word/stylesWithEffects.xmlPK-!J}docProps/core.xmlPK-!Oz Gp:J"word/styles.xmlPK-!TG[)word/fontTable.xmlPK-!%I,docProps/app.xmlPK U/pandoc-1.19.2.4/tests/docx/unicode.docx0000644000000000000000000002636213155240142016012 0ustar0000000000000000PK Eword/UT S=Sux PK!o%Ȋ=word/stylesWithEffects.xmlUT Sux [s8wf{/{vr%3M $Vq~79D} Ds9OT*&_܇'箣43*ㇿz*QğҘw1Pb"r|ꭅ A%RT)C"(j"ܜ\ mʋ|L,bhFRdP2-*T-BƔIW!KV5s2DS!ڍ$kg+I?(bLbIaYeƷ7uniUcvj7q=1ڽ5e<$ybzBEd22=d3`"5]4*;w<,?YO7y\1לD ̽;Ț;͗,`f`P\öUF|?M\"OYWޒwxQNrYjjnjP&l\Qu+ͺZz6d\e^x9K߄H6'fn27w i tN&e+ - Յ# 7fyX8 7cy@8 ٛw;ϼ,p11o41oǼ p1o޼!x `7cPgol#SHU zX%J K`uŗB<:a"b"/yi%rMA{ >d<ͅ%1znOPE7泞,8K)?*\KjA(?4,_SyUojrCpCU|ȶCagq[gGr+ŏ_Ҕd䳈Ȍu9LgV^(%"i4K]_9Z9^ۼFo?osxAe9d^ZPԲsO:ܪ@~ɼ?㋞U,.&Kw/?PK!Nword/webSettings.xmlUT Sux J0;wӊmDV>@N`&fu2Iclo(4Z`walnu I&SF@Զ=? J 5FM)Zk5Eq FrɣFï$9A_:2|B,ܒ#kE 2(?|6ɂHƅ_LBCZe-Tn^h13}i`um.O'PK E% word/document.xmlUT SSux Vˎ0QִIKA43Hulk ,!Σɔ2馎{9T8 4w;murWwcцȐﮘvO' :O4H,3wc4MXJt;Tȴ)D[ LeZ#9 . 2&q3S{)QyB>傛b ݹA Z )A! o2*=je< 7 dPTWF,qwI(?wx#bpY?ʚ~^)g5FXXVLJipKPd*P:؎te1peYxՄ/GZ+8|~tv|^̅i0ceU Gl 2}FjNz1{^ՠ'hbsLxhSj@t2U :ø!NJ0 ])¢y_ vrI6&ֆ57D+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ps/app.xmlUT Sux Sn0 ?7J(FŐba[mϚL;dIؠ׏YwOIk#l߈l. &T7X~E&+Ǎ8aإ1\q k)9`Ӟ3uH&S#C][wI.k*bP\E`:5B= Zfs :sϣ~PK!lA<}docProps/core.xmlUT Sux ]k0%mDB[a^M̱kXAYkV˼e>yxI^F$)@s# ^s`Px(rn)7^&)چ`)ƞoA1nÍq*lfIΰ wFtR >(폫{jP$!p߼'W`&zz6M4Y \Rw\p`\ ؐ㫏kêFx<\qw;ӞiDԖG^ribɜf4MZ:qgA70/PK F E_rels/UT 4aSSux PK!N _rels/.relsUT Sux j0 @ѽQN/c[ILj<]aGӓzsFu]U ^[x1xp f#I)ʃY*D i")c$qU~31jH[{=E~ f?3-޲]Tꓸ2j),l0/%b zʼn, /|f\Z?6!Y_o]APK EAword/UTSux PK!o%Ȋ=?word/stylesWithEffects.xmlUTux PK!Nword/webSettings.xmlUTux PK E% dword/document.xmlUTSux PK F E A word/theme/UT4aSux PK!0C) word/theme/theme1.xmlUTux PK!_CN&word/settings.xmlUTux PK!ɩword/fontTable.xmlUTux PK!Y;word/styles.xmlUTux PK F E Aword/_rels/UT4aSux PK!|;9word/_rels/document.xml.relsUTux PK! $f- [Content_Types].xmlUTux PK F E A!docProps/UT4aSux PK!4J#"docProps/app.xmlUTux PK!lA<}6$docProps/core.xmlUTux PK F EA%_rels/UT4aSux PK!N %_rels/.relsUTux PK+'pandoc-1.19.2.4/tests/docx/verbatim_subsuper.docx0000644000000000000000000002416113155240142020120 0ustar0000000000000000PK mUF ]$[Content_Types].xmlN0E|E-Jܲ@5*Q>u&_g*h̽WL; 8t˜}_6-n&󽇘P9[!GΣ\1s,U*@z KKw="XL`*֘sK,yjj ﵒ̛*?:@Ǟɍ-?hM6=q|=XSAD7aHo](HĬ*%trmh$}pb$=_$vm0EZ$lFfس"Xh;^ #'I%)x?\w>ղ6kƮ5 ʞ~kdIwPK mUF? _rels/.relsJA >Ő{7*"^ЛH}0!#ZGr;R|̛ GcVw5R&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R_gJSbj9)ed(w:/ak;6jAq11_xzG~F<:ɮ>O&kNa4dht\?J&l O٠NRpwhpse)tp)af] 27n}mk]\S,+a2g^Az )˙>E G鿰L7)'PK!+word/fontTable.xmlU1n0 X줮;h]ҡp@ӔEHڊWgܡ=B!6 lÉk.n: O%0&LK"癙0FB8r5xe`߸}{_\hZP f4~gtK%"N) k{ dƇ `\. a+a+N \8߬Uͧ4[G% -Q\Qa{BÝV$Ҽ~jBʤCkᢲgFpJ 3D9S}BSڡ納g^I\1Y'v!i '.%1OM,nRR]Oi˽1QO,{0}pVtGN8czѬ[|t[up1j͆iZftNGuyݟ9gAy)]wʿlBcNx(i۲zQp!'͂G{a_ nZWJTբ8VNS<+-N{E u: M˗ x@n<֫6-Y 7J2&^T;vLs#l>Æd(֢,r^GRj79)'/8ŽRW͑pvl!%yrM,v&k73'EZj|$#8ϾPK!ʳCword/webSettings.xmlQK0wP򾦕!RA& a\e6ė܏jlqH}+xS+6QPR~P=$*7?`St+B#%xnJ\I:?aLoIGyWU⛉(8F2e=&Џ2!D@8{2 gtD1|l$O(n^&QRtYv,l?1w_PK mUF ]$[Content_Types].xmlPK mUF? _rels/.relsPK mUFR word/document.xmlPK mUFz0word/_rels/document.xml.relsPK mUF4o}word/_rels/footnotes.xml.relsPK mUF&word/numbering.xmlPK mUF\uCU word/styles.xmlPK mUFEL\word/footnotes.xmlPK mUFudocProps/core.xmlPK!)xDudocProps/app.xmlPK!\Rword/theme/theme1.xmlPK!+word/fontTable.xmlPKKFVI word/settings.xmlUT Tux PK!ʳC#word/webSettings.xmlPK$pandoc-1.19.2.4/tests/docx/adjacent_links.native0000644000000000000000000000331713155240142017661 0ustar0000000000000000[Para [Str "Le",Space,Str "plus",Space,Str "int\233ressant",Space,Str "\233tant",Space,Str "sans",Space,Str "doute",Space,Str "le",Space,Str "Marsan,",Space,Str "propos\233",Space,Str "par",Space,Str "Claude",Space,Str "Marsan",Space,Str "en",Space,Str "1976",Space,Str "qui",Space,Str "avait",Space,Str "m\234me",Space,Str "fait",Space,Str "l'objet",Space,Str "d'une",Space,Str "norme,",Space,Str "mais",Space,Str "qui",Space,Str "n'a",Space,Str "pas",Space,Str "du",Space,Str "tout",Space,Str "\233t\233",Space,Str "adopt\233",Space,Str "\224",Space,Str "cause",Space,Str "des",Space,Str "habitudes",Space,Str "trop",Space,Str "ancr\233es",Space,Str "et",Space,Str "qui",Space,Str "a",Space,Str "fini",Space,Str "par",Space,Str "tomber",Space,Str "dans",Space,Str "l'oubli,",Space,Str "gros",Space,Str "clin",Space,Str "d'\339il",Space,Str "\224",Space,Str "cela",Space,Str "d'ailleurs",Space,Str "dans",Space,Str "le",Space,Str "film",Space,Link ("",[],[]) [Emph [Str "\"Le",Space,Str "nom",Space,Str "des",Space,Str "gens\""]] ("http://www.allocine.fr/film/fichefilm_gen_cfilm=172167.html",""),Str ".",Space,Str "D\8217ailleurs",Space,Str "l\8217\233tat,",Space,Str "bien",Space,Str "conscient",Space,Str "que",Space,Str "tous",Space,Str "les",Space,Str "fran\231ais",Space,Str "\233crivent",Space,Str "sur",Space,Str "des",Space,Str "claviers",Space,Str "compl\232tement",Space,Str "inadapt\233s,",Space,Link ("",[],[]) [Emph [Str "tente",Space,Str "encore",Space,Str "une",Space,Str "fois",Space,Str "de",Space,Str "faire",Space,Str "une",Space,Str "norme",Space,Str "en",Space,Str "ce",Space,Str "moment",Space,Str "m\234me"]] ("http://www.appy-geek.com/Web/ArticleWeb.aspx?regionid=2&articleid=56103389&source=messenger",""),Str "."]] pandoc-1.19.2.4/tests/docx/already_auto_ident.native0000644000000000000000000000021613155240142020537 0ustar0000000000000000[Header 1 ("anchor-header",[],[]) [Str "Anchor",Space,Str "Header"] ,Para [Str "A",Space,Link ("",[],[]) [Str "link"] ("#anchor-header","")]] pandoc-1.19.2.4/tests/docx/block_quotes_parse_indent.native0000644000000000000000000000243613155240142022136 0ustar0000000000000000[Header 2 ("some-block-quotes-in-different-ways",[],[]) [Str "Some",Space,Str "block",Space,Str "quotes,",Space,Str "in",Space,Str "different",Space,Str "ways"] ,Para [Str "This",Space,Str "is",Space,Str "the",Space,Str "proper",Space,Str "way,",Space,Str "with",Space,Str "a",Space,Str "style"] ,BlockQuote [Para [Str "I",Space,Str "don\8217t",Space,Str "know",Space,Str "why",Space,Str "this",Space,Str "would",Space,Str "be",Space,Str "in",Space,Str "italics,",Space,Str "but",Space,Str "so",Space,Str "it",Space,Str "appears",Space,Str "to",Space,Str "be",Space,Str "on",Space,Str "my",Space,Str "screen."]] ,Para [Str "And",Space,Str "this",Space,Str "is",Space,Str "the",Space,Str "way",Space,Str "that",Space,Str "most",Space,Str "people",Space,Str "do",Space,Str "it:"] ,BlockQuote [Para [Str "I",Space,Str "just",Space,Str "indented",Space,Str "this,",Space,Str "so",Space,Str "it",Space,Str "looks",Space,Str "like",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "I",Space,Str "think",Space,Str "this",Space,Str "is",Space,Str "how",Space,Str "most",Space,Str "people",Space,Str "do",Space,Str "block",Space,Str "quotes",Space,Str "in",Space,Str "their",Space,Str "documents."]] ,Para [Str "And",Space,Str "back",Space,Str "to",Space,Str "the",Space,Str "normal",Space,Str "style."]] pandoc-1.19.2.4/tests/docx/char_styles.native0000644000000000000000000000122313155240142017222 0ustar0000000000000000[Para [Emph [Str "This",Space,Str "is",Space,Str "all",Space,Str "in",Space,Str "an"],Space,Emph [Strong [Str "italic",Space,Str "style"],Str "."]] ,Para [Emph [Str "This",Space,Str "is",Space,Str "an",Space,Str "italic"],Space,Str "style",Space,Emph [Str "with",Space,Str "some"],Space,Str "words",Space,Emph [Str "unitalicized."]] ,Para [Strong [Str "This",Space,Str "is",Space,Str "all",Space,Str "in",Space,Str "a",Space,Emph [Str "strong",Space,Str "style"],Str "."]] ,Para [Strong [Str "This",Space,Str "is",Space,Str "a",Space,Str "strong"],Space,Str "style",Space,Strong [Str "with",Space,Str "some"],Space,Str "words",Space,Strong [Str "ubolded."]]] pandoc-1.19.2.4/tests/docx/codeblock.native0000644000000000000000000000044313155240142016632 0ustar0000000000000000[Para [Str "This",Space,Str "is",Space,Str "some",Space,Str "code:"] ,CodeBlock ("",[],[]) "readDocx :: ReaderOptions\n -> B.ByteString\n -> Pandoc" ,Para [Str "from",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "the",Space,Str "docx",Space,Str "reader."]] pandoc-1.19.2.4/tests/docx/comments.native0000644000000000000000000000307413155240142016535 0ustar0000000000000000[Para [Str "I",Space,Str "want",Space,Span ("",["comment-start"],[("id","0"),("author","Jesse Rosenthal"),("date","2016-05-09T16:13:00Z")]) [Str "I",Space,Str "left",Space,Str "a",Space,Str "comment."],Str "some",Space,Str "text",Space,Str "to",Space,Str "have",Space,Str "a",Space,Str "comment",Space,Span ("",["comment-end"],[("id","0")]) [],Str "on",Space,Str "it."] ,Para [Str "This",Space,Str "is",Space,Span ("",["comment-start"],[("id","1"),("author","Jesse Rosenthal"),("date","2016-05-09T16:13:00Z")]) [Str "A",Space,Str "comment",Space,Str "across",Space,Str "paragraphs."],Str "a",Space,Str "new",Space,Str "paragraph."] ,Para [Str "And",Space,Str "so",Span ("",["comment-end"],[("id","1")]) [],Space,Str "is",Space,Str "this."] ,Para [Str "One",Space,Span ("",["comment-start"],[("id","2"),("author","Jesse Rosenthal"),("date","2016-05-09T16:14:00Z")]) [Str "This",Space,Str "one",Space,Str "has",Space,Str "multiple",Space,Str "paragraphs.",Space,Str "\182",Space,Str "See?"],Str "more",Span ("",["comment-end"],[("id","2")]) [],Str ".",Space,Str "And",Space,Str "this",Space,Str "is",Space,Str "one",Space,Str "with",Space,Str "a",Space,Span ("",["comment-start"],[("id","3"),("author","Jesse Rosenthal"),("date","2016-06-22T14:35:00Z")]) [Str "Do",Space,Str "something."],Span ("",["comment-start"],[("id","4"),("author","Jesse Rosenthal"),("date","2016-06-22T14:36:00Z")]) [Str "Do",Space,Str "something",Space,Str "else."],Str "comment",Space,Str "in",Space,Str "a",Space,Str "comment",Span ("",["comment-end"],[("id","3")]) [Span ("",["comment-end"],[("id","4")]) []],Str "."]] pandoc-1.19.2.4/tests/docx/comments_no_comments.native0000644000000000000000000000100713155240142021130 0ustar0000000000000000[Para [Str "I",Space,Str "want",Space,Str "some",Space,Str "text",Space,Str "to",Space,Str "have",Space,Str "a",Space,Str "comment",Space,Str "on",Space,Str "it."] ,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "new",Space,Str "paragraph."] ,Para [Str "And",Space,Str "so",Space,Str "is",Space,Str "this."] ,Para [Str "One",Space,Str "more.",Space,Str "And",Space,Str "this",Space,Str "is",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "comment",Space,Str "in",Space,Str "a",Space,Str "comment."]] pandoc-1.19.2.4/tests/docx/custom-style-roundtrip-end.native0000644000000000000000000000102413155240142022141 0ustar0000000000000000[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "custom-styles."] ,Para [Str "Here",Space,Str "is",Space,Str "something",Space,Emph [Str "emphasized"],Str ".",Space,Str "And",Space,Str "here",Space,Str "is",Space,Str "something",Space,Strong [Str "strong"],Str "."] ,BlockQuote [Para [Str "One",Space,Str "paragraph",Space,Str "of",Space,Str "text."] ,Para [Str "And",Space,Str "another",Space,Str "paragraph",Space,Str "of",Space,Emph [Str "really",Space,Str "cool"],Space,Str "text."]]] pandoc-1.19.2.4/tests/docx/custom-style-roundtrip-start.native0000644000000000000000000000126513155240142022537 0ustar0000000000000000[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "custom-styles."] ,Para [Str "Here",Space,Str "is",Space,Str "something",Space,Span ("",[],[("custom-style","Emphatic")]) [Str "emphasized"],Str ".",Space,Str "And",SoftBreak,Str "here",Space,Str "is",Space,Str "something",Space,Span ("",[],[("custom-style","Strengthened")]) [Str "strong"],Str "."] ,Div ("",[],[("custom-style","My Block Style")]) [Para [Str "One",Space,Str "paragraph",Space,Str "of",Space,Str "text."] ,Para [Str "And",Space,Str "another",Space,Str "paragraph",Space,Str "of",Space,Span ("",[],[("custom-style","Emphatic")]) [Str "really",SoftBreak,Str "cool"],Space,Str "text."]]] pandoc-1.19.2.4/tests/docx/deep_normalize.native0000644000000000000000000000112013155240142017673 0ustar0000000000000000[OrderedList (1,Decimal,OneParen) [[Para [Str "This",Space,Str "is",Space,Str "at",Space,Str "the",Space,Str "first",Space,Str "level"] ,OrderedList (1,LowerAlpha,DefaultDelim) [[Para [Str "This",Space,Str "is",Space,Str "at",Space,Str "the",Space,Str "second",Space,Str "level"] ,OrderedList (1,LowerRoman,DefaultDelim) [[Para [Str "This",Space,Str "is",Space,Emph [Str "at",Space,Strong [Str "the",Space,Str "third",Space,Str "level"],Str ",",Space,Str "and",Space,Str "I",Space,Str "want",Space,Str "to"],Space,Str "test",Space,Str "normalization",Space,Str "here."]]]]]]]] pandoc-1.19.2.4/tests/docx/definition_list.native0000644000000000000000000000061513155240142020071 0ustar0000000000000000[DefinitionList [([Str "Term",Space,Str "1"], [[Para [Str "Definition",Space,Str "1"]]]) ,([Str "Term",Space,Str "2",Space,Str "with",Space,Emph [Str "inline",Space,Str "markup"]], [[Para [Str "Definition",Space,Str "2"] ,CodeBlock ("",[],[]) "{ some code, part of Definition 2 }" ,Para [Str "Third",Space,Str "paragraph",Space,Str "of",Space,Str "definition",Space,Str "2."]]])]] pandoc-1.19.2.4/tests/docx/drop_cap.native0000644000000000000000000000033613155240142016475 0ustar0000000000000000[Para [Str "Drop",Space,Str "cap."] ,Para [Str "Next",Space,Str "paragraph."] ,Para [Str "Drop",Space,Str "cap",Space,Str "in",Space,Str "margin."] ,Para [Str "Drop",Space,Str "cap",Space,Str "(not",Space,Str "really)."]] pandoc-1.19.2.4/tests/docx/dummy_item_after_list_item.native0000644000000000000000000000015313155240142022306 0ustar0000000000000000[OrderedList (1,Decimal,Period) [[Para [Str "One"] ,Para [Str "Two",LineBreak,LineBreak,Str "Three"]]]] pandoc-1.19.2.4/tests/docx/dummy_item_after_paragraph.native0000644000000000000000000000061113155240142022261 0ustar0000000000000000[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"]] pandoc-1.19.2.4/tests/docx/enumerated_headings.native0000644000000000000000000000023313155240142020675 0ustar0000000000000000[Header 1 ("h1",[],[]) [Str "H1"] ,Header 2 ("h2",[],[]) [Str "H2"] ,Header 3 ("h3",[],[]) [Str "H3"] ,Para [Str "And",Space,Str "some",Space,Str "text"]] pandoc-1.19.2.4/tests/docx/german_styled_lists.native0000644000000000000000000000060213155240142020755 0ustar0000000000000000[BulletList [[Para [Str "One",Space,Str "level",Space,Str "of",Space,Str "the",Space,Str "list."]] ,[Para [Str "Second",Space,Str "level",Space,Str "of",Space,Str "the",Space,Str "list."] ,BulletList [[Para [Str "Next",Space,Str "level",Space,Str "of",Space,Str "the",Space,Str "list"]]]] ,[Para [Str "Back",Space,Str "to",Space,Str "the",Space,Str "top",Space,Str "level."]]]] pandoc-1.19.2.4/tests/docx/hanging_indent.native0000644000000000000000000000100713155240142017656 0ustar0000000000000000[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "hanging",Space,Str "indent,",Space,Str "with",Space,Str "the",Space,Str "left",Space,Str "side",Space,Str "set",Space,Str "to",Space,Str "the",Space,Str "left",Space,Str "margin,",Space,Str "and",Space,Str "it",Space,Str "wraps",Space,Str "around",Space,Str "the",Space,Str "line."] ,BlockQuote [Para [Str "Five",Space,Str "years",Space,Str "have",Space,Str "passed,",Space,Str "five",Space,Str "summers",Space,Str "with",Space,Str "the",Space,Str "length"]]] pandoc-1.19.2.4/tests/docx/headers.native0000644000000000000000000000202213155240142016313 0ustar0000000000000000[Header 1 ("a-test-of-headers",[],[]) [Str "A",Space,Str "Test",Space,Str "of",Space,Str "Headers"] ,Header 2 ("second-level",[],[]) [Str "Second",Space,Str "Level"] ,Para [Str "Some",Space,Str "plain",Space,Str "text."] ,Header 3 ("third-level",[],[]) [Str "Third",Space,Str "level"] ,Para [Str "Some",Space,Str "more",Space,Str "plain",Space,Str "text."] ,Header 4 ("fourth-level",[],[]) [Str "Fourth",Space,Str "level"] ,Para [Str "Some",Space,Str "more",Space,Str "plain",Space,Str "text."] ,Header 5 ("fifth-level",[],[]) [Str "Fifth",Space,Str "level"] ,Para [Str "Some",Space,Str "more",Space,Str "plain",Space,Str "text."] ,Header 6 ("sixth-level",[],[]) [Str "Sixth",Space,Str "level"] ,Para [Str "Some",Space,Str "more",Space,Str "plain",Space,Str "text."] ,Para [Str "Seventh",Space,Str "level"] ,Para [Str "Since",Space,Str "no",Space,Str "Heading",Space,Str "7",Space,Str "style",Space,Str "exists",Space,Str "in",Space,Str "styles.xml,",Space,Str "this",Space,Str "gets",Space,Str "converted",Space,Str "to",Space,Str "Span."]] pandoc-1.19.2.4/tests/docx/i18n_blocks.native0000644000000000000000000000101013155240142017010 0ustar0000000000000000[Header 1 ("this-is-heading-1",[],[]) [Str "This",Space,Str "is",Space,Str "Heading",Space,Str "1"] ,Header 2 ("this-is-heading-2",[],[]) [Str "This",Space,Str "is",Space,Str "Heading",Space,Str "2"] ,BlockQuote [Para [Str "This",Space,Str "is",Space,Str "Quote"] ,Para [Str "This",Space,Str "is",Space,Str "Block",Space,Str "Text"]] ,BulletList [[Para [Str "This",Space,Str "is",Space,Str "list",Space,Str "item",Space,Str "1"]] ,[Para [Str "This",Space,Str "is",Space,Str "list",Space,Str "item",Space,Str "2"]]]] pandoc-1.19.2.4/tests/docx/image_no_embed.native0000644000000000000000000000044313155240142017617 0ustar0000000000000000[Para [Str "An",Space,Str "image:"] ,Para [Image ("",[],[("width","6.5in"),("height","5.508333333333334in")]) [Str "He",Space,Str "realizes",Space,Str "he's",Space,Str "making",Space,Str "the",Space,Str "file-size",Space,Str "too",Space,Str "big."] ("media/image1.jpg","An unhappy fish.")]] pandoc-1.19.2.4/tests/docx/image_no_embed_writer.native0000644000000000000000000000046213155240142021214 0ustar0000000000000000[Para [Str "An",Space,Str "image:"] ,Para [Image ("",[],[("width","0.4166666666666667in"),("height","0.4166666666666667in")]) [Str "He",Space,Str "realizes",Space,Str "he's",Space,Str "making",Space,Str "the",Space,Str "file-size",Space,Str "too",Space,Str "big."] ("media/rId25.jpg","An unhappy fish.")]] pandoc-1.19.2.4/tests/docx/image_vml.native0000644000000000000000000000032413155240142016643 0ustar0000000000000000[Header 1 ("vml-image",[],[]) [Strong [Str "VML",Space,Str "Image"]] ,BlockQuote [Para [Str "It",Space,Str "should",Space,Str "follow",Space,Str "below:"] ,Para [Image ("",[],[]) [] ("media/image4.jpeg","")]]] pandoc-1.19.2.4/tests/docx/inline_code.native0000644000000000000000000000026213155240142017154 0ustar0000000000000000[Para [Str "This",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "of",Space,Code ("",[],[]) "inline code",Space,Str "with",Space,Str "three",Space,Str "spaces."]] pandoc-1.19.2.4/tests/docx/inline_formatting.native0000644000000000000000000000140113155240142020410 0ustar0000000000000000[Para [Str "Regular",Space,Str "text",Space,Emph [Str "italics"],Space,Strong [Str "bold",Space,Emph [Str "bold",Space,Str "italics"]],Str "."] ,Para [Str "This",Space,Str "is",Space,SmallCaps [Str "Small",Space,Str "Caps"],Str ",",Space,Str "and",Space,Str "this",Space,Str "is",Space,Strikeout [Str "strikethrough"],Str "."] ,Para [Str "Some",Space,Str "people",Space,Str "use",Space,Emph [Str "single",Space,Str "underlines",Space,Str "for",Space,Emph [Str "emphasis"]],Str "."] ,Para [Str "Above",Space,Str "the",Space,Str "line",Space,Str "is",Space,Superscript [Str "superscript"],Space,Str "and",Space,Str "below",Space,Str "the",Space,Str "line",Space,Str "is",Space,Subscript [Str "subscript"],Str "."] ,Para [Str "A",Space,Str "line",LineBreak,Str "break."]] pandoc-1.19.2.4/tests/docx/inline_formatting_writer.native0000644000000000000000000000137213155240142022013 0ustar0000000000000000[Para [Str "Regular",Space,Str "text",Space,Emph [Str "italics"],Space,Strong [Str "bold",Space,Emph [Str "bold",Space,Str "italics"]],Str "."] ,Para [Str "This",Space,Str "is",Space,SmallCaps [Str "Small",Space,Str "Caps"],Str ",",Space,Str "and",Space,Str "this",Space,Str "is",Space,Strikeout [Str "strikethrough"],Str "."] ,Para [Str "Some",Space,Str "people",Space,Str "use",Space,Emph [Str "single",Space,Str "underlines",Space,Str "for",Space,Str "emphasis"],Str "."] ,Para [Str "Above",Space,Str "the",Space,Str "line",Space,Str "is",Space,Superscript [Str "superscript"],Space,Str "and",Space,Str "below",Space,Str "the",Space,Str "line",Space,Str "is",Space,Subscript [Str "subscript"],Str "."] ,Para [Str "A",Space,Str "line",LineBreak,Str "break."]] pandoc-1.19.2.4/tests/docx/inline_images.native0000644000000000000000000000152313155240142017510 0ustar0000000000000000[Para [Str "This",Space,Str "picture",Space,Image ("",[],[("width","0.8888888888888888in"),("height","0.8888888888888888in")]) [Str "This",Space,Str "one",Space,Str "is",Space,Str "green",Space,Str "and",Space,Str "looks",Space,Str "like",Space,Str "Sideshow",Space,Str "Bob."] ("media/image1.jpg","First identicon"),Space,Str "is",Space,Str "an",Space,Str "identicon."] ,Para [Str "Here",Space,Str "is",Space,Link ("",[],[]) [Str "one",Space,Image ("",[],[("width","0.8888888888888888in"),("height","0.8888888888888888in")]) [Str "This",Space,Str "one",Space,Str "is",Space,Str "reddish,",Space,Str "and",Space,Str "looks",Space,Str "like",Space,Str "a",Space,Str "heart",Space,Str "that",Space,Str "has",Space,Str "leaked",Space,Str "out."] ("media/image2.jpg","Second identicon"),Space,Str "that"] ("http://www.google.com",""),Space,Str "links."]] pandoc-1.19.2.4/tests/docx/inline_images_writer.native0000644000000000000000000000071013155240142021101 0ustar0000000000000000[Para [Str "This",Space,Str "picture",Space,Image ("",[],[("width","0.4166666666666667in"),("height","0.4166666666666667in")]) [] ("media/rId26.jpg",""),Space,Str "is",Space,Str "an",Space,Str "identicon."] ,Para [Str "Here",Space,Str "is",Space,Link ("",[],[]) [Str "one",Space,Image ("",[],[("width","0.4166666666666667in"),("height","0.4166666666666667in")]) [] ("media/rId26.jpg",""),Space,Str "that"] ("http://www.google.com",""),Space,Str "links."]] pandoc-1.19.2.4/tests/docx/link_in_notes.native0000644000000000000000000000024313155240142017536 0ustar0000000000000000[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Note [Para [Link ("",[],[]) [Str "http://wikipedia.org/"] ("http://wikipedia.org/","")]],Str "."]] pandoc-1.19.2.4/tests/docx/links.native0000644000000000000000000000221213155240142016021 0ustar0000000000000000[Header 2 ("an-internal-link-and-an-external-link",[],[]) [Str "An",Space,Str "internal",Space,Str "link",Space,Str "and",Space,Str "an",Space,Str "external",Space,Str "link"] ,Para [Str "An",Space,Link ("",[],[]) [Str "external",Space,Str "link"] ("http://google.com",""),Space,Str "to",Space,Str "a",Space,Str "popular",Space,Str "website."] ,Para [Str "An",Space,Link ("",[],[]) [Str "external",Space,Str "link"] ("http://pandoc.org/README.html#synopsis",""),Space,Str "to",Space,Str "a",Space,Str "website",Space,Str "with",Space,Str "an",Space,Str "anchor."] ,Para [Str "An",Space,Link ("",[],[]) [Str "internal",Space,Str "link"] ("#a-section-for-testing-link-targets",""),Space,Str "to",Space,Str "a",Space,Str "section",Space,Str "header."] ,Para [Str "An",Space,Link ("",[],[]) [Str "internal",Space,Str "link"] ("#my_bookmark",""),Space,Str "to",Space,Str "a",Space,Str "bookmark."] ,Header 2 ("a-section-for-testing-link-targets",[],[]) [Str "A",Space,Str "section",Space,Str "for",Space,Str "testing",Space,Str "link",Space,Str "targets"] ,Para [Str "A",Space,Str "bookmark",Space,Str "right",Space,Span ("my_bookmark",["anchor"],[]) [],Str "here"]] pandoc-1.19.2.4/tests/docx/links_writer.native0000644000000000000000000000203413155240142017417 0ustar0000000000000000[Header 2 ("an-internal-link-and-an-external-link",[],[]) [Str "An",Space,Str "internal",Space,Str "link",Space,Str "and",Space,Str "an",Space,Str "external",Space,Str "link"] ,Para [Str "An",Space,Link ("",[],[]) [Str "external",Space,Str "link"] ("http://google.com",""),Space,Str "to",Space,Str "a",Space,Str "popular",Space,Str "website."] ,Para [Str "An",Space,Link ("",[],[]) [Str "external",Space,Str "link"] ("http://pandoc.org/README.html#synopsis",""),Space,Str "to",Space,Str "a",Space,Str "website",Space,Str "with",Space,Str "an",Space,Str "anchor."] ,Para [Str "An",Space,Link ("",[],[]) [Str "internal",Space,Str "link"] ("#a-section-for-testing-link-targets",""),Space,Str "to",Space,Str "a",Space,Str "section",Space,Str "header."] ,Para [Str "An",Space,Link ("",[],[]) [Str "internal",Space,Str "link"] ("#my_bookmark",""),Space,Str "to",Space,Str "a",Space,Str "bookmark."] ,Header 2 ("a-section-for-testing-link-targets",[],[]) [Str "A",Space,Str "section",Space,Str "for",Space,Str "testing",Space,Str "link",Space,Str "targets"]] pandoc-1.19.2.4/tests/docx/lists.native0000644000000000000000000000115113155240142016040 0ustar0000000000000000[Header 2 ("some-nested-lists",[],[]) [Str "Some",Space,Str "nested",Space,Str "lists"] ,OrderedList (1,Decimal,Period) [[Para [Str "one"]] ,[Para [Str "two"] ,OrderedList (1,LowerAlpha,DefaultDelim) [[Para [Str "a"]] ,[Para [Str "b"]]]]] ,BulletList [[Para [Str "one"]] ,[Para [Str "two"] ,BulletList [[Para [Str "three"] ,BulletList [[Para [Str "four"] ,Para [Str "Sub",Space,Str "paragraph"]]]]]] ,[Para [Str "Same",Space,Str "list"]]] ,BulletList [[Para [Str "Different",Space,Str "list",Space,Str "adjacent",Space,Str "to",Space,Str "the",Space,Str "one",Space,Str "above."]]]] pandoc-1.19.2.4/tests/docx/lists_writer.native0000644000000000000000000000107313155240142017437 0ustar0000000000000000[Header 2 ("some-nested-lists",[],[]) [Str "Some",Space,Str "nested",Space,Str "lists"] ,OrderedList (1,Decimal,Period) [[Para [Str "one"]] ,[Para [Str "two"] ,OrderedList (1,LowerAlpha,DefaultDelim) [[Para [Str "a"]] ,[Para [Str "b"]]]]] ,BulletList [[Para [Str "one"]] ,[Para [Str "two"] ,BulletList [[Para [Str "three"] ,BulletList [[Para [Str "four"]]]]]] ,[Para [Str "Same",Space,Str "list"]]] ,BulletList [[Para [Str "Different",Space,Str "list",Space,Str "adjacent",Space,Str "to",Space,Str "the",Space,Str "one",Space,Str "above."]]]] pandoc-1.19.2.4/tests/docx/metadata.native0000644000000000000000000000152513155240142016467 0ustar0000000000000000Pandoc (Meta {unMeta = fromList [("abstract",MetaInlines [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "how",Space,Str "this",Space,Str "all",Space,Str "works.",Space,Str "I\8217ve",Space,Str "skipped",Space,Str "lines",Space,Str "here,",Space,Str "which",Space,Str "pandoc",Space,Str "doesn\8217t",Space,Str "do,",Space,Str "but",Space,Str "which",Space,Str "shouldn\8217t",Space,Str "make",Space,Str "a",Space,Str "difference."]),("author",MetaList [MetaInlines [Str "Mary",Space,Str "Ann",Space,Str "Evans"],MetaInlines [Str "Aurore",Space,Str "Dupin"]]),("date",MetaInlines [Str "July",Space,Str "28,",Space,Str "2014"]),("title",MetaInlines [Str "This",Space,Str "Is",Space,Str "the",Space,Str "Title"])]}) [Para [Str "And",Space,Str "now",Space,Str "this",Space,Str "is",Space,Str "normal",Space,Str "text."]] pandoc-1.19.2.4/tests/docx/metadata_after_normal.native0000644000000000000000000000271213155240142021217 0ustar0000000000000000Pandoc (Meta {unMeta = fromList [("abstract",MetaInlines [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "how",Space,Str "this",Space,Str "all",Space,Str "works.",Space,Str "I\8217ve",Space,Str "skipped",Space,Str "lines",Space,Str "here,",Space,Str "which",Space,Str "pandoc",Space,Str "doesn\8217t",Space,Str "do,",Space,Str "but",Space,Str "which",Space,Str "shouldn\8217t",Space,Str "make",Space,Str "a",Space,Str "difference."]),("author",MetaList [MetaInlines [Str "Mary",Space,Str "Ann",Space,Str "Evans"],MetaInlines [Str "Aurore",Space,Str "Dupin"]]),("date",MetaInlines [Str "July",Space,Str "28,",Space,Str "2014"]),("title",MetaInlines [Str "This",Space,Str "Is",Space,Str "the",Space,Str "Title"])]}) [Para [Str "And",Space,Str "now",Space,Str "this",Space,Str "is",Space,Str "normal",Space,Str "text."] ,Para [Str "This",Space,Str "Is",Space,Str "the",Space,Str "Title"] ,Para [Str "Mary",Space,Str "Ann",Space,Str "Evans"] ,Para [Str "Aurore",Space,Str "Dupin"] ,Para [Str "July",Space,Str "28,",Space,Str "2014"] ,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "test",Space,Str "of",Space,Str "how",Space,Str "this",Space,Str "all",Space,Str "works.",Space,Str "I\8217ve",Space,Str "skipped",Space,Str "lines",Space,Str "here,",Space,Str "which",Space,Str "pandoc",Space,Str "doesn\8217t",Space,Str "do,",Space,Str "but",Space,Str "which",Space,Str "shouldn\8217t",Space,Str "make",Space,Str "a",Space,Str "difference."]] pandoc-1.19.2.4/tests/docx/nested_anchors_in_header.native0000644000000000000000000000234613155240142021706 0ustar0000000000000000[Header 1 ("short-instructions",[],[]) [Str "Short",Space,Str "instructions"] ,Para [Link ("",[],[]) [Str "Open",Space,Str "remote",Space,Str "folder"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-opening","")] ,Para [Str "Do",Space,Str "staff"] ,Para [Link ("",[],[]) [Str "Close",Space,Str "remote",Space,Str "folder"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-closing","")] ,Header 1 ("some-instructions",[],[]) [Str "Some",Space,Str "instructions"] ,Para [Str "Lines"] ,Header 2 ("remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-opening",[],[]) [Str "Remote",Space,Str "folder",Space,Str "or",Space,Str "longlonglonglonglong",Space,Str "file",Space,Str "with",Space,Str "manymanymanymany",Space,Str "letters",Space,Str "inside",Space,Str "opening"] ,Para [Str "Open",Space,Str "folder"] ,Header 2 ("remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-closing",[],[]) [Str "Remote",Space,Str "folder",Space,Str "or",Space,Str "longlonglonglonglong",Space,Str "file",Space,Str "with",Space,Str "manymanymanymany",Space,Str "letters",Space,Str "inside",Space,Str "closing"] ,Para [Str "Close",Space,Str "folder"]] pandoc-1.19.2.4/tests/docx/normalize.native0000644000000000000000000000026713155240142016711 0ustar0000000000000000[Para [Str "These",Space,Str "are",Space,Str "different",Space,Str "fonts."] ,Para [Strong [Str "These",Space,Emph [Str "are",Space,Strikeout [Str "different"]],Space,Str "fonts."]]] pandoc-1.19.2.4/tests/docx/notes.native0000644000000000000000000000054613155240142016041 0ustar0000000000000000[Header 2 ("a-footnote",[],[]) [Str "A",Space,Str "footnote"] ,Para [Str "Test",Space,Str "footnote.",Note [Para [Str "My",Space,Str "note."]],Space,Str "Test",Space,Str "endnote.",Note [Para [Str "This",Space,Str "is",Space,Str "an",Space,Str "endnote",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]]]] pandoc-1.19.2.4/tests/docx/numbered_header.native0000644000000000000000000000013313155240142020012 0ustar0000000000000000[Header 1 ("a-numbered-header.",[],[]) [Str "A",Space,Str "Numbered",Space,Str "Header."]] pandoc-1.19.2.4/tests/docx/special_punctuation.native0000644000000000000000000000017613155240142020761 0ustar0000000000000000[Para [Str "Soft",Space,Str "hyphen:",Space,Str "[\173]"] ,Para [Str "Non-breaking",Space,Str "hyphen:",Space,Str "[\8209]"]] pandoc-1.19.2.4/tests/docx/table_one_row.native0000644000000000000000000000023313155240142017521 0ustar0000000000000000[Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] [[] ,[] ,[]] [[[Plain [Str "One"]] ,[Plain [Str "Row"]] ,[Plain [Str "Table"]]]]] pandoc-1.19.2.4/tests/docx/table_with_list_cell.native0000644000000000000000000000066713155240142021071 0ustar0000000000000000[Table [] [AlignDefault,AlignDefault] [0.0,0.0] [[Plain [Str "Cell",Space,Str "with",Space,Str "text"]] ,[Plain [Str "Cell",Space,Str "with",Space,Str "text"]]] [[[BulletList [[Para [Str "Cell",Space,Str "with"]] ,[Para [Str "A"]] ,[Para [Str "Bullet",Space,Str "list"]]]] ,[OrderedList (1,Decimal,Period) [[Para [Str "Cell",Space,Str "with"]] ,[Para [Str "A"]] ,[Para [Str "Numbered",Space,Str "list."]]]]]]] pandoc-1.19.2.4/tests/docx/tables.native0000644000000000000000000000233413155240142016160 0ustar0000000000000000[Header 2 ("a-table-with-and-without-a-header-row",[],[]) [Str "A",Space,Str "table,",Space,Str "with",Space,Str "and",Space,Str "without",Space,Str "a",Space,Str "header",Space,Str "row"] ,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0,0.0] [[Plain [Str "Name"]] ,[Plain [Str "Game"]] ,[Plain [Str "Fame"]] ,[Plain [Str "Blame"]]] [[[Plain [Str "Lebron",Space,Str "James"]] ,[Plain [Str "Basketball"]] ,[Plain [Str "Very",Space,Str "High"]] ,[Plain [Str "Leaving",Space,Str "Cleveland"]]] ,[[Plain [Str "Ryan",Space,Str "Braun"]] ,[Plain [Str "Baseball"]] ,[Plain [Str "Moderate"]] ,[Plain [Str "Steroids"]]] ,[[Plain [Str "Russell",Space,Str "Wilson"]] ,[Plain [Str "Football"]] ,[Plain [Str "High"]] ,[Plain [Str "Tacky",Space,Str "uniform"]]]] ,Table [] [AlignDefault,AlignDefault] [0.0,0.0] [[] ,[]] [[[Plain [Str "Sinple"]] ,[Plain [Str "Table"]]] ,[[Plain [Str "Without"]] ,[Plain [Str "Header"]]]] ,Table [] [AlignDefault,AlignDefault] [0.0,0.0] [[] ,[]] [[[Para [Str "Simple"] ,Para [Str "Multiparagraph"]] ,[Para [Str "Table"] ,Para [Str "Full"]]] ,[[Para [Str "Of"] ,Para [Str "Paragraphs"]] ,[Para [Str "In",Space,Str "each"] ,Para [Str "Cell."]]]]] pandoc-1.19.2.4/tests/docx/tabs.native0000644000000000000000000000022613155240142015635 0ustar0000000000000000[Para [Str "Some",Space,Str "text",Space,Str "separated",Space,Str "by",Space,Str "a",Space,Str "tab."] ,Para [Str "Tab-indented",Space,Str "text."]] pandoc-1.19.2.4/tests/docx/track_changes_deletion_accept.native0000644000000000000000000000016713155240142022706 0ustar0000000000000000[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "text",Space,Str "with",Space,Str "a",Space,Str "deletion."]] pandoc-1.19.2.4/tests/docx/track_changes_deletion_all.native0000644000000000000000000000037513155240142022220 0ustar0000000000000000[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "text",Space,Str "with",Space,Str "a",Span ("",["deletion"],[("author","eng-dept"),("date","2014-06-25T10:42:00Z")]) [Str "n",Space,Str "excessively",Space,Str "modified"],Space,Str "deletion."]] pandoc-1.19.2.4/tests/docx/track_changes_deletion_reject.native0000644000000000000000000000024513155240142022720 0ustar0000000000000000[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "text",Space,Str "with",Space,Str "an",Space,Str "excessively",Space,Str "modified",Space,Str "deletion."]] pandoc-1.19.2.4/tests/docx/track_changes_insertion_accept.native0000644000000000000000000000022013155240142023103 0ustar0000000000000000[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "text",Space,Str "with",Space,Str "two",Space,Str "exciting",Space,Str "insertions."]] pandoc-1.19.2.4/tests/docx/track_changes_insertion_all.native0000644000000000000000000000034213155240142022421 0ustar0000000000000000[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "text",Space,Str "with",Space,Span ("",["insertion"],[("author","eng-dept"),("date","2014-06-25T10:40:00Z")]) [Str "two",Space,Str "exciting"],Space,Str "insertions."]] pandoc-1.19.2.4/tests/docx/track_changes_insertion_reject.native0000644000000000000000000000015313155240142023125 0ustar0000000000000000[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "text",Space,Str "with",Space,Str "insertions."]] pandoc-1.19.2.4/tests/docx/track_changes_move_accept.native0000644000000000000000000000042013155240142022041 0ustar0000000000000000[Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "text."] ,Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "text",Space,Str "to",Space,Str "be",Space,Str "moved."] ,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "more",Space,Str "text."]] pandoc-1.19.2.4/tests/docx/track_changes_move_all.native0000644000000000000000000000106513155240142021360 0ustar0000000000000000[Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "text."] ,Para [Span ("",["insertion"],[("author","Jesse Rosenthal"),("date","2016-04-16T08:20:00Z")]) [Str "Here",Space,Str "is",Space,Str "the",Space,Str "text",Space,Str "to",Space,Str "be",Space,Str "moved."]] ,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "more",Space,Str "text."] ,Para [Span ("",["deletion"],[("author","Jesse Rosenthal"),("date","2016-04-16T08:20:00Z")]) [Str "Here",Space,Str "is",Space,Str "the",Space,Str "text",Space,Str "to",Space,Str "be",Space,Str "moved."]]] pandoc-1.19.2.4/tests/docx/track_changes_move_reject.native0000644000000000000000000000042013155240142022056 0ustar0000000000000000[Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "text."] ,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "more",Space,Str "text."] ,Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "text",Space,Str "to",Space,Str "be",Space,Str "moved."]] pandoc-1.19.2.4/tests/docx/trailing_spaces_in_formatting.native0000644000000000000000000000020713155240142022772 0ustar0000000000000000[Para [Str "Turn",Space,Str "my",Space,Emph [Str "formatting"],Space,Str "off",Space,Str "after",Space,Str "the",Space,Str "spaces."]] pandoc-1.19.2.4/tests/docx/unicode.native0000644000000000000000000000016513155240142016334 0ustar0000000000000000[Para [Str "Hello,",Space,Str "\19990\30028.",Space,Str "This",Space,Str "costs",Space,Str "\8364\&10.\8744\8744("]] pandoc-1.19.2.4/tests/docx/verbatim_subsuper.native0000644000000000000000000000061113155240142020443 0ustar0000000000000000[Para [Str "m",Superscript [Str "2"]] ,Para [Str "m",Superscript [Code ("",[],[]) "2"]] ,Para [Code ("",[],[]) "m",Superscript [Str "2"]] ,Para [Code ("",[],[]) "m",Superscript [Code ("",[],[]) "2"]] ,Para [Str "m",Subscript [Str "2"]] ,Para [Str "m",Subscript [Code ("",[],[]) "2"]] ,Para [Code ("",[],[]) "m",Subscript [Str "2"]] ,Para [Code ("",[],[]) "m",Subscript [Code ("",[],[]) "2"]]] pandoc-1.19.2.4/tests/epub/features.epub0000644000000000000000000020150213155240142016165 0ustar0000000000000000PK 7h9EEPUB/UT )$TE$Tux PK 1Q E EPUB/css/UT 6S$Tux PKXC5EPUB/css/base.cssUT V[iR$Tux S[0+"[V 6`x"3ɽ4o%v%ӴWT3:>sxL`{.{I2 -*4PtW~|[2eI~?<Ǔ%1 n!6 a dX-֌:hϖ,)+`F2 ElY S6 #zFGϚW2H5*]&5ň\{phVhF; =wd:36-H=1Υ+(œC%$k3% %Bj ;&TUߐ6_ft6-I=2VË)rAWTgXXھ,㶅t[iٞU.ui/lPg`5#l|%Jͧeq9/$^)EH<#X {XnFtxkPTm~ Bͥ K.):/PKDX~EPUB/css/svg.cssUT XS$Tux ]A EbRc (F6 Ķ .wW:TkcؕGg88i흿G:2O.ƃRڶ>Zh72%860‚%sPGfxPKK3DnCeEPUB/css/math.cssUT >1R$Tux uMN0FV$"5DjM±ElGTwhFx3s|$Oծbo2ĐR!c]i|˺]}dx7Ӥ,hN>y~$F r޴CM4%Wي%6]oݽdheBh+GT|ݙ,VA_ IV߲T8-"~>}IBl'PK h9E EPUB/xhtml/UT $T$Tux PKXCjN2=g !EPUB/xhtml/nav.xhtmlUT V[iR$Tux Z[S8~nj^vg\ hw˔ }Tl%b[IN~$;$vlYsѧGKe[sib9YoG={<? ŅIj]vǏcA$gԍzl"GXB7#`7HsAd*'O'#DZHD’Yڎ7{n1ь/3KD?O`c!5$! 5O % ؞|*Q5ʜk<‰Tk6V/( 2xdc-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"VǨMaIJ{쮸 V@p^AtzۖO 4'uҝu9Mv?Av*r|P.DŽu~|ZbF! 3-C6 I:O~YJ$_@X xݲš+(g>c quY Nkc 5 %ۦ>dp ^U넛-*a}5Zπp&0?[ﯳ-I QDl}jmj6k/>\PZf-_afb5ڱq 0Ήaro '^8--ozXlJ;v 0x[u ]K 3b7=I]MBϹtxqg n> c W LzaoArPK 1Q E META-INF/UT 6S$Tux PKXC\ˬMETA-INF/container.xmlUT V[iR$Tux UA 0E=Eѝkz1j0 M*z{JͣNCV/װi gLxNƁ`0LvF"q+n쉳ycf>GS(A$w>PzFuce|;:*Ze~F10O9.?"c<)^PK XCoa,mimetypeUT V[iR$Tux application/epub+zipPK 7h9EAEPUB/UT)$Tux PK 1Q E A?EPUB/css/UT6Sux PKXC5EPUB/css/base.cssUTV[iRux PKDX~EPUB/css/svg.cssUTXSux PKK3DnCepEPUB/css/math.cssUT>1Rux PK h9E AEPUB/xhtml/UT$Tux PKXCjN2=g !EPUB/xhtml/nav.xhtmlUTV[iRux PK|g9E9s T# EPUB/xhtml/content-mathml-001.xhtmlUT$Tux PKh9E #EPUB/xhtml/content-switch-001.xhtmlUT$Tux PKXC_ EPUB/xhtml/front.xhtmlUTV[iRux PK 1Q E AEPUB/img/UT6Sux PKXC6%L',4 EPUB/img/multiscripts_and_greek_alphabet.pngUTV[iRux PKXC`P<dFEPUB/img/check.gifUTV[iRux PK XClKEPUB/img/nonimage.xyzUTV[iRux PK XC VKEPUB/img/check.pngUTV[iRux PKXCXF89VEPUB/img/Skype_logo.pngUTV[iRux PK XC 8EPUB/img/fallback.pngUTV[iRux PKXC=UvEPUB/img/complex_number.pngUTV[iRux PKXC%&e EPUB/img/check.jpgUTV[iRux PKXCqԷEPUB/img/cichons_diagram.pngUTV[iRux PKXCܨQW EPUB/img/Maghreb1.pngUTV[iRux PKXC]7EPUB/img/circle.jpgUTV[iRux PK XC3-33"_EPUB/img/ElementaryMathExample.pngUTV[iRux PK7h9E{:H EPUB/package.opfUT)$Tux PK 1Q E AMETA-INF/UT6Sux PKXC\ˬYMETA-INF/container.xmlUTV[iRux PK XCoa,UmimetypeUTV[iRux PK pandoc-1.19.2.4/tests/epub/formatting.epub0000644000000000000000000003222413155240142016524 0ustar0000000000000000PK XCoa,mimetypeapplication/epub+zipPK XCW!Y|&EPUB/img/purple-aqua-square-bullet.gif_LvVLבʸ–҅/m6t频CQS IaB3S[V:ih/z^y~1yy#g+ta1U ,*%DX5V`\u*J~Og(-h   T((1СÀl:{BFAE€ƀ10*h4 P0$Pn$j$$p#AOEMCkI`Ii)eԀ8LՀ@#@AEq* H x<F X 88 8888=8 >C9pX9_ @s@@0*388 $$ *iPp1nTK`9 (cc8!LseN^hgD(ujÕZk #c{nomo3/rA?a" bjհY@ɂO}']Vu+c8{KeB딠%N1M2sOK>k~z4{ɧjkrKْy5;om)Oν|b UMl73gީj>7tKupkCvl 4eƿ:9HW e@X.-1~0]zfWsr3SA$A%5|LO`ʺKf-~m9!z^#?@(Yf)5 5A,uM,i(\Гy:Az9=4jA·˨nQ#:=$A㫍ܔ;1XbYuOv=99vCƶȋC'o;q}j`9'S|ǦwI'6NJg uwB3{]5~N)K>KMcvHk(C-ѧ ZgHh b^MG}lOs+= m_Pr(fмmF~Kޫ^]qg7nMSG&I.HND9yϏUz86:zפUon>#I%'-(./ʹqh0{,F<*v$JIoJʪíK~9\L8'~ {-)\s2wد?%_|!ְ74 +Ige0ye{6 Uξ3bi,k-R\\SeSBڶ<mnċ^}x| x׈/ƉrQ9\@|]M3~txXk{7ij&y-:qg Nɔ>(24\!./W > zw9FL;$ansGa`?>_.xu3lqNٵ^WOnϩIl:E 5(c.Զ6|Aݥx8=HvAm{K1>`}%FvևWfwab.cjj]*Bt5]/Z=\Pn=rUӫ{^BɓdfN|fZ7⁙ [f-:YkB$sç|pZU>qŃZcf˱d2}.mjy5VŎJ'o˸\Cy1+$=OpGgt.sI/l6i+o_wq9-+gyJ]:ZוYO&w /0[Y_PK Dރ;EPUB/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쉳ycf>GS(A$w>PzFuce|;:*Ze~F10O9.?"c<)^PK XCoa,mimetypePK XCW!Y|&:EPUB/img/purple-aqua-square-bullet.gifPK Dރ;EPUB/xhtml/nav.xhtmlPK XCԹ- "D EPUB/xhtml/styling-xhtml-005.xhtmlPK XCɣG "EPUB/xhtml/styling-xhtml-003.xhtmlPK D8lG"EPUB/xhtml/styling-xhtml-004.xhtmlPK Dz9M",EPUB/xhtml/styling-xhtml-002.xhtmlPK XC7P* "MEPUB/xhtml/styling-xhtml-001.xhtmlPK XC6re"EPUB/xhtml/styling-xhtml-006.xhtmlPK XC> sxL`{.{I2 -*4PtW~|[2eI~?<Ǔ%1 n!6 a dX-֌:hϖ,)+`F2 ElY S6 #zFGϚW2H5*]&5ň\{phVhF; =wd:36-H=1Υ+(œC%$k3% %Bj ;&TUߐ6_ft6-I=2VË)rAWTgXXھ,㶅t[iٞU.ui/lPg`5#l|%Jͧeq9/$^)EH<#X {XnFtxkPTm~ Bͥ K.):/PKf9EX~EPUB/css/svg.cssUT $T$Tux ]A EbRc (F6 Ķ .wW:TkcؕGg88i흿G:2O.ƃRڶ>Zh72%860‚%sPGfxPKf9EnCeEPUB/css/math.cssUT $T$Tux uMN0FV$"5DjM±ElGTwhFx3s|$Oծbo2ĐR!c]i|˺]}dx7Ӥ,hN>y~$F r޴CM4%Wي%6]oݽdheBh+GT|ݙ,VA_ IV߲T8-"~>}IBl'PK g9E EPUB/xhtml/UT $T$Tux PKf9EjN2=g !EPUB/xhtml/nav.xhtmlUT $T$Tux Z[S8~nj^vg\ hw˔ }Tl%b[IN~$;$vlYsѧGKe[sib9YoG={<? ŅIj]vǏcA$gԍzl"GXB7#`7HsAd*'O'#DZHD’Yڎ7{n1ь/3KD?O`c!5$! 5O % ؞|*Q5ʜk<‰Tk6V/( 2xdc-SxKE,ɂc~X^m 0'Rl NST# sq aV=%q xCfD&Qĥ߭3 BWj:@fJpF 7߮so7 m0#ǭ XpRf/U\ՐFw ؅yy9Atw?lRiv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/UT$Tux PKf9E5EPUB/css/base.cssUT$Tux PKf9EX~EPUB/css/svg.cssUT$Tux PKf9EnCepEPUB/css/math.cssUT$Tux PK g9E AEPUB/xhtml/UT$Tux PKf9EjN2=g !EPUB/xhtml/nav.xhtmlUT$Tux PKf9ETPxp# EPUB/xhtml/content-images-001.xhtmlUT$Tux PK f9E A EPUB/img/UT$Tux PKf9E6%L',>EPUB/img/multiscripts_and_greek_alphabet.pngUT$Tux PKf9E`P<n4EPUB/img/check.gifUT$Tux PK f9El 9EPUB/img/nonimage.xyzUT$Tux PK f9E `9EPUB/img/check.pngUT$Tux PKf9EXF89DEPUB/img/Skype_logo.pngUT$Tux PK f9E B}EPUB/img/fallback.pngUT$Tux PKf9E=UvEPUB/img/complex_number.pngUT$Tux PKf9E%&e ɜEPUB/img/check.jpgUT$Tux PKf9EqޥEPUB/img/cichons_diagram.pngUT$Tux PKf9EܨQW EPUB/img/Maghreb1.pngUT$Tux PKf9E]7EPUB/img/circle.jpgUT$Tux PK f9E3-33"iEPUB/img/ElementaryMathExample.pngUT$Tux PK(g9EWh̟EPUB/package.opfUT$Tux PK f9E AMETA-INF/UT$Tux PKf9E\ˬ$META-INF/container.xmlUT$Tux PK f9Eoa, mimetypeUT$Tux PKvpandoc-1.19.2.4/tests/epub/wasteland.epub0000644000000000000000000030675613155240142016352 0ustar0000000000000000PK i(@oa,mimetypeapplication/epub+zipPK  .@wCמ=>EPUB/wasteland-content.xhtml}is7gߪު-Z;F)ْmؑR⚏`7Hb[z<fSByJXξ/_D]y2Y6mۇFUxb]}wFҋDqTy)6.2??ʋj RSkuYobQG st97ꋮj>,~UJ&ۨ#U/ Qm֏yi-8DWsx##6e170y6˽{ÇryÇGx5[@ex/ܔ2THxT13Zun(?u ԣ݋]uؼ~֛vVb>:ܗ*׹Bg=NhNՅ,ؤMJYlQGMbvիI]*) WbS2T$hLiUl#|a\ FZڬF݄G?_t?ߺ7O7~Fp_<Xmɍڑ_G=ZRuq{B.MUDׄ^/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ZY 9Febmj<^s6SBItV/[\Oԓx{jEq֠L_Sp g},ۜ*A!p|+zL$-,kd;p@(ƌ8^pF!*A_\q]"=4F;0UjQwcޖ̾ɶnH *A9MjP2ޫ= H#E68z)T ͦ7Y4smY9ʗͭ6y,<0k=16^yUWyfB\ 7*+WMSJjHfO4_$=ʕ.

                    This is a block quote. With two paragraphs.
                    Nother paragraph. ---+ external links [[http://google.com][Google search engine]] http://pandoc.org [[http://google.com]] [[http://yahoo.com]] [[mailto:info@example.org][email me]] !http://google.com http://google.com http://google.com !info@example.org info@example.org info@example.org ---+ lists * Start each line * with an asterisk (*). * More asterisks gives deeper * and deeper levels. * Line breaks%BR%don't break levels. * Continuations are also possible * and do not break the list flow * Level one Any other start ends the list. 1. Start each line 1. with a number (1.). 1. More number signs gives deeper 1. and deeper 1. levels. 1. Line breaks%BR%don't break levels. 1. Blank lines 1. end the list and start another. Any other start also ends the list. $ item 1: definition 1 $ item 2: definition 2-1 definition 2-2 $ item _3_: definition _3_ 1. one 1. two * two point one * two point two 1. three $ three item one: three def one 1. four $ four def one: this is a continuation 1. five 1. five sub 1 1. five sub 1 sub 1 1. five sub 2 1. other I. list I. styles 1. are i. also i. possible 1. all a. the a. different a. styles 1. are A. implemented A. and A. supported ---+ tables |Orange|Apple| |Bread|Pie| |Butter|Ice cream| |*Orange*|*Apple*| |Bread|Pie| |*Butter*|Ice cream| |*Orange*|*Apple*| |Bread%BR%%BR%and cheese|Pie%BR%%BR%*apple* and carrot| | Orange | Apple | more | | Bread | Pie | more | | Butter | Ice cream | and more | ---+ macros %TEST% %TEST{}% %TEST{content with spaces}% %TEST{"content with spaces"}% %TEST{"content with spaces" ARG1="test"}% %TEST{content with spaces ARG1=test}% %TEST{ARG1=test content with spaces}% %TEST{ARG1=test ARG2=test2}% %TEST{ARG1="test" ARG2="test2"}% %TEST{ARG1="test" ARG2="test2" multiline does also work}% pandoc-1.19.2.4/tests/odt/odt/blockquote.odt0000644000000000000000000002062213155240143016776 0ustar0000000000000000PKd7lF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKd7lF'Configurations2/accelerator/current.xmlPKPKd7lFConfigurations2/images/Bitmaps/PKd7lFConfigurations2/floater/PKd7lFConfigurations2/progressbar/PKd7lFConfigurations2/menubar/PKd7lFConfigurations2/popupmenu/PKd7lFConfigurations2/statusbar/PKd7lFConfigurations2/toolbar/PKd7lFConfigurations2/toolpanel/PKd7lFebThumbnails/thumbnail.pngPNG  IHDRzAIDATxP@ф-Q)6s'pM}PAE}PAE}PAE}PAeO˲_gqz=v5Lo=}\<[H (fi?o1ݘ`¿oXvwx]nU2ͬcif4胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(9E IENDB`PKd7lF content.xmlWQo0~WDABy@ba-B $ ! $^=I-N{N⦬"e[w|n?nkmuBe3fBUϯ}qV`65WQ<΀\yycUPІUEY==#xfs EK=u^YlP{S`ܶE{}m7778zS4LceD1!Ë5dn~;NI5#KCl5k6į'z߃3kscAf6;NBw@cWoq=B'S"i p 7AInp;w;65ك`$D+cC&w[n0 ݺJ}-{2v \c8pF<<AI$l5܊"Ph mbEWjx:: %\@$#Ʃtn$s}<=QE}k=p ->d"pi)EaM;L[W`\(5@M`iKr09ĽqD@Q4dMe8eaZtr3[&W'bԐ9a gC h4R{ځ6 $a2ځǰ ޣig>UUɌqO.D$ ܢC]j &dok͏:\2:up B;* ‚X 0 Uv"vGᛱaj09?2Q҅>_\Ӏ.QA+m,╦']f\B G]qru؜%=څrG}i E#`Jr ~̞)7{H ?̗MǶbEer].)B ?/)X:0Oa\xb}Hƀ|q [ VÉQڲс,%N IxZ֚&WB8 HG@0]ˈ`c$`"S_sl߾zW BZкE-(k0ɜĖ[l=<%r|`ChU 1cMᕡ\GvcMTչ0Q^,5 ?@ڈpX-[=/015EfÿuYqi@'#&x7q]< c^%$WV!aJ{Lܡ ݕ$|u7V ]oU=]OthPKm(+!PKd7lF styles.xmlZK6W*-˻]-E$!%bCIIQeVq< `-1JhBʔgVY2(Eyh1ʕq)8Y,-_U f4&hc2NIx X4RY+"FC>nFgv3Mc1:7 axo|| &{ u 4TiZn_s޺lwml=I==ɞb"%1p i긅X :@:rUTǺYdwnb(5HtdsElInzkF4Ԝu΃BS}-D} D g`e|1hA[G[UB]0K7`>!]"BYÔ̮T"z%3Nrn;NcM@vgqkF?)0-ޅ1U{,/ /Ft Ip%u0|3#DH.s}6?B eXdǰOWM 8xP w(JKg Ylr*V`K @V{;7 _q!zo2oHcxKx1%\+C.L{w"2C8wЖpqUA}3݆O9^!ǿH8kל+ Eؾ:n1>A'(=/c Dsa!)!iA^#y23x#`jbѽit(64ZnIok{W栓]çHSPv4?ñm4Ih9\bz?8fPs*ߪ ܨw)qhkr~0HR9u`:#kdxZ?Xpo- M;.V]~ޠ3ѡpI3uwi Zk5^z SPK;)PKd7lF manifest.rdf͓n0 Martin Linnemann2015-03-12T07:57:29.212015-03-12T07:59:08.12Martin LinnemannPT1M40S1OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKd7lFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKd7lF^2 ''mimetypePKd7lF'MConfigurations2/accelerator/current.xmlPKd7lFConfigurations2/images/Bitmaps/PKd7lFConfigurations2/floater/PKd7lFConfigurations2/progressbar/PKd7lFQConfigurations2/menubar/PKd7lFConfigurations2/popupmenu/PKd7lFConfigurations2/statusbar/PKd7lFConfigurations2/toolbar/PKd7lF-Configurations2/toolpanel/PKd7lFebeThumbnails/thumbnail.pngPKd7lFc=Xl content.xmlPKd7lFm(+!  settings.xmlPKd7lF;) styles.xmlPKd7lFh Gmanifest.rdfPKd7lFqkmeta.xmlPKd7lFjҠ">META-INF/manifest.xmlPKp pandoc-1.19.2.4/tests/odt/odt/bold.odt0000644000000000000000000002421113155240143015544 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaFConfigurations2/toolpanel/PKaF3Thumbnails/thumbnail.pngPNG  IHDRzAIDATx P@ф-zoa.Y$\Eu]_p郢>(胢>(胢>(胢>(,ܿpw?W}_͏~xGclq[X籒fnհ?O?:x}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}P>3N{IENDB`PKaF content.xmln6} CznE?P@HmAKM"USzcIJ,oDZiKvř! Gt2(YZo vi}YoV_ypSo@"l!hں,(/ _oACHE{G8s6Z(|bʑs6gX6Xʤf7lc{Ceփ.NߗNp9ʶ`>5ݰ{#/s!j1PS-}tjOötEv/wgc vLf4F?.k)߫Ty oS{g)VU>vGdwYw`/8 &AiZ* `js©{v0g\2; 41 S{ۉweM\s]vF<_^aFNi"SƷO!dH ˤ"k1<*yn: {:VoKI,IŇ{ՌldaPUB |iafyDuƼi?p7czlTlVfqy)oQ#dJX?D|9Ҳt4-`[DF\@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WT$h'!ԓɧbhamh|q:b%fr IC lK{S #K9;wR cүDa[E!,HVĢ@fNhRYや!bߜyQAl_h2%Rx"%IUgφv:eiJK˔=K -=옥bg~v3:ffi\R*愳[혥%biN8:ei ˡLٳ YڙCR4'ғYUiP{$=혙SKJМpvKۃNzh FPZN1>I?u,XېI=5)}K-uGg{Y,8[*goh:aKJ AH ;\fT%aa*ʾtTpvP8{$*QphjxIw(&p1&wT#k0h"kzed.YqNJc-BK"-h*"ι"|W+ %2B2 oT]\u%ekU C*H-Tjh9#u",^;< p,\#k/myjH-\7 ׃jk2PFH-\㛅kbM4p9PH-XˆEKpH-\ۅk ZT(D6RhYUWGALȼaydx<2G^-r 78.0=\+{9j饡CE㫟 QbUߋ!o,`K!%X`M. ֽR>te[l {! ktieqKƗ^0%iXadt2zf>^30{0\}EwͿ ;_; JI7 E:pmǎ,^.yFelj>A"7q FtpW]5X9ߗU.y4,0_N4*p"Z [ټ1 %Ț:ֽmsܨp6~t Ρek~Sn@WR;@ryMkNǭ#\7-;Btd -CT JQD2r;3{oxYύN!SpUY&bR}ڏF#đ``p#PuÈgҏw譓+)@="5WHi+Ϧ7y3wG #l9^54Iv)PF~Ngj3̻f&I ʡ&I C]OI>r4wQs3蹘 Rإ`Hq,q[ =); s 3g'/UxЂbA>툃]'nOj8ŤV hه Martin Linnemann2015-03-01T17:26:12.312015-03-01T17:52:11.03Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKaFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFQConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaF-Configurations2/toolpanel/PKaF3eThumbnails/thumbnail.pngPKaF»B1p content.xmlPKaF6:=(+! settings.xmlPKaF Ɇ .styles.xmlPKaFh >manifest.rdfPKaFfQV}meta.xmlPKaFjҠ">"META-INF/manifest.xmlPKp$pandoc-1.19.2.4/tests/odt/odt/citation.odt0000644000000000000000000002513213155240143016441 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolpanel/PKaF.fThumbnails/thumbnail.pngPNG  IHDRzAIDATxъ0l v9z><%!J!mǾ??>(胢>(胢>(胢>(>mk:Xuej]<1ϵ{ 1e~z׳>?x_(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(,c!!2IENDB`PKaF content.xmln6} Cz$vY(i łhXJTE*o}C}>IȉHIW+E$8C7?`GG78kcb6޽޼0^_~m+9}a:>_ֵ!NG+XkU^%c;\imĸ-Au'hSĸ(,m!E-|2Ⱥ ADq6B+ێ؊g wd\IkQH+ױ1r0nOzXIbH~mpX;5H{TͮvE*RQX6S3>ޙ[W01sBX$UNHTEXtP 4 w:mu]4C"pX0w4wu3,i`77L—S[5ܭ7{֘zFK(4>7MHJm)6s}!,!⫐ u_p`A+?2!.]#$/P%\`91+UG`l n$ַ|4Hyx12yap(-ScƘA='vW7(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M ֽRt[l {!kxneqK^Q6_4,_2K~k~Q^'B]\O:52~8҃5:8te&4_L4*"u@ CyƀT k fNl@W,n бkS#FWy_4)E.敔[t41@ yM[Gl@[wn ao0nRU5T pNY/+h^܎IIͽ*IvkFKD#N,QF2tGq1}~(uD?@~FfWiouD1J5)_q4WR@ q9IL8Qw@R@44FB/+#x-Ov$% ;fNS* `N~e~;퍍3̻ D4F$UÙ߆j Uw;r47K[+)®v)Iuvv&e'uka期Ů ku,g r Martin Linnemann2015-03-01T17:26:12.312015-03-01T18:04:58.76Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKaFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFMConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaF-Configurations2/toolpanel/PKaF.feThumbnails/thumbnail.pngPKaFʞ|v content.xmlPKaFca](+! settings.xmlPKaF? styles.xmlPKaFh manifest.rdfPKaF'DN meta.xmlPKaFjҠ">o$META-INF/manifest.xmlPKp%pandoc-1.19.2.4/tests/odt/odt/endnote.odt0000644000000000000000000002530613155240143016266 0ustar0000000000000000PKшaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKшaFConfigurations2/floater/PKшaF'Configurations2/accelerator/current.xmlPKPKшaFConfigurations2/images/Bitmaps/PKшaFConfigurations2/menubar/PKшaFConfigurations2/progressbar/PKшaFConfigurations2/popupmenu/PKшaFConfigurations2/toolbar/PKшaFConfigurations2/statusbar/PKшaFConfigurations2/toolpanel/PKшaF Thumbnails/thumbnail.pngPNG  IHD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֡e PK,aF manifest.rdf͓n0 Martin Linnemann2015-03-01T17:26:12.312015-03-01T18:17:24.40Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PK,aFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PK,aF^2 ''mimetypePK,aFMConfigurations2/floater/PK,aF'Configurations2/accelerator/current.xmlPK,aFConfigurations2/images/Bitmaps/PK,aFConfigurations2/progressbar/PK,aFQConfigurations2/menubar/PK,aFConfigurations2/popupmenu/PK,aFConfigurations2/statusbar/PK,aFConfigurations2/toolbar/PK,aF-Configurations2/toolpanel/PK,aF]²eThumbnails/thumbnail.pngPK,aFO5Wq Mcontent.xmlPK,aF*$+! settings.xmlPK,aF֡e  styles.xmlPK,aFh Zmanifest.rdfPK,aFw. meta.xmlPK,aFjҠ">$META-INF/manifest.xmlPKp&pandoc-1.19.2.4/tests/odt/odt/expressionUnevaluated.odt0000644000000000000000000002511513155240143021225 0ustar0000000000000000PK,aF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPK,aFConfigurations2/floater/PK,aF'Configurations2/accelerator/current.xmlPKPK,aFConfigurations2/images/Bitmaps/PK,aFConfigurations2/progressbar/PK,aFConfigurations2/menubar/PK,aFConfigurations2/popupmenu/PK,aFConfigurations2/statusbar/PK,aFConfigurations2/toolbar/PK,aFConfigurations2/toolpanel/PK,aF]²Thumbnails/thumbnail.pngPNG  IHDRzAyIDATx1 @ _VZ703j13ܚ>(胢>(胢>(胢>(胢>(}f<]ؿx>e}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}P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Y*g~AOD0B=(#kH&Fl@b E2зTX%}CHR;郭IJJ 7N(4Puli4m LAiRѴ \ӣӴ=( ̞\Sk\Rj愓kzrcNgM9~)Ms^eJEӂprMOoLLʔ9䚞ݘ'0-jz%HoLӹN%hN8-T=cz(S*cT]%gm,+uI͙HYrkRy e ˠ$[.-=$Pu hc֠\"uNFw=GgU;\E aa*^e۫pf7FizL:j<0͎9\;\%\=k|^Ϣ;VIwךkIe+eY>uY H7 \]l\t%eiU3C*H#T㫅j4@XV\t55L58>v9yjH#\W `YUNH#\ӫk6i#XB"`ͮ, "-ˡB"pͯ14P\vm/hjFuud44 7,GFNqKYOp%).0=H^)wj~nrѳA7CXb5`K!%X` ֽRte;$`;5>7X2H ִ#Xsu/aԯFIoX*h ٛ{a&`&`OJn+X&@@nQ6&Y[ݧUoŒX?5`I!|P.Dbh?qn \_dY>^-0_͕*p"ko@rEw}ƀ k fNl@W,n ЩkS-V7} ,/qj" hJʭ:2P-\m_5@E.Bt<M;yD5"zKb8$\z,Ftn`|-RhȘre"+e#N, WdBam%NLdEX\׀⦞ P\$86D*xj-Tb̊EIL/=]KSAPv[QuSY.,`"y#)Pi^8`:azN~ \'G Cxw HVJTJLN%*B#"`a(05 G^Շ5>v9 Oml8F\AB/Cʼn.́iN\O 0̜SKKAK$* y9[͔.V)&nt37ž=u| .9!Ր#_)Y JCe3*kł*PK֡e PK,aFh manifest.rdf͓n0 Martin Linnemann2015-03-01T17:26:12.312015-03-01T18:17:24.40Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PK,aFjҠ">META-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PK,aF^2 ''mimetypePK,aFMConfigurations2/floater/PK,aF'Configurations2/accelerator/current.xmlPK,aFConfigurations2/images/Bitmaps/PK,aFConfigurations2/progressbar/PK,aFQConfigurations2/menubar/PK,aFConfigurations2/popupmenu/PK,aFConfigurations2/statusbar/PK,aFConfigurations2/toolbar/PK,aF-Configurations2/toolpanel/PK,aF]²eThumbnails/thumbnail.pngPK aFS/Eq  Mcontent.xmlPK,aF*$+! d settings.xmlPK,aF֡e  styles.xmlPK,aFh manifest.rdfPK,aFw.B meta.xmlPK,aFjҠ">b$META-INF/manifest.xmlPKp%pandoc-1.19.2.4/tests/odt/odt/externalLink.odt0000644000000000000000000002475713155240143017303 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaFConfigurations2/toolpanel/PKaF|e))Thumbnails/thumbnail.pngPNG  IHDRzAIDATxjP {ѓ;Yw~#7j9?®7G: x}AE}PAE}PAE}PAE}P1Mu6My~[ec$;Ȳ vU_6{?;؎o.wt{ËMu7+> .z%E>V$ˉHIG#E$y/;y I8[X#gh 0Oza}a _>fqx39׵ k+؜#I䜡yyY5[t{l>lO|ѲzϱqhWYBP+^y/ D7=%ׅpM.ҍk{]4=S:m#Tu|6?$ XT n]9#%6HT΍įw}mJ\7P>lOB Vsγ*@ᎇésֻGwDX̽G=D,<( ؍\J,U dՙK6a2B t reYU08& hrWZ~) g҇gd?|<.(K\iJ2d:xbALU`y[b;Uz褕nV^!>z7x8 bkDGv$ X?nӂ&rO4 d)HAǚטA a . 2-EH"; ]_o=-brC|B., #d GMFa1켷 š:HKbn, Ƣb"ge>6S)KLvW`ݕXxrxE;~5?؁gWZʕ6oכ{) Y"51?ʹHuC f3BhR t*{ױه)Fsa_ٴs& pc"\m8m6J-,P 뚩wQLo/r afC e=t&&@bM2#)Ccel,a,Y].ڥ10g΂;i=.GcX}&zI]3F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)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFQConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaF-Configurations2/toolpanel/PKaF|e))eThumbnails/thumbnail.pngPKaF+7v content.xmlPKaF'),! settings.xmlPKaF<3 e 9styles.xmlPKaFh manifest.rdfPKaFy=_meta.xmlPKaFjҠ">$META-INF/manifest.xmlPKpi%pandoc-1.19.2.4/tests/odt/odt/footnote.odt0000644000000000000000000002513313155240143016465 0ustar0000000000000000PKPaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKPaFConfigurations2/floater/PKPaF'Configurations2/accelerator/current.xmlPKPKPaFConfigurations2/images/Bitmaps/PKPaFConfigurations2/progressbar/PKPaFConfigurations2/menubar/PKPaFConfigurations2/popupmenu/PKPaFConfigurations2/statusbar/PKPaFConfigurations2/toolbar/PKPaFConfigurations2/toolpanel/PKPaFKThumbnails/thumbnail.pngPNG  IHDRzAIDATxъP@ф "ZF{ܤAyoOKE}PAE}PAE}PAE}PAy{4-Q[8Ǹ߯g bd(胢>(胢>(胢>(sѧ˿IENDB`PKPaF content.xmln6} Cz|k/ lC@o Zmb)R8){=$"'-%]X 9߈7o:ő -3y'l>ܼ/˯xxso`&m3 \.] " X̥7!f;ym :?Wj! ΥlRE$Lmg*}ᎇésH̽^q% F.XViV*aXCz=6aB"HA(]̍p#%f]}Z, hzSMą[n<ztcp ]&w!Z @@Ҡ8x8yZLovW?1G|4FL >0g\7([q<{!qܥuݲLNrx6ώ 7{(+ R^A]!I89lA=vʻs@-(ߑ` 69<N!.!F-|fa916t:HKr\7usQ>s1?r31Gpǩ%&{⫳yJ,P uaz: >!E6%!IA+'JwBFH%H-Eݤz(Ńs+ZָP(5pܯmrN,:l"!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b2҅U&(lw Rfp7$nTK8y/!Ie.GALycE;Yys23ϪxO}#ғQ8fY3iEhJb6癿oΟmh gUxz]b?ظT.X4gD|8笝tMۖ?Vu#z2K#+d¿Y}ʅyP2e׫4,[ߣO~YE͑(jKp| ^C<)rl /P#zglr7(tWI4ݔZo%% C$6jCSFy^!=̘3@&e6 ''XVdYbϘy!Ey^C/f&f5((e ;+' T=Zi=(--SJ[z1KsBάfw̎=عT g1KO&S JҜpvK?tCR ғYڞCR4'ӎYQiPs$=똙'3 JМpvK[fL=cz(SJSL]&g^4՗I=gŴ)Ku{Y,SrfA.sj hCo.WmuIFw3G먲.U;\T-,a*6ʾtT=7]< \ *x`-wBbpppe#6XqВm":}# H>`ۅk6S/k"W] ktpYZ,uP R f : UWCjrn`yc6q^R 0p55%D*R fHH-Xӛ˂EKrH-\ۅk ZT(D6RhY&1!ѱ^ySx'8.0=\C5kP!Ţgo(ŐWi siiK^)^-69 `[54X2H֤%XKu/a̯FI}X+_W Lm^> W_@ptA N:mR ncNpt(\gαcsk/Ci~wp#Or˯2XDU 8E#a',|kUnz?Y`tb4SҨdLc?= u)Ǎp݀6Xt ЉkS-FWy[p/qj" hJJuP.r݀6t ٤urE}[I"RDoH م`dW-ۑS~sv27|M+RD+< vo, w4>"6&'%WpGQaD=LdHvGu2%e4?tcf0O]N5wG 'TM"$,d2E0*˞ &f]S>eP8ʱƮ*\S-MZ 6yq?cv\\.9C#ִD\n1̜SUA zy66wCB 7;w1vj8ŤVُ Martin Linnemann2015-03-01T17:26:12.312015-03-01T17:58:33.60Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKPaFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKPaF^2 ''mimetypePKPaFMConfigurations2/floater/PKPaF'Configurations2/accelerator/current.xmlPKPaFConfigurations2/images/Bitmaps/PKPaFConfigurations2/progressbar/PKPaFQConfigurations2/menubar/PKPaFConfigurations2/popupmenu/PKPaFConfigurations2/statusbar/PKPaFConfigurations2/toolbar/PKPaF-Configurations2/toolpanel/PKPaFKeThumbnails/thumbnail.pngPKPaFtv content.xmlPKPaF$,2! settings.xmlPKPaF} styles.xmlPKPaFh manifest.rdfPKPaF09O meta.xmlPKPaFjҠ">p$META-INF/manifest.xmlPKp%pandoc-1.19.2.4/tests/odt/odt/formula.odt0000644000000000000000000003365413155240143016304 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaFConfigurations2/toolpanel/PKaF0Object 1/Configurations2/accelerator/current.xmlPKPKaF(Object 1/Configurations2/images/Bitmaps/PKaF!Object 1/Configurations2/floater/PKaF%Object 1/Configurations2/progressbar/PKaF!Object 1/Configurations2/menubar/PKaF#Object 1/Configurations2/popupmenu/PKaF#Object 1/Configurations2/statusbar/PKaF!Object 1/Configurations2/toolbar/PKaF#Object 1/Configurations2/toolpanel/PKaFObject 1/content.xmluAn1 EʾB]RRf$m=IâoKKfrY5i ho\pdbU|\j]km}^OQ)!:4151AطVC Xiѯ c+L8POpDKA-|)3yBK E"N$ePO_~PKɓIPKaFObject 1/settings.xmlMs0 HH;$gaDz$9@}% Im'[Gj*`7"o;gu)4?tp6>xS:"kz:^D{H$'HOihomgTr<]6OQݳkw6#gQ}"@fB Qw]kN'C" 0m(,w^s=Y c Z [[LY0Bjfꪜ@5_4Nyh""A΀ ^97Yx^@aQ="JuEbQrHsy`zC"攧/`FR6x бr: *P#e+(a0@YdLu3bj^ g@e١& w:3$&aԷňobU&0(ư:X68Do bYMjڙfU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est.rdf͓n0 Martin Linnemann2015-03-01T17:26:12.312015-03-01T18:07:27.67Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKaFMETA-INF/manifest.xml͕MO0 U\P u88 $gn8{nAِk#ϔL^:atA I@sS ]~Qo8C[V9rynХ^>_8-5S2%+JHHC JR7P4Rp2[ d yҕ2mN B İ˅ѕ]S8 !4romD %"?c:Ƞ'x+\GD4v D1h1MwT*ckY3K#*!KY#e)M= 8my; j7Oh&>vT4ƹ}wՖV6A C7zPKe&u:PKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFQConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaF-Configurations2/toolpanel/PKaF0eObject 1/Configurations2/accelerator/current.xmlPKaF(Object 1/Configurations2/images/Bitmaps/PKaF! Object 1/Configurations2/floater/PKaF%JObject 1/Configurations2/progressbar/PKaF!Object 1/Configurations2/menubar/PKaF#Object 1/Configurations2/popupmenu/PKaF# Object 1/Configurations2/statusbar/PKaF!NObject 1/Configurations2/toolbar/PKaF#Object 1/Configurations2/toolpanel/PKaFɓIObject 1/content.xmlPKaF`iObject 1/settings.xmlPKaF.G ObjectReplacements/Object 1PKaFӔ Thumbnails/thumbnail.pngPKaF'tq content.xmlPKaFRr%+! settings.xmlPKaF֡e  styles.xmlPKaFh I(manifest.rdfPKaFs)meta.xmlPKaFe&u:-META-INF/manifest.xmlPK%q/pandoc-1.19.2.4/tests/odt/odt/headers.odt0000644000000000000000000002442313155240143016244 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations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ofOIoD =ӫut0xzu~PKjҠ">PKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFMConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaF-Configurations2/toolpanel/PKaF~^eThumbnails/thumbnail.pngPKaF~ _ }content.xmlPKaF*,! settings.xmlPKaFz݋ ' styles.xmlPKaFh manifest.rdfPKaFmeta.xmlPKaFjҠ">(#META-INF/manifest.xmlPKp$pandoc-1.19.2.4/tests/odt/odt/hiddenTextByStyle.odt0000644000000000000000000002505613155240143020250 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolpanel/PKaF@}Thumbnails/thumbnail.pngPNG  IHDRzA_IDATx! @+? q`b{f\|PAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPfZ<>IENDB`PKaF content.xmln6} Czd#8~h] @o ZlGn}C}>IIQD5VdW 9p@wo`%Kñzw?3w u$t)߁&lf6" b ]k^{Ɵqe8Wu'`U}8E`_Yڊ}ZS mil8آvf]pl6Pnlr6TOC"`ʩv[݀rmƧx^uc/)a2dX QPu/i{*7Bac*?4 U: ;'zYϚ#a3wϚYiP4a„;YYD3c.Ó8&"rL$!tjG0Wo(m\~ljkd<#n 1 zg ou40XiqDe_$kǃ>ŘgD~Fns(OlsݺR|']кODkD>< ,f%Gccu(?̟vȚNqI<2c4fF6fN].GcX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Op%).0=H^)wj~nrѳA7CXb5`K!%X` ֽRte;$`;5>7X2H ִ#Xsu/aԯFIoX*h ٛ{a&`&`OJn+X&@@nQ6&Y[ݧUoŒX?5`I!|P.Dbh?qn \_dY>^-0_͕*p"ko@rEw}ƀ k fNl@W,n ЩkS-V7} ,/qj" hJʭ:2P-\m_5@E.Bt<M;yD5"zKb8$\z,Ftn`|-RhȘre"+e#N, WdBam%NLdEX\׀⦞ P\$86D*xj-Tb̊EIL/=]KSAPv[QuSY.,`"y#)Pi^8`:azN~ \'G Cxw HVJTJLN%*B#"`a(05 G^Շ5>v9 Oml8F\AB/Cʼn.́iN\O 0̜SKKAK$* y9[͔.V)&nt37ž=u| .9!Ր#_)Y JCe3*kł*PK֡e PKaF manifest.rdf͓n0 Martin Linnemann2015-03-01T17:26:12.312015-03-01T18:08:10.12Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKaFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFMConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaF-Configurations2/toolpanel/PKaF@}eThumbnails/thumbnail.pngPKaF6qgo 3content.xmlPKaF+#T$+! E settings.xmlPKaF֡e  styles.xmlPKaFh manifest.rdfPKaF9# meta.xmlPKaFjҠ">C$META-INF/manifest.xmlPKp%pandoc-1.19.2.4/tests/odt/odt/hiddenTextByVariable.odt0000644000000000000000000002504413155240143020672 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaFConfigurations2/toolpanel/PKaF@}Thumbnails/thumbnail.pngPNG  IHDRzA_IDATx! @+? q`b{f\|PAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPfZ<>IENDB`PKaF content.xmlM6z:YEU+ʹٕz[9`Slrh=ЏOR!3Fbo|<"540pxsn} -qqL\Tʧ3!>\ ;克 NIM!X LMAe![bYx#y@h፼@,2@xd MI|Yİ/|tQ^;:B%}"t370{ȏ#J M@$k!bv W~3}wX2@H%Z<#eпe):}t>v3Ÿ 1~x Je|OGFQ\C6AO!?JDa< kngl ˆ!H/Y!Ə פX! 6({,.,G/m|,? cY gMȔL>̟* flͦ͸aX%Ki ̬ĚrI2ZrkljM K>^d3k8o%h ˼̺5cwbLL!xch@M,#$t: F{Ģ=AGh`GU.xh@M,#$t: F{Ģ=AGh`GU.xJ@9UDt7iy2b#- ~kSp΁Vs[X q =պVSX{h{-ư>Ec\e>EOq^4U^VFc\eFOqt4UtVGƫ1?>XP?piCXP ?piC-ZwK B.(KJR.EC]4&1 S6׍r\DC &F4ӂAVOǔE@lXM{_Z]lh1HS` Mg\f>|J6iŠ&hbrvv3SY .ȘY.ŇsTEѨf*V"* djwԽ㷮 7[ۜ?ۭ]{aj5hkiM06#fkկڇ)[;MMTߧ|n^oԎ8B/DLAo)" `kq:zpC'}Ƅ>X|%fIڪ85ju{VQ^ />/?/uO|\$ZvJgBG{R$m43'bλv*{H®G[T7 DSh!U!K;RfؔicLU|9URId _C'C؄Q&eH'7#lCy-F }0}OA94PN(F+Xh+ :L| =6|SULhS"AK2`B)-:o5`m%SGcE~U%n?.n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F/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFQConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaF-Configurations2/toolpanel/PKaF@}eThumbnails/thumbnail.pngPKaF\cP/o 3content.xmlPKaF+#T$+! ; settings.xmlPKaF֡e  styles.xmlPKaFh manifest.rdfPKaFG  meta.xmlPKaFjҠ">9$META-INF/manifest.xmlPKp%pandoc-1.19.2.4/tests/odt/odt/horizontalRule.odt0000644000000000000000000002362213155240143017652 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolpanel/PKaFhThumbnails/thumbnail.pngPNG  IHDRzAvIDATx1 @EA=gOE\_kmp`>(胢>(胢>(胢>(胢>(Wsc+}m}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}P~~ {E[IENDB`PKaF content.xmlVM0WDԛ1TR`UZ JUNm@}1 K P<<όǞ=s6\y< IR.7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urations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFMConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaF-Configurations2/toolpanel/PKaFheThumbnails/thumbnail.pngPKaF]!y* Jcontent.xmlPKaF8D' settings.xmlPKaFy7M M styles.xmlPKaFh Hmanifest.rdfPKaFnWnmeta.xmlPKaFjҠ">!META-INF/manifest.xmlPKp #pandoc-1.19.2.4/tests/odt/odt/image.odt0000644000000000000000000010112013155240143015701 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaFConfigurations2/toolpanel/PKaF^,,Thumbnails/thumbnail.pngPNG  IHDRzAIDATxytet:d! eT.lQQDaP""1 *M2l#*0zDaQQAH `VY:RUuUWIN9=.U_}VM8?hӐ `A~,A ? X `A~,A ?"yAPEQd ,K@hS-,;\~(Cj9^QU9 (!h na|#<hv/TUA,l6]6 BvXV\'e(?0ݻOTUS5+K'rOmٹ0FS{"/gE#"T8&F]IbwPU%6 )5'>,h}&Z#5soee_(J`CAMøJa.CN# ",eAjFefTEk3{5.5-v- *alpP8 WZL3A>X>tO20ϘQ?NHd][-vE()xѢkDI1h wJ$\"/|:C5~rPk#Cb>tA ^CH"/Z뼷?쳤™G?fp1>Vi;fo>ܾc现(HF!U6Uv>}Z_ffkhh!(ofvV%a<~8a#:O==ڵfϞ԰R8M-IE7,(?3#xM 8NC[7bU}ىݻw 2ad"Ո=ƌCQ.BJfV;wΞʍUE=o|xcpD "t. MoƏ#G'I3p(ܷo_lznA!GPU3 v;@1.X*~۴iӔf9 P"aOCQ~`bœ⊉۱}i FJJ ~b\%Q "yü}cǎ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|WvKf>js(G|3p䵭"P"~MF*VEb%YX#+ 7ִl5E0S6,hE-Oz\bF'  3Ɠv{>f99?֤W)JM4PAy(RLznqg hr׍TJX|e3vte$,5%ȑax.}yh)ʶ cy! $;|14:R%nL܋?-$ro2J}H#9 "uҤ㧏xׂ|>j/z܊W!e:51-쭫\5^E?(aGUݶinAQ,\W'v3Oeo Ù)S5FVyVT+Bd8@Z(u}ʤ ٫3Xi@feK6{$O65;~9r_x2``krɒR3lN(4Puli4m LAiRѴ \ӣӴ=( ̞\Sk\Rj愓kzrcNgM9~)Ms^eJEӂprMOoLLʔ9䚞ݘ'0-jz%HoLӹN%hN8-T=cz(S*cT]%gm,+[͡QYrkRy) e $[.-=EQu hCt*-AH;\E2 *00{^e۫wT6,4T&>W=*nP St *x`3@!r6wJ:zE w8V5y%ג]"/zʲ}#!K ^/\|JH#\e g%UFW h`ՁjH#\kTg3.X72p?W Mp5?WMpݟWMp pmLm'_xO4[޸ ~k~^'C~]\/*5~8Q59?Y c-'~?Z`th1+aiU2Dbjd:Í)A̜pـXSצZ5AN/Wo}1 {% *]3*;\&XzťDFJS~ӼЉqڑ,T?EAYd0J~{9UFXiT;ü P`j0; #/Īr?[|sd Martin Linnemann2015-03-01T17:26:12.312015-03-01T18:20:30.92Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKaFMETA-INF/manifest.xmln0 "]Rq[F U^S:71.(aεP~iUhT4.5YS_Wl0\*ϰ[6{=/N*$v oR`pt֫βlFw=y@?5se5Ihzu ;sPKʾPFPKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFQConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaF-Configurations2/toolpanel/PKaF^,,eThumbnails/thumbnail.pngPKaF],Cr content.xmlPKaFi??-#Pictures/10000000000000FA000000FAD6A15225.jpgPKaFfF%+! bsettings.xmlPKaF+oǘ 8hstyles.xmlPKaFh vmanifest.rdfPKaFqwmeta.xmlPKaFʾPF{META-INF/manifest.xmlPKo}pandoc-1.19.2.4/tests/odt/odt/imageIndex.odt0000644000000000000000000010316113155240143016700 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaFConfigurations2/toolpanel/PKaF]6 Thumbnails/thumbnail.pngPNG  IHDRzAKIDATx tUktw6B!2 /E ʻKU_4" )?כ#.Z\%U&] ף!~LʔSdz 0x4. \kׯ&?U/^o vfKC=^H ~q/+kko]U6FKkxkɟ-'t`FW _~+#bZit?_Jm0*r-˳X,18mvhs8~( E%eYU%)H'eYwa 4M+s OTUeg,*C G&I6ZfHH/GQ}SRUMXmvP*`ݕ>MR2̦** H Mv9`Y> ޵lH oIFqxbX3s)8y0FMKJyW(]OfwAj=h0 |(#` 5A9s>˙3t}U-û0U|cuނW8Vx퍛6oU DT74T FV>M~^ o``2; K/fw0/KBQy%a0lG6 CϟqԩQf5U%8>_ !KBʏ:x <&avY QQeª}`ى[n ׯD T#39lRRRl޼yg.^ )آY؆!64/**ʌ59E ^{ΒYw˾}Bܡ`CmK_*+-}r$I4 XY/r;RzO4!e qqqe``>Eeo|BB^U i蹉5ТoAU07p㠈5k֌{bҾ}>DT|PB&1ͦ FH3 )bLibdYGxxuuզlvf40xA!ܳڵqِ :}yA$䥥{>טޔ`4.3߅WX ۳gOHCJ0~q}ͳ3bf n|?Yc߾}؊_|yvSG~ Q @8߿? ܹQCbzDE1PǨfGSYY !(gϞ+VLC@O'nwUu5uo6mŋ<>.WC;t2E JHvرnݺAF|AQg}ֻwo;Y֮];m4SIM#o0{x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zPYZ镞otgNyl6c ,fI蹎e:!=ϓs)wN_ꉯ3[\Awĥ|14ثR%fL܋NgMߴWIܧ@47z-ѥ{1=/7k(pO/9)/ƒM k{e&`)/GLLE*ԬJ=K T>[jڼ)MxjZT4 '4mN.5=y|cj̱B%hF8d2Uh4'Mi#y8)Ms5=1MSy8)5M35=1M[iZ leݘ'3KJMьprMMz4x(R*cT]%u,+| U7bmB1_}Jܓlp7Fb ZxƯ8W] hi @:e*ݠ2 SUƹj|X}tÆx;L"W;\BTs4T@QA5Cšt 5>g+ݵr-5- LN\?)ĞaR5ӗ p1΄45Z %\< rfɂ4B5ZFs,: 0Ά4e]-\Dqcח.8 ijzXJ֯2EgE\-\T9ikz`0)ђ_ikvpa=@K1r΍45^-`ȒgGFCyh_zdtOv# g=D*w)GtHլTsCuOAdȵŪ'C^,#XֹBJ{"te;, {"wk|niIG&7(wÜ } ~6V{sAnh|\',7 ?) c?. pmX,Cib~w<7#NrW :Qt.r`DW ђe.3e(fSEL K#[>1TyR-9m5@'MxNZ^ُۂs40ĩē\63)5U@2}NM:{(l@;wn `4\UUd#H yc.-ם)vSʨ޻r"w^V{Dh+27GvFMdE?րy= UE%|8@2rͅyebLIØu 9aVR"T L7pvr*:(ai&@`HPnPt ڏ俁_-72ެ]>Z:/cʝPѦ yF`H02ׅ>ЍiوxZFNAsIZ' ,IXy "zK'+Z /kő 'nO!*'O)G?-Yi58Uzɋy@PKƁ PKaF manifest.rdf͓n0 Martin Linnemann2015-03-01T17:26:12.312015-03-01T18:21:41.45Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKaFMETA-INF/manifest.xmln0 "]Rq[F U^S:71.(aεP~iUhT4.5YS_Wl0\*ϰ[6{=/N*$v oR`pt֫βlFw=y@?5se5Ihzu ;sPKʾPFPKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFQConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaF-Configurations2/toolpanel/PKaF]6 eThumbnails/thumbnail.pngPKaFBƢ4 y| content.xmlPKaFi??-&Pictures/10000000000000FA000000FAD6A15225.jpgPKaF+#T$+! efsettings.xmlPKaFƁ  kstyles.xmlPKaFh zmanifest.rdfPKaFM{{meta.xmlPKaFʾPFMETA-INF/manifest.xmlPKpandoc-1.19.2.4/tests/odt/odt/imageWithCaption.odt0000644000000000000000000010202313155240143020056 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolpanel/PKaF N||Thumbnails/thumbnail.pngPNG  IHDRzACIDATx teǫt:d! eTlAQDaP!"1 *M2l#*0zDaQQAH `!Kg饺癷;9'9=w<9mwUjD X `A~,A ? X `A~,A ?a*KΞ=kXrD:oel+"p| ([VUA@v}>_(§8󊁦ixmBUUA$ f;``0h%}2xm׮+Y9^r8@=U\as!DS{"/gE#"T8&.$ l;RD`H vxX4nw>MFXpM6ǒrHP !r0i2~r(t8qYKȯoSZViVMU4 qy*4`|jw8H猒@7uj^nh]#uQlo-‚/_% ƨ)rINr8.Ԡ>MFXCD9m: F!$7?Äi#F%fJ@8#]W^t$l8ޜǏ]^cc'dA;F]3~9ha55$Ny |ҿ%aGCC}>$}"NY P!&6>XUTllD; l0*jlc)%=ݶmfx+^D7^?<18؆aF. $766Æ ;ZDE {, W$ Cw:+VRQ^ԩAh`CzwS}&3ZDT qBq )K15}Pj^O4~*JnQ4?;Vw(Cp%Wֽlj.((x饗̻3r b1{۶=4SNjFF8ueÆ 3g4 ʲ+ogTvv@-[6O8rS^GO951)auϽt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rnEq#L~0A|7_2Wg3/h72p?W Mp5?WMpݟWMp pmX,Cib~w<7#Orͯ2DusE#b,',tk]cpXoV?^-0_ͤ*0"mC%Ll_g1 ڂ.[tTU-Ul_-8GCKJP 3s9hӵ5N`Q,< RReR`ށ,/A jWs6(gw L5fr{b;W~_?$ r#'6yqS6\5J\/C%.nLNO 0̜k  N"cA Martin Linnemann2015-03-01T17:26:12.312015-03-01T18:21:10.37Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKaFMETA-INF/manifest.xmln0 "]Rq[F U^S:71.(aεP~iUhT4.5YS_Wl0\*ϰ[6{=/N*$v oR`pt֫βlFw=y@?5se5Ihzu ;sPKʾPFPKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFMConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaF-Configurations2/toolpanel/PKaF N||eThumbnails/thumbnail.pngPKaF\v content.xmlPKaFi??-U$Pictures/10000000000000FA000000FAD6A15225.jpgPKaF3gZU$+! .dsettings.xmlPKaFQ_mR istyles.xmlPKaFh Ixmanifest.rdfPKaFymeta.xmlPKaFʾPF}META-INF/manifest.xmlPK2pandoc-1.19.2.4/tests/odt/odt/inlinedCode.odt0000644000000000000000000002363513155240143017052 0ustar0000000000000000PKX\I'Configurations2/accelerator/current.xmlPKPKX\IConfigurations2/floater/PKX\IConfigurations2/images/Bitmaps/PKX\IConfigurations2/menubar/PKX\IConfigurations2/popupmenu/PKX\IConfigurations2/progressbar/PKX\IConfigurations2/statusbar/PKX\IConfigurations2/toolbar/PKX\IConfigurations2/toolpanel/PKX\IMETA-INF/manifest.xmln }zP* `ID`G4ejfc0PmOGx ffm7)4-Dנ0ҚҫhD J//NlfU1B&k^ѡfbNd\vUҹF+m )''8K>P]Cc7`@ E.# |gr1F Îv@t_k<4W'w=-ylME",So^w>p@p=U+|PKY>PKX\IwwThumbnails/thumbnail.pngPNG  IHDRbPLTEwnjpqtsqq~u~zytw}x~ɶĿԻʳ߷ķ˸οѽżȽ°ѽ@ IDATxoqfQVyklҚbVLY6:+JBL!~;di>w<zKpsdCu³awU~=Zs<||i1NՓQfT}r=779UN\ o+a6$OtR2Q8<M;?z1);O$VBʷRTޝn߿5ܼݫϴw*۹n߭tBByQ+\o덭r{{\L?Y#55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555_QU$ގ}pIENDB`PKKUhI,V content.xmlX[ϓ0WLn4q1;ӵ/[ci-;{KdAyO}·Kʃ(ͤXdz0A$eGJ& #SI ,[f]ĚXtlH,3+n"V'=6p1dmq~Rdnqڦ6鉜Jh%v=ͰadqL\GcT4%r:aR\q"FsTaS0x3B|b{PNV y'#Imq0|*)(тdJXbom#uߋ{–0ړ0X`ߗ.vBoUHrzCtwubHG]΃3TٚbbQd0zĚțRv.gZ5⏘Mw*9\\ qrw.-_t/ {IՃYXïWQw1pKk$s㶍 (t沼ܤt+^?;yw?εkٍrSQy +n>tPa$t䆉"%jiVfmmFa- i>\ 7 u$=kW Mj٢d(Նе\8[0|\m{qPK|PKX\I^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKX\I settings.xmlZ[s:~?"{!m$ 7a/HrV2)5<1+oW+(Qޕ./*3!F\NJM_8i Ҝk0g])ULs],]7ao;eٕrvW|~1@5)_j~4D9CUeOUEl1NYRyWV|cj~moW sn 9[]K++j}wz 1)eBwIr[q./<2ӽT |2ݿj`DcК29a(ҽQ)ёMs 0\jބC6C'u.=GRӍ6壏(p*| 5TV^ٳI1" гrXKVbҥ^ HXHnsAc3!Z,}P!PkO;O4KZ wz5ͣ6ֈ]}UkEwAP0]`j 44uAqEѣq2ic'yhRE>@mF螴̓.h@^B)w&BPC3j f1Ea*e0FYD%Նvw*2ei!3_eYe0/DHoC+ujo}t\^!mŝο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{9kgh[GM+-Fq#O}W\`_ޏp8 y-hsSNDo}MT{%\])R5nεƗBWkkPڴs29899OH΂3h&,,gxD;)zx𥾟 ѰT˳MM5bkYnQQ1K _9212yUvBfSV`H˂\$$:}pq7b&=jf${-/Ph5:w@YzFK0N-uL'jO.qtEœ+,s߉k7cBQ> j;oJ+P& (> kM/Gp?Y q< pOȤ/H\ّ鱝:S(jUH-Gξ8 {b$|N2'Ig:Ӽ E*$#=<6Ykk\/1>WwrLۗr"k因GZLsw}]o.'rƴ}_ڦ\tS!tۘ Sg:=mǔ 6+/}t>S.tۘ/ l=rƴC=o˧`ڃʅ'Kµb 9kBR. D]6"cUMETA-INF/manifest.xmlPKX\IwwwThumbnails/thumbnail.pngPK?KUhI,V $content.xmlPKX\Ih N manifest.rdfPKX\I| meta.xmlPKX\I^2 ''mimetypePKX\I5wO( settings.xmlPKX\I [ .styles.xmlPKp#pandoc-1.19.2.4/tests/odt/odt/italic.odt0000644000000000000000000002427213155240143016100 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolpanel/PKaF64(Thumbnails/thumbnail.pngPNG  IHDRzAIDATxA DP@Qj_6J#x5,#& eY& h胢>(胢>(胢>(胢>(#}쯳?1X9MbV9\ʾ=#}l5u݂Q|RAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE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 ׃jk2PFH-\㛅kbM4p9PH-XˆEKpH-\ۅk ZT(D6RhYUWGALȼaydx<2G^-r 78.0=\+{9j饡CE㫟 QbUߋ!o,`K!%X`M. ֽR>te[l {! ktieqKƗ^0%iXadt2zf>^30{0\}EwͿ ;_; JI7 E:pmǎ,^.yFelj>A"7q FtpW]5X9ߗU.y4,0_N4*p"Z [ټ1 %Ț:ֽmsܨp6~t Ρek~Sn@WR;@ryMkNǭ#\7-;Btd -CT JQD2r;3{oxYύN!SpUY&bR}ڏF#đ``p#PuÈgҏw譓+)@="5WHi+Ϧ7y3wG #l9^54Iv)PF~Ngj3̻f&I ʡ&I C]OI>r4wQs3蹘 Rإ`Hq,q[ =); s 3g'/UxЂbA>툃]'nOj8ŤV hه Martin Linnemann2015-03-01T17:26:12.312015-03-01T17:52:32.92Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKaFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFMConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaF-Configurations2/toolpanel/PKaF64(eThumbnails/thumbnail.pngPKaF0LEr xcontent.xmlPKaF'#((+! settings.xmlPKaF Ɇ _styles.xmlPKaFh omanifest.rdfPKaFf*meta.xmlPKaFjҠ">"META-INF/manifest.xmlPKp4$pandoc-1.19.2.4/tests/odt/odt/listBlocks.odt0000644000000000000000000002450513155240143016743 0ustar0000000000000000PK6aF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPK6aFConfigurations2/floater/PK6aF'Configurations2/accelerator/current.xmlPKPK6aFConfigurations2/images/Bitmaps/PK6aFConfigurations2/progressbar/PK6aFConfigurations2/menubar/PK6aFConfigurations2/popupmenu/PK6aFConfigurations2/statusbar/PK6aFConfigurations2/toolbar/PK6aFConfigurations2/toolpanel/PK6aFDݮThumbnails/thumbnail.pngPNG  IHDRzAuIDATxъ0@Q_v"{&]]yTGIcn~_ޚ>(胢>(胢>(胢>(胢ʒ>v[v֯V:܏q;v>[wVəN_~i-۽ݐ0gi}@C%M#)=l8k_F޵;\rjYdi}4lOO28ֱ>FY>g;L7gdf:/||2g_Linq*9Bzˈ%qGL||?׷??(S>ΪoGn :;0ݜ>X<+57g>)E}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PA |VWIENDB`PK6aF content.xmln6} Az:~v-hPJqrSzcII-m"$9C79 Ы׏ e+{l > PY߼"a| `\w̖zveh$!AْK8Zj/=쮌>﬌V$Ώ ;!Yѳ(1Wdyݏ]B7pXxj6*=܌yCwej|ҶR֐VN aS"6'Ro\8w}#'̽[1jFUG)J*ߦ.BP>*`0uz|O`5󌓨,in >2 _&pyz:7fɥ0ctA1 >dJ'tQĄ5c>r63 (5=qs{SFy"SۦHe!8IAe[bYxy@(@N|n e+%:Ef!y_ō=EkK(L^X'њ53Ew9l`,r(#.mE,lEq_ |% [|#HVOq$:xީLl@ W}?0+ 2l(HلԅDG 2رL>AMKwCnI9./{>`vwvevv 2y @D&71Xiq6l6e>3IV!aEovasq)n$7]B>QEW3pgi:A?乇3,f%gccY uh?̟vȝNqI=2cë%si ̴l·u(ư&dRd.c#y=.GcX}lcSjXd.YqM.GcX>]^J0&.h#XFJ0F#h%Zh-c4b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.312015-03-01T17:41:45.06Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PK6aFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PK6aF^2 ''mimetypePK6aFMConfigurations2/floater/PK6aF'Configurations2/accelerator/current.xmlPK6aFConfigurations2/images/Bitmaps/PK6aFConfigurations2/progressbar/PK6aFQConfigurations2/menubar/PK6aFConfigurations2/popupmenu/PK6aFConfigurations2/statusbar/PK6aFConfigurations2/toolbar/PK6aF-Configurations2/toolpanel/PK6aFDݮeThumbnails/thumbnail.pngPK6aFQp Icontent.xmlPK6aFm(+! settings.xmlPK6aFz݋ ' 5styles.xmlPK6aFh manifest.rdfPK6aF)d7meta.xmlPK6aFjҠ">Z#META-INF/manifest.xmlPKp$pandoc-1.19.2.4/tests/odt/odt/orderedListMixed.odt0000644000000000000000000002730213155240143020077 0ustar0000000000000000PK[NI^2 ''mimetypeapplication/vnd.oasis.opendocument.textPK[NI.1Thumbnails/thumbnail.pngPNG  IHDR߃rPLTEXOQ[csaKEgUNkgh`fpoovmposjivphrhxxnttvs~}yrr{v|y|\mkzvvt{u|{v{y|~wsy~w}ibsetp|t{z{u|x}y{}Ũ̩Ӷ³˼½϶μü̶նݸ׻޽ưø˸˺þѽĺ³ļǵͷIDATxkLSgpw19u ٔMS0#LYuzpT:#h.37w`ܼxaaZȤ<4/3i^?Iߞ_70 0 0 0 9jxPU+ʶ*f!R 99DDUGޒ=cAlU7δ^r^LVc> p|Ղ=?K2:_f`1dllImE8(pg;c5F}PR ~MB'Ls1\~/xhX$骥SثFSuzz$ruHT#dU֑Wc<2/?I^fFϟu}7_"Ӹ(~FGNOOL~\sk&~69.fs6ȩxN%KTC DžV[n&䖮Kꔆ7nt٩ 5Jׯk-W=vvOK<]Bc06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b 1HG:0W5K,Fcr=*PKfEP PK[NI manifest.rdf͓n0P]Cc7`@ E.# |gr1F Îv@t_k<4W'w=-ylME",So^w>p@p=U+|PKY>PK[NI^2 ''mimetypePK[NI.1MThumbnails/thumbnail.pngPK[NIc4*J& U content.xmlPK[NI~PN( settings.xmlPK[NI meta.xmlPK[NIfEP styles.xmlPK[NIh %manifest.rdfPK[NI&Configurations2/toolpanel/PK[NI&Configurations2/progressbar/PK[NI7'Configurations2/statusbar/PK[NIo'Configurations2/popupmenu/PK[NI''Configurations2/accelerator/current.xmlPK[NI'Configurations2/floater/PK[NI4(Configurations2/images/Bitmaps/PK[NIq(Configurations2/menubar/PK[NI(Configurations2/toolbar/PK[NIY>(META-INF/manifest.xmlPKp<*pandoc-1.19.2.4/tests/odt/odt/orderedListRoman.odt0000644000000000000000000002672213155240143020112 0ustar0000000000000000PKH]NI^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKH]NIThumbnails/thumbnail.pngPNG  IHDRPLTE[^qieimlutifrkj{ndsoqxqcxnrqupq{{stizt{~~~t}zxy{|yl]falgslwqzv~~~zzu~~uxz̦àʩĬͭв˺ɽ̻ƽ˿δۼѼɹ¹ýɾѽýνǸͻȶsIDATxOeptH7U痩d st(em: mNre"l0=ݜбeMABu0aEF: >EŘ 3^+y>EGPC 5PC 5PC ߆wߓ'79ݒQݠbGd1E i3>KyӍbռ3qfzB@^O.ufU>|AmX8\^úk_:8љy\DŽ?7jn\*bqs$Re3Xg"!Y"7?q.֙MſSfB ]R_mJA\:莣J yyy[ YwF}462 Z}؍+>{ [Va :]'DV]V<}ULF=;ݜSw5_6rj8H҅E|jFMsgLwղLPcKNbiU[UUU3ҙ_Gvތڻf{)V[Tw{g6T ԭ4w!IP6!6$ߺiҫt:nfѹ9MjizŇ"sAK$כnP~FVJ6Aj7^HN!&e5ptGt9gtMQGp̋UvqsT7}*L0S*6>}(bU{'9vug$T;jm|o;(r ~#r%z㔨0}-ܵ0.yϗ?"Ą{GH5PCV{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8LUP#}bHeǘAS>Q <#Vlf(QshXv_mKblOl ղո01U?%e`dAV͖A.!p[!mpM&n_'7#J"oF6?ai1B׍ifH0M˟B1W7ֽǔ ]7{4}t 1w4\1;>rQ@t ]TM*!΍$h`,)ߝ _Td;EwY&Ơ$0GhP`Vp$<iQAJXX>b>Jm%A}<$ 1Oi53 PNG B6N#csS࣌bqVaſZd&,` Y78$+2rxWJe09"3y-/5zHbWK08+Md5YB(@*c0`Ln7Т/P?8LH"|[b{NS^ ĹNNaˀwOJ5jwQHd#H]u79ar1_#xl󳈲ΒOK!\%?PK߹S 5PKH]NI manifest.rdf͓n0P]Cc7`@ E.# |gr1F Îv@t_k<4W'w=-ylME",So^w>p@p=U+|PKY>PKH]NI^2 ''mimetypePKH]NIMThumbnails/thumbnail.pngPKH]NI*&Z& \content.xmlPKH]NI0'Q( settings.xmlPKH]NI2q meta.xmlPKH]NI߹S 5 styles.xmlPKH]NIh $manifest.rdfPKH]NI%Configurations2/toolpanel/PKH]NI &Configurations2/progressbar/PKH]NIG&Configurations2/statusbar/PKH]NI&Configurations2/popupmenu/PKH]NI'&Configurations2/accelerator/current.xmlPKH]NI'Configurations2/floater/PKH]NID'Configurations2/images/Bitmaps/PKH]NI'Configurations2/menubar/PKH]NI'Configurations2/toolbar/PKH]NIY>'META-INF/manifest.xmlPKpL)pandoc-1.19.2.4/tests/odt/odt/orderedListSimple.odt0000644000000000000000000002705113155240143020263 0ustar0000000000000000PKv]NI^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKv]NILAp7Thumbnails/thumbnail.pngPNG  IHDRPLTE[SUEUb^elg^^bgkjmsuigtlj{nlvnpsquppzsq~yt{z}com{h{s|~~m{zvy{yto}o}~|uxzvzΧţɪĭʳųʹ̯շκżʵԳݸнֺ۷°öǸϼĽ½õ½ķüõɼǸȹMIDATxOu@0܃tiхK0ÕB;%cC6hzN3tQ ZZVtv:DI iQH?`ab\vI7Oޟ^nq-jjjb# ,@NzN9(ݱk$wg2Q쵼.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B9 fĤнrz&cˌ7PNLWZ͈I{>1%D͓3{lމ7cR>9 j=uސ5Rgl5PFg} > m+?E%Ǡshѹ1\6Zt. r :WlKx P]Cc7`@ E.# |gr1F Îv@t_k<4W'w=-ylME",So^w>p@p=U+|PKY>PKv]NI^2 ''mimetypePKv]NILAp7MThumbnails/thumbnail.pngPKv]NIy@~B& content.xmlPKv]NI4/Q( settings.xmlPKv]NI|; meta.xmlPKv]NI 2styles.xmlPKv]NIh $manifest.rdfPKv]NI,&Configurations2/toolpanel/PKv]NId&Configurations2/progressbar/PKv]NI&Configurations2/statusbar/PKv]NI&Configurations2/popupmenu/PKv]NI''Configurations2/accelerator/current.xmlPKv]NIe'Configurations2/floater/PKv]NI'Configurations2/images/Bitmaps/PKv]NI'Configurations2/menubar/PKv]NI(Configurations2/toolbar/PKv]NIY>D(META-INF/manifest.xmlPKp)pandoc-1.19.2.4/tests/odt/odt/paragraph.odt0000644000000000000000000002053213155240143016573 0ustar0000000000000000PKnaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKnaF'Configurations2/accelerator/current.xmlPKPKnaFConfigurations2/images/Bitmaps/PKnaFConfigurations2/floater/PKnaFConfigurations2/progressbar/PKnaFConfigurations2/menubar/PKnaFConfigurations2/popupmenu/PKnaFConfigurations2/statusbar/PKnaFConfigurations2/toolbar/PKnaFConfigurations2/toolpanel/PKnaFQ))Thumbnails/thumbnail.pngPNG  IHDRzAIDATxj@@l "lazjFcm,M}PAE}PAE}PAE}PAJcll=o\4a[(crJd7B"˺;U7Yt:k%g?M?xA|n4kxv(2ܾ"=<2q8p(fe>Q.*+>[ S>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>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hA[G[UB]0K7`>!]"BYÔ̮T"z%3Nrn;NcM@vgqkF?)0-ޅ1U{,/ /Ft Ip%u0|3#DH.s}6?B eXdǰOWM 8xP w(JKg Ylr*V`K @V{;7 _q!zo2oHcxKx1%\+C.L{w"2C8wЖpqUA}3݆O9^!ǿH8kל+ Eؾ:n1>A'(=/c Dsa!)!iA^#y23x#`jbѽit(64ZnIok{W栓]çHSPv4?ñm4Ih9\bz?8fPs*ߪ ܨw)qhkr~0HR9u`:#kdxZ?Xpo- M;.V]~ޠ3ѡpI3uwi Zk5^z SPK;)PKnaFh manifest.rdf͓n0 Martin Linnemann2015-03-01T17:26:12.312015-03-01T17:27:28.53Martin LinnemannPT1M17S1OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKnaFjҠ">META-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKnaF^2 ''mimetypePKnaF'MConfigurations2/accelerator/current.xmlPKnaFConfigurations2/images/Bitmaps/PKnaFConfigurations2/floater/PKnaFConfigurations2/progressbar/PKnaFQConfigurations2/menubar/PKnaFConfigurations2/popupmenu/PKnaFConfigurations2/statusbar/PKnaFConfigurations2/toolbar/PKnaF-Configurations2/toolpanel/PKnaFQ))eThumbnails/thumbnail.pngPKF岑  content.xmlPKnaFvU(+! settings.xmlPKnaF;) Fstyles.xmlPKnaFh manifest.rdfPKnaF8Mmeta.xmlPKnaFjҠ">oMETA-INF/manifest.xmlPKppandoc-1.19.2.4/tests/odt/odt/referenceAllInOne.odt0000644000000000000000000002517613155240143020157 0ustar0000000000000000PKhuF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKhuFConfigurations2/floater/PKhuF'Configurations2/accelerator/current.xmlPKPKhuFConfigurations2/images/Bitmaps/PKhuFConfigurations2/progressbar/PKhuFConfigurations2/menubar/PKhuFConfigurations2/popupmenu/PKhuFConfigurations2/statusbar/PKhuFConfigurations2/toolbar/PKhuFConfigurations2/toolpanel/PKhuFwThumbnails/thumbnail.pngPNG  IHDRzA]IDATxj@@ 9DfmkVᜇFӀL`_NM}PAE}PAE}PAE}PAgn#jU]vu[ɲ3ǧ׉ǫåsz[3.>Sʑ>Nb:qiGXSX*$ri_Sl5~׏זan@ uaپl?}zL~ΟΫorPA=}$ǁgZKcHM;|z^ ,?!Fuu~c[O<8vfq\KV/o0; 5~ޛ_:O)胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(DOLIENDB`PKhuF content.xmlZ]6}@TSMH7ZZi]u9$Lmwl0Yҭi sfsb!sAX2}g[8 YDWgbV+im,v"ufoy2eH1MPTSİUTVȮd=e\eGZXWAPgŠq$eq$y)ө{w?p_{~ .rQQaU0l%ꚟVSJΥA*v[& ޹74TA]ATHnZ4x/`/e/k,=)UIyg*Bv@u^oe"|ωļ/CDâ,n*|ީ6-_B^f."ju[1*cC!QRV+Zw:8NEaV&/rȘwe55F(3sv?!4h\9%6>DU#8AstZag3+=77iW,PTR,[ٵcfdo[0) $&h,w'l/mpQ1~gDɒJW6g!!'B|ԔY} !*? I7[B7$J.xǟ1>k|m%{ h\y_ʓLGkҍ1zNz!%4sPi;ҷ CneF.10xY{l.bf[]TIԤ>$XX̠mO3%d5 ob=%T^Q`ٕp Eai_Oqb9F]Ngs#& _ɂ–zI+* zk(7kpwG7kxˈ5pgPn&.W)ĿV-͸XwXCw8l2r:rĚ*W-C\].#׃;Rq3]R`r\zUP9,:.?[u*DD$C S#Uuռi'dҺWM^"OIР7 ={a27ݛjq~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IoD =ӫut0xzu~PKjҠ">PKhuF^2 ''mimetypePKhuFMConfigurations2/floater/PKhuF'Configurations2/accelerator/current.xmlPKhuFConfigurations2/images/Bitmaps/PKhuFConfigurations2/progressbar/PKhuFQConfigurations2/menubar/PKhuFConfigurations2/popupmenu/PKhuFConfigurations2/statusbar/PKhuFConfigurations2/toolbar/PKhuF-Configurations2/toolpanel/PKhuFweThumbnails/thumbnail.pngPKhuF$l ( 1content.xmlPKhuF"[:G' settings.xmlPKhuF8O styles.xmlPKhuFh 1manifest.rdfPKhuFp meta.xmlPKhuFjҠ">$META-INF/manifest.xmlPKp%pandoc-1.19.2.4/tests/odt/odt/referenceToChapter.odt0000644000000000000000000002436713155240143020410 0ustar0000000000000000PKqF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKqFConfigurations2/floater/PKqF'Configurations2/accelerator/current.xmlPKPKqFConfigurations2/images/Bitmaps/PKqFConfigurations2/menubar/PKqFConfigurations2/progressbar/PKqFConfigurations2/popupmenu/PKqFConfigurations2/toolbar/PKqFConfigurations2/statusbar/PKqFConfigurations2/toolpanel/PKqFNcbThumbnails/thumbnail.pngPNG  IHDRzAIDATxJ0 +{/ FiNլ %5||,AE}PAE}PAE}PAE}Px68vrs~xqU 8~#}"XV/uLHуaZ߸~`}Ki渜98?1ج~ϿP.q3R}PAExϏr=^WZ?%Ne1 YdM҇BbȓI_0`B%սX _unlV{'~5/ֽxxx[ {c||_`|g3`_X_~SӺr~j:+秛oh֕(k~*E}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PA IENDB`PKqF content.xmlWn8}W*o2#'6j b,n}3h𢒔e}0tb*Dsf\xNhKaJtrGT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M($)NL >^A0wod8v+, o1>Cpf8tNrnQu3[ur%G4?tcfȗ3m黦 =w$K}uYC*w0J~) {mR85#ˌYa05ILP5 "F%_go'Fb.Na!Pm1iىٜc9 Martin Linnemann2015-03-01T17:26:12.312015-06-09T16:15:06.50Martin LinnemannPT14M39S4OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKqFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKqF^2 ''mimetypePKqFMConfigurations2/floater/PKqF'Configurations2/accelerator/current.xmlPKqFConfigurations2/images/Bitmaps/PKqFConfigurations2/menubar/PKqFMConfigurations2/progressbar/PKqFConfigurations2/popupmenu/PKqFConfigurations2/toolbar/PKqFConfigurations2/statusbar/PKqF-Configurations2/toolpanel/PKqFNcbeThumbnails/thumbnail.pngPKqFDP lcontent.xmlPKqF"z' ( settings.xmlPKqF<3 e ?styles.xmlPKqFh manifest.rdfPKqFYmeta.xmlPKqFjҠ"> #META-INF/manifest.xmlPKpq$pandoc-1.19.2.4/tests/odt/odt/referenceToListItem.odt0000644000000000000000000002514713155240143020551 0ustar0000000000000000PKrF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKrFConfigurations2/floater/PKrF'Configurations2/accelerator/current.xmlPKPKrFConfigurations2/images/Bitmaps/PKrFConfigurations2/progressbar/PKrFConfigurations2/menubar/PKrFConfigurations2/popupmenu/PKrFConfigurations2/statusbar/PKrFConfigurations2/toolbar/PKrFConfigurations2/toolpanel/PKrFmJ33Thumbnails/thumbnail.pngPNG  IHDRzAIDATxѪ@@тA k=Ą ] |04}PAE}PAE}PAE}PAEq>o_nO]bOs[^'nGtX֋<}n>]_TL'{yδ6cX뽕DN8csΈ{6'鄝9U>ַb~C|>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(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?Lɏ;^Hig夁gCK۝ZJK˔=K -=꘥bg~v3;ffk\R*愳[阥'%biN8:ei?ӡLٳ ғYڞӡLXni,iPsEz13Of:;9얶2?L3 b}lHAS/+ !kzGS(S.Օ5(IXpJYodz[R*GXNh @Ze*6. SyhU֥j|}Łt;L&uTٗ;\FTK4T@1A5C%Ö;@!r1fwJZFE w8VNr^)$r۲},b,rwR"#d(0Uxpfe \\+!pn.K \TAj,T=V/ŧG.rՐZkܟhXspp=mtM"W]krpMS \vK\u]͂eEKrH-\ۅk ZP\wm/xM#G]- bB #cѽ<8x'8.0=\R@5kP!eҳ7CXb˹4XRH ִ%XKu//]Y`^y-_{kɥA̯FI}oX+W Lm^> W_@ptA N:mR ncNpt(\gαcs5~ˡ4@st郻@^'W,u*wЅM0\GG s8翰 c؅BOߛFF%Nd6@ $7t :YS0suڼb5@'MxNՒՏn9[_)D敔Lu;P-\m^I" hNG!*DQM($)NL >^A0wod8v+, o1>Cpf8tNrnQu3[ur%G4?tcfȗ3m黦 =w$K}uYC*w0J~) {mR85#ˌYa05ILP5 "F%_go'Fb.Na!Pm1iىٜc9 Martin Linnemann2015-03-01T17:26:12.312015-06-09T16:20:17.89Martin LinnemannPT14M39S4OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKrFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKrF^2 ''mimetypePKrFMConfigurations2/floater/PKrF'Configurations2/accelerator/current.xmlPKrFConfigurations2/images/Bitmaps/PKrFConfigurations2/progressbar/PKrFQConfigurations2/menubar/PKrFConfigurations2/popupmenu/PKrFConfigurations2/statusbar/PKrFConfigurations2/toolbar/PKrF-Configurations2/toolpanel/PKrFmJ33eThumbnails/thumbnail.pngPKrF7;/ content.xmlPKrFr-L' settings.xmlPKrF<3 e styles.xmlPKrFh manifest.rdfPKrFWwY meta.xmlPKrFjҠ">|$META-INF/manifest.xmlPKp%pandoc-1.19.2.4/tests/odt/odt/referenceToText.odt0000644000000000000000000002374013155240143017740 0ustar0000000000000000PK%rF'Configurations2/accelerator/current.xmlPKPK%rFConfigurations2/floater/PK%rFConfigurations2/images/Bitmaps/PK%rFConfigurations2/menubar/PK%rFConfigurations2/popupmenu/PK%rFConfigurations2/progressbar/PK%rFConfigurations2/statusbar/PK%rFConfigurations2/toolbar/PK%rFConfigurations2/toolpanel/PK%rFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PK%rFڞ^Thumbnails/thumbnail.pngPNG  IHDRzAIDATxj0@|WBIh9?Ć^̇xc|n|4}PAE}PAE}PAE}PAE}PVضm=xi+}q)$rictEKZcAzy|:~Kyo>qzO#%,Χ &>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(wv"IENDB`PK*QI5CX content.xmlWM0WX[ժUJVupGj;}BL> [4k5Mƣb:j5M~~L>^MrffDRg+Ӥ4*`Hc.PYYյu{q =l;7L.,n]vn&G7K_[;+ҥ?S\mڹ"Qn͊iY+J#*g,`X_v%R.l 88U] [h5l ވ}#˕=g>`xz`p=^ܴ͈֭Ԛp {zxpgW kҴSHq[ipۼ79[+@EgL5XhZc_޶Nq#te\l]z-}xiQ4SvpWN@ԍJMshtEv37 3g͋iZKۅV.]4G&l.Ls1M@@o#Dr?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c9META-INF/manifest.xmlPK%rFڞ^}Thumbnails/thumbnail.pngPK?*QI5CX content.xmlPK%rFh * manifest.rdfPK%rF>i meta.xmlPK%rF^2 ''mimetypePK%rFQ' settings.xmlPK%rF<3 e styles.xmlPKpZ#pandoc-1.19.2.4/tests/odt/odt/simpleTable.odt0000644000000000000000000002472113155240143017073 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolpanel/PKaF~YooThumbnails/thumbnail.pngPNG  IHDRzA6IDATxnP@ALlVHf > Ə8>^>(胢>(胢>(胢>(lp8}<_}ѦM/uy'N5_gccne.fZ~2A afCpqhս]ly!8Xɲ"X~3n]?ΎG/<>S_v|(w<m~x9燯n,7} `>3]&u /v<[™?ƀAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}P>A݊IENDB`PK@F. ˁ content.xmlo6+ a$˿)$ۀn-1JH:o+;_2RdʑIfx=19ocں\Lk;-,"b|;r\`9 $b2ƉtCHKy'bbzΒ'XLd8a)N m=2-Bic^6uֶ_4k>sfl{G:k[T}Κ: Ιz"I$mJN|Zy㱟]4BS'~~acƧm퐒e<üqjDTwqؑƵWFFoMF~\_mjMҶTX2T`hnekDbn{CD2,K |e;]eDt"9W7-Ƙ_ w/m%n|A+?A]GmѡknKaxTP"W2ƠzbozpOLnW{c>>uڟ{m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innemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKaFjҠ">META-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFMConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaF-Configurations2/toolpanel/PKaF~YooeThumbnails/thumbnail.pngPK@F. ˁ  content.xmlPKaF _~$,!  settings.xmlPKaF Ɇ vstyles.xmlPKaFh manifest.rdfPKaFM<meta.xmlPKaFjҠ">#META-INF/manifest.xmlPKpK%pandoc-1.19.2.4/tests/odt/odt/simpleTableWithCaption.odt0000644000000000000000000002423413155240143021244 0ustar0000000000000000PKXXdI^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKXXdIZThumbnails/thumbnail.pngPNG  IHDRkPLTE_ivoaxtvyxy]dfxyz}~ͽ̽ľɶƴŶºĽ½-L#IDATxO@`DEE1Edq 8ݪ :8D"*`˔7F_%#>^ܓ틎bQSSSSSSSSSSwQ]=.k.EbvRL~mVM6eFZy6ùnSQܵDVGꙛ7NΟʼKM_WNTlX¥r4 ;kBU>][#J]Z*?GvBR7f֣ϫQ|E}[_W[;#kΜ?s,yC~5_:7p969~6髭?tq7Db\vuwl2F:*L'3t6u7HoR!IENDB`PKXXdI content.xmlXo6~_!6&MEa@[AKM"5~GR)Eդ@Ǻxw<6gHE8 ODJj~~+ ?.~YF")su\N;KcU19QNbQ}tlrwl֚lPcm-طN%,7PbQ& y52ʿõEPUUj6r&jI+J,*Ma,d4A{lN4`}J̗D ũjpFlVGB>Y:xgoc>r&W 2BHZ ަCB1pjN={$T DD6&M7PG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/K6>C&Cچ[&6 qL84oeC@4xZ._v ެr vdG;=XcK홍==Kx3O46mE͓+,s߉k7cB> j9ސRWl5PW} 6lO_q/@ 3}߃=x/@k+}F I_#ޡ9S_(4GvH-w#g_8+b|N2ǮC&_Bw# ItLjiBM-~kk?b|Z3#:>1iQdxcHQ?h1tԠodS?&1>>((,Vhfu:VGmNt(oF, Ep3M"CQ!y>{(yTfS#2_)XWq[xCjDiYS%B 9s0 y - %O#Ä$—QHHVG4 Bp HL ~cTv~WT1H6tqU}(cE:Ҏ6?(,"UPK PKXXdI manifest.rdf͓n0P]Cc7`@ E.# |gr1F Îv@t_k<4W'w=-ylME",So^w>p@p=U+|PKY>PKXXdI^2 ''mimetypePKXXdIZMThumbnails/thumbnail.pngPKXXdI=? Vcontent.xmlPKXXdImQ( @ settings.xmlPKXXdItmeta.xmlPKXXdI  styles.xmlPKXXdIh `manifest.rdfPKXXdI Configurations2/toolpanel/PKXXdI Configurations2/progressbar/PKXXdI!Configurations2/statusbar/PKXXdII!Configurations2/popupmenu/PKXXdI!Configurations2/menubar/PKXXdI!Configurations2/toolbar/PKXXdI!Configurations2/floater/PKXXdI'#"Configurations2/accelerator/current.xmlPKXXdIz"Configurations2/images/Bitmaps/PKXXdIY>"META-INF/manifest.xmlPKp$pandoc-1.19.2.4/tests/odt/odt/strikeout.odt0000644000000000000000000002452613155240143016666 0ustar0000000000000000PKÆaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKÆaFConfigurations2/floater/PKÆaF'Configurations2/accelerator/current.xmlPKPKÆaFConfigurations2/images/Bitmaps/PKÆaFConfigurations2/menubar/PKÆaFConfigurations2/progressbar/PKÆaFConfigurations2/popupmenu/PKÆaFConfigurations2/toolbar/PKÆaFConfigurations2/statusbar/PKÆaFConfigurations2/toolpanel/PKÆaFvhThumbnails/thumbnail.pngPNG  IHDRzAIDATxj0@ _vPBc:'`<IE}]p 郢>(胢>(胢>(胢>(cY :j굷qh;8k2NyjdO8<\Ff>3}x<: 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饡CE㫟 QbUߋ!o,`K!%X`M. ֽR>te[l {! ktieqKƗ^0%iXadt2zf>^30{0\}EwͿ ;_; JI7 E:pmǎ,^.yFelj>A"7q FtpW]5X9ߗU.y4,0_N4*p"Z [ټ1 %Ț:ֽmsܨp6~t Ρek~Sn@WR;@ryMkNǭ#\7-;Btd -CT JQD2r;3{oxYύN!SpUY&bR}ڏF#đ``p#PuÈgҏw譓+)@="5WHi+Ϧ7y3wG #l9^54Iv)PF~Ngj3̻f&I ʡ&I C]OI>r4wQs3蹘 Rإ`Hq,q[ =); s 3g'/UxЂbA>툃]'nOj8ŤV hه Martin Linnemann2015-03-01T17:26:12.312015-03-01T17:54:07.06Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKÆaFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKÆaF^2 ''mimetypePKÆaFMConfigurations2/floater/PKÆaF'Configurations2/accelerator/current.xmlPKÆaFConfigurations2/images/Bitmaps/PKÆaFConfigurations2/menubar/PKÆaFMConfigurations2/progressbar/PKÆaFConfigurations2/popupmenu/PKÆaFConfigurations2/toolbar/PKÆaFConfigurations2/statusbar/PKÆaF-Configurations2/toolpanel/PKÆaFvheThumbnails/thumbnail.pngPKÆaFŽv content.xmlPKÆaFГ*,! settings.xmlPKÆaF Ɇ styles.xmlPKÆaFh manifest.rdfPKÆaF-aJmeta.xmlPKÆaFjҠ">k#META-INF/manifest.xmlPKp$pandoc-1.19.2.4/tests/odt/odt/table.odt0000644000000000000000000002501313155240143015714 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolpanel/PKaF~YooThumbnails/thumbnail.pngPNG  IHDRzA6IDATxnP@ALlVHf > Ə8>^>(胢>(胢>(胢>(lp8}<_}ѦM/uy'N5_gccne.fZ~2A afCpqhս]ly!8Xɲ"X~3n]?ΎG/<>S_v|(w<m~x9燯n,7} `>3]&u /v<[™?ƀAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}P>A݊IENDB`PKaF content.xmln6} C P@?bvYd(Z i dmAKMU[COR~HȶdҊ989C7?w!e3t =p9>[ozM OuCn{$wGxl{g֚SbM7% iz-oqaweu{`^|fe)u"Y) "A8:𷙵6 :}/0yU?Y3+af9 8 9oX>o?U6^.~68YO_i(XR z [{݉/P?1܌d[߮oճXbxZ)ņjo~~ `v׊,3eX 7![ܢ"( srfaY8Uް&تqA0&sc"*L..(_%%+/Yv q~%{޲=XO? 2r.<̟6L^{T墍]\/Ke`mθW ˨؅sqQr$.lF6tr\bʰ۸ ^Tfƍl Jr=*q9qi0d2ݱ0qR#hb4Z1A-`FPC,F#)j hu``44j hb4ڂ1A `FPS,F#%ԕKS4O =f=,'(om%\rqVzBi\yzBKqU22gJZbE4NQWNR\aUQWR\+a*U* a/? e2Gc`Q(XFh.4VS?2GpA0\Fh ,4 ? efѪ=(^H:a;0q΂X&kQ zЕ#k) JOy`Ý7ك|OTzROIIØN9T9̦0C_"lfC;56C^}|eZ:+q iH r}CWb+{2S=ӧ2*r ;^g7r|01pzs>aWPK^SlFwPKaF settings.xmlZs8~"wJa:H37a/XHr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ffi\R*愳[혥%biN8:ei ˡLٳ YڙCR4'ғYUiP{$=혙SKJМpvKۃNzh FPZN1>I?u,XېI=5)}K-uGg{Y,8[*goh:aKJ AH ;\fT%aa*ʾtTpvP8{$*QphjxIw(&p1&wT#k0h"kzed.YqNJc-BK"-h*"ι"|W+ %2B2 oT]\u%ekU C*H-Tjh9#u",^;< p,\#k/myjH-\7 ׃jk2PFH-\㛅kbM4p9PH-XˆEKpH-\ۅk ZT(D6RhYUWGALȼaydx<2G^-r 78.0=\+{9j饡CE㫟 QbUߋ!o,`K!%X`M. ֽR>te[l {! ktieqKƗ^0%iXadt2zf>^30{0\}EwͿ ;_; JI7 E:pmǎ,^.yFelj>A"7q FtpW]5X9ߗU.y4,0_N4*p"Z [ټ1 %Ț:ֽmsܨp6~t Ρek~Sn@WR;@ryMkNǭ#\7-;Btd -CT JQD2r;3{oxYύN!SpUY&bR}ڏF#đ``p#PuÈgҏw譓+)@="5WHi+Ϧ7y3wG #l9^54Iv)PF~Ngj3̻f&I ʡ&I C]OI>r4wQs3蹘 Rإ`Hq,q[ =); s 3g'/UxЂbA>툃]'nOj8ŤV hه Martin Linnemann2015-03-01T17:26:12.312015-03-01T17:45:24.40Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKaFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFMConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaF-Configurations2/toolpanel/PKaF~YooeThumbnails/thumbnail.pngPKaF^SlFw content.xmlPKaF _~$,! R settings.xmlPKaF Ɇ styles.xmlPKaFh manifest.rdfPKaFM<meta.xmlPKaFjҠ"> $META-INF/manifest.xmlPKp%pandoc-1.19.2.4/tests/odt/odt/tableWithCaption.odt0000644000000000000000000002457713155240143020104 0ustar0000000000000000PKҊaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKҊaFConfigurations2/floater/PKҊaF'Configurations2/accelerator/current.xmlPKPKҊaFConfigurations2/images/Bitmaps/PKҊaFConfigurations2/progressbar/PKҊaFConfigurations2/menubar/PKҊaFConfigurations2/popupmenu/PKҊaFConfigurations2/statusbar/PKҊaFConfigurations2/toolbar/PKҊaFConfigurations2/toolpanel/PKҊaF =UȧThumbnails/thumbnail.pngPNG  IHDRzAnIDATxN@@ђ \f'-Mcy{_W郢>(胢>(胢>(胢>(#}{g{2tbOr9i}!eәgS|ű|r*f٪e71\}lgOm:ӵpKly)8ZɺËAwX9gS`yn ;O\{ozvS^8?|dOz w>N~7s?vp}Oa󥿵 s;ڀ>v|pf1W"U3ϗ?c"e!_\zZ@a؟?nYdrO)胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢>(胢;LIENDB`PKҊaF content.xmlXn6+-C m5"E,ۂ6},ˎl+n5||3䈾h p%o`G ʸ_Hnlbe&LI#& ۸2UpJI-KUrѩ+X]܎l;V,كљU`EQ37وdPx\~)!UU s2&f (&3d456Ks6%YSнȪY{WrGwmxvz/ڱ9=9"Zy߹vK*y{ݎWJ5T]@ؠx8:4[pvΨ`* q#LwB=c d{- 0?N4ʍ2%aJ Ҷfln yйβN(ҹ q%Kջp=\j X[/ ܭ WInP4,UPudɺ51̰%3 ɀ 3 Hc³q?P9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MM;P#Bm^I" hNG!*EQC(&gOEܤ^ANPw7lSHL1ULq8(<tpqefJJ+0iax}S/͡3mI1{oȆ>'벆0.)0IԜ/qgqy`@j4jT ~bA7}-^b.Ii!ÉT'l1iى؞c9g Martin Linnemann2015-03-01T17:26:12.312015-03-01T18:22:37.29Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKҊaFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKҊaF^2 ''mimetypePKҊaFMConfigurations2/floater/PKҊaF'Configurations2/accelerator/current.xmlPKҊaFConfigurations2/images/Bitmaps/PKҊaFConfigurations2/progressbar/PKҊaFQConfigurations2/menubar/PKҊaFConfigurations2/popupmenu/PKҊaFConfigurations2/statusbar/PKҊaFConfigurations2/toolbar/PKҊaF-Configurations2/toolpanel/PKҊaF =UȧeThumbnails/thumbnail.pngPKҊaF? Bcontent.xmlPKҊaFqR'  settings.xmlPKҊaFa 9 styles.xmlPKҊaFh 3manifest.rdfPKҊaF!brmeta.xmlPKҊaFjҠ">#META-INF/manifest.xmlPKp$pandoc-1.19.2.4/tests/odt/odt/tableWithContents.odt0000644000000000000000000002116113155240143020266 0ustar0000000000000000PK)II^2 ''mimetypeapplication/vnd.oasis.opendocument.textPK)IIv֯Thumbnails/thumbnail.pngPNG  IHDR߃rlPLTEyzʺ·ŸDBIIDATx[@ P(EFT|?&L9mfnU`````````````|hSlR#o*__^~:YL98vhvkad)MlR1cw ]^͟ 2^Xo%7I|Rc```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````xbc}IENDB`PK)II content.xmlXQo8~_=DHHm&vJ'ړm!&$~6!4]i![fgS:Xa.fx8r8 YDd:_ݱ8&!")ΤLD`3Y "PE À8Z6:k\mkײ6lѢl[G}j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ȝoQp)GikQ!Fb̌*X$Vk\b0ܗHcIߝu[0BJ]}4B`!S/i#yN%J AKFQ-p"v$q_!%-晞]>T(K5M^m]ү;+)}\zrR1o ZIw=l%^Fn05N`ww8SE'JRR?yE0dyb>~L djx omIh2r ۬& )"R^]Kbjt'}Rr\7lWH0\(Jt`}kphiƹ/˝:ϫ|n`w@C{v(܃`C븿0*ەLŭ nX|r빜"  {H-0)!w:.gZfN5P_ ^eAD K?=EM-b:ND兼z}ٰs6[ %oqsLu?]!dN +~IH^mZCM;L;鿆 K"Po02)i4+Rl2`H4%L*|ڟ{<Ӧ,%/Av_9J^ CEx7E ElZhicrZNbi1{9-gB\̋ yEݻ/UȡFm>4g,ǎH&cnimf0^5!XuQ' nѴC&ڀX&1IW-oݘ0J`a$x";>nqҨ}p邴Ɂo ynx0k`<c`|ۍ50yc/z0^tcƷo enx0^`xu o  |q0}c = /)rϘYBEa5aL]s5s-{ g5kcΰ깞pq9H+Dj='Ǩ~x^jҖ2E\U*ặ!Z}ȷ{yFX s^RRGK$V z]N>D)ȞK<7^,#`}Mu,J#IЊ3'I>)zf>P* 4tppO 8VJ(QO<;uꐼ)B.cxab9uTXߕGS-WNxzL\jHT}T%Cf'6ZO_PKl 4;PK)II manifest.rdf͓n0P]Cc7`@ E.# |gr1F Îv@t_k<4W'w=-ylME",So^w>p@p=U+|PKY>PK)II^2 ''mimetypePK)IIv֯MThumbnails/thumbnail.pngPK)II7 }content.xmlPK)II̔N( bsettings.xmlPK)II. meta.xmlPK)IIl 4; styles.xmlPK)IIh 5manifest.rdfPK)IItConfigurations2/popupmenu/PK)IIConfigurations2/statusbar/PK)IIConfigurations2/toolbar/PK)IIConfigurations2/menubar/PK)IIPConfigurations2/floater/PK)II'Configurations2/accelerator/current.xmlPK)IIConfigurations2/toolpanel/PK)IIConfigurations2/progressbar/PK)IIOConfigurations2/images/Bitmaps/PK)IIY>META-INF/manifest.xmlPKppandoc-1.19.2.4/tests/odt/odt/textMixedStyles.odt0000644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:i9d穳q4<&l$MRe״aTC$Ie2.e9.{$hH^Un|KښrF Sd*- >1P^fڑЂAA 78IA {R(dbk`A-eTg`tGAx 1"ʩ>PMasjcr'e+~bo#arru>v׋f7)4-k'm|o=T+;6]gƳؙwʏNb_R MBm5 uޚV\$~qiSׂ_J!~eH[~1>7Zn߼-ȫ#}[Lλ;rkE/ȫ#J,ֿKgW.\rQ#3:}@NsS*(IPӌ=I#&y樵i.79\ *; MJHI8Nil3{T /0\s73erdKYȏn'ݧkck. #[|A+p{JAAZ1S%+ *0-NL$y^$EE툟 -a)T(ב]ktP@'djcqpYv c(DVCy*W BsuaketZ*G\IAĵ6a=satC'wԃԍO7o\;փk`|0y01]w܃܍  7Ƌk`<WNc5]/t|nW8cc7 Anlsq)k`֧kJ2B\UBY%֍Z&/2j-^ڊwBb5yS D \xo=aښF2EYg}!{k='IBMǺ07:y[;/.L#+Iϒf [è;wWmf8C^gYg ؜0LwB1e|ߠ1ܡ8jJ\40fxLu{܇RqByjg׵R>("+[-'H<7?F6 ViG:eMءaFEO[g˙t?rPKc)+ >PKRI manifest.rdf͓n0P]Cc7`@ E.# |gr1F Îv@t_k<4W'w=-ylME",So^w>p@p=U+|PKY>PKRI^2 ''mimetypePKRI! PGGMThumbnails/thumbnail.pngPKRIIreO content.xmlPKRI*xO( h settings.xmlPKRI=2!meta.xmlPKRIc)+ > styles.xmlPKRIh  manifest.rdfPKRIN!Configurations2/toolpanel/PKRI!Configurations2/progressbar/PKRI'!Configurations2/accelerator/current.xmlPKRI"Configurations2/floater/PKRIM"Configurations2/images/Bitmaps/PKRI"Configurations2/menubar/PKRI"Configurations2/toolbar/PKRI"Configurations2/statusbar/PKRI.#Configurations2/popupmenu/PKRIY>f#META-INF/manifest.xmlPKp$pandoc-1.19.2.4/tests/odt/odt/trackedChanges.odt0000644000000000000000000002557713155240143017552 0ustar0000000000000000PKmaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKmaFConfigurations2/floater/PKmaF'Configurations2/accelerator/current.xmlPKPKmaFConfigurations2/images/Bitmaps/PKmaFConfigurations2/menubar/PKmaFConfigurations2/progressbar/PKmaFConfigurations2/popupmenu/PKmaFConfigurations2/toolbar/PKmaFConfigurations2/statusbar/PKmaFConfigurations2/toolpanel/PKmaF@b11Thumbnails/thumbnail.pngPNG  IHDRzAIDATxAj@@;y&RKDbb~E[EAM܏8_oM}PAE}PAE}PAE}PAynD";n07ODi-Hj$wc#';aL}> ITw-{T*?Aqm*r~QqUM0<`'ƶ2,89owF]v6a$ɝ4Ea SmyO_wi]7ITt&♏>N oIm>0Ar'˃`FLM{hugX<21[ݨR Գci5FS.‡b?Dk+(/Lh9-pi37+KK| Pd>~iG/z#ow> 6zO+Ĕ}[ S<0>y޾}|f`ǩl@# WW#5u+7s2qqc  ߧnuFYM4o#/\iXSpe⚚&>#qi`fq7Di_ds!Řa`"ZQZ\<ӸX?m׾˝/tiu5e$D!/"$3[soej,c, g֔ i ``lڌKrޗ<50!65wrI#Zr566ӆ%i r͸daͬk}CZb#& daq!+k1o FLɜ.hchXFI0Z#$t:Ek5bA'h\LF5~bA'hXFY0Z# t:Ek5rF0=?绨!9™L C4#- k-֕*`Zu1*a>W0X\-+aU)tƸtj]h J,5Ƹ4j]h R,WCc|#\Z, ?zK¥^Gpi_\iC_>,?zK=åGpiW#\Zɷpd5 Ń Ϩž- )0{/P4|>v&׋:h@ eՄD!]'p1"B`KFWcǝtw qRXh4zI`a3Ϋ]QzqY<"L_&R])_ G b xV uzN;H3jIw#ͬ9GbȊIv:oEI~T{.ee^{>#ɨcGwK/qOFʻd#uap |ZixIPKcerPKmaF settings.xmlZs8~"wBBۻI4$0@ {jdG!XҮ?oWe"^@iڻ<@q9&W8ZY4CS-U _{-dd [,kʕ_k/6&m|ռ~l6fjr燪*fUb3zw4㷯 7Xۜ?ۭ]{aj5lݯkiM06#fk7ڇ){q'tO&y\Fyq=1.FQ|A39`(ImTɎ…;``񵄥5.#XBkPZaE[[FQzm'߾l|j6'K>\\$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nemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKmaFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKmaF^2 ''mimetypePKmaFMConfigurations2/floater/PKmaF'Configurations2/accelerator/current.xmlPKmaFConfigurations2/images/Bitmaps/PKmaFConfigurations2/menubar/PKmaFMConfigurations2/progressbar/PKmaFConfigurations2/popupmenu/PKmaFConfigurations2/toolbar/PKmaFConfigurations2/statusbar/PKmaF-Configurations2/toolpanel/PKmaF@b11eThumbnails/thumbnail.pngPKmaFcer content.xmlPKmaF?9%,! settings.xmlPKmaF֡e  styles.xmlPKmaFh 4 manifest.rdfPKmaFRs!meta.xmlPKmaFjҠ">%META-INF/manifest.xmlPKp&pandoc-1.19.2.4/tests/odt/odt/underlined.odt0000644000000000000000000002442113155240143016760 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaFConfigurations2/toolpanel/PKaFeSThumbnails/thumbnail.pngPNG  IHDRzAIDATxъ@@фMq 5(M |'}|4}PAE}PAE}PAE}PAE#}Lζ,n?9 o:xֲvxT$֣c]We7M3^v;anB7|j/}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PA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EwͿ ;_; JI7 E:pmǎ,^.yFelj>A"7q FtpW]5X9ߗU.y4,0_N4*p"Z [ټ1 %Ț:ֽmsܨp6~t Ρek~Sn@WR;@ryMkNǭ#\7-;Btd -CT JQD2r;3{oxYύN!SpUY&bR}ڏF#đ``p#PuÈgҏw譓+)@="5WHi+Ϧ7y3wG #l9^54Iv)PF~Ngj3̻f&I ʡ&I C]OI>r4wQs3蹘 Rإ`Hq,q[ =); s 3g'/UxЂbA>툃]'nOj8ŤV hه Martin Linnemann2015-03-01T17:26:12.312015-03-01T17:52:49.65Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PKaFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/progressbar/PKaFQConfigurations2/menubar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolbar/PKaF-Configurations2/toolpanel/PKaFeSeThumbnails/thumbnail.pngPKaF6|t content.xmlPKaFV}*,! R settings.xmlPKaF Ɇ styles.xmlPKaFh manifest.rdfPKaFbk8meta.xmlPKaFjҠ">&#META-INF/manifest.xmlPKp$pandoc-1.19.2.4/tests/odt/odt/unicode.odt0000644000000000000000000002701313155240143016255 0ustar0000000000000000PKTF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKTFConfigurations2/floater/PKTF'Configurations2/accelerator/current.xmlPKPKTFConfigurations2/images/Bitmaps/PKTFConfigurations2/progressbar/PKTFConfigurations2/menubar/PKTFConfigurations2/popupmenu/PKTFConfigurations2/statusbar/PKTFConfigurations2/toolbar/PKTFConfigurations2/toolpanel/PKTFRʱ::Thumbnails/thumbnail.png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LinnemannOpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PT4M47S1PKTFMETA-INF/manifest.xmlAn E9Ŷ2YU(Nz$,őj\5Vv lvggh%s3ͱ&Y[vL,ΐǼoؘ6,,S}Ҿy9?&]x2\O 8Ղ谽~8&(hX^cSҲ7Q~tvzաn^f ϪFw@j7PKM MPKTF^2 ''mimetypePKTFMConfigurations2/floater/PKTF'Configurations2/accelerator/current.xmlPKTFConfigurations2/images/Bitmaps/PKTFConfigurations2/progressbar/PKTFQConfigurations2/menubar/PKTFConfigurations2/popupmenu/PKTFConfigurations2/statusbar/PKTFConfigurations2/toolbar/PKTF-Configurations2/toolpanel/PKTFRʱ::eThumbnails/thumbnail.pngPKTF4Fwv>: content.xmlPKTF|lW' settings.xmlPKTFQ` styles.xmlPKTFh 3#manifest.rdfPKTF r$meta.xmlPKTFM M"(META-INF/manifest.xmlPKp)pandoc-1.19.2.4/tests/odt/odt/unorderedList.odt0000644000000000000000000002244113155240143017452 0ustar0000000000000000PKaF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKaFConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaFConfigurations2/toolpanel/PKaFŊThumbnails/thumbnail.pngPNG  IHDRzAIDATxJ@@ +²%48r1b$'ޯ~,M}PAE}PAE}PAE}PAelooo_}>tk>/v˶o)fe?Gq5 9_˿}`>\هqu}c+7o>+1o=fq&YUL]XLWM<1ڨ>w8[nߝwRwA/؁˙O)Ki_hx8|vm]([s;dk/OFY\be]ǿ͘geb}fkӇ?/>[w+t帮zFx}lֻȂfϧMO'Sokz|9bqSʐ>x u|&Եܟ};ޖc1ܼr Vc>̘O ApFͧgy<"e O0RAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PAE}PA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D =ӫut0xzu~PKjҠ">PKaF^2 ''mimetypePKaFMConfigurations2/floater/PKaF'Configurations2/accelerator/current.xmlPKaFConfigurations2/images/Bitmaps/PKaFConfigurations2/menubar/PKaFMConfigurations2/progressbar/PKaFConfigurations2/popupmenu/PKaFConfigurations2/toolbar/PKaFConfigurations2/statusbar/PKaF-Configurations2/toolpanel/PKaFŊeThumbnails/thumbnail.pngPKF7_8iC?  content.xmlPKaF9?'+! settings.xmlPKaFl.. mstyles.xmlPKaFh manifest.rdfPKaFbmeta.xmlPKaFjҠ">6META-INF/manifest.xmlPKp pandoc-1.19.2.4/tests/odt/odt/variable.odt0000644000000000000000000002514313155240143016416 0ustar0000000000000000PK؉aF^2 ''mimetypeapplication/vnd.oasis.opendocument.textPK؉aFConfigurations2/floater/PK؉aF'Configurations2/accelerator/current.xmlPKPK؉aFConfigurations2/images/Bitmaps/PK؉aFConfigurations2/menubar/PK؉aFConfigurations2/progressbar/PK؉aFConfigurations2/popupmenu/PK؉aFConfigurations2/toolbar/PK؉aFConfigurations2/statusbar/PK؉aFConfigurations2/toolpanel/PK؉aF@}Thumbnails/thumbnail.pngPNG  IHDRzA_IDATx! @+? q`b{f\|PAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPfZ<>IENDB`PK؉aF content.xmln6} Ckbq@df-Q QJTEʗ]wEk(r"Ј#n!760+cd  _b΍7C\I2!!<:Ki]I. .C@dΒD0̣ee:llkhwn=#h7ۺ—/j9#uwDY0 _όEKnvbطGNEN%1N\dž=Fv@'|)Iq J7~'yqHNx'n96ȍLJC-AݱR91jOSz !E"@n4p8s{{}#㒻s)VUF60FiQb!艀-ͅ3uOvÓ ppFMRəF$fxLNk\|z kǮ[ә|gn~{t: wIM"#1E!ƋDR,.G-L8t<@|yG?)r}n1Ğ.J 0ZǨ.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4Puli4m LAiRѴ \ӣӴ=( ̞\Sk\Rj愓kzrcNgM9~)Ms^eJEӂprMOoLLʔ9䚞ݘ'0-jz%HoLӹN%hN8-T=cz(S*cT]%gm,+uI͙HYrkRy e ˠ$[.-=$Pu hc֠\"uNFw=GgU;\E aa*^e۫pf7FizL:j<0͎9\;\%\=k|^Ϣ;VIwךkIe+eY>uY H7 \]l\t%eiU3C*H#T㫅j4@XV\t55L58>v9yjH#\W `YUNH#\ӫk6i#XB"`ͮ, "-ˡB"pͯ14P\vm/hjFuud44 7,GFNqKYOp%).0=H^)wj~nrѳA7CXb5`K!%X` ֽRte;$`;5>7X2H ִ#Xsu/aԯFIoX*h ٛ{a&`&`OJn+X&@@nQ6&Y[ݧUoŒX?5`I!|P.Dbh?qn \_dY>^-0_͕*p"ko@rEw}ƀ k fNl@W,n ЩkS-V7} ,/qj" hJʭ:2P-\m_5@E.Bt<M;yD5"zKb8$\z,Ftn`|-RhȘre"+e#N, WdBam%NLdEX\׀⦞ P\$86D*xj-Tb̊EIL/=]KSAPv[QuSY.,`"y#)Pi^8`:azN~ \'G Cxw HVJTJLN%*B#"`a(05 G^Շ5>v9 Oml8F\AB/Cʼn.́iN\O 0̜SKKAK$* y9[͔.V)&nt37ž=u| .9!Ր#_)Y JCe3*kł*PK֡e PK؉aF manifest.rdf͓n0 Martin Linnemann2015-03-01T17:26:12.312015-03-01T18:14:48.45Martin LinnemannPT10M3S2OpenOffice/4.0.1$Win32 OpenOffice.org_project/401m5$Build-9714PK؉aFMETA-INF/manifest.xmln }zP& `ID`G*ɶtZlNGx fbSh$siR@U4Qr%i;I~5XyPpFtbъ8b/ Nt5dm):TL0üʛƴ)\ŵPZ t 1a“z pT v^}HQ{/ofOIoD =ӫut0xzu~PKjҠ">PK؉aF^2 ''mimetypePK؉aFMConfigurations2/floater/PK؉aF'Configurations2/accelerator/current.xmlPK؉aFConfigurations2/images/Bitmaps/PK؉aFConfigurations2/menubar/PK؉aFMConfigurations2/progressbar/PK؉aFConfigurations2/popupmenu/PK؉aFConfigurations2/toolbar/PK؉aFConfigurations2/statusbar/PK؉aF-Configurations2/toolpanel/PK؉aF@}eThumbnails/thumbnail.pngPK؉aFFfH.p 3content.xmlPK؉aF+#T$+! z settings.xmlPK؉aF֡e  styles.xmlPK؉aFh manifest.rdfPK؉aFjX meta.xmlPK؉aFjҠ">x$META-INF/manifest.xmlPKp%pandoc-1.19.2.4/tests/odt/markdown/bold.md0000644000000000000000000000003013155240143016403 0ustar0000000000000000Here comes **bold** textpandoc-1.19.2.4/tests/odt/markdown/citation.md0000644000000000000000000000003713155240143017304 0ustar0000000000000000Some text[@Ex] with a citation.pandoc-1.19.2.4/tests/odt/markdown/endnote.md0000644000000000000000000000006213155240143017124 0ustar0000000000000000Some text[^1] with an endnote. [^1]: Endnote textpandoc-1.19.2.4/tests/odt/markdown/externalLink.md0000644000000000000000000000010213155240143020123 0ustar0000000000000000Here comes an [external link](http://example.com/) to example.com.pandoc-1.19.2.4/tests/odt/markdown/footnote.md0000644000000000000000000000006313155240143017326 0ustar0000000000000000Some text[^1] with a footnote. [^1]: Footnote textpandoc-1.19.2.4/tests/odt/markdown/headers.md0000644000000000000000000000013613155240143017105 0ustar0000000000000000# A header (Lv 1) A paragraph ## Another header (Lv 2) Another paragraph # Back to Level 1pandoc-1.19.2.4/tests/odt/markdown/horizontalRule.md0000644000000000000000000000000313155240143020504 0ustar0000000000000000---pandoc-1.19.2.4/tests/odt/markdown/image.md0000644000000000000000000000005113155240143016550 0ustar0000000000000000![](10000000000000FA000000FAD6A15225.jpg)pandoc-1.19.2.4/tests/odt/markdown/imageIndex.md0000644000000000000000000000017213155240143017544 0ustar0000000000000000# Abbildungsverzeichnis Abbildung 1: Image caption ![Abbildung 1: Image caption](10000000000000FA000000FAD6A15225.jpg) pandoc-1.19.2.4/tests/odt/markdown/imageWithCaption.md0000644000000000000000000000010313155240143020720 0ustar0000000000000000![Abbildung 1: Image caption](10000000000000FA000000FAD6A15225.jpg)pandoc-1.19.2.4/tests/odt/markdown/italic.md0000644000000000000000000000003013155240143016730 0ustar0000000000000000Here comes *italic* textpandoc-1.19.2.4/tests/odt/markdown/listBlocks.md0000644000000000000000000000076113155240143017607 0ustar0000000000000000 Indented text in a list. This is a numbered block.It contains several paragraphs of text.Like this.Next item.pandoc-1.19.2.4/tests/odt/markdown/paragraph.md0000644000000000000000000000010613155240143017434 0ustar0000000000000000This is a paragraph. This is another paragraph. This is a third one.pandoc-1.19.2.4/tests/odt/markdown/strikeout.md0000644000000000000000000000005113155240143017517 0ustar0000000000000000Here comes text that was ~~striken out~~.pandoc-1.19.2.4/tests/odt/markdown/trackedChanges.md0000644000000000000000000000004113155240143020373 0ustar0000000000000000Some text with and inserted text.pandoc-1.19.2.4/tests/odt/markdown/underlined.md0000644000000000000000000000003413155240143017620 0ustar0000000000000000Here comes *underlined* textpandoc-1.19.2.4/tests/odt/native/blockquote.native0000644000000000000000000000011213155240143020166 0ustar0000000000000000[Para [Str "Normal"],BlockQuote [Para [Str "Indented",Space,Str "(1cm)"]]]pandoc-1.19.2.4/tests/odt/native/image.native0000644000000000000000000000017213155240143017106 0ustar0000000000000000[Para [Image ("",[],[("width","5.292cm"),("height","5.292cm")]) [] ("Pictures/10000000000000FA000000FAD6A15225.jpg","")]] pandoc-1.19.2.4/tests/odt/native/imageIndex.native0000644000000000000000000000030213155240143020071 0ustar0000000000000000[Para [Image ("",[],[("width","5.292cm"),("height","5.292cm")]) [Str "Abbildung",Space,Str "1:",Space,Str "Image",Space,Str "caption"] ("Pictures/10000000000000FA000000FAD6A15225.jpg","fig:")]] pandoc-1.19.2.4/tests/odt/native/imageWithCaption.native0000644000000000000000000000030213155240143021253 0ustar0000000000000000[Para [Image ("",[],[("width","5.292cm"),("height","5.292cm")]) [Str "Abbildung",Space,Str "1:",Space,Str "Image",Space,Str "caption"] ("Pictures/10000000000000FA000000FAD6A15225.jpg","fig:")]] pandoc-1.19.2.4/tests/odt/native/inlinedCode.native0000644000000000000000000000024013155240143020235 0ustar0000000000000000[Para [Str "Here",Space,Str "comes",Space,Code ("",[],[]) "inlined code",Space,Str "text",Space,Str "and",Space,Code ("",[],[]) "an another",Space,Str "one."]] pandoc-1.19.2.4/tests/odt/native/orderedListMixed.native0000644000000000000000000000146113155240143021275 0ustar0000000000000000Pandoc (Meta {unMeta = fromList []}) [OrderedList (1,Decimal,Period) [[Plain [Str "A",Space,Str "list",Space,Str "item"]],[Plain [Str "A",Space,Str "second"]],[Para [Str "A",Space,Str "third"],OrderedList (1,Decimal,Period) [[Para [Str "New",Space,Str "level!"],OrderedList (1,LowerAlpha,OneParen) [[Plain [Str "And",Space,Str "another!"]],[Plain [Str "It's",Space,Str "great",Space,Str "up",Space,Str "here!"]]]],[Plain [Str "Oh",Space,Str "noes"]],[Plain [Str "We",Space,Str "fell!"]]]],[Plain [Str "Maybe",Space,Str "someone"]],[Plain [Str "Pushed",Space,Str "us?"]]],Para [],OrderedList (4,Decimal,Period) [[Plain [Str "Start",Space,Str "new",Space,Str "list,",Space,Str "but",Space,Str "a",Space,Str "different",Space,Str "starting",Space,Str "point."]] ,[Plain [Str "Because",Space,Str "we",Space,Str "can."]]]]pandoc-1.19.2.4/tests/odt/native/orderedListRoman.native0000644000000000000000000000146713155240143021311 0ustar0000000000000000Pandoc (Meta {unMeta = fromList []}) [OrderedList (1,UpperRoman,Period) [[Plain[Str "A",Space,Str "list",Space,Str "item"]],[Plain [Str "A",Space,Str "second"]],[Para [Str "A",Space,Str "third"],OrderedList (1,UpperRoman,Period) [[Para [Str "New",Space,Str "level!"],OrderedList (1,UpperRoman,Period) [[Plain [Str "And",Space,Str "another!"]],[Plain [Str "It's",Space,Str "great",Space,Str "up",Space,Str "here!"]]]],[Plain [Str "Oh",Space,Str "noes"]],[Plain [Str "We",Space,Str "fell!"]]]],[Plain [Str "Maybe",Space,Str "someone"]],[Plain [Str "Pushed",Space,Str "us?"]]],Para [],OrderedList (4,UpperRoman,Period) [[Plain [Str "Start",Space,Str "new",Space,Str "list,",Space,Str "but",Space,Str "a",Space,Str "different",Space,Str "starting",Space,Str "point."]] ,[Plain [Str "Because",Space,Str "we",Space,Str "can."]]]]pandoc-1.19.2.4/tests/odt/native/orderedListSimple.native0000644000000000000000000000145413155240143021462 0ustar0000000000000000Pandoc (Meta {unMeta = fromList []}) [OrderedList (1,Decimal,Period) [[Plain [Str "A",Space,Str "list",Space,Str "item"]],[Plain [Str "A",Space,Str "second"]],[Para [Str "A",Space,Str "third"],OrderedList (1,Decimal,Period) [[Para [Str "New",Space,Str "level!"],OrderedList (1,Decimal,Period) [[Plain [Str "And",Space,Str "another!"]],[Plain [Str "It's",Space,Str "great",Space,Str "up",Space,Str "here!"]]]],[Plain [Str "Oh",Space,Str "noes"]],[Plain [Str "We",Space,Str "fell!"]]]],[Plain [Str "Maybe",Space,Str "someone"]],[Plain [Str "Pushed",Space,Str "us?"]]],Para [],OrderedList (4,Decimal,Period) [[Plain [Str "Start",Space,Str "new",Space,Str "list,",Space,Str "but",Space,Str "a",Space,Str "different",Space,Str "starting",Space,Str "point."]] ,[Plain [Str "Because",Space,Str "we",Space,Str "can."]]]]pandoc-1.19.2.4/tests/odt/native/referenceToChapter.native0000644000000000000000000000060213155240143021572 0ustar0000000000000000[Header 1 ("a-chapter",[],[]) [Span ("anchor",[],[]) [],Str "A",Space,Str "chapter"],Para [Str "Some",Space,Str "text."],Header 1 ("another-chapter",[],[]) [Str "Another",Space,Str "chapter"],Para [Str "A",Space,Str "reference",Space,Str "to",Space,Str "."],Para [Str "A",Space,Str "reference",Space,Str "to",Space,Link ("",[],[]) [Str "A",Space,Str "chapter"] ("#anchor",""),Str "."]] pandoc-1.19.2.4/tests/odt/native/referenceToListItem.native0000644000000000000000000000051013155240143021734 0ustar0000000000000000[OrderedList (1,Decimal,Period) [[Plain [Span ("anchor",[],[]) [],Str "A",Space,Str "list",Space,Str "item"]],[Plain [Str "Another",Space,Str "list",Space,Str "item"]]],Para [Str "A",Space,Str "reference",Space,Str "to",Space,Str "list",Space,Str "item",Space,Link ("",[],[]) [Str "1."] ("#anchor",""),Str "."],Para [],Para []] pandoc-1.19.2.4/tests/odt/native/referenceToText.native0000644000000000000000000000053013155240143021130 0ustar0000000000000000[Para [Span ("an anchor",[],[]) [],Str "Some",Space,Str "text."],Para [Str "A",Space,Str "reference",Space,Str "to",Space,Link ("",[],[]) [Str "Some",Space,Str "text"] ("#an anchor",""),Str "."],Para [Str "Some",Space,Str "text",LineBreak,Str "Another",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "link",Span ("anchor",[],[]) []]] pandoc-1.19.2.4/tests/odt/native/simpleTable.native0000644000000000000000000000020613155240143020263 0ustar0000000000000000[Table [] [AlignDefault,AlignDefault] [0.0,0.0] [[],[]] [[[Plain [Str "Content"]],[Plain [Str "More",Space,Str "content"]]]],Para []] pandoc-1.19.2.4/tests/odt/native/simpleTableWithCaption.native0000644000000000000000000000036513155240143022443 0ustar0000000000000000[Table [Str "Table",Space,Str "1:",Space,Str "Some",Space,Str "caption",Space,Str "for",Space,Str "a",Space,Str "table"] [AlignDefault,AlignDefault] [0.0,0.0] [[],[]] [[[Plain [Str "Content"]],[Plain [Str "More",Space,Str "content"]]]],Para []] pandoc-1.19.2.4/tests/odt/native/tableWithContents.native0000644000000000000000000000022013155240143021457 0ustar0000000000000000[Table [] [AlignDefault,AlignDefault] [0.0,0.0] [[],[]] [[[Plain [Str "A"]],[Plain [Str "B"]]],[[Plain [Str "C"]],[Plain [Str "D"]]]],Para []] pandoc-1.19.2.4/tests/odt/native/textMixedStyles.native0000644000000000000000000000112113155240143021176 0ustar0000000000000000[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "simple",Space,Str "text"] ,Para [] ,Para [Str "that",Space,Str "is",Space,Str "both",Space,Emph [Str "italic",Space],Strong [Str "bold",Space],Emph [Str "underlined",Space],Str "and",Space,Str "the",Space,Emph [Strong [Str "first",Space,Str "two"]],Space,Str "and",Space,Str "the",Space,Emph [Strong [Str "last",Space,Str "two",Space]],Space,Str "and",Space,Strong [Strikeout [Str "bold",Space,Str "and",Space,Str "line",Space,Str "through"]]] ,Para [] ,Para [Str "And",Space,Str "with",Space,Superscript [Emph [Str "superscripts"]]]] pandoc-1.19.2.4/tests/odt/native/unicode.native0000644000000000000000000000011713155240143017451 0ustar0000000000000000[Para [Str "\8220\8221\8217\231\1256\169\188\1074\1073\1060\1064\246\201\181"]]pandoc-1.19.2.4/tests/odt/native/unorderedList.native0000644000000000000000000000072513155240143020653 0ustar0000000000000000[BulletList [[Plain [Str "A",Space,Str "list",Space,Str "item"]],[Plain [Str "A",Space,Str "second"]],[Para [Str "A",Space,Str "third"],BulletList [[Para [Str "New",Space,Str "level!"],BulletList [[Plain [Str "And",Space,Str "another!"]],[Plain [Str "It's",Space,Str "great",Space,Str "up",Space,Str "here!"]]]],[Plain [Str "Oh",Space,Str "noes"]],[Plain [Str "We",Space,Str "fell!"]]]],[Plain [Str "Maybe",Space,Str "someone"]],[Plain [Str "Pushed",Space,Str "us?"]]]]

                    z27>J[FͮD=rA,[ ʅ3ՀrK}/ʥ7,  cA`GJ!ʭnhTrNYީ\tS +G¸%iᣖԬD#z~V* 0U݅z,ߛ#CG$umlKC`<eHY vW޲|4*ђK(;weKsAPb|yy!WZى {+/wF'MD$P2>l8}~7f^m'gɘCta^۹y; ?2+O_[ASS˧|=]%掶iȞIݳEn?Gl uhܰ/)[,FEs1qj˵*-T.*{jmpZiZ8'JQƅK+TֱF}!4(`fneJ{s0K/1kg09y'R?5wvi"2iߟJ2t۩w ]-.@dLp.ɣEt= Ato<\pZ q6,~3a:8Lo3ҋ3,p䨝KWnlZ\VyN? k;cuqɪ_\j\o92f3tٌ y(?f\W<`m%$q(&K3{BNA*c8R7`!3o^Z& v5 ZԻ`ضDo M4d׭]s>lA28 >"f׳Sk^WhFYc֪7`]&/s\{kcWA8$#+P.*MkyQD[}||SLըM\s >`!˜[iU˷rQ*{MPU߀mJ“G.ljA/mpg ߢ~ j aI, #+VB+:Cri1Ȼ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 b_:JlN/~V8x#:Gȇ59X' 'PK i(@META-INF/container.xmlU;n0DkĶD Q$ j%v JۇIO9y%oZphg ~۵N8gZU9YV6'øP2ģm!3<;]ծ"yR -:b>[x?oS<6'PUFuF10m-S)/\gV>uPK i(@oa,mimetypePK  .@wCמ=>:EPUB/wasteland-content.xhtmlPK ;'?!CB5>EPUB/wasteland-cover.jpgPK 3(@yVMTWEPUB/wasteland-nav.xhtmlPK ݍ-@6EPUB/wasteland-night.cssPK `2@ɜscEPUB/wasteland.cssPK (@S,/EPUB/wasteland.ncxPK e2@hs1=9EPUB/wasteland.opfPK i(@META-INF/container.xmlPK Vpandoc-1.19.2.4/tests/epub/features.native0000644000000000000000000004411213155240142016522 0ustar0000000000000000[Para [Span ("front.xhtml",[],[]) []] ,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",SoftBreak,Str "on",Space,RawInline (Format "html") "",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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,Str "the",Space,Link ("",[],[]) [Str "test",Space,Str "suite",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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,",SoftBreak,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:",SoftBreak,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",[],[]) []] ,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]"],SoftBreak,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}",SoftBreak,Math DisplayMath "\\sum\\limits_{n = 1}^{\\infty}\\frac{1}{n^{2}} = \\frac{\\pi^{2}}{6}",SoftBreak,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),",SoftBreak,Str "the",Space,Str "test",Space,Str "passes."]] ,Div ("content-mathml-001.xhtml#mathml-020",["section","otest"],[]) [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],SoftBreak,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",SoftBreak,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]"],SoftBreak,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",SoftBreak,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]"],SoftBreak,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",SoftBreak,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]"],SoftBreak,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",SoftBreak,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]"],SoftBreak,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]"],SoftBreak,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]"],SoftBreak,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]"],SoftBreak,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."] ,Plain [Span ("",["math"],[("xmlns","http://www.w3.org/1998/Math/MathML")]) [SoftBreak,Str "3",SoftBreak,Str "435.3",SoftBreak,Str "1306",SoftBreak,Str "12",SoftBreak,Str "10",SoftBreak,Str "9",SoftBreak,Str "16",SoftBreak,Str "15",SoftBreak,Str "1.0",SoftBreak,Str "9",SoftBreak,Str "1",SoftBreak]] ,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",[],[]) []] ,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",SoftBreak,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]"],SoftBreak,Span ("",["test-id"],[]) [Str "switch-020"],SoftBreak,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 "."]]]] pandoc-1.19.2.4/tests/epub/formatting.native0000644000000000000000000017403713155240142017070 0ustar0000000000000000[Para [Span ("front.xhtml",[],[]) []] ,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",SoftBreak,Str "on",Space,RawInline (Format "html") "",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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,Str "the",Space,Link ("",[],[]) [Str "test",Space,Str "suite",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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,",SoftBreak,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:",SoftBreak,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",[],[]) []] ,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",[],[]) []] ,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",[],[]) []] ,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",[],[]) []] ,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",[],[]) []] ,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",[],[]) []] ,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") "",Strong [Str "Lorem",Space,Str "Ipsum"],Space,RawInline (Format "html") "",Str "(",RawInline (Format "html") "",RawInline (Format "html") "",Str "Lorem",Space,Str "Ipsum",RawInline (Format "html") "",RawInline (Format "html") "",Str ")",RawInline (Format "html") "",RawInline (Format "html") ""] ,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") "",Strong [Str "Lorem",Space,Str "Ipsum"],Space,RawInline (Format "html") "",Str "(",RawInline (Format "html") "",RawInline (Format "html") "",Str "Lorem",Space,Str "Ipsum",RawInline (Format "html") "",RawInline (Format "html") "",Str ")",RawInline (Format "html") "",RawInline (Format "html") ""] ,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") "",Strong [Str "Lorem",Space,Str "Ipsum"],Space,RawInline (Format "html") "",Str "(",RawInline (Format "html") "",RawInline (Format "html") "",Str "Lorem",Space,Str "Ipsum",RawInline (Format "html") "",RawInline (Format "html") "",Str ")",RawInline (Format "html") "",RawInline (Format "html") ""] ,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."]]]] pandoc-1.19.2.4/tests/epub/wasteland.native0000644000000000000000000040102313155240142016664 0ustar0000000000000000[Para [Image ("",[],[]) [] ("wasteland-cover.jpg","")] ,Para [Span ("wasteland-content.xhtml",[],[]) []] ,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",SoftBreak,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") "" ,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",SoftBreak,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",SoftBreak,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.",SoftBreak,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",SoftBreak,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,",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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 "-",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,Str "night."]]] ,RawBlock (Format "html") "" ,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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,Str "Quam,",Space,Str "quae",SoftBreak,Str "contingit",Space,Str "maribus,'",Space,Str "dixisse,",Space,Str "'voluptas.'",LineBreak,Str "Illa",Space,Str "negat;",Space,Str "placuit",SoftBreak,Str "quae",Space,Str "sit",Space,Str "sententia",Space,Str "docti",LineBreak,Str "Quaerere",Space,Str "Tiresiae:",Space,Str "venus",Space,Str "huic",Space,Str "erat",SoftBreak,Str "utraque",Space,Str "nota.",LineBreak,Str "Nam",Space,Str "duo",Space,Str "magnorum",Space,Str "viridi",Space,Str "coeuntia",Space,Str "silva",LineBreak,Str "Corpora",Space,Str "serpentum",Space,Str "baculi",Space,Str "violaverat",Space,Str "ictu",LineBreak,Str "Deque",Space,Str "viro",Space,Str "factus,",SoftBreak,Str "mirabile,",Space,Str "femina",Space,Str "septem",LineBreak,Str "Egerat",Space,Str "autumnos;",Space,Str "octavo",Space,Str "rursus",SoftBreak,Str "eosdem",LineBreak,Str "Vidit",Space,Str "et",Space,Str "'est",Space,Str "vestrae",Space,Str "si",Space,Str "tanta",Space,Str "potentia",Space,Str "plagae,'",LineBreak,Str "Dixit",Space,Str "'ut",Space,Str "auctoris",Space,Str "sortem",Space,Str "in",Space,Str "contraria",Space,Str "mutet,",LineBreak,Str "Nunc",Space,Str "quoque",Space,Str "vos",SoftBreak,Str "feriam!'",Space,Str "percussis",Space,Str "anguibus",Space,Str "isdem",LineBreak,Str "Forma",Space,Str "prior",Space,Str "rediit",SoftBreak,Str "genetivaque",Space,Str "venit",Space,Str "imago.",LineBreak,Str "Arbiter",Space,Str "hic",Space,Str "igitur",Space,Str "sumptus",Space,Str "de",Space,Str "lite",SoftBreak,Str "iocosa",LineBreak,Str "Dicta",Space,Str "Iovis",Space,Str "firmat;",Space,Str "gravius",Space,Str "Saturnia",Space,Str "iusto",LineBreak,Str "Nec",SoftBreak,Str "pro",Space,Str "materia",Space,Str "fertur",Space,Str "doluisse",Space,Str "suique",LineBreak,Str "Iudicis",Space,Str "aeterna",Space,Str "damnavit",SoftBreak,Str "lumina",Space,Str "nocte,",LineBreak,Str "At",Space,Str "pater",Space,Str "omnipotens",Space,Str "(neque",Space,Str "enim",Space,Str "licet",Space,Str "inrita",SoftBreak,Str "cuiquam",LineBreak,Str "Facta",Space,Str "dei",Space,Str "fecisse",Space,Str "deo)",Space,Str "pro",Space,Str "lumine",Space,Str "adempto",LineBreak,Str "Scire",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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,",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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") "" ,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",SoftBreak,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",SoftBreak,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.",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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):",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,Str "auf",Space,Str "dem",LineBreak,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",SoftBreak,Str "Abgrund",Space,Str "entlang",LineBreak,Str "und",Space,Str "singt",Space,Str "dazu,",Space,Str "singt",Space,Str "betrunken",Space,Str "und",Space,Str "hymnisch",SoftBreak,Str "wie",Space,Str "Dmitri",Space,Str "Karamasoff",Space,Str "sang.",LineBreak,Str "Ueber",Space,Str "diese",Space,Str "Lieder",Space,Str "lacht",Space,Str "der",SoftBreak,Str "Bsrger",Space,Str "beleidigt,",Space,Str "der",Space,Str "Heilige",LineBreak,Str "und",Space,Str "Seher",Space,Str "hrt",Space,Str "sie",Space,Str "mit",SoftBreak,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",SoftBreak,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,",SoftBreak,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",SoftBreak,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",SoftBreak,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,Str "Ere",Space,Str "the",Space,Str "worm",Space,Str "pierce",Space,Str "your",Space,Str "winding-sheet,",SoftBreak,Str "ere",Space,Str "the",Space,Str "spider",LineBreak,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,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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"],SoftBreak,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,Str "'que",Space,Str "vos",Space,Str "guida",Space,Str "al",Space,Str "som",Space,Str "de",SoftBreak,Str "l'escalina,",LineBreak,Str "'sovegna",Space,Str "vos",Space,Str "a",Space,Str "temps",Space,Str "de",Space,Str "ma",Space,Str "dolor.'",LineBreak,Str "Poi",SoftBreak,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")]) [SoftBreak,Emph [Str "Quando",Space,Str "fiam",Space,Str "ceu",Space,Str "chelidon"],SoftBreak],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"],SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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:",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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",SoftBreak,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.",SoftBreak,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",SoftBreak,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,",SoftBreak,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",SoftBreak,Str "decay",Space,Str "of",Space,Str "eastern",Space,Str "Europe."]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] pandoc-1.19.2.4/tests/txt2tags.t2t0000644000000000000000000005356413155240143014770 0ustar0000000000000000Txt2tags Markup Rules author date %!includeconf: rules.conf This document describes all the details about each txt2tags mark. The target audience are **experienced** users. You may find it useful if you want to master the marks or solve a specific problem about a mark. If you are new to txt2tags or just want to know which are the available marks, please read the [Markup Demo MARKUPDEMO]. Note 1: This document is generated directly from the txt2tags test-suite. All the rules mentioned here are 100% in sync with the current program code. Note 2: A good practice is to consult [the sources rules.t2t] when reading, to see how the texts were made. Table of Contents: %%TOC ------------------------------------------------------------- = Paragraph =[paragraph] %INCLUDED(t2t) starts here: ../../../test/marks/paragraph.t2t %%% Syntax: Lines grouped together A paragraph is composed by one or more lines. A blank line (or a table, or a list) ends the current paragraph. %%% Syntax: Leading and trailing spaces are ignored Leading and trailing spaces are ignored. %%% Syntax: A comment don't close a paragraph A comment line can be placed inside a paragraph. % this comment will be ignored It will not affect it. %%% Closing: EOF closes the open paragraph The end of the file (EOF) closes the currently open paragraph. = Comment =[comment] %INCLUDED(t2t) starts here: ../../../test/marks/comment.t2t %%% Syntax: The % character at the line beginning (column 1) %glued with the % mark % separated from the % mark % very distant from the % mark %%%%%%% lots of % marks % a blank comment, used for vertical spacing: % % NOTE: what matters is the first % being at the line beginning, % the rest of the line is just ignored. %%% Syntax: Area (block) %%% You're not seeing this. %%% %%% Syntax: Area (block) with trailing spaces %%% You're not seeing this. %%% %%% Invalid: The % in any other position % not on the line beginning (at column 2) some text % half line comments are not allowed = Line =[line] %INCLUDED(t2t) starts here: ../../../test/marks/line.t2t %%% Syntax: At least 20 chars of - = _ -------------------- ==================== ____________________ %%% Syntax: Any kind of mixing is allowed %% Free mixing is allowed to make the line, %% but the first char is the identifier for %% the difference between separator ( - _ ) %% and strong ( = ) lines. =========----------- -_-_-_-_-_-_-_-_-_-_ =-=-=-=-=-=-=-=-=-=- =------------------= --------====-------- %%% Syntax: Leading and/or trailing spaces are allowed -------------------- -------------------- -------------------- %%% Invalid: Less than 20 chars (but strike matches) --------- %%% Invalid: Strange chars (but strike matches) --------- ---------- ---------+---------- ( -------------------- ) = Inline =[inline] %INCLUDED(t2t) starts here: ../../../test/marks/inline.t2t %%% Syntax: Marks are greedy and must be "glued" with contents %% GLUED: The contents must be glued with the marks, no spaces %% between them. Right after the opening mark there must be a %% non-blank character, as well as right before the closing mark. %% %% GREEDY: If the contents boundary character is the same as %% the mark character, it is considered contents, not mark. %% So ""****bold****"" turns to ""**bold**"" in HTML. i) **b** //i// __u__ --s-- ``m`` ""r"" ''t'' i) **bo** //it// __un__ --st-- ``mo`` ""ra"" ''tg'' i) **bold** //ital// __undr__ --strk-- ``mono`` ""raw"" ''tggd'' i) **bo ld** //it al// __un dr__ --st rk-- ``mo no`` ""r aw"" ''tg gd'' i) **bo * ld** //it / al// __un _ dr__ --st - rk-- ``mo ` no`` ""r " aw"" ''tg ' gd'' i) **bo **ld** //it //al// __un __dr__ --st --rk-- ``mo ``no`` ""r ""aw"" ''tg ''gd'' i) **bo ** ld** //it // al// __un __ dr__ --st -- rk-- ``mo `` no`` ""r "" aw"" ''tg '' gd'' i) ****bold**** ////ital//// ____undr____ ----strk---- ````mono```` """"raw"""" ''''tggd'''' i) ***bold*** ///ital/// ___undr___ ---strk--- ```mono``` """raw""" '''tggd''' %%% Syntax: Repetition is greedy %% When the mark character is repeated many times, %% the contents are expanded to the largest possible. %% Thats why they are greedy, the outer marks are %% the ones used. i) ***** ///// _____ ----- ````` """"" ''''' i) ****** ////// ______ ------ `````` """""" '''''' i) ******* /////// _______ ------- ``````` """"""" ''''''' i) ******** //////// ________ -------- ```````` """""""" '''''''' i) ********* ///////// _________ --------- ````````` """"""""" ''''''''' i) ********** ////////// __________ ---------- `````````` """""""""" '''''''''' %%% Invalid: No contents i) **** //// ____ ---- ```` """" '''' i) ** ** // // __ __ -- -- `` `` "" "" '' '' %%% Invalid: Contents not "glued" with marks %% Spaces between the marks and the contents in any side %% invalidate the mark. i) ** bold** // ital// __ undr__ -- strk-- `` mono`` "" raw"" '' tggd'' i) **bold ** //ital // __undr __ --strk -- ``mono `` ""raw "" ''tggd '' i) ** bold ** // ital // __ undr __ -- strk -- `` mono `` "" raw "" '' tggd '' = Link =[link] %INCLUDED(t2t) starts here: ../../../test/marks/link.t2t %%% Syntax: E-mail user@domain.com user@domain.com. user@domain.com. any text. any text: user@domain.com. any text. [label user@domain.com] %%% Syntax: E-mail with form data user@domain.com?subject=bla user@domain.com?subject=bla. user@domain.com?subject=bla, user@domain.com?subject=bla&cc=otheruser@domain.com user@domain.com?subject=bla&cc=otheruser@domain.com. user@domain.com?subject=bla&cc=otheruser@domain.com, [label user@domain.com?subject=bla&cc=otheruser@domain.com]. [label user@domain.com?subject=bla&cc=otheruser@domain.com.]. %%% Syntax: URL http://www.domain.com http://www.domain.com/dir/ http://www.domain.com/dir/// http://www.domain.com. http://www.domain.com, http://www.domain.com. any text. http://www.domain.com, any text. http://www.domain.com/dir/. any text. any text: http://www.domain.com. any text. any text: http://www.domain.com/dir/. any text. any text: http://www.domain.com/dir/index.html. any text. any text: http://www.domain.com/dir/index.html, any text. %%% Syntax: URL with anchor http://www.domain.com/dir/#anchor http://www.domain.com/dir/index.html#anchor http://www.domain.com/dir/index.html#anchor. http://www.domain.com/dir/#anchor. any text. http://www.domain.com/dir/index.html#anchor. any text. any text: http://www.domain.com/dir/#anchor. any text. any text: http://www.domain.com/dir/index.html#anchor. any text. %%% Syntax: URL with form data http://domain.com?a=a@a.a&b=a+b+c. http://domain.com?a=a@a.a&b=a+b+c, http://domain.com/bla.cgi?a=a@a.a&b=a+b+c. http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@. %%% Syntax: URL with form data and anchor http://domain.com?a=a@a.a&b=a+b+c.#anchor http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.#anchor %%% Syntax: URL with login data http://user:password@domain.com/bla.html. http://user:password@domain.com/dir/. http://user:password@domain.com. http://user:@domain.com. http://user@domain.com. %%% Syntax: URL with login, form and anchor http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c@#anchor %%% Syntax: URL with label [label www.domain.com] %%% Syntax: URL with label (trailing spaces are discarded, leading are maintained) %TODO normalize this behavior [ label www.domain.com] [label www.domain.com] %%% Syntax: URL with label, stressing [anchor http://www.domain.com/dir/index.html#anchor.] [login http://user:password@domain.com/bla.html] [form http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.] [form & anchor http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor] [login & form http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.] %%% Syntax: Link with label for local files [local link up ..] [local link file bla.html] [local link anchor #anchor] [local link file/anchor bla.html#anchor] [local link file/anchor bla.html#anchor.] [local link img abc.gif] %%% Syntax: Another link as a label [www.fake.com www.domain.com] %%% Syntax: URL with funny chars http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_- http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_-1%. http://foo._user-9:pass!#$%&*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_-1%. %%% Test: Various per line http://L1.com ! L2@www.com ! [L3 www.com] ! [L4 w@ww.com] ! www.L5.com %%% Feature: Guessed link, adding protocol automatically www.domain.com www2.domain.com ftp.domain.com WWW.DOMAIN.COM FTP.DOMAIN.COM [label www.domain.com] [label ftp.domain.com] [label WWW.DOMAIN.COM] [label FTP.DOMAIN.COM] %%% Invalid: Trailing space on link [label www.domain.com ] %%% Invalid: Label with ] char (use postproc) [label] www.domain.com] = Image =[image] %INCLUDED(t2t) starts here: ../../../test/marks/image.t2t %%% Syntax: Image name inside brackets: [img] [img.png] %%% Syntax: Image pointing to a link: [[img] link] [[img.png] http://txt2tags.org] %%% Align: Image position is preserved when inside paragraph [img.png] Image at the line beginning. Image in the middle [img.png] of the line. Image at the line end. [img.png] %%% Align: Image alone with spaces around is aligned [img.png] [img.png] [img.png] %%% Test: Two glued images with no spaces (left & right) [img.png][img.png] %%% Test: Various per line Images [img.png] mixed [img.png] with [img.png] text. Images glued together: [img.png][img.png][img.png]. %%% Invalid: Spaces inside are not allowed [img.png ] [ img.png] [ img.png ] % Ignored as they change every time when run = Numbered Title =[numtitle] %%% Syntax: Balanced equal signs (from 1 to 5) + Title Level 1 + ++ Title Level 2 ++ +++ Title Level 3 +++ ++++ Title Level 4 ++++ +++++ Title Level 5 +++++ %%% Label: Between brackets, alphanumeric [A-Za-z0-9_-] + Title Level 1 +[lab_el-1] ++ Title Level 2 ++[lab_el-2] +++ Title Level 3 +++[lab_el-3] ++++ Title Level 4 ++++[lab_el-4] +++++ Title Level 5 +++++[lab_el-5] %%% Syntax: Spaces around and/or inside are allowed (and ignored) +++Title Level 3+++ +++ Title Level 3 +++ +++ Title Level 3 +++ +++ Title Level 3 +++ +++ Title Level 3 +++ +++ Title Level 3 +++[lab_el-9] %%% Invalid: Unbalanced equal signs +Not Title ++Not Title+ +++Not Title++++ %%% Invalid: Level deeper than 5 ++++++Not Title 6++++++ +++++++Not Title 7+++++++ %%% Invalid: Space between title and label +Not Title+ [label1] %%% Invalid: Space inside label +Not Title+[ label ] %%% Invalid: Strange chars inside label +Not Title+[la/bel] = Title =[title] %INCLUDED(t2t) starts here: ../../../test/marks/title.t2t %%% Syntax: Balanced equal signs (from 1 to 5) = Title Level 1 = == Title Level 2 == === Title Level 3 === ==== Title Level 4 ==== ===== Title Level 5 ===== %%% Label: Between brackets, alphanumeric [A-Za-z0-9_-] = Title Level 1 =[lab_el-1] == Title Level 2 ==[lab_el-2] === Title Level 3 ===[lab_el-3] ==== Title Level 4 ====[lab_el-4] ===== Title Level 5 =====[lab_el-5] %%% Syntax: Spaces around and/or inside are allowed (and ignored) ===Title Level 3=== === Title Level 3 === === Title Level 3 === === Title Level 3 === === Title Level 3 === === Title Level 3 ===[lab_el-9] %%% Invalid: Unbalanced equal signs =Not Title ==Not Title= ===Not Title==== %%% Invalid: Level deeper than 5 ======Not Title 6====== =======Not Title 7======= %%% Invalid: Space between title and label =Not Title= [label1] %%% Invalid: Space inside label =Not Title=[ label ] %%% Invalid: Strange chars inside label =Not Title=[la/bel] = Quote =[quote] %INCLUDED(t2t) starts here: ../../../test/marks/quote.t2t To quote a paragraph, just prefix it by a TAB character. All the lines of the paragraph must begin with a TAB. Any non-tabbed line closes the quote block. %%% Nesting: Creating deeper quotes The number of leading TABs identifies the quote block depth. This is quote level 1. With two TABs, we are on the quote level 2. The more TABs, more deep is the quote level. There isn't a limit. %%% Nesting: Reverse nesting works This quote starts at level 4. Then its depth is decreased. Counting down, one by one. Until the level 1. %%% Nesting: Random count Unlike lists, any quote block is independent, not part of a tree. The TAB count don't need to be incremental by one. The nesting don't need to follow any rule. Quotes can be opened and closed in any way. You choose. %%% Nesting: When not supported Some targets (as sgml) don't support the nesting of quotes. There is only one quote level. In this case, no matter how much TABs are used to define the quote block, it always will be level 1. %%% Syntax: Spaces after TAB Spaces AFTER the TAB character are allowed. But be careful, it can be confusing. %%% Invalid: Spaces before TAB Spaces BEFORE the TAB character invalidate the mark. It's not quote. %%% Invalid: Paragraphs inside Paragraph breaks inside a quote aren't possible. This sample are two separated quoted paragraphs, not a quote block with two paragraphs inside. %%% Closing: EOF closes the open block The end of the file (EOF) closes the currently open quote block. = Raw =[raw] %%% Syntax: A single line """ A raw line. %%% Syntax: A single line with leading spaces """ Another raw line, with leading spaces. %%% Syntax: Area (block) """ A raw area delimited by lines with marks. """ %%% Syntax: Area (block) with trailing spaces """ Trailing spaces and TABs after the area marks are allowed, but not encouraged nor documented. """ %%% Invalid: No space between mark and contents """Not a raw line, need one space after mark. %%% Invalid: Leading spaces on block marks """ Not a raw area. The marks must be at the line beginning, no leading spaces. """ %%% Closing: EOF closes the open block """ The end of the file (EOF) closes the currently open raw area. """ = Verbatim =[verbatim] %INCLUDED(t2t) starts here: ../../../test/marks/verbatim.t2t %%% Syntax: A single line ``` A verbatim line. %%% Syntax: A single line with leading spaces ``` Another verbatim line, with leading spaces. %%% Syntax: Area (block) ``` A verbatim area delimited by lines with marks. ``` %%% Syntax: Area (block) with trailing spaces ``` Trailing spaces and TABs after the area marks are allowed, but not encouraged nor documented. ``` %%% Invalid: No space between mark and contents ```Not a verbatim line, need one space after mark. %%% Invalid: Leading spaces on block marks ``` Not a verbatim area. The marks must be at the line beginning, no leading spaces. ``` %%% Closing: EOF closes the open block ``` The end of the file (EOF) closes the currently open verbatim area. ``` = Definition List =[deflist] : Definition list A list with terms : Start term with colon And its definition follows = Numbered List =[numlist] See [List #list], the same rules apply. = List =[list] %INCLUDED(t2t) starts here: ../../../test/marks/list.t2t %%% Items: Prefixed by hyphen - Use the hyphen to prefix list items. - There must be one space after the hyphen. - The list is closed by two consecutive blank lines. %%% Items: Free leading spacing (indentation) - The list can be indented on the source document. - You can use any number of spaces. - The result will be the same. %%% Items: Vertical spacing between items - Let one blank line between the list items. - It will be maintained on the conversion. - Some targets don't support this behavior. - This one was separated by a line with blanks. You can also put a blank line inside the item contents and it will be preserved. %%% Items: Exactly ONE space after the hyphen -This is not a list (no space) - This is not a list (more than one space) - This is not a list (a TAB instead the space) %%% Items: Catchy cases - - This is a list - + This is a list - : This is a list %%% Nesting: Creating sublists - This is the "mother" list first item. - Here is the second, but inside this item, - there is a sublist, with its own items. - Note that the items of the same sublist - must have the same indentation. - And this can go on, opening sublists. - Just add leading spaces before the - hyphen and sublists will be opened. - The two blank lines closes them all. %%% Nesting: Free leading spacing (indentation) - When nesting lists, the additional spaces are free. - You can add just one, - or many. - What matters is to put more than the previous. - But remember that the other items of the same list - must use the same indentation. %%% Nesting: Maximum depth - There is not a depth limit, - you can go deeper and deeper. - But some targets may have restrictions. - The LaTeX maximum is here, 4 levels. %%% Nesting: Reverse doesn't work - Reverse nesting doesn't work. - Because a sublist *must* have a mother list. - It's the list concept, not a txt2tags limitation. - All this sublists will be bumped to mother lists. - At level 1, like this one. %%% Nesting: Going deeper and back %% When nesting back to an upper level, the previous sublist %% is automatically closed. - Level 1 - Level 2 - Level 3 - Level 4 - Level 3 -- (closed Level 4) - Level 2 -- (closed Level 3) - Level 1 -- (closed Level 2) %% More than one list can be closed when nesting back. - Level 1 - Level 2 - Level 3 - Level 4 - Level 1 -- (closed Level 4, Level 3 and Level 2) %%% Nesting: Vertical spacing between lists - Level 1 - Level 2 -- blank BEFORE and AFTER (in) - Level 3 % comment lines are NOT considered blank lines - Level 4 % comment lines are NOT considered blank lines - Level 3 - Level 2 -- blank BEFORE and AFTER (out) - Level 1 - Level 2 -- blank BEFORE (spaces) and AFTER (TAB) - Level 3 %%% Nesting: Messing up %% Be careful when going back on the nesting, %% it must be on a valid level! If not, it will %% be bumped up to the previous valid level. - Level 1 - Level 2 - Level 3 - Level 4 - Level 3.5 ??? - Level 3 - Level 2.5 ??? - Level 2 - Level 1.5 ??? - Level 1 %%% Closing: Two (not so) empty lines - This list is closed by a line with spaces and other with TABs - This list is NOT closed by two comment lines % comment lines are NOT considered blank lines % comment lines are NOT considered blank lines - This list is closed by a line with spaces and TAB, - then a comment line, then an empty line. % comment lines are NOT considered blank lines %%% Closing: Empty item closes current (sub)list %% The two blank lines closes ALL the lists. %% To close just the current, use an empty item. - Level 1 - Level 2 - Level 3 - Level 2 - Level 1 - %% The empty item can have trailing blanks. - Empty item with trailing spaces. - - Empty item with trailing TAB. - %%% Closing: EOF closes the lists - If the end of the file (EOF) is hit, - all the currently opened list are closed, - just like when using the two blank lines. = Table =[table] %INCLUDED(t2t) starts here: ../../../test/marks/table.t2t %%% Syntax: Lines starting with a pipe | | Cell 1 %%% Syntax: Extra pipes separate cells | Cell 1 | Cell 2 | Cell 3 %%% Syntax: With a trailing pipe, make border | Cell 1 | Cell 2 | Cell 3 | %%% Syntax: Table lines starting with double pipe are heading || Cell 1 | Cell 2 | Cell 3 | %%% Align: Spaces before the leading pipe centralize the table | Cell 1 | Cell 2 | Cell 3 | %%% Align: Spaces inside the cell denote its alignment || Heading | Heading | Heading | % comments don't close an opened table | <- | -- | -> | | -- | -- | -- | | -> | -- | <- | %%% Span: Column span is defined by extra pipes at cell closing || 1 | 2 | 3+4 || | 1 | 2 | 3 | 4 | | 1+2+3 ||| 4 | | 1 | 2+3 || 4 | | 1+2+3+4 |||| %%% Test: Empty cells are placed as expected | 0 | 1 | 2 | | | 4 | 5 | | 7 | | 8 | | A | B | | | D | E | F | %%% Test: Lines with different number of cells | 1 | | 1 | 2 | | 1 | 2 | 3 | | 1 | 2 | 3 | 4 | | 1 | 2 | 3 | 4 | 5 | %%% Test: Empty cells + Span + Messy cell number = Fun! | Jan | | Fev || | Mar ||| | Apr |||| | May ||||| | 20% | 40% | 60% | 80% | 100% | | | | / | | | | | / / / / / ||| | | / / / / / / / / / ||||| | | o | | o | | | | | . | | | | | = = = = ||| | | 01 | 02 | | | 05 | | 07 | | | | | 11 | | 13 | | | 16 | | 17 | | 19 | 20 | | | 23 | | | 25 | 26 | | | 29 | 30 | | 32 | | | | 35 | | 37 | | 39 | 40 | %%% Test: Lots of cells at the same line | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | %%% Test: Empty lines | | | | | | %%% Invalid: There must be at least one space around the pipe |this|is|not|a|table| |this| is| not| a| table| |this |is |not |a |table | %%% Invalid: You must use spaces, not TABs | this | is | not | a | table | ------------------------------------------------------------ The End. pandoc-1.19.2.4/tests/twiki-reader.twiki0000644000000000000000000000606613155240143016210 0ustar0000000000000000---+ header ---++ header level two ---+++ header level 3 ---++++ header _level_ four ---+++++ header level 5 ---++++++ header level 6 ---+++++++ not a header --++ not a header ---+ emph and strong _emph_ *strong* __strong and emph__ *emph inside strong* *strong with emph* _strong inside emph_ ---+ horizontal rule top --- bottom --- ---+ nop _not emph_ ---+ entities hi & low hi & low Gödel ̉પ ---+ comments inline comment between blocks ---+ linebreaks hi%BR%there hi%BR% there ---+ inline code *→* =typed= >>= ---+ code blocks case xs of (_:_) -> reverse xs [] -> ['*'] case xs of (_:_) -> reverse xs [] -> ['*'] ---+ block quotes Regular paragraph