diff --git a/AUTHORS.md b/AUTHORS.md
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -309,6 +309,7 @@
 - Oliver Fabel
 - Oliver Matthews
 - Olivier Benz
+- Olivier Dossmann
 - Ophir Lifshitz
 - Or Neeman
 - OvidiusCicero
@@ -386,6 +387,7 @@
 - Thomas Hodgson
 - Thomas Soeiro
 - Thomas Weißschuh
+- Tiago-Manzato
 - Tim Lin
 - Tim Stewart
 - Tim Wisotzki
@@ -445,12 +447,14 @@
 - dbecher-ito
 - ebiim
 - ech0
+- etclub
 - favonia
 - guqicun
 - harabat
 - hseg
 - infinity0x
 - jeongminkim-islab
+- josch
 - kaizshang91
 - lawcho
 - lifeunleaded
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: February 9, 2025
+date: March 16, 2025
 ---
 
 # Synopsis
@@ -1505,11 +1505,10 @@
     order they appear on the command line.  For more
     information, see the section on [Citations].
 
-    Note: if your target format is `markdown`, `org`, or `typst`,
-    you will need to disable the `citations` extension (e.g., `-t
-    markdown-citations`) to see the rendered citations and
-    bibliography. Otherwise the format's own citation syntax will
-    be used.
+    Note: if this option is specified, the `citations` extension
+    will be disabled automatically in the writer, to ensure that
+    the citeproc-generated citations will be rendered instead of
+    the format's own citation syntax.
 
 `--bibliography=`*FILE*
 
@@ -2820,7 +2819,7 @@
     which is preferred to be unitless.
 
 `maxwidth`
-:   sets the CSS `max-width` property (default is 32em).
+:   sets the CSS `max-width` property (default is 36em).
 
 `backgroundcolor`
 :   sets the CSS `background-color` property on the `html` element.
@@ -3338,6 +3337,9 @@
 
 ### Variables for Typst
 
+`template`
+:   Typst template to use.
+
 `margin`
 :   A dictionary with the fields defined in the Typst documentation:
     `x`, `y`, `top`, `bottom`, `left`, `right`.
@@ -4828,7 +4830,7 @@
 
 it will be parsed as bibliographic information, not regular text.  (It
 will be used, for example, in the title of standalone LaTeX or HTML
-output.)  The block may contain just a title, a title and an author,
+output.)  The block may contain just a title, a date and an author,
 or all three elements. If you want to include an author but no
 title, or a title and a date but no author, you need a blank line:
 
@@ -6954,11 +6956,15 @@
 
 ## EPUB Metadata
 
-EPUB metadata may be specified using the `--epub-metadata` option, but
-if the source document is Markdown, it is better to use a [YAML metadata
-block][Extension: `yaml_metadata_block`].  Here is an example of
-a YAML metadata block with EPUB metadata:
+There are two ways to specify metadata for an EPUB. The first is to use
+the `--epub-metadata` option, which takes as its argument an XML file
+with [Dublin Core elements].
 
+The second way is to use YAML, either in a
+[YAML metadata block][Extension: `yaml_metadata_block`] in a Markdown
+document, or in a separate YAML file specified with `--metadata-file`.
+Here is an example of a YAML metadata block with EPUB metadata:
+
     ---
     title:
     - type: main
@@ -7636,11 +7642,11 @@
    writer could in principle do anything on your file system. Please
    audit filters and custom writers very carefully before using them.
 
-2. Several input formats (including HTML, Org, and RST) support `include`
-   directives that allow the contents of a file to be included in the
-   output. An untrusted attacker could use these to view the contents of
-   files on the file system.  (Using the `--sandbox` option can
-   protect against this threat.)
+2. Several input formats (including LaTeX, Org, RST, and Typst)
+   support `include` directives that allow the contents of a file to be
+   included in the output. An untrusted attacker could use these
+   to view the contents of files on the file system. (Using the
+   `--sandbox` option can protect against this threat.)
 
 3. Several output formats (including RTF, FB2, HTML with
    `--self-contained`, EPUB, Docx, and ODT) will embed encoded
@@ -7650,7 +7656,16 @@
    against this threat, but will also prevent including images in
    these formats.)
 
-4. If your application uses pandoc as a Haskell library (rather than
+4. In reading HTML files, pandoc will attempt to include the
+   contents of `iframe` elements by fetching content from the
+   local file or URL specified by `src`. If untrusted HTML is
+   processed on a server, this has the potential to reveal anything
+   readable by the process running the server. Using the `-f html+raw_html`
+   will mitigate this threat by causing the whole `iframe`
+   to be parsed as a raw HTML block. Using `--sandbox will also
+   protect against the threat.
+
+5. If your application uses pandoc as a Haskell library (rather than
    shelling out to the executable), it is possible to use it in a mode
    that fully isolates pandoc from your file system, by running the
    pandoc operations in the `PandocPure` monad. See the document
@@ -7658,7 +7673,7 @@
    for more details. (This corresponds to the use of the `--sandbox`
    option on the command line.)
 
-5. Pandoc's parsers can exhibit pathological performance on some
+6. Pandoc's parsers can exhibit pathological performance on some
    corner cases.  It is wise to put any pandoc operations under
    a timeout, to avoid DOS attacks that exploit these issues.
    If you are using the pandoc executable, you can add the
@@ -7668,7 +7683,7 @@
    to pathological performance than the `markdown` parser, so
    it is a better choice when processing untrusted input.
 
-6. The HTML generated by pandoc is not guaranteed to be safe.
+7. The HTML generated by pandoc is not guaranteed to be safe.
    If `raw_html` is enabled for the Markdown input, users can
    inject arbitrary HTML.  Even if `raw_html` is disabled,
    users can include dangerous content in URLs and attributes.
diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,155 @@
 # Revision history for pandoc
 
+## pandoc 3.6.4 (2025-03-16)
+
+  * Disable `citations` extension in writers if `--citeproc` is used (#10662).
+    Otherwise we get undesirable results, as the format's native
+    citation mechanism is used instead of (or in addition to) the
+    citeproc-generated citations.
+
+  * Markdown reader:
+
+    + Allow line break between URL and title of link (#10621).
+    + Give better position information when YAML metadata parsing fails
+      with a YAML exception (#10231).
+    + Fixed `escapedChar'` parser (#10672). It should not accept
+      escaped newlines.
+    + Remove some misguided list fanciness (#9865, #7778, cf. #5628).
+      Previously we tried to handle things like commented out list items:
+      ```
+      - one
+      <!--
+      - two
+      -->
+      - three
+      ```
+      and also things like:
+      ```
+      - one `and
+      - two` and
+      ```
+      But the code we added to handle these cases caused problems with
+      other, more straightforward things, like:
+      ````
+      - one
+      - ```
+        code
+        ```
+      - three
+      ````
+      So we are rolling back all the fanciness, so that the markdown
+      parser now behaves more like the commonmark parser, in which
+      indicators of block-level structure always take priority over
+      indicators of inline structure.
+
+  * HTML reader:
+
+    + Skip MathJaX-introduced cruft (#10673).
+    + Ignore style tags in the body (#10643).
+
+  * LaTeX reader:
+
+    + Better handle comments/whitespace in option lists and includes (#10659).
+    + Support `\newline`, `\linebreak`.
+
+  * Docx reader/writer:
+
+    + Revert commit adding row heads
+      (cbe67b9602a736976ef6921aefbbc60d51c6755a) (#10627).
+      Word sets `w:firstColumn="1"` by default for tables.  You have to find
+      the Table Design tab and explicitly uncheck "First Column" to make this
+      go away.  In most cases, I don't think writers intend to designate
+      the first column as a row head, so this commit is going to produce
+      unexpected results.  In addition, because of the table normalization
+      done by pandoc-type's `tableWith`, any table containing a colspanned
+      cell in the left-hand column will get broken if the first column is
+      designated a row head.  For these reasons it seems best to revert this
+      change, which was made in response to #9495.
+
+  * LaTeX writer and template:
+
+    + Remove `selnolig-langs` (#9863). We now specify the language as
+      a global option again, so we no longer need to specify it when
+      invoking selnolig.
+    + Use babel options `shorthands=off` (#6817).
+    + Use `*` for multirow width when no colwidth specified (#10685).
+      Otherwise the multirow will be excessively wide.
+    + Protect `\phantomsection` (#10688, etclub).
+
+  * Markdown writer:
+
+    + Omit extra space after bullets (#7172). Those who want the old
+      behavior can obtain it by using `-t markdown+four_space_rule`.
+    + Treat `Emph [Emph ils]]` as `ils` (#10642). Otherwise we get
+      `**content**` which means strong emphasis.
+
+  * EPUB writer:
+
+    + Use a nonbreaking space after section number in nav.xhtml.
+      This seems to be required for iOS books app to display the space.
+
+  * Typst writer:
+
+    + Better heuristics for escaping potential list markers (#10650).
+    + Ensure that `citation-style` works as well as `csl` (#10661).
+
+  * Powerpoint writer:
+
+    + Avoid extra blank lines before author when there is no
+      subtitle (#10619).
+
+  * JATS template:
+
+    + Fix typo in author prefix in article.jats_publishing template
+      (#10622, Tiago-Manzato).
+
+  * Text.Pandoc.Parsing:
+
+    + Smart quote parsing: ignore curly quotes (#10610). Previously we
+      tried to match curly quotes as well as straight quotes,
+      producing Quoted inlines. But it seems better just to assume
+      that those who use curly quotes want them passed through
+      verbatim. This also fixes an (unintended) bug whereby curly
+      single left quotes would sometimes be changed to single right quotes.
+
+  * Text.Pandoc.Shared:
+
+    + `makeSections`: put some attributes on section element only.
+      Certain `role` and `epub:type` attributes should only be on the section
+      (and indeed, many `role`s give a validation error if left on the
+      heading element).
+
+  * Text.Pandoc.Logging:
+
+    + Change NoTitleElement from WARNING to INFO (#10671). Users
+      commonly complain about the warning when producing HTML
+      documents without an explicit title. It seems that an info
+      message is more appropriate, since pandoc's default here (using
+      the input's base name) ensures compliance with the standard and
+      many users are happy with that default. Those who want to make
+      sure the message is seen can use `--verbose`.
+
+  * Beamer template: only emit `\date` if set (#10687, josch).
+
+  * Fix invalid OOXML in definition_list.docx test (#10394).
+
+  * MANUAL.txt:
+
+    + Correct typo: 'date' for doubled 'title' (#10654, Olivier Dossmann).
+    + Add note about `template` variable for typst.
+    + Change maxwidth default in MANUAL.txt (#10683).
+    + Improve EPUB metadata documentation.
+    + In Security section, alert readers to a threat relating to iframe in
+      HTML, and add LaTeX, Typst to the list of formats that have an
+      `include` (#10682).
+
+  * `doc/lua-filters.md`: Add missing html_math_method 'katex' (R. N. West).
+
+  * Use texmath 0.12.9.
+
+  * Use typst 0.7. Fixes an issue with package loading, a regression
+    in pandoc 3.6.3.
+
 ## pandoc 3.6.3 (2025-02-09)
 
   * Track wikilinks with a class instead of a title (Evan Silberman).
diff --git a/data/templates/article.jats_publishing b/data/templates/article.jats_publishing
--- a/data/templates/article.jats_publishing
+++ b/data/templates/article.jats_publishing
@@ -98,7 +98,7 @@
 <surname>$if(author.non-dropping-particle)$${author.non-dropping-particle} $endif$$author.surname$</surname>
 <given-names>$author.given-names$$if(author.dropping-particle)$ ${author.dropping-particle}$endif$</given-names>
 $if(author.prefix)$
-<prefix>${author.suffix}</prefix>
+<prefix>${author.prefix}</prefix>
 $endif$
 $if(author.suffix)$
 <suffix>${author.suffix}</suffix>
diff --git a/data/templates/common.latex b/data/templates/common.latex
--- a/data/templates/common.latex
+++ b/data/templates/common.latex
@@ -183,9 +183,9 @@
 $--
 $if(lang)$
 \ifLuaTeX
-\usepackage[bidi=basic$for(babeloptions)$,$babeloptions$$endfor$]{babel}
+\usepackage[bidi=basic,shorthands=off,$for(babeloptions)$,$babeloptions$$endfor$]{babel}
 \else
-\usepackage[bidi=default$for(babeloptions)$,$babeloptions$$endfor$]{babel}
+\usepackage[bidi=default,shorthands=off,$for(babeloptions)$,$babeloptions$$endfor$]{babel}
 \fi
 $if(babel-lang)$
 $if(mainfont)$
@@ -198,14 +198,9 @@
 $for(babelfonts/pairs)$
 \babelfont[$babelfonts.key$]{rm}{$babelfonts.value$}
 $endfor$
-% get rid of language-specific shorthands (see #6817):
-\let\LanguageShortHands\languageshorthands
-\def\languageshorthands#1{}
-$if(selnolig-langs)$
 \ifLuaTeX
-  \usepackage[$for(selnolig-langs)$$it$$sep$,$endfor$]{selnolig} % disable illegal ligatures
+  \usepackage{selnolig} % disable illegal ligatures
 \fi
-$endif$
 $endif$
 $--
 $-- pagestyle
diff --git a/data/templates/default.beamer b/data/templates/default.beamer
--- a/data/templates/default.beamer
+++ b/data/templates/default.beamer
@@ -114,7 +114,9 @@
 \subtitle$if(shortsubtitle)$[$shortsubtitle$]$endif${$subtitle$}
 $endif$
 \author$if(shortauthor)$[$shortauthor$]$endif${$for(author)$$author$$sep$ \and $endfor$}
+$if(date)$
 \date$if(shortdate)$[$shortdate$]$endif${$date$}
+$endif$
 $if(institute)$
 \institute$if(shortinstitute)$[$shortinstitute$]$endif${$for(institute)$$institute$$sep$ \and $endfor$}
 $endif$
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.6.3
+version:         3.6.4
 build-type:      Simple
 license:         GPL-2.0-or-later
 license-file:    COPYING.md
@@ -470,7 +470,7 @@
   build-depends: xml                   >= 1.3.12   && < 1.4,
                  xml-conduit           >= 1.9.1.1  && < 1.11,
                  xml-types             >= 0.3      && < 0.4,
-                 containers            >= 0.6.0.1  && < 0.8,
+                 containers            >= 0.6.0.1  && < 0.9,
                  text                  >= 1.1.1.0  && < 2.2
 
   hs-source-dirs:  xml-light
@@ -498,7 +498,7 @@
                  commonmark            >= 0.2.6.1  && < 0.3,
                  commonmark-extensions >= 0.2.6    && < 0.3,
                  commonmark-pandoc     >= 0.2.3    && < 0.3,
-                 containers            >= 0.6.0.1  && < 0.8,
+                 containers            >= 0.6.0.1  && < 0.9,
                  crypton               >= 0.30     && < 1.1,
                  crypton-connection    >= 0.3.1    && < 0.5,
                  data-default          >= 0.4      && < 0.9,
@@ -535,7 +535,7 @@
                  syb                   >= 0.1      && < 0.8,
                  tagsoup               >= 0.14.6   && < 0.15,
                  temporary             >= 1.1      && < 1.4,
-                 texmath               >= 0.12.8.13 && < 0.13,
+                 texmath               >= 0.12.9   && < 0.13,
                  text                  >= 1.1.1.0  && < 2.2,
                  text-conversions      >= 0.3      && < 0.4,
                  time                  >= 1.5      && < 1.15,
@@ -546,7 +546,7 @@
                  zip-archive           >= 0.4.3.1  && < 0.5,
                  zlib                  >= 0.5      && < 0.8,
                  xml                   >= 1.3.12   && < 1.4,
-                 typst                 >= 0.6.2    && < 0.6.3,
+                 typst                 >= 0.7      && < 0.8,
                  vector                >= 0.12     && < 0.14,
                  djot                  >= 0.1.2.2  && < 0.2,
                  tls                   >= 2.0.1    && < 2.2,
@@ -792,7 +792,7 @@
                   Diff              >= 0.2     && < 1.1,
                   Glob              >= 0.7     && < 0.11,
                   bytestring        >= 0.9     && < 0.13,
-                  containers        >= 0.4.2.1 && < 0.8,
+                  containers        >= 0.4.2.1 && < 0.9,
                   directory         >= 1.2.3   && < 1.4,
                   doctemplates      >= 0.11    && < 0.12,
                   filepath          >= 1.1     && < 1.6,
@@ -873,7 +873,7 @@
   main-is:         benchmark-pandoc.hs
   hs-source-dirs:  benchmark
   build-depends:   bytestring,
-                   tasty-bench >= 0.2     && <= 0.4,
+                   tasty-bench >= 0.4     && <= 0.5,
                    mtl         >= 2.2     && < 2.4,
                    text        >= 1.1.1.0 && < 2.2,
                    deepseq
diff --git a/src/Text/Pandoc/App/OutputSettings.hs b/src/Text/Pandoc/App/OutputSettings.hs
--- a/src/Text/Pandoc/App/OutputSettings.hs
+++ b/src/Text/Pandoc/App/OutputSettings.hs
@@ -38,6 +38,7 @@
 import System.IO (stdout)
 import Text.Pandoc.Chunks (PathTemplate(..))
 import Text.Pandoc
+import Text.Pandoc.Filter (Filter(CiteprocFilter))
 import Text.Pandoc.App.Opt (Opt (..))
 import Text.Pandoc.App.CommandLineOptions (engines)
 import Text.Pandoc.Format (FlavoredFormat (..), applyExtensionsDiff,
@@ -121,7 +122,7 @@
                      then getAndCompile (tp <.> T.unpack format)
                      else throwError e)
 
-  (writer, writerExts, mtemplate) <-
+  (writer, writerExts', mtemplate) <-
     if "lua" `T.isSuffixOf` format
     then do
       let path = T.unpack format
@@ -150,6 +151,10 @@
         tmpl <- processCustomTemplate (compileDefaultTemplate format)
         return (w, wexts, tmpl)
 
+  -- see #10662:
+  let writerExts = if CiteprocFilter `elem` optFilters opts
+                      then disableExtension Ext_citations writerExts'
+                      else writerExts'
 
   let addSyntaxMap existingmap f = do
         res <- liftIO (parseSyntaxDefinition f)
diff --git a/src/Text/Pandoc/Filter.hs b/src/Text/Pandoc/Filter.hs
--- a/src/Text/Pandoc/Filter.hs
+++ b/src/Text/Pandoc/Filter.hs
@@ -41,7 +41,7 @@
 data Filter = LuaFilter FilePath
             | JSONFilter FilePath
             | CiteprocFilter -- built-in citeproc
-            deriving (Show, Generic)
+            deriving (Show, Generic, Eq)
 
 instance FromJSON Filter where
  parseJSON node =
diff --git a/src/Text/Pandoc/Logging.hs b/src/Text/Pandoc/Logging.hs
--- a/src/Text/Pandoc/Logging.hs
+++ b/src/Text/Pandoc/Logging.hs
@@ -473,7 +473,7 @@
        LoadedResource{}              -> INFO
        ScriptingInfo{}               -> INFO
        ScriptingWarning{}            -> WARNING
-       NoTitleElement{}              -> WARNING
+       NoTitleElement{}              -> INFO
        NoLangSpecified               -> INFO
        InvalidLang{}                 -> WARNING
        CouldNotHighlight{}           -> WARNING
diff --git a/src/Text/Pandoc/Parsing/Smart.hs b/src/Text/Pandoc/Parsing/Smart.hs
--- a/src/Text/Pandoc/Parsing/Smart.hs
+++ b/src/Text/Pandoc/Parsing/Smart.hs
@@ -43,7 +43,6 @@
   , notFollowedBy
   , try
   )
-import qualified Data.Text as T
 import qualified Text.Pandoc.Builder as B
 
 -- | Parses various ASCII punctuation, quotes, and apostrophe in a smart
@@ -93,13 +92,6 @@
      (withQuoteContext InDoubleQuote (manyTill inlineParser doubleQuoteEnd)))
    <|> pure (B.str "\8220")
 
-charOrRef :: (Stream s m Char, UpdateSourcePos s Char) => [Char] -> ParsecT s st m Char
-charOrRef cs =
-  oneOf cs <|> try (do t <- characterReference
-                       case T.unpack t of
-                         [c] | c `elem` cs -> return c
-                         _ -> fail "unexpected character reference")
-
 -- | Succeeds if the parser is
 --
 -- * not within single quoted text;
@@ -116,13 +108,13 @@
   -- single quote start can't be right after str
   guard =<< notAfterString
   try $ do
-    charOrRef "'\8216\145"
+    char '\''
     void $ lookAhead (satisfy (not . isSpaceChar))
 
 singleQuoteEnd :: (Stream s m Char, UpdateSourcePos s Char)
                => ParsecT s st m ()
 singleQuoteEnd = try $ do
-  charOrRef "'\8217\146"
+  char '\''
   notFollowedBy alphaNum
 
 -- | Succeeds if the parser is
@@ -142,13 +134,13 @@
 doubleQuoteStart = do
   failIfInQuoteContext InDoubleQuote
   guard =<< notAfterString
-  try $ do charOrRef "\"\8220\147"
+  try $ do char '"'
            void $ lookAhead (satisfy (not . isSpaceChar))
 
 -- | Parses a closing quote character.
 doubleQuoteEnd :: (Stream s m Char, UpdateSourcePos s Char)
                => ParsecT s st m ()
-doubleQuoteEnd = void (charOrRef "\"\8221\148")
+doubleQuoteEnd = void (char '"')
 
 -- | Parses an ASCII apostrophe (@'@) or right single quotation mark and
 -- returns a RIGHT SINGLE QUOtatiON MARK character.
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
@@ -816,8 +816,6 @@
       cap' = caption shortCaption fullCaption
       (hdr, rows) = splitHeaderRows (firstRowFormatting look) parts
 
-  let rowHeadCols = if firstColumnFormatting look then 1 else 0
-
   let width = maybe 0 maximum $ nonEmpty $ map rowLength parts
       rowLength :: Docx.Row -> Int
       rowLength (Docx.Row _ c) = sum (fmap (\(Docx.Cell _ gridSpan _ _) -> fromIntegral gridSpan) c)
@@ -841,7 +839,7 @@
   return $ tableWith attr cap'
                  (zip alignments widths)
                  (TableHead nullAttr headerCells)
-                 [TableBody nullAttr (RowHeadColumns rowHeadCols) [] bodyCells]
+                 [TableBody nullAttr 0 [] bodyCells]
                  (TableFoot nullAttr [])
 bodyPartToBlocks HRule = pure Pandoc.horizontalRule
 
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
@@ -294,15 +294,11 @@
 
 type TblGrid = [Integer]
 
-data TblLook = TblLook { firstRowFormatting ::Bool
-                       , firstColumnFormatting :: Bool
-                       }
+newtype TblLook = TblLook {firstRowFormatting::Bool}
               deriving Show
 
 defaultTblLook :: TblLook
-defaultTblLook = TblLook{ firstRowFormatting = False
-                        , firstColumnFormatting = False
-                        }
+defaultTblLook = TblLook{firstRowFormatting = False}
 
 data Row = Row TblHeader [Cell] deriving Show
 
@@ -695,25 +691,17 @@
 
 elemToTblLook :: NameSpaces -> Element -> D TblLook
 elemToTblLook ns element | isElem ns "w" "tblLook" element =
-  let val = findAttrByName ns "w" "val" element
+  let firstRow = findAttrByName ns "w" "firstRow" element
+      val = findAttrByName ns "w" "val" element
       firstRowFmt =
-        case findAttrByName ns "w" "firstRow" element of
+        case firstRow of
           Just "1" -> True
           Just  _  -> False
           Nothing -> case val of
             Just bitMask -> testBitMask bitMask 0x020
             Nothing      -> False
-      firstColFmt =
-        case findAttrByName ns "w" "firstColumn" element of
-          Just "1" -> True
-          Just  _  -> False
-          Nothing -> case val of
-            Just bitMask -> testBitMask bitMask 0x080
-            Nothing      -> False
   in
-   return TblLook{ firstRowFormatting = firstRowFmt
-                 , firstColumnFormatting = firstColFmt
-                 }
+   return TblLook{firstRowFormatting = firstRowFmt}
 elemToTblLook _ _ = throwError WrongElem
 
 elemToRow :: NameSpaces -> Element -> D Row
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
@@ -242,7 +242,7 @@
         "main" -> pDiv
         "figure" -> pFigure
         "iframe" -> pIframe
-        "style" -> pRawHtmlBlock
+        "style" -> mempty <$ pHtmlBlock "style" -- see #10643
         "textarea" -> pRawHtmlBlock
         "switch"
           | epubExts
@@ -537,7 +537,7 @@
 
 pRawHtmlBlock :: PandocMonad m => TagParser m Blocks
 pRawHtmlBlock = do
-  raw <- pHtmlBlock "script" <|> pHtmlBlock "style" <|> pHtmlBlock "textarea"
+  raw <- pHtmlBlock "script" <|> pHtmlBlock "textarea"
           <|> pRawTag
   exts <- getOption readerExtensions
   if extensionEnabled Ext_raw_html exts && not (T.null raw)
@@ -716,6 +716,7 @@
         "input"
           | lookup "type" attr == Just "checkbox"
           -> asks inListItem >>= guard >> pCheckbox
+        "style" -> mempty <$ pHtmlBlock "style" -- see #10643
         "script"
           | Just x <- lookup "type" attr
           , "math/tex" `T.isPrefixOf` x -> pScriptMath
@@ -878,6 +879,11 @@
   exts <- getOption readerExtensions
   let attr = toAttr attr'
   case attr of
+     (_,cls,_) -- skip MathJaX-generated HTML; see #10673
+       | "mjx-chtml" `elem` cls -> mempty <$ pInTags "span" inline
+       | "MathJax_CHTML" `elem` cls -> mempty <$ pInTags "span" inline
+       | "MathJax_Preview" `elem` cls -> mempty <$ pInTags "span" inline
+       | "MJX_Assistive_MathML" `elem` cls -> pInTags "span" inline
      (_,["katex-html"],_) -> mempty <$ pInTags "span" inline
        -- skip HTML generated by KaTeX, since we get
        -- the math by parsing mathml (#9971)
@@ -1075,6 +1081,8 @@
 isInlineTag t = isCommentTag t || case t of
   TagOpen "script" _ -> "math/tex" `T.isPrefixOf` fromAttrib "type" t
   TagClose "script"  -> True
+  TagOpen "style" _  -> True -- see #10643, invalid but it happens
+  TagClose "style"   -> True
   TagOpen name _     -> isInlineTagName name
   TagClose name      -> isInlineTagName name
   _                  -> False
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -386,20 +386,18 @@
     , ("lowercase", makeLowercase <$> tok)
     , ("thanks", skipopts >> note <$> grouped block)
     , ("footnote", skipopts >> footnote)
+    , ("newline", pure B.linebreak)
+    , ("linebreak", pure B.linebreak)
     , ("passthrough", fixPassthroughEscapes <$> tok)
     -- \passthrough macro used by latex writer
                            -- for listings
     , ("includegraphics", do options <- option [] keyvals
-                             src <- braced
-                             mkImage options .
-                               unescapeURL .
-                               removeDoubleQuotes $ untokenize src)
+                             src <- bracedFilename
+                             mkImage options . unescapeURL $ src)
     -- svg
     , ("includesvg",      do options <- option [] keyvals
-                             src <- braced
-                             mkImage options .
-                               unescapeURL .
-                               removeDoubleQuotes $ untokenize src)
+                             src <- bracedFilename
+                             mkImage options . unescapeURL $ src)
     -- hyperref
     , ("url", (\url -> linkWith ("",["uri"],[]) url "" (str url))
                         . unescapeURL . untokenize <$> bracedUrl)
@@ -438,6 +436,14 @@
     , ("today", today)
     ]
 
+bracedFilename :: PandocMonad m => LP m Text
+bracedFilename =
+  removeDoubleQuotes . T.strip . untokenize . filter (not . isComment) <$> braced
+
+isComment :: Tok -> Bool
+isComment (Tok _ Comment _) = True
+isComment _ = False
+
 today :: PandocMonad m => LP m Inlines
 today =
   text . T.pack . showGregorian . localDay . zonedTimeToLocalTime
@@ -719,7 +725,7 @@
 doSubfile :: PandocMonad m => LP m Blocks
 doSubfile = do
   skipMany opt
-  f <- T.unpack . removeDoubleQuotes . T.strip . untokenize <$> braced
+  f <- T.unpack <$> bracedFilename
   oldToks <- getInput
   setInput $ TokStream False []
   insertIncluded (ensureExtension (/= "") ".tex" f)
@@ -737,7 +743,7 @@
           _ -> const False
   skipMany opt
   fs <- map (T.unpack . removeDoubleQuotes . T.strip) . T.splitOn "," .
-         untokenize <$> braced
+         untokenize . filter (not . isComment) <$> braced
   mapM_ (insertIncluded . ensureExtension isAllowed ".tex") fs
   return mempty
 
@@ -745,7 +751,7 @@
 usepackage = do
   skipMany opt
   fs <- map (T.unpack . removeDoubleQuotes . T.strip) . T.splitOn "," .
-         untokenize <$> braced
+           untokenize . filter (not . isComment) <$> braced
   let parsePackage f = do
         TokStream _ ts <- getIncludedToks (ensureExtension (== ".sty") ".sty" f)
         parseFromToks (do _ <- blocks
diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
--- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
@@ -934,6 +934,7 @@
 
 keyval :: PandocMonad m => LP m (Text, Text)
 keyval = try $ do
+  sp
   key <- untokenize <$> many1 (notFollowedBy (symbol '=') >>
                          (symbol '-' <|> symbol '_' <|> satisfyTok isWordTok))
   sp
@@ -952,6 +953,7 @@
                                 Tok _ Symbol "{" -> False
                                 Tok _ Symbol "}" -> False
                                 _                -> True)))))
+  sp
   optional (symbol ',')
   sp
   return (key, T.strip val)
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -49,7 +49,7 @@
 import Text.Pandoc.Walk (walk)
 import Text.Pandoc.Parsing hiding (tableCaption)
 import Text.Pandoc.Readers.HTML (htmlInBalanced, htmlTag, isBlockTag,
-                                 isCommentTag, isInlineTag, isTextTag)
+                                 isInlineTag, isTextTag)
 import Text.Pandoc.Readers.LaTeX (applyMacros, rawLaTeXBlock, rawLaTeXInline)
 import Text.Pandoc.Shared
 import Text.Pandoc.URI (escapeURI, isURI, pBase64DataURI)
@@ -855,15 +855,7 @@
   notFollowedByHtmlCloser
   notFollowedByDivCloser
   optional (() <$ gobbleSpaces continuationIndent)
-  listLineCommon
-
-listLineCommon :: PandocMonad m => MarkdownParser m Text
-listLineCommon = T.concat <$> manyTill
-              (  many1Char (satisfy $ \c -> c `notElem` ['\n', '<', '`'])
-             <|> fmap snd (withRaw code)
-             <|> fmap (renderTags . (:[]) . fst) (htmlTag isCommentTag)
-             <|> countChar 1 anyChar
-              ) newline
+  anyLine
 
 -- parse raw text for one list item, excluding start marker and continuations
 rawListItem :: PandocMonad m
@@ -877,7 +869,7 @@
   let continuationIndent = if fourSpaceRule
                               then 4
                               else sourceColumn pos2 - sourceColumn pos1
-  first <- listLineCommon
+  first <- anyLine
   rest <- many (do notFollowedBy listStart
                    notFollowedBy (() <$ codeBlockFenced)
                    notFollowedBy blankline
@@ -1553,7 +1545,8 @@
 escapedChar' :: PandocMonad m => MarkdownParser m Char
 escapedChar' = try $ do
   char '\\'
-  (guardEnabled Ext_all_symbols_escapable >> satisfy (not . isAlphaNum))
+  (guardEnabled Ext_all_symbols_escapable >>
+     satisfy (\c -> c /= '\n' && c /= '\r' && not (isAlphaNum c)))
      <|> (guardEnabled Ext_angle_brackets_escapable >>
             oneOf "\\`*_{}[]()>#+-.!~\"<>")
      <|> oneOf "\\`*_{}[]()>#+-.!"
@@ -1818,25 +1811,25 @@
   guardDisabled Ext_footnotes <|> notFollowedBy' noteMarker
   withRaw $ trimInlinesF <$> inBalancedBrackets inlines
 
-parenthesizedChars :: PandocMonad m => MarkdownParser m Text
-parenthesizedChars = do
-  result <- charsInBalanced '(' ')' litChar
-  return $ "(" <> result <> ")"
-
 -- source for a link, with optional title
 source :: PandocMonad m => MarkdownParser m (Text, Text)
 source = do
   char '('
   skipSpaces
-  let urlChunk =
-            try parenthesizedChars
-        <|> (notFollowedBy (oneOf " )") >> litChar)
-        <|> try (many1Char spaceChar <* notFollowedBy (oneOf "\"')"))
+  let parenthesizedChars = do
+        result <- charsInBalanced '(' ')' litChar
+        return $ "(" <> result <> ")"
+  let linkTitle' = try $ spnl >> linkTitle
+  let urlChunk = do
+        notFollowedBy linkTitle'
+        try parenthesizedChars
+          <|> (notFollowedBy (oneOf " )") >> litChar)
+          <|> try (many1Char spaceChar <* notFollowedBy (oneOf "\"')"))
   let sourceURL = T.unwords . T.words . T.concat <$> many urlChunk
   let betweenAngles = try $
          char '<' >> mconcat <$> (manyTill litChar (char '>'))
   src <- try betweenAngles <|> try base64DataURI <|> sourceURL
-  tit <- option "" $ try $ spnl >> linkTitle
+  tit <- option "" linkTitle'
   skipSpaces
   char ')'
   return (escapeURI $ trimr src, tit)
diff --git a/src/Text/Pandoc/Readers/Metadata.hs b/src/Text/Pandoc/Readers/Metadata.hs
--- a/src/Text/Pandoc/Readers/Metadata.hs
+++ b/src/Text/Pandoc/Readers/Metadata.hs
@@ -44,9 +44,9 @@
              -> B.ByteString
              -> ParsecT Sources st m (Future st Meta)
 yamlBsToMeta pMetaValue bstr = do
+  pos <- getPosition
   case decodeAllWithWarnings bstr of
        Right (warnings, xs) -> do
-         pos <- getPosition
          mapM_ (\(Yaml.DuplicateKey jpath) ->
                           report (YamlWarning pos $ "Duplicate key: " <>
                                   T.pack (formatRelativePath jpath)))
@@ -57,7 +57,9 @@
            [] -> return . return $ mempty
            _  -> Prelude.fail "expected YAML object"
        Left err' -> do
-         let msg = T.pack $ Yaml.prettyPrintParseException err'
+         let msg = T.pack $ "Error parsing YAML metadata at " <>
+                             show pos <> ":\n" <>
+                             Yaml.prettyPrintParseException err'
          throwError $ PandocParseError $
            if "did not find expected key" `T.isInfixOf` msg
               then msg <>
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -547,9 +547,14 @@
                         ("number", T.intercalate "." (map tshow newnum)) : kvs
                   _ -> kvs
     let divattr = (ident, "section":classes, kvs')
-    let attr = ("",classes,kvs')
+    let isHeadingAttr ("epub:type",_) = False
+        isHeadingAttr ("role",v) =
+          v `elem` ["tab", "presentation", "none", "treeitem",
+                    "menuitem", "button", "heading"]
+        isHeadingAttr _ = True
+    let hattr = ("",classes, filter isHeadingAttr kvs')
     return $
-      Div divattr (Header level' attr title' : sectionContents') : rest'
+      Div divattr (Header level' hattr title' : sectionContents') : rest'
   go (Div divattr@(dident,dclasses,_) (Header level hattr title':ys) : xs)
       | all (\case
                Header level' _ _ -> level' > level
diff --git a/src/Text/Pandoc/Writers/DocBook.hs b/src/Text/Pandoc/Writers/DocBook.hs
--- a/src/Text/Pandoc/Writers/DocBook.hs
+++ b/src/Text/Pandoc/Writers/DocBook.hs
@@ -174,7 +174,8 @@
 blockToDocBook :: PandocMonad m => WriterOptions -> Block -> DB m (Doc Text)
 -- Add ids to paragraphs in divs with ids - this is needed for
 -- pandoc-citeproc to get link anchors in bibliographies:
-blockToDocBook opts (Div (id',"section":_,_) (Header lvl (_,classes,attrs) ils : xs)) = do
+blockToDocBook opts (Div (id',"section":_classes,divattrs)
+                     (Header lvl (_,hclasses,_) ils : xs)) = do
   version <- ask
   -- DocBook doesn't allow sections with no content, so insert some if needed
   let bs = if null xs
@@ -198,7 +199,7 @@
 
       -- Populate miscAttr with Header.Attr.attributes, filtering out non-valid DocBook section attributes, id, and xml:id
       -- Also enrich the role attribute with certain class tokens
-      miscAttr = enrichRole (filter (isSectionAttr version) attrs) classes
+      miscAttr = enrichRole (filter (isSectionAttr version) divattrs) hclasses
       attribs = nsAttr <> idAttr <> miscAttr
   title' <- inlinesToDocBook opts ils
   contents <- blocksToDocBook opts bs
diff --git a/src/Text/Pandoc/Writers/Docx/Table.hs b/src/Text/Pandoc/Writers/Docx/Table.hs
--- a/src/Text/Pandoc/Writers/Docx/Table.hs
+++ b/src/Text/Pandoc/Writers/Docx/Table.hs
@@ -63,7 +63,6 @@
 import qualified Data.Text as T
 import qualified Text.Pandoc.Translations as Term
 import qualified Text.Pandoc.Writers.GridTable as Grid
-import Data.Bits ((.|.))
 
 tableToOpenXML :: PandocMonad m
                => WriterOptions
@@ -72,7 +71,7 @@
                -> WS m [Content]
 tableToOpenXML opts blocksToOpenXML gridTable = do
   setFirstPara
-  let (Grid.Table (ident,_,tableAttr) caption colspecs rowheads thead tbodies tfoot) =
+  let (Grid.Table (ident,_,tableAttr) caption colspecs _rowheads thead tbodies tfoot) =
         gridTable
   let (Caption _maybeShortCaption captionBlocks) = caption
   tablenum <- gets stNextTableNum
@@ -107,8 +106,7 @@
   -- 0×0100  Apply last column conditional formatting
   -- 0×0200  Do not apply row banding conditional formatting
   -- 0×0400  Do not apply column banding conditional formattin
-  let tblLookVal = (if hasHeader then (0x20 :: Int) else 0) .|.
-                   (if rowheads > 0 then (0x80 :: Int) else 0)
+  let tblLookVal = if hasHeader then (0x20 :: Int) else 0
   let (gridCols, tblWattr) = tableLayout (elems colspecs)
   listLevel <- asks envListLevel
   let tblStyle =  fromMaybe "Table" (lookup "custom-style" tableAttr)
@@ -124,7 +122,7 @@
             [ mknode "w:tblLayout" [("w:type", "fixed")] () | hasWidths ] ++
             [ mknode "w:tblLook" [("w:firstRow",if hasHeader then "1" else "0")
                                  ,("w:lastRow",if hasFooter then "1" else "0")
-                                 ,("w:firstColumn",if rowheads > 0 then "1" else "0")
+                                 ,("w:firstColumn","0")
                                  ,("w:lastColumn","0")
                                  ,("w:noHBand","0")
                                  ,("w:noVBand","0")
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs
--- a/src/Text/Pandoc/Writers/EPUB.hs
+++ b/src/Text/Pandoc/Writers/EPUB.hs
@@ -922,7 +922,7 @@
           subs <- catMaybes <$> mapM mkItem subsecs
           let secnum' = case secNumber secinfo of
                           Just num -> [Span ("", ["section-header-number"], [])
-                                       [Str num] , Space]
+                                       [Str num] , Str "\160"]
                           Nothing -> []
           let title' = secnum' <> secTitle secinfo
           -- can't have <a> elements inside generated links...
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
@@ -33,14 +33,13 @@
 import Data.Containers.ListUtils (nubOrd)
 import Data.Char (isDigit)
 import Data.List (intersperse, (\\))
-import Data.Maybe (catMaybes, fromMaybe, isJust, mapMaybe, isNothing,
-                   maybeToList)
+import Data.Maybe (catMaybes, fromMaybe, isJust, mapMaybe, isNothing)
 import Data.Monoid (Any (..))
 import Data.Text (Text)
 import qualified Data.Text as T
 import Network.URI (unEscapeString)
 import Text.DocTemplates (FromContext(lookupContext), Val(..), renderTemplate)
-import Text.Collate.Lang (renderLang, Lang(langLanguage))
+import Text.Collate.Lang (renderLang)
 import Text.Pandoc.Class.PandocMonad (PandocMonad, report, toLang)
 import Text.Pandoc.Definition
 import Text.Pandoc.Highlighting (formatLaTeXBlock, formatLaTeXInline, highlight,
@@ -275,11 +274,6 @@
                 nubOrd . catMaybes .
                 filter (/= babelLang)
                 $ map toBabel docLangs))
-        $ defField "selnolig-langs"
-             (literal . T.intercalate "," $
-               let langs = docLangs ++ maybeToList mblang
-               in (["english" | any ((== "en") . langLanguage) langs] ++
-                   ["german" | any ((== "de") . langLanguage) langs]))
         $ defField "latex-dir-rtl"
            ((render Nothing <$> getField "dir" context) ==
                Just ("rtl" :: Text)) context
diff --git a/src/Text/Pandoc/Writers/LaTeX/Table.hs b/src/Text/Pandoc/Writers/LaTeX/Table.hs
--- a/src/Text/Pandoc/Writers/LaTeX/Table.hs
+++ b/src/Text/Pandoc/Writers/LaTeX/Table.hs
@@ -366,11 +366,15 @@
                                <> braces (literal colDescr)
                                <> braces ("%\n" <> x)
                                   -- linebreak for readability
+  let hasColWidths = not (all (== ColWidthDefault) colWidths)
   let inMultiRow x = case rowspan of
                        (RowSpan 1) -> x
                        (RowSpan n) -> let nrows = literal (tshow n)
                                       in "\\multirow" <> braces nrows
-                                         <> braces "=" -- width of column
+                                         <> braces -- width of column
+                                             (if hasColWidths
+                                                 then "=" -- max width
+                                                 else "*") -- natural width
                                          <> braces x
   return . inMultiColumn . inMultiRow $ result
 
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
@@ -108,11 +108,11 @@
          '}' -> emits "\\}"
          '?' | ligatures ->  -- avoid ?` ligature
            case xs of
-             '`':_ -> emits "?{}"
+             '`':_ -> emits "?{\\kern0pt}" -- se #10610
              _     -> emitc x
          '!' | ligatures ->  -- avoid !` ligature
            case xs of
-             '`':_ -> emits "!{}"
+             '`':_ -> emits "!{\\kern0pt}"
              _     -> emitc x
          '`' | ctx == CodeString -> emitcseq "\\textasciigrave"
          '$' -> emits "\\$"
@@ -267,7 +267,7 @@
       return $ text "\\protect\\hypertarget" <> braces ref <> "{}"
      else do
       label <- labelFor ident
-      return $ text "\\phantomsection" <> label
+      return $ text "\\protect\\phantomsection" <> label
 
 labelFor :: PandocMonad m => Text -> LW m (Doc Text)
 labelFor ""    = return empty
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -782,7 +782,10 @@
   let start = case variant of
               Markua -> "* "
               Commonmark -> "- "
-              _ -> "- " <> T.replicate (writerTabStop opts - 2) " "
+              Markdown
+                | isEnabled Ext_four_space_rule opts
+                  -> "- " <> T.replicate (writerTabStop opts - 2) " "
+              _ -> "- "
   -- remove trailing blank line if item ends with a tight list
   let contents' = if itemEndsWithTightList bs
                      then chomp contents <> cr
diff --git a/src/Text/Pandoc/Writers/Markdown/Inline.hs b/src/Text/Pandoc/Writers/Markdown/Inline.hs
--- a/src/Text/Pandoc/Writers/Markdown/Inline.hs
+++ b/src/Text/Pandoc/Writers/Markdown/Inline.hs
@@ -365,6 +365,8 @@
                         tagWithAttrs "span" attrs <> contents <> literal "</span>"
                       | otherwise -> contents
 inlineToMarkdown _ (Emph []) = return empty
+inlineToMarkdown opts (Emph [Emph ils]) = -- #10642
+  inlineListToMarkdown opts ils
 inlineToMarkdown opts (Emph lst) = do
   variant <- asks envVariant
   contents <- inlineListToMarkdown opts lst
diff --git a/src/Text/Pandoc/Writers/Powerpoint/Output.hs b/src/Text/Pandoc/Writers/Powerpoint/Output.hs
--- a/src/Text/Pandoc/Writers/Powerpoint/Output.hs
+++ b/src/Text/Pandoc/Writers/Powerpoint/Output.hs
@@ -1752,7 +1752,9 @@
   , Just cSld <- findChild (elemName ns "p" "cSld") layout
   , Just spTree <- findChild (elemName ns "p" "spTree") cSld = do
       let combinedAuthorElems = intercalate [Break] authorsElems
-          subtitleAndAuthorElems = intercalate [Break, Break] [subtitleElems, combinedAuthorElems]
+          subtitleAndAuthorElems = intercalate [Break, Break] $
+                                    filter (not . null)
+                                     [subtitleElems, combinedAuthorElems]
       (titleId, titleElement) <- nonBodyTextToElement layout [PHType "ctrTitle"] titleElems
       (subtitleId, subtitleElement) <- nonBodyTextToElement layout [PHType "subTitle"] subtitleAndAuthorElems
       (dateId, dateElement) <- nonBodyTextToElement layout [PHType "dt"] dateElems
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
@@ -29,8 +29,7 @@
 import qualified Data.Text as T
 import Control.Monad.State ( StateT, evalStateT, gets, modify )
 import Text.Pandoc.Writers.Shared ( metaToContext, defField, resetField,
-                                    lookupMetaString,
-                                    isOrderedListMarker )
+                                    lookupMetaString )
 import Text.Pandoc.Shared (isTightList, orderedListMarkers, tshow)
 import Text.Pandoc.Writers.Math (convertMath)
 import qualified Text.TeXMath as TM
@@ -39,7 +38,7 @@
 import Text.Pandoc.Extensions (Extension(..))
 import Text.Collate.Lang (Lang(..), parseLang)
 import Text.Printf (printf)
-import Data.Char (isAlphaNum)
+import Data.Char (isAlphaNum, isDigit)
 import Data.Maybe (fromMaybe)
 
 -- | Convert Pandoc to Typst.
@@ -86,6 +85,7 @@
                         Right l ->
                           resetField "lang" (langLanguage l) .
                           maybe id (resetField "region") (langRegion l))
+              $ defField "csl" (lookupMetaString "citation-style" meta) -- #10661
               $ defField "smart" (isEnabled Ext_smart options)
               $ defField "toc-depth" (tshow $ writerTOCDepth options)
               $ defField "figure-caption-position"
@@ -147,8 +147,12 @@
 blockToTypst :: PandocMonad m => Block -> TW m (Doc Text)
 blockToTypst block =
   case block of
-    Plain inlines -> inlinesToTypst inlines
-    Para inlines -> ($$ blankline) <$> inlinesToTypst inlines
+    Plain inlines -> do
+      opts <- gets stOptions
+      inlinesToTypst (addLineStartEscapes opts inlines)
+    Para inlines -> do
+      opts <- gets stOptions
+      ($$ blankline) <$> inlinesToTypst (addLineStartEscapes opts inlines)
     Header level (ident,cls,_) inlines -> do
       contents <- inlinesToTypst inlines
       let lab = toLabel FreestandingLabel ident
@@ -474,16 +478,28 @@
     | otherwise = "image" <> parens (doubleQuoted src' <> dimAttrs)
 
 textstyle :: PandocMonad m => Doc Text -> [Inline] -> TW m (Doc Text)
-textstyle s inlines =
-  (<> endCode) . (s <>) . brackets . addEscape <$> inlinesToTypst inlines
+textstyle s inlines = do
+  opts <-  gets stOptions
+  (<> endCode) . (s <>) . brackets
+    <$> inlinesToTypst (addLineStartEscapes opts inlines)
+
+addLineStartEscapes :: WriterOptions -> [Inline] -> [Inline]
+addLineStartEscapes opts = go True
  where
-   addEscape =
-     case inlines of
-       (Str t : _)
-         | isOrderedListMarker t -> ("\\" <>)
-         | Just (c, _) <- T.uncons t
-         , needsEscapeAtLineStart c -> ("\\" <>)
-       _ -> id
+   go True (Str t : xs)
+        | isOrderedListMarker t = RawInline "typst" "\\" : Str t : go False xs
+        | Just (c, t') <- T.uncons t
+        , needsEscapeAtLineStart c
+        , T.null t' = RawInline "typst" "\\" : Str t : go False xs
+   go _ (SoftBreak : xs)
+        | writerWrapText opts == WrapPreserve = SoftBreak : go True xs
+   go _ (LineBreak : xs) = LineBreak : go True xs
+   go _ (x : xs) = x : go False xs
+   go _ [] = []
+
+isOrderedListMarker :: Text -> Bool
+isOrderedListMarker t = not (T.null ds) && rest == "."
+  where (ds, rest) = T.span isDigit t
 
 escapeTypst :: Bool -> EscapeContext -> Text -> Doc Text
 escapeTypst smart context t =
diff --git a/test/Tests/Readers/Markdown.hs b/test/Tests/Readers/Markdown.hs
--- a/test/Tests/Readers/Markdown.hs
+++ b/test/Tests/Readers/Markdown.hs
@@ -188,7 +188,6 @@
                 , ("after literal backticks", ["`x``- x`"            ], [code "x``- x"                                           ])
                 ]
               lis = ["`text","y","x`"]
-              lis' = ["text","y","x"]
               bldLsts w lsts txts
                 = let (res, res', f) =
                          foldr (\((_, _, lt), lc) (acc, tacc, t) ->
@@ -209,12 +208,6 @@
                T.intercalate "\n" (zipWith (\i (_, lt, _) -> lt <> i) lis lsts)
                =?> bldLsts plain lsts lis
              | lsts <- [ [i, j, k] | i <- lists, j <- lists, k <- lists]
-             ]
-          <> [ "lists with newlines and indent in backticks" =:
-               T.intercalate ("\n" <> T.replicate 4 " ") (zipWith (\i (_, lt, _) -> lt <> i) lis (l:ls))
-               =?> let (_, _, f) = l
-                   in f [plain $ code $ T.intercalate (T.replicate 5 " ") $ "text" : zipWith (\i (_, lt, _) -> lt <> i) (drop 1 lis') ls]
-             | (l:ls) <- [ [i, j, k] | i <- lists, j <- lists, k <- lists]
              ]
           <> [ "lists with blank lines and indent in backticks" =:
                T.intercalate ("\n\n" <> T.replicate 4 " ") (zipWith (\i (_, lt, _) -> lt <> i) lis (l:ls))
diff --git a/test/Tests/Writers/Markdown.hs b/test/Tests/Writers/Markdown.hs
--- a/test/Tests/Writers/Markdown.hs
+++ b/test/Tests/Writers/Markdown.hs
@@ -45,7 +45,7 @@
         , "list with tight sublist"
              =: bulletList [ plain "foo" <> bulletList [ plain "bar" ],
                              plain "baz" ]
-             =?> "-   foo\n    -   bar\n-   baz\n"
+             =?> "- foo\n  - bar\n- baz\n"
         ] ++ [noteTests] ++ [shortcutLinkRefsTests]
 
 {-
diff --git a/test/command/10185.md b/test/command/10185.md
--- a/test/command/10185.md
+++ b/test/command/10185.md
@@ -11,7 +11,7 @@
 
 \section{References}\label{references}
 
-\phantomsection\label{refs}
+\protect\phantomsection\label{refs}
 ```
 
 ```
@@ -35,7 +35,7 @@
 
 \section{References}\label{references}
 
-\phantomsection\label{refs}
+\protect\phantomsection\label{refs}
 \begin{CSLReferences}{1}{0}
 \bibitem[\citeproctext]{ref-foo}
 John Doe. n.d. \emph{The Title}.
diff --git a/test/command/10484.md b/test/command/10484.md
--- a/test/command/10484.md
+++ b/test/command/10484.md
@@ -13,10 +13,10 @@
 __ https://github.com/joe/project/issues/999
 
 ^D
--   One issue fixed: [issue
-    123](https://github.com/joe/project/issues/123).
--   One change merged: [Big
-    change](https://github.com/joe/project/pull/234).
--   Improved the [home page](https://example.com/homepage).
--   One more [small change](https://github.com/joe/project/issues/999).
+- One issue fixed: [issue
+  123](https://github.com/joe/project/issues/123).
+- One change merged: [Big
+  change](https://github.com/joe/project/pull/234).
+- Improved the [home page](https://example.com/homepage).
+- One more [small change](https://github.com/joe/project/issues/999).
 ```
diff --git a/test/command/10621.md b/test/command/10621.md
new file mode 100644
--- /dev/null
+++ b/test/command/10621.md
@@ -0,0 +1,7 @@
+```
+% pandoc -f markdown -t html
+[test](url
+"title")
+^D
+<p><a href="url" title="title">test</a></p>
+```
diff --git a/test/command/10650.md b/test/command/10650.md
new file mode 100644
--- /dev/null
+++ b/test/command/10650.md
@@ -0,0 +1,9 @@
+```
+% pandoc -t typst --wrap=preserve
+1\. I don't want this to be an enumerated list.
+2\. No, I don't: only a number before a paragraph.
+^D
+\1. I don't want this to be an enumerated list.
+\2. No, I don't: only a number before a paragraph.
+```
+
diff --git a/test/command/10659.md b/test/command/10659.md
new file mode 100644
--- /dev/null
+++ b/test/command/10659.md
@@ -0,0 +1,45 @@
+```
+% pandoc -f latex -t native
+\includegraphics[
+width=5cm,
+]{abc.jpg}
+^D
+[ Para
+    [ Image
+        ( "" , [] , [ ( "width" , "5cm" ) ] )
+        [ Str "image" ]
+        ( "abc.jpg" , "" )
+    ]
+]
+```
+
+```
+% pandoc -f latex -t native
+\includegraphics[%
+width=5cm,%
+]{abc.jpg}
+^D
+[ Para
+    [ Image
+        ( "" , [] , [ ( "width" , "5cm" ) ] )
+        [ Str "image" ]
+        ( "abc.jpg" , "" )
+    ]
+]
+```
+
+```
+% pandoc -f latex -t native
+\includegraphics[width=5cm]{%
+abc.jpg%
+}
+^D
+[ Para
+    [ Image
+        ( "" , [] , [ ( "width" , "5cm" ) ] )
+        [ Str "image" ]
+        ( "abc.jpg" , "" )
+    ]
+]
+```
+
diff --git a/test/command/10672.md b/test/command/10672.md
new file mode 100644
--- /dev/null
+++ b/test/command/10672.md
@@ -0,0 +1,26 @@
+```
+% pandoc
+| This | Is |
+|:-----|:---|
+| With \
+| Cells
+^D
+<table>
+<thead>
+<tr>
+<th style="text-align: left;">This</th>
+<th style="text-align: left;">Is</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align: left;">With \</td>
+<td style="text-align: left;"></td>
+</tr>
+<tr>
+<td style="text-align: left;">Cells</td>
+<td style="text-align: left;"></td>
+</tr>
+</tbody>
+</table>
+```
diff --git a/test/command/1710.md b/test/command/1710.md
--- a/test/command/1710.md
+++ b/test/command/1710.md
@@ -55,7 +55,7 @@
 </div>
 ^D
 \begin{frame}{Slide one}
-\phantomsection\label{slide-one}
+\protect\phantomsection\label{slide-one}
 \begin{columns}[T]
 \begin{column}{0.4\linewidth}
 \begin{itemize}
diff --git a/test/command/2874.md b/test/command/2874.md
--- a/test/command/2874.md
+++ b/test/command/2874.md
@@ -10,5 +10,5 @@
 % pandoc -f html -t latex
 <a name="foo"></a><br/>
 ^D
-\phantomsection\label{foo}{}\strut \\
+\protect\phantomsection\label{foo}{}\strut \\
 ```
diff --git a/test/command/3487.md b/test/command/3487.md
--- a/test/command/3487.md
+++ b/test/command/3487.md
@@ -7,5 +7,5 @@
 ^D
 Some text
 
--   element
+- element
 ```
diff --git a/test/command/3596.md b/test/command/3596.md
--- a/test/command/3596.md
+++ b/test/command/3596.md
@@ -6,9 +6,9 @@
 <li>baz</li>
 </ul>
 ^D
--   foo
--   bar
--   baz
+- foo
+- bar
+- baz
 ```
 
 ```
@@ -19,10 +19,10 @@
 <li>baz</li>
 </ul>
 ^D
--   foo
--   bar
-    -   subbar
--   baz
+- foo
+- bar
+  - subbar
+- baz
 ```
 
 
@@ -34,9 +34,9 @@
 <li>baz</li>
 </ul>
 ^D
--   foo
--   [bar]{#id}
--   baz
+- foo
+- [bar]{#id}
+- baz
 ```
 
 
@@ -48,12 +48,12 @@
 <li><p>baz</p></li>
 </ul>
 ^D
--   foo
+- foo
 
--   ::: {#id}
-    bar
-    :::
+- ::: {#id}
+  bar
+  :::
 
--   baz
+- baz
 
 ```
diff --git a/test/command/4016.md b/test/command/4016.md
--- a/test/command/4016.md
+++ b/test/command/4016.md
@@ -14,11 +14,11 @@
 </div>
 ^D
 \begin{frame}{Level 2 blocks}
-\phantomsection\label{level-2-blocks}
+\protect\phantomsection\label{level-2-blocks}
 \begin{columns}[T]
 \begin{column}{0.4\linewidth}
 \begin{block}{Block one}
-\phantomsection\label{block-one}
+\protect\phantomsection\label{block-one}
 \begin{itemize}
 \tightlist
 \item
@@ -29,7 +29,7 @@
 
 \begin{column}{0.6\linewidth}
 \begin{block}{Block two}
-\phantomsection\label{block-two}
+\protect\phantomsection\label{block-two}
 \begin{itemize}
 \tightlist
 \item
diff --git a/test/command/4690.md b/test/command/4690.md
--- a/test/command/4690.md
+++ b/test/command/4690.md
@@ -12,7 +12,7 @@
 ::::
 ^D
 \begin{frame}{title}
-\phantomsection\label{title}
+\protect\phantomsection\label{title}
 \begin{columns}[T]
 \begin{column}{0.08\linewidth}
 content
diff --git a/test/command/5407.md b/test/command/5407.md
--- a/test/command/5407.md
+++ b/test/command/5407.md
@@ -6,9 +6,9 @@
 hi there!‘
 hi there!
 ^D
-hi there?{}``
-hi there!{}``
-hi there?{}`
-hi there!{}`
+hi there?{\kern0pt}``
+hi there!{\kern0pt}``
+hi there?{\kern0pt}`
+hi there!{\kern0pt}`
 hi there!
 ```
diff --git a/test/command/5705.md b/test/command/5705.md
--- a/test/command/5705.md
+++ b/test/command/5705.md
@@ -6,6 +6,6 @@
    [[Plain [Str "Blah"]]]]]]
 ^D
 VIII. Blah
-      -   Blah
+      - Blah
 ```
 
diff --git a/test/command/5857.md b/test/command/5857.md
--- a/test/command/5857.md
+++ b/test/command/5857.md
@@ -5,7 +5,7 @@
  ,[]
  ,[Plain [Str "b"]]]]
 ^D
--   a
--   
--   b
+- a
+- 
+- b
 ```
diff --git a/test/command/5967.md b/test/command/5967.md
--- a/test/command/5967.md
+++ b/test/command/5967.md
@@ -4,8 +4,8 @@
 ## Two
 #### Four
 ^D
--   One
-    -   Two
+- One
+  - Two
 
 One
 
diff --git a/test/command/6030.md b/test/command/6030.md
--- a/test/command/6030.md
+++ b/test/command/6030.md
@@ -83,11 +83,11 @@
 \end{frame}
 
 \begin{frame}{Three}
-\phantomsection\label{three}
+\protect\phantomsection\label{three}
 Three
 
 \begin{block}{Four}
-\phantomsection\label{four}
+\protect\phantomsection\label{four}
 Four
 \end{block}
 \end{frame}
diff --git a/test/command/6107.md b/test/command/6107.md
--- a/test/command/6107.md
+++ b/test/command/6107.md
@@ -16,11 +16,11 @@
 \section{A circus!}\label{a-circus}
 
 \begin{frame}{Another silly title}
-\phantomsection\label{another-silly-title}
+\protect\phantomsection\label{another-silly-title}
 Not much to do about nothing.
 \end{frame}
 
 \begin{frame}[standout]{Epilogue}
-\phantomsection\label{epilogue}
+\protect\phantomsection\label{epilogue}
 \end{frame}
 ```
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
-\phantomsection\label{test2}\hyperref[test1]{link to text test1}
+\protect\phantomsection\label{test2}\hyperref[test1]{link to text test1}
 ```
diff --git a/test/command/6858.md b/test/command/6858.md
--- a/test/command/6858.md
+++ b/test/command/6858.md
@@ -46,7 +46,7 @@
 
 there
 ^D
--   hi
+- hi
 
--   there
+- there
 ```
diff --git a/test/command/7172.md b/test/command/7172.md
new file mode 100644
--- /dev/null
+++ b/test/command/7172.md
@@ -0,0 +1,17 @@
+```
+% pandoc -t markdown
+- one
+  - two
+^D
+- one
+  - two
+```
+
+```
+% pandoc -t markdown+four_space_rule
+- one
+  - two
+^D
+-   one
+    -   two
+```
diff --git a/test/command/7278.md b/test/command/7278.md
--- a/test/command/7278.md
+++ b/test/command/7278.md
@@ -17,21 +17,21 @@
 text in block
 ^D
 \begin{frame}{Slide}
-\phantomsection\label{slide}
+\protect\phantomsection\label{slide}
 Some blocks:
 
 \begin{exampleblock}{example block title}
-\phantomsection\label{example-block-title}
+\protect\phantomsection\label{example-block-title}
 text in block
 \end{exampleblock}
 
 \begin{alertblock}{alert block title}
-\phantomsection\label{alert-block-title}
+\protect\phantomsection\label{alert-block-title}
 text in block
 \end{alertblock}
 
 \begin{block}{block title}
-\phantomsection\label{block-title}
+\protect\phantomsection\label{block-title}
 text in block
 \end{block}
 \end{frame}
diff --git a/test/command/7329.md b/test/command/7329.md
--- a/test/command/7329.md
+++ b/test/command/7329.md
@@ -27,7 +27,12 @@
 % pandoc -f markdown -t org -C --bibliography command/biblio.bib
 - [@item1]
 ^D
-- [cite:@item1]
+- (Doe 2005)
+
+<<refs>>
+
+<<ref-item1>>
+Doe, John. 2005. /First Book/. Cambridge: Cambridge University Press.
 ```
 
 
@@ -55,13 +60,13 @@
 - [cite:@item1; @item2]
 - [cite:see @item1; @item2]
 ^D
--   @item1
--   @item1 [p. 12]
--   @item1 [p.12; see also @item2]
--   [@item1]
--   [-@item1]
--   [see @item1 p. 12]
--   [see @item1 p. 12 and *passim*]
--   [@item1; @item2]
--   [see @item1; @item2]
+- @item1
+- @item1 [p. 12]
+- @item1 [p.12; see also @item2]
+- [@item1]
+- [-@item1]
+- [see @item1 p. 12]
+- [see @item1 p. 12 and *passim*]
+- [@item1; @item2]
+- [see @item1; @item2]
 ```
diff --git a/test/command/7778.md b/test/command/7778.md
new file mode 100644
--- /dev/null
+++ b/test/command/7778.md
@@ -0,0 +1,59 @@
+Here the thing to remember is that block level structure indications
+take precedence over inline level structure indications:
+
+```
+% pandoc
+Term
+: Def
+<!--
+: comment def
+-->
+^D
+<dl>
+<dt>Term</dt>
+<dd>
+Def &lt;!–
+</dd>
+<dd>
+comment def –&gt;
+</dd>
+</dl>
+```
+
+```
+% pandoc
+Term
+: Def
+test <!--
+: comment def
+and -->
+^D
+<dl>
+<dt>Term</dt>
+<dd>
+Def test &lt;!–
+</dd>
+<dd>
+comment def and –&gt;
+</dd>
+</dl>
+```
+
+```
+% pandoc
+Term
+: Def
+`code
+: comment def
+more code`
+^D
+<dl>
+<dt>Term</dt>
+<dd>
+Def `code
+</dd>
+<dd>
+comment def more code`
+</dd>
+</dl>
+```
diff --git a/test/command/7857.md b/test/command/7857.md
--- a/test/command/7857.md
+++ b/test/command/7857.md
@@ -15,7 +15,7 @@
 \note{my note}
 
 \begin{frame}{slide}
-\phantomsection\label{slide}
+\protect\phantomsection\label{slide}
 ok
 \end{frame}
 ```
diff --git a/test/command/8131.md b/test/command/8131.md
--- a/test/command/8131.md
+++ b/test/command/8131.md
@@ -19,7 +19,7 @@
 
 Content
 ^D
--   [Head](#head)
+- [Head](#head)
 
 # Head
 
diff --git a/test/command/8150.md b/test/command/8150.md
--- a/test/command/8150.md
+++ b/test/command/8150.md
@@ -11,11 +11,11 @@
   <li>L4</li>
 </ul>
 ^D
--   L1
--   L2
-    -   L3.1
-    -   L3.2
--   L4
+- L1
+- L2
+  - L3.1
+  - L3.2
+- L4
 ```
 
 Nested ordered lists
@@ -48,8 +48,8 @@
 	</ol>
 </ul>
 ^D
--   L1
--   L2
-    1.  L3.1
-    2.  L3.2
+- L1
+- L2
+  1.  L3.1
+  2.  L3.2
 ```
diff --git a/test/command/8402.md b/test/command/8402.md
--- a/test/command/8402.md
+++ b/test/command/8402.md
@@ -19,14 +19,14 @@
 ## inner 3
 text
 ^D
--   [Summary](#summary){#toc-summary}
-    -   [Overview and
-        Explanation](#overview-and-explanation){#toc-overview-and-explanation}
--   [Details](#details){#toc-details}
-    -   [inner 1](#inner-1){#toc-inner-1}
-    -   [inner 2](#inner-2){#toc-inner-2}
-        -   [inner inner 1](#inner-inner-1){#toc-inner-inner-1}
-    -   [inner 3](#inner-3){#toc-inner-3}
+- [Summary](#summary){#toc-summary}
+  - [Overview and
+    Explanation](#overview-and-explanation){#toc-overview-and-explanation}
+- [Details](#details){#toc-details}
+  - [inner 1](#inner-1){#toc-inner-1}
+  - [inner 2](#inner-2){#toc-inner-2}
+    - [inner inner 1](#inner-inner-1){#toc-inner-inner-1}
+  - [inner 3](#inner-3){#toc-inner-3}
 
 ::: {#6u8qXoeFGdqt .cell .markdown}
 # Summary
diff --git a/test/command/9358.docx b/test/command/9358.docx
Binary files a/test/command/9358.docx and b/test/command/9358.docx differ
diff --git a/test/command/9472.md b/test/command/9472.md
--- a/test/command/9472.md
+++ b/test/command/9472.md
@@ -49,15 +49,12 @@
   \KOMAoptions{parskip=half}}
 \makeatother
 \ifLuaTeX
-\usepackage[bidi=basic]{babel}
+\usepackage[bidi=basic,shorthands=off,]{babel}
 \else
-\usepackage[bidi=default]{babel}
+\usepackage[bidi=default,shorthands=off,]{babel}
 \fi
-% get rid of language-specific shorthands (see #6817):
-\let\LanguageShortHands\languageshorthands
-\def\languageshorthands#1{}
 \ifLuaTeX
-  \usepackage[german]{selnolig} % disable illegal ligatures
+  \usepackage{selnolig} % disable illegal ligatures
 \fi
 \setlength{\emergencystretch}{3em} % prevent overfull lines
 \providecommand{\tightlist}{%
diff --git a/test/command/9495.md b/test/command/9495.md
deleted file mode 100644
--- a/test/command/9495.md
+++ /dev/null
@@ -1,98 +0,0 @@
-```
-% pandoc -f native -t docx -o - | pandoc -f docx -t native
-[ Table
-    ( "" , [] , [] )
-    (Caption Nothing [])
-    [ ( AlignDefault , ColWidth 0.5 )
-    , ( AlignDefault , ColWidth 0.5 )
-    ]
-    (TableHead
-       ( "" , [] , [] )
-       [ Row
-           ( "" , [] , [] )
-           [ Cell
-               ( "" , [] , [] )
-               AlignDefault
-               (RowSpan 1)
-               (ColSpan 1)
-               [ Plain [ Str "1" ] ]
-           , Cell
-               ( "" , [] , [] )
-               AlignDefault
-               (RowSpan 1)
-               (ColSpan 1)
-               [ Plain [ Str "2" ] ]
-           ]
-       ])
-    [ TableBody
-        ( "" , [] , [] )
-        (RowHeadColumns 1)
-        []
-        [ Row
-            ( "" , [] , [] )
-            [ Cell
-                ( "" , [] , [] )
-                AlignDefault
-                (RowSpan 1)
-                (ColSpan 1)
-                [ Plain [ Str "3" ] ]
-            , Cell
-                ( "" , [] , [] )
-                AlignDefault
-                (RowSpan 1)
-                (ColSpan 1)
-                [ Plain [ Str "4" ] ]
-            ]
-        ]
-    ]
-    (TableFoot ( "" , [] , [] ) [])
-]
-^D
-[ Table
-    ( "" , [] , [] )
-    (Caption Nothing [])
-    [ ( AlignDefault , ColWidth 0.5 )
-    , ( AlignDefault , ColWidth 0.5 )
-    ]
-    (TableHead
-       ( "" , [] , [] )
-       [ Row
-           ( "" , [] , [] )
-           [ Cell
-               ( "" , [] , [] )
-               AlignDefault
-               (RowSpan 1)
-               (ColSpan 1)
-               [ Plain [ Str "1" ] ]
-           , Cell
-               ( "" , [] , [] )
-               AlignDefault
-               (RowSpan 1)
-               (ColSpan 1)
-               [ Plain [ Str "2" ] ]
-           ]
-       ])
-    [ TableBody
-        ( "" , [] , [] )
-        (RowHeadColumns 1)
-        []
-        [ Row
-            ( "" , [] , [] )
-            [ Cell
-                ( "" , [] , [] )
-                AlignDefault
-                (RowSpan 1)
-                (ColSpan 1)
-                [ Plain [ Str "3" ] ]
-            , Cell
-                ( "" , [] , [] )
-                AlignDefault
-                (RowSpan 1)
-                (ColSpan 1)
-                [ Plain [ Str "4" ] ]
-            ]
-        ]
-    ]
-    (TableFoot ( "" , [] , [] ) [])
-]
-```
diff --git a/test/command/9603.docx b/test/command/9603.docx
Binary files a/test/command/9603.docx and b/test/command/9603.docx differ
diff --git a/test/command/9865.md b/test/command/9865.md
new file mode 100644
--- /dev/null
+++ b/test/command/9865.md
@@ -0,0 +1,53 @@
+````
+% pandoc
+- example 1
+- ```
+  one
+  two
+  ```
+- list item three
+^D
+<ul>
+<li>example 1</li>
+<li><pre><code>one
+two</code></pre></li>
+<li>list item three</li>
+</ul>
+````
+
+````
+% pandoc
+- example 3
+- ```
+one
+two
+```
+- list item three
+^D
+<ul>
+<li>example 3</li>
+<li><pre><code>one
+two</code></pre></li>
+<li>list item three</li>
+</ul>
+````
+
+Here is a case that we used to handle differently, but
+#9865 aligns pandoc's markdown parser with commonmark in letting
+block level structure take precedence over inline level structure.
+
+````
+% pandoc
+- a <!--
+
+- b
+
+-->
+- c
+^D
+<ul>
+<li><p>a &lt;!–</p></li>
+<li><p>b</p></li>
+</ul>
+<p>–&gt; - c</p>
+````
diff --git a/test/command/9908.md b/test/command/9908.md
--- a/test/command/9908.md
+++ b/test/command/9908.md
@@ -4,7 +4,7 @@
     [ [ BlockQuote [ Para [ Str "a" ] , Para [ Str "b" ] ] ] ]
 ]
 ^D
--   > a
-    >
-    > b
+- > a
+  >
+  > b
 ```
diff --git a/test/command/pandoc-citeproc-320a.md b/test/command/pandoc-citeproc-320a.md
--- a/test/command/pandoc-citeproc-320a.md
+++ b/test/command/pandoc-citeproc-320a.md
@@ -1,87 +1,80 @@
 ```
-% pandoc --citeproc -t markdown-citations
+% pandoc --citeproc -t plain
 ---
 references:
 - author:
   - family: ʾUdhrī
     given: Jamīl
     non-dropping-particle: 'al-'
-    note: ayn
+  issued: 2000
+  title: hamza
   id: item1
 - author:
   - family: ʿUdhrī
     given: Jamīl
     non-dropping-particle: 'al-'
-    note: hamza
+  issued: 2000
+  title: ayn
   id: item2
 - author:
-  - family: '\''Udhrī'
+  - family: "'Udhrī"
     given: Jamīl
     non-dropping-particle: 'al-'
-    note: straight apostrophe
+  issued: 2000
+  title: straight apostrophe
   id: item3
 - author:
   - family: '‘Udhrī'
     given: Jamīl
     non-dropping-particle: 'al-'
-    note: inverted apostrophe = opening single curly quote (for ayn)
+  issued: 2000
+  title: inverted curly apostrophe = opening single curly quote (for ayn)
   id: item4
 - author:
   - family: '’Udhrī'
     given: Jamīl
     non-dropping-particle: 'al-'
-    note: apostrophe = closing single curly quote (for hamza)
+  issued: 2000
+  title: curly apostrophe = closing single curly quote (for hamza)
   id: item5
 - author:
   - family: Uch
     given: Ann
   id: item6
+  issued: 2000
 - author:
   - family: Uebel
     given: Joe
   id: item7
+  issued: 2000
 - author:
   - family: Zzz
     given: Zoe
   id: item8
+  issued: 2000
 ---
 
 Foo [@item1; @item2; @item3; @item4; @item5; @item6; @item7; @item8].
 ^D
-Foo (al-ʾUdhrī, n.d.; al-ʿUdhrī, n.d.; al-\'Udhrī, n.d.; al-'Udhrī,
-n.d.a, n.d.b; Uch, n.d.; Uebel, n.d.; Zzz, n.d.).
+Foo (al-ʾUdhrī 2000; al-ʿUdhrī 2000; al-’Udhrī 2000b, 2000a; al-‘Udhrī
+2000; Uch 2000; Uebel 2000; Zzz 2000).
 
-::::::::::: {#refs .references .csl-bib-body .hanging-indent entry-spacing="0"}
-::: {#ref-item6 .csl-entry}
-Uch, Ann. n.d.
-:::
+Uch, Ann. 2000.
 
-::: {#ref-item1 .csl-entry}
-ʾUdhrī, Jamīl al-. n.d.
-:::
+‘Udhrī, Jamīl al-. 2000. “Inverted Curly Apostrophe = Opening Single
+Curly Quote (for Ayn).”
 
-::: {#ref-item2 .csl-entry}
-ʿUdhrī, Jamīl al-. n.d.
-:::
+ʿUdhrī, Jamīl al-. 2000. “Ayn.”
 
-::: {#ref-item3 .csl-entry}
-\'Udhrī, Jamīl al-. n.d.
-:::
+’Udhrī, Jamīl al-. 2000a. “Curly Apostrophe = Closing Single Curly Quote
+(for Hamza).”
 
-::: {#ref-item4 .csl-entry}
-'Udhrī, Jamīl al-. n.d.a.
-:::
+ʾUdhrī, Jamīl al-. 2000. “Hamza.”
 
-::: {#ref-item5 .csl-entry}
----------. n.d.b.
-:::
+’Udhrī, Jamīl al-. 2000b. “Straight Apostrophe.”
 
-::: {#ref-item7 .csl-entry}
-Uebel, Joe. n.d.
-:::
+Uebel, Joe. 2000.
 
-::: {#ref-item8 .csl-entry}
-Zzz, Zoe. n.d.
-:::
-:::::::::::
+Zzz, Zoe. 2000.
+
 ```
diff --git a/test/command/tasklist.md b/test/command/tasklist.md
--- a/test/command/tasklist.md
+++ b/test/command/tasklist.md
@@ -100,6 +100,6 @@
 - [ ] foo
 - [x] bar
 ^D
--   [ ] foo
--   [x] bar
+- [ ] foo
+- [x] bar
 ```
diff --git a/test/command/toc.md b/test/command/toc.md
--- a/test/command/toc.md
+++ b/test/command/toc.md
@@ -16,12 +16,12 @@
 ## e
 :::
 ^D
--   [A](#a){#toc-a}
-    -   [b](#b){#toc-b}
--   [B](#b-1){#toc-b-1}
-    -   [b](#b-2){#toc-b-2}
--   [E](#e){#toc-e}
-    -   [e](#e-1){#toc-e-1}
+- [A](#a){#toc-a}
+  - [b](#b){#toc-b}
+- [B](#b-1){#toc-b-1}
+  - [b](#b-2){#toc-b-2}
+- [E](#e){#toc-e}
+  - [e](#e-1){#toc-e-1}
 
 # A
 
diff --git a/test/docx/definition_list.docx b/test/docx/definition_list.docx
Binary files a/test/docx/definition_list.docx and b/test/docx/definition_list.docx differ
diff --git a/test/docx/definition_list.native b/test/docx/definition_list.native
--- a/test/docx/definition_list.native
+++ b/test/docx/definition_list.native
@@ -1,7 +1,33 @@
-[DefinitionList
- [([Str "Term",Space,Str "1"],
-   [[Para [Str "Definition",Space,Str "1"]]])
- ,([Str "Term",Space,Str "2",Space,Str "with",Space,Emph [Str "inline",Space,Str "markup"]],
-   [[Para [Str "Definition",Space,Str "2"]
-    ,CodeBlock ("",[],[]) "{ some code, part of Definition 2 }"
-    ,Para [Str "Third",Space,Str "paragraph",Space,Str "of",Space,Str "definition",Space,Str "2."]]])]]
+[ DefinitionList
+    [ ( [ Str "Term" , Space , Str "1" ]
+      , [ [ Para [ Str "Definition" , Space , Str "1" ] ] ]
+      )
+    , ( [ Str "Term"
+        , Space
+        , Str "2"
+        , Space
+        , Str "with"
+        , Space
+        , Emph [ Str "inline" , Space , Str "markup" ]
+        ]
+      , [ [ Para [ Str "Definition" , Space , Str "2" ]
+          , Para
+              [ Code
+                  ( "" , [] , [] ) "{ some code, part of Definition 2 }"
+              ]
+          , Para
+              [ Str "Third"
+              , Space
+              , Str "paragraph"
+              , Space
+              , Str "of"
+              , Space
+              , Str "definition"
+              , Space
+              , Str "2."
+              ]
+          ]
+        ]
+      )
+    ]
+]
diff --git a/test/docx/golden/definition_list.docx b/test/docx/golden/definition_list.docx
Binary files a/test/docx/golden/definition_list.docx and b/test/docx/golden/definition_list.docx differ
diff --git a/test/docx/table_captions_no_field.docx b/test/docx/table_captions_no_field.docx
Binary files a/test/docx/table_captions_no_field.docx and b/test/docx/table_captions_no_field.docx differ
diff --git a/test/docx/table_captions_with_field.docx b/test/docx/table_captions_with_field.docx
Binary files a/test/docx/table_captions_with_field.docx and b/test/docx/table_captions_with_field.docx differ
diff --git a/test/docx/table_header_rowspan.docx b/test/docx/table_header_rowspan.docx
Binary files a/test/docx/table_header_rowspan.docx and b/test/docx/table_header_rowspan.docx differ
diff --git a/test/docx/table_one_header_row.docx b/test/docx/table_one_header_row.docx
Binary files a/test/docx/table_one_header_row.docx and b/test/docx/table_one_header_row.docx differ
diff --git a/test/docx/table_one_row.docx b/test/docx/table_one_row.docx
Binary files a/test/docx/table_one_row.docx and b/test/docx/table_one_row.docx differ
diff --git a/test/docx/table_variable_width.docx b/test/docx/table_variable_width.docx
Binary files a/test/docx/table_variable_width.docx and b/test/docx/table_variable_width.docx differ
diff --git a/test/docx/table_with_list_cell.docx b/test/docx/table_with_list_cell.docx
Binary files a/test/docx/table_with_list_cell.docx and b/test/docx/table_with_list_cell.docx differ
diff --git a/test/markdown-reader-more.native b/test/markdown-reader-more.native
--- a/test/markdown-reader-more.native
+++ b/test/markdown-reader-more.native
@@ -200,12 +200,8 @@
       , Str "item"
       ]
   , BulletList
-      [ [ Plain
-            [ Str "one"
-            , SoftBreak
-            , RawInline (Format "html") "<!--\n- two\n-->"
-            ]
-        ]
+      [ [ Plain [ Str "one" , SoftBreak , Str "<!\8211" ] ]
+      , [ Plain [ Str "two" , SoftBreak , Str "\8211>" ] ]
       , [ Plain [ Str "three" ] ]
       ]
   , Header
@@ -316,8 +312,8 @@
       2
       ( "curly-smart-quotes" , [] , [] )
       [ Str "Curly" , Space , Str "smart" , Space , Str "quotes" ]
-  , Para [ Quoted DoubleQuote [ Str "Hi" ] ]
-  , Para [ Quoted SingleQuote [ Str "Hi" ] ]
+  , Para [ Str "\8220Hi\8221" ]
+  , Para [ Str "\8216Hi\8217" ]
   , Header
       2
       ( "consecutive-lists" , [] , [] )
diff --git a/test/pptx/document-properties-short-desc/output.pptx b/test/pptx/document-properties-short-desc/output.pptx
Binary files a/test/pptx/document-properties-short-desc/output.pptx and b/test/pptx/document-properties-short-desc/output.pptx differ
diff --git a/test/pptx/document-properties-short-desc/templated.pptx b/test/pptx/document-properties-short-desc/templated.pptx
Binary files a/test/pptx/document-properties-short-desc/templated.pptx and b/test/pptx/document-properties-short-desc/templated.pptx differ
diff --git a/test/pptx/footer/basic/output.pptx b/test/pptx/footer/basic/output.pptx
Binary files a/test/pptx/footer/basic/output.pptx and b/test/pptx/footer/basic/output.pptx differ
diff --git a/test/pptx/footer/fixed-date/output.pptx b/test/pptx/footer/fixed-date/output.pptx
Binary files a/test/pptx/footer/fixed-date/output.pptx and b/test/pptx/footer/fixed-date/output.pptx differ
diff --git a/test/pptx/footer/higher-slide-number/output.pptx b/test/pptx/footer/higher-slide-number/output.pptx
Binary files a/test/pptx/footer/higher-slide-number/output.pptx and b/test/pptx/footer/higher-slide-number/output.pptx differ
diff --git a/test/pptx/footer/no-title-slide/output.pptx b/test/pptx/footer/no-title-slide/output.pptx
Binary files a/test/pptx/footer/no-title-slide/output.pptx and b/test/pptx/footer/no-title-slide/output.pptx differ
diff --git a/test/pptx/layouts/deleted.pptx b/test/pptx/layouts/deleted.pptx
Binary files a/test/pptx/layouts/deleted.pptx and b/test/pptx/layouts/deleted.pptx differ
diff --git a/test/pptx/layouts/moved.pptx b/test/pptx/layouts/moved.pptx
Binary files a/test/pptx/layouts/moved.pptx and b/test/pptx/layouts/moved.pptx differ
diff --git a/test/pptx/speaker-notes-after-metadata/output.pptx b/test/pptx/speaker-notes-after-metadata/output.pptx
Binary files a/test/pptx/speaker-notes-after-metadata/output.pptx and b/test/pptx/speaker-notes-after-metadata/output.pptx differ
diff --git a/test/pptx/speaker-notes-after-metadata/templated.pptx b/test/pptx/speaker-notes-after-metadata/templated.pptx
Binary files a/test/pptx/speaker-notes-after-metadata/templated.pptx and b/test/pptx/speaker-notes-after-metadata/templated.pptx differ
diff --git a/test/tables/planets.latex b/test/tables/planets.latex
--- a/test/tables/planets.latex
+++ b/test/tables/planets.latex
@@ -17,16 +17,16 @@
 \bottomrule\noalign{}
 \endlastfoot
 \multicolumn{2}{@{}c}{%
-\multirow{4}{=}{Terrestrial planets}} & Mercury & 0.330 & 4,879 & 5427 & 3.7 &
+\multirow{4}{*}{Terrestrial planets}} & Mercury & 0.330 & 4,879 & 5427 & 3.7 &
 4222.6 & 57.9 & 167 & 0 & Closest to the Sun \\
 & & Venus & 4.87 & 12,104 & 5243 & 8.9 & 2802.0 & 108.2 & 464 & 0 & \\
 & & Earth & 5.97 & 12,756 & 5514 & 9.8 & 24.0 & 149.6 & 15 & 1 & Our world \\
 & & Mars & 0.642 & 6,792 & 3933 & 3.7 & 24.7 & 227.9 & -65 & 2 & The red
 planet \\
-\multirow{4}{=}{Jovian planets} & \multirow{2}{=}{Gas giants} & Jupiter & 1898 &
+\multirow{4}{*}{Jovian planets} & \multirow{2}{*}{Gas giants} & Jupiter & 1898 &
 142,984 & 1326 & 23.1 & 9.9 & 778.6 & -110 & 67 & The largest planet \\
 & & Saturn & 568 & 120,536 & 687 & 9.0 & 10.7 & 1433.5 & -140 & 62 & \\
-& \multirow{2}{=}{Ice giants} & Uranus & 86.8 & 51,118 & 1271 & 8.7 & 17.2 &
+& \multirow{2}{*}{Ice giants} & Uranus & 86.8 & 51,118 & 1271 & 8.7 & 17.2 &
 2872.5 & -195 & 27 & \\
 & & Neptune & 102 & 49,528 & 1638 & 11.0 & 16.1 & 4495.1 & -200 & 14 & \\
 \multicolumn{2}{@{}c}{%
diff --git a/test/typst-reader.native b/test/typst-reader.native
--- a/test/typst-reader.native
+++ b/test/typst-reader.native
@@ -192,25 +192,23 @@
       [ Para
           [ Span
               ( "" , [] , [ ( "align" , "center" ) ] )
-              [ Underline
-                  [ Link
-                      ( "" , [] , [] )
-                      [ SoftBreak
-                      , Strong
-                          [ Str "Typst"
-                          , Space
-                          , Str "Math"
-                          , Space
-                          , Str "for"
-                          , Space
-                          , Str "Undergrads"
-                          ]
-                      , SoftBreak
+              [ Link
+                  ( "" , [] , [] )
+                  [ SoftBreak
+                  , Strong
+                      [ Str "Typst"
+                      , Space
+                      , Str "Math"
+                      , Space
+                      , Str "for"
+                      , Space
+                      , Str "Undergrads"
                       ]
-                      ( "https://github.com/johanvx/typst-undergradmath"
-                      , ""
-                      )
+                  , SoftBreak
                   ]
+                  ( "https://github.com/johanvx/typst-undergradmath"
+                  , ""
+                  )
               ]
           ]
       , Para
@@ -259,16 +257,13 @@
           , Str "at"
           , Space
           , Underline
-              [ Underline
-                  [ Link
-                      ( "" , [] , [] )
-                      [ Str
-                          "https://gitlab.com/jim.hefferon/undergradmath"
-                      ]
-                      ( "https://gitlab.com/jim.hefferon/undergradmath"
-                      , ""
-                      )
+              [ Link
+                  ( "" , [] , [] )
+                  [ Str "https://gitlab.com/jim.hefferon/undergradmath"
                   ]
+                  ( "https://gitlab.com/jim.hefferon/undergradmath"
+                  , ""
+                  )
               ]
           , Str "."
           ]
@@ -4447,14 +4442,12 @@
           , Str "Typst,"
           , Space
           , Underline
-              [ Underline
-                  [ Link
-                      ( "" , [] , [] )
-                      [ Str "array" ]
-                      ( "https://typst.app/docs/reference/typst/array"
-                      , ""
-                      )
-                  ]
+              [ Link
+                  ( "" , [] , [] )
+                  [ Str "array" ]
+                  ( "https://typst.app/docs/reference/typst/array"
+                  , ""
+                  )
               ]
           , Space
           , Str "is"
@@ -5329,12 +5322,10 @@
           , Str "at"
           , Space
           , Underline
-              [ Underline
-                  [ Link
-                      ( "" , [] , [] )
-                      [ Str "https://typst.app/docs" ]
-                      ( "https://typst.app/docs" , "" )
-                  ]
+              [ Link
+                  ( "" , [] , [] )
+                  [ Str "https://typst.app/docs" ]
+                  ( "https://typst.app/docs" , "" )
               ]
           , Str "."
           ]
@@ -5344,14 +5335,10 @@
           , Space
           , Str "("
           , Underline
-              [ Underline
-                  [ Underline
-                      [ Link
-                          ( "" , [] , [] )
-                          [ Str "https://github.com/johanvx" ]
-                          ( "https://github.com/johanvx" , "" )
-                      ]
-                  ]
+              [ Link
+                  ( "" , [] , [] )
+                  [ Str "https://github.com/johanvx" ]
+                  ( "https://github.com/johanvx" , "" )
               ]
           , Str ")"
           , Space
diff --git a/test/writer.jats_archiving b/test/writer.jats_archiving
--- a/test/writer.jats_archiving
+++ b/test/writer.jats_archiving
@@ -687,7 +687,7 @@
     <list-item>
       <p>Here’s some display math: <disp-formula><alternatives>
       <tex-math><![CDATA[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}]]></tex-math>
-      <mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mfrac><mml:mi>d</mml:mi><mml:mrow><mml:mi>d</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:mfrac><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:munder><mml:mo>lim</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>→</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:munder><mml:mfrac><mml:mrow><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow><mml:mo>−</mml:mo><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mrow></mml:math></alternatives></disp-formula></p>
+      <mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mfrac><mml:mi>d</mml:mi><mml:mrow><mml:mi>d</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:mfrac><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo><mml:mo>=</mml:mo><mml:munder><mml:mi>lim</mml:mi><mml:mo>&#8289;</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>→</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:munder><mml:mfrac><mml:mrow><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo><mml:mo>−</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mrow></mml:math></alternatives></disp-formula></p>
     </list-item>
     <list-item>
       <p>Here’s one that has a line break in it: <inline-formula><alternatives>
diff --git a/test/writer.jats_articleauthoring b/test/writer.jats_articleauthoring
--- a/test/writer.jats_articleauthoring
+++ b/test/writer.jats_articleauthoring
@@ -673,7 +673,7 @@
     </list-item>
     <list-item>
       <p>Here’s some display math:
-      <disp-formula><mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mfrac><mml:mi>d</mml:mi><mml:mrow><mml:mi>d</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:mfrac><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:munder><mml:mo>lim</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>→</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:munder><mml:mfrac><mml:mrow><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow><mml:mo>−</mml:mo><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mrow></mml:math></disp-formula></p>
+      <disp-formula><mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mfrac><mml:mi>d</mml:mi><mml:mrow><mml:mi>d</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:mfrac><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo><mml:mo>=</mml:mo><mml:munder><mml:mi>lim</mml:mi><mml:mo>&#8289;</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>→</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:munder><mml:mfrac><mml:mrow><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo><mml:mo>−</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mrow></mml:math></disp-formula></p>
     </list-item>
     <list-item>
       <p>Here’s one that has a line break in it:
diff --git a/test/writer.jats_publishing b/test/writer.jats_publishing
--- a/test/writer.jats_publishing
+++ b/test/writer.jats_publishing
@@ -687,7 +687,7 @@
     <list-item>
       <p>Here’s some display math: <disp-formula><alternatives>
       <tex-math><![CDATA[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}]]></tex-math>
-      <mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mfrac><mml:mi>d</mml:mi><mml:mrow><mml:mi>d</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:mfrac><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:munder><mml:mo>lim</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>→</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:munder><mml:mfrac><mml:mrow><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow><mml:mo>−</mml:mo><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mrow></mml:math></alternatives></disp-formula></p>
+      <mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mfrac><mml:mi>d</mml:mi><mml:mrow><mml:mi>d</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:mfrac><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo><mml:mo>=</mml:mo><mml:munder><mml:mi>lim</mml:mi><mml:mo>&#8289;</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>→</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:munder><mml:mfrac><mml:mrow><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo><mml:mo>−</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mrow></mml:math></alternatives></disp-formula></p>
     </list-item>
     <list-item>
       <p>Here’s one that has a line break in it: <inline-formula><alternatives>
diff --git a/test/writer.markdown b/test/writer.markdown
--- a/test/writer.markdown
+++ b/test/writer.markdown
@@ -105,45 +105,45 @@
 
 Asterisks tight:
 
--   asterisk 1
--   asterisk 2
--   asterisk 3
+- asterisk 1
+- asterisk 2
+- asterisk 3
 
 Asterisks loose:
 
--   asterisk 1
+- asterisk 1
 
--   asterisk 2
+- asterisk 2
 
--   asterisk 3
+- asterisk 3
 
 Pluses tight:
 
--   Plus 1
--   Plus 2
--   Plus 3
+- Plus 1
+- Plus 2
+- Plus 3
 
 Pluses loose:
 
--   Plus 1
+- Plus 1
 
--   Plus 2
+- Plus 2
 
--   Plus 3
+- Plus 3
 
 Minuses tight:
 
--   Minus 1
--   Minus 2
--   Minus 3
+- Minus 1
+- Minus 2
+- Minus 3
 
 Minuses loose:
 
--   Minus 1
+- Minus 1
 
--   Minus 2
+- Minus 2
 
--   Minus 3
+- Minus 3
 
 ## Ordered
 
@@ -187,17 +187,17 @@
 
 ## Nested
 
--   Tab
-    -   Tab
-        -   Tab
+- Tab
+  - Tab
+    - Tab
 
 Here's another:
 
 1.  First
 2.  Second:
-    -   Fee
-    -   Fie
-    -   Foe
+    - Fee
+    - Fie
+    - Foe
 3.  Third
 
 Same thing but with paragraphs:
@@ -206,21 +206,21 @@
 
 2.  Second:
 
-    -   Fee
-    -   Fie
-    -   Foe
+    - Fee
+    - Fie
+    - Foe
 
 3.  Third
 
 ## Tabs and spaces
 
--   this is a list item indented with tabs
+- this is a list item indented with tabs
 
--   this is a list item indented with spaces
+- this is a list item indented with spaces
 
-    -   this is an example list item indented with tabs
+  - this is an example list item indented with tabs
 
-    -   this is an example list item indented with spaces
+  - this is an example list item indented with spaces
 
 ## Fancy list markers
 
@@ -521,23 +521,23 @@
 
 # LaTeX
 
--   `\cite[22-23]{smith.1899}`{=tex}
--   $2+2=4$
--   $x \in y$
--   $\alpha \wedge \omega$
--   $223$
--   $p$-Tree
--   Here's some display math:
-    $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
--   Here's one that has a line break in it: $\alpha + \omega \times x^2$.
+- `\cite[22-23]{smith.1899}`{=tex}
+- $2+2=4$
+- $x \in y$
+- $\alpha \wedge \omega$
+- $223$
+- $p$-Tree
+- Here's some display math:
+  $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
+- Here's one that has a line break in it: $\alpha + \omega \times x^2$.
 
 These shouldn't be math:
 
--   To get the famous equation, write `$e = mc^2$`.
--   \$22,000 is a *lot* of money. So is \$34,000. (It worked if "lot" is
-    emphasized.)
--   Shoes (\$20) and socks (\$5).
--   Escaped `$`: \$73 *this should be emphasized* 23\$.
+- To get the famous equation, write `$e = mc^2$`.
+- \$22,000 is a *lot* of money. So is \$34,000. (It worked if "lot" is
+  emphasized.)
+- Shoes (\$20) and socks (\$5).
+- Escaped `$`: \$73 *this should be emphasized* 23\$.
 
 Here's a LaTeX table:
 
@@ -553,11 +553,11 @@
 
 Here is some unicode:
 
--   I hat: Î
--   o umlaut: ö
--   section: §
--   set membership: ∈
--   copyright: ©
+- I hat: Î
+- o umlaut: ö
+- section: §
+- set membership: ∈
+- copyright: ©
 
 AT&T has an ampersand in their name.
 
@@ -661,9 +661,9 @@
 
 With an ampersand: <http://example.com/?foo=1&bar=2>
 
--   In a list?
--   <http://example.com/>
--   It should.
+- In a list?
+- <http://example.com/>
+- It should.
 
 An e-mail address: <nobody@nowhere.net>
 
diff --git a/test/writer.ms b/test/writer.ms
--- a/test/writer.ms
+++ b/test/writer.ms
@@ -699,7 +699,7 @@
 .IP \[bu] 3
 Here\[cq]s some display math:
 .EQ
-d over {d x} f left ( x right ) = lim from {h -> 0} {f left ( x + h right ) - f left ( x right )} over h
+d over {d x} f ( x ) = lim from {h -> 0} {f ( x + h ) - f ( x )} over h
 .EN
 .IP \[bu] 3
 Here\[cq]s one that has a line break in it: @alpha + omega times x sup 2@.
diff --git a/test/writer.opml b/test/writer.opml
--- a/test/writer.opml
+++ b/test/writer.opml
@@ -31,13 +31,13 @@
 <outline text="Code Blocks" _note="Code:&#10;&#10;    ---- (should be four hyphens)&#10;&#10;    sub status {&#10;        print &quot;working&quot;;&#10;    }&#10;&#10;    this code block is indented by one tab&#10;&#10;And:&#10;&#10;        this code block is indented by two tabs&#10;&#10;    These should not be escaped:  \$ \\ \&gt; \[ \{&#10;&#10;--------------------------------------------------------------------------------">
 </outline>
 <outline text="Lists">
-  <outline text="Unordered" _note="Asterisks tight:&#10;&#10;-   asterisk 1&#10;-   asterisk 2&#10;-   asterisk 3&#10;&#10;Asterisks loose:&#10;&#10;-   asterisk 1&#10;&#10;-   asterisk 2&#10;&#10;-   asterisk 3&#10;&#10;Pluses tight:&#10;&#10;-   Plus 1&#10;-   Plus 2&#10;-   Plus 3&#10;&#10;Pluses loose:&#10;&#10;-   Plus 1&#10;&#10;-   Plus 2&#10;&#10;-   Plus 3&#10;&#10;Minuses tight:&#10;&#10;-   Minus 1&#10;-   Minus 2&#10;-   Minus 3&#10;&#10;Minuses loose:&#10;&#10;-   Minus 1&#10;&#10;-   Minus 2&#10;&#10;-   Minus 3">
+  <outline text="Unordered" _note="Asterisks tight:&#10;&#10;- asterisk 1&#10;- asterisk 2&#10;- asterisk 3&#10;&#10;Asterisks loose:&#10;&#10;- asterisk 1&#10;&#10;- asterisk 2&#10;&#10;- asterisk 3&#10;&#10;Pluses tight:&#10;&#10;- Plus 1&#10;- Plus 2&#10;- Plus 3&#10;&#10;Pluses loose:&#10;&#10;- Plus 1&#10;&#10;- Plus 2&#10;&#10;- Plus 3&#10;&#10;Minuses tight:&#10;&#10;- Minus 1&#10;- Minus 2&#10;- Minus 3&#10;&#10;Minuses loose:&#10;&#10;- Minus 1&#10;&#10;- Minus 2&#10;&#10;- Minus 3">
   </outline>
   <outline text="Ordered" _note="Tight:&#10;&#10;1.  First&#10;2.  Second&#10;3.  Third&#10;&#10;and:&#10;&#10;1.  One&#10;2.  Two&#10;3.  Three&#10;&#10;Loose using tabs:&#10;&#10;1.  First&#10;&#10;2.  Second&#10;&#10;3.  Third&#10;&#10;and using spaces:&#10;&#10;1.  One&#10;&#10;2.  Two&#10;&#10;3.  Three&#10;&#10;Multiple paragraphs:&#10;&#10;1.  Item 1, graf one.&#10;&#10;    Item 1. graf two. The quick brown fox jumped over the lazy dog's back.&#10;&#10;2.  Item 2.&#10;&#10;3.  Item 3.">
   </outline>
-  <outline text="Nested" _note="-   Tab&#10;    -   Tab&#10;        -   Tab&#10;&#10;Here's another:&#10;&#10;1.  First&#10;2.  Second:&#10;    -   Fee&#10;    -   Fie&#10;    -   Foe&#10;3.  Third&#10;&#10;Same thing but with paragraphs:&#10;&#10;1.  First&#10;&#10;2.  Second:&#10;&#10;    -   Fee&#10;    -   Fie&#10;    -   Foe&#10;&#10;3.  Third">
+  <outline text="Nested" _note="- Tab&#10;  - Tab&#10;    - Tab&#10;&#10;Here's another:&#10;&#10;1.  First&#10;2.  Second:&#10;    - Fee&#10;    - Fie&#10;    - Foe&#10;3.  Third&#10;&#10;Same thing but with paragraphs:&#10;&#10;1.  First&#10;&#10;2.  Second:&#10;&#10;    - Fee&#10;    - Fie&#10;    - Foe&#10;&#10;3.  Third">
   </outline>
-  <outline text="Tabs and spaces" _note="-   this is a list item indented with tabs&#10;&#10;-   this is a list item indented with spaces&#10;&#10;    -   this is an example list item indented with tabs&#10;&#10;    -   this is an example list item indented with spaces">
+  <outline text="Tabs and spaces" _note="- this is a list item indented with tabs&#10;&#10;- this is a list item indented with spaces&#10;&#10;  - this is an example list item indented with tabs&#10;&#10;  - this is an example list item indented with spaces">
   </outline>
   <outline text="Fancy list markers" _note="(2) begins with 2&#10;&#10;(3) and now 3&#10;&#10;    with a continuation&#10;&#10;    iv. sublist with roman numerals, starting with 4&#10;    v.  more items&#10;        (A) a subsublist&#10;        (B) a subsublist&#10;&#10;Nesting:&#10;&#10;A.  Upper Alpha&#10;    I.  Upper Roman.&#10;        (6) Decimal start with 6&#10;            c)  Lower alpha with paren&#10;&#10;Autonumbering:&#10;&#10;1.  Autonumber.&#10;2.  More.&#10;    1.  Nested.&#10;&#10;Should not be a list item:&#10;&#10;M.A. 2007&#10;&#10;B. Williams&#10;&#10;--------------------------------------------------------------------------------">
   </outline>
@@ -50,9 +50,9 @@
 </outline>
 <outline text="Smart quotes, ellipses, dashes" _note="&quot;Hello,&quot; said the spider. &quot;'Shelob' is my name.&quot;&#10;&#10;'A', 'B', and 'C' are letters.&#10;&#10;'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.'&#10;&#10;'He said, &quot;I want to go.&quot;' Were you alive in the 70's?&#10;&#10;Here is some quoted '`code`' and a &quot;[quoted&#10;link](http://example.com/?foo=1&amp;bar=2)&quot;.&#10;&#10;Some dashes: one---two --- three---four --- five.&#10;&#10;Dashes between numbers: 5--7, 255--66, 1987--1999.&#10;&#10;Ellipses...and...and....&#10;&#10;--------------------------------------------------------------------------------">
 </outline>
-<outline text="LaTeX" _note="-   `\cite[22-23]{smith.1899}`{=tex}&#10;-   $2+2=4$&#10;-   $x \in y$&#10;-   $\alpha \wedge \omega$&#10;-   $223$&#10;-   $p$-Tree&#10;-   Here's some display math:&#10;    $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$&#10;-   Here's one that has a line break in it: $\alpha + \omega \times x^2$.&#10;&#10;These shouldn't be math:&#10;&#10;-   To get the famous equation, write `$e = mc^2$`.&#10;-   \$22,000 is a *lot* of money. So is \$34,000. (It worked if &quot;lot&quot; is&#10;    emphasized.)&#10;-   Shoes (\$20) and socks (\$5).&#10;-   Escaped `$`: \$73 *this should be emphasized* 23\$.&#10;&#10;Here's a LaTeX table:&#10;&#10;\begin{tabular}{|l|l|}\hline&#10;Animal &amp; Number \\ \hline&#10;Dog    &amp; 2      \\&#10;Cat    &amp; 1      \\ \hline&#10;\end{tabular}&#10;&#10;--------------------------------------------------------------------------------">
+<outline text="LaTeX" _note="- `\cite[22-23]{smith.1899}`{=tex}&#10;- $2+2=4$&#10;- $x \in y$&#10;- $\alpha \wedge \omega$&#10;- $223$&#10;- $p$-Tree&#10;- Here's some display math:&#10;  $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$&#10;- Here's one that has a line break in it: $\alpha + \omega \times x^2$.&#10;&#10;These shouldn't be math:&#10;&#10;- To get the famous equation, write `$e = mc^2$`.&#10;- \$22,000 is a *lot* of money. So is \$34,000. (It worked if &quot;lot&quot; is&#10;  emphasized.)&#10;- Shoes (\$20) and socks (\$5).&#10;- Escaped `$`: \$73 *this should be emphasized* 23\$.&#10;&#10;Here's a LaTeX table:&#10;&#10;\begin{tabular}{|l|l|}\hline&#10;Animal &amp; Number \\ \hline&#10;Dog    &amp; 2      \\&#10;Cat    &amp; 1      \\ \hline&#10;\end{tabular}&#10;&#10;--------------------------------------------------------------------------------">
 </outline>
-<outline text="Special Characters" _note="Here is some unicode:&#10;&#10;-   I hat: Î&#10;-   o umlaut: ö&#10;-   section: §&#10;-   set membership: ∈&#10;-   copyright: ©&#10;&#10;AT&amp;T has an ampersand in their name.&#10;&#10;AT&amp;T is another way to write it.&#10;&#10;This &amp; that.&#10;&#10;4 \&lt; 5.&#10;&#10;6 \&gt; 5.&#10;&#10;Backslash: \\&#10;&#10;Backtick: \`&#10;&#10;Asterisk: \*&#10;&#10;Underscore: \_&#10;&#10;Left brace: {&#10;&#10;Right brace: }&#10;&#10;Left bracket: \[&#10;&#10;Right bracket: \]&#10;&#10;Left paren: (&#10;&#10;Right paren: )&#10;&#10;Greater-than: \&gt;&#10;&#10;Hash: \#&#10;&#10;Period: .&#10;&#10;Bang: !&#10;&#10;Plus: +&#10;&#10;Minus: -&#10;&#10;--------------------------------------------------------------------------------">
+<outline text="Special Characters" _note="Here is some unicode:&#10;&#10;- I hat: Î&#10;- o umlaut: ö&#10;- section: §&#10;- set membership: ∈&#10;- copyright: ©&#10;&#10;AT&amp;T has an ampersand in their name.&#10;&#10;AT&amp;T is another way to write it.&#10;&#10;This &amp; that.&#10;&#10;4 \&lt; 5.&#10;&#10;6 \&gt; 5.&#10;&#10;Backslash: \\&#10;&#10;Backtick: \`&#10;&#10;Asterisk: \*&#10;&#10;Underscore: \_&#10;&#10;Left brace: {&#10;&#10;Right brace: }&#10;&#10;Left bracket: \[&#10;&#10;Right bracket: \]&#10;&#10;Left paren: (&#10;&#10;Right paren: )&#10;&#10;Greater-than: \&gt;&#10;&#10;Hash: \#&#10;&#10;Period: .&#10;&#10;Bang: !&#10;&#10;Plus: +&#10;&#10;Minus: -&#10;&#10;--------------------------------------------------------------------------------">
 </outline>
 <outline text="Links">
   <outline text="Explicit" _note="Just a [URL](/url/).&#10;&#10;[URL and title](/url/ &quot;title&quot;).&#10;&#10;[URL and title](/url/ &quot;title preceded by two spaces&quot;).&#10;&#10;[URL and title](/url/ &quot;title preceded by a tab&quot;).&#10;&#10;[URL and title](/url/ &quot;title with &quot;quotes&quot; in it&quot;)&#10;&#10;[URL and title](/url/ &quot;title with single quotes&quot;)&#10;&#10;[with_underscore](/url/with_underscore)&#10;&#10;[Email link](mailto:nobody@nowhere.net)&#10;&#10;[Empty]().">
@@ -61,7 +61,7 @@
   </outline>
   <outline text="With ampersands" _note="Here's a [link with an ampersand in the URL](http://example.com/?foo=1&amp;bar=2).&#10;&#10;Here's a link with an amersand in the link text: [AT&amp;T](http://att.com/ &quot;AT&amp;T&quot;).&#10;&#10;Here's an [inline link](/script?foo=1&amp;bar=2).&#10;&#10;Here's an [inline link in pointy braces](/script?foo=1&amp;bar=2).">
   </outline>
-  <outline text="Autolinks" _note="With an ampersand: &lt;http://example.com/?foo=1&amp;bar=2&gt;&#10;&#10;-   In a list?&#10;-   &lt;http://example.com/&gt;&#10;-   It should.&#10;&#10;An e-mail address: &lt;nobody@nowhere.net&gt;&#10;&#10;&gt; Blockquoted: &lt;http://example.com/&gt;&#10;&#10;Auto-links should not occur here: `&lt;http://example.com/&gt;`&#10;&#10;    or here: &lt;http://example.com/&gt;&#10;&#10;--------------------------------------------------------------------------------">
+  <outline text="Autolinks" _note="With an ampersand: &lt;http://example.com/?foo=1&amp;bar=2&gt;&#10;&#10;- In a list?&#10;- &lt;http://example.com/&gt;&#10;- It should.&#10;&#10;An e-mail address: &lt;nobody@nowhere.net&gt;&#10;&#10;&gt; Blockquoted: &lt;http://example.com/&gt;&#10;&#10;Auto-links should not occur here: `&lt;http://example.com/&gt;`&#10;&#10;    or here: &lt;http://example.com/&gt;&#10;&#10;--------------------------------------------------------------------------------">
   </outline>
 </outline>
 <outline text="Images" _note="From &quot;Voyage dans la Lune&quot; by Georges Melies (1902):&#10;&#10;![lalune](lalune.jpg &quot;Voyage dans la Lune&quot;)&#10;&#10;Here is a movie ![movie](movie.jpg) icon.&#10;&#10;--------------------------------------------------------------------------------">
diff --git a/test/writer.plain b/test/writer.plain
--- a/test/writer.plain
+++ b/test/writer.plain
@@ -101,45 +101,45 @@
 
 Asterisks tight:
 
--   asterisk 1
--   asterisk 2
--   asterisk 3
+- asterisk 1
+- asterisk 2
+- asterisk 3
 
 Asterisks loose:
 
--   asterisk 1
+- asterisk 1
 
--   asterisk 2
+- asterisk 2
 
--   asterisk 3
+- asterisk 3
 
 Pluses tight:
 
--   Plus 1
--   Plus 2
--   Plus 3
+- Plus 1
+- Plus 2
+- Plus 3
 
 Pluses loose:
 
--   Plus 1
+- Plus 1
 
--   Plus 2
+- Plus 2
 
--   Plus 3
+- Plus 3
 
 Minuses tight:
 
--   Minus 1
--   Minus 2
--   Minus 3
+- Minus 1
+- Minus 2
+- Minus 3
 
 Minuses loose:
 
--   Minus 1
+- Minus 1
 
--   Minus 2
+- Minus 2
 
--   Minus 3
+- Minus 3
 
 Ordered
 
@@ -183,17 +183,17 @@
 
 Nested
 
--   Tab
-    -   Tab
-        -   Tab
+- Tab
+  - Tab
+    - Tab
 
 Here’s another:
 
 1.  First
 2.  Second:
-    -   Fee
-    -   Fie
-    -   Foe
+    - Fee
+    - Fie
+    - Foe
 3.  Third
 
 Same thing but with paragraphs:
@@ -202,21 +202,21 @@
 
 2.  Second:
 
-    -   Fee
-    -   Fie
-    -   Foe
+    - Fee
+    - Fie
+    - Foe
 
 3.  Third
 
 Tabs and spaces
 
--   this is a list item indented with tabs
+- this is a list item indented with tabs
 
--   this is a list item indented with spaces
+- this is a list item indented with spaces
 
-    -   this is an example list item indented with tabs
+  - this is an example list item indented with tabs
 
-    -   this is an example list item indented with spaces
+  - this is an example list item indented with spaces
 
 Fancy list markers
 
@@ -448,23 +448,22 @@
 
 LaTeX
 
--   
--   2 + 2 = 4
--   x ∈ y
--   α ∧ ω
--   223
--   p-Tree
--   Here’s some display math:
-    $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
--   Here’s one that has a line break in it: α + ω × x².
+- 
+- 2 + 2 = 4
+- x ∈ y
+- α ∧ ω
+- 223
+- p-Tree
+- Here’s some display math:
+  $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
+- Here’s one that has a line break in it: α + ω × x².
 
 These shouldn’t be math:
 
--   To get the famous equation, write $e = mc^2$.
--   $22,000 is a lot of money. So is $34,000. (It worked if “lot” is
-    emphasized.)
--   Shoes ($20) and socks ($5).
--   Escaped $: $73 this should be emphasized 23$.
+- To get the famous equation, write $e = mc^2$.
+- $22,000 is a lot of money. So is $34,000. (It worked if “lot” is emphasized.)
+- Shoes ($20) and socks ($5).
+- Escaped $: $73 this should be emphasized 23$.
 
 Here’s a LaTeX table:
 
@@ -474,11 +473,11 @@
 
 Here is some unicode:
 
--   I hat: Î
--   o umlaut: ö
--   section: §
--   set membership: ∈
--   copyright: ©
+- I hat: Î
+- o umlaut: ö
+- section: §
+- set membership: ∈
+- copyright: ©
 
 AT&T has an ampersand in their name.
 
@@ -582,9 +581,9 @@
 
 With an ampersand: http://example.com/?foo=1&bar=2
 
--   In a list?
--   http://example.com/
--   It should.
+- In a list?
+- http://example.com/
+- It should.
 
 An e-mail address: nobody@nowhere.net
 
diff --git a/test/writer.typst b/test/writer.typst
--- a/test/writer.typst
+++ b/test/writer.typst
@@ -654,7 +654,7 @@
 - $223$
 - $p$-Tree
 - Here's some display math:
-  $ frac(d, d x) f (x) = lim_(h arrow.r 0) frac(f (x + h) - f (x), h) $
+  $ frac(d, d x) f \( x \) = lim_(h arrow.r 0) frac(f \( x + h \) - f \( x \), h) $
 - Here's one that has a line break in it: $alpha + omega times x^2$.
 
 These shouldn't be math:
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
@@ -43,15 +43,12 @@
   \KOMAoptions{parskip=half}}
 \makeatother
 \ifLuaTeX
-\usepackage[bidi=basic]{babel}
+\usepackage[bidi=basic,shorthands=off,]{babel}
 \else
-\usepackage[bidi=default]{babel}
+\usepackage[bidi=default,shorthands=off,]{babel}
 \fi
-% get rid of language-specific shorthands (see #6817):
-\let\LanguageShortHands\languageshorthands
-\def\languageshorthands#1{}
 \ifLuaTeX
-  \usepackage[english,german]{selnolig} % disable illegal ligatures
+  \usepackage{selnolig} % disable illegal ligatures
 \fi
 \setlength{\emergencystretch}{3em} % prevent overfull lines
 \providecommand{\tightlist}{%
