diff --git a/AUTHORS.md b/AUTHORS.md
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -157,6 +157,7 @@
 - Jaap de Jong
 - J. B. Rainsberger
 - J. Lewis Muir
+- Jackson Schuster
 - Jaehwang Jung
 - Jaime Marquínez Ferrándiz
 - Jake Zimmerman
@@ -195,6 +196,7 @@
 - José de Mattos Neto
 - Josef Svenningsson
 - Joseph C. Sible
+- Julia Diaz
 - Julien Cretel
 - Julien Dutant
 - Juliette Fourcot
diff --git a/MANUAL.txt b/MANUAL.txt
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -1,7 +1,7 @@
 ---
 title: Pandoc User's Guide
 author: John MacFarlane
-date: August 11, 2023
+date: August 22, 2023
 ---
 
 # Synopsis
diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,47 @@
 # Revision history for pandoc
 
+## pandoc 3.1.6.2 (2023-08-22)
+
+  * Org reader: allow example lines to end immediately after the colon
+    (Brian Leung).
+
+  * Docx reader:
+
+    + Omit "Table NN" from caption (#9002).
+    + Avoid spurious block quotes in list items (#8836).
+
+  * JATS reader: Fix display of block elements (#8889, Julia Diaz).
+    A number of block elements, like disp-quote, list, and disp-formula, were
+    always treated as inlines if appearing inside paragraphs, even if their
+    usage granted a separate block.
+
+  * HTML reader: avoid duplicate id on header and div (#8991).
+
+  * Typst writer:
+
+    + Use `~` for nonbreaking space, and escape literal `~` (#9010).
+    + Put the label in right place for Div, use `#block` (#8991).
+      Previously we were putting the label at the beginning of
+      the Div's contents, but according to the documentation such a
+      label gets attached to the *preceding* element.  We now use an
+      explicit `#block` and add the label at the end.
+
+  * LaTeX writer:
+
+    + Improve escaping of URIs in href, url (#8992).
+    + Improve internal links and targets (#8744). We no longer
+      wrap section headings in a `\hypertarget`. This is unnecessary
+      (hyperref creates an anchor based on the label) and it interferes with
+      tagging. In addition, we now use `\hyperref` rather than `\hyperlink`
+      for internal links. Currently `\hypertarget` is still being used for
+      link anchors not on headings. Thanks to @u-fischer.
+
+  * HTML format templates (style.html): Fix typo in clause for svg
+    (Jackson Schuster).
+
+  * Use lastest texmath, typst-symbols, typst. Targets typst 0.7.
+
+
 ## pandoc 3.1.6.1 (2023-08-11)
 
  * HTML reader: properly calculate RowHeadColumns (#8984). This fixes a
diff --git a/data/templates/styles.html b/data/templates/styles.html
--- a/data/templates/styles.html
+++ b/data/templates/styles.html
@@ -63,7 +63,7 @@
   max-width: 100%;
 }
 svg {
-  height; auto;
+  height: auto;
   max-width: 100%;
 }
 h1, h2, h3, h4, h5, h6 {
diff --git a/man/pandoc.1 b/man/pandoc.1
--- a/man/pandoc.1
+++ b/man/pandoc.1
@@ -14,7 +14,7 @@
 . ftr VB CB
 . ftr VBI CBI
 .\}
-.TH "Pandoc User\[cq]s Guide" "" "August 11, 2023" "pandoc 3.1.6" ""
+.TH "Pandoc User\[cq]s Guide" "" "August 22, 2023" "pandoc 3.1.6.2" ""
 .hy
 .SH NAME
 pandoc - general markup converter
diff --git a/pandoc.cabal b/pandoc.cabal
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -1,6 +1,6 @@
 cabal-version:   2.4
 name:            pandoc
-version:         3.1.6.1
+version:         3.1.6.2
 build-type:      Simple
 license:         GPL-2.0-or-later
 license-file:    COPYING.md
@@ -207,6 +207,7 @@
                  test/command/*.md
                  test/command/*.csl
                  test/command/*.svg
+                 test/command/9002.docx
                  test/command/biblio.bib
                  test/command/averroes.bib
                  test/command/A.txt
@@ -513,7 +514,7 @@
                  syb                   >= 0.1      && < 0.8,
                  tagsoup               >= 0.14.6   && < 0.15,
                  temporary             >= 1.1      && < 1.4,
-                 texmath               >= 0.12.8   && < 0.13,
+                 texmath               >= 0.12.8.1 && < 0.13,
                  text                  >= 1.1.1.0  && < 2.1,
                  text-conversions      >= 0.3      && < 0.4,
                  time                  >= 1.5      && < 1.14,
@@ -523,7 +524,7 @@
                  zip-archive           >= 0.4.3    && < 0.5,
                  zlib                  >= 0.5      && < 0.7,
                  xml                   >= 1.3.12   && < 1.4,
-                 typst                 >= 0.3.1    && < 0.4,
+                 typst                 >= 0.3.2.0  && < 0.3.3,
                  vector                >= 0.12     && < 0.14
 
   if !os(windows)
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs
--- a/src/Text/Pandoc/Readers/Docx.hs
+++ b/src/Text/Pandoc/Readers/Docx.hs
@@ -624,10 +624,10 @@
 
 paragraphStyleToTransform :: PandocMonad m => ParagraphStyle -> DocxContext m (Blocks -> Blocks)
 paragraphStyleToTransform pPr =
-  let stylenames = map getStyleName (pStyle pPr)
-      transform = if (`elem` listParagraphStyles) `any` stylenames || relativeIndent pPr <= 0
-                  then id
-                  else blockQuote
+  let transform = if relativeIndent pPr > 0 && not (numbered pPr) &&
+                        not (any ((`elem` listParagraphStyles) . getStyleName) (pStyle pPr))
+                  then blockQuote
+                  else id
   in do
     extStylesEnabled <- asks (isEnabled Ext_styles . docxOptions)
     return $ foldr (\parStyle transform' ->
diff --git a/src/Text/Pandoc/Readers/Docx/Parse.hs b/src/Text/Pandoc/Readers/Docx/Parse.hs
--- a/src/Text/Pandoc/Readers/Docx/Parse.hs
+++ b/src/Text/Pandoc/Readers/Docx/Parse.hs
@@ -86,13 +86,15 @@
       strContent,
       showElement,
       findAttr,
+      filterChild,
       filterChildrenName,
       filterElementName,
+      lookupAttrBy,
       parseXMLElement,
       elChildren,
       QName(QName, qName),
       Content(Elem),
-      Element(elContent, elName),
+      Element(..),
       findElements )
 
 data ReaderEnv = ReaderEnv { envNotes         :: Notes
@@ -725,7 +727,25 @@
       parstyle <- elemToParagraphStyle ns element
                   <$> asks envParStyles
                   <*> asks envNumbering
-      parparts' <- mconcat <$> mapD (elemToParPart ns) (elChildren element)
+
+      let hasCaptionStyle = elem "Caption" (pStyleId <$> pStyle parstyle)
+
+      let isTableNumberElt el@(Element name attribs _ _) =
+           (qName name == "fldSimple" &&
+             case lookupAttrBy ((== "instr") . qName) attribs of
+               Nothing -> False
+               Just instr -> "Table" `elem` T.words instr) ||
+           (qName name == "instrText" && "Table" `elem` T.words (strContent el))
+
+      let isTable = hasCaptionStyle &&
+                      isJust (filterChild isTableNumberElt element)
+
+      let stripOffLabel = dropWhile (not . isTableNumberElt)
+
+      let children = (if isTable
+                          then stripOffLabel
+                          else id) $ elChildren element
+      parparts' <- mconcat <$> mapD (elemToParPart ns) children
       fldCharState <- gets stateFldCharState
       modify $ \st -> st {stateFldCharState = emptyFldCharContents fldCharState}
       -- Word uses list enumeration for numbered headings, so we only
@@ -734,21 +754,9 @@
       case pHeading parstyle of
         Nothing | Just (numId, lvl) <- pNumInfo parstyle -> do
                     mkListItem parstyle numId lvl parparts
-        _ -> let
-          hasCaptionStyle = elem "Caption" (pStyleId <$> pStyle parstyle)
-
-          hasSimpleTableField = fromMaybe False $ do
-            fldSimple <- findChildByName ns "w" "fldSimple" element
-            instr <- findAttrByName ns "w" "instr" fldSimple
-            pure ("Table" `elem` T.words instr)
-
-          hasComplexTableField = fromMaybe False $ do
-            instrText <- findElementByName ns "w" "instrText" element
-            pure ("Table" `elem` T.words (strContent instrText))
-
-          in if hasCaptionStyle && (hasSimpleTableField || hasComplexTableField)
-            then return $ TblCaption parstyle parparts
-            else return $ Paragraph parstyle parparts
+        _ -> if isTable
+                then return $ TblCaption parstyle parparts
+                else return $ Paragraph parstyle parparts
 
 elemToBodyPart ns element
   | isElem ns "w" "tbl" element = do
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs
--- a/src/Text/Pandoc/Readers/HTML.hs
+++ b/src/Text/Pandoc/Readers/HTML.hs
@@ -69,6 +69,7 @@
 import Text.Pandoc.URI (escapeURI)
 import Text.Pandoc.Walk
 import Text.TeXMath (readMathML, writeTeX)
+import qualified Data.Sequence as Seq
 
 -- | Convert HTML-formatted string to 'Pandoc' document.
 readHtml :: (PandocMonad m, ToSources a)
@@ -459,13 +460,18 @@
   TagOpen tag attr' <- lookAhead $ pSatisfy $ tagOpen isDivLike (const True)
   let (ident, classes, kvs) = toAttr attr'
   contents <- pInTags tag block
+  let contents' = case B.unMany contents of
+                    Header lev (hident,hclasses,hkvs) ils Seq.:<| rest
+                        | hident == ident ->
+                          B.Many $ Header lev ("",hclasses,hkvs) ils Seq.<| rest
+                    _ -> contents
   let classes' = if tag == "section"
                     then "section":classes
                     else classes
       kvs' = if tag == "main" && isNothing (lookup "role" kvs)
                then ("role", "main"):kvs
                else kvs
-  return $ B.divWith (ident, classes', kvs') contents
+  return $ B.divWith (ident, classes', kvs') contents'
 
 pIframe :: PandocMonad m => TagParser m Blocks
 pIframe = try $ do
diff --git a/src/Text/Pandoc/Readers/JATS.hs b/src/Text/Pandoc/Readers/JATS.hs
--- a/src/Text/Pandoc/Readers/JATS.hs
+++ b/src/Text/Pandoc/Readers/JATS.hs
@@ -15,7 +15,7 @@
 
 module Text.Pandoc.Readers.JATS ( readJATS ) where
 import Control.Monad.State.Strict ( StateT(runStateT), gets, modify )
-import Control.Monad (forM_,  when, unless, MonadPlus(mplus))
+import Control.Monad (forM_,  when, unless)
 import Control.Monad.Except (throwError)
 import Text.Pandoc.Error (PandocError(..))
 import Data.Char (isDigit, isSpace)
@@ -105,31 +105,30 @@
   deleteMeta field s = s {jatsMeta = deleteMeta field (jatsMeta s)}
 
 isBlockElement :: Content -> Bool
-isBlockElement (Elem e) = qName (elName e) `S.member` blocktags
-  where blocktags = S.fromList (paragraphLevel ++ lists ++ mathML ++ other) \\ S.fromList inlinetags
-        paragraphLevel = ["address", "array", "boxed-text", "chem-struct-wrap",
-            "code", "fig", "fig-group", "graphic", "media", "preformat",
+isBlockElement (Elem e) = case qName (elName e) of
+            "disp-formula" -> if onlyOneChild e
+                                  then if hasFormulaChild e
+                                          then False
+                                          else case filterChild (named "alternatives") e of
+                                            Just a -> if hasFormulaChild a then False else True
+                                            Nothing -> True
+                                  else True
+            "alternatives" -> if hasFormulaChild e then False else True
+            _ -> qName (elName e) `S.member` blocktags
+
+  where blocktags = S.fromList (paragraphLevel ++ lists ++ formulae ++ other) \\ S.fromList canBeInline
+        paragraphLevel = ["address", "answer", "answer-set", "array", "boxed-text", "chem-struct-wrap",
+            "code", "explanation", "fig", "fig-group", "graphic", "media", "preformat", "question", "question-wrap", "question-wrap-group",
             "supplementary-material", "table-wrap", "table-wrap-group",
             "alternatives", "disp-formula", "disp-formula-group"]
         lists = ["def-list", "list"]
-        mathML = ["tex-math", "mml:math"]
+        formulae = ["tex-math", "mml:math"]
         other = ["p", "related-article", "related-object", "ack", "disp-quote",
             "speech", "statement", "verse-group", "x"]
-        inlinetags = ["email", "ext-link", "uri", "inline-supplementary-material",
-            "related-article", "related-object", "hr", "bold", "fixed-case",
-            "italic", "monospace", "overline", "overline-start", "overline-end",
-            "roman", "sans-serif", "sc", "strike", "underline", "underline-start",
-            "underline-end", "ruby", "alternatives", "inline-graphic", "private-char",
-            "chem-struct", "inline-formula", "tex-math", "mml:math", "abbrev",
-            "milestone-end", "milestone-start", "named-content", "styled-content",
-            "fn", "target", "xref", "sub", "sup", "x", "address", "array",
-            "boxed-text", "chem-struct-wrap", "code", "fig", "fig-group", "graphic",
-            "media", "preformat", "supplementary-material", "table-wrap",
-            "table-wrap-group", "disp-formula", "disp-formula-group",
-            "citation-alternatives", "element-citation", "mixed-citation",
-            "nlm-citation", "award-id", "funding-source", "open-access",
-            "def-list", "list", "ack", "disp-quote", "speech", "statement",
-            "verse-group"]
+        canBeInline = ["tex-math", "mml:math", "related-object", "x"]
+        onlyOneChild x = length (allChildren x) == 1
+        allChildren x = filterChildren (const True) x
+
 isBlockElement _ = False
 
 -- Trim leading and trailing newline characters
@@ -217,6 +216,13 @@
              else divWith (attrValue "id" e, ["caption"], []) <$> wrapWithHeader 6 (getBlocks e)
         "fn-group" -> parseFootnoteGroup
         "ref-list" -> parseRefList e
+        "alternatives" -> if hasFormulaChild e
+                            then blockFormula displayMath e
+                            else getBlocks e
+        "disp-formula" -> if hasFormulaChild e
+                            then blockFormula displayMath e
+                            else divWith (attrValue "id" e, ["disp-formula"], [])
+                                    <$> getBlocks e
         "?xml"  -> return mempty
         _       -> getBlocks e
    where parseMixed container conts = do
@@ -363,9 +369,7 @@
          wrapWithHeader n mBlocks = do
                       isBook <- gets jatsBook
                       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
+                      headerText <- case filterChild (named "title") e of
                                         Just t  -> getInlines t
                                         Nothing -> return mempty
                       oldN <- gets jatsSectionLevel
@@ -602,8 +606,11 @@
              let attr = (attrValue "id" e, [], [])
              return $ linkWith attr href title ils'
 
-        "disp-formula" -> formula displayMath
-        "inline-formula" -> formula math
+        "alternatives" -> if hasFormulaChild e
+                            then inlineFormula math e
+                            else innerInlines id
+        "disp-formula" -> inlineFormula displayMath e
+        "inline-formula" -> inlineFormula math e
         "math" | qURI (elName e) == Just "http://www.w3.org/1998/Math/MathML"
                    -> return . math $ mathML e
         "tex-math" -> return . math $ textContent e
@@ -616,11 +623,14 @@
         _          -> innerInlines id
    where innerInlines f = extractSpaces f . mconcat <$>
                           mapM parseInline (elContent e)
-         mathML x =
-            case readMathML . showElement $ everywhere (mkT removePrefix) x of
-                Left _ -> mempty
-                Right m -> writeTeX m
-         formula constructor = do
+         codeWithLang = do
+           let classes' = case attrValue "language" e of
+                               "" -> []
+                               l  -> [l]
+           return $ codeWith (attrValue "id" e,classes',[]) $ strContentRecursive e
+
+inlineFormula ::  PandocMonad m => (Text->Inlines) -> Element -> JATS m Inlines
+inlineFormula constructor e = do
             let whereToLook = fromMaybe e $ filterElement (named "alternatives") e
                 texMaths = map textContent $
                             filterChildren (named  "tex-math") whereToLook
@@ -628,12 +638,29 @@
                             filterChildren isMathML whereToLook
             return . mconcat . take 1 . map constructor $ texMaths ++ mathMLs
 
-         isMathML x = qName (elName x) == "math" &&
+blockFormula ::  PandocMonad m => (Text->Inlines) -> Element -> JATS m Blocks
+blockFormula constructor e = do
+            let whereToLook = fromMaybe e $ filterElement (named "alternatives") e
+                texMaths = map textContent $
+                            filterChildren (named  "tex-math") whereToLook
+                mathMLs = map mathML $
+                            filterChildren isMathML whereToLook
+            return . para . head . take 1 . map constructor $ texMaths ++ mathMLs
+
+mathML :: Element -> Text
+mathML x =
+          case readMathML . showElement $ everywhere (mkT removePrefix) x of
+                Left _ -> mempty
+                Right m -> writeTeX m
+          where removePrefix elname = elname { qPrefix = Nothing }
+
+isMathML :: Element -> Bool
+isMathML x = qName (elName x) == "math" &&
                       qURI  (elName x) ==
                                       Just "http://www.w3.org/1998/Math/MathML"
-         removePrefix elname = elname { qPrefix = Nothing }
-         codeWithLang = do
-           let classes' = case attrValue "language" e of
-                               "" -> []
-                               l  -> [l]
-           return $ codeWith (attrValue "id" e,classes',[]) $ strContentRecursive e
+
+formulaChildren :: Element -> [Element]
+formulaChildren x = filterChildren isMathML x ++ filterChildren (named "tex-math") x
+
+hasFormulaChild :: Element -> Bool
+hasFormulaChild x = length (formulaChildren x) > 0
diff --git a/src/Text/Pandoc/Readers/Org/BlockStarts.hs b/src/Text/Pandoc/Readers/Org/BlockStarts.hs
--- a/src/Text/Pandoc/Readers/Org/BlockStarts.hs
+++ b/src/Text/Pandoc/Readers/Org/BlockStarts.hs
@@ -115,7 +115,7 @@
   skipSpaces <* string "#" <* lookAhead (oneOf " \n")
 
 exampleLineStart :: Monad m => OrgParser m ()
-exampleLineStart = () <$ try (skipSpaces *> string ": ")
+exampleLineStart = () <$ try (skipSpaces *> char ':' *> (void (char ' ') <|> lookAhead eol))
 
 noteMarker :: Monad m => OrgParser m Text
 noteMarker = try $ do
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -734,12 +734,11 @@
                   else empty
   lab <- labelFor ident
   let star = if unnumbered then text "*" else empty
-  let stuffing = star <> optional <> contents
-  stuffing' <- hypertarget True ident $
-                  text ('\\':sectionType) <> stuffing <> lab
+  let title = star <> optional <> contents
   return $ if level' > 5
               then txt
-              else prefix $$ stuffing'
+              else prefix
+                   $$ text ('\\':sectionType) <> title <> lab
                    $$ if unnumbered && not unlisted
                          then "\\addcontentsline{toc}" <>
                                 braces (text sectionType) <>
@@ -960,7 +959,7 @@
      Just ('#', ident) -> do
         contents <- inlineListToLaTeX txt
         lab <- toLabel ident
-        return $ text "\\protect\\hyperlink" <> braces (literal lab) <> braces contents
+        return $ text "\\hyperref" <> brackets (literal lab) <> braces contents
      _ -> case txt of
           [Str x] | unEscapeString (T.unpack x) == unEscapeString (T.unpack src) ->  -- autolink
                do modify $ \s -> s{ stUrl = True }
diff --git a/src/Text/Pandoc/Writers/LaTeX/Util.hs b/src/Text/Pandoc/Writers/LaTeX/Util.hs
--- a/src/Text/Pandoc/Writers/LaTeX/Util.hs
+++ b/src/Text/Pandoc/Writers/LaTeX/Util.hs
@@ -29,6 +29,7 @@
 import Text.Pandoc.Writers.LaTeX.Lang (toBabel)
 import Text.Pandoc.Highlighting (toListingsLanguage)
 import Text.DocLayout
+import Network.URI (escapeURIString)
 import Text.Pandoc.Definition
 import Text.Pandoc.ImageSize (showFl)
 import Control.Monad.State.Strict (gets, modify)
@@ -91,6 +92,13 @@
             '\'':_ -> cs <> "\\," <> xs -- add thin space
             _      -> cs <> xs
     in case x of
+         '\\'| isUrl -> emitc '/' -- NB. / works as path sep even on Windows
+         c | isUrl ->
+             if c `elem` ['{', '}', '|', '^', '~', '[', ']', '`']
+                then emits (escapeURIString (const False) [c])
+                else emitc c
+         '{' -> emits "\\{"
+         '}' -> emits "\\}"
          '?' | ligatures ->  -- avoid ?` ligature
            case xs of
              '`':_ -> emits "?{}"
@@ -99,27 +107,24 @@
            case xs of
              '`':_ -> emits "!{}"
              _     -> emitc x
-         '{' -> emits "\\{"
-         '}' -> emits "\\}"
          '`' | ctx == CodeString -> emitcseq "\\textasciigrave"
-         '$' | not isUrl -> emits "\\$"
+         '$' -> emits "\\$"
          '%' -> emits "\\%"
-         '&' | not isUrl -> emits "\\&"
-         '_' | not isUrl -> emits "\\_"
+         '&' -> emits "\\&"
+         '_' -> emits "\\_"
          '#' -> emits "\\#"
-         '-' | not isUrl -> case xs of
+         '-' -> case xs of
                      -- prevent adjacent hyphens from forming ligatures
                      ('-':_) -> emits "-\\/"
                      _       -> emitc '-'
-         '~' | not isUrl -> emitcseq "\\textasciitilde"
+         '~' -> emitcseq "\\textasciitilde"
          '^' -> emits "\\^{}"
-         '\\'| isUrl     -> emitc '/' -- NB. / works as path sep even on Windows
-             | otherwise -> emitcseq "\\textbackslash"
-         '|' | not isUrl -> emitcseq "\\textbar"
-         '<' -> emitcseq "\\textless"
-         '>' -> emitcseq "\\textgreater"
-         '[' -> emits "{[}"  -- to avoid interpretation as
-         ']' -> emits "{]}"  -- optional arguments
+         '\\' -> emitcseq "\\textbackslash"
+         '|'  -> emitcseq "\\textbar"
+         '<'  -> emitcseq "\\textless"
+         '>'  -> emitcseq "\\textgreater"
+         '['  -> emits "{[}"  -- to avoid interpretation as
+         ']'  -> emits "{]}"  -- optional arguments
          '\'' -> emitcseq "\\textquotesingle"
          '\160' -> emits "~"
          '\x200B' -> emits "\\hspace{0pt}"  -- zero-width space
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs
--- a/src/Text/Pandoc/Writers/Typst.hs
+++ b/src/Text/Pandoc/Writers/Typst.hs
@@ -189,10 +189,12 @@
       return $ "#figure(" <> nest 2 (brackets contents <> "," <> cr <>
                                      ("caption: [" $$ nest 2 caption $$ "]"))
                           $$ ")" $$ lab $$ blankline
+    Div (ident,_,_) (Header lev ("",cls,kvs) ils:rest) ->
+      blocksToTypst (Header lev (ident,cls,kvs) ils:rest)
     Div (ident,_,_) blocks -> do
       let lab = toLabel ident
       contents <- blocksToTypst blocks
-      return $ lab $$ contents
+      return $ "#block[" $$ contents $$ ("]" <+> lab)
 
 defListItemToTypst :: PandocMonad m => ([Inline], [[Block]]) -> TW m (Doc Text)
 defListItemToTypst (term, defns) = do
@@ -296,8 +298,10 @@
      else t
   where
     escapeChar c
+      | c == '\160' = "~"
       | needsEscape c = "\\" <> T.singleton c
       | otherwise = T.singleton c
+    needsEscape '\160' = True
     needsEscape '[' = True
     needsEscape ']' = True
     needsEscape '#' = True
@@ -312,6 +316,7 @@
     needsEscape '=' = True
     needsEscape '_' = True
     needsEscape '*' = True
+    needsEscape '~' = True
     needsEscape ':' = context == TermContext
     needsEscape _ = False
 
diff --git a/test/Tests/Readers/JATS.hs b/test/Tests/Readers/JATS.hs
--- a/test/Tests/Readers/JATS.hs
+++ b/test/Tests/Readers/JATS.hs
@@ -27,7 +27,6 @@
 tests :: [TestTree]
 tests = [ testGroup "inline code"
           [ test jats "basic" $ "<p>\n  <monospace>@&amp;</monospace>\n</p>" =?> para (code "@&")
-          , test jats "lang" $ "<p>\n  <code language=\"c\">@&amp;</code>\n</p>" =?> para (codeWith ("", ["c"], []) "@&")
           ]
         , testGroup "block code"
           [ test jats "basic" $ "<preformat>@&amp;</preformat>" =?> codeBlock "@&"
diff --git a/test/Tests/Writers/LaTeX.hs b/test/Tests/Writers/LaTeX.hs
--- a/test/Tests/Writers/LaTeX.hs
+++ b/test/Tests/Writers/LaTeX.hs
@@ -50,7 +50,7 @@
         , 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}"
+            "\\begin{description}\n\\tightlist\n\\item[{\\hyperref[go]{testing}}]\nhi there\n\\end{description}"
           ]
         , testGroup "math"
           [ "escape |" =: para (math "\\sigma|_{\\{x\\}}") =?>
@@ -60,7 +60,7 @@
           [ "unnumbered header" =:
             headerWith ("foo",["unnumbered"],[]) 1
               (text "Header 1" <> note (plain $ text "note")) =?>
-            "\\hypertarget{foo}{%\n\\section*{\\texorpdfstring{Header 1\\footnote{note}}{Header 1}}\\label{foo}}\n\\addcontentsline{toc}{section}{Header 1}\n"
+            "\\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}"
diff --git a/test/command/1762.md b/test/command/1762.md
--- a/test/command/1762.md
+++ b/test/command/1762.md
@@ -6,13 +6,10 @@
 
 # Three {.unlisted .unnumbered}
 ^D
-\hypertarget{one}{%
-\section{One}\label{one}}
+\section{One}\label{one}
 
-\hypertarget{two}{%
-\section*{Two}\label{two}}
+\section*{Two}\label{two}
 \addcontentsline{toc}{section}{Two}
 
-\hypertarget{three}{%
-\section*{Three}\label{three}}
+\section*{Three}\label{three}
 ```
diff --git a/test/command/5340.md b/test/command/5340.md
--- a/test/command/5340.md
+++ b/test/command/5340.md
@@ -8,7 +8,7 @@
 ^D
 \url{https://example.com/foo-bar}
 \url{https://example.com/foo--bar}
-\url{https://example.com/foo\%2Dbar}
-\url{https://example.com/foo\%2D\%2Dbar}
-\url{https://example.com/foo\%2D\%2Dbar}
+\url{https://example.com/foo%2Dbar}
+\url{https://example.com/foo%2D%2Dbar}
+\url{https://example.com/foo%2D%2Dbar}
 ```
diff --git a/test/command/5574.md b/test/command/5574.md
--- a/test/command/5574.md
+++ b/test/command/5574.md
@@ -3,6 +3,5 @@
 % pandoc -t latex
 # `foo`{.cpp}
 ^D
-\hypertarget{foo}{%
-\section{\texorpdfstring{\texttt{foo}}{foo}}\label{foo}}
+\section{\texorpdfstring{\texttt{foo}}{foo}}\label{foo}
 ```
diff --git a/test/command/6030.md b/test/command/6030.md
--- a/test/command/6030.md
+++ b/test/command/6030.md
@@ -70,15 +70,13 @@
 
 Four
 ^D
-\hypertarget{one}{%
-\section{One}\label{one}}
+\section{One}\label{one}
 
 \begin{frame}{One}
 One
 \end{frame}
 
-\hypertarget{two}{%
-\subsection{Two}\label{two}}
+\subsection{Two}\label{two}
 
 \begin{frame}{Two}
 Two
diff --git a/test/command/6033.md b/test/command/6033.md
--- a/test/command/6033.md
+++ b/test/command/6033.md
@@ -32,11 +32,9 @@
 
 - More text.
 ^D
-\hypertarget{one}{%
-\section{One}\label{one}}
+\section{One}\label{one}
 
-\hypertarget{one-a}{%
-\subsection{One-A}\label{one-a}}
+\subsection{One-A}\label{one-a}
 
 \begin{frame}{One-A}
 \begin{columns}[T]
@@ -64,8 +62,7 @@
 \end{itemize}
 \end{frame}
 
-\hypertarget{one-b}{%
-\subsection{One-B}\label{one-b}}
+\subsection{One-B}\label{one-b}
 
 \begin{frame}{One-B}
 \begin{itemize}
@@ -75,11 +72,9 @@
 \end{itemize}
 \end{frame}
 
-\hypertarget{two}{%
-\section{Two}\label{two}}
+\section{Two}\label{two}
 
-\hypertarget{two-a}{%
-\subsection{Two-A}\label{two-a}}
+\subsection{Two-A}\label{two-a}
 
 \begin{frame}{Two-A}
 \begin{itemize}
diff --git a/test/command/6107.md b/test/command/6107.md
--- a/test/command/6107.md
+++ b/test/command/6107.md
@@ -13,8 +13,7 @@
 
 ## Epilogue {.standout}
 ^D
-\hypertarget{a-circus}{%
-\section{A circus!}\label{a-circus}}
+\section{A circus!}\label{a-circus}
 
 \begin{frame}{Another silly title}
 \protect\hypertarget{another-silly-title}{}
diff --git a/test/command/6360.md b/test/command/6360.md
--- a/test/command/6360.md
+++ b/test/command/6360.md
@@ -2,5 +2,5 @@
 % pandoc -f native -t latex --wrap=none
 [Link ("test2",[],[]) [Str "link",Space,Str "to",Space,Str "text",Space,Str "test1"] ("#test1","")]
 ^D
-\protect\hypertarget{test2}{\protect\hyperlink{test1}{link to text test1}}
+\protect\hypertarget{test2}{\hyperref[test1]{link to text test1}}
 ```
diff --git a/test/command/7857.md b/test/command/7857.md
--- a/test/command/7857.md
+++ b/test/command/7857.md
@@ -10,8 +10,7 @@
 
 ok
 ^D
-\hypertarget{section}{%
-\section{section}\label{section}}
+\section{section}\label{section}
 
 \note{my note}
 
diff --git a/test/command/7884.md b/test/command/7884.md
--- a/test/command/7884.md
+++ b/test/command/7884.md
@@ -22,7 +22,7 @@
     )
     [ Header
         1
-        ( "chapter-1" , [] , [ ( "number" , "1" ) ] )
+        ( "" , [] , [ ( "number" , "1" ) ] )
         [ Str "Chapter" , Space , Str "1" ]
     , Para
         [ Str "Here"
diff --git a/test/command/8966.md b/test/command/8966.md
--- a/test/command/8966.md
+++ b/test/command/8966.md
@@ -5,5 +5,5 @@
 #strong[Samsonov T.E.] Shape-Adaptive Geometric Simplification of
 Heterogeneous Line Datasets / T. E. Samsonov, O. P. Yakimova \/\/
 International Journal of Geographical Information Science. — 2017. —
-Vol. 31. — № 8. — pp. 1485-1520.
+Vol. 31. — № 8. — pp.~1485-1520.
 ```
diff --git a/test/command/8992.md b/test/command/8992.md
new file mode 100644
--- /dev/null
+++ b/test/command/8992.md
@@ -0,0 +1,6 @@
+```
+% pandoc -t latex
+[A theorem](https://en.wikipedia.org/wiki/Rice's_theorem).
+^D
+\href{https://en.wikipedia.org/wiki/Rice's_theorem}{A theorem}.
+```
diff --git a/test/command/8997.md b/test/command/8997.md
new file mode 100644
--- /dev/null
+++ b/test/command/8997.md
@@ -0,0 +1,77 @@
+```
+% pandoc -f org -t native
+* has space after second colon
+: aaa
+: 
+: bbb
+
+
+* has no space after second colon
+: aaa
+:
+: bbb
+^D
+[ Header
+    1
+    ( "has-space-after-second-colon" , [] , [] )
+    [ Str "has"
+    , Space
+    , Str "space"
+    , Space
+    , Str "after"
+    , Space
+    , Str "second"
+    , Space
+    , Str "colon"
+    ]
+, CodeBlock ( "" , [ "example" ] , [] ) "aaa\n\nbbb\n"
+, Header
+    1
+    ( "has-no-space-after-second-colon" , [] , [] )
+    [ Str "has"
+    , Space
+    , Str "no"
+    , Space
+    , Str "space"
+    , Space
+    , Str "after"
+    , Space
+    , Str "second"
+    , Space
+    , Str "colon"
+    ]
+, CodeBlock ( "" , [ "example" ] , [] ) "aaa\n\nbbb\n"
+]
+```
+
+```
+% pandoc -f org -t native
+* only the colon
+:
+
+* only the colon and a space
+: 
+^D
+[ Header
+    1
+    ( "only-the-colon" , [] , [] )
+    [ Str "only" , Space , Str "the" , Space , Str "colon" ]
+, CodeBlock ( "" , [ "example" ] , [] ) "\n"
+, Header
+    1
+    ( "only-the-colon-and-a-space" , [] , [] )
+    [ Str "only"
+    , Space
+    , Str "the"
+    , Space
+    , Str "colon"
+    , Space
+    , Str "and"
+    , Space
+    , Str "a"
+    , Space
+    , Str "space"
+    ]
+, CodeBlock ( "" , [ "example" ] , [] ) "\n"
+]
+```
diff --git a/test/command/9002.docx b/test/command/9002.docx
new file mode 100644
Binary files /dev/null and b/test/command/9002.docx differ
diff --git a/test/command/9002.md b/test/command/9002.md
new file mode 100644
--- /dev/null
+++ b/test/command/9002.md
@@ -0,0 +1,20 @@
+```
+% pandoc command/9002.docx -t html
+^D
+<table>
+<caption><p>This is my table!</p></caption>
+<colgroup>
+<col style="width: 50%" />
+<col style="width: 50%" />
+</colgroup>
+<thead>
+<tr class="header">
+<th>a</th>
+<th>b</th>
+</tr>
+</thead>
+<tbody>
+</tbody>
+</table>
+<p>See Table 1 This is my table!</p>
+```
diff --git a/test/docx/lists_level_override.native b/test/docx/lists_level_override.native
--- a/test/docx/lists_level_override.native
+++ b/test/docx/lists_level_override.native
@@ -1,37 +1,266 @@
-[Para [Str "For",Space,Str "each",Space,Str "initiative",Space,Str "below",Space,Str "is",Space,Str "outlined",Space,Str "the",Space,Str "goals,",Space,Str "an",Space,Str "approximate",Space,Str "roadmap",Space,Str "which",Space,Str "will",Space,Str "likely",Space,Str "change",Space,Str "as",Space,Str "we",Space,Str "iterate,",Space,Str "signals/metrics",Space,Str "to",Space,Str "measure",Space,Str "success,",Space,Str "and",Space,Str "initial",Space,Str "workitems",Space,Str "with",Space,Str "a",Space,Str "rough",Space,Strong [Str "schedule"],Space,Str "and",Space,Str "contacts",Space,Str "where",Space,Str "available:"]
-,Para [Str "\160"]
-,OrderedList (1,Decimal,Period)
- [[BlockQuote
-   [Para [Str "State",Space,Str "of",Space,Str "Documentation"]]]]
-,BlockQuote
- [Para [Strong [Str "Goal:",Space,Str "Baseline",Space,Str "and",Space,Str "ongoing",Space,Str "metrics",Space,Str "tracking",Space,Str "doc",Space,Str "usefulness",Space,Str "and",Space,Str "completeness."]]
- ,Para [Str "\160"]]
-,OrderedList (2,Decimal,Period)
- [[BlockQuote
-   [Para [Str "Content",Space,Str "Migration"]]]]
-,BlockQuote
- [Para [Str "Goal:",Space,Str "Content",Space,Str "is",Space,Str "accessible",Space,Str "to",Space,Str "new",Space,Str "employees",Space,Str "and",Space,Str "is",Space,Str "better",Space,Str "organized/archived."]
- ,Para [Str "\160"]]
-,OrderedList (3,Decimal,Period)
- [[BlockQuote
-   [Para [Str "Wiki",Space,Str "(xl)"]]]]
-,BlockQuote
- [Para [Strong [Str "Goal:",Space,Str "Useful",Space,Str "documentation",Space,Str "that",Space,Str "is",Space,Str "archived,",Space,Str "searchable",Space,Str "and",Space,Str "easy",Space,Str "to",Space,Str "create"]]
- ,Para [Str "\160\160"]]
-,OrderedList (4,Decimal,Period)
- [[BlockQuote
-   [Para [Str "XL",Space,Str "Code",Space,Str "Autoreview",Space,Str "Bot",Space,Str "(XLCRBot)."]]]]
-,BlockQuote
- [Para [Strong [Str "Goal:",Space,Str "Feedback",Space,Str "on",Space,Str "basic",Space,Str "violations",Space,Str "in",Space,Str "seconds",Space,Str "or",Space,Str "minutes",Space,Str "at",Space,Str "most",Space,Str "in",Space,Str "either",Space,Str "VS",Space,Str "or",Space,Str "Codeflow."]]]
-,OrderedList (5,Decimal,Period)
- [[BlockQuote
-   [Para [Str "Code",Space,Str "documentation"]]]]
-,BlockQuote
- [Para [Strong [Str "Goal:",Space,Str "Useful,",Space,Str "consistent,",Space,Str "tool",Space,Str "supported",Space,Str "comments"]]]
-,Para [Strong [Str "\160"],Str "\160"]
-,OrderedList (6,Decimal,Period)
- [[BlockQuote
-   [Para [Str "Education",Space,Str "efforts"]]]]
-,BlockQuote
- [Para [Strong [Str "Goal:",Space,Str "Broad,",Space,Str "discoverable",Space,Str "channels",Space,Str "for",Space,Str "updates",Space,Str "and",Space,Str "news"]]]
-,Para [Strong [Str "\160"]]]
+Pandoc
+  Meta { unMeta = fromList [] }
+  [ Para
+      [ Str "For"
+      , Space
+      , Str "each"
+      , Space
+      , Str "initiative"
+      , Space
+      , Str "below"
+      , Space
+      , Str "is"
+      , Space
+      , Str "outlined"
+      , Space
+      , Str "the"
+      , Space
+      , Str "goals,"
+      , Space
+      , Str "an"
+      , Space
+      , Str "approximate"
+      , Space
+      , Str "roadmap"
+      , Space
+      , Str "which"
+      , Space
+      , Str "will"
+      , Space
+      , Str "likely"
+      , Space
+      , Str "change"
+      , Space
+      , Str "as"
+      , Space
+      , Str "we"
+      , Space
+      , Str "iterate,"
+      , Space
+      , Str "signals/metrics"
+      , Space
+      , Str "to"
+      , Space
+      , Str "measure"
+      , Space
+      , Str "success,"
+      , Space
+      , Str "and"
+      , Space
+      , Str "initial"
+      , Space
+      , Str "workitems"
+      , Space
+      , Str "with"
+      , Space
+      , Str "a"
+      , Space
+      , Str "rough"
+      , Space
+      , Strong [ Str "schedule" ]
+      , Space
+      , Str "and"
+      , Space
+      , Str "contacts"
+      , Space
+      , Str "where"
+      , Space
+      , Str "available:"
+      ]
+  , Para [ Str "\160" ]
+  , OrderedList
+      ( 1 , Decimal , Period )
+      [ [ Para
+            [ Str "State"
+            , Space
+            , Str "of"
+            , Space
+            , Str "Documentation"
+            ]
+        ]
+      ]
+  , BlockQuote
+      [ Para
+          [ Strong
+              [ Str "Goal:"
+              , Space
+              , Str "Baseline"
+              , Space
+              , Str "and"
+              , Space
+              , Str "ongoing"
+              , Space
+              , Str "metrics"
+              , Space
+              , Str "tracking"
+              , Space
+              , Str "doc"
+              , Space
+              , Str "usefulness"
+              , Space
+              , Str "and"
+              , Space
+              , Str "completeness."
+              ]
+          ]
+      , Para [ Str "\160" ]
+      ]
+  , OrderedList
+      ( 2 , Decimal , Period )
+      [ [ Para [ Str "Content" , Space , Str "Migration" ] ] ]
+  , BlockQuote
+      [ Para
+          [ Str "Goal:"
+          , Space
+          , Str "Content"
+          , Space
+          , Str "is"
+          , Space
+          , Str "accessible"
+          , Space
+          , Str "to"
+          , Space
+          , Str "new"
+          , Space
+          , Str "employees"
+          , Space
+          , Str "and"
+          , Space
+          , Str "is"
+          , Space
+          , Str "better"
+          , Space
+          , Str "organized/archived."
+          ]
+      , Para [ Str "\160" ]
+      ]
+  , OrderedList
+      ( 3 , Decimal , Period )
+      [ [ Para [ Str "Wiki" , Space , Str "(xl)" ] ] ]
+  , BlockQuote
+      [ Para
+          [ Strong
+              [ Str "Goal:"
+              , Space
+              , Str "Useful"
+              , Space
+              , Str "documentation"
+              , Space
+              , Str "that"
+              , Space
+              , Str "is"
+              , Space
+              , Str "archived,"
+              , Space
+              , Str "searchable"
+              , Space
+              , Str "and"
+              , Space
+              , Str "easy"
+              , Space
+              , Str "to"
+              , Space
+              , Str "create"
+              ]
+          ]
+      , Para [ Str "\160\160" ]
+      ]
+  , OrderedList
+      ( 4 , Decimal , Period )
+      [ [ Para
+            [ Str "XL"
+            , Space
+            , Str "Code"
+            , Space
+            , Str "Autoreview"
+            , Space
+            , Str "Bot"
+            , Space
+            , Str "(XLCRBot)."
+            ]
+        ]
+      ]
+  , BlockQuote
+      [ Para
+          [ Strong
+              [ Str "Goal:"
+              , Space
+              , Str "Feedback"
+              , Space
+              , Str "on"
+              , Space
+              , Str "basic"
+              , Space
+              , Str "violations"
+              , Space
+              , Str "in"
+              , Space
+              , Str "seconds"
+              , Space
+              , Str "or"
+              , Space
+              , Str "minutes"
+              , Space
+              , Str "at"
+              , Space
+              , Str "most"
+              , Space
+              , Str "in"
+              , Space
+              , Str "either"
+              , Space
+              , Str "VS"
+              , Space
+              , Str "or"
+              , Space
+              , Str "Codeflow."
+              ]
+          ]
+      ]
+  , OrderedList
+      ( 5 , Decimal , Period )
+      [ [ Para [ Str "Code" , Space , Str "documentation" ] ] ]
+  , BlockQuote
+      [ Para
+          [ Strong
+              [ Str "Goal:"
+              , Space
+              , Str "Useful,"
+              , Space
+              , Str "consistent,"
+              , Space
+              , Str "tool"
+              , Space
+              , Str "supported"
+              , Space
+              , Str "comments"
+              ]
+          ]
+      ]
+  , Para [ Strong [ Str "\160" ] , Str "\160" ]
+  , OrderedList
+      ( 6 , Decimal , Period )
+      [ [ Para [ Str "Education" , Space , Str "efforts" ] ] ]
+  , BlockQuote
+      [ Para
+          [ Strong
+              [ Str "Goal:"
+              , Space
+              , Str "Broad,"
+              , Space
+              , Str "discoverable"
+              , Space
+              , Str "channels"
+              , Space
+              , Str "for"
+              , Space
+              , Str "updates"
+              , Space
+              , Str "and"
+              , Space
+              , Str "news"
+              ]
+          ]
+      ]
+  , Para [ Strong [ Str "\160" ] ]
+  ]
diff --git a/test/docx/table_captions_with_field.native b/test/docx/table_captions_with_field.native
--- a/test/docx/table_captions_with_field.native
+++ b/test/docx/table_captions_with_field.native
@@ -1,7 +1,6 @@
 [Para [Str "See",Space,Str "Table",Space,Str "1."]
-,Para []
-,Table ("",[],[]) (Caption Nothing
- [Para [Str "Table",Space,Str "1"]])
+,Para [Str "Table",Space,Str "1"]
+,Table ("",[],[]) (Caption Nothing [])
  [(AlignDefault,ColWidth 0.7605739372523825)
  ,(AlignDefault,ColWidth 0.11971303137380876)
  ,(AlignDefault,ColWidth 0.11971303137380876)]
@@ -32,8 +31,7 @@
  (TableFoot ("",[],[])
  [])
 ,Header 2 ("section", [], []) []
-,Table ("",[],[]) (Caption Nothing
- [Para [Str "Table",Space,Str "2"]])
+,Table ("",[],[]) (Caption Nothing [])
  [(AlignDefault,ColWidth 0.3332963620230701)
  ,(AlignDefault,ColWidth 0.3332963620230701)
  ,(AlignDefault,ColWidth 0.3334072759538598)]
@@ -50,5 +48,5 @@
   [])]
  (TableFoot ("",[],[])
  [])
-,Para []
+,Para [Str "Table",Space,Str "2"]
 ,Para [Str "See",Space,Str "Table",Space,Str "2."]]
diff --git a/test/jats-reader.native b/test/jats-reader.native
--- a/test/jats-reader.native
+++ b/test/jats-reader.native
@@ -8,3087 +8,3607 @@
                 , MetaInlines [ Str "Anonymous" ]
                 ]
             )
-          , ( "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."
-      ]
-  , Header 1 ( "headers" , [] , [] ) [ Str "Headers" ]
-  , Header
-      2
-      ( "level-2-with-an-embedded-link" , [] , [] )
-      [ Str "Level"
-      , Space
-      , Str "2"
-      , Space
-      , Str "with"
-      , Space
-      , Str "an"
-      , SoftBreak
-      , Link
-          ( "" , [] , [] )
-          [ Str "embedded" , SoftBreak , 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"
-      ]
-  , 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."
-      ]
-  , Header 1 ( "statements" , [] , [] ) [ Str "Statements" ]
-  , Header
-      2 ( "" , [] , [] ) [ Str "CAP" , Space , Str "TITLE" ]
-  , Para
-      [ Str "Some"
-      , Space
-      , Str "text"
-      , Space
-      , Str "to"
-      , Space
-      , Str "make"
-      , Space
-      , Str "this"
-      , Space
-      , Str "regular"
-      ]
-  , 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 )
-          [ [ 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 , DefaultStyle , DefaultDelim )
-          [ [ Para [ Str "do" , Space , Str "laundry" ] ]
-          , [ Para
-                [ 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."
-      ]
-  , 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 "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 , DefaultStyle , DefaultDelim )
-      [ [ Para [ Str "First" ] ]
-      , [ Para [ Str "Second" ] ]
-      , [ Para [ Str "Third" ] ]
-      ]
-  , Para [ Str "and:" ]
-  , OrderedList
-      ( 1 , DefaultStyle , DefaultDelim )
-      [ [ Para [ Str "One" ] ]
-      , [ Para [ Str "Two" ] ]
-      , [ Para [ 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"
-            , SoftBreak
-            , 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 ) []
-  , Header 2 ( "nested" , [] , [] ) [ Str "Nested" ]
-  , BulletList
-      [ [ Para [ Str "Tab" ]
-        , BulletList
-            [ [ Para [ Str "Tab" ]
-              , BulletList [ [ Para [ Str "Tab" ] ] ]
-              ]
-            ]
-        ]
-      ]
-  , Para [ Str "Here's" , Space , Str "another:" ]
-  , OrderedList
-      ( 1 , DefaultStyle , 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 , DefaultStyle , 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" ]
-  , Para [ Str "Autonumbering:" ]
-  , OrderedList
-      ( 1 , DefaultStyle , DefaultDelim )
-      [ [ Para [ Str "Autonumber." ] ]
-      , [ Para [ Str "More." ]
-        , OrderedList
-            ( 1 , DefaultStyle , DefaultDelim )
-            [ [ Para [ Str "Nested." ] ] ]
-        ]
-      ]
-  , Header 2 ( "definition" , [] , [] ) [ Str "Definition" ]
-  , DefinitionList
-      [ ( [ Str "Violin" ]
-        , [ [ Para
-                [ Str "Stringed"
-                , Space
-                , Str "musical"
-                , Space
-                , Str "instrument."
-                ]
-            , Para [ Str "Torture" , Space , Str "device." ]
-            ]
-          ]
-        )
-      , ( [ Str "Cello" , LineBreak , Str "Violoncello" ]
-        , [ [ Para
-                [ Str "Low-voiced"
-                , Space
-                , Str "stringed"
-                , Space
-                , Str "instrument."
-                ]
-            ]
-          ]
-        )
-      ]
-  , 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 "Empty"
-      , Space
-      , Strong []
-      , Space
-      , Str "and"
-      , Space
-      , Emph []
-      , Str "."
-      ]
-  , Para
-      [ Str "An"
-      , SoftBreak
-      , Emph
-          [ Link
-              ( "" , [] , [] )
-              [ Str "emphasized" , SoftBreak , 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 ","
-      , SoftBreak
-      , Code ( "" , [] , [] ) "\\"
-      , Str ","
-      , Space
-      , Code ( "" , [] , [] ) "\\$"
-      , Str ","
-      , SoftBreak
-      , Code ( "" , [] , [] ) "<html>"
-      , Str "."
-      ]
-  , Para
-      [ Str "This"
-      , Space
-      , Str "is"
-      , Space
-      , SmallCaps [ Str "small" , Space , Str "caps" ]
-      , Str "."
-      ]
-  , Para
-      [ Str "These"
-      , Space
-      , Str "are"
-      , Space
-      , Str "all"
-      , Space
-      , Str "underlined:"
-      , Space
-      , Str "foo"
-      , Space
-      , Str "and"
-      , Space
-      , Str "bar."
-      ]
-  , Para
-      [ Str "These"
-      , Space
-      , Str "are"
-      , Space
-      , Str "all"
-      , Space
-      , Str "strikethrough:"
-      , Space
-      , Strikeout [ Str "foo" ]
-      , Str ","
-      , SoftBreak
-      , Strikeout [ Str "bar" ]
-      , Str ","
-      , Space
-      , Str "and"
-      , Space
-      , Strikeout [ Str "baz" ]
-      , Str "."
-      ]
-  , 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"
-      , SoftBreak
-      , Str "\""
-      , Link
-          ( "" , [] , [] )
-          [ Str "quoted" , SoftBreak , 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 "."
-      ]
-  , Header 1 ( "latex" , [] , [] ) [ Str "LaTeX" ]
-  , BulletList
-      [ [ Para [ Str "\\cite[22-23]{smith.1899}" ] ]
-      , [ Para [ Str "\\doublespacing" ] ]
-      , [ Para [ Str "$2+2=4$" ] ]
-      , [ Para
-            [ Str "$x" , Space , Str "\\in" , Space , Str "y$" ]
-        ]
-      , [ Para
-            [ Str "$\\alpha"
-            , Space
-            , Str "\\wedge"
-            , Space
-            , Str "\\omega$"
-            ]
-        ]
-      , [ Para [ Str "$223$" ] ]
-      , [ Para [ Str "$p$-Tree" ] ]
-      , [ Para
-            [ Str "$\\frac{d}{dx}f(x)=\\lim_{h\\to"
-            , Space
-            , Str "0}\\frac{f(x+h)-f(x)}{h}$"
-            ]
-        ]
-      , [ Para
-            [ 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"
-            , SoftBreak
-            , Str "x^2$."
-            ]
-        ]
-      ]
-  , Para
-      [ Str "These"
-      , Space
-      , Str "shouldn't"
-      , 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"
-            , SoftBreak
-            , 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"
-            , SoftBreak
-            , Str "worked"
-            , Space
-            , Str "if"
-            , Space
-            , 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"
-                , SoftBreak
-                , 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 "&"
-      , SoftBreak
-      , Str "2"
-      , Space
-      , Str "\\\\"
-      , Space
-      , Str "Cat"
-      , Space
-      , Str "&"
-      , Space
-      , Str "1"
-      , Space
-      , Str "\\\\"
-      , Space
-      , Str "\\hline"
-      , Space
-      , Str "\\end{tabular}"
-      ]
-  , 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 "elem"
-            ]
-        ]
-      , [ 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"
-      , SoftBreak
-      , Link ( "" , [] , [] ) [ Str "URL" ] ( "/url/" , "" )
-      , Str "."
-      ]
-  , Para
-      [ Link
-          ( "" , [] , [] )
-          [ Str "URL" , SoftBreak , Str "and" , Space , Str "title" ]
-          ( "/url/" , "title" )
-      , Str "."
-      ]
-  , Para
-      [ Link
-          ( "" , [] , [] )
-          [ Str "URL" , SoftBreak , Str "and" , Space , Str "title" ]
-          ( "/url/" , "title preceded by two spaces" )
-      , Str "."
-      ]
-  , Para
-      [ Link
-          ( "" , [] , [] )
-          [ Str "URL" , SoftBreak , Str "and" , Space , Str "title" ]
-          ( "/url/" , "title preceded by a tab" )
-      , Str "."
-      ]
-  , Para
-      [ Link
-          ( "" , [] , [] )
-          [ Str "URL" , SoftBreak , Str "and" , Space , Str "title" ]
-          ( "/url/" , "title with \"quotes\" in it" )
-      ]
-  , Para
-      [ Link
-          ( "" , [] , [] )
-          [ Str "URL" , SoftBreak , 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"
-      , SoftBreak
-      , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
-      , Str "."
-      ]
-  , Para
-      [ Str "Foo"
-      , SoftBreak
-      , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
-      , Str "."
-      ]
-  , Para
-      [ Str "Foo"
-      , SoftBreak
-      , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
-      , Str "."
-      ]
-  , Para
-      [ Str "With"
-      , Space
-      , Link
-          ( "" , [] , [] )
-          [ Str "embedded" , SoftBreak , Str "[brackets]" ]
-          ( "/url/" , "" )
-      , Str "."
-      ]
-  , Para
-      [ Link ( "" , [] , [] ) [ Str "b" ] ( "/url/" , "" )
-      , Space
-      , Str "by"
-      , SoftBreak
-      , Str "itself"
-      , Space
-      , Str "should"
-      , Space
-      , Str "be"
-      , Space
-      , Str "a"
-      , Space
-      , Str "link."
-      ]
-  , Para
-      [ Str "Indented"
-      , SoftBreak
-      , Link ( "" , [] , [] ) [ Str "once" ] ( "/url" , "" )
-      , Str "."
-      ]
-  , Para
-      [ Str "Indented"
-      , SoftBreak
-      , Link ( "" , [] , [] ) [ Str "twice" ] ( "/url" , "" )
-      , Str "."
-      ]
-  , Para
-      [ Str "Indented"
-      , SoftBreak
-      , 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"
-      , SoftBreak
-      , Link
-          ( "" , [] , [] )
-          [ Str "bar" ]
-          ( "/url/" , "Title with \"quotes\" inside" )
-      , Str "."
-      ]
-  , Para
-      [ Str "Foo"
-      , SoftBreak
-      , 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"
-      , SoftBreak
-      , Link
-          ( "" , [] , [] )
-          [ Str "link"
-          , SoftBreak
-          , 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:"
-      , SoftBreak
-      , Link
-          ( "" , [] , [] )
-          [ Str "AT&T" ]
-          ( "http://att.com/" , "AT&T" )
-      , Str "."
-      ]
-  , Para
-      [ Str "Here's"
-      , Space
-      , Str "an"
-      , SoftBreak
-      , Link
-          ( "" , [] , [] )
-          [ Str "inline" , SoftBreak , Str "link" ]
-          ( "/script?foo=1&bar=2" , "" )
-      , Str "."
-      ]
-  , Para
-      [ Str "Here's"
-      , Space
-      , Str "an"
-      , SoftBreak
-      , Link
-          ( "" , [] , [] )
-          [ Str "inline"
-          , SoftBreak
-          , 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:"
-      , 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
-      , Str "nobody"
-      , Space
-      , Str "[at]"
-      , Space
-      , Str "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 ( "" , [] , [] ) "<http://example.com/>"
-      ]
-  , CodeBlock
-      ( "" , [] , [] ) "or here: <http://example.com/>"
-  , 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
-          ( "" , [] , [] ) [] ( "lalune.jpg" , "Voyage dans la Lune" )
-      ]
-  , Para
-      [ Str "Here"
-      , Space
-      , Str "is"
-      , Space
-      , Str "a"
-      , Space
-      , Str "movie"
-      , SoftBreak
-      , Image ( "" , [] , [] ) [] ( "movie.jpg" , "" )
-      , SoftBreak
-      , Str "icon."
-      ]
-  , 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 ","
-      , SoftBreak
-      , Str "and"
-      , SoftBreak
-      , Str "another"
-      , Link
-          ( "" , [] , [] )
-          [ Str "(longnote)" ]
-          ( "#note_longnote" , "" )
-      , Str "."
-      , 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)."
-      ]
-  , Para
-      [ Link ( "" , [] , [] ) [ Str "(1)" ] ( "#ref_1" , "" )
-      , Space
-      , Str "Here"
-      , Space
-      , Str "is"
-      , Space
-      , Str "the"
-      , Space
-      , Str "footnote."
-      , Space
-      , Str "It"
-      , Space
-      , Str "can"
-      , SoftBreak
-      , 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"
-      , SoftBreak
-      , 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"
-      , SoftBreak
-      , Str "a"
-      , Space
-      , Str "single"
-      , Space
-      , Str "footnote"
-      , Space
-      , Str "(as"
-      , Space
-      , Str "with"
-      , Space
-      , Str "block"
-      , Space
-      , Str "quotes)."
-      ]
-  , CodeBlock ( "" , [] , [] ) "  { <code> }"
-  , 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"
-      , SoftBreak
-      , 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"
-      , SoftBreak
-      , 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
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead
-         ( "" , [] , [] )
-         [ Row
-             ( "" , [] , [] )
-             [ Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "X" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Y" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Z" ] ]
-             ]
-         ])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead
-         ( "" , [] , [] )
-         [ Row
-             ( "" , [] , [] )
-             [ Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "X" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Y" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Z" ] ]
-             ]
-         ])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead
-         ( "" , [] , [] )
-         [ Row
-             ( "" , [] , [] )
-             [ Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "X" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Y" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Z" ] ]
-             ]
-         ])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead
-         ( "" , [] , [] )
-         [ Row
-             ( "" , [] , [] )
-             [ Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "X" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Y" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Z" ] ]
-             ]
-         ])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead
-         ( "" , [] , [] )
-         [ Row
-             ( "" , [] , [] )
-             [ Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "X" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Y" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Z" ] ]
-             ]
-         ])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead
-         ( "" , [] , [] )
-         [ Row
-             ( "" , [] , [] )
-             [ Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "X" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Y" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Z" ] ]
-             ]
-         ])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead
-         ( "" , [] , [] )
-         [ Row
-             ( "" , [] , [] )
-             [ Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "X" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Y" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Z" ] ]
-             ]
-         ])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead
-         ( "" , [] , [] )
-         [ Row
-             ( "" , [] , [] )
-             [ Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "r1a" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "r1b" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "r1c" ] ]
-             ]
-         , Row
-             ( "" , [] , [] )
-             [ Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "X" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Y" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Z" ] ]
-             ]
-         ])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead
-         ( "" , [] , [] )
-         [ Row
-             ( "" , [] , [] )
-             [ Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "X" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Y" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "Z" ] ]
-             ]
-         ])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Header
-      2
-      ( "tables-without-headers" , [] , [] )
-      [ Str "Tables"
-      , Space
-      , Str "without"
-      , Space
-      , Str "Headers"
-      ]
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead ( "" , [] , [] ) [])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead ( "" , [] , [] ) [])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead ( "" , [] , [] ) [])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead ( "" , [] , [] ) [])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Header
-      2
-      ( "table-with-spans-and-alignments" , [] , [] )
-      [ Str "Tables"
-      , Space
-      , Str "with"
-      , Space
-      , Str "spans"
-      , Space
-      , Str "and"
-      , Space
-      , Str "alignments"
-      ]
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead
-         ( "" , [] , [] )
-         [ Row
-             ( "" , [] , [] )
-             [ Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 2)
-                 [ Para [ Str "1" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignRight
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "2" ] ]
-             ]
-         ])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 2)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignLeft
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 2)
-                  (ColSpan 1)
-                  [ Para [ Str "4" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "5" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "6" ] ]
-              ]
-          , Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 2)
-                  [ Para [ Str "7" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Header
-      2
-      ( "table-with-footer" , [] , [] )
-      [ Str "Table" , Space , Str "with" , Space , Str "footer" ]
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead ( "" , [] , [] ) [])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "3" ] ]
-              ]
-          ]
-      ]
-      (TableFoot
-         ( "" , [] , [] )
-         [ Row
-             ( "" , [] , [] )
-             [ Cell
-                 ( "" , [] , [] )
-                 AlignRight
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "f1" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "f2" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "f3" ] ]
-             ]
-         , Row
-             ( "" , [] , [] )
-             [ Cell
-                 ( "" , [] , [] )
-                 AlignRight
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "f4" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "f5" ] ]
-             , Cell
-                 ( "" , [] , [] )
-                 AlignDefault
-                 (RowSpan 1)
-                 (ColSpan 1)
-                 [ Para [ Str "f6" ] ]
-             ]
-         ])
-  , Header
-      2
-      ( "table-with-multiple-bodies" , [] , [] )
-      [ Str "Table"
-      , Space
-      , Str "With"
-      , Space
-      , Str "Multiple"
-      , Space
-      , Str "Bodies"
-      ]
-  , Table
-      ( "" , [] , [] )
-      (Caption Nothing [])
-      [ ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      , ( AlignLeft , ColWidthDefault )
-      ]
-      (TableHead ( "" , [] , [] ) [])
-      [ TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignRight
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "a1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "a2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "a3" ] ]
-              ]
-          ]
-      , TableBody
-          ( "" , [] , [] )
-          (RowHeadColumns 0)
-          []
-          [ Row
-              ( "" , [] , [] )
-              [ Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "b1" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "b2" ] ]
-              , Cell
-                  ( "" , [] , [] )
-                  AlignDefault
-                  (RowSpan 1)
-                  (ColSpan 1)
-                  [ Para [ Str "b3" ] ]
-              ]
-          ]
-      ]
-      (TableFoot ( "" , [] , [] ) [])
-  , Header
-      2
-      ( "empty-tables" , [] , [] )
-      [ Str "Empty" , Space , Str "Tables" ]
-  , Para
-      [ Str "This"
-      , Space
-      , Str "section"
-      , Space
-      , Str "should"
-      , Space
-      , Str "be"
-      , Space
-      , Str "empty."
-      ]
+          , ( "references"
+            , MetaList
+                [ MetaMap (fromList [ ( "id" , MetaString "note_1" ) ])
+                , MetaMap
+                    (fromList [ ( "id" , MetaString "note_longnote" ) ])
+                ]
+            )
+          , ( "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."
+      ]
+  , Header 1 ( "headers" , [] , [] ) [ Str "Headers" ]
+  , Header
+      2
+      ( "level-2-with-an-embedded-link" , [] , [] )
+      [ Str "Level"
+      , Space
+      , Str "2"
+      , Space
+      , Str "with"
+      , Space
+      , Str "an"
+      , SoftBreak
+      , Link
+          ( "" , [] , [] )
+          [ Str "embedded" , SoftBreak , 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"
+      ]
+  , 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
+      , Strong
+          [ Str "hard"
+          , Space
+          , Str "line"
+          , Space
+          , Str "break"
+          , LineBreak
+          ]
+      , Str "here."
+      ]
+  , Header 1 ( "statements" , [] , [] ) [ Str "Statements" ]
+  , Header
+      2 ( "" , [] , [] ) [ Str "CAP" , Space , Str "TITLE" ]
+  , Para
+      [ Str "Some"
+      , Space
+      , Str "text"
+      , Space
+      , Str "to"
+      , Space
+      , Str "make"
+      , Space
+      , Str "this"
+      , Space
+      , Str "regular"
+      ]
+  , 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 )
+          [ [ 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 , DefaultStyle , DefaultDelim )
+          [ [ Para [ Str "do" , Space , Str "laundry" ] ]
+          , [ Para
+                [ 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."
+      ]
+  , Para
+      [ Str "Here"
+      , Space
+      , Str "is"
+      , Space
+      , Str "a"
+      , Space
+      , Str "block"
+      , Space
+      , Str "quote"
+      , Space
+      , Str "inside"
+      , Space
+      , Str "a"
+      , Space
+      , Str "paragraph."
+      , Space
+      , Str "Start"
+      , Space
+      , Str "of"
+      , Space
+      , Str "a"
+      , Space
+      , Str "paragraph"
+      , Space
+      , Str "is"
+      , Space
+      , Str "here,"
+      , Space
+      , Str "and"
+      , Space
+      , Str "the"
+      , Space
+      , Str "quote"
+      , Space
+      , Str "is"
+      , Space
+      , Str "below:"
+      ]
+  , BlockQuote
+      [ Para
+          [ Str "My" , Space , Str "block" , Space , Str "quote" ]
+      ]
+  , Para
+      [ Str "End"
+      , Space
+      , Str "of"
+      , Space
+      , Str "a"
+      , Space
+      , Str "paragraph"
+      ]
+  , Header 1 ( "formulae" , [] , [] ) [ Str "Formulae" ]
+  , Header
+      2
+      ( "inline-formulae" , [] , [] )
+      [ Str "Inline"
+      , Space
+      , Str "formulae"
+      , Space
+      , Str "with"
+      , Space
+      , Emph [ Str "inline-formula" ]
+      ]
+  , Para
+      [ Strong
+          [ Str "Inside" , Space , Str "a" , Space , Str "paragraph" ]
+      , Str ","
+      , Space
+      , Str "should"
+      , Space
+      , Str "be"
+      , Space
+      , Str "natively"
+      , Space
+      , Str "coded"
+      , Space
+      , Str "inside"
+      , Space
+      , Str "the"
+      , Space
+      , Str "paragraph,"
+      , Space
+      , Str "and"
+      , Space
+      , Str "show"
+      , Space
+      , Str "inline:"
+      ]
+  , Para
+      [ Str "Einstein"
+      , Space
+      , Str "showed"
+      , Space
+      , Str "that"
+      , Space
+      , Math InlineMath "e=mc^2"
+      , Str "."
+      , SoftBreak
+      , Str "This"
+      , Space
+      , Str "formula"
+      , Space
+      , Str "is"
+      , Space
+      , Str "important"
+      , Space
+      , Str "because\8230"
+      ]
+  , Header
+      2
+      ( "disp-formulae" , [] , [] )
+      [ Str "Block"
+      , Space
+      , Str "formulae"
+      , Space
+      , Str "with"
+      , Space
+      , Emph [ Str "disp-formula" ]
+      ]
+  , Para
+      [ Strong
+          [ Str "Inside" , Space , Str "a" , Space , Str "paragraph" ]
+      , Str ","
+      , Space
+      , Str "should"
+      , Space
+      , Str "be"
+      , Space
+      , Str "natively"
+      , Space
+      , Str "coded"
+      , Space
+      , Str "inside"
+      , Space
+      , Str "the"
+      , Space
+      , Str "pragraph,"
+      , Space
+      , Str "but"
+      , Space
+      , Str "show"
+      , Space
+      , Str "as"
+      , Space
+      , Str "block:"
+      ]
+  , Para
+      [ Str "Einstein"
+      , Space
+      , Str "showed"
+      , Space
+      , Str "that"
+      , Space
+      , Math DisplayMath "e=mc^2"
+      , Str "."
+      , SoftBreak
+      , Str "This"
+      , Space
+      , Str "formula"
+      , Space
+      , Str "is"
+      , Space
+      , Str "important"
+      , Space
+      , Str "because\8230"
+      ]
+  , Para
+      [ Strong
+          [ Str "Outside" , Space , Str "a" , Space , Str "pararaph" ]
+      , Str ","
+      , Space
+      , Str "should"
+      , Space
+      , Str "show"
+      , Space
+      , Str "as"
+      , Space
+      , Str "block:"
+      ]
+  , Para
+      [ Str "Einstein"
+      , Space
+      , Str "showed"
+      , Space
+      , Str "that"
+      ]
+  , Div
+      ( "" , [ "disp-formula" ] , [] )
+      [ Para [ Math DisplayMath "e=mc^2" ] ]
+  , Para
+      [ Str "This"
+      , Space
+      , Str "formula"
+      , Space
+      , Str "is"
+      , Space
+      , Str "important"
+      , Space
+      , Str "because\8230"
+      ]
+  , Header
+      2
+      ( "no-formula-wrapper" , [] , [] )
+      [ Str "Without"
+      , Space
+      , Str "a"
+      , Space
+      , Str "formula"
+      , Space
+      , Str "wrapper"
+      ]
+  , Para
+      [ Strong
+          [ Str "Inside" , Space , Str "a" , Space , Str "pragraph" ]
+      , Str ","
+      , Space
+      , Str "should"
+      , Space
+      , Str "show"
+      , Space
+      , Str "inline:"
+      ]
+  , Para
+      [ Str "Einstein"
+      , Space
+      , Str "showed"
+      , Space
+      , Str "that"
+      , Space
+      , Math InlineMath "e=mc^2"
+      , Str "."
+      , SoftBreak
+      , Str "This"
+      , Space
+      , Str "formula"
+      , Space
+      , Str "is"
+      , Space
+      , Str "important"
+      , Space
+      , Str "because\8230"
+      ]
+  , Para
+      [ Strong
+          [ Str "Outside"
+          , Space
+          , Str "a"
+          , Space
+          , Str "paragraph"
+          ]
+      , Str ","
+      , Space
+      , Str "should"
+      , Space
+      , Str "show"
+      , Space
+      , Str "as"
+      , Space
+      , Str "block:"
+      ]
+  , Para
+      [ Str "Einstein"
+      , Space
+      , Str "showed"
+      , Space
+      , Str "that"
+      ]
+  , Para [ Math DisplayMath "e=mc^2" ]
+  , Para
+      [ Str "This"
+      , Space
+      , Str "formula"
+      , Space
+      , Str "is"
+      , Space
+      , Str "important"
+      , Space
+      , Str "because\8230"
+      ]
+  , Header
+      2
+      ( "misc-formulae" , [] , [] )
+      [ Str "Formulae"
+      , Space
+      , Str "with"
+      , Space
+      , Str "miscelaneus"
+      , Space
+      , Str "elements"
+      ]
+  , Para
+      [ Str "Regardless"
+      , Space
+      , Str "of"
+      , Space
+      , Str "whether"
+      , Space
+      , Str "or"
+      , Space
+      , Str "not"
+      , Space
+      , Str "they"
+      , Space
+      , Str "are"
+      , Space
+      , Str "inside"
+      , Space
+      , Str "a"
+      , Space
+      , Str "paragraph,"
+      , Space
+      , Str "should"
+      , Space
+      , Str "be"
+      , Space
+      , Str "wrapped"
+      , Space
+      , Str "in"
+      , Space
+      , Str "a"
+      , Space
+      , Str "div,"
+      , Space
+      , Str "and"
+      , Space
+      , Str "displayed"
+      , Space
+      , Str "in"
+      , Space
+      , Str "a"
+      , Space
+      , Str "block:"
+      ]
+  , Para
+      [ Strong
+          [ Str "Inside"
+          , Space
+          , Str "a"
+          , Space
+          , Str "paragraph:"
+          ]
+      ]
+  , Para
+      [ Str "Einstein"
+      , Space
+      , Str "showed"
+      , Space
+      , Str "that"
+      ]
+  , Div
+      ( "" , [ "disp-formula" ] , [] )
+      [ Para [ Str "Abstract" , Space , Str "text" ]
+      , Para
+          [ Image
+              ( "" , [] , [] )
+              []
+              ( "https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660"
+              , ""
+              )
+          ]
+      , Para [ Math DisplayMath "e=mc^2" ]
+      ]
+  , Para
+      [ Str "."
+      , SoftBreak
+      , Str "This"
+      , Space
+      , Str "formula"
+      , Space
+      , Str "is"
+      , Space
+      , Str "important"
+      , Space
+      , Str "because\8230"
+      ]
+  , Para
+      [ Strong
+          [ Str "Outside"
+          , Space
+          , Str "of"
+          , Space
+          , Str "a"
+          , Space
+          , Str "paragraph:"
+          ]
+      ]
+  , Para
+      [ Str "Paragraph"
+      , Space
+      , Str "before:"
+      , Space
+      , Str "Einstein"
+      , Space
+      , Str "showed"
+      , Space
+      , Str "that"
+      ]
+  , Div
+      ( "" , [ "disp-formula" ] , [] )
+      [ Para [ Str "Abstract" , Space , Str "text" ]
+      , Para
+          [ Image
+              ( "" , [] , [] )
+              []
+              ( "https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660"
+              , ""
+              )
+          ]
+      , Para [ Math DisplayMath "e=mc^2" ]
+      ]
+  , Para
+      [ Str "This"
+      , Space
+      , Str "formula"
+      , Space
+      , Str "is"
+      , Space
+      , Str "important"
+      , Space
+      , Str "because\8230"
+      ]
+  , 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 "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 , DefaultStyle , DefaultDelim )
+      [ [ Para [ Str "First" ] ]
+      , [ Para [ Str "Second" ] ]
+      , [ Para [ Str "Third" ] ]
+      ]
+  , Para [ Str "and:" ]
+  , OrderedList
+      ( 1 , DefaultStyle , DefaultDelim )
+      [ [ Para [ Str "One" ] ]
+      , [ Para [ Str "Two" ] ]
+      , [ Para [ 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"
+            , SoftBreak
+            , 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 )
+      [ [ Para [ Str "one" ] ]
+      , [ Para [ Str "two" ] ]
+      , [ Para [ Str "three" ] ]
+      ]
+  , OrderedList
+      ( 1 , LowerRoman , DefaultDelim )
+      [ [ Para [ Str "one" ] ]
+      , [ Para [ Str "two" ] ]
+      , [ Para [ Str "three" ] ]
+      ]
+  , Header 2 ( "nested" , [] , [] ) [ Str "Nested" ]
+  , BulletList
+      [ [ Para [ Str "Tab" ]
+        , BulletList
+            [ [ Para [ Str "Tab" ]
+              , BulletList [ [ Para [ Str "Tab" ] ] ]
+              ]
+            ]
+        ]
+      ]
+  , Para [ Str "Here's" , Space , Str "another:" ]
+  , OrderedList
+      ( 1 , DefaultStyle , 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 , DefaultStyle , 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" ]
+  , Para [ Str "Autonumbering:" ]
+  , OrderedList
+      ( 1 , DefaultStyle , DefaultDelim )
+      [ [ Para [ Str "Autonumber." ] ]
+      , [ Para [ Str "More." ]
+        , OrderedList
+            ( 1 , DefaultStyle , DefaultDelim )
+            [ [ Para [ Str "Nested." ] ] ]
+        ]
+      ]
+  , Header 2 ( "definition" , [] , [] ) [ Str "Definition" ]
+  , DefinitionList
+      [ ( [ Str "Violin" ]
+        , [ [ Para
+                [ Str "Stringed"
+                , Space
+                , Str "musical"
+                , Space
+                , Str "instrument."
+                ]
+            , Para [ Str "Torture" , Space , Str "device." ]
+            ]
+          ]
+        )
+      , ( [ Str "Cello"
+          , Strong [ LineBreak ]
+          , Str "Violoncello"
+          ]
+        , [ [ Para
+                [ Str "Low-voiced"
+                , Space
+                , Str "stringed"
+                , Space
+                , Str "instrument."
+                ]
+            ]
+          ]
+        )
+      ]
+  , Header
+      2
+      ( "list-inside-paragraph" , [] , [] )
+      [ Str "List"
+      , Space
+      , Str "inside"
+      , Space
+      , Str "a"
+      , Space
+      , Str "paragraph"
+      ]
+  , Para
+      [ Str "Start"
+      , Space
+      , Str "of"
+      , Space
+      , Str "a"
+      , Space
+      , Str "paragraph."
+      ]
+  , BulletList
+      [ [ Para [ Str "Red" ] ] , [ Para [ Str "Blue" ] ] ]
+  , Para
+      [ Str "End" , Space , Str "of" , Space , Str "paragraph." ]
+  , 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 "Empty"
+      , Space
+      , Strong []
+      , Space
+      , Str "and"
+      , Space
+      , Emph []
+      , Str "."
+      ]
+  , Para
+      [ Str "An"
+      , SoftBreak
+      , Emph
+          [ Link
+              ( "" , [] , [] )
+              [ Str "emphasized" , SoftBreak , 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 ","
+      , SoftBreak
+      , Code ( "" , [] , [] ) "\\"
+      , Str ","
+      , Space
+      , Code ( "" , [] , [] ) "\\$"
+      , Str ","
+      , SoftBreak
+      , Code ( "" , [] , [] ) "<html>"
+      , Str "."
+      ]
+  , Para
+      [ Str "This"
+      , Space
+      , Str "is"
+      , Space
+      , SmallCaps [ Str "small" , Space , Str "caps" ]
+      , Str "."
+      ]
+  , Para
+      [ Str "These"
+      , Space
+      , Str "are"
+      , Space
+      , Str "all"
+      , Space
+      , Str "underlined:"
+      , Space
+      , Str "foo"
+      , Space
+      , Str "and"
+      , Space
+      , Str "bar."
+      ]
+  , Para
+      [ Str "These"
+      , Space
+      , Str "are"
+      , Space
+      , Str "all"
+      , Space
+      , Str "strikethrough:"
+      , Space
+      , Strikeout [ Str "foo" ]
+      , Str ","
+      , SoftBreak
+      , Strikeout [ Str "bar" ]
+      , Str ","
+      , Space
+      , Str "and"
+      , Space
+      , Strikeout [ Str "baz" ]
+      , Str "."
+      ]
+  , 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"
+      , SoftBreak
+      , Str "\""
+      , Link
+          ( "" , [] , [] )
+          [ Str "quoted" , SoftBreak , 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 "."
+      ]
+  , Header 1 ( "latex" , [] , [] ) [ Str "LaTeX" ]
+  , BulletList
+      [ [ Para [ Str "\\cite[22-23]{smith.1899}" ] ]
+      , [ Para [ Str "\\doublespacing" ] ]
+      , [ Para [ Str "$2+2=4$" ] ]
+      , [ Para
+            [ Str "$x" , Space , Str "\\in" , Space , Str "y$" ]
+        ]
+      , [ Para
+            [ Str "$\\alpha"
+            , Space
+            , Str "\\wedge"
+            , Space
+            , Str "\\omega$"
+            ]
+        ]
+      , [ Para [ Str "$223$" ] ]
+      , [ Para [ Str "$p$-Tree" ] ]
+      , [ Para
+            [ Str "$\\frac{d}{dx}f(x)=\\lim_{h\\to"
+            , Space
+            , Str "0}\\frac{f(x+h)-f(x)}{h}$"
+            ]
+        ]
+      , [ Para
+            [ 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"
+            , SoftBreak
+            , Str "x^2$."
+            ]
+        ]
+      ]
+  , Para
+      [ Str "These"
+      , Space
+      , Str "shouldn't"
+      , 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"
+            , SoftBreak
+            , 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"
+            , SoftBreak
+            , Str "worked"
+            , Space
+            , Str "if"
+            , Space
+            , 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"
+                , SoftBreak
+                , 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 "&"
+      , SoftBreak
+      , Str "2"
+      , Space
+      , Str "\\\\"
+      , Space
+      , Str "Cat"
+      , Space
+      , Str "&"
+      , Space
+      , Str "1"
+      , Space
+      , Str "\\\\"
+      , Space
+      , Str "\\hline"
+      , Space
+      , Str "\\end{tabular}"
+      ]
+  , 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 "elem"
+            ]
+        ]
+      , [ 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"
+      , SoftBreak
+      , Link ( "" , [] , [] ) [ Str "URL" ] ( "/url/" , "" )
+      , Str "."
+      ]
+  , Para
+      [ Link
+          ( "" , [] , [] )
+          [ Str "URL" , SoftBreak , Str "and" , Space , Str "title" ]
+          ( "/url/" , "title" )
+      , Str "."
+      ]
+  , Para
+      [ Link
+          ( "" , [] , [] )
+          [ Str "URL" , SoftBreak , Str "and" , Space , Str "title" ]
+          ( "/url/" , "title preceded by two spaces" )
+      , Str "."
+      ]
+  , Para
+      [ Link
+          ( "" , [] , [] )
+          [ Str "URL" , SoftBreak , Str "and" , Space , Str "title" ]
+          ( "/url/" , "title preceded by a tab" )
+      , Str "."
+      ]
+  , Para
+      [ Link
+          ( "" , [] , [] )
+          [ Str "URL" , SoftBreak , Str "and" , Space , Str "title" ]
+          ( "/url/" , "title with \"quotes\" in it" )
+      ]
+  , Para
+      [ Link
+          ( "" , [] , [] )
+          [ Str "URL" , SoftBreak , 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"
+      , SoftBreak
+      , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+      , Str "."
+      ]
+  , Para
+      [ Str "Foo"
+      , SoftBreak
+      , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+      , Str "."
+      ]
+  , Para
+      [ Str "Foo"
+      , SoftBreak
+      , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+      , Str "."
+      ]
+  , Para
+      [ Str "With"
+      , Space
+      , Link
+          ( "" , [] , [] )
+          [ Str "embedded" , SoftBreak , Str "[brackets]" ]
+          ( "/url/" , "" )
+      , Str "."
+      ]
+  , Para
+      [ Link ( "" , [] , [] ) [ Str "b" ] ( "/url/" , "" )
+      , Space
+      , Str "by"
+      , SoftBreak
+      , Str "itself"
+      , Space
+      , Str "should"
+      , Space
+      , Str "be"
+      , Space
+      , Str "a"
+      , Space
+      , Str "link."
+      ]
+  , Para
+      [ Str "Indented"
+      , SoftBreak
+      , Link ( "" , [] , [] ) [ Str "once" ] ( "/url" , "" )
+      , Str "."
+      ]
+  , Para
+      [ Str "Indented"
+      , SoftBreak
+      , Link ( "" , [] , [] ) [ Str "twice" ] ( "/url" , "" )
+      , Str "."
+      ]
+  , Para
+      [ Str "Indented"
+      , SoftBreak
+      , 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"
+      , SoftBreak
+      , Link
+          ( "" , [] , [] )
+          [ Str "bar" ]
+          ( "/url/" , "Title with \"quotes\" inside" )
+      , Str "."
+      ]
+  , Para
+      [ Str "Foo"
+      , SoftBreak
+      , 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"
+      , SoftBreak
+      , Link
+          ( "" , [] , [] )
+          [ Str "link"
+          , SoftBreak
+          , 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:"
+      , SoftBreak
+      , Link
+          ( "" , [] , [] )
+          [ Str "AT&T" ]
+          ( "http://att.com/" , "AT&T" )
+      , Str "."
+      ]
+  , Para
+      [ Str "Here's"
+      , Space
+      , Str "an"
+      , SoftBreak
+      , Link
+          ( "" , [] , [] )
+          [ Str "inline" , SoftBreak , Str "link" ]
+          ( "/script?foo=1&bar=2" , "" )
+      , Str "."
+      ]
+  , Para
+      [ Str "Here's"
+      , Space
+      , Str "an"
+      , SoftBreak
+      , Link
+          ( "" , [] , [] )
+          [ Str "inline"
+          , SoftBreak
+          , 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:"
+      , 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
+      , Str "nobody"
+      , Space
+      , Str "[at]"
+      , Space
+      , Str "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 ( "" , [] , [] ) "<http://example.com/>"
+      ]
+  , CodeBlock
+      ( "" , [] , [] ) "or here: <http://example.com/>"
+  , 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
+          ( "" , [] , [] ) [] ( "lalune.jpg" , "Voyage dans la Lune" )
+      ]
+  , Para
+      [ Str "Here"
+      , Space
+      , Str "is"
+      , Space
+      , Str "a"
+      , Space
+      , Str "movie"
+      , SoftBreak
+      , Image ( "" , [] , [] ) [] ( "movie.jpg" , "" )
+      , SoftBreak
+      , Str "icon."
+      ]
+  , 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 ","
+      , SoftBreak
+      , Str "and"
+      , SoftBreak
+      , Str "another"
+      , Link
+          ( "" , [] , [] )
+          [ Str "(longnote)" ]
+          ( "#note_longnote" , "" )
+      , Str "."
+      , 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)."
+      ]
+  , Para
+      [ Link ( "" , [] , [] ) [ Str "(1)" ] ( "#ref_1" , "" )
+      , Space
+      , Str "Here"
+      , Space
+      , Str "is"
+      , Space
+      , Str "the"
+      , Space
+      , Str "footnote."
+      , Space
+      , Str "It"
+      , Space
+      , Str "can"
+      , SoftBreak
+      , 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"
+      , SoftBreak
+      , 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"
+      , SoftBreak
+      , Str "a"
+      , Space
+      , Str "single"
+      , Space
+      , Str "footnote"
+      , Space
+      , Str "(as"
+      , Space
+      , Str "with"
+      , Space
+      , Str "block"
+      , Space
+      , Str "quotes)."
+      ]
+  , CodeBlock ( "" , [] , [] ) "  { <code> }"
+  , 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"
+      , SoftBreak
+      , 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"
+      , SoftBreak
+      , 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"
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead
+             ( "" , [] , [] )
+             [ Row
+                 ( "" , [] , [] )
+                 [ Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "X" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Y" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Z" ] ]
+                 ]
+             ])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead
+             ( "" , [] , [] )
+             [ Row
+                 ( "" , [] , [] )
+                 [ Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "X" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Y" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Z" ] ]
+                 ]
+             ])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead
+             ( "" , [] , [] )
+             [ Row
+                 ( "" , [] , [] )
+                 [ Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "X" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Y" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Z" ] ]
+                 ]
+             ])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead
+             ( "" , [] , [] )
+             [ Row
+                 ( "" , [] , [] )
+                 [ Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "X" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Y" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Z" ] ]
+                 ]
+             ])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead
+             ( "" , [] , [] )
+             [ Row
+                 ( "" , [] , [] )
+                 [ Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "X" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Y" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Z" ] ]
+                 ]
+             ])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead
+             ( "" , [] , [] )
+             [ Row
+                 ( "" , [] , [] )
+                 [ Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "X" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Y" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Z" ] ]
+                 ]
+             ])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead
+             ( "" , [] , [] )
+             [ Row
+                 ( "" , [] , [] )
+                 [ Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "X" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Y" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Z" ] ]
+                 ]
+             ])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead
+             ( "" , [] , [] )
+             [ Row
+                 ( "" , [] , [] )
+                 [ Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "r1a" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "r1b" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "r1c" ] ]
+                 ]
+             , Row
+                 ( "" , [] , [] )
+                 [ Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "X" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Y" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Z" ] ]
+                 ]
+             ])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead
+             ( "" , [] , [] )
+             [ Row
+                 ( "" , [] , [] )
+                 [ Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "X" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Y" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "Z" ] ]
+                 ]
+             ])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Header
+      2
+      ( "tables-without-headers" , [] , [] )
+      [ Str "Tables"
+      , Space
+      , Str "without"
+      , Space
+      , Str "Headers"
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead ( "" , [] , [] ) [])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead ( "" , [] , [] ) [])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead ( "" , [] , [] ) [])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead ( "" , [] , [] ) [])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Header
+      2
+      ( "table-with-spans-and-alignments" , [] , [] )
+      [ Str "Tables"
+      , Space
+      , Str "with"
+      , Space
+      , Str "spans"
+      , Space
+      , Str "and"
+      , Space
+      , Str "alignments"
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead
+             ( "" , [] , [] )
+             [ Row
+                 ( "" , [] , [] )
+                 [ Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 2)
+                     [ Para [ Str "1" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignRight
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "2" ] ]
+                 ]
+             ])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 2)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignLeft
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 2)
+                      (ColSpan 1)
+                      [ Para [ Str "4" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "5" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "6" ] ]
+                  ]
+              , Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 2)
+                      [ Para [ Str "7" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Header
+      2
+      ( "table-with-footer" , [] , [] )
+      [ Str "Table" , Space , Str "with" , Space , Str "footer" ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead ( "" , [] , [] ) [])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "3" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot
+             ( "" , [] , [] )
+             [ Row
+                 ( "" , [] , [] )
+                 [ Cell
+                     ( "" , [] , [] )
+                     AlignRight
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "f1" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "f2" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "f3" ] ]
+                 ]
+             , Row
+                 ( "" , [] , [] )
+                 [ Cell
+                     ( "" , [] , [] )
+                     AlignRight
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "f4" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "f5" ] ]
+                 , Cell
+                     ( "" , [] , [] )
+                     AlignDefault
+                     (RowSpan 1)
+                     (ColSpan 1)
+                     [ Para [ Str "f6" ] ]
+                 ]
+             ])
+      ]
+  , Header
+      2
+      ( "table-with-multiple-bodies" , [] , [] )
+      [ Str "Table"
+      , Space
+      , Str "With"
+      , Space
+      , Str "Multiple"
+      , Space
+      , Str "Bodies"
+      ]
+  , Div
+      ( "" , [ "table-wrap" ] , [] )
+      [ Table
+          ( "" , [] , [] )
+          (Caption Nothing [])
+          [ ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          , ( AlignLeft , ColWidthDefault )
+          ]
+          (TableHead ( "" , [] , [] ) [])
+          [ TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignRight
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "a1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "a2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "a3" ] ]
+                  ]
+              ]
+          , TableBody
+              ( "" , [] , [] )
+              (RowHeadColumns 0)
+              []
+              [ Row
+                  ( "" , [] , [] )
+                  [ Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "b1" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "b2" ] ]
+                  , Cell
+                      ( "" , [] , [] )
+                      AlignDefault
+                      (RowSpan 1)
+                      (ColSpan 1)
+                      [ Para [ Str "b3" ] ]
+                  ]
+              ]
+          ]
+          (TableFoot ( "" , [] , [] ) [])
+      ]
+  , Header
+      2
+      ( "empty-tables" , [] , [] )
+      [ Str "Empty" , Space , Str "Tables" ]
+  , Para
+      [ Str "This"
+      , Space
+      , Str "section"
+      , Space
+      , Str "should"
+      , Space
+      , Str "be"
+      , Space
+      , Str "empty."
+      ]
+  , Header 1 ( "" , [] , [] ) [ Str "References" ]
+  , Div ( "refs" , [] , [] ) []
+  , Header 1 ( "" , [] , [] ) [ Str "Notes" ]
+  , Div ( "refs" , [] , [] ) []
   ]
diff --git a/test/jats-reader.xml b/test/jats-reader.xml
--- a/test/jats-reader.xml
+++ b/test/jats-reader.xml
@@ -67,7 +67,7 @@
   <p>Here's a regular paragraph.</p>
   <p>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.</p>
   <p>Here's one with a bullet. * criminey.</p>
-  <p>There should be a hard line break<break />here.</p>
+  <p>There should be a <bold>hard line break<break /></bold>here.</p>
 </sec>
 <sec id="statements">
   <title> Statements </title>
@@ -131,7 +131,97 @@
     </disp-quote>
   </disp-quote>
   <p>And a following paragraph.</p>
+  <p>
+     Here is a block quote inside a paragraph. Start of a paragraph is here, and the quote is below:
+      <disp-quote>
+        <p>My block quote</p>
+      </disp-quote>
+     End of a paragraph
+  </p>
 </sec>
+<sec id="formulae">
+  <title>Formulae</title>
+  <sec id="inline-formulae">
+    <title>Inline formulae with <italic>inline-formula</italic></title>
+    <p><bold>Inside a paragraph</bold>, should be natively coded inside the paragraph, and show inline:</p>
+    <p>Einstein showed that <inline-formula><alternatives>
+      <tex-math><![CDATA[e=mc^2]]></tex-math>
+      <mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>m</mml:mi><mml:msup><mml:mi>c</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:math></alternatives></inline-formula>.
+      This formula is important because…</p>
+  </sec>
+  <sec id="disp-formulae">
+    <title>Block formulae with <italic>disp-formula</italic></title>
+    <p><bold>Inside a paragraph</bold>, should be natively coded inside the pragraph, but show as block:</p>
+    <p>Einstein showed that <disp-formula><alternatives>
+      <tex-math><![CDATA[e=mc^2]]></tex-math>
+      <mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>m</mml:mi><mml:msup><mml:mi>c</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:math></alternatives></disp-formula>.
+      This formula is important because…</p>
+    <p><bold>Outside a pararaph</bold>, should show as block:</p>
+    <p>Einstein showed that </p>
+    <disp-formula><alternatives>
+      <tex-math><![CDATA[e=mc^2]]></tex-math>
+      <mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>m</mml:mi><mml:msup><mml:mi>c</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:math></alternatives></disp-formula>
+    <p>This formula is important because…</p>
+  </sec>
+  <sec id="no-formula-wrapper">
+    <title>Without a formula wrapper</title>
+    <p><bold>Inside a pragraph</bold>, should show inline:</p>
+    <p>Einstein showed that <alternatives>
+      <tex-math><![CDATA[e=mc^2]]></tex-math>
+      <mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>m</mml:mi><mml:msup><mml:mi>c</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:math></alternatives>.
+      This formula is important because…</p>
+    <p><bold>Outside a paragraph</bold>, should show as block:</p>
+    <p>Einstein showed that </p>
+    <alternatives>
+      <tex-math><![CDATA[e=mc^2]]></tex-math>
+      <mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>m</mml:mi><mml:msup><mml:mi>c</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:math></alternatives>
+    <p>This formula is important because…</p>
+  </sec>
+  <sec id="misc-formulae">
+    <title>Formulae with miscelaneus elements</title>
+    <p>Regardless of whether or not they are inside a paragraph, should be wrapped in a div, and displayed in a block:</p>
+    <p><bold>Inside a paragraph:</bold></p>
+    <p>Einstein showed that 
+      <disp-formula>
+        <abstract>
+          <p>Abstract text</p>
+        </abstract>
+        <graphic xlink:href="https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660">
+          <alt-text>Alternative text 1</alt-text>
+          <caption><p>Google doodle from 14 March 2003</p></caption>
+        </graphic>
+        <alternatives>
+          <tex-math><![CDATA[e=mc^2]]></tex-math>
+          <mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>m</mml:mi><mml:msup><mml:mi>c</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:math>
+          <graphic xlink:href="https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660">
+            <alt-text>Alternative text 2</alt-text>
+            <caption><p>Google doodle from 14 March 2003</p></caption>
+          </graphic>
+        </alternatives>
+      </disp-formula>.
+      This formula is important because…</p>
+    <p><bold>Outside of a paragraph:</bold></p>
+    <p>Paragraph before: Einstein showed that </p>
+    <disp-formula>
+      <abstract>
+        <p>Abstract text</p>
+      </abstract>
+      <graphic xlink:href="https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660">
+        <alt-text>Alternative text 1</alt-text>
+        <caption><p>Google doodle from 14 March 2003</p></caption>
+      </graphic>
+      <alternatives>
+        <tex-math><![CDATA[e=mc^2]]></tex-math>
+        <mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>m</mml:mi><mml:msup><mml:mi>c</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:math>
+        <graphic xlink:href="https://lh3.googleusercontent.com/dB7iirJ3ncQaVMBGE2YX-WCeoAVIChb6NAzoFcKCFChMsrixJvD7ZRbvcaC-ceXEzXYaoH4K5vaoRDsUyBHFkpIDPnsn3bnzovbvi0a2Gg=s660">
+          <alt-text>Alternative text 2</alt-text>
+          <caption><p>Google doodle from 14 March 2003</p></caption>
+        </graphic>
+      </alternatives>
+    </disp-formula>
+    <p>This formula is important because…</p>
+  </sec>
+</sec>
 <sec id="code-blocks">
   <title>Code Blocks</title>
   <p>Code:</p>
@@ -289,8 +379,16 @@
       </list-item>
     </list>
     <p>List styles:</p>
-    <list list-type="order"></list>
-    <list list-type="roman-lower"></list>
+    <list list-type="order">
+      <list-item><p>one</p></list-item><x>,</x>
+      <list-item><p>two</p></list-item><x>,</x>
+      <list-item><p>three</p></list-item>
+    </list>
+    <list list-type="roman-lower">
+      <list-item><p>one</p></list-item><x>,</x>
+      <list-item><p>two</p></list-item><x>,</x>
+      <list-item><p>three</p></list-item>
+    </list>
   </sec>
   <sec id="nested">
     <title>Nested</title>
@@ -406,7 +504,7 @@
       </def-item>
       <def-item>
         <term>
-          Cello<break />Violoncello
+          Cello<bold><break /></bold>Violoncello
         </term>
         <def>
           <p>Low-voiced stringed instrument.</p>
@@ -414,25 +512,42 @@
       </def-item>
     </def-list>
   </sec>
+  <sec id="list-inside-paragraph">
+    <title>List inside a paragraph</title>
+    <p>
+      Start of a paragraph.
+      <list list-type="bullet">
+        <list-item>
+          <label>&#8226;</label>
+          <p>Red</p>
+        </list-item>
+        <list-item>
+          <label>&#8226;</label>
+          <p>Blue</p>
+        </list-item>
+      </list>
+      End of paragraph.
+    </p>
+  </sec>
 </sec>
 <sec id="inline-markup">
   <title>Inline Markup</title>
   <p>This is <italic>emphasized</italic>, and so <italic>is
     this</italic>.</p>
-  <p>This is <bold role="strong">strong</bold>, and so
-    <bold role="strong">is this</bold>.</p>
-  <p>Empty <bold role="strong"></bold> and <italic></italic>.</p>
+  <p>This is <bold>strong</bold>, and so
+    <bold>is this</bold>.</p>
+  <p>Empty <bold></bold> and <italic></italic>.</p>
   <p>An
     <italic><ext-link ext-link-type="uri" xlink:href="/url">emphasized
     link</ext-link></italic>.</p>
-  <p><bold role="strong"><italic>This is strong and em.</italic></bold></p>
-  <p>So is <bold role="strong"><italic>this</italic></bold> word.</p>
-  <p><bold role="strong"><italic>This is strong and em.</italic></bold></p>
-  <p>So is <bold role="strong"><italic>this</italic></bold> word.</p>
+  <p><bold><italic>This is strong and em.</italic></bold></p>
+  <p>So is <bold><italic>this</italic></bold> word.</p>
+  <p><bold><italic>This is strong and em.</italic></bold></p>
+  <p>So is <bold><italic>this</italic></bold> word.</p>
   <p>This is code: <monospace>&gt;</monospace>, <monospace>$</monospace>,
     <monospace>\</monospace>, <monospace>\$</monospace>,
     <monospace>&lt;html&gt;</monospace>.</p>
-  <p>This is <sc role="smallcaps">small caps</sc>.</p>
+  <p>This is <sc>small caps</sc>.</p>
   <p>These are all underlined: foo and bar.</p>
   <p>These are all strikethrough: <strike>foo</strike>,
     <strike>bar</strike>, and <strike>baz</strike>.</p>
@@ -660,7 +775,7 @@
   <title>Tables</title>
   <sec id="tables-with-headers">
     <title>Tables with Headers</title>
-    <table>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -701,8 +816,8 @@
           </td>
         </tr>
       </tbody>
-    </table>
-    <table>
+    </table></table-wrap>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -743,8 +858,8 @@
           </td>
         </tr>
       </tbody>
-    </table>
-    <table>
+    </table></table-wrap>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -785,8 +900,8 @@
           </td>
         </tr>
       </tbody>
-    </table>
-    <table>
+    </table></table-wrap>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -827,8 +942,8 @@
           </td>
         </tr>
       </tbody>
-    </table>
-    <table>
+    </table></table-wrap>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -869,8 +984,8 @@
           </td>
         </tr>
       </tbody>
-    </table>
-    <table>
+    </table></table-wrap>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -911,8 +1026,8 @@
           </td>
         </tr>
       </tbody>
-    </table>
-    <table>
+    </table></table-wrap>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -953,8 +1068,8 @@
           </td>
         </tr>
       </tbody>
-    </table>
-    <table>
+    </table></table-wrap>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -1006,8 +1121,8 @@
           </td>
         </tr>
       </tbody>
-    </table>
-    <table>
+    </table></table-wrap>
+    <table-wrap><table>
       <col width="33*" align="left" />
       <col width="33*" align="left" />
       <col width="33*" align="left" />
@@ -1048,11 +1163,11 @@
           </td>
         </tr>
       </tbody>
-    </table>
+    </table></table-wrap>
   </sec>
   <sec id="tables-without-headers">
     <title>Tables without Headers</title>
-    <table>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -1080,8 +1195,8 @@
           </td>
         </tr>
       </tbody>
-    </table>
-    <table>
+    </table></table-wrap>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -1109,8 +1224,8 @@
           </td>
         </tr>
       </tbody>
-    </table>
-    <table>
+    </table></table-wrap>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -1138,8 +1253,8 @@
           </td>
         </tr>
       </tbody>
-    </table>
-    <table>
+    </table></table-wrap>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -1167,11 +1282,11 @@
           </td>
         </tr>
       </tbody>
-    </table>
+    </table></table-wrap>
   </sec>
   <sec id="table-with-spans-and-alignments">
     <title>Tables with spans and alignments</title>
-    <table>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -1211,27 +1326,14 @@
         </td>
         </tr>
       </tbody>
-    </table>
+    </table></table-wrap>
   </sec>
   <sec id="table-with-footer">
     <title>Table with footer</title>
-    <table>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
-      <tbody>
-        <tr>
-          <td>
-            <p>1</p>
-          </td>
-          <td>
-            <p>2</p>
-          </td>
-          <td>
-            <p>3</p>
-          </td>
-        </tr>
-      </tbody>
       <tfoot>
         <tr>
           <td align="right">
@@ -1256,11 +1358,24 @@
           </td>
         </tr>
       </tfoot>
-    </table>
+      <tbody>
+        <tr>
+          <td>
+            <p>1</p>
+          </td>
+          <td>
+            <p>2</p>
+          </td>
+          <td>
+            <p>3</p>
+          </td>
+        </tr>
+      </tbody>
+    </table></table-wrap>
   </sec>
   <sec id="table-with-multiple-bodies">
     <title>Table With Multiple Bodies</title>
-    <table>
+    <table-wrap><table>
       <col align="left" />
       <col align="left" />
       <col align="left" />
@@ -1290,7 +1405,7 @@
           </td>
         </tr>
       </tbody>
-    </table>
+    </table></table-wrap>
   </sec>
   <sec id="empty-tables">
     <title>Empty Tables</title>
@@ -1299,5 +1414,15 @@
 </sec>
 </body>
 <back>
+  <ref-list>
+    <title>References</title>
+    <ref id="ref_1"><note><p>This is reference 1</p></note></ref>
+    <ref id="ref_longnote"><note><p>This is a long note</p></note></ref>
+  </ref-list>
+  <ref-list>
+    <title>Notes</title>
+    <ref id="note_1"><note><p>This is note 1</p></note></ref>
+    <ref id="note_longnote"><note><p>This is another long note</p></note></ref>
+  </ref-list>
 </back>
 </article>
diff --git a/test/lhs-test.html b/test/lhs-test.html
--- a/test/lhs-test.html
+++ b/test/lhs-test.html
@@ -61,7 +61,7 @@
       max-width: 100%;
     }
     svg {
-      height; auto;
+      height: auto;
       max-width: 100%;
     }
     h1, h2, h3, h4, h5, h6 {
diff --git a/test/lhs-test.html+lhs b/test/lhs-test.html+lhs
--- a/test/lhs-test.html+lhs
+++ b/test/lhs-test.html+lhs
@@ -61,7 +61,7 @@
       max-width: 100%;
     }
     svg {
-      height; auto;
+      height: auto;
       max-width: 100%;
     }
     h1, h2, h3, h4, h5, h6 {
diff --git a/test/lhs-test.latex b/test/lhs-test.latex
--- a/test/lhs-test.latex
+++ b/test/lhs-test.latex
@@ -93,8 +93,7 @@
 
 \begin{document}
 
-\hypertarget{lhs-test}{%
-\section{lhs test}\label{lhs-test}}
+\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:
diff --git a/test/lhs-test.latex+lhs b/test/lhs-test.latex+lhs
--- a/test/lhs-test.latex+lhs
+++ b/test/lhs-test.latex+lhs
@@ -60,8 +60,7 @@
 
 \begin{document}
 
-\hypertarget{lhs-test}{%
-\section{lhs test}\label{lhs-test}}
+\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:
diff --git a/test/typst-reader.native b/test/typst-reader.native
--- a/test/typst-reader.native
+++ b/test/typst-reader.native
@@ -1926,7 +1926,7 @@
                           [ Para
                               [ Span
                                   ( "" , [ "box" ] , [] )
-                                  [ Math InlineMath "\\Sigma^{*}"
+                                  [ Math InlineMath "\\Sigma^{\\ast}"
                                   , Str "\8192"
                                   , Code ( "" , [] , [] ) "Sigma^*"
                                   ]
@@ -2909,7 +2909,7 @@
                           [ Para
                               [ Span
                                   ( "" , [ "box" ] , [] )
-                                  [ Math InlineMath "< <"
+                                  [ Math InlineMath "\\ll"
                                   , Str "\8192"
                                   , Code ( "" , [] , [] ) "<<"
                                   , Str ","
@@ -2928,7 +2928,7 @@
                                   ( "" , [ "box" ] , [] )
                                   [ Math InlineMath "\\cong"
                                   , Str "\8192"
-                                  , Code ( "" , [] , [] ) "tilde.eqq"
+                                  , Code ( "" , [] , [] ) "tilde.equiv"
                                   ]
                               ]
                           ]
@@ -2940,7 +2940,7 @@
                           [ Para
                               [ Span
                                   ( "" , [ "box" ] , [] )
-                                  [ Math InlineMath "*"
+                                  [ Math InlineMath "\\ast"
                                   , Str "\8192"
                                   , Code ( "" , [] , [] ) "*"
                                   , Str ","
@@ -2960,7 +2960,7 @@
                           [ Para
                               [ Span
                                   ( "" , [ "box" ] , [] )
-                                  [ Math InlineMath "> >"
+                                  [ Math InlineMath "\\gg"
                                   , Str "\8192"
                                   , Code ( "" , [] , [] ) ">>"
                                   , Str ","
@@ -2980,7 +2980,7 @@
                                   [ Math InlineMath "\\ncong"
                                   , Str "\8192"
                                   , Code
-                                      ( "" , [] , [] ) "tilde.eqq.not"
+                                      ( "" , [] , [] ) "tilde.equiv.not"
                                   ]
                               ]
                           ]
@@ -3106,7 +3106,7 @@
                                   ( "" , [ "box" ] , [] )
                                   [ Math InlineMath "\\equiv"
                                   , Str "\8192"
-                                  , Code ( "" , [] , [] ) "ident"
+                                  , Code ( "" , [] , [] ) "equiv"
                                   ]
                               ]
                           ]
@@ -3519,7 +3519,7 @@
                           [ Para
                               [ Span
                                   ( "" , [ "box" ] , [] )
-                                  [ Math InlineMath "| \\rightarrow"
+                                  [ Math InlineMath "\\mapsto"
                                   , Str "\8192"
                                   , Code ( "" , [] , [] ) "|->"
                                   , Str ","
@@ -3624,7 +3624,7 @@
                           [ Para
                               [ Span
                                   ( "" , [ "box" ] , [] )
-                                  [ Math InlineMath "\\leftarrow >"
+                                  [ Math InlineMath "\\leftrightarrow"
                                   , Str "\8192"
                                   , Code ( "" , [] , [] ) "<->"
                                   , Str ","
@@ -5130,7 +5130,7 @@
           , Space
           , Str "from"
           , Space
-          , Code ( "" , [] , [] ) "ident"
+          , Code ( "" , [] , [] ) "equiv"
           , Space
           , Str "and"
           , Space
diff --git a/test/undergradmath.typ b/test/undergradmath.typ
--- a/test/undergradmath.typ
+++ b/test/undergradmath.typ
@@ -253,11 +253,11 @@
   cell($>$, [`>`, `gt`]), cell($ell$, `ell`), cell($minus.plus$, `minus.plus`),
   cell($>=$, [`>=`, `gt.eq`]), cell($parallel$, `parallel`), cell($times$, `times`),
   cell($!=$, [`!=`, `eq.not`]), cell($45 degree$, `45 degree`), cell($div$, `div`),
-  cell($<<$, [`<<`, `lt.double`]), cell($tilde.eqq$, `tilde.eqq`), cell($*$, [`*`, `ast`]),
-  cell($>>$, [`>>`, `gt.double`]), cell($tilde.eqq.not$, `tilde.eqq.not`), cell($divides$, `divides`),
+  cell($<<$, [`<<`, `lt.double`]), cell($tilde.equiv$, `tilde.equiv`), cell($*$, [`*`, `ast`]),
+  cell($>>$, [`>>`, `gt.double`]), cell($tilde.equiv.not$, `tilde.equiv.not`), cell($divides$, `divides`),
   cell($approx$, `approx`), cell($tilde$, `tilde`), cell($divides.not$, `divides.not`),
   cell($\u{224D}$, [`\u{224D}` @tricky]), cell($tilde.eq$, `tilde.eq`), cell($n!$, `n!`),
-  cell($ident$, `ident`), cell($tilde.not$, `tilde.not`), cell($diff$, `diff`),
+  cell($equiv$, `equiv`), cell($tilde.not$, `tilde.not`), cell($diff$, `diff`),
   cell($prec$, `prec`), cell($plus.circle$, `plus.circle`), cell($nabla$, `nabla`),
   cell($prec.eq$, `prec.eq`), cell($minus.circle$, `minus.cirle`), cell($planck.reduce$, `planck.reduce`),
   cell($succ$, `succ`), cell($dot.circle$, `dot.circle`), cell($circle.stroked.tiny$, `circle.stroked.tiny`),
@@ -464,7 +464,7 @@
 ))
 
 = Discrete mathematics examples
-For modulo, there is a symbol $ident$ from `ident` and a text operator $mod$ from `mod`.
+For modulo, there is a symbol $equiv$ from `equiv` and a text operator $mod$ from `mod`.
 
 For combinations the binomial symbol $binom(n, k)$ is from `binom(n, k)`.
 This resizes to be bigger in a display.
diff --git a/test/writer.html4 b/test/writer.html4
--- a/test/writer.html4
+++ b/test/writer.html4
@@ -64,7 +64,7 @@
       max-width: 100%;
     }
     svg {
-      height; auto;
+      height: auto;
       max-width: 100%;
     }
     h1, h2, h3, h4, h5, h6 {
diff --git a/test/writer.html5 b/test/writer.html5
--- a/test/writer.html5
+++ b/test/writer.html5
@@ -64,7 +64,7 @@
       max-width: 100%;
     }
     svg {
-      height; auto;
+      height: auto;
       max-width: 100%;
     }
     h1, h2, h3, h4, h5, h6 {
diff --git a/test/writer.latex b/test/writer.latex
--- a/test/writer.latex
+++ b/test/writer.latex
@@ -85,44 +85,34 @@
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
-\hypertarget{headers}{%
-\section{Headers}\label{headers}}
+\section{Headers}\label{headers}
 
-\hypertarget{level-2-with-an-embedded-link}{%
 \subsection{\texorpdfstring{Level 2 with an \href{/url}{embedded
-link}}{Level 2 with an embedded link}}\label{level-2-with-an-embedded-link}}
+link}}{Level 2 with an embedded link}}\label{level-2-with-an-embedded-link}
 
-\hypertarget{level-3-with-emphasis}{%
 \subsubsection{\texorpdfstring{Level 3 with
-\emph{emphasis}}{Level 3 with emphasis}}\label{level-3-with-emphasis}}
+\emph{emphasis}}{Level 3 with emphasis}}\label{level-3-with-emphasis}
 
-\hypertarget{level-4}{%
-\paragraph{Level 4}\label{level-4}}
+\paragraph{Level 4}\label{level-4}
 
-\hypertarget{level-5}{%
-\subparagraph{Level 5}\label{level-5}}
+\subparagraph{Level 5}\label{level-5}
 
-\hypertarget{level-1}{%
-\section{Level 1}\label{level-1}}
+\section{Level 1}\label{level-1}
 
-\hypertarget{level-2-with-emphasis}{%
 \subsection{\texorpdfstring{Level 2 with
-\emph{emphasis}}{Level 2 with emphasis}}\label{level-2-with-emphasis}}
+\emph{emphasis}}{Level 2 with emphasis}}\label{level-2-with-emphasis}
 
-\hypertarget{level-3}{%
-\subsubsection{Level 3}\label{level-3}}
+\subsubsection{Level 3}\label{level-3}
 
 with no blank line
 
-\hypertarget{level-2}{%
-\subsection{Level 2}\label{level-2}}
+\subsection{Level 2}\label{level-2}
 
 with no blank line
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
-\hypertarget{paragraphs}{%
-\section{Paragraphs}\label{paragraphs}}
+\section{Paragraphs}\label{paragraphs}
 
 Here's a regular paragraph.
 
@@ -137,8 +127,7 @@
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
-\hypertarget{block-quotes}{%
-\section{Block Quotes}\label{block-quotes}}
+\section{Block Quotes}\label{block-quotes}
 
 E-mail style:
 
@@ -183,8 +172,7 @@
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
-\hypertarget{code-blocks}{%
-\section{Code Blocks}\label{code-blocks}}
+\section{Code Blocks}\label{code-blocks}
 
 Code:
 
@@ -208,11 +196,9 @@
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
-\hypertarget{lists}{%
-\section{Lists}\label{lists}}
+\section{Lists}\label{lists}
 
-\hypertarget{unordered}{%
-\subsection{Unordered}\label{unordered}}
+\subsection{Unordered}\label{unordered}
 
 Asterisks tight:
 
@@ -283,8 +269,7 @@
   Minus 3
 \end{itemize}
 
-\hypertarget{ordered}{%
-\subsection{Ordered}\label{ordered}}
+\subsection{Ordered}\label{ordered}
 
 Tight:
 
@@ -350,8 +335,7 @@
   Item 3.
 \end{enumerate}
 
-\hypertarget{nested}{%
-\subsection{Nested}\label{nested}}
+\subsection{Nested}\label{nested}
 
 \begin{itemize}
 \tightlist
@@ -416,8 +400,7 @@
   Third
 \end{enumerate}
 
-\hypertarget{tabs-and-spaces}{%
-\subsection{Tabs and spaces}\label{tabs-and-spaces}}
+\subsection{Tabs and spaces}\label{tabs-and-spaces}
 
 \begin{itemize}
 \item
@@ -433,8 +416,7 @@
   \end{itemize}
 \end{itemize}
 
-\hypertarget{fancy-list-markers}{%
-\subsection{Fancy list markers}\label{fancy-list-markers}}
+\subsection{Fancy list markers}\label{fancy-list-markers}
 
 \begin{enumerate}
 \def\labelenumi{(\arabic{enumi})}
@@ -522,8 +504,7 @@
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
-\hypertarget{definition-lists}{%
-\section{Definition Lists}\label{definition-lists}}
+\section{Definition Lists}\label{definition-lists}
 
 Tight using spaces:
 
@@ -626,8 +607,7 @@
 \end{enumerate}
 \end{description}
 
-\hypertarget{html-blocks}{%
-\section{HTML Blocks}\label{html-blocks}}
+\section{HTML Blocks}\label{html-blocks}
 
 Simple block on one line:
 
@@ -689,8 +669,7 @@
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
-\hypertarget{inline-markup}{%
-\section{Inline Markup}\label{inline-markup}}
+\section{Inline Markup}\label{inline-markup}
 
 This is \emph{emphasized}, and so \emph{is this}.
 
@@ -722,8 +701,7 @@
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
-\hypertarget{smart-quotes-ellipses-dashes}{%
-\section{Smart quotes, ellipses, dashes}\label{smart-quotes-ellipses-dashes}}
+\section{Smart quotes, ellipses, dashes}\label{smart-quotes-ellipses-dashes}
 
 ``Hello,'' said the spider. ``\,`Shelob' is my name.''
 
@@ -744,8 +722,7 @@
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
-\hypertarget{latex}{%
-\section{LaTeX}\label{latex}}
+\section{LaTeX}\label{latex}
 
 \begin{itemize}
 \tightlist
@@ -793,8 +770,7 @@
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
-\hypertarget{special-characters}{%
-\section{Special Characters}\label{special-characters}}
+\section{Special Characters}\label{special-characters}
 
 Here is some unicode:
 
@@ -856,11 +832,9 @@
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
-\hypertarget{links}{%
-\section{Links}\label{links}}
+\section{Links}\label{links}
 
-\hypertarget{explicit}{%
-\subsection{Explicit}\label{explicit}}
+\subsection{Explicit}\label{explicit}
 
 Just a \href{/url/}{URL}.
 
@@ -880,8 +854,7 @@
 
 \href{}{Empty}.
 
-\hypertarget{reference}{%
-\subsection{Reference}\label{reference}}
+\subsection{Reference}\label{reference}
 
 Foo \href{/url/}{bar}.
 
@@ -905,8 +878,7 @@
 
 Foo \href{/url/}{biz}.
 
-\hypertarget{with-ampersands}{%
-\subsection{With ampersands}\label{with-ampersands}}
+\subsection{With ampersands}\label{with-ampersands}
 
 Here's a \href{http://example.com/?foo=1&bar=2}{link with an ampersand in the
 URL}.
@@ -917,8 +889,7 @@
 
 Here's an \href{/script?foo=1&bar=2}{inline link in pointy braces}.
 
-\hypertarget{autolinks}{%
-\subsection{Autolinks}\label{autolinks}}
+\subsection{Autolinks}\label{autolinks}
 
 With an ampersand: \url{http://example.com/?foo=1&bar=2}
 
@@ -948,8 +919,7 @@
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
-\hypertarget{images}{%
-\section{Images}\label{images}}
+\section{Images}\label{images}
 
 From ``Voyage dans la Lune'' by Georges Melies (1902):
 
@@ -963,8 +933,7 @@
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
-\hypertarget{footnotes}{%
-\section{Footnotes}\label{footnotes}}
+\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
diff --git a/test/writer.typst b/test/writer.typst
--- a/test/writer.typst
+++ b/test/writer.typst
@@ -382,7 +382,7 @@
 
 Should not be a list item:
 
-M.A. 2007
+M.A.~2007
 
 B. Williams
 
@@ -497,20 +497,32 @@
 <html-blocks>
 Simple block on one line:
 
+#block[
 foo
+]
 And nested without indentation:
 
+#block[
+#block[
+#block[
 foo
 
+]
+]
+#block[
 bar
+]
+]
 Interpreted markdown in a table:
 
 This is #emph[emphasized]
 And this is #strong[strong]
 Here’s a simple block:
 
+#block[
 foo
 
+]
 This should be a code block, though:
 
 ```
@@ -527,7 +539,13 @@
 
 Now, nested:
 
+#block[
+#block[
+#block[
 foo
+]
+]
+]
 This should just be an HTML comment:
 
 Multiline:
@@ -570,12 +588,12 @@
 
 #strike[This is #emph[strikeout].]
 
-Superscripts: a#super[bc]d a#super[#emph[hello]] a#super[hello there].
+Superscripts: a#super[bc]d a#super[#emph[hello]] a#super[hello~there].
 
-Subscripts: H#sub[2]O, H#sub[23]O, H#sub[many of them]O.
+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.
+a^b c^d, a\~b c\~d.
 
 #horizontalrule
 
diff --git a/test/writers-lang-and-dir.latex b/test/writers-lang-and-dir.latex
--- a/test/writers-lang-and-dir.latex
+++ b/test/writers-lang-and-dir.latex
@@ -77,8 +77,7 @@
 
 \begin{document}
 
-\hypertarget{empty-divs-and-spans}{%
-\section{Empty Divs and Spans}\label{empty-divs-and-spans}}
+\section{Empty Divs and Spans}\label{empty-divs-and-spans}
 
 Some text and
 
@@ -88,8 +87,7 @@
 
 Next paragraph with a {span} and a word-thatincludesa{span}right?
 
-\hypertarget{directionality}{%
-\section{Directionality}\label{directionality}}
+\section{Directionality}\label{directionality}
 
 Some text and
 
@@ -106,8 +104,7 @@
 Next paragraph with a \RL{rtl span} and a
 word-that-includesa\LR{ltrspan}right?
 
-\hypertarget{languages}{%
-\section{Languages}\label{languages}}
+\section{Languages}\label{languages}
 
 Some text and
 
@@ -125,8 +122,7 @@
 
 Some \foreignlanguage{spanish}{Spanish text}.
 
-\hypertarget{combined}{%
-\section{Combined}\label{combined}}
+\section{Combined}\label{combined}
 
 Some text and
 
