packages feed

pandoc 3.8.3 → 3.10.1

raw patch · 332 files changed

Files

AUTHORS.md view
@@ -2,10 +2,12 @@  - Aaron Wolen - Adelar da Silva Queiróz+- Agriya Khetarpal - Agustín Martín Barbero - Akash Patel - Akos Marton - Albert Krewinkel+- Albert Lei - Alex Ivkin - Alex Toldaiev - Alex Vong@@ -33,6 +35,7 @@ - Anti-Distinctlyminty - Antoine Latter - Anton Antich+- Anton Melnikov - Antonio Terceiro - Arata Mizuki - Arata Mizuki@@ -62,6 +65,7 @@ - Caleb McDaniel - Caleb Mclennan - Calvin Beck+- Can H. Tartanoglu - Carlos Scheidegger - Carlos Sosa - Carsten Allefeld@@ -73,7 +77,9 @@ - Charanjit Singh - Charles Tapley Hoyt - Charlotte Koch+- Chirag Dhamange - Chris Black+- Chris Callison-Burch - Christian Conkle - Christian Christiansen - Christian Despres@@ -87,6 +93,7 @@ - Cormac Relf - Craig S. Bosma - Damien Clochard+- Dan Jacobson - Daniel Bergey - Daniel Kessler - Daniel Maslowski@@ -114,6 +121,7 @@ - Emerson Harkin - Emily Bourke - Emily Eisenberg+- Enrico Spinielli - Eric Kow - Eric Schrijver - Eric Seidel@@ -176,6 +184,7 @@ - Ivar de Bruin - Ivo Clarysse - Jaap de Jong+- Jacob Larkin - James J Balamuta - J. B. Rainsberger - J. Lewis Muir@@ -210,6 +219,7 @@ - Jez Cope - Joe Hermaszewski - Joe Hillenbrand+- Johan Larsson - John KetzerX - John Luke Bentley - John MacFarlane@@ -232,6 +242,7 @@ - Justin Bogner - Justin Wood - Karl Pettersson+- Keenan Brock - Keiichiro Shikano - Kelsey Hightower - Kevin Broch@@ -281,6 +292,7 @@ - Max Bolingbroke - Max Heller - Max Rydahl Andersen+- Meher Chaitanya - Merijn Verstraaten - Michael Beaumont - Michael Chladek@@ -334,6 +346,7 @@ - Pavol Otto - Per Christian Gaustad - Pete Ryland+- Peter Briggs - Peter Fabinksi - Peter Wang - Philip Pesca@@ -352,6 +365,7 @@ - Recai Oktaş - Repetitive - Reuben Thomas+- Robertas - Rowan Rodrik van der Molen - Roland Hieber - Roman Beránek@@ -359,6 +373,7 @@ - RyanGlScott - Ryan Gibb - S.P.H+- Sai Asish Y - Salim B - Sam S. Almahri - Sam May@@ -367,6 +382,7 @@ - Santiago Zarate - Sascha Wilde - Scott Morrison+- Scott Talbert - Sean Soon - Sebastian Talmon - Sebbones@@ -379,6 +395,7 @@ - Shim Myeongseob - Shin Sang-jae - Sidarth Kapur+- Sidney Mau - Sidharth Kapur - Simon Hengel - Simon Schuster@@ -410,6 +427,7 @@ - Timm Albers - Timothy Humphries - Tiziano Müller+- Tobias Deiminger - Todd Sifleet - Tomas Dahlqvist - TomBen@@ -441,15 +459,18 @@ - Wout Gevaert - Xavier Olive - Yan Pashkovsky+- Yann Trividic - Yehuda Katz - YI - Yoan Blanc+- You Jiangbin - Yuchen Pei - Zihang Chen - 3w36zj6 - arcnmx - a-vrma - andrebauer+- benniekiss - black-desk - blmage - bucklereed@@ -466,6 +487,7 @@ - etclub - favonia - guqicun+- har7an - harabat - hseg - infinity0x@@ -474,6 +496,7 @@ - kaizshang91 - lawcho - lifeunleaded+- luginf - lux-lth - luz paz - lwolfsonkin@@ -484,6 +507,7 @@ - mjfs - mt_caret - nbehrnd+- nibras shami - niszet - nkalvi - nuew@@ -520,3 +544,4 @@ - wiefling - willj-dev - wuffi+- λx.x
CONTRIBUTING.md view
@@ -215,9 +215,9 @@     external C libraries should especially be avoided.  10. We aim for compatibility with at least the last three-    released ghc versions, and sometimes more. Currently pandoc-    can be compiled on ghc 8.6 an higher. All pull requests and-    commits are tested automatically on GitHub Actions.+    released ghc versions, and sometimes more.  Currently we+    support ghc versions 9.6 and higher. All pull requests+    and commits are tested automatically on GitHub Actions.  Tests -----@@ -448,7 +448,7 @@ Lua filters ----------- -If you've written a useful pandoc [lua filter](lua-filters.html),+If you've written a useful pandoc [lua filter](./doc/lua-filters.md), you may want to consider submitting a pull request to the [lua-filters repository](https://github.com/pandoc/lua-filters). 
COPYING.md view
@@ -2,9 +2,9 @@  Version 2, June 1991 -    Copyright (C) 1989, 1991 Free Software Foundation, Inc.  +    Copyright (C) 1989, 1991 Free Software Foundation, Inc.     <https://fsf.org/>-    +     Everyone is permitted to copy and distribute verbatim copies     of this license document, but changing it is not allowed. @@ -96,17 +96,17 @@ distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: -  + **a)** You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. -  + **b)** You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. -  + **c)** If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement@@ -143,12 +143,12 @@ under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: -  + **a)** Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, -  + **b)** Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable@@ -156,7 +156,7 @@ terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, -  + **c)** Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the@@ -317,7 +317,7 @@     but WITHOUT ANY WARRANTY; without even the implied warranty of     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     GNU General Public License for more details.-    +     You should have received a copy of the GNU General Public License along     with this program; if not, see <https://www.gnu.org/licenses/>. @@ -330,7 +330,7 @@     Gnomovision version 69, Copyright (C) year name of author     Gnomovision comes with ABSOLUTELY NO WARRANTY; for details     type `show w'.  This is free software, and you are welcome-    to redistribute it under certain conditions; type `show c' +    to redistribute it under certain conditions; type `show c'     for details.  The hypothetical commands \`show w' and \`show c' should show the@@ -345,7 +345,7 @@      Yoyodyne, Inc., hereby disclaims all copyright     interest in the program `Gnomovision'-    (which makes passes at compilers) written +    (which makes passes at compilers) written     by James Hacker.      signature of Ty Coon, 1 April 1989
@@ -196,3 +196,30 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.++------------------------------------------------------------------------+Some of the code in wasm/pandoc.js and the patches in wasm/patches is+from https://github.com/haskell-wasm/pandoc-wasm. It is released under+this license:++MIT License++Copyright (c) Tweag I/O Limited.++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.
MANUAL.txt view
@@ -1,7 +1,7 @@ --- title: Pandoc User's Guide author: John MacFarlane-date: 2025-12-01+date: 2026-07-21 ---  # Synopsis@@ -138,8 +138,8 @@ [`amsfonts`], [`amsmath`], [`lm`], [`unicode-math`], [`iftex`], [`listings`] (if the `--listings` option is used), [`fancyvrb`], [`longtable`],-[`booktabs`], [`multirow`] (if the document contains a table with-cells that cross multiple rows), [`graphicx`] (if the document+[`caption`], [`booktabs`], [`multirow`] (if the document contains a table+with cells that cross multiple rows), [`graphicx`] (if the document contains images), [`bookmark`], [`xcolor`], [`soul`], [`geometry`] (with the `geometry` variable set), [`setspace`] (with `linestretch`), and@@ -191,6 +191,7 @@ [`lua-ul`]: https://ctan.org/pkg/lua-ul [`luatexja`]: https://ctan.org/pkg/luatexja [`longtable`]: https://ctan.org/pkg/longtable+[`caption`]: https://ctan.org/pkg/caption [`mathspec`]: https://ctan.org/pkg/mathspec [`microtype`]: https://ctan.org/pkg/microtype [`multirow`]: https://ctan.org/pkg/multirow@@ -307,7 +308,7 @@     - `bbcode` [BBCode]     - `bbcode_fluxbb` [BBCode (FluxBB)]     - `bbcode_phpbb` [BBCode (phpBB)]-    - `bbcode_steam` [BBCode (Hubzilla)]+    - `bbcode_steam` [BBCode (Steam)]     - `bbcode_hubzilla` [BBCode (Hubzilla)]     - `bbcode_xenforo` [BBCode (xenForo)]     - `beamer` ([LaTeX beamer][`beamer`] slide show)@@ -363,6 +364,7 @@     - `rtf` ([Rich Text Format])     - `texinfo` ([GNU Texinfo])     - `textile` ([Textile])+    - `t2t` ([txt2tags])     - `slideous` ([Slideous] HTML and JavaScript slide show)     - `slidy` ([Slidy] HTML and JavaScript slide show)     - `dzslides` ([DZSlides] HTML5 + JavaScript slide show)@@ -416,15 +418,16 @@  `-d` *FILE*, `--defaults=`*FILE* -:   Specify a set of default option settings.  *FILE* is a YAML+:   Specify a set of default option settings.  *FILE* is a YAML or JSON     file whose fields correspond to command-line option     settings.  All options for document conversion, including input     and output files, can be set using a defaults file.  The file will     be searched for first in the working directory, and then in     the `defaults` subdirectory of the user data directory-    (see `--data-dir`).  The `.yaml` extension may be omitted.+    (see `--data-dir`). If *FILE* lacks an extension, pandoc will+    also try adding the `.yaml` extension if *FILE* is not found.     See the section [Defaults files] for more information on the-    file format.  Settings from the defaults file may be+    file format. Settings from the defaults file may be     overridden or extended by subsequent options on the command     line. @@ -435,6 +438,24 @@          eval "$(pandoc --bash-completion)" +`--sandbox[=true|false]`++:   Run pandoc in a sandbox, limiting IO operations in readers+    and writers to reading the files specified on the command line.+    Note that this option does not limit IO operations by+    filters or in the production of PDF documents.  But it does+    offer security against, for example, disclosure of files+    through the use of `include` directives.  Anyone using+    pandoc on untrusted user input should use this option.++    Note: some readers and writers (e.g., `docx`) need access to data+    files.  If these are stored on the file system, then pandoc+    will not be able to find them when run in `--sandbox` mode+    and will raise an error. For these applications, we+    recommend using a pandoc binary compiled with the `embed_data_files`+    option, which causes the data files to be baked into the binary+    instead of being stored on the file system.+ `--verbose`  :   Give verbose debugging output.@@ -512,7 +533,7 @@ [Jira]: https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=all [txt2tags]: https://txt2tags.org [EPUB]: http://idpf.org/epub-[OPML]: http://dev.opml.org/spec2.html+[OPML]: https://opml.org/spec2.opml [OpenDocument XML]: https://www.oasis-open.org/2021/06/16/opendocument-v1-3-oasis-standard-published/ [ODT]: https://en.wikipedia.org/wiki/OpenDocument [Plain Old Documentation]: https://perldoc.perl.org/perlpod@@ -544,7 +565,7 @@ [reveal.js]: https://revealjs.com/ [FictionBook2]: http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1 [Jupyter notebook]: https://nbformat.readthedocs.io/en/latest/-[InDesign ICML]: https://manualzz.com/doc/9627253/adobe-indesign-cs6-idml-cookbook+[InDesign ICML]: https://web.archive.org/web/20211006210211/https://wwwimages.adobe.com/www.adobe.com/content/dam/acom/en/devnet/indesign/sdk/cs6/idml/idml-cookbook.pdf [TEI Simple]: https://github.com/TEIC/TEI-Simple [Muse]: https://amusewiki.org/library/manual [PowerPoint]: https://en.wikipedia.org/wiki/Microsoft_PowerPoint@@ -736,7 +757,7 @@     affected paragraph break. This option only affects the docx     reader. -`--extract-media=`*DIR*+`--extract-media=`*DIR*|*FILE*`.zip`  :   Extract images and other media contained in or linked from     the source document to the path *DIR*, creating it if@@ -748,6 +769,10 @@     Otherwise filenames are constructed from the SHA1 hash of     the contents. +    If the path given ends in `.zip`, then instead of creating+    a directory, pandoc will create a zip archive containing the+    media files.+ `--abbreviations=`*FILE*  :   Specifies a custom abbreviations file, with abbreviations@@ -761,6 +786,13 @@     space, and the period will not produce sentence-ending space     in formats like LaTeX.  The strings may not contain spaces. +`--typst-input=`*KEY*[`=`*VAL*]++:   Set a parameter value that will be made available to the typst+    parser in `sys.inputs`, like `--input` in the `typst` CLI.+    Either `:` or `=` may be used to separate *KEY* from *VAL*.+    Values containing spaces must be quoted.+ `--trace[=true|false]`  :   Print diagnostic output tracing parser progress to stderr.@@ -809,10 +841,10 @@     a *list* value, the value will be added to the list. If it already     has another kind of value, it will be made into a list containing     the previous and the new value. For example,-    `-V keyword=Joe -V author=Sue` makes `author` contain a list+    `-V author=Joe -V author=Sue` makes `author` contain a list     of strings: `Joe` and `Sue`. -`--variable-json=`*KEY*[`=`:*JSON*]+`--variable-json=`*KEY*[`=`*JSON*]  :   Set the template variable *KEY* to the value specified by a JSON     string (this may be a boolean, a string, a list, or a mapping;@@ -823,24 +855,6 @@     separate *KEY* from *VAL*. If the variable already has a     value, this value will be replaced. -`--sandbox[=true|false]`--:   Run pandoc in a sandbox, limiting IO operations in readers-    and writers to reading the files specified on the command line.-    Note that this option does not limit IO operations by-    filters or in the production of PDF documents.  But it does-    offer security against, for example, disclosure of files-    through the use of `include` directives.  Anyone using-    pandoc on untrusted user input should use this option.--    Note: some readers and writers (e.g., `docx`) need access to data-    files.  If these are stored on the file system, then pandoc-    will not be able to find them when run in `--sandbox` mode-    and will raise an error. For these applications, we-    recommend using a pandoc binary compiled with the `embed_data_files`-    option, which causes the data files to be baked into the binary-    instead of being stored on the file system.- `-D` *FORMAT*, `--print-default-template=`*FORMAT*  :   Print the system default template for an output *FORMAT*. (See `-t`@@ -907,14 +921,17 @@     on `man`, `docbook4`, `docbook5`, or `jats` output.      Note that if you are producing a PDF via `ms` and using-    (the default) `pdfroff` as a `--pdf-engine`, the table-    of contents will appear at the beginning of the-    document, before the title.  If you would prefer it to-    be at the end of the document, use the option-    `--pdf-engine-opt=--no-toc-relocation`. If `groff` is-    used as the `--pdf-engine`, the table of contents will-    always appear at the end of the document.+    (the default) `groff` as a `--pdf-engine`, the table of+    contents will appear at the end of the document. If you would+    prefer it to be at the beginning of the document, before the+    title, you can use `--pdf-engine=pdfroff`. +    Because the entries in a table of contents need heading+    identifiers to link to, this option forces the+    [`auto_identifiers`](#extension-auto_identifiers) extension on+    for the input format, even when it is off by default (as it is+    for `typst`).+ `--toc-depth=`*NUMBER*  :   Specify the number of section levels to include in the table@@ -945,27 +962,20 @@     inside raw HTML blocks when the `markdown_in_html_blocks`     extension is not set. -`--syntax-highlighting="default"|"none"|"idiomatic"|`*STYLE*`|`*FILE*+`--syntax-highlighting=default|none|idiomatic|`*STYLE*`|`*FILE*  :   The method to use for code syntax highlighting. Setting a     specific *STYLE* causes highlighting to be performed with the     internal highlighting engine, using KDE syntax definitions and-    styles. The `"idiomatic"` method uses a format-specific+    styles. The `idiomatic` method uses a format-specific     highlighter if one is available, or the default style if the     target format has no idiomatic highlighting method. Setting this     option to `none` disables all syntax highlighting. The-    `"default"` method uses a format-specific default.+    `default` method uses a format-specific default.      The default for HTML, EPUB, Docx, Ms, Man, and LaTeX output is-    to use the internal highlighter with the default style; Typst-    output relies on Typst's own syntax highlighting system by-    default.--    The [`listings`][] LaTeX package is used for idiomatic-    highlighting in LaTeX. The package does not support multi-byte-    encoding for source code. To handle UTF-8 you would need to-    use a custom template. This issue is fully documented here:-    [Encoding issue with the listings package][].+    to use the internal highlighter with the default style; for Typst+    it is to use Typst's own syntax highlighting system.      Style options are `pygments` (the default), `kate`,     `monochrome`, `breezeDark`, `espresso`, `zenburn`, `haddock`,@@ -1312,7 +1322,7 @@         To produce a custom `reference.docx`, first get a copy of         the default `reference.docx`: `pandoc         -o custom-reference.docx --print-default-data-file reference.docx`.-        Then open `custom-reference.docx` in Word, modify the+        Then open `custom-reference.docx` in Word or LibreOffice, modify the         styles as you wish, and save the file.  For best         results, do not make changes to this file other than         modifying the styles used by pandoc:@@ -1431,7 +1441,7 @@     In the template, `%n` will be replaced by the chunk number (padded     with leading 0s to 3 digits), `%s` with the section number of the chunk,     `%h` with the heading text (with formatting removed), `%i` with-    the section identifier. For example, `%section-%s-%i.html` might+    the section identifier. For example, `section-%s-%i.html` might     be resolved to `section-1.1-introduction.html`. The characters     `/` and `\` are not allowed in chunk templates and will be     ignored. The default is `%s-%i.html`.@@ -1542,7 +1552,7 @@         `pagedjs-cli`;         see [print-css.rocks](https://print-css.rocks) for a good         introduction to PDF generation from HTML/CSS)-    - `-t ms`:  `pdfroff`+    - `-t ms`:  `groff`     - `-t typst`: `typst`      This option is normally intended to be used when a PDF@@ -1762,7 +1772,9 @@ # Defaults files  The `--defaults` option may be used to specify a package-of options, in the form of a YAML file.+of options, in the form of a YAML or JSON file. Examples in+this section will be given in YAML, but the equivalent forms in+JSON will also work.  Fields that are omitted will just have their regular default values.  So a defaults file can be as simple as@@ -1772,6 +1784,12 @@ verbosity: INFO ``` +or in JSON:++``` json+{ "verbosity": "INFO" }+```+ In fields that expect a file path (or list of file paths), the following syntax may be used to interpolate environment variables: @@ -1964,6 +1982,11 @@ | ```                              | ```                               | +----------------------------------+-----------------------------------+ | ```                              | ``` yaml                          |+| --typst-input foo=bar            | typst-inputs:                     |+|                                  |   foo: bar                        |+| ```                              | ```                               |++----------------------------------+-----------------------------------++| ```                              | ``` yaml                          | | --trace                          | trace: true                       | | ```                              | ```                               | +----------------------------------+-----------------------------------+@@ -2005,7 +2028,7 @@ | ```                              | ```                               | +----------------------------------+-----------------------------------+ | ```                              | ``` yaml                          |-| --wrap 60                        | wrap: 60                          |+| --wrap preserve                  | wrap: "preserve"                  | | ```                              | ```                               | +----------------------------------+-----------------------------------+ | ```                              | ``` yaml                          |@@ -2964,6 +2987,13 @@ :   additional attributes for the title slide of reveal.js slide shows.     See [background in reveal.js, beamer, and pptx] for an example. +`highlightjs-theme`+:   highlight.js theme for code highlighting when using+    `--syntax-highlighting=idiomatic` with reveal.js (defaults to+    `monokai`). See the [highlight.js demo page] for available themes.++[highlight.js demo page]: https://highlightjs.org/demo+ All [reveal.js configuration options] are available as variables. To turn off boolean flags that default to true in reveal.js, use `0`. @@ -2987,6 +3017,9 @@ `logo` :   logo image for slides +`logooptions`+:   options for logo image (e.g., `width`, `height`)+ `navigation` :   controls navigation symbols (default is `empty` for no navigation     symbols; other valid values are `frame`, `vertical`, and `horizontal`)@@ -3004,7 +3037,7 @@ :   image for title slide: can be a list  `titlegraphicoptions`-:   options for title slide image+:   options for title slide image (e.g., `width`, `height`)  `shorttitle`, `shortsubtitle`, `shortauthor`, `shortinstitute`, `shortdate` :   some beamer themes use short versions of the title, subtitle, author,@@ -3276,6 +3309,17 @@      See the section on [reproducible builds]. +`pdfstandard`+:   PDF standard(s) for the document, e.g. `ua-2`, `a-4f`.+    Supports PDF/A, PDF/X, and PDF/UA variants.+    Requires LuaLaTeX and LaTeX 2023+. Repeat for multiple standards:++        ---+        pdfstandard:+        - ua-2+        - a-4f+        ...+ [KOMA-Script]: https://ctan.org/pkg/koma-script [LaTeX Font Catalogue]: https://tug.org/FontCatalogue/ [LaTeX font encodings guide]: https://ctan.org/pkg/encguide@@ -3497,6 +3541,11 @@ [`install-font.sh`]: https://www.schaffter.ca/mom/bin/install-font.sh [ms-font-steps]: https://www.schaffter.ca/mom/momdoc/appendices.html#steps +### Variables for RTF++`fontsize`+:   font size for body text, e.g. `12pt` or `12.5pt`.+ ### Variables set automatically  Pandoc sets these variables automatically in response to [options] or@@ -3638,13 +3687,13 @@ This extension can be enabled/disabled for the following formats:  input formats-:  `markdown`, `latex`, `rst`, `mediawiki`, `textile`+:  `markdown`, `latex`, `rst`, `mediawiki`, `textile`, `man`, `typst`  output formats :  `markdown`, `muse`  enabled by default in-:  `markdown`, `muse`+:  `markdown`, `muse`, `man`  The default algorithm used to derive the identifier from the heading text is:@@ -3840,14 +3889,16 @@  ### Extension: `native_numbering` ### -Enables native numbering of figures and tables. Enumeration-starts at 1.--This extension can be enabled/disabled for the following formats:+Enables numbering of figures and tables via counter fields+specific to the target format. This extension+can be enabled/disabled for the following formats:  output formats :  `odt`, `opendocument`, `docx` +If this extension is not enabled, tables and figures in these+formats will not be numbered.+ ### Extension: `xrefs_name` ###  Links to headings, figures and tables inside the document are@@ -4510,6 +4561,10 @@  Note:  the '`#`' ordered list marker doesn't work with `commonmark`. +As with `commonmark`, ordered sublists must start with `1` or the+equivalent (e.g., `i` or `a`). This helps avoid unintentional+lists caused by things like parenthesized dates.+ ### Extension: `startnum` ###  Pandoc also pays attention to the type of list marker used, and to the@@ -4571,19 +4626,19 @@ or two spaces.  A term may have multiple definitions, and each definition may-consist of one or more block elements (paragraph, code block,-list, etc.), each indented four spaces or one tab stop.  The-body of the definition (not including the first line)-should be indented four spaces. However, as with-other Markdown lists, you can "lazily" omit indentation except-at the beginning of a paragraph or other block element:+consist of one or more indented block elements (paragraph, code block,+list, etc.). The blocks in the definition should be indented to the column+of the first non-space content after the `:` or `~` marker, or+(if the `four_space_rule` extension is enabled) four spaces or+one tab stop. As with other Markdown lists, you can "lazily" omit+indentation in paragraph continuation lines:      Term 1 -    :   Definition+    : Definition     with lazy continuation. -        Second paragraph of the definition.+      Second paragraph of the definition.  If you leave space before the definition (as in the example above), the text of the definition will be treated as a paragraph.  In some@@ -4704,9 +4759,12 @@  ## Tables -Four kinds of tables may be used. The first three kinds presuppose the use of-a fixed-width font, such as Courier. The fourth kind can be used with-proportionally spaced fonts, as it does not require lining up columns.+Four kinds of tables may be used. The first three kinds (simple,+multiline, and grid) require lining up columns and thus+presuppose the use of a fixed-width font, such as Courier.+The fourth kind (pipe tables) can be used with+proportionally spaced fonts, as it does not require lining up+columns.  ### Extension: `table_captions` ### @@ -4951,6 +5009,29 @@        : Here's the caption. {#ident .class key="value"} +### Table placement in LaTeX ###++By default, pandoc will render tables in LaTeX using the `longtable`+environment. The tables will not "float" and they can span page boundaries.+If you prefer standard "floating" tables (which are limited to what can+fit on one page), add the `float` class to the table's attributes+(which can be specified after the caption). Optionally, the `latex-placement`+attribute may be used to pass parameters affecting the float placement:++    : The caption of the table. {#ident .float latex-placement="ht"}++Note that `longtable` does not work with two-column layouts, so if you+are producing a two-column document using LaTeX, you will need to specify+the `float` class on every table, or use this small Lua filter+to add it automatically:++```lua+function Table(el)+  el.classes:insert("float")+  return el+end+```+ ## Metadata blocks  ### Extension: `pandoc_title_block` ###@@ -5048,6 +5129,7 @@ (`...`) at the bottom.  The initial line `---` must not be followed by a blank line. A YAML metadata block may occur anywhere in the document, but if it is not at the beginning, it must be preceded by a blank line.+(Note that JSON may be used as well, because JSON is a subset of YAML.)  Note that, because of the way pandoc concatenates input files when several are provided, you may also keep the metadata in a@@ -5154,10 +5236,10 @@       \renewcommand{\section}[1]{\clearpage\oldsection{#1}}       ``` -Note:  the `yaml_metadata_block` extension works with-`commonmark` as well as `markdown` (and it is enabled by default-in `gfm` and `commonmark_x`).  However, in these formats the-following restrictions apply:+Note:  the `yaml_metadata_block` extension works not just with+`markdown` but with `commonmark` (and it is enabled by default in+`gfm` and `commonmark_x`). However, in `commonmark`, `gfm`,+and `commonmark_x`, the following restrictions apply:  - The YAML metadata block must occur at the beginning of the   document (and there can be only one).  If multiple files are@@ -5362,7 +5444,7 @@   ~ It will appear verbatim surrounded by `\(...\)` (for inline     math) or `\[...\]` (for display math). -Markdown, Emacs Org mode, ConTeXt, ZimWiki+Markdown, Emacs Org mode, ConTeXt, Txt2Tags, ZimWiki   ~ It will appear verbatim surrounded by `$...$` (for inline     math) or `$$...$$` (for display math). @@ -5427,8 +5509,8 @@ be disabled if desired.)  The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous,-DZSlides, EPUB, Markdown, CommonMark, Emacs Org mode, and Textile-output, and suppressed in other formats.+DZSlides, EPUB, Markdown, CommonMark, Emacs Org mode, Textile, and+Txt2Tags output, and suppressed in other formats.  For a more explicit way of including raw HTML in a Markdown document, see the [`raw_attribute` extension][Extension: `raw_attribute`].@@ -5626,22 +5708,34 @@  The link consists of link text in square brackets, followed by a label in square brackets. (There cannot be space between the two unless the-`spaced_reference_links` extension is enabled.) The link definition-consists of the bracketed label, followed by a colon and a space, followed by-the URL, and optionally (after a space) a link title either in quotes or in-parentheses.  The label must not be parseable as a citation (assuming-the `citations` extension is enabled):  citations take precedence over-link labels.+`spaced_reference_links` extension is enabled.) If the label is empty+(`[]`), then it will be implicitly be taken to be the same as the link text;+thus `[foo][]` is equivalent to `[foo][foo]`. (If the+`shortcut_reference_links` extension is enabled, the empty `[]`+may be omitted.) -Here are some examples:+The link definition consists of the bracketed label, followed by+a colon and a space, followed by the URL, and optionally (after a+space) a link title either in quotes or in parentheses. The label+must not be parseable as a citation (assuming the `citations`+extension is enabled): citations take precedence over link+labels. -    [my label 1]: /foo/bar.html  "My title, optional"-    [my label 2]: /foo-    [my label 3]: https://fsf.org (The Free Software Foundation)-    [my label 4]: /bar#special  'A title in single quotes'+Here are some examples of reference links and link definitions; -The URL may optionally be surrounded by angle brackets:+    See [the website *I* built][my website]. +    See [my website][] and [the bar page][1] and+    the [home page of the FSF][fsf].++    [my website]: http://foo.bar.baz+    [1]: /foo/bar.html  "My title, optional"+    [fsf]: https://fsf.org (The Free Software Foundation)+    [special page]: /bar#special  'A title in single quotes'++The URL in a link definition may optionally be surrounded by+angle brackets:+     [my label 5]: <http://foo.bar.baz>  The title may go on the next line:@@ -5655,18 +5749,14 @@      [Foo]: /bar/baz -In an *implicit* reference link, the second pair of brackets is-empty:--    See [my website][].--    [my website]: http://foo.bar.baz+The link definition may come either before or after a+reference link that uses the label. -Note:  In `Markdown.pl` and most other Markdown implementations,-reference link definitions cannot occur in nested constructions-such as list items or block quotes.  Pandoc lifts this-arbitrary-seeming restriction.  So the following is fine in pandoc,-though not in most other implementations:+Note: In some Markdown implementations, reference link+definitions cannot occur in nested constructions such as list+items or block quotes. Pandoc lifts this arbitrary-seeming+restriction. So the following is fine in pandoc, though not in+all implementations:      > My block [quote].     >@@ -5700,7 +5790,8 @@ ## Images  A link immediately preceded by a `!` will be treated as an image.-The link text will be used as the image's alt text:+The link text (the part in square brackets) will be used as the+image's alt text:      ![la lune](lalune.jpg "Voyage to the moon") @@ -5992,6 +6083,17 @@ this reason, it is sometimes preferable to use the author-in-text style inside notes when using a note style. +Many CSL styles will format citations differently when the+same source has been cited earlier.  In documents with chapters,+it is usually desirable to reset this position information+at the beginning of every chapter. To do this, add the class+`reset-citation-positions` to the heading for each chapter:++    # The Beginning {.reset-citation-positions}++Note that this class only has an effect when placed on+top-level headings; it is ignored in nested blocks.+ [CSL user documentation]: https://citationstyles.org/authors/ [CSL]: https://docs.citationstyles.org/en/stable/specification.html [CSL markup specs]: https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html#html-like-formatting-tags@@ -6199,9 +6301,6 @@    [GitHub-style Markdown alerts]: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts -Note: This extension currently only works with commonmark:-`commonmark`, `gfm`, `commonmark_x`.- ### Extension: `autolink_bare_uris` ###  Makes all absolute URIs into links, even when not surrounded by@@ -6927,6 +7026,23 @@ Notes are not yet supported for other slide formats, but the notes will not appear on the slides themselves. +### Speaker notes on the title slide (PowerPoint)++For PowerPoint output, the title slide is generated from the document's+YAML metadata block. To add speaker notes to this slide, use a `notes`+field in the metadata:++    ---+    title: My Presentation+    author: Jane Doe+    notes: |+      Welcome everyone to this presentation.++      Remember to introduce yourself and mention the key topics.+    ---++The `notes` field can contain multiple paragraphs and Markdown formatting.+ ## Columns  To put material in side by side columns, you can use a native@@ -7106,7 +7222,9 @@       text: Sarah Jones     identifier:     - scheme: DOI-      text: doi:10.234234.234/33+      text: 'urn:doi:10.234234.234/33'+    - scheme: ISBN-13+      text: 'urn:isbn:9780000000000'     publisher:  My Press     rights: © 2007 John Smith, CC BY-NC     ibooks:@@ -7116,23 +7234,30 @@ The following fields are recognized:  `identifier`-  ~ Either a string value or an object with fields `text` and-    `scheme`.  Valid values for `scheme` are `ISBN-10`,-    `GTIN-13`, `UPC`, `ISMN-10`, `DOI`, `LCCN`, `GTIN-14`,-    `ISBN-13`, `Legal deposit number`, `URN`, `OCLC`,-    `ISMN-13`, `ISBN-A`, `JP`, `OLCC`.+  ~ Either a string value, or an object with fields `text` and+    `scheme` (optional), or a list of such objects. Valid values for+    `scheme` are `ISBN-10`, `GTIN-13`, `UPC`, `ISMN-10`, `DOI`,+    `LCCN`, `GTIN-14`, `ISBN-13`, `Legal deposit number`, `URN`,+    `OCLC number`, `Co-publisher’s ISBN-13`, `ISMN-13`, `ISBN-A`,+    `JP e-code`, `OLCC number`, `JP Magazine ID`, `UPC-12+5`,+    `BNF Control number`, `ISSN-13`, `ARK`, `Digital file+    internal version number`. In the `text` field, it is+    advisable to specify a URN as in the examples above. Note+    that quotes are needed around a YAML field containing a colon.  `title`-  ~ Either a string value, or an object with fields `file-as` and-    `type`, or a list of such objects.  Valid values for `type` are-    `main`, `subtitle`, `short`, `collection`, `edition`, `extended`.+  ~ Either a string value, or an object with fields `text`,+    `file-as` (optional) and `type` (optional), or a list of such+    objects. Valid values for `type` are `main`, `subtitle`,+    `short`, `collection`, `edition`, `extended`.  `creator`-  ~ Either a string value, or an object with fields `role`, `file-as`,-    and `text`, or a list of such objects.  Valid values for `role` are-    [MARC relators], but-    pandoc will attempt to translate the human-readable versions-    (like "author" and "editor") to the appropriate marc relators.+  ~ Either a string value, or an object with fields `text`,+    `role` (optional), and `file-as` (optional), or a list of+    such objects. Valid values for `role` are [MARC relators],+    but pandoc will attempt to translate the human-readable+    versions (like "author" and "editor") to the appropriate marc+    relators.  `contributor`   ~ Same format as `creator`.@@ -7146,12 +7271,14 @@     language if nothing is specified.  `subject`-  ~ Either a string value, or an object with fields `text`, `authority`,-    and `term`, or a list of such objects. Valid values for `authority`-    are either a [reserved authority value] (currently `AAT`, `BIC`,-    `BISAC`, `CLC`, `DDC`, `CLIL`, `EuroVoc`, `MEDTOP`, `LCSH`, `NDC`,-    `Thema`, `UDC`, and `WGS`) or an absolute IRI identifying a custom-    scheme. Valid values for `term` are defined by the scheme.+  ~ Either a string value, or an object with fields `text`,+    `authority` (optional), and `term` (optional), or a list of+    such objects. Valid values for `authority` are either a+    [reserved authority value] (currently `AAT`, `BIC`, `BISAC`,+    `CLC`, `DDC`, `CLIL`, `EuroVoc`, `MEDTOP`, `LCSH`, `NDC`,+    `Thema`, `UDC`, and `WGS`) or an absolute IRI identifying a+    custom scheme. Valid values for `term` are defined by the+    scheme.  `description`   ~ A string value.@@ -7594,6 +7721,24 @@  To disable highlighting, use `--syntax-highlighting=none`. +To use a format's idiomatic syntax highlighting instead of+pandoc's built-in highlighting, use `--syntax-highlighting=idiomatic`.+Currently, `idiomatic` only affects the following formats:++- In reveal.js, it causes reveal.js's highlighting plugin to be+  used for source code highlighting.  The style may be customized+  by setting the `highlightjs-theme` variable.++- In Typst, it causes Typst's built-in highlighting to be used.+  (This is also the default for Typst.)++- In LaTeX, it causes the [`listings`][] package  to be used. Note that+  `listings` does not support multi-byte encoding for source code. To handle+  UTF-8 you would need to use a custom template. This issue is fully+  documented here: [Encoding issue with the listings package][].++- In other formats, `idiomatic` will have the same result as `default`.+ [skylighting]: https://github.com/jgm/skylighting  # Custom Styles@@ -7646,6 +7791,14 @@ For docx or odt output, you don't need to enable any extensions for custom styles to work. +For icml output, you can also set an `object-style` in images:++    ![Image with object style](myImage.jpg){object-style="fixedSizeImage"}++In InDesign you'll see that object style given to the image,+and you'll be able to customize it, or load its definition from+a template of yours.+ [pandoc filters]: https://pandoc.org/filters.html  ## Input@@ -7769,10 +7922,10 @@ However, it is possible to generate accessible PDFs, which use tagging to add semantic information to the document. -Pandoc defaults to LaTeX to generate PDF. Tagging support in LaTeX-is in development and not readily available, so PDFs generated in-this way will always be untagged and not accessible. This means-that alternative engines must be used to generate accessible PDFs.+Pandoc defaults to LaTeX to generate PDF. LaTeX's `\DocumentMetadata`+interface supports PDF standards and tagging when using LuaLaTeX;+set the `pdfstandard` variable to enable this (see below). For older+LaTeX installations, alternative engines must be used.  The PDF standards PDF/A and PDF/UA define further restrictions intended to optimize PDFs for archiving and accessibility. Tagging@@ -7784,6 +7937,25 @@ this, and external programs must be used to ensure that generated PDFs are in compliance. +## LaTeX++Set the `pdfstandard` variable to produce tagged PDFs conforming+to PDF/A, PDF/X, or PDF/UA standards. For example:++    pandoc -V pdfstandard=ua-2 --pdf-engine=lualatex doc.md -o doc.pdf++Multiple standards can be combined:++    ---+    pdfstandard:+      - ua-2+      - a-4f+    ---++The required PDF version is inferred automatically. This feature+requires LuaLaTeX in TeX Live 2025 with LaTeX kernel 2025-06-01+or newer.+ ## ConTeXt  ConTeXt always produces tagged PDFs, but the quality depends on@@ -7878,38 +8050,73 @@    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 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.)+2. If you want to use pandoc in a web application that accepts+   untrusted user input, you should be aware that running pandoc in+   this context requires special precautions, or you risk exfiltration+   of the contents of local files, or worse.  In particular: -3. Several output formats (including RTF, FB2, HTML with-   `--self-contained`, EPUB, Docx, and ODT) will embed encoded-   or raw images into the output file.  An untrusted attacker-   could exploit this to view the contents of non-image files on the-   file system.  (Using the `--sandbox` option can protect-   against this threat, but will also prevent including images in-   these formats.)+   - 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 will protect against this threat. -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.+   - Several output formats (including RTF, FB2, HTML with+     `--self-contained`, EPUB, Docx, and ODT) will embed encoded+     or raw images into the output file.  An untrusted attacker+     could exploit this to view the contents of non-image files on the+     file system.  Using the `--sandbox` option will protect+     against this threat, but will also prevent including images in+     these formats. -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-   [Using the pandoc API](https://pandoc.org/using-the-pandoc-api.html)-   for more details. (This corresponds to the use of the `--sandbox`-   option on the command line.)+   - 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 or to+     enable server-side request forgery (SSRF) attacks+     ([CVE-2025-51591]). To mitigate such attacks, use+     `--sandbox` or `-f html+raw_html` (which causes the whole+     `iframe` to be parsed as a raw HTML block). -6. Pandoc's parsers can exhibit pathological performance on some+   - Using pandoc with `--pdf-engine` introduces additional risks,+     which cannot be mitigated by using `--sandbox`.+     For example, in `wkhtmltopdf` the `footer-html` and `header-html`+     metadata fields will be passed directly to `wkhtmltopdf`+     as `--footer-html` and `--header-html` arguments, and by using+     a `file:` URIs with these, one could exfiltrate local files.+     In addition, using `--pdf-engine=wkhtmltopdf` with `-f html+raw_html`+     enables an SSRF vulnerability in wkhtmltopdf ([CVE-2022-35583]).+     Note that [`wkhtmltopdf`) is+     [deprecated](https://wkhtmltopdf.org/status.html) and+     its authors recommend not to use it with any untrusted input.+     However, there may be similar issues with other pdf-engines.+     Anyone including a pdf-engine in a pandoc command run on+     untrusted input should audit the engine carefully and+     carefully control the use of `--pdf-engine-opt`.++   Here are some alternatives for safe use of pandoc in a web+   application:++   - Use `pandoc server` to spin up a local web server, and have your+     application make requests to it.  The server runs in sandboxed mode+     and will not be able to read files or use filters.++   - Use the WASM version of pandoc.  This allows the use of Lua filters,+     but everything runs in an isolated WASM sandbox.++   - Use `pandoc --sandbox`. However, be aware that the sandbox function+     only affects readers and writers, and security issues can arise if+     you use it together with `--filter` or `--pdf-engine`.++3. 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.+   To be safe, you should run all HTML generated from untrusted+   user input through an HTML sanitizer.++4. 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@@ -7919,12 +8126,16 @@    to pathological performance than the `markdown` parser, so    it is a better choice when processing untrusted input. -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.-   To be safe, you should run all HTML generated from untrusted-   user input through an HTML sanitizer.+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+   [Using the pandoc API](https://pandoc.org/using-the-pandoc-api.html)+   for more details. (This corresponds to the use of the `--sandbox`+   option on the command line.)++  [CVE-2025-51591]: https://nvd.nist.gov/vuln/detail/CVE-2025-51591+  [CVE-2022-35583]: https://nvd.nist.gov/vuln/detail/CVE-2022-35583  # Authors 
README.md view
@@ -88,7 +88,7 @@ - `native` (native Haskell) - `odt` ([OpenDocument text   document](https://en.wikipedia.org/wiki/OpenDocument))-- `opml` ([OPML](http://dev.opml.org/spec2.html))+- `opml` ([OPML](https://opml.org/spec2.opml)) - `org` ([Emacs Org mode](https://orgmode.org)) - `pod` (Perl’s [Plain Old   Documentation](https://perldoc.perl.org/perlpod))@@ -135,7 +135,7 @@ - `bbcode_phpbb` [BBCode   (phpBB)](https://www.phpbb.com/community/help/bbcode) - `bbcode_steam` [BBCode-  (Hubzilla)](https://hubzilla.org/help/member/bbcode)+  (Steam)](https://steamcommunity.com/comment/ForumTopic/formattinghelp) - `bbcode_hubzilla` [BBCode   (Hubzilla)](https://hubzilla.org/help/member/bbcode) - `bbcode_xenforo` [BBCode@@ -174,7 +174,7 @@   markup](https://www.w3.org/TR/html-polyglot/)) - `html4` ([XHTML](https://www.w3.org/TR/xhtml1/) 1.0 Transitional) - `icml` ([InDesign-  ICML](https://manualzz.com/doc/9627253/adobe-indesign-cs6-idml-cookbook))+  ICML](https://web.archive.org/web/20211006210211/https://wwwimages.adobe.com/www.adobe.com/content/dam/acom/en/devnet/indesign/sdk/cs6/idml/idml-cookbook.pdf)) - `ipynb` ([Jupyter   notebook](https://nbformat.readthedocs.io/en/latest/)) - `jats_archiving` ([JATS](https://jats.nlm.nih.gov) XML, Archiving and@@ -206,7 +206,7 @@ - `native` (native Haskell) - `odt` ([OpenDocument text   document](https://en.wikipedia.org/wiki/OpenDocument))-- `opml` ([OPML](http://dev.opml.org/spec2.html))+- `opml` ([OPML](https://opml.org/spec2.opml)) - `opendocument` ([OpenDocument   XML](https://www.oasis-open.org/2021/06/16/opendocument-v1-3-oasis-standard-published/)) - `org` ([Emacs Org mode](https://orgmode.org))@@ -221,6 +221,7 @@   Format](https://en.wikipedia.org/wiki/Rich_Text_Format)) - `texinfo` ([GNU Texinfo](https://www.gnu.org/software/texinfo/)) - `textile` ([Textile](https://textile-lang.com))+- `t2t` ([txt2tags](https://txt2tags.org)) - `slideous` ([Slideous](https://goessner.net/articles/slideous/) HTML   and JavaScript slide show) - `slidy` ([Slidy](https://www.w3.org/Talks/Tools/Slidy2/) HTML and@@ -282,8 +283,9 @@ Guide](https://pandoc.org/MANUAL.html). It is also available [here](MANUAL.txt) as pandoc-flavored Markdown. The website also contains some [examples of the use of-pandoc](https://pandoc.org/demos.html) and a limited [online-demo](https://pandoc.org/try).+pandoc](https://pandoc.org/demos.html), a limited [online+demo](https://pandoc.org/try), and a [WebAssembly-based online+demo](https://pandoc.org/app).  ## Contributing 
changelog.md view
@@ -1,2862 +1,3901 @@ # Revision history for pandoc -## pandoc 3.8.3 (2025-12-01)--  * Add `asciidoc` as an input format (#1456).--  * Add `xlsx` (Microsoft Excel) as an input format (Anton Antich).-    Each worksheet turns into a section containing a table.--  * Add `pptx` (PowerPoint) as new input format (Anton Antich).--  * Add `bbcode` as a new output format (#11242, reptee). Several variants-    of BBCode are also supported: `bbcode_fluxbb` (FluxBB), `bbcode_phpbb`-    (phpBB), `bbcode_steam` (Hubzilla), `bbcode_hubzilla` (Hubzilla),-    and `bbcode_xenforo` (xenForo).--  * New exported module Text.Pandoc.Readers.AsciiDoc,-    exporting `readAsciiDoc` [API change].--  * New module `Text.Pandoc.Readers.Pptx`,-    exporting `readPptx` (Anton Antich) [API change].--  * New module `Text.Pandoc.Readers.Xlsx`,-    exporting `readXlsx` (Anton Antich) [API change].--  * LaTeX reader:--    + Revert `\linebreak` as LineBreak (#11272). `\linebreak` is more-      of a hint, it shouldn't produce a hard break.-    + Better handling of `\makeatletter` in parsing raw LaTeX (#11270).-    + Fix spurious paragraph breaks in math environments (#11265,-      Emmanuel Ferdman). Previously, a math environment with extra-      space before the `\end` would get rendered with a blank line,-      which LaTeX treats as a paragraph break.-    + Change type on `rawLaTeXParser` in Text.Pandoc.LaTeX.Parsing.-      The preparser doesn't need to return a value.-    + Fix `rawTeXParser` (#11253).  Make macro expansion in raw LaTeX-      depend on the setting of the `latex_macros` extension.  Previously-      macros were always expanded, even in raw TeX in markdown. In-      addition, there was previously a bug that caused content to be-      garbled in certain cases.-    + Handle `ifstrequal` at a lower level, like the other `if`-      commands (#11253).-    + Move `ifstrequal`, `iftoggle`, etc., which were misplaced in-      `environments`, to `blockCommands`, so these commands work properly.--  * Docx reader:--    + Handle REF link instruction (#11296, Ezwal).-    + Check recursively for caption styles (Albert Krewinkel).-      The docx reader uses caption styles to identify figures and-      captioned tables. It now checks for known caption styles in the-      full styles hierarchy of a paragraph instead of just checking-      the style directly. This allows to recognize caption styles that-      are built on top of the basic *caption* style, as is sometimes-      the case in sophisticated styles.--  * Markdown reader:--    + Fix performance issue in links with `'` (#10880).--  * Typst reader:--    + Handle document metadata and `#title` (jgm/typst-hs#80).-      Note that previously, the typst reader never returned document-      metadata.  Now it does, even if the typst document does not contain-      a `#title` function that would result in actually printing the-      title block.--  * Djot reader:--    + Add Space elements (#11250). Previously we just got big-      Str elements with spaces included. But many pandoc writers-      assume that breakable spaces will be Space elements, and this-      is also required for automatic wrapping.--  * RST reader:--    + Correctly handle intraword emphasis (#11309).--  * Text.Pandoc.Readers:--    + Export `readAsciiDoc`, `readXlsx`, `readPptx` [API change].--  * New module Text.Pandoc.Writers.BBCode, exporting-    `writeBBCode`,  `writeBBCodeSteam`, `writeBBCodeFluxBB`,-    `writeBBCodePhpBB`, `writeBBCodeHubzilla`, `writeBBCodeXenforo`-    [API change].--  * LaTeX writer:--    + Make level 1-3 headings work inside blockquotes (#11281, James Barlow).-    + Remove `split` from list of math environments (#11274).-    + Improve handling of math environments in tex math (#11266).--  * HTML writer:--    + Add reveal.js `scroll` and `scrollSnap` options to writer and-      template (#10052, Asliddinbek Azizovich).-    + Use 'defer' when including mathjax script, as recommended in-      MathJax docs (#11292).--  * ANSI writer:--    + Apply row spans in tables (#10149, Tuong Nguyen Manh).-      The ANSI writer is now able to keep track of row spans and apply-      them in rows.--  * Pptx writer:--    + Handle reference doc without slides (#7536, Tuong Nguyen Manh).--  * AsciiDoc writer:--    + Add more table features (#11267, Tuong Nguyen Manh):-      Row span and column span, footer row, individual horizontal-      cell alignment.--  * Typst template:--    + Fix font for compatibility with typst 0.14, which doesn't-      permit an empty array for `font` (#11238).-    + Re-add `columns` to typst template (#11259), fixing a-      pandoc 3.8 regression.-    + Fix syntax for bibliography inclusion (#11233, Mickaël Canouil).-      Previously the syntax was wrong when multiple bibliography files-      were specified. Typst expects an array.--  * Text.Pandoc.Writers:--    + Export `writeBBCode`,  `writeBBCodeSteam`, `writeBBCodeFluxBB`,-      `writeBBCodePhpBB`, `writeBBCodeHubzilla`, `writeBBCodeXenforo`-      [API change].--  * Text.Pandoc.Writers.Shared:--    + Add functions `insertCurrentSpansAtColumn`, `takePreviousSpansAtColumn`-      and `decrementTrailingRowSpans` for applying and keeping track of-      RowSpans over multiple rows (#10149, Tuong Nguyen Manh). [API change]--  * Text.Pandoc.Logging:--    + Change message for missing HTML title warning (#11307). Suggest-      setting the `pagetitle` variable instead of setting `title` in metadata.--  * Lua subsystem:--    + Preserve common state of custom Lua readers (Albert Krewinkel).-      The common state is transferred to Lua when calling a custom Lua-      reader, and is now also transferred back after the reader has-      finished. This ensures that info messages, warnings, and-      mediabag entries are available to the main program and all-      subsequent processing steps.--  * Text.Pandoc.PDF:--    + Avoid converting SVG to PDF when non-TeX PDF engine is used (#11275).-      This fixes a 3.8 regression, which caused documents with SVGs to-      raise an error when converted to PDF using WeasyPrint.-    + Fix a 3.8 regression with typst and smart quotes (#11256).-      Before 3.8, the default behavior when producing a PDF `-t typst`-      was to produce smart quotes according to typst's defaults.-      (This could be defeated by specifying `-t typst-smart`.)-      This behavior broke in 3.8 because of a change to Text.Pandoc.PDF.-      This change caused `smart` to be disabled for all formats when-      producing PDFs, when before it was only disable for TeX-based-      formats (to avoid bad ligatures). This commit restores the old-      behavior. Possibly the regression also other affects other-      non-TeX formats, e.g. HTML.--  * Text.Pandoc.Shared:--    + Add functions `allRowsEmpty` and `tableBodiesToRows` from the-      RST writer for reuse in other writers. (Tuong Nguyen Manh) [API-      change].--  * Text.Pandoc.Citeproc:--    + Allow formatting in locator to be transmitted to citeproc.-      We do this indirectly, by rendering the formatting using the-      HTML tags that citeproc recognizes.  Fixes jgm/citeproc#68-      and jgm/citeproc#163. Note that formatting is only possible for-      locators given in the explicit form, surrounded by curly braces.-      It won't work for implicit locators, since these expect-      number-like expressions.--  * New non-exported module Text.Pandoc.Readers.OOXML.Shared-    containing functions factored out from-    Text.Pandoc.Readers.Docx.Util (Anton Antich).--  * Tests: The common file `nativeDiff` has been extracted from-    the Docx and Pptx text files and put in Tests.Helpers.--  * Use asciidoc 0.1, djot 0.1.2.4, texmath 0.13.0.2, typst 0.8.1,-    citeproc 0.12.--  * MANUAL.txt:--    + Improve `implicit_figure` documentation (#11082).-    + Give both forms of options when referring to them (#11306).--  * Update INSTALL.md (#11271).--## pandoc 3.8.2.1 (2025-10-20)--  * HTML reader: allow blank space between open and close `iframe`.--  * RTF reader: improve hyperlink parsing (#11211).--  * Org reader:--    + Parse parameter lists on unknown blocks (#11188, Albert-      Krewinkel). The reader tries to parse the rest of the opening-      line of a block, e.g., `#+begin_myblock …`, as a parameters-      list. It first assumes that the parameters are in lisp-style-      (`:key value`), then alternatively tries to read python-style-      key-value pairs (`key=value`) and falls back to reading the-      entire remaining line as a single `parameter` attribute.-    + Add support for dynamic blocks.--  * Docx writer: properly handle nested comment spans (#8189, #6959,-    mourino).--  * RST writer: Don't use simple tables with RowSpans (#11214,-    Tuong Nguyen Manh).--  * Typst writer: Escape open paren after non-space (#11210).-    This fixes an issue that occurs if an open paren comes-    right after e.g. `#strong[test]`.--  * Typst template: ensure that title block is properly centered (#11221).--  * LaTeX writer/template: small fix for unnumbered tables for-    compatibility with older LaTeX installations (#11201).-    Thanks to @priiduonu for the solution.--  * MANUAL.txt: Fixed missing backtick (#11209, FoxChillz).--  * Correct anchor references to `pandoc.text` module documentation (#11111,-    Emmanuel Ferdman).--  * Fixed golden test regeneration in Docx reader test.--  * Allow unicode-data 0.8.--  * Use citeproc 0.11. This fixes a significant performance-    regression in pandoc 3.8, which was due to a rewrite of the-    default chicago-author-date.csl file. Performance with `--citeproc`-    is now on par with what we had in pandoc 3.7, even with the-    revised Chicago styles.--## pandoc 3.8.2 (2025-10-05)--  * Markdown reader/writer: implement new `table_attributes` extension-    (#10884). When `table_attributes` is enabled (as it is by default for-    pandoc's Markdown), attributes can be attached to a table by-    including them at the end of the caption. Previously the writer-    would emit an identifier in this position, but the reader didn't-    handle it. Now arbitrary attributes are allowed, and they work in-    both the reader and writer.--  * Typst writer: don't add superfluous semicolons (#11196).-    Previously we added semicolons after inline commands not-    followed by spaces, but mainly this was to deal with one issue:-    the presence of a semicolon after an inline command, which-    would be swallowed as a command separator (#9252).-    This commits adopts an approach that should avoid so many-    superfluous semicolons: it escapes semicolons that might come-    right after a command.--  * Typst template: fix 3.8 regression in which links disappear-    (#11194). A template change in 3.8 added a show rule for links which-    causes them to disappear except in special cases.--  * Text.Pandoc.Parsing: rewrite `oneOfStrings` more efficiently.--  * LaTeX writer: Fix strikeout in links (#11192, Tuong Nguyen Manh).-    As in #1294 `\url` and `\href` need to be protected-    inside an mbox for `soul` commands.--  * Text.Pandoc.Extensions: Add `Ext_table_attributes` constructor for-    `Extension` [API change].--  * Use released texmath 0.13.0.1.--  * Update FSF contact information in COPYING (#11183, Bensun Muite).--  * MANUAL.txt: remove some redundancy (#11178, Reuben Thomas).--## pandoc 3.8.1 (2025-09-29)--  * New output format `vimdoc` (Vim documentation format) (#11132, reptee).--    + [API change] Added module Text.Pandoc.Writers.Vimdoc, exporting-      `writeVimdoc`.--  * Markdown reader:--    + Improve superscript/subscript/inline note parsing (#8652).-      We do not allow inline notes to be followed by `(` or `[`.-      Otherwise, we parse inline notes before superscripts.-      Also, the sub/superscript parsers have been adjusted so that they-      really exclude unescaped spaces (as they did not before, when the-      spaces occurred in nested inlines).-    + Fix simple table alignment (#11136, Tuong Nguyen Manh). Take wide-      characters into account when determining the alignment.--  * LaTeX reader:--    + Ignore `\pandocbounded` (#11140).--  * XML reader:--    + Parse `<MetaString>` (#11137, massifrg).--  * Typst reader:--    + Add support for reading typst pagebreak (#11101, Raymond Berger).-      The pagebreak is parsed as a HorizontalRule inside a wrapper Div-      with class `page-break`.--  * Docx reader:--    + Handle figures in indented paragraphs (#11028).-    + Change default for textwidth. This should only be used if `sectPr`-      is not found.-    + Properly calculate table column widths (#9837, #11147).-      Previously we assumed that every table took up the full text-      width. Now we read the text width from the document's `sectPr`.-    + Use Tasty.Golden for Docx reader tests. This way we can update-      them with `--accept`.--  * RST reader:--    + Fix regression in simple table parsing (#11150).-    + SkippedContent warning if table directive contains-      non-tabular content.-    + Simple tables: leading space in a cell should not cause the contents-      to be parsed as a block quote (#11146).-    + Parse `:alt:` on figure (#11140). Also give a better default if-      `alt` is not specified, using the stringified caption rather-      than the filename.-    + Support col spans for simple tables (Tuong Nguyen Manh).--  * Markdown writer:--    + Improve handling of implicit figures (#11140).-      Allow implicit figures when alt text differs from caption-      (in this case, we use an image attribute to add the alt).-    + Use approximate pipe tables when it's the only option (#11128).-      If we have a table with row/colspans that can rendered as an-      approximate pipe table (without row/colspans), and no other table-      format is enabled that could render the table, we fall back to-      an "approximate" pipe table, with no row/colspans.--  * RST writer:--    + Ensure blank line before directives (#11162).-    + Add col spans for simple tables (#10127, Tuong Nguyen Manh).--  * OpenDocument writer:--    + Add missing table elements (#10002, Tuong Nguyen Manh).-      Add missing header rows after the first one,-      footer rows as well as TableBody header rows.--  * Docx writer:--    + Fix regression (from 3.8) in highlighted code (#11156).--  * Powerpoint writer:--    + Handle single column (Tuong Nguyen Manh).--  * Typst writer:--    + Fix syntax highlighting (#11171, completes #10525).-      Previously the native typst highlighting was always used, regardless-      of the setting of `--syntax-highlighting`. With this change,-      `--syntax-highlighting=none` and `--syntax-highlighting=<stylename>`-      (with skylighting style) will work.--  * LaTeX writer:--    + Make beamer footnotes compatible with pauses (#5954).-      Previously they would appear before the content to which-      the note was attached, when there were pauses in a slide.-    + Avoid `\_` in bibliography variable (#11152).-    + Ensure that unlabelled tables don't increment counter (#11141).-    + Protect VERB in caption (#11139, Tuong Nguyen Manh).-    + Don't add links to TOC (#11124, Albert Krewinkel).-    + Fix strikeouts in beamer title (#11168, Tuong Nguyen Manh).--  * LaTeX template: Add `shorthands` variable for LaTeX output-    (#11160). If true, pandoc will allow language-specific shorthands-    when loading babel. (This is helpful, for example, in getting-    proper spacing around French punctuation.)--  * epub.css: Remove coloring for `a, a:visiting` (#11174).-    This was causing links in iOS books app not to be distinguished in-    any way (since underlining is not used there).--  * Text.Pandoc.Parsing:--    + [API chage] (Tuong Nguyen Manh). New functions `tableWithSpans`,-      `tableWithSpans'`, `toTableComponentsWithSpans` and-      `toTableComponentsWithSpans'` take a list of lists of-      (Blocks, RowSpan, ColSpan) to parse a Table with different RowSpan and-      ColSpan values accordingly. New helper functions `singleRowSpans` and-      `singleColumnSpans` help set all RowSpans or ColSpans to be 1 in case-      the table format only allows setting one or the other.--  * Text.Pandoc.Class:--    + Let `fetchItem` fail if the HTTP request is not-      successful (Albert Krewinkel). HTTP requests that don't return a 200-      error code are now treated as an error. This ensures that a warning is-      triggered when using `--embed-resources` or `--extract-media`.--  * Text.Pandoc.Writers.Shared:--    + Add new function `removeLinks` [API change] (Albert Krewinkel).-      The function converts links to spans. It is used, for example, to avoid-      nested links. The HTML writer used to put the description of nested links-      into small caps, but uses a simple *span* now.--  * Text.Pandoc.Highlighting: export typst functions-    [API change]. New exported functions `formatTypstBlock`,-    `formatTypstInline`, `styleToTypst`.--  * Text.Pandoc.XML:--    + Add `fetchpriority` to list of HTML attributes (#11176).--  * Allow unicode-data 0.7.--  * Use released djot 0.1.2.3. Fixes a bug in which indentation-    was swallowed in a code block inside a blockquote.---## pandoc 3.8 (2025-09-06)--  * Add a new input and output format `xml`, exactly representing a Pandoc-    AST and isomorphic to the existing `native` and `json` formats (massifrg).-    XML schemas for validation can be found in `tools/pandoc-xml.*`.-    The format is documented in `doc/xml.md`. Pandoc now defaults to this-    reader and writer when the `.xml` extension is used.--    Two new exported modules are added [API change]:-    Text.Pandoc.Readers.XML, exporting `readXML`, and-    Text.Pandoc.Writers.XML, exporting `writeXML`.-    A new unexported module Text.Pandoc.XMLFormat is also added.--  * Add a new command line option `--syntax-highlighting`; this takes-    the values `none`, `default`, `idiomatic`, a style name, or a path to a-    theme file. It replaces the `--no-highlighting`, `--highlighting-style`,-    and `--listings` options, which will still work but with a deprecation-    warning. (Albert Krewinkel)--  * Create directory of output file if it doesn't exist (#11040).--  * Update `--version` copyright dates (#10961), and use a hardcoded-    string "pandoc" for the program name in `--version`, per GNU-    guidelines.--  * Add `smart_quotes` and `special_strings` extensions (Albert Krewinkel).-    Currently these only affect `org`. Org mode makes a distinction between-    smart parsing of quotes, and smart parsing of special strings like `...`.-    The finer grained control over these features is necessary to truthfully-    reproduce Emacs Org mode behavior. Special strings are enabled by default,-    while smart quotes are disabled.--  * Remove the old `compact_definition_lists` extension. This was-    neded to preserve backwards compatibility after pandoc 1.12-    was released, but at this point we can get rid of it.--  * Make `-t chunkedhtml -o -` output to stdout (as documented), rather-    than creating a directory called `-` (#11068).--  * RST reader: Support multiple header rows (#10338, TuongNM).--  * LaTeX reader:--    + Support soft hyphens (Albert Krewinkel).-    + Parse `\minisec` as unlisted level 6 headings (#10635, Albert Krewinkel).-    + Support `\ifmmode` (#10915).-    + Change handling of math environments (#9711, #9296).-      Certain environments in LaTeX will trigger math mode and can't-      occur within math mode: e.g., `align` or `equation`.  Previously-      we "downshifted" these, parsing an `align` environment as a-      Math element with `aligned`, and an `equation` environment as a-      regular display math element.  With this shift, we put these in-      Math inlines but retain the original environments.-      texmath and MathJax both handle these environments well.--  * Typst reader:--    + Fix addition of image path prefix to use posix separator.-    + Properly resolve image paths in included files (#11090).-    + Handle inline-level show rules on block content (#11017).-      Typst allows things like `smallcaps` to be applied to block-level-      content like headings.  This produces a type mismatch in pandoc,-      so before processing the output of typst-hs, we transform it,-      pulling the block-level elements outside of the inline-level-      elements.--  * Org reader:--    + Improve sub- and superscript parsing (Albert Krewinkel).-      Sub- and superscript must be preceded by a string in Org mode. Some text-      preceded by space or at the start of a paragraph was previously parsed-      incorrectly as sub- or superscript.-    + Allow "greater block" names to contain any non-space char (#4287,-      Albert Krewinkel).-    + Accept quoted values as argument values (#8869, Albert Krewinkel).-    + Recognize "fast access" characters in TODO state definitions-      (#10990, Ryan Gibb).-    + Improve org-cite parsing: Handle global prefix and suffix properly.-      Use all and only the styles mentioned in oc-basic.el.-      Allow space after `;`.--  * HTML reader:--    + Don't drop the initial newline in a `pre` element (#11064).--  * DocBook reader:--    + Add rowspan support (#10981, Sean Soon).-    + Be sensitive to startingnumber attribute on ordered lists (#10912).--  * POD reader:--    + Fix named entity lookup (#11015, Evan Silberman).--  * Man reader:--    + Support header and footer reader (Sean Soon).--  * Markdown reader:--    + Don't confuse a span after an author-in-text citation with a-      locator.  E.g. `@foo [test]{.bar}`.-      See https://github.com/jgm/pandoc/issues/9080#issuecomment-3221689892.-    + Make definition lists behave like other lists (#10889).-      If the `four_space_rule` extension is not enabled,-      figure out the indentation needed for child blocks dynamically,-      by looking at the first nonspace content after the `:` marker.-      Previously the four-space rule was always obeyed.-    + Fix tight/loose detection for definition lists, to conform to-      the documentation.--  * ODT reader:--    + Support `table-header-rows` (Tuong Nguyen Manh).--  * Docx reader:--    + Don't add highlighting if highlight color is "none" (#10900).-    + Handle strict OpenXML as well as transitional (#7691).-    + Fix `stringToInteger` (#9184). It previously converted things like-      `11ccc` to an integer; now it requires that the whole string be parsable-      as an integer.-    + Improve handling of AlternateContent. This fixes handling of-      one representation of emojis in Word (#11113).--  * LaTeX writer:--    + Control figure placement with attribute (#10369, Sean Soon).-      If a `latex-placement` attribute is present on a figure, it will be used-      as the optional positioning hint in LaTeX (e.g. `ht`). With implicit-      figures, `latex-placement` will be added to the figure (and removed from-      the image) if it is present on the image.-    + Include cancel package only if there is math that contains `\cancel`,-      `\bcancel`, or `\xcancel`.-    + Add braces around comments in `title-meta` (#10501). This is needed to-      prevent PDFs from interpreting this as a sequence of titles.-    + Set `pdf-trailer-id` if `SOURCE_DATE_EPOCH` envvar is set (#6539, Albert-      Krewinkel). The `SOURCE_DATE_EPOCH` environment variable is used to trigger-      reproducible PDF compilation, i.e., PDFs that are identical down to the-      byte level for repeated runs.-    + Be more conservative about using `\url` (#8802). We only use it when the-      URL is all ASCII, since the `\url` macro causes problems when used with-      some non-ASCII characters.-    + Support soft hyphens (Albert Krewinkel).-    + Change handling of math environments (#9711, #9296).-      When certain math environments (e.g. `align`) are found in Math-      elements, we emit them "raw" instead of putting them in `$..$`.--  * Typst writer:--    + Check `XID_Continue` in identifiers (Tuong Nguyen Manh).-    + Add escapes to prevent inadvertent lists due to automatic wrapping-      (#10047). Also simplify existing code that was meant to do this.-    + Add parentheses around typst-native year-only citations (#11044).-    + Add native Typst support for `nocite` (#10680, Albert Krewinkel).-      The `nocite` metadata field can now be used to supply-      additional citations that don't appear in the text, just as with citeproc-      and LaTeX's bibtex and natbib.-    + Set `lang` attribute in Divs (#10965).-    + Rename `numbering` variable to `section-numbering` (Albert Krewinkel).-      This is the name expected by the default template.-    + Add support for custom and/or translated "Abstract" titles (Albert-      Krewinkel, #9724).--  * Org writer:--    + Don't wrap link descriptions (#9000). Org doesn't reliable display-      these as links if they have hard breaks.-    + Disable smart quotes by default (Albert Krewinkel).--  * Markdown writer:--    + Better handling of pandoc-generated code blocks (#10926).-      Omit the wrapper sourceCode divs added by pandoc around code blocks.-      More intelligently identify which class to use for the one class-      allowed in GFM code blocks.  If there is a class of form `language-X`,-      use `X`; otherwise use the first class other than `sourceCode`.-    + Use fenced divs even with empty attributes (#10955, Carlos Scheidegger).-      Previously fenced divs were not used in this case, causing the writer to-      fall back to raw HTML.-    + Match indents in definition items (#10890, Albert Krewinkel).-      Previously, the first line of a definition details item always used a-      colon and three spaces instead of respecting the tab-stop setting, which-      could lead to round-tripping issues. Likewise, the indentation of-      continuation paragraphs in definition lists now matches the-      two-characters leader of the first line for Markua output.--  * DocBook writer:--    + Use `startingnumber` instead of `override` for start numbers on ordered-      lists (#10912).--  * ANSI writer:--    + Make `--wrap=none` work properly (#10898).--  * Djot writer:--    + Fix duplicate attributes before section headings (#10984).--  * Docx writer:--    + Ensure that documents don't start with a section separator-      (#10578, Albert Krewinkel). Any leading section separator is removed from-      the result.--  * HTML writer:--    + Unwrap "wrapper" divs (#11014). Some of the readers (e.g. djot) add-      "wrapper" divs to hold attributes for elements that have no slot for-      attributes in the pandoc AST. The HTML reader now "unwraps"-      these wrappers so that the attributes go on the intended elements.--  * Asciidoc writer:--    + Handle lists with sublists following continuations (#11006).-      These require an additional blank line in some cases.--  * HTML styles template: prefix default styles with informative CSS comment-    (Albert Krewinkel, #8819).--  * Org template: add `#+options` lines if necessary (Albert Krewinkel).-    The default template now adds `#+options` lines if non-default settings-    are used for the `smart_quotes` and `special_strings` extensions.--  * LaTeX template:--    + Don't emit empty `linkcolor=` in hypersetup (#11098).-    + Add RTL support for LuaTeX engine (Reuben Thomas).--  * Typst template:--    + Add several new variables (Christopher T. Kenny, #9956):-      `thanks`, `abstract-title`, `linestretch`, `mathfont`, `codefont`,-      `linkcolor`, `filecolor`, `citecolor`.--  * `reference.docx`:--    + Don't left-align table header row (R. N. West, #11019).-    + Update East Asia font theme in `styles.xml` to `minorEastAsia` (TomBen).-    + Update language settings in `styles.xml` for East Asia to Simplified-      Chinese (TomBen).--  * Text.Pandoc.PDF:--    + `makePDF`: automatically embed resources from media bag in HTML-      before trying to convert it with weasyprint, etc. (#11099).-      This will give better results when converting from formats like docx.-    + Use `utf8ToText` for LaTeX log messages.-    + Make images from MediaBag available in tmp dir for every PDF engine,-      not just LaTeX/ConTeXt (#10911).-    + Improve error readability when pdf-engine is not supported (Albert-      Krewinkel). Each supported engine is now printed on a line of its own.-    + Allow `pdflatex-dev` and `lualatex-dev` as PDF engines (#10991, Albert-      Krewinkel). These are the development versions of the LaTeX binaries;-      installable, e.g., with `tlmgr install latex-base-dev`.-    + Clean up `makePDF` (Albert Krewinkel).-    + Avoid encoding errors when reading LaTeX logs (#10954).--  * Text.Pandoc.Readers:--    + Raise unknown reader error for `ods`, `odp`, `odf`, `xls`,-      `xslx`, `zip` extensions.--  * Text.Pandoc.App:--    + Recognize binary signatures and fail early (Repetitive). Fail early when-      receiving binary input with recognized signature: zip[-based], including-      OpenDocument and Microsoft formats, PDF, CFBF-based (old Microsoft formats-      including .doc and .xls), DjVu.-    + Remove code duplication around version info.-      Text.Pandoc.App.CommandLineOptions and `pandoc-cli/src/pandoc.hs`-      had similar code for generating version information.-      To avoid duplication, we now export `versionInfo` from-      Text.Pandoc.App [API change]. This function has three parameters that can-      be filled in when it is called by `pandoc-cli`.--  * Text.Pandoc.Parsing:--    + `tableWith` and `tableWith'` now return a list of lists of Blocks, rather-      than a list of Blocks, for the header rows, allowing for multiple header-      rows [API change] (#10338, TuongNM).--  * Text.Pandoc.Citeproc:--    + Don't move footnotes around em-dashes (#11046).-    + Allow `--citeproc` to put the bibliography in a Div with id `refs`-      even when `--file-scope` is used (#11072). When `--file-scope`-      is used, a prefix will be added based on the filename, so the Div-      will end up having an identifier like `myfile.md__refs`.-      Previously, this prevented the bibliography from being added to-      the marked Div. Now pandoc will add the bibliography to any Div-      with the id `refs` or any id ending in `__refs`.--  * Text.Pandoc.Citeproc.BibTeX: Protect case in periodical titles (#11048).-    Thus, for example, `{npj} Quantum Information` should translate as-    `[npj]{.nocase} Quantum Information`.--  * Text.Pandoc.ImageSize:--    + Detect more JPEG file signatures (R. N. West and John MacFarlane, #11049).-    + Unpack compressed object streams in PDFs and look inside for MediaBox-      information (#10902).-    + Add Point and Pica as constructors of ImageSize [API change] (#8957).-      This will prevent unnecessary conversion of units.-    + Add Avif constructor on ImageType [API change] and support avif images-      (#10979).--  * Text.Pandoc.Writers.Shared:--    + Amend docs of `lookupMeta...` functions (#10634, Albert Krewinkel).--  * Text.Pandoc.Options:--    + Add and export `defaultWebTeXURL` WebTeX URL [API change] (#11029,-      Sean Soon). This fixes the `webtex` option when used without-      parameter in a defaults file.-    + Add type `HighlightMethod` and patterns [API Change] (Albert Krewinkel).-    + The `writerListings` and `writerHighlightStyle` fields of the-      `WriterOptions` type are replaced with `writerHighlightMethod`-      [API change] (Albert Krewinkel, #10525).--  * Text.Pandoc.Extensions:--    + Remove `Ext_compact_definition_lists` constructor for-      `Extension` [API change].-    + Add `Ext_smart_quotes` and `Ext_special_strings` constructors.-      [API change].--  * Text.Pandoc.SelfContained:--    + Try fetching relative resources without query or fragment if the original-      fetch fails. This provides a fix for #1477 in a way that doesn't raise-      the problems mentioned in #11021.--  * Text.Pandoc.Highlighting:--    + Export `defaultStyle` [API Change] (Albert Krewinkel).-      This allows to be more explicit about using a default style, and-      providing a single point of truth for its value. The variable is-      an alias for `pygments`.--  * Text.Pandoc.Class:--    + `downloadOrRead`: do not drop fragment/hash for local file paths (#11021).-      With the previous behavior it was impossible to have an image-      file containing `#` or `?`.-    + Export function `runSilently` [API Change] (Albert Krewinkel).-      The function runs an action in the PandocMonad, but returns all log-      messages reported by that action instead of adding them to the main log.-    + Make CommonState opaque. Text.Pandoc.Class now exports CommonState as-      an opaque object, without its fields. [API change]-      The internal module Text.Pandoc.Class.CommonState still exports-      the fields.-    + Text.Pandoc.Class now exports the following new functions:-      `getRequestHeaders`, `setRequestHeaders`, `getSourceURL`,-      `getTrace`. [API change]-    + CommonState now has a `stManager` field. This allows us to cache the HTTP-      client manager and reuse it for many requests, instead of creating it again-      (an expensive operation) for each request. This fixes a memory leak and-      performance issue in files with a large number of remote images (#10997).--  * Lua subsystem (Albert Krewinkel):--    + Add function `pandoc.structure.unique_identifier`.-    + Add functions `pandoc.text.superscript` and `subscript`.-    + Use proper interface functions to access the CommonState.-      The `PANDOC_STATE` is no longer a userdata object, but a table that-      behaves like the old object. Log messages in `PANDOC_STATE.log` are now-      in temporal order.-    + Add function `pandoc.path.exists`.-    + Add `normalize` function to *Pandoc* objects (#10356).-      This function performs a normalization of Pandoc documents. E.g.,-      multiple successive spaces are collapsed, and tables are normalized such-      that all rows and columns contain the same number of cells.-    + Add more UTF-8-aware file operations to `pandoc.system`.-      Functions that expect UTF-8-encoded filenames should make it easier to-      write platform-independent scripts, as the encoding of the actual-      filename depends on the system. In addition, there is a new-      generalized method to run commands, and functions to retrieve XDG-      directory names. The new functions are `command`, `copy`, `read_file`,-      `remove`, `rename`, `times`, `write_file`, `xdg`.-    + Allow hslua-2.4.-    + Require lua-module-system 1.2.3. This provides List methods to the value-      returned by `pandoc.system.list_directory` (#11032).--  * MANUAL.txt:--    + Fix broken ConTeXt links (R. N. West, #11055).-    + Add `xml` as input/output format.-    + Fix minor capitalization typo (#11052, Albert Krewinkel).--  * `doc/lua-filters`:--    + Fix docs for `pandoc.Cite` (Albert Krewinkel).-    + Don't encourage returning tables of filters from Lua filters-      (R. N. West, #10995). Use the `Pandoc:walk` method instead.--  * doc/extras.md: Fix link to pandoc-mode (Erik Post).--  * doc/lua-filters.md: Add example on using pandoc.Table constructor (#10956,-    Sean Soon).--  * Update `default.csl` from new chicago-author-date.csl, which is now-    for the 18th edition.--  * Use latest releases of citeproc, typst-hs, texmath, doclayout,-    skylighting-core, skylighting.--## pandoc 3.7.0.2 (2025-05-28)--  * RST writer:--    + Don't emit alignment markers in grid tables (#10857).--  * Asciidoc writer:--    + Add support for sidebars (GHyman83).--  * LaTeX writer:--    + Include alt option in `\includegraphics` (#6095).--  * Markdown writer:--    + Preserve figure attributes (Nikolay Yakimov, #10867).-      Fixes a regression introduced by 0d2114e, which caused the-      Markdown writer to ignore attributes on the figure if it-      has class or key-value attributes set.--  * HTML writer:--    + Use the ID prefix in the ID for the footnotes section (Benjamin Esham).--  * Text.Pandoc.Writers.Shared:--    + `gridTable`: fix (3.7) regression with missing cell alignments (#10853).-    + `gridTable`: fix headings with colspans (#10855). If the heading-      contains a colspan, we still need to include information in the header-      line about the colspecs.-    + `gridTable`: fix headerless tables. The top line should encode-      colspan information.--  * Text.Pandoc.SelfContained:--    + Fix handling of empty script element (#10862). Previously in this-      case the closing tag was dropped.-    + Do not drop `data-` attributes in script tags (#10861).--  * Lua subsystem (Albert Krewinkel):--    + Add function `pandoc.mediabag.make_data_uri` (#10876).-      The function takes a MIME type and raw data from which it creates an-      RFC 2397 data URI.--  * `tools/update-lua-module-docs`: fix handling of wikilinks-    (Albert Krewinkel).--  * `doc/lua-filters.md`: add missing docs for `pandoc.Caption`-    (Albert Krewinkel).--  * Require texmath 0.12.10.3, typst 0.8.0.1--## pandoc 3.7.0.1 (2025-05-17)--  * Text.Pandoc.Shared.Writer:  Fix numerous problems with `gridTable` and add-    tests (#10848).  These fixes affect the Markdown, RST, and Muse writers.--  * Fix context writer/template to produce tagged PDFs (#10846).-    As before, the `tagging` extension must be enabled.-    We now add the command that tells ConTeXt to start tagging.--## pandoc 3.7 (2025-05-14)--  * Add new command-line option `--variable-json` (#10341).-    This allows non-string values (booleans, lists, maps) to be given to-    template variables on the command line.--  * The `--pdf-engine` option can now take `groff` as a value.--  * Markdown writer:--    + Avoid spaces after/before open/close delimiters (#10696).-      E.g. instead of rendering `x<em> space </em>y` as `x* space *y` we render-      it as `x *space* y`.-    + Handle row/colspans in grid tables, and expand cells when it isn't-      possible to lay them out without breaking string of non-whitespace.-    + Render a figure with Para caption as implicit figure (#10755).-    + When falling back to a Div with class `figure` for a figure that-      can't be represented any other way, include a Div with class-      `caption` containing the caption.-    + Improve use of implicit figures when possible (#10758).-      When the alt differs from the caption, but only as regards formatting, we-      still use an implicit figure.-    + Omit initial newlines in gfm `math` blocks to avoid an ugly blank line.-    * Support the `four_space_rule` extension for `plain` output (#10813,-      Manolis Stamatogiannakis).--  * RST writer:--    + Handle row/colspans in grid tables, and expand cells when it isn't-      possible to lay them out without breaking string of non-whitespace.--  * Muse writer:--    + Handle row/colspans in grid tables, and expand cells when it isn't-      possible to lay them out without breaking string of non-whitespace.--  * JATS writer:--    + Fix escaping for writing-review-editing role (#10744).--  * HTML writer:--    + Remove trailing slash from default revealjs URL (#8749). This-      avoids a double slash in the URL's path component.--  * LaTeX writer:--    + Make alignment work within `multirow` in tables (#10772).--  * Typst writer:--    + Support `mark` class on spans (#10747).-    + Add equation label if math contains `\label{..}` (#10805).--  * Roff format writers (man, ms):--    + Use the most compatible form for roff escapes (#10716).-      For example, `\(xy` instead of `\[xy]`. This was the original-      AT&T troff form and is the most widely supported. The-      bracketed form causes problem for some tools, e.g.-      `makewhatis` on macOS. And emit `e` followed by an escape-      for a unicode combining accent rather than the form `\[e aa]`,-      which works for groff but not e.g. on macOS's man.-      This change affects Text.Pandoc.RoffChar,-      Text.Pandoc.Writers.Roff, and the Man and Ms writers.--  * Docx writer:--    + Ensure that figures and tables with custom styles are not dropped-      (#10705).-    + Preserve Relationships for images from reference docx (#10759).-      This should allow one to include an image in a reference.docx and-      reference it in an openxml template.-    + Don't renumber rels (#10769). We used to renumber the-      Relationships so they didn't conflict with the set of fixed-      Relationships we imposed. We are now preserving the ids-      from the reference doc's document.xml.refs, so we shouldn't-      renumber them or references introduced by the user (e.g. in-      a template) will fail.--  * Ms writer:--    + Improve PDF TOC labels. We now use the plain writer to render these,-      so that Greek characters etc. will show up properly.-    + When no `pdf-engine` variable is specified, do not use the-      `.pdfhref` macros at all (#10738). This gives better results for links-      in formats other than PDF, since the link text would simply-      disappear if it exists only in a `.pdfhref` macro. When a PDF-      engine is specified, escape the argument of `.pdfhref O` in a way-      that is appropriate.--  * OpenDocument writer:--    + Fix character styles in footnotes (#10791). Character-      styles governing the position of the footnote reference-      should not be imposed on the footnote text.--  * Powerpoint writer:--    + Use reference-doc font for captions (#9896, R. N. West).--  * DocBook writer:--    + Use literallayout element for LineBlock (#10825).--  * MediaWiki reader/writer:--    + Allow definition on same line as term (#10708).--  * LaTeX reader:--    + Skip at most one argument to LaTeX tabular newline (#7512,-      Evan Silberman).-    + Disable ligatures inside `\texttt` (#10781).-    + Support more symbol commands (#10782).--  * Commonmark Reader:--    + Handle GFM math irregularity with braces (#10631). In GFM, you need-      to use `\\{` rather than `\{` for a literal brace.--  * DocBook reader:--    + Improve handling of literallayout (#10825). This is now only made-      a CodeBlock when there is a `monospaced` class. Otherwise it is made-      a LineBlock.--  * Org reader:--    + Add AVIF to Org Reader image extensions (#10736, Christian Christiansen).-    + Don't include newlines in inine code/verbatim (#10730).-      Convert newlines to spaces as we do in other formats.-    + Change handling of inline TeX (#10836). Previously inline-      TeX was handled in a way that was different from org's own export,-      and that could lead to information loss. This was particularly noticeable-      for inline math environments such as `equation`.  Previously, an-      `equation` environment starting at the beginning of a line would create-      a raw block, splitting up the paragraph containing it (see-      #10836). On the other hand, an `equation` environment not-      at the beginning of a line would be turned into regular-      inline elements representing the math. (This would cause-      the equation number to go missing and in some cases degrade-      the math formatting.) Now, we parse all of these as raw-      "latex" inlines, which will be omitted when converting to-      formats other than LaTeX (and other formats like pandoc's-      Markdown that allow raw LaTex).--  * Beamer template: fix regression in 3.6.4, reverting the omission of-    `\date` when the document does not have a date. By default, beamer-    will display a date when no `\date` is present in the title block,-    so this was an unintended behavior change. The reverted-    change was motivated by the desire to include a custom-    `\date` in the frontmatter via header-includes. This can be-    achieved more simply by simply setting the `date` variable.-    In markdown you can even use `date` in metadata and put some-    raw LaTeX there.--  * Ms template:--    + Use T rather than P as default font family (#10738).-    + Put PDF-specific things under a conditional.-      Don't include them if `pdf-engine` isn't set.--  * Upgrade reveal.js URL to v5 (#10740, Kolen Cheung).-    v4 is no longer available on unpkg.com.--  * Text.Pandoc.PDF: Allow `groff` to be used as `--pdf-engine` with `ms`-    (#10738). When `groff` is used as a PDF engine, the `groff`-    extension to `ms` is automatically enabled. Limitations:--    - `groff` currently produces larger PDFs than `pdfroff`.-    - With `groff`, a table of contents produced with-      `--table-of-contents/--toc` will always be placed at the end of-      the document.-    - Certain characters (e.g. Greek characters) may be dropped in-      the PDF outline.--  * Text.Pandoc.Writers.Shared:--    + Export `delimited` [API change].-    + New version of `gridTable` (#6344) [API change]. This-      handles row and colspans. It also ensures that cells won't-      wrap text in places where it wouldn't normally wrap, even-      if this means making the cells wider than requested by the-      colspec (#9001, #7641). Because the parameters are-      different, this is a breaking API change.--  * Text.Pandoc.App: set `pdf-engine` variable.-    If `--pdf-engine` is specified or if a PDF is being produced, we set the-    `pdf-engine` variable. This allows writers and templates to behave-    differently depending on the PDF engine.--  * Text.Pandoc.Class and Text.Pandoc.URI:--    + Fix parsing of base64 data URIs to allow URI escapes and-      whitespace (which will be ignored) (#10704).-    + Handle percent encoding in `pBase64URI` instead of-      unescaping later, for efficiency (#10704).--  * Text.Pandoc.Citeproc.BibTeX:--    + Recognize `en` as a `langid` in biblatex bibliographies (#10764).--  * Text.Pandoc.MIME:--    + Add mime type and extension for `avif` (#10704).-    + Handle `apng`, `avif`, `jxl` (#10704).--  * Text.Pandoc.Readers.LaTeX.Math: export `inlineEnvironmentNames`.-    Internal module, not a change to the public API.--  * `reference.docx` (Andrew Dunning):--    + Remove extra spaces around text placeholders.-    + Add footnote block text sample.--  * Text.Pandoc.Class.Sandbox:--    + Add `sandboxWithFileTree` function [API change] (Albert Krewinkel).--  * Lua subsystem (Albert Krewinkel):--    + pandoc-lua-engine: add all test files to the cabal file.-    + Allow `pandoc.read` to be called in "sandbox" mode for added-      security (#10831). Readers running in a sandbox will not be-      able to access the network or file system. The sandbox is-      enabled if the fourth parameter is a list of files or-      filename/content pairs. The files are read and then made-      available in the sandbox via en ersatz file system.--  * Makefile:--    + Add target `release-checkist`.-    + Install @daisy/ace from npm if not present.-    + Use pandoc lua instead of lua.-    + Fix typo in `latex-package-dependencies` target.-    + Use `jq` instead of `json_reformat` in `validate-docx-golden-tests2`.--  * NiX infrastructure: new working `flake.nix` and simpler `shell.nix`.-    Removed old `default.nix`.--  * Require random >= 1.3 and use `splitGen`. `split` has been deprecated.--  * Use citeproc-0.9. Bump citeproc bounds for pandoc, pandoc-lua-engine.--  * Use texmath-0.12.10.1.--  * Use released typst 0.8 (partially supporting typst 0.13).--  * Use citeproc 0.9.0.1.--  * MANUAL.txt:--    + Fix default URL for revealjs.-    + Add note that `alerts` extension only works with commonmark (#9716).-    + Remove "Body Text Char" from list of Word styles that can be customized-      using a reference.docx (#10646). This doesn't seem to be present in-      pandoc-generated docx files, nor is it a Word default.-    + For pandoc lua, add note about the environment.-    + Improve documentation of `--variable` option.--  * `doc/typst-property-output.md`: Mention that `typst:no-figure` is a-    class, not an attribute (#10826, Niklas Eicker).--  * Change RELEASE-CHECKLIST to RELEASE-CHECKLIST-TEMPLATE.org. Use org-babel-    to automate many of the steps of the release.--  * INSTALL.md: update MacPorts information (#10719, Mohamed Akram).--  * COPYRIGHT: fix link to source code.--  * CONTRIBUTING.md: Fix link to discussion forum. (#10834, R. N. West).--## 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).-    Previously wikilinks were distinguished by giving them the `title`-    `wikilink`.  Now that we have link attributes, it makes more sense-    to give them the `class` `wikilink`. This change affects all readers-    and writers that support wikilinks.--  * DocBook reader:--    + Handle title inside `orderedlist` (#10594). Also some other-      elements that allow title: `blockquote`, `calloutlist`, etc.-    + Better handle `informalequation` (#10592, tombolano). Include `id`-      attribute.-    + Better handle `formalpara`, `example`, and `sidebar` (#8666, tombolano).-      Include identifiers and titles in each case.--  * Markdown reader:--    + Simplify and fix normal citation parsing (#10584).-      This fixes a bug that causes some normal citations to be-      parsed as bracketed regular citations.--  * ODT reader:--    + Create Figure elements for images that are figures (#10567).-    + Avoid producing spurious blockquotes in list items (#9505).-    + Fix unwanted block quotes (#10575). Previously the reader created-      block quotes whenever a paragraph was marked indented (even though-      this just affects the first line). With this change we still-      generate block quotes for content that has an altered left margin,-      but not for indented paragraphs.--  * Docx reader:--    + Do not issue warning for comments with `+styles` (#10571, Stephen Reindl).--  * LaTeX reader:--    + Test \{,re}newcommand arguments (#4470, Evan Silberman).--  * Pod reader:--    + Consume blanks after =encoding in pod reader (#10537, Evan Silberman).--  * JATS writer:--    + Add CRediT roles to JATS (Charles Tapley Hoyt and Jez Cope, #10152).-      Enable annotating author roles using the Contribution Role Taxonomy-      (CRediT) and export this information in conformant JATS.--  * LaTeX writer/templates:--    + Improve babel support (#8283). Previously we used the `.ini`-      files for every language, but for European languages these tend to-      provide inferior results to the `.ldf` files used by classic-      Babel. Currently Babel documentation recommends using the classic-      system for European languages written in Latin and Cyrillic-      scripts and Vietnamese. So the LaTeX writer and template now-      follow this guidance.--      Main languages in the list of languages with good "classic" support-      are added to global documentclass options and will be automatically-      handled by Babel using the `.ldf` files.--      If the main language is not in this list, the `babeloptions` variable-      will be set to `provide=*`, which will cause support to be loaded from-      the `.ini` file rather than an `.ldf`. So, for example, setting-      `-V babeloptions=''` with a polytonic Greek document will cause the-      `.ldf` support to be used instead of the `.ini`.--      The default setting of this variable can be overwritten, but in most-      cases the default should give good results.--    + Allow `csquotesoptions` to be specified.-    + Fix indentation bugs in `font-settings.latex`.--  * Docx writer:--    + Repeat reference doc's `sectPr` for each new section (#10577).-      Previously we were only carrying over the reference doc's `sectPr`-      at the end of the document, so it wouldn't affect the intermediate-      sections that are now added if `--top-level-division` is `chapter`-      or `part`. This could lead to bad results (e.g. page numbering-      starting only on the last chapter).-    + Create section divisions with `--top-level-division=part` (#10576).-    + Improve title style in reference.docx; base Author and Date-      on Title; remove condensed spacing (Andrew Dunning, #10581).--  * Typst writer:--    + Brace tables with `typst:no-figure` and `typst:text` attributes (#10563,-      Gordon Woodhull).--  * Ms writer:--    + Fix escaping of `-` (#10536). `-` should now be escaped in man-      output but not in ms output (where `\-` is a unicode minus sign).--  * HTML styles: fix style of `hr` so it works when printed (#10535, Hendrik Erz).-    Previously `background-color` was used to style the hr, but this gets ignored-    when printing.  This commit uses `border-top` instead.--  * Text.Pandoc.Shared:--    + Handle `<abbr>` as a span-like inline in `htmlSpanLikeElements`-      (#5793, Evan Silberman).--  * Text.Pandoc.MediaBag:--    + Prefer MIME type when determining extensions for MediaBag items (#10557,-      Max Heller).  This should give different results for remote images-      that are served at URLs that do not contain misleading extensions-      (e.g. `shields.io`).--  * Text.Pandoc.Citeproc:--    + Fix moving punctuation before citation notes. This previously worked with-      regular citations, but not author-in-text citations. Now it works with both.--  * `doc/lua-filters.md`:--    + Correct luacheck URL (#10589, R. N. West).-    + Add static analysis paragraph to debugging section (#10568, R. N. West).-    + Add note about extensions handling in `read` and `write` (Albert Krewinkel).--  * `doc/extras.md`:--    + Add entry for pandoc-subfigs (R. N. West).-    + Update diagram Lua filter URL and description (R. N. West).--  * MANUAL.txt:--    + Add note on using typst to produce pdf/a-2b.-    + Document top-level-division functionality with Docx (#10579, Andrew Dunning).--  * Raise xml-conduit upper bound.--  * Depend on latest commonmark-pandoc, commonmark-extensions,-    citeproc, typst.--  * Makefile: make `make binpath` quiet.--## pandoc 3.6.2 (2025-01-12)--  * New input format: `pod` (Evan Silberman). Pod ("Plain old documentation")-    is a markup languaged used principally to document Perl modules and-    programs.--  * New reader module Text.Pandoc.Readers.Pod, exporting `readPod`-    [API change].--  * Docx reader:--    + Support row heads in tables (#9495). Reader: When `w:tblLook` has-      `w:firstColumn` set (or an equivalent bit mask), we set row heads = 1-      in the AST.-    + Read table styles as custom styles when `styles` extension-      is enabled (#9603).--  * HTML reader:--    + Add size information for font awesome SVG icons (#10134).-      If the icon has class `fa-fw` or `fa-w16` or `fa-w14`, we add a width-      attribute to prevent the icon from appearing full-width in PDF or-      docx output.--  * Djot reader:--    + Use a Span with class "mark" rather than "highlighted" for-      highlighted text, for consistency with the other pandoc readers and-      writers.--  * mandoc reader:--    + Add mdoc St for C23 (Evan Silberman).--  * RST reader:--    + Fix handling of underscores (#10497). Fixes a a regression-      introduced in 3.6.--  * Docx writer:--    + Support row heads in tables (#9495). Writer: set `w:firstColumn` in-      `w:tblLook` when there are row heads. (Word only allows one, so this-      is triggered by any number of row heads > 0.)--  * Djot writer:--    + Render a Span with sole class "mark" as highlighted text.--  * Asciidoc writer:--    + Don't emit the class in a span if it's just "mark" (#10511).-      The "mark" class is used for highlighting, and Asciidoc treats-      bare `#...#` with no attributes as highlighted text.-    + Improve escaping (#10385, #2337, #6424).--  * EPUB v2 writer:--    + Fix cover image (#10505).  This is a regression introduced in 3.6.--  * Typst writer:--    + Fix handling of pixel image dimensions (#9945).-      These are now converted to inches as in the LaTeX writer.--  * Improve error message given when users specify `asciidoc` as input-    format (#8416, Santiago Zarate).--  * Allow random 1.3.--  * Use texmath 0.12.8.13 (typst improvements).--  * `lua-filters.md`: document `system.os` return values (#10523).--  * `MANUAL.txt`:--    + Improve manual's coverage of custom styles.-    + Replace LibreOffice PDF documentation link to latest so it links-      to the latest major release rather than a specific major release-      (which there are two of every year) (Stéphane Guillou).-    + Improve links and descriptions for `odt`, `opendocument` (#10518).--## pandoc 3.6.1 (2024-12-23)--  * Allow YAML bibliographies to be arrays of references (#10452).-    Previously, they had to be YAML objects with a `references` key.--  * Change `--template` to allow use of extensionless templates (#5270).-    The intent is to allow bash process substitution: e.g.,-    `--template <(echo "foo")`. Previously pandoc *always* added an-    extension based on the output format, which caused problems-    with the absolute filenames used by bash process substitution-    (e.g. `/dev/fd/11`). Now, if the template has no extension,-    pandoc will first try to find it without the extension, and-    then add the extension if it can't be found. So, in general,-    extensionless templates can now be used. But this has been-    implemented in a way that should not cause problems for-    existing uses, unless you are using a template `NAME.FORMAT`-    but happen to have an extensionless file `NAME` in the template-    search path.--  * Allow `--shift-heading-level-by=-1` to work in djot in the same way-    it works for other formats (with the top-level heading being-    promoted to metadata title) (#10459).  This needed special-    treatment because of the way djot surrounds sections with Divs.--  * RST reader:--    + Handle explicit reference links (#10484, Evan Silberman).-      This case was missed when changing the reference link strategy for-      RST to allow a single pass. (It is a regression in pandoc 3.6.)--  * Markdown reader:--    + Use T.P.URI's `pBase64DataURI` in parsing data URIs (#10075,-      Evan Silberman and John MacFarlane).-    + More efficient base64 data URI parsing (#10075, Evan-      Silberman and John MacFarlane). This should yield dramatic-      performance improvements for markdown documents containing-      large data URIs in images.--  * HTML reader:--    + Don't canonicalize data: URIs (#10075). It can be very expensive-      to call network-uri's URI parser on these.--  * LaTeX reader:--    + Handle `figure*` environment as a figure (#10472).--  * MediaWiki reader:--    + Allow empty quoted attributes (#10490).-    + Allow cells starting with `+` (#10491).--  * Textile reader:--    + Improve parsing of spans (#9878). The span needs to be separated-      from its surroundings by spaces. Also, a span can have attributes,-      which we now attach.-    + Inline constructors shouldn't trigger if closer is preceded by-      whitespace (#10414).--  * Docx writer:--    + Put chapters in separate sections, and restart footnotes-      by section by default (#2773). The main effect of this change is that-      when `--top-level-division=chapter` is used, chapters will start on-      a new page and footnote numbering will restart for each chapter.-      Both of these defaults can be overridden in the reference.docx.-    + Use styleIds not styleNames for Title, Subtitle, etc.-      (#10282). This fixes a regression introduced in pandoc 3.5.-      This change affects the default openxml template as well as the-      OpenXML writer.--  * Markdown writer:--    + Avoid collapsing of initial/final newline in markdown raw blocks.-      This makes it easy to write a filter that adds extra blank lines-      before certain elements (#10477).--  * Mediawiki writer:--    + Escape line-initial characters that would otherwise be interpreted-      as list starts (#9700).--  * LaTeX writer:--    + Properly handle boolean value for `csquotes` variable (#10403).-    + Use displayquote for block quotes with `csquotes` (#10456).--  * HTML writer:--    + Avoid calling parseURIString for data URIs (#10075).-      This was done to determine the "media category," but we can-      get that directly from the mime component of data: URIs.--  * Typst writer:--    + Properly handle data URIs in images (#10460).--  * LaTeX/Beamer templates:--    + Fix default.beamer `nocite` location (Thomas Hodgson).-      It must be inside a frame or it is ignored (#10465).-    + Move nocites from LaTeX preamble to body (#10461, Thomas-      Hodgson). Putting `\nocite` in the preamble works only with biblatex.--  * Text.Pandoc.Parsing:--    + Correct example in comment on `charsInBalanced` (Evan Silberman).--  * Text.Pandoc.Error:--    + Mention typst in rendering `PandocUnknownWriterError` for `pdf`-      (Evan Silberman).--  * Text.Pandoc.MediaBag:--    + `insertMedia`: fast path for data URIs. Avoid the slow URI-      parser from network-uri on large data URIs (#10075).--  * Text.Pandoc.Class:--    + Add shortcut for base64 data URIs in `downloadOrRead` (#10075).-      This avoids calling the slow URI parser from network-uri on-      data URIs, instead calling our own parser.--  * Text.Pandoc.MIME:--    + Fix `extensionFromMimeType`. We had a few special cases encoded,-      but as previously written they wouldn't work properly with-      modifiers like `;charset=utf-8`.--  * Text.Pandoc.URI:--    + Export `pBase64DataURI`.  Modify `isURI` to use this and avoid-      calling network-uri's inefficient `parseURI` for data URIs.--  * Text.Pandoc.PDF:--    + Fix temp file extension in `toPdfViaTempFile` (#10468).-      This fixes a regression in pandoc 3.6, which changed-      the extension from `html` to `source`. Apparently-      `wkhtmltopdf` needs it to be `.html`.  So now we have added-      a parameter to `toPdfViaTempFile` that allows the extension-      to be specified in a way that is appropriate to the PDF engine-      used.--  * Lua (Albert Krewinkel):--    + Support more elements as input to `pandoc.utils.stringify`-      (#10450). Elements of type Caption, Cell, TableHead, and TableFoot-      can now be stringified.-    + Add `Caption` constructor to `pandoc` module.--  * Miscellaneous code quality improvements (Joseph C. Sible).--  * Depend on citeproc 0.8.1.2, skylighting and skylighting-core-    0.14.5.--  * `doc/lua-filters.md: Fix links to constructors (Albert Krewinkel).---## pandoc 3.6 (2024-12-07)--  * Add `mdoc` as input format (Evan Silberman). This change-    introduces a reader for mdoc, a roff-derived semantic markup-    language for manual pages. This reader has been developed almost-    exclusively against mandoc's documentation and implementation of-    mdoc as a reference, and the real-world manual pages tested-    against are those from the OpenBSD base system. Of ~3500 manuals-    in mdoc format shipped with a fresh OpenBSD install, 17 cause the-    mdoc reader to exit with a parse error. Any further chasing of-    edge cases is deferred to future work.--  * New module: Text.Pandoc.Readers.Mdoc, exporting `readMdoc` [API change].--  * Issue warnings for duplicate YAML metadata keys (#10312).--  * Ensure that `--sandbox` affects `--embed-resources`. Previously it-    did not (contrary to what was implied by the manual), which means-    that an image with URL `/etc/passwd` would leak an encoded version-    of that file to HTML output with `--self-contained` or-    `--embed-resources`, even if `--sandbox` was used. Thanks to-    Samuel Mortenson for pointing out the issue.--  * Text.Pandoc.App.OutputSettings: add `sandbox'` function.-    This computes the sandboxed files from Opt and avoids code repetition.--  * Docx reader:--    + Parse index references as empty spans with attributes (#10171).-      Attributes included are `entry`, and optionally `bold`, `italic`,-      `yomi`, `see`.-    + Don't create multiple paragraphs for title or subtitle (#10359).-      If there are multiple paragraphs with Title or Subtitle style,-      use only the first for metadata.-    + Handle case where Zotero `itemData` has different id from the-      `citationItem` id.  In this case we use the `citationItemId`-      in the bibliography as well, overriding the `referenceId`-      in the itemData (#10366).--  * LaTeX reader:--    + Put parsed minipage in specially marked Div (#10266).--  * HTML reader:--    + Parse footnotes defined by dpub-aria roles (#5294).--  * MediaWiki reader:--    + Fix indented tables with caption (#10390).-    + Fix parsing of col/rowspan (#6992).--  * Typst reader:--    + Avoid generating empty paragraphs.-    + Support `underparen`, `overparen`.-    + Fix `#quote` attribution. If attribution is not present, don't print-      the `--` (#10320).-    + Fix typo in unicode code point for em dash (see #10320).--  * Commonmark reader:--    + `implicit_figures` should check for empty caption-      and not produce an implicit figure in this case (#10429).--  * RST reader:--    + Use a new one-pass parsing strategy. Instead of having an initial pass-      where we collect reference definitions, we create links with target-      `##SUBST##something` or `##REF##something` or `##NOTE##something`,-      and resolve these in a pass over the parsed AST. This allows us to handle-      link references that are not at the top level (#10281).-    + Ignore newlines in URL in explicit link (#10279).-    + Handle block level substitutions.-    + Support `:file:` on raw directive (#8584).-    + Implement option lists (#10318).-    + Avoid putting metadata in Para (#7766). Create MetaInlines when possible,-      just as with markdown input. MetaBlocks is still used when there are-      multiple paragraphs or non-paragraph content.-      This change also affects field lists.-    + Fix linked substitutions (#6588). E.g. `|Python|_`.-    + Support inline anchors (#9196).-    + Explicit links define references (#5081). For example,-      ``Go to `g`_ `g <www.example.com>`_.`` should produce two links to-      www.example.com.--  * EPUB writer:--    + Use standardized filename for cover image instead of the original name-      (#10404). This avoids problems with e.g. filenames containing spaces.--  * Markdown writer:--    + Issue INFO warning when not rendering table, e.g., when `raw_html` is-      disabled and the table can't be fit into a supported markdown table-      format (#10407).-    + Respect empty LineBlock lines in `plain` output (Evan Silberman).-      The plain writer behaved as a markdown variant with `Ext_line_blocks`-      turned off, and so empty lines in a line block would get eliminated.--  * LaTeX writer:--    Ensure that beamer footnotes go on frame, not column (#5769).--  * HTML writer:--    + Unwrap empty incremental divs (#10328, Albert Krewinkel).-      Divs are unwrapped if the only purpose of the div seems to be to control-      whether lists are presented incrementally on slides.--  * Typst writer:--    + Make template sensitive to a `page-numbering` variable (#10370).-      This can be set to an empty string (or, in metadata, to false) for-      no page numbers.-    + Make `smart` extension work (#10271). If `smart` is not enabled, a command-      in the default template will disable smartquote substitutions.-      When `smart` is enabled, render curly apostrophes as straight-      and escape straight apostrophes. When `smart` is disabled,-      render curly apostrophes as curly and don't escape straight-      apostrophes. Similarly for quotes, em and en dashes. This should-      give more idiomatic typst output, with fewer unnecessary-      escapes.--  * ANSI writer:--    + Respect empty LineBlock lines (Evan Silberman).--  * JATS writer:--    + Correct spelling of suppress attribute (#10350, Andreas Deininger).--  * Typst template:--    + Remove `definitions.typst` partial.-    + Remove unnecessary definition of `endnote`.-    + Incorporate the one remaining definition into `default.typst`.-    + Use typst 0.12 code for two column layout (#10294, Luis Rivera).-    + Note: the new templates presuppose typst 0.12; if you try to use an-      earlier version of typst, an error will be raised.--  * LaTeX/Beamer template:--    + Split `fonts.latex` partial into two parts: `fonts.latex` and-      `font-settings.latex`.-    + In beamer template, load beamer theme between `fonts.latex` and-      `font-settings.latex`. This allows a theme (such as metropolis)-      to set its own default font, while still allowing the user to-      override it. This fixes a regression in pandoc 3.5 (#10297).-    + Note: Users who have custom templates based on pandoc 3.5 templates will-      need to add `font-settings.latex()` after `fonts.latex()` in the-      latex template. In a beamer template, the beamer theme-setting-      code needs to be moved between these two partials.--  * ConTeXt template: Ensure that font names don't wrap (#10305).--  * `epub.css`: remove background-color (#10264, Suraj Patil).-    With this greyish background color, epubs look bad on a Kindle (#10263).--  * Text.Pandoc.ImageSize: add WebP support (Evan Silberman, #10397).-    Add `Webp` constructor on ImageType [API change].--  * Text.Pandoc.Readers.Roff and a new unexported module-    Text.Pandoc.Readers.Roff.Escape: parameterize Roff-    escaping (Evan Silberman) [API change]. This allows code to-    be reused between the mdoc and man readers, despite the-    differing Token types.--  * Text.Pandoc.PDF:--    + PDF via LaTeX: always do max runs if `toc` is present (#10308).-      The old method (checking to see if toc hash had changed) is not-      completely reliable.-    + Use `.source` extension, not `.html`, in `toPdfViaTempFile` (#10314).--  * Text.Pandoc.Logging: add `YamlWarning` constructor to `LogMessage`-    [API change] (#10312).--  * Text.Pandoc.Format: remove duplicate typst entry (#10388, Caleb Mclennan).--  * Fix a typo in the `ua.yaml` localization for 'See' (Jens).--  * Lua subsystem (Albert Krewinkel):--    + Remove prefixes from Lua type names (#8574). Lua type names were-      inconsistent with regard to the use of prefixes; all prefixes-      are removed now, and Lua types now have the same name as the-      Haskell types. The use of app-specific prefixes is suggested by-      the Lua manual to avoid collisions. However, this shouldn't be a-      problem with pandoc, as it cannot be used as a Lua package.--  * doc/libraries.md: Add newly developed Haskell packages.-    Sort list alphabetically (Albert Krewinkel).--  * doc/lua-filters.md: document `pandoc.List:iter` method (Albert Krewinkel).-    List objects have a new function `iter` that returns an iterator-    function that returns the next list item on each call.--  * MANUAL.txt:--    + Clarify what the example of YAML EPUB metadata shows (#10405).-    + Fix typo in template syntax (#10265, Pascal Wagler).-    + Update manual with information on openxml template (#10273).-    + Clarify that `--variable` can only assign string values (#10298).--  * Fix comments in TEI writer referring to DocBook (#10430, Evan Silberman).--  * Fix several typos in documentation (#10349, Andreas Deininger).--  * Allow Diff 1.0.--  * Add font-settings.latex partial to pandoc.cabal (#10379).--  * Bump upper bound for data-default.--  * Use latest typst, texmath, pandoc-lua-marshal, commonmark-pandoc,-    commonmark-extensions, skylighting, skylighting-format-blaze-html.---## pandoc 3.5 (2024-10-04)--  * Add command-line options `--list-of-figures/--lof` and-    `--list-of-tables/--lot` (#10029, Akash Patel).-    Only docx, latex, and context are affected by these options currently.-    Setting the `lof` and `lot` variables will also work for the formats-    that are currently supported.--  * Defaults files:  interpolation of environment variables now-    works for `to` and `from` fields (#8024). This is needed because-    these files can contain paths of custom readers/writers.--  * Docx reader:--    + Reset lists after headers in same list `numId` (#10258).-      To accomplish this, we add a Heading constructor to BodyPart and-      include on it all the information list items have.--  * DocBook reader:--    + Parse id, class, and tabstyle on tables (#10181, Erik Rask).-      Add parsing of id (xml:id), class, and tabstyle XML attributes-      for table and informaltable in the DocBook reader.-      The tabstyle value is put in the 'custom-style' attribute.--  * Dokuwiki reader:--    + Be more forgiving about misaligned lists, like dokuwiki itself (#8863).-    + Improve blockquote parsing in dokuwiki. Allow for quoted code blocks.-    + Enable smart extension.-    + Properly parse `--` and `---` as dashes.-    + Fix block quote behavior (#6461). Blockquotes are not really block-      containers in DokuWiki; the lines are interpreted literally (so,-      e.g., you can't start a list), and line breaks are added at the ends.--  * EPUB reader:--    + Fix links to other files in the EPUB, making them internal links-      to a fragment derived from the filename (#10207).  There was-      already code to handle links like `#foo`, but not to handle links-      like `ch0001.html#foo`.--  * LaTeX reader:--    + Add em, ex, px, mu to list of units for dimension args (#10212).--  * ANSI writer:--    + Fix subscripts (Evan Silberman).--  * DokuWiki writer:--    + Don't emit `<HTML>` tags (#7413). The use of these tags is now-      strongly discouraged for security reasons, and will be removed.-      We previously used them as a fallback for lists that could not-      be represented using DokuWiki syntax, e.g. ordered lists with-      fancy numbers or lists with multiple blocks in their items.-      We also used them for block quotes with multiple blocks as-      their contents. We now use the `<WRAP>` syntax (from the optional-      WRAP plugin) to handle lists with multiple blocks as their contents.-      A new method of handling block quotes with complex contents-      has the side benefit of also handling nested block quotes,-      which weren't supported before.-      `<HTML>` and `<html>` tags are only for raw HTML blocks and-      inlines, and only if the `raw_html` extension is enabled. (It is-      now a valid extension for `dokuwiki`, though off by default.)--  * Docx writer:--    + Support `--list-of-figures` and `--list-of-tables` (or `lof` and-      `lot` variables) (Akash Patel).--  * HTML writer:--    + Don't emit missing title/lang warnings if templates does not-      contain the `pagetitle` or `lang` variables respectively (#9370).--  * LaTeX writer:--    + Better fix for lists in definition lists (#10241).-      In commit a26ec96d89ccf532f7bca7591c96ba30d8544e4a we added an-      empty `\item[]` to the beginning of a list that occurs first-      in a definition list, to avoid having one item on the line with-      the label. This gave bad results in some cases (#10241) and there-      is a more idiomatic solution anyway: using `\hfill`.-    + Avoid error on `refs` div with empty citations (#10185).-      If there are no citations, don't emit an empty CSLReferences environment.--  * RST writer:--    + Change bullet list hang from 3 to 2. This accords with the style in-      the RST reference docs.-    + Handle cases where indented context starts with block quote (#10236).-      In these cases we emit an empty comment to fix the point from-      which indentation is measured; otherwise the block quote is not-      parsed as a block quote. This affects list items and admonitions.-    + Don't enclose the list table in a `.. table::`; this leads to-      doubled captions (#10226).-    + Fix alignment of list table items corresponding to cells (#10227).--  * JATS template:--    + Support `floats-group` (Albert Krewinkel, see #10196).-      The content of the `floats-group` variable is now rendered in a-      `<floats-group>` element when using the *publishing* or *archiving* tag-      sets.--  * LaTeX and Beamer templates:--    + Split old default.latex into two templates, `default.latex` and-      `default.beamer`, factoring common parts into partials:-      `fonts.latex`, `common.latex`, `passoptions.latex`,-      `hypersetup.latex`, `after-header-includes.latex`.-    + Make `default.beamer` the default template for beamer.-    + Add `shorttitle`, `shortsubtitle`, `shortauthor`, `shortinstitute`,-      `shortdate` variables to beamer template (#10248, Thomas Hodgson).-    + Make `--number-sections` work with beamer (#12045, Thomas Hodgson).-    + Support a list of images for `titlegraphic` in beamer template-      (#10246, Thomas Hodgson). Title graphic options will be-      applied to each title graphic. Images will be separated by `\enspace`.-    + Beamer theme options (#10243)-    + Add theme options to beamer template: `colorthemeoptions`,-      `fontthemeoptions`, `innerthemeoptions`, `outerthemeoptions` (#10243,-      Thomas Hodgson).-    + Don't load amsmath, amssym in beamer template. These are loaded by-      beamer automatically.--  * Text.Pandoc.SelfContained:--    + Improve handling of links to remote CSS (#10261).--  * Text.Pandoc.Class:--    + Allow extracting `data:` URIs even in PandocPure (`--sandbox`)-      (#10249).-    + Export `extractURIData` [API change].--  * Text.Pandoc.PDF:--    + Read `.toc` and `.log` files from output directory (#10186).-      When this is different from the input directory, this is-      where `.toc` and `.log` files are written.--  * Text.Pandoc.Shared:--    + Modify `addPandocAttributes` for changes in commonmark-pandoc.-      The new commonmark-pandoc version automatically adds the-      attribute `wrapper="1"` on all Divs and Spans that-      are introduced just as containers for attributes that belong-      properly to their contents.  So we don't need to add the-      attribute here. This gives much better results in some cases.-      Previously the wrapper attribute was being added even for-      explicit Divs and Spans in djot, but it is not needed in these cases.--  * Text.Pandoc.Options:--    + Add `writerListOfFigures` and `writerListOfTables` fields-      to `WriterOptions` (#8245, Akash Patel). [API change]--  * Text.Pandoc.App:--    + Add `optListOfFigures` and `optListOfTables` to `Opt` (#8245)-      [API change].--  * Lua subsystem (Albert Krewinkel):--    + Update List module (#9835). The module now comes with a method-      `:at(index[, def])` that allows to access indices, accepts-      negative indices to count from the end, and will return the-      `def` value as a default if the list has no item at the given position.-      Furthermore, the list constructor `pandoc.List` now accepts iterators.-      E.g., `pandoc.List(text:gmatch '%S+')` returns the list of words-      in `text`.-    + Support character styling via `pandoc.layout`. The `Doc` values-      produced and handled by the `pandoc.layout` module can now-      be styled using `bold`, `italic`, `underlined`, or `strikeout`. The-      style is ignored in normal rendering, but becomes visible when-      rendering to ANSI output. The `pandoc.layout.render` function-      now takes a third parameter that defines the output style,-      either *plain* or *ansi*.-    + It is now possible to return a single filter from a filter file, e.g.-      ``` lua-      -- Switch single- and double quotes-      return {-        Quoted = function (q)-          elem.quotetype = elem.quotetype == 'SingleQuote'-            and 'DoubleQuote' or 'SingleQuote'-          return elem-        end-      }-      ```-      The filter must not contain numerical indexes, or it might be treated-      as a list of filters.-    + Add `list_of_figures` and `list_of_tables` to writer options-      (Akash Patel).--  * Use latest releases of commonmark, commonmark-pandoc, texmath, djot.--  * Stop depending on package SHA (Albert Krewinkel). Use `crypton` instead.--  * `linux/make_artifacts.sh`: add riscv64 support (Olivier Benz).--  * Fix invalid XML in `test/docx/normalize.docx` (#10242).--  * `doc/lua-filters.md`: list functions in `pandoc.utils` alphabetically-    (Albert Krewinkel).--  * MANUAL.txt:--    + Clarify  use of `beamerarticle` variable (#10250).-    + Add clarification to address user issues like #6704 (Yehuda Katz).--## pandoc 3.4 (2024-09-09)--  * New output format: `ansi` (for formatted console output) (Evan Silberman).-    Most Pandoc elements are supported and printed in a reasonable way, if-    not always ideally. This version does no detection of terminal-    capabilities, nor does it fall back to different output styles for-    less-capable terminals.--  * Add command line options `--table-caption-position` and-    `--figure-caption-position`. These allow the user to specify whether-    to put captions above or below tables and figures, respectively.-    The following output formats are supported: HTML (and related such-    as EPUB), LaTeX (and Beamer), Docx, ODT/OpenDocument, Typst.--  * Change default `--pdf-engine` via HTML to WeasyPrint (#10142).-    `wkhtmltopdf` is deprecated.  `weasyprint` is the easiest-to-install,-    maintained alternative.  For better results, one might prefer-    `pagedjs-cli`.--  * Org reader:--    + Fix parsing of src blocks with an `-i` flag (#10071, Albert Krewinkel).-      Tabs are now preserved in the contents of *src* blocks if the the block-      has the `-i` flag.--  * RTF reader:--    + Handle images inside `shp` contexts (#10145).--  * RST reader:--    + Improve simple table support (#10093). Multiline rows occur-      only when the *first* cell is empty; we were previously treating-      lines with *any* empty cell as row continuations. In addition, we-      no longer wrap multiline cells in Para if they can be represented-      as Plain. This is consistent with docutils behavior.--  * LaTeX reader:--    + Math environments don't have bracketed options (#10160).-    + Parse nested tabular environments (#4746).--  * Typst reader:--    + Change how "block" elements are handled. Previously they were-      always parsed as divs.  But actually they can occur in some "inline"-      contexts.  Now we first try to parse them as inlines, and only as-      blocks if that fails.  A surrounding Div or Span element is added-      only if there is an identifier.--  * HTML reader:--    + Only parse main element's contents (if present) (#10140).-      If main has an id or class, we include a div with that id or class;-      otherwise just the contents.-    + Read TeX annotation in MathML content if present (#9971).-    + Better handle KaTeX-generated math (#9971). KaTeX emits the mathml-      followed by a span with an HTML fallback. Previously pandoc was-      converting both.  We now ignore the HTML fallback span, marked-      with class `katex-html`.--  * Docx reader:--    + Add "SuppressAuthor" and "AuthorOnly" to citationMode-      when `+citations` is used (thomjur).--  * New module: Text.Pandoc.Writers.ANSI [API change] (Evan Silberman).--  * Docx writer:--    + Support `custom-style` attribute for docx table (Sebbones).-    + Support `--number-offsets`.-    + Make table/figure rendering sensitive to caption position settings.--  * OpenDocument writer:--    + Make table/figure rendering sensitive to caption position settings.--  * Typst writer/template:--    + Implement figure caption positions by triggering a show rule in-      the default template, which determines caption positions for-      figures and tables globally.-    + Don't include trailing semicolon after `@` style citations with suffixes-      (#10148).-    + Template: move header-includes before show doc (#9996, Gordon Woodhull).--  * LaTeX writer:--    + Make table/figure rendering sensitive to caption position settings (#5116).-    + Preserve locator labels with `--natbib` (#10057).--  * HTML writer/template:--    + Make `<figcaption>` placement sensitive to caption position-      settings. For tables, `<caption>` must be the first element, and-      positioning is determined by CSS, for here we set a variable-      which the default template is sensitive to.-    + Use `makeSectionsWithOffsets` for `writerNumberOffsets`,-      instead of the old, inefficient code.-    + Don't add doc-biblioref role to every link in a citation;-      only to links to the bibliography (#10156).-    + Add `data-` when rendering `label` attribute (#10048).--  * Markdown writer:--    + Avoid emitting markdown caption if table has fallen back to raw HTML,-      which will then contain a `<caption>` tag (#10094).-    + Make math sensitive to `tex_math_gfm` extension (#9121).-      This means that in GFM output, the "new style" math will be used-      by default, e.g.--          $`x=y`$--          ```math-          x = y-          ```--      To defeat this and get the older behavior, namely--          $x=y$--          $$x=y$$--      one could use `-t gfm-tex_math_gfm`.--  * AsciiDoc writer:--    + Add `link:` prefix when needed (#10105). AsciiDoc requires it-      except for `http`, `https`, `irc`, `mailto`, `ftp` schemes (#10105).-    + Preserve original base level (#10062). We used to normalize so-      that the base level is always 1, but asciidoc no longer seems-      to care about that, and the behavior creates difficulties when-      we are converting fragments.-    + Don't emit empty figure caption (#10047).--  * ODT writer:--    + Add TableCaption to styles.xml (#10058, Ian Max Andolina).--  * LaTeX template:--    + Fix wrong beamer color in (sub)section page (Jonathan).--  * Text.Pandoc.Options:--    + Add `CaptionPosition` and new `WriterOptions` fields-      `writerFigureCaptionPosition` and `writerTableCaptionPosition`-      [API change].--  * Text.Pandoc.Opt:--    + Change default for optNumberOffset to `[]`. This behaves the same as-      `[0,0,0,0,0]`.-    + Add `Opt` fields `optFigureCaptionPosition` and-      `optTableCaptionPosition` [API change].--  * Text.Pandoc.Format: change `formatFromFilePaths` so that it is-    smarter about URLs.  URLs are parsed, and we take the format from-    the path component, if present (#10141). This means that-    `https://emacs.org/` will be treated as HTML, while-    `https://emacs.org/sample.org` will be treated as Org.--  * Text.Pandoc.URI:--    + Add unofficial `gemini:` to list of URI schemes (Pau RE).--  * Text.Pandoc.Shared:--    + Add `makeSectionsWithOffsets` [API change].-    + Remove `stripEmptyParagraphs [API change] (Albert Krewinkel).-      This function is no longer used.--  * Text.Pandoc.Highlighting: Expose `formatANSI` [API change]-    (Evan Silberman).--  * Text.Pandoc.Writers.Shared: export `to{Sub,Super}scriptInline`-    [API change] (Evan Silberman).--  * Remove use of partial functions (e.g. `head`) in code.--  * Use latest skylighting-core, skylighting, doclayout, texmath, typst.--  * pandoc-lua-engine: Add accessors for several writer options, including-    some that were added in previous releases.--  * pandoc-server: Initialize some missing fields in WriterOptions:-    `writerEpubTitlePage`, `writerChunkTemplate`, `writerListTables`,-    `writerFigureCaptionPosition`, `writerTableCaptionPosition`.--  * CONTRIBUTING.md: Summarize steps for adding a new cli option.--  * MANUAL.txt:--    + Clarify that the `--number-offset` option should only-      directly affect numbering of the first section heading in-      a document; subsequent headings will increment normally.-    + Fix asciidoc link (#10039).-    + Fix CSL Docs broken link (#10100, Tristano Ajmone).-    + Document the use of `luatexja` when CJKmainfont is used with lualatex-      (#3873, Kolen Cheung).-    + Add a `citations` (typst) section to the manual (#9127).-    + Clarify that `citations` affects both input and output for `org`.-    + Add note on `--citeproc` that you may need to disable `citations`-      extension on the output format (e.g., `-t markdown-citations`) to-      see the rendered citation (#9127, #10012).--  * INSTALL.md — reorganise info on static binaries and add conda-forge-    install options (#10098, #10069, Ian Max Andolina).--## pandoc 3.3 (2024-07-28)--  * New cli option: `--link-images`.  This causes images to be linked-    rather than embedded in ODT.--  * Allow `--number-sections` to take an optional `true|false` argument.--  * RTF reader:--    + Handle `\*\shppict` without dropping image (#10025).--  * TWiki Reader:--    + Recognize WikiWords as internal links (#9941).-    + Avoid partial function.--  * Typst reader:--    + Ignore 'pad' and just parse its body (#9958).-    + Use typst 0.5.0.5. Fixes parsing of equations like `$1.$`.--  * Docx writer:--    + Fix regression with nested lists (#9994). The bug affects e.g.-      ordered lists with bullet sublists; after the sublist the top-level-      list reverts to bullets instead of being properly numbered.-      This is a regression introduced in version 3.2.1.--  * BibTeX writer:--    + Ensure that "literal" names are enclosed in braces (#9987).--  * Man writer:--    + Use default middle header when metadata does not include `header`-      (#9943).  This change causes pandoc to omit the middle-      header parameter when `header` is not set, rather than-      emitting `""`.  The parameter is optional and man will use-      a default based on the section if it is not specified.--  * HTML templates: don't load polyfill (#9918).-    This was added in a period when MathJaX required polyfill.-    MathJaX no longer recommends this and polyfill should no-    longer be necessary on any reasonably modern browser.--  * Translations:--    + Add `ua.yaml` (Jens Oehlschlägel).-    + Add a script (`tools/update-translations.py`) and Makefile-      target (`update-translations`) to update translation data-      automatically from babel and polyglossia upstream-      (Stephen Huan).-    + Use this script to update language data, increasing the number-      of languages we cover (Stephen Huan).  Fix a few small bugs in-      existing translations.--  * Fix some mistakes with Japanese language code (#9938).-    In several places we were mistakenly assuming that the BCP 47 code for-    Japanese language was `jp`.  It is `ja`.--  * Text.Pandoc.Options:--    + New field in WriterOptions: `writerLinkImages` [API change] (#9815).--  * Text.Pandoc.App.Opt:--    + New field in Opt: `optLinkImages` [API change] (#9815).--  * Lua subsystem:--    + Keep `lpeg` and `re` as "loaded" modules (Albert Krewinkel).-      The modules `lpeg` and `re` are now treated as if they had been-      loaded with `require`. Previously the modules were only assigned-      to global values, but could be loaded again via `require`,-      thereby allowing to use a system-wide installation. However, this-      proved to be confusing.--      The old behavior can be restored by adding the following lines to-      the top of Lua scripts, or to the `init.lua` in the data dir.--          debug.registry()['_LOADED'].lpeg = nil-          debug.registry()['_LOADED'].re = nil--  * `pandoc-cli`: Include pandoc copyright in Lua version info (Albert-    Krewinkel).--  * `pandoc-cli`: Refer printing of version info to the Lua interpreter-    (Albert Krewinkel). The Lua interpreter no longer terminates when-    called with `-v` or `--version` arguments, thus improving-    compatibility with the default `lua` interpreter program.--  * Avoid partial functions in JATS reader, DocBook writer, Haddock reader.--  * Allow tls 2.1.x.--  * MANUAL.txt:--    + Make documentation of extensions clearer (#9060).-    + Fix section level for two Extensions entries.--  * lua-filters.md: Partially autogenerate docs for module `pandoc`-    (Albert Krewinkel). The documentation system isn't powerful enough to-    generate the full documentation automatically.--## pandoc 3.2.1 (2024-06-24)--  * Fix `gfm_auto_identifiers` to replace emojis with their aliases,-    as documented (#9876).--  * CSV reader:--    + Turn line breaks into LineBreaks not SoftBreaks (#9797).--  * Docx reader:--    + Support task lists (#8211).-    + Fix a small bug in parsing delimiters in numbered lists,-      which led to the default delimiter being used wrongly in some cases.-    + Improve handling of captions.-      - Turn captioned images into Figure elements. Closes #9391.-      - Improve the logic for associating elements with captions (#9358).-      - Ensure that captions that can't be associated with an-        element aren't just silently dropped (#9610).-    + Support HorizontalRule. We support both pandoc-style and the style-      described on a Microsoft support page, an empty paragraph with-      a bottom border (#6285).-    + React to `"left"` value on `jc` attribute.-    + Handle column and cell alignments (#8551). We take the column alignments-      from the first body row.-    + Fix a bug that caused comments inside insertions or deletions-      to be ignored (#9833).--  * HTML reader:--    + Better handle non-`li` elements in `ul` and `ol` (#9809).-      For example, a `p` after a closed `li` will be incorporated into-      the previous `li`. This mirrors what browsers do with this-      invalid HTML.--  * LaTeX reader:--    + Fix parsing of dimensions beginning with `.`, e.g. `\kern.1pt` (#9902).--  * Markdown reader:--    + Allow author-only textual citations (#7219). E.g. `-@reese2002`-      outside of brackets.--  * RST reader:--    + Tighten up rules for when emphasis can start (#9805).-    + Support `:cite:` role with citeproc (#9904). A subset of the-      functionality of the sphinxcontrib-bibtex extension to Sphinx-      is supported.--  * Textile reader:--    + Don't let spans begin right after a symbol (#9878).--  * Typst reader:--    + Fix an incomplete pattern match (#9807).-    + Handle inline bodies ending in a parbreak. E.g.-      ```-      `#strong[-      test-      ]-      ```--  * ConTeXt template: remove `\setupbackend[export=yes]` (#9820).--  * Docx writer:--    + Allow OpenXML templates to be used with `docx` (#8338, #9069, #7256,-      #2928). The `--reference-doc` option allows customization of styles in-      docx output, but it does not allow one to adjust the content of the output-      (e.g., changing the order in which metadata, the table of contents,-      and the body of the document are displayed), or adding boilerplate-      text before or after the document body.  For these changes, one can-      now use `--template` with an OpenXML template.  (See the default-      `openxml` template for a sample.) `--include-before-body` and-      `--include-after-body` can also now be used with `docx` output.-      The included files must be OpenXML fragments suitable for-      inclusion in the document body.-    + New unexported module Text.Pandoc.Writers.Docx.OpenXML.-    + Omit `jc` attribute on table cells with AlignDefault (#5662).-    + Better formatting for task lists. Task lists are now properly-      formatted, with no bullet (#5198).-    + Replace an expensive generic traverse to remove Space elements,-      for better performance.-    + Wrap figures with `id` in a bookmark (#8662).-    + Add eastAsia font hints to `w:r` (#9817). We do this when the text-      in the run contains any CJK characters. This ensures that ambiguous-      code points (e.g. quotation marks) will be represented as "wide"-      characters when together with CJK characters.-    + Clean up Abstract Title and Subtitle in default reference docx.-      Center Subtitle, remove color.--  * HTML writer:--    + Ensure URI escaping needed for `html4` (#9905).-      Unicode characters need not be escaped for html5, and still won't be.-    + Don't emit unnecessary classes in HTML tables (#9325, Thomas Soeiro).-      Pandoc used to emit a `header` class on the `tr` element that forms-      the table header. This is no longer needed, because `head > tr` will-      do the same thing. Similarly, pandoc used to emit `even` and `odd`-      classes on `tr`s, allowing striped styling.  This is no longer needed,-      because one can use e.g. `tbody tr:nth-child(2n)`.-      Compatibility warning:  users who relied on these classes to style-      tables may need to adjust their CSS.--  * JATS writer:--    + Support `supplementary-material` in metadata for `jats_articlepublishing`-      (#9818).--  * LaTeX writer:--    + New method for ensuring images don't overflow (#9660).-      Previously we relied on graphicx internals and made global-      changes to Gin to force images to be resized if they exceed-      textwidth.  This approach is brittle and caused problems-      with `\includesvg` (see #9660). The new approach uses a new macro-      `\pandocbounded` that is now defined in the LaTeX template.-      (Thanks here to Falk Hanisch in https://github.com/mrpiggi/svg/issues/60.)-      The LaTeX writer has been changed to enclose `\includegraphics`-      and `\includesvg` commands in this macro when they don't explicitly-      specify a width or height. In addition, the writer now adds-      `keepaspectratio` to the `\includegraphics` or `\includesvg`-      options if `height` is specified without width, or vice versa.-      Previously, this was set in the preamble as a global option.-      Users should attend to the following compatibility issues:-      - If custom templates are used with the new LaTeX writer, they will have-        to be updated to include the new `\pandocbounded` macro, or an error-        will be raised because of the undefined macro.-      - Documents that specify explicit dimensions for an image may render-        differently, if the dimensions are greater than the line width or-        page height. Previously pandoc would shrink these images to fit,-        but the new behavior takes the specified dimensions literally.-        In addition, pandoc previously always enforced `keepaspectratio`,-        even when width and height were both specified, so images with-        width and height specified that do not conform to their intrinsic-        aspect ratio will appear differently.-    + Task lists must be unordered (#9185).-    + Specify language option for `selnolig` and only include it if-      `english` or `german` is used (#9863). (This includes changes to the-      LaTeX template.) This should restore proper ligature suppression when-      lualatex is used.-    + Fix `--toc-depth` with beamer output (#9861). Previously only top-level-      sections were ever included in the TOC, regardless of the setting of-      `--toc-depth`.-    + Use `\linewidth` instead of `\columnwidth` or `\textwidth`-      for resizing figures, table cells, etc. in LaTeX (#9775).-      `\linewidth`, unlike the others, is sensitive to indented environments-      like lists.--  * LaTeX template: put `babel-lang` in options to beamer (#9868).-    This is required to make beamer use proper localized terms for-    things like "Section."--  * Markdown writer:--    + Don't print extra caption when using `implicit_figures`.-    + Ensure blank line after HTML blocks in commonmark-based formats (#9792).-    + Fix bug rendering block quotes in lists (#9908).--  * Texinfo writer:--    + Ensure proper escaping in all node/link contexts.-    + Target node rather than anchor when possible in internal links.-    + Remove illegal characters from internal link anchors (#6177).-    + Use two commas not one in `@ref`.-    + Don't add anchors to headings. We don't need them, now that we-      make internal links use the node.-    + Avoid duplicate node names.-    + Improve menus. Properly handle the case where the node name is-      different from the descriptive title.--  * Texinfo template: add variables for filename and version.--  * Typst writer:--    + Support '.typst:no-figure' and 'typst:figure:kind=kind' attributes-      (#9778, Carlos Scheidegger). This extends support for fine-grained-      properties in Typst. If the `typst:no-figure` class is present on a-      Table, the table will not be placed in a figure. If the-      `typst:figure:kind` attribute is present, its value will be used-      for the figure's `kind` (#9777). These features are documented in-      `doc/typst-property-output.md`.--  * Typst template:--    + Add subtitle (#9747, Mickaël Canouil).-    + Use content rather than string for title, author, date, email (#9823).-      This allows formatting in title, author, date, and email fields.-      Since the PDF metadata requires a string, and typst only-      converts the title to a string (not the authors), we use--  * Textile writer:--    + Get rid of header, odd, even classes on `tr` (#9376).--  * Text.Pandoc.Class:--    + `fillMediaBag`: Convert IOErrors to warnings when fetching absolute-       paths (#9859, Albert Krewinkel).  This will allow many conversions that-       would have failed with an error to succeed (albeit without images or-       other needed resources).--  * Text.Pandoc.ImageSize:--    + Don't prefer exif width/height when they conflict with image-      width/height (#9871).  That was a mistaken call in #6936.-      Usually when these values disagree, it is because the image-      has been resized by a tool that leaves the original exif values-      the same, so the width/height metadata are more likely to be-      correct that exif width/height.--  * Text.Pandoc.SelfContained:--    + Strip CRs from XML before base64 encoding for data URI-      (so tests can work on Windows).-    + Only create `<svg>` elements for SVG images when the image has-      the class `inline-svg`. Otherwise just use a `data` URI as we do-      with other images (#9787).--  * Lua subsystem (Albert Krewinkel):--    + Split Init module into more modules. The module has grown unwieldy and-      is therefore split into three internal Haskell modules, `Init`,-      `Module`, and `Run`.-    + Add function `pandoc.utils.run_lua_filter` (#9803).-    + Add function `pandoc.template.get` (#9854, co-authored by Carsten Gips).-      The function allows to specify a template with the same argument value-      that would be used with the `--template` command line parameter.-    + Keep CommonState object in the registry. The state is an internal-      value and should be treated as such. The `PANDOC_STATE` global is-      merely a copy; unsetting the global no longer breaks the Lua engine.-    + Allow passing an environment to `run_lua_filter`.-      The default is now to use a *copy* of the global environment when running-      a filter; this ensures better separation when `run_lua_filter` is used-      multiple times. A custom environment can be specified via the-      optional third parameter.-    + Set `pandoc.List` as default metatable for JSON lists (#9834).-      Lists created by `pandoc.json.decode` now behave like lists generated-      via `pandoc.List`. This also ensures that `pandoc.List` tables are-      encoded as JSON arrays when passed to `pandoc.json.encode`.--  * Text.Pandoc.Writers.Shared: export `toTaskListItem` [API change].--  * Add unexported module Text.Pandoc.Char. This exports `isCJK`.-    Use this instead of locally defined `isCJK` in T.P.Readers.MediaWiki.--  * MANUAL.txt:--    + Remove false claim that Lua mode does not support `-i` (#9757,-      Ian Max Andolina).-    + Use level-3 headings for extensions (to avoid gaps).-    + Add anchor for tagging extension.-    + Remove explicit referencess to generate anchors.-      These will be linkified automatically.-    + Fixed links to `option--reference-doc`.-    + Add a note that column widths aren't supported in pptx for Divs-      with class `columns` (#9890).-    + Fix alerts example (#9826, Ian Max Andolina).-    + Fix markup of `babelfonts` example code (Albert Krewinkel).--  * `doc/custom-writers.md`:--    + Fix usage of Template in example (Albert Krewinkel).-    + Document the separator arg of `Writer.Blocks` (Albert Krewinkel).--  * `doc/lua-filters.md` (Albert Krewinkel):--    + Fix outdated documentation for math and quoting functions and fields.-    + Autogenerate docs for module `pandoc.template` and `pandoc.layout`.-    + Document operators of the "Doc" type.--  * pandoc-lua-engine: depend on pandoc >= 3.2 (see #9755).--  * Allow crypton-connection 0.4, time 1.14.--  * Allow tasty-quickcheck 0.11.--  * Use latest emojis, skylighting, skylighting-core, citeproc, djot,-    commonmark-extensions, typst-hs--## pandoc 3.2 (2024-05-11)--  * Change to `--file-scope` behavior (#8741): previously a Div with an-    identifier derived from the filename would be added around the contents-    of each file. This caused problems for "chunking" files into chapters,-    e.g. in EPUB. We no longer add the surrounding Div. This cooperates-    better with chunking. Note, however, that if you have relied on the old-    behavior to link to the beginning of the contents of a file using-    its filename as identifier, that will no longer work.--  * Markdown reader:--    + Allow repeated labels in numbered example lists.-      Previously if you tried to use the same label as an earlier-      example list item, you'd get a new number, not the old one,-      and references to the label would go to the second occurrence.-      Now an existing label will be reused, and no new number will-      be generated.  Caveat:  this only works reliably when the-      re-used example list item occurs by itself in a list, or-      occurs in a list of previously used example list items that-      occur in exactly the same order as previously.-    + Fix `normalCite` so it doesn't consume past a closing `]` boundary-      (#9710).  This was causing an exponential performance bug on long-      lists of links containing potential emphasis characters.-    + Generalize `inlinesInBalancedBrackets` to `inBalancedBrackets`,-      with a parameter for the inner parser.-    + Auto-close unclosed divs (#9635). This applies to both fenced and-      HTML-ish varieties. Otherwise we face an exponential performance-      problem with backtracking. A warning is issued when a div is-      implicitly closed.--  * RST reader:--    + Fix `figclass` and `align` annotations for figures (#7473, Gokul-      Rajiv).--  * LaTeX writer:--    + Use `polytonicgreek` instead of `polutonikogreek` with babel (#9698).-      `polutonikogreek` is outdated. Also recognize both in the LaTeX-      reader.-    + Improve treatment of math inside soul commands (#1294, #5529).-      soul commands (`ul`, `hl`, `st`) are very fragile and the math-      must be handled specially.--  * LaTeX reader:--    + Fix over-eager macro expansion in conditionals (#9676).-    + Parse `flalign`, `flalign*` math environments (#9679). We parse-      these as Math elements with an `aligned` environment. Semantically-      it's not exactly the same, but better than falling back to raw LaTeX.--  * LaTeX template: add `titlegraphicoptions` variable (#9207, Guilhem-    Saurel).--  * Docx reader:--    + Issue warning rather than error when we can't parse EndNote citations-      (see #8433).-    + Fix anchor in header after anchor (#9626, mbracke).--  * RTF reader:--    + Don't try to handle non-default code pages (#9683). Emit a warning-      instead.--  * OpenDocument writer:--    + Implement custom-style for spans (#9657).--  * Typst writer:--    + Add blank line in definition lists with multiple definitions (see-      #9704).-    + Property output (#9648, Gordon Woodhull). The Typst writer will pass-      on specially marked attributes as raw Typst parameters on selected-      elements. This allows extensive customization using filters.-      A separate document (`doc/typst-property-output.md`) has been added-      that provides extensive documentation and examples of the use of-      this feature.--  * Markdown writer:--    + Don't try to align columns in pipe tables with lines greater than-      COLUMNS. The alignment just reduces readibility when the lines-      soft wrap.-    + Don't use `raw_attribute` syntax for raw blocks, unless there is no-      other option (see #9677).  Macros in a `raw_attribute` block don't-      get interpreted when it is read again by pandoc's markdown reader.--  * ConTeXt writer:--    + Replace depreciated `\sc` with `\setsmallcaps` (#9518, James P.-      Ascher).--  * Docx writer:--    + Use conventional styles/indents for Word bullet lists (#7280).--  * `reference.docx`:--    + Use current standard Word theme (#7280). This includes using the-      sans-serif font Aptos instead of the serif font Cambria, and-      default colors for headings.-    + Remove duplicate `DefaultParagraphFont` in `styles.xml`.--  * New module Text.Pandoc.Transforms [API change] (Albert Krewinkel).-    This module exports the following functions which were formerly-    exported from Tetx.Pnadoc.Shared: `headerShift`,+## pandoc 3.10.1 (2026-07-21)++  * New output format `t2t` (Txt2Tags markup, <https://txt2tags.org>))+    (luginf).++  * New module Text.Pandoc.Writers.Txt2Tags, exporting+    `writeTxt2Tags` (loginf) [API change]. Also exported from+    Text.Pandoc.Writers.++  * Change adding of `.yaml` extension in `--defaults` option (#11717).+    Previously it was always added if the specified filename+    lacked an extension. Now it is only added if there is+    no file with the original name. This facilitates using+    `--defaults` with bash/zsh `<(..)` or `=(..)`.++  * RST reader:++    + Fix nested placeholder resolution for inline elements (#11753,+      Tobias Deiminger). (Regression from pandoc 3.6.)+    + Treat undefined substitution references as plain text (#11727).+      This mirrors rst2html behavior.++  * Markdown reader:++    + Ordered sublists must start with 1, er equivalent, e.g. i (#11735).+      This brings the markdown parser in line with commonmark, and avoids+      a lot of unintended list starts. Note that ordered lists that+      are not sublists may still start with numbers other than 1.++  * ODT reader:++    + Don't create Emph just because of changed font (#11691).++  * RTF reader:++    + Support multi-paragraph list items.+    + Support legacy `\pn/\pntext` paragraph numbering (#11686).++  * Docx reader:++    + Improve horizontal rule detection (#11689).+    + Key list numbering off `abstractNumId`, fixing numbering for+      restarted lists (#8367).++  * LaTeX reader:++    + Handle `\hypertarget` with one braced parameter (#7418).++  * DokuWiki reader:++    + Skip non-cell content after table row (#11739).++  * Typst reader:++    + Support `auto_identifiers` extension (#11041).+      The extension is available for the typst reader but is off by+      default; enable it with `-f typst+auto_identifiers`. The related+      `gfm_auto_identifiers` and `ascii_identifiers` extensions are+      also made available.+    + Recognize `divider()` for horizontal rule (#11540).++  * HTML reader:++    + Fix unused variable warning in CI (#11704, Robertas).+    + Strip `language-` from all classes, not just first (#11701).+      Also combine classes from both code and pre class if they are+      nested.++  * Powerpoint writer:++    + Keep tables and surrounding text on same slide (#11433, Chris+      Callison-Burch). Previously, when a slide contained bullet+      points before and after a table, content would be split across+      multiple slides or use a two-column layout that didn't preserve+      the source order.++  * Texinfo writer:++    + Fix spacing bug around HorizontalRule (#11749).+    + fix escaping in links (#11758). Previously we dropped periods,+      commas, etc. This was a regression from 2024. All we really need+      to do is escape the comma.++  * LaTeX writer:++    + Provide a way to use table instead of longtable (#1023).+      When the `float` class is attached to a table, a standard+      floating `table` will be generated instead of a `longtable`.+      Placement can be specified via the `latex-placement` attribute.+      This will help, especially, those who use two-column layouts,+      since `longtable` is incompatible with these.+    + Fix footnotes in definition list headings (#8240).++  * Markdown writer:++    + Fix ordered list indentation bug (#11762).+    + Improve identification of code language class by looking it up+      in the syntax map (#11701).+    + In YAML metadata, put double quotes around strings that are+      numbers beginning with 0 or ending with 0 and+      having a decimal point (#11715). Otherwise they will read as+      YAML numbers and potentially be modified (e.g. 3.10 -> 3.1).++  * Docx writer:++    + Use namespace URI instead of prefix in extractPageLayout (#11697,+      Robertas).++  * ODT writer:++    + Use starmath for math. This improves appearance and+      editability of equations. The main code changes are due to+      @jdpipe (#11470).+    + Image anchoring, percent dimensions, text width resolution+      (#11746, Can H. Tartanoglu). Inline images now emit+      `text:anchor-type=as-char` on their `draw:frame`,+      anchoring the frame as a character so it flows with the+      surrounding text. When both width and height are given and the+      width is a percentage, the width is now resolved against the+      reference document text area width, mirroring how the docx+      writer derives its print width from the reference docx section+      properties. The height follows the aspect ratio.++  * RTF writer:++    + Emit real RTF lists with a list table.+      Lists were written as plain paragraphs with a literal marker and a+      hanging indent, carrying none of the `\ls`/`\ilvl` references or the+      `\listtable`/`\listoverridetable` that the RTF list model (and pandoc's+      own reader) expect, so lists could not round-trip.+    + Allow fontsize to be specified (#11750). The fontsize is specified+      in a variable or metadata field and passed through the renderer via+      a Reader monad.++  * Typst writer:++    + Fold `lang` into `pickTypstAttributes` (#11673).+      This ensures that `lang` attributes will be set for both+      Divs and Spans.+    + Add support for tight terms in Typst writer (#11748, Amir Dekel).+      This just affects whether a blank line is emitted in the markup.+      Note that pandoc's default template contains a show rule for+      terms that will make these blank lines irrelevant, but this change+      allows one to use tight lists with custom templates.+    + Further tight term list improvements. For tight list items+      consisting of just one Plain block, we no longer create a+      `#block` for the definition; this allows it to remain on the+      same line as the term.+    + Emit `divider()` as horizontal rule (#11540).++  * LaTeX template:++    + The `caption` package is included and a default spacing+      set between the caption and the table.++  * Typst template:++    + Remove custom show rule for terms. Instead, we use a set rule+      to set hanging-indent.+    + Remove old `horizontalRule` definition from default template.+    + Polyfill `divider` for typst < 0.15.+    + Allow multiword keywords (#11730, Albert Krewinkel).+      Typst expects single words as keywords, so keywords consisting of+      multiple words must be quoted (and should not be wrapped).++  * HTML template:++    + Remove hard-coded font-size for print CSS. Print CSS now uses+      the inherited font-size.++  * epub.css:++    + Get rid of obsolete #TOC rules (#11747). We don't generate+      anything with the TOC id in epubs. A table of contents is in+      `nav#toc` and we have rules for that.+    + Put clause for all headings before individual h1, h2, ...+      (#11742). This is more logical, since the individual clauses+      are meant to override.++  * Text.Pandoc.Shared:++    + Improve `makeSections` (#11745). Previously it would sometimes+      create doubled section divs. By leaving the inner heading's id+      on the heading itself, and then consolidating the inner and outer+      section divs, we can avoid this undesirable result.+    + `taskListItemToAscii`: handle empty task list case.+    + `taskListItemFromAscii: handle empty task list case (#11599,+      Chirag Dhamange).++  * Text.Pandoc.App.CommandLineOptions:++    + Use `optCSL` and `optBibliography` from Opt (#11741). Previously+      we set `optMetadata` directly, but that had some unintended+      effects, especially in interacting with defaults files. With+      this change, a `--csl` on the command line can override one set+      in a prior defaults file.++  * Text.Pandoc.App:++    + Enable `auto_identifiers` when a table of contents is requested+      (#11041). Table-of-contents entries link to heading identifiers,+      so when `--toc/--table-of-contents` is given, force the+      `auto_identifiers` extension on for the input format even when it+      is off by default (as it now is for typst).  This makes+      typst-to-markdown `--toc` produce working links.++  * Text.Pandoc.Writers.Shared:++    + `htmlAttrs` - don't add `data-` prefix for `markdown` (#11685).+      This is necessary for the `markdown_attribute` extension to+      work properly.++  * Ensure that IO error messages go to stderr (#11710).++  * Use emojis 0.1.5, texmath 0.13.2,typst 0.11, typst-symbols 0.3,+    pandoc-types 1.23.1.2, djot 0.1.4.1, commonmark-extensions 0.2.7.1,+    skylighting-format-blaze-html 0.1.2.1.++  * Add Makefile rule to update all-cabal-hashes in flake.lock.++  * MANUAL.txt:++    + Clarify comment about table types (#11719).+    + Small clarification in image section (#11760).+    + Rewrite "A note on security." Clarify the risks of using+      pandoc in a web service and explain how to do so more safely.+      Note some specific vulnerabilities with the pdf-engine `wkhtmltopdf`.+      This incorporates the suggestions made in #11262 and also+      benefits from a report by Kai Aizen.+    + Clarify `native_numbering` extension (#11599).+    + Include Lua filter to set float attribute on tables.+    + Clarify expectations for EPUB metadata (#11723).+    + Improve instructions for specifying EPUB identifier (#11723).+    + Fix typo (#11720, Scott Talbert).++  * Fix typo in lua-filters.md (#11724, Enrico Spinielli).++  * Revamp `flake.nix` to use `haskell.nix` (#11707).+    This allows the project to be built using `nix build` and run+    using `nix run`. @srid deserves credit for most of this.+    stack.yaml is used as a source of truth for the versions to use,+    including for git repositories.++  * Change symlink to regular file for COPYING.md in+    pandoc-cli, pandoc-lua-engine, pandoc-server.++## pandoc 3.10 (2026-06-03)++  * Add `--typst-input` CLI option (#11588). This allows one to+    pass parameters to typst, which are available at `sys.inputs`,+    just as `typst` itself does with its `--input` option.++  * Avoid trailing spaces in `--help` output (#11623).++  * Make groff the default pdf-engine for `ms` output (#11558).+    Formerly it was pdfroff.++  * Set default User-Agent request header to `pandoc/VERSION`.+    This can be overridden using the `--request-header` option.++  * Markdown reader:++     + Allow grid tables to be indented (#11671, Johan Larsson). Like+      the other table syntaxes (pipe, simple, and multiline tables)+      and block-level constructs generally, a grid table may now be+      indented by up to three spaces and still be recognized as a+      table. Previously the grid-table parser required the table to+      begin at the left margin, so an indented grid table was parsed+      as a paragraph.+    + Fix calculation of column widths for default columns in grid tables+      (#11664). This fixes a bug which produced too-narrow columns in some+      cases.+    + Don't produce empty Raw element with `--strip-comments` (#11625).+    + Fix quotes in inline notes (#11613, Andrew Dunning).+    + Allow spaces inside attributes in super/sub (#11589).+    + Simplify `checkNotes`, remove dead code+    + Various small performance optimizations.++  * HTML reader:++    + Parse aside as a Div with class "aside" (instead of using+      raw HTML) (#11626).+    + Add "header" class to Divs created from headers.++  * Docx reader:++    + Fix bug in bitmask checking (#8299). This led to some table rows+      being wrongly considered header rows.+    + Improve treatment of `tblHeader` element (#8299).+      If `tblHeader` exists but has `w:val="0"`, then don't consider+      the element a header.+    + With `citations` extension, prefer `citation-key` as the key for+      item data, if it is defined (#11581; cf. #10366, #11567). The `id` key+      used by Zotero is not exposed by their API and is generally not what+      is wanted when converting to biblatex.+    + Don't look to `ext` tags for image extent (#11580).+      This reverts a change from 7ff1b798c4e6681ef9050899442d80883116573a.+      The change was mistaken and could cause images to be parsed with+      the wrong sizes.++  * Man reader:++    + Support `auto_identifiers`, `gfm_auto_identifiers`, and+      `ascii_identifiers` extensions (#8852, Meher Chaitanya).+      Section headings parsed from .SH and .SS macros now receive+      auto-generated id attributes when the extension is enabled (as+      it is by default). This enables `--toc` to produce working anchor links.+    + Better handling of `.TP` macro (#11668). We parse these as+      DefinitionList items, but we previously sometimes stopped prematurely+      in including material in the definition.  We should include everything+      until we hit a new indentation-changing macro.++  * Roff reader:++    + Handle `\` line continuation in table cells (#11635).++  * LaTeX reader:++    + Evaluate theorem name when used rather than evaluating it when+      the `\newtheorem` command is encountered (#11608). It may include+      macros only defined later.+    + Put identifier from label on table attributes rather than adding+      an enclosing Div (#11604).++  * Typst reader:++    + Fix issue parsing figure inside rotate or box (#11598).+    + Implement "rotate" as pass-through (#11531). Information about the+      angle is encoded in an attribute of an enclosing span or div.++  * RTF reader:++    + Fix tables parsed as deeply nested tables (#11682).++  * Docx writer:++    + Fix display of paragraph with just inline math (#11674).+      Word displays a paragraph containing just one inline math+      element as if it were display math. We don't want that,+      so we add a zero-width space to defeat this behavior.+    + Fix FirstParagraph style lost after heading with footnote (#11573).+    + Fix empty keywords in core document properties (#11666, Sai Asish Y).++  * OpenDocument/ODT writer:++    + Use predefined styles (#9316, #5086, #2747, #3426, #7336).+      Previously the OpenDocument writer emitted a fresh automatic+      style (L1..Ln, P1..Pn, T1..Tn) for nearly every list, list-item+      paragraph, block quote, preformatted block, and inline text+      style. This commit teaches the writer to reference the+      predefined styles that LibreOffice ships and that pandoc's+      reference.odt now exports:++      - Bullet lists use `List_20_1`; ordered lists with default start and+        decimal format use `Numbering_20_1`.  Non-default ordered lists+        generate a single named override style (`Pandoc_Numbering_N`)+        memoised by (ListNumberStyle, ListNumberDelim); a non-default start+        value with the default format is expressed via `text:start-value`+        on the `text:list` element instead of a new style.+      - List-item paragraphs use `List_20_Bullet[_Tight]` and+        `List_20_Number[_Tight]`.  The Tight variants are pandoc-specific+        (zero top/bottom margin) and are injected into the user's+        reference.odt if missing, just like the Skylighting token styles.+      - Block quotes use the predefined `Quotations` paragraph style+        directly.  Nested block quotes use a single automatic style that+        inherits from Quotations and only adds extra margin-left, so a list+        inside a block quote now inherits its container's indent (#2747).+      - Preformatted blocks use `Preformatted_20_Text` directly.+      - Emphasis, Strong, Strikeout, Subscript, Superscript and Code spans+        use the predefined `Emphasis`, `Strong_20_Emphasis`, `Strikeout`,+        `Subscript`, `Superscript` and `Source_20_Text` text styles.+      - `paraStyle`/`paraStyleFromParent` no longer emit a wrapper automatic+        style when its only attribute would be `parent-style-name`; the+        parent name is returned directly.++  * EPUB writer:++    + Support multiple EPUB versions for raw content (#11628,+      nibras shami). This change ensures that raw content marked `epub2`+      will appear in (only) EPUBv2 output and content marked `epub3` will+      appear in (only) EPUBv3 output.++  * Typst writer:++    + Add zero-width space before a Span label if otherwise the label+      doesn't come after anything (#11568). (In this case typst will+      raise an error.)+    + Add newline after `#set text` directive (#11583). This ensures that+      blocks such as lists are parsed correctly after a `set text`.++  * LaTeX writer:++    + Fix `fr-CA` babel language mapping (#11575, Christophe+      Dervieux). Map fr-CA to `french` instead of deprecated `canadien`.+      The babel-french package's `canadien.ldf` is deprecated and+      broken: it never calls `\ldf@finish`, so `\bbl@main@language` is+      left undefined, causing babel to crash at `\begin{document}`.+      Since `canadien` was always just an unconditional alias for+      `french`, use `french` directly.++  * MediaWiki writer:++    + Handle some technically malformed URLs (#11562).+    + Fix escaping to avoid accidental lists (#11563).++  * Markdown writer:++    + Fix spacing issues with definition lists.+      - Properly handle the case where the first item is an indented+        code block (#11542).+      - Use correct indentation when `four_space_rule` extension is+        disabled.+    + Escape `:::` to avoid triggering unintended divs (#11571).++  * Man writer:++   + Don't run together successive definitions in a tight definition list+     with multiple definitions after a term (#11547).++  * Text.Pandoc.Writers.Shared:++    + `htmlAttrs`: use `data-` prefix when needed (#11680). This now+      behaves like the HTML writer, adding the `data-` prefix for+      custom attributes. This will affect, e.g., the mediawiki writer.++  * Text.Pandoc.Error:++    + Display IOError without stack trace (#11676).+    + Use single quotes around paths and format names (#11645) in+      displayed messages.++  * Text.Pandoc.App.Opt:++    + Opt has a new field `optTypstInputs` [API change].++  * Text.Pandoc.Options:++    + Change `defaultMathJaxURL` to use MathJax v4 (#11669).+    + ReaderOptions has a new field `readerTypstInputs` [API change].++  * Text.Pandoc.Citeproc.BibTeX:++    + Prevent wrong combination of `subtitle` and `titleaddon` with+      `maintitle` (#11677, Amir Dekel). When `maintitle` is present, `subtitle`+      should not be added to `title`, but only to `volume-title`.+    + BibLaTeX `inbook` should be CSL `book`, not `chapter` (#11552).+    + Allow `doi` field in bibtex (input and output) (#11617, Thomas Hodson).++  * Text.Pandoc.Translations:++    + Find lang-script type translations (#11648).+      E.g. for `zh-Hant-TW` look for (in order) `zh-Hant-TW.yaml`,+      `zh-Hant.yaml`, `zh.yaml`.++  * Text.Pandoc.Parsing:++    + Various small optimizations.+    + Fix bug in `extractIdClass` to ensure that both `id` and+      `class` are stripped from key/value attributes..++  * Text.Pandoc.Shared:++    + Various small optimizations.++  * ODT reference doc: demonstrate predefined styles (310327).+    This mirrors the demonstration content already present in+    the Word reference doc.++  * HTML templates:++    + Include pandoc-version in generator meta tag (#11624).+    + Styles: make screen-only CSS conditional (#11524, Keenan Brock).++  * EPUB templates:++    + Add dir attribute to html element (#11554).++  * LaTeX template: Define `\xmpquote` if not defined (#11528).+    `\xmpquote` is defined by the hyperref driver hyperxmp; we need a+    fallback for those who aren't using that.++  * Lua subsystem:++    + Add constructor `pandoc.TableBody`.++  * doc/lua-filters.md: Re-indent definition list items+    (Albert Krewinkel).++  * wasm/index.js: include filter to embed images for pdf-via-typst.+    Auto-inject `embed_images` filter for PDF via Typst. Otherwise+    conversion fails because we can't write the images in a temporary+    directory in the WASM sandbox. See jgm/pandoc#11584.++  * Fix test suite parallel execution failures (#11566).++  * linux/make_artifacts.sh: add `loong64` support (#11597,+    Olivier Benz).++  * `bash_completion.tpl`: add `groff` to `--pdf-engine` completions (#11555).++  * MANUAL.txt:++    + Improve description of reference links (#11643).+    + Update instructions for modifying reference.docx+      (#11600, Dan Jacobson). Mention LibreOffice as an alternative.+    + Clarify indentation rules for definition lists (#11542).+    + Move `--sandbox` to general options.+    + Reword restrictions on YAML metadata in commonmark (#11561).++  * Bump upper bound for time, tls, aeson.++  * Use latest releases of doclayout, asciidoc, texmath, typst,+    typst-symbols, pandoc-types, citeproc, commonmark, commonmark-pandoc,+    commonmark-extensions.++  * Add missing NAME heading to pandoc-lua, pandoc-server man pages (#11634).++## pandoc 3.9.0.2 (2026-03-19)++  * Typst template: fix regression introduced in 3.9.0.1 (#11538).++## pandoc 3.9.0.1 (2026-03-17)++  * WASM GUI:++    + Don't block everything while pandoc.wasm loads.+    + Fix bug with Unicode filenames (#11447).+    + Catch errors loading pandoc.++  * Docx reader:++    + Recognize media inside textboxes (#11053, Raymond Berger).+    + Properly handle media stored with packaged-rooted paths+      such as `/media` (#11518).  This can be produced by the online version of Word.+      With this change, media stored at an absolute path will be stored+      with its original name and not given a SHA1-based name.+    + Preserve non-textbox content when unwrapping textboxes (#11510, #6893,+      #11412, #5394, #9633). Treat text inside a textbox containing an image+      as a figure caption.+    + Support `w:gridBefore` table row property (#11464, Jan Tojnar).++  * Typst reader:++    + Handle bibliography command (#11460). If this is present, a+      bibliography section is added to the document and the bibliography+      paths are added to `bibliography` in the metadata. This sets things+      up for using `--citeproc`.++  * Textile reader:++    + Handle block content in cells (#11455).++  * LaTeX reader:++    + Support `\footnotemark` and `\footnotetext` (#11450).+      These commands allow separating the footnote mark from its content, useful+      in tables, minipages, and other contexts where \footnote cannot be used+      directly.+    + Support supertabular environment (#11523, bodigrim).++  * ODT Reader:++    + Fix relative linked images (#11369, Tuong Nguyen Manh).+    + Recognize `Preformatted_20_Text` style Jan Tojnar+      This is used by LibreOffice, and we will switch to that as well.+    + Add block smushing logic (Jan Tojnar).+    + Support Preformatted Text style (#4841, Jan Tojnar).++  * Markdown reader:++    + Fix bug with `lists_without_preceding_blankline` (#11534).++  * Typst writer:++    + Don't add a carriage return after `\` for hard break (#11446).+      They are not necessary.  Note that they can still be included+      if you use `--wrap=preserve` and add a newline in your source document.+    + Improve handling of data: URIs in images. Instead of using an+      SVG with a link containing the data URI (the solution of #10460),+      we can now simply produce a `bytes` object with the requisite bytes.+      Typst figures out the format automatically.+    + Fix escaping of quotes (#11463).+    + Include alt attributes on images (mcanouil).+    + Properly escape `.` after bracketed argument (#11511).++  * Docx writer:++    + Don't depend on `extractTarget` from Docx reader.+    + Fix section breaks with `--top-level-division` (#11482, #10578).++  * EPUB writer:++    + Add cover metadata for EPUB3 (#11479). This allows+      file managers to show cover thumbnails for EPUB3 files as well.+    + Update allowed values for EPUB3 metadata `identifier.scheme` (#11481,+      Pascal Wagler).++  * ODT writer:++    + Rename inline source class to match LibreOffice (#3390, Jan Tojnar).+      Rename the text style we use to represent `Code` inlines from+      `Source_20_Text` to `Source_Text`. This is the same name LibreOffice+      Writer uses so it will be recognized by the Character Styles section+      of the Styles menu.+    + Remove font size from inline source class (Jan Tojnar). This matches+      what LibreOffice Writer is doing. Also fixes literals inside+      headings being too small.+    + Modernize `Preformatted Text` & `Source Text` styles (Jan Tojnar).+      Presumably, `font-family-generic` and `font-pitch` will allow to find a+      replacement on systems that do not have `Courier New`.++  * Markdown writer:++    + Fix rendering of alerts (#11479). We only properly handled the case+      where the alert started with a paragraph, but it can start with a list+      or other block type.+    + Escape literal `&` that would trigger entity (#11490).++  * HTML writer:++    + For revealjs, default `scrollProgress` to `auto` (Christophe Dervieux).++  * PPTX writer:++    + Register content type for embedded fonts (#11492).++  * MediaWiki writer:++    + Use appropriate syntax for external images (#11494).+      Note that they will only be rendered as images if an option+      `$wgAllowExternalImages` is enabled in the MediaWiki instance.++  * ICML writer:++    + Support for image object styles (#11498, massifrg).+      This change allows users to style images in InDesign bysetting the+      `object-style` attribute in a pandoc Image, which is mapped to the+      AppliedObjectStyle attribute in the Rectangle element around an Image+      element in the resulting ICML.++  * JATS writer:++    + Improve representation of Divs (Albert Krewinkel).  The writer now+      checks if the element used to represent (non-special) Divs has any+      `<boxed-text>` specific attributes. If it does, the writer keeps+      wrapping the Div contents in a `<boxed-text>`, as it did before.+      Otherwise, the writer falls back to the more appropriate `<p>` element+      or simply unwraps the Div if the wrapping element wouldn't have any+      attributes. The new behavior gives better semantic results in most cases,+      as `<boxed-text>` should be used for text that "is outside the flow of the+      narrative text", which doesn't apply to most divs.+      "Special" divs, like those used to mark sections, are not+      affected by this change.++  * Text.Pandoc.Writers.GridTable:++    + Normalize tables (#8102). Previously, if an invalid table was passed to+      `toTable`, an array index error could be raised. Normalizing the table+      forces it into a shape that won't allow this error.++  * Lua subsystem (Albert Krewinkel):++    + Add new function `pandoc.types.Sources` (#11441).++  * LaTeX template: properly handle keywords with commas.+    These need to be put in an `\xmpquote{..}` command. Closes #11528.++  * HTML styles template:  avoid duplicate code selector.+    Consolidate two clauses. Closes #11484.++  * Revealjs template: fix type rendering of scroll-view options+    (Christophe Dervieux, #11486).++  * Typst template:++    + Use both place and block for title (Gordon Woodhull).+      Otherwise the title will be confined to the left column+    + Put title block in a conditional (#11529). This avoids an+      empty block for documents that lack metadata information.+      The empty block causes problems if `#set page` is used, as+      it will cause a page break.++  * Beamer template: add `logooption` variable (#11452, Sidney Mau).++  * Text.Pandoc.ImageSize:++    + Correctly handle percentage width, height on SVG (#11530).+      Previously we were getting image size of 0 when a percentage+      was specified for width or height on SVG.  With this change,+      we simply ignore these percentages (becaues ImageSize doesn't+      know the size of the containing element).++  * Re-add `-threaded` to compile options in pandoc-cli.++  * Use released djot, asciidoc, texmath, typst.++  * Allow crypton 1.1, tls 2.2, http-client-tls 0.4.++  * Require auto-update >= 0.2.6 to fix server on macOS (#11488).++  * pandoc-cli.cabal: bump base min bound to 4.18 (same as pandoc).++  * MANUAL.txt:++    + Note that JSON may be used in YAML metadata blocks (#11525).+    + Update link for ICML in manual.+    + Fix outdated OPML spec URL in MANUAL.txt (#11504, Peter Briggs).++## pandoc 3.9 (2026-02-03)++  * Add support for compiling pandoc to WASM. (To build, `make+    pandoc.wasm`.) A stanza in `cabal.project` contains the+    necessary build modifications. We owe this almost entirely to+    TerrorJack, who created the original proof of context and+    came up with the necessary build flags and patches to some+    dependencies.++    `pandoc.wasm` has almost all the power of regular pandoc. The+    main limitations is that it operates in a WASM sandbox and thus+    cannot use HTTP to fetch resources and cannot run system commands.+    As a result, JSON filters cannot be used, `--embed-resources`+    works only with resources that have been explicitly provided in+    the WASM sandbox, and PDFs cannot be produced (since that requires+    running external commands). However, Lua filters can be used,+    as long as they do not run system commands.++    A JavaScript bridge module, `wasm/pandoc.js`, is provided; this+    handles the setup necessary to run `pandoc.wasm` in a browser.++    In addition, a full-featured GUI interface is provided in the+    `wasm` subdirectory. `make serve` from that directory and it+    will run locally, or visit <https://pandoc.org/app>.  Note that+    once the relevant code has been downloaded by the browser, it runs+    entirely in the browser, and the conversions never touch a server.+    The GUI was developed in interaction with Claude Code.  This app+    includes a WASM version of Typst and can produce PDF output via+    Typst.++  * Defaults files may now be either JSON or YAML (though a `.yaml`+    extension will still be assumed if the file has no extension).+    The structure of a JSON defaults file is isomorphic to that of+    a YAML defaults file.++  * Variable expansion now works even for the `defaults` field of+    defaults files (#8024, Jacob Larkin).++  * `--extract-media` will now create a zip archive containing the media+    (instead of a directory) if the path provided has a `.zip` extension.++  * Processing with `--citeproc` is now affected by a+    `reset-citation-positions` class on headings. When the+    `reset-citation-positions` class is added to a top-level+    heading, `--citeproc` will reset position information at that+    point in the document. This is needed in order to ensure that+    the first citation in a chapter to a work that has been cited+    in a previous chapter will not be in abbreviated form.++  * RST reader:++    + Fix definition lists where term ends with `-` (#11323).+      This reverts some old code giving special treatment to+      lines ending in hyphens; I don't understand why it was+      there, because rst2html does not seem to do this.++  * HTML reader:++    + Revert an earlier change that caused style tags in the body+      to be ignored (#10643, #11246).+    + Parse inline style elements as RawInline (#10643, #11246).++  * Markdown reader:++    + Fix parsing of inline math (`$...$`) (#11311, benniekiss).+      Do not allow blank lines before closing `$` delimiter. This brings the+      parser in line with the documentation.+    + Allow superscripted spans (#11409). These were being parsed as inline+      notes. Now we disallow an inline note followed by+      attributes, as this is almost certainly meant to be a span.+    + Support `alerts` extension for pandoc markdown (#9716). It is not+      enabled by default.++  * MediaWiki reader:++    + Add behavior switches support (#11354, Anton Melnikov).+      They add a field to metadata without producing any text.+    + Handle non-recognized tags as plain text (#11299).+    + Better handling of inline tags (#11299). `<mark>`, `<var>`,+      `<samp>`, and `<kbd>` now produce Code or Span elements with+      classes, which can be handled by multiple output formats,+      instead of simply being parsed as raw HTML tags.++  * RTF reader:++    + Ensure a new paragraph on `\pard` (#11361, Tuong Nguyen Manh). New+      paragraphs may start with `\pard` alone without an explicit paragraph+      break with `\par` preceding it.+    + Improve hyperlink parsing more (#10942, Tuong Nguyen Manh).+      Both the field instruction and its result may be ungrouped.+    + Fix bug where list items were incorporated into a following table+      (#11364).++  * ODT reader:++    + Add table row and column spans (#11366, Tuong Nguyen Manh).+      Parse the number-rows-spanned and number-columns-spanned attributes to+      create Cells for the Table.++  * DocBook reader:++    + Support "role" attribute (#11255, Yann Trividic). The `role`+      attribute is parsed and added to Pandoc AST elements, using a+      wrapper Div if needed.+    + Omit empty title when not required (#11422).+      This affects example and sidebar elements.+    + Fix adding wrong metadata (#11300, Tuong Nguyen Manh). Now+      keep track of the current element stack to only add metadata+      if inside an appropriate parent element.++  * DocBook/JATS reader:++    + Don't export surrounding space from inline elements (#11398). Previously+      we would export leading and trailing space inside elements like+      emphasis or ulink so they appeared outside the resulting pandoc Inline+      (Emph or Link). This is not really motivated; DocBook and XML in general+      treats leading and trailing whitespace in this context as significant.++  * Docx reader:++    + Handle tables without `tblGrid` (#11380).+    + Look inside v:rect as well as v:shape (#11412).++  * LaTeX reader:++    + Handle more quote macros from fontspec and ngerman babel (#6120).++  * Org reader:++    + Don't include 'example' class when parsing org example blocks (#11339).+      These are just unmarked code blocks.++  * Texinfo writer:++    + Improve handling of certain code blocks (#11312).+      MediaWiki, for example, will parse a code block containing+      formatting as a sequence of Code elements separated by+      LineBreaks. For this we now use a texinfo example block.++  * Typst writer:++    + Escape hyphens when needed (#11334).++  * HTML writer:++    + Include all classes on highlighted code elements (#11423). Previously,+      only the language class was included, and the others were dropped.+    + Slide formats: Make `. . .` pause work in nested blocks (#7201, #7582).+    + For revealjs, add idiomatic highlight.js support (#11420, Claude Opus 4.5).+      When using `--syntax-highlighting=idiomatic` with reveal.js output, pandoc+      now generates HTML compatible with reveal.js's built-in highlight.js plugin:+      Code blocks use `<pre><code class="language-X">` format.+      The template loads highlight.js CSS, JS, and RevealHighlight plugin.++  * Markdown writer:++    + Ensure that `\ ` line breaks are used for commonmark.+    + Use setext for headers containing line breaks for commonmark (#11341).+    + Allow display math to start/end with space (#11384).+      This reverts to earlier < 3.7 behavior.+    + Properly handle tables with footers (#11416).++  * JATS writer:++    + Fix XML output for nested figures (#11362, Albert Krewinkel).+      Subfigures are now wrapped inside a `<fig-group>` element. Furthermore,+      figure content that isn't allowed as children of `<fig>` elements, such as+      raw text, gets wrapped in `<p>` elements to ensure schema-conforming XML.++  * AsciiDoc writer:++    + Use doubled delims in more contexts (#11362). Also escape the `#` character.+    + Use a span with role for SmallCaps (#11374).+    + Export spaces inside delimited constructs like emph.++  * Docx writer:++    + Skip directory entries when building media overrides (#11379, You Jiangbin).+      Pandoc's docx writer was previously adding an `<Override>` for+      `/word/media/` in `[Content_Types].xml` when the reference doc contains+      media, which violates OPC rules and causes Word to report corruption.+    + Refactor the monolithic `writeDocx` into a number of smaller functions+      (Claude Opus 4.5).+    + Replace generic XML traversal with direct path navigation (Claude+      Opus 4.5). Instead of using Data.Generics `everywhere` to traverse the+      entire XML tree when setting language attributes, navigate directly to+      the known path `w:docDefaults/w:rPr/w:lang`. This is more efficient and+      removes the dependency on `Data.Generics`.++  * EPUB writer:++    + Don't use footnote backlinks for EPUBv3. Here we use aside elements,+      which are popups, and the backlinks are not needed; in some readers+      they cause a redundant number to appear, since the reader adds a note number.++  * MediaWiki writer:++    + Use Doc Text instead of Text for document construction (with Claude Open 4.5).+      This refactors the writer to use Text.DocLayout combinators (vcat, hcat,+      literal, blankline, cr, chomp) for building output, following the pattern+      used by other text format writers (RST, Markdown, Man). This enables+      better control over line spacing and paragraph separation.+    + Improve blank space around div elements (#11417). This is merely cosmetic.++  * PPTX writer:++    + Support notes field in metadata for title slide (#5844, Chris Callison-Burch).+      This adds support for a `notes` field in the YAML metadata block that will+      be used as speaker notes for the title slide in PowerPoint output.+      Previously, there was no way to add speaker notes to the title slide since+      it is generated from metadata rather than from content blocks.++  * LaTeX writer:++    + Add PDF standard support via DocumentMetadata (#11407, Gordon Woodhull+      with Claude Opus 4.5). The `pdfstandard` variable can be+      used to specify PDF standards (PDF/A, PDF/X, PDF/UA) in+      LaTeX output. This uses LaTeX's `\DocumentMetadata`+      command, which requires LuaLaTeX. PDF version requirements+      are automatically inferred, but can be explicitly overridden.+      Automatic tagging is added for standards that require it.++  * Typst template:++    + Fix keywords usage. (#11317, har7an).+    + Disable hyphenation for title, subtitle (#11375).+    + Improve accessibility of definition lists (#11436). Before this+      change, our show rule produced an error when typst was run with+      `--pdf-standard=ua1`.++  * HTML5 template:++    + Conditionally include lang attribute, instead of providing+      it with an empty value.++  * JATS template:++    + Fix author prefix placeholder (#11381, Christophe Dervieux).++  * Text.Pandoc.Citeproc:++    + Fix biblatex parsing of `@commentary` entries (#11322).+    + Fix typo affecting `jurisdiction` biblatex type (#11321).+    + Avoid adding an extra space at the beginning of a Cite.++  * Text.Pandoc.Shared:++    + Export `hasLineBreaks` [API change]. This was formerly+      defined in the DocBook writer but more generally useful.++  * Text.Pandoc.PDF:++    + Add `SOURCE_DATE_EPOCH` to verbose environment variable info.++  * Text.Pandoc.Class:++    + Factor out `openURL` into Text.Pandoc.Class.IO.HTTP (unexported module).++  * Lua subsystem (Albert Krewinkel):++    + Mark readers and writers with their types (#11367). The+      `pandoc.readers` and `pandoc.writers` maps now have string values+      instead of boolean values. The string signals the type of the+      reader/writer, `"text"` for TextReader/TextWriter and `"bytestring"`+      for ByteStringReader/ByteStringWriter.+    + Support equallity checks of LogMessage objects.+    + Add function `pandoc.with_state` (#10859). The function allows+      to run a callback with a modified pandoc state. This provides+      the ability to temporarily modify the resource path, the user+      data directory, and the HTTP request headers.+    + Let `pandoc.with_state` error on unknown options (#11376).+    + Add function `pandoc.utils.documentation` (#10999).+      This is now used to generate much of the Lua API documentation.++  * Text.Pandoc.App:++    + Remove redundant check for asciidoc in UnknownReader.++  * Text.Pandoc.Logging:++    + Add `pretty` field to ToJSON instance for LogMessage.+      This just reproduces the output of `logMessage`, for convenience for those+      who are using the JSON output outside of Haskell.++  * Text.Pandoc.Error:++    + Change PandocHttpError constructor to take a Text instead of an+      HttpException as the second argument (see #10980) [API change]+      Motivation: exposing HttpException in the public API makes it+      difficult to provide a version of pandoc that can be compiled+      to wasm, which currently can't handle the network libraries.+    + Define `displayException` for PandocError. This is a behavior change,+      not an API change, since there was already a definition that defaulted+      to using Show. The change here is that we use `renderError` for+      a more human-readable version.++  * Drop support for compilation with GHC versions < 9.6.++  * Use released citeproc 0.13, djot 0.1.3, skylighting-format-blaze-html+    0.1.2 (see #11423), texmath 0.13.1, asciidoc 0.1.0.1, typst-0.9,+    hslua 2.5.++  * Add `-Wno-deriving-typeble` to cabal ghc-options for ghc >= 9.12.++  * Add `http` cabal flag (#10980). This allows pandoc to be+    compiled without support for making HTTP requests, which is+    useful when WASM is the target.++  * pandoc-lua-engine has a new build flag `repl`, allowing support+    for the Lua repl to be disabled for the wasm build.++  * We now sign Windows artifacts with a code signing+    certificate provided by SignPath.++  * Mention Excel in cabal description.++  * Makefile: remove some obsolete targets.++  * MANUAL.txt:++    + Fix typo about `--chunk-template` (#11358, Albert Lei).+    + Fix link for bbcode_steam (#11389).+    + Small rewrite of syntax-highlighting info.+    + Fix defaults.yaml example for `wrap`.++  * Fix a few mistakes in the contributing docs. (#11318, har7an).++  * Fix a couple small errors in `doc/lua-filters.md`,+    `doc/custom-writers.md`, and `doc/custom-readers.md`+    (#11408, #11388).++## pandoc 3.8.3 (2025-12-01)++  * Add `asciidoc` as an input format (#1456).++  * Add `xlsx` (Microsoft Excel) as an input format (Anton Antich).+    Each worksheet turns into a section containing a table.++  * Add `pptx` (PowerPoint) as new input format (Anton Antich).++  * Add `bbcode` as a new output format (#11242, reptee). Several variants+    of BBCode are also supported: `bbcode_fluxbb` (FluxBB), `bbcode_phpbb`+    (phpBB), `bbcode_steam` (Hubzilla), `bbcode_hubzilla` (Hubzilla),+    and `bbcode_xenforo` (xenForo).++  * New exported module Text.Pandoc.Readers.AsciiDoc,+    exporting `readAsciiDoc` [API change].++  * New module `Text.Pandoc.Readers.Pptx`,+    exporting `readPptx` (Anton Antich) [API change].++  * New module `Text.Pandoc.Readers.Xlsx`,+    exporting `readXlsx` (Anton Antich) [API change].++  * LaTeX reader:++    + Revert `\linebreak` as LineBreak (#11272). `\linebreak` is more+      of a hint, it shouldn't produce a hard break.+    + Better handling of `\makeatletter` in parsing raw LaTeX (#11270).+    + Fix spurious paragraph breaks in math environments (#11265,+      Emmanuel Ferdman). Previously, a math environment with extra+      space before the `\end` would get rendered with a blank line,+      which LaTeX treats as a paragraph break.+    + Change type on `rawLaTeXParser` in Text.Pandoc.LaTeX.Parsing.+      The preparser doesn't need to return a value.+    + Fix `rawTeXParser` (#11253).  Make macro expansion in raw LaTeX+      depend on the setting of the `latex_macros` extension.  Previously+      macros were always expanded, even in raw TeX in markdown. In+      addition, there was previously a bug that caused content to be+      garbled in certain cases.+    + Handle `ifstrequal` at a lower level, like the other `if`+      commands (#11253).+    + Move `ifstrequal`, `iftoggle`, etc., which were misplaced in+      `environments`, to `blockCommands`, so these commands work properly.++  * Docx reader:++    + Handle REF link instruction (#11296, Ezwal).+    + Check recursively for caption styles (Albert Krewinkel).+      The docx reader uses caption styles to identify figures and+      captioned tables. It now checks for known caption styles in the+      full styles hierarchy of a paragraph instead of just checking+      the style directly. This allows to recognize caption styles that+      are built on top of the basic *caption* style, as is sometimes+      the case in sophisticated styles.++  * Markdown reader:++    + Fix performance issue in links with `'` (#10880).++  * Typst reader:++    + Handle document metadata and `#title` (jgm/typst-hs#80).+      Note that previously, the typst reader never returned document+      metadata.  Now it does, even if the typst document does not contain+      a `#title` function that would result in actually printing the+      title block.++  * Djot reader:++    + Add Space elements (#11250). Previously we just got big+      Str elements with spaces included. But many pandoc writers+      assume that breakable spaces will be Space elements, and this+      is also required for automatic wrapping.++  * RST reader:++    + Correctly handle intraword emphasis (#11309).++  * Text.Pandoc.Readers:++    + Export `readAsciiDoc`, `readXlsx`, `readPptx` [API change].++  * New module Text.Pandoc.Writers.BBCode, exporting+    `writeBBCode`,  `writeBBCodeSteam`, `writeBBCodeFluxBB`,+    `writeBBCodePhpBB`, `writeBBCodeHubzilla`, `writeBBCodeXenforo`+    [API change].++  * LaTeX writer:++    + Make level 1-3 headings work inside blockquotes (#11281, James Barlow).+    + Remove `split` from list of math environments (#11274).+    + Improve handling of math environments in tex math (#11266).++  * HTML writer:++    + Add reveal.js `scroll` and `scrollSnap` options to writer and+      template (#10052, Asliddinbek Azizovich).+    + Use 'defer' when including mathjax script, as recommended in+      MathJax docs (#11292).++  * ANSI writer:++    + Apply row spans in tables (#10149, Tuong Nguyen Manh).+      The ANSI writer is now able to keep track of row spans and apply+      them in rows.++  * Pptx writer:++    + Handle reference doc without slides (#7536, Tuong Nguyen Manh).++  * AsciiDoc writer:++    + Add more table features (#11267, Tuong Nguyen Manh):+      Row span and column span, footer row, individual horizontal+      cell alignment.++  * Typst template:++    + Fix font for compatibility with typst 0.14, which doesn't+      permit an empty array for `font` (#11238).+    + Re-add `columns` to typst template (#11259), fixing a+      pandoc 3.8 regression.+    + Fix syntax for bibliography inclusion (#11233, Mickaël Canouil).+      Previously the syntax was wrong when multiple bibliography files+      were specified. Typst expects an array.++  * Text.Pandoc.Writers:++    + Export `writeBBCode`,  `writeBBCodeSteam`, `writeBBCodeFluxBB`,+      `writeBBCodePhpBB`, `writeBBCodeHubzilla`, `writeBBCodeXenforo`+      [API change].++  * Text.Pandoc.Writers.Shared:++    + Add functions `insertCurrentSpansAtColumn`, `takePreviousSpansAtColumn`+      and `decrementTrailingRowSpans` for applying and keeping track of+      RowSpans over multiple rows (#10149, Tuong Nguyen Manh). [API change]++  * Text.Pandoc.Logging:++    + Change message for missing HTML title warning (#11307). Suggest+      setting the `pagetitle` variable instead of setting `title` in metadata.++  * Lua subsystem:++    + Preserve common state of custom Lua readers (Albert Krewinkel).+      The common state is transferred to Lua when calling a custom Lua+      reader, and is now also transferred back after the reader has+      finished. This ensures that info messages, warnings, and+      mediabag entries are available to the main program and all+      subsequent processing steps.++  * Text.Pandoc.PDF:++    + Avoid converting SVG to PDF when non-TeX PDF engine is used (#11275).+      This fixes a 3.8 regression, which caused documents with SVGs to+      raise an error when converted to PDF using WeasyPrint.+    + Fix a 3.8 regression with typst and smart quotes (#11256).+      Before 3.8, the default behavior when producing a PDF `-t typst`+      was to produce smart quotes according to typst's defaults.+      (This could be defeated by specifying `-t typst-smart`.)+      This behavior broke in 3.8 because of a change to Text.Pandoc.PDF.+      This change caused `smart` to be disabled for all formats when+      producing PDFs, when before it was only disable for TeX-based+      formats (to avoid bad ligatures). This commit restores the old+      behavior. Possibly the regression also other affects other+      non-TeX formats, e.g. HTML.++  * Text.Pandoc.Shared:++    + Add functions `allRowsEmpty` and `tableBodiesToRows` from the+      RST writer for reuse in other writers. (Tuong Nguyen Manh) [API+      change].++  * Text.Pandoc.Citeproc:++    + Allow formatting in locator to be transmitted to citeproc.+      We do this indirectly, by rendering the formatting using the+      HTML tags that citeproc recognizes.  Fixes jgm/citeproc#68+      and jgm/citeproc#163. Note that formatting is only possible for+      locators given in the explicit form, surrounded by curly braces.+      It won't work for implicit locators, since these expect+      number-like expressions.++  * New non-exported module Text.Pandoc.Readers.OOXML.Shared+    containing functions factored out from+    Text.Pandoc.Readers.Docx.Util (Anton Antich).++  * Tests: The common file `nativeDiff` has been extracted from+    the Docx and Pptx text files and put in Tests.Helpers.++  * Use asciidoc 0.1, djot 0.1.2.4, texmath 0.13.0.2, typst 0.8.1,+    citeproc 0.12.++  * MANUAL.txt:++    + Improve `implicit_figure` documentation (#11082).+    + Give both forms of options when referring to them (#11306).++  * Update INSTALL.md (#11271).++## pandoc 3.8.2.1 (2025-10-20)++  * HTML reader: allow blank space between open and close `iframe`.++  * RTF reader: improve hyperlink parsing (#11211).++  * Org reader:++    + Parse parameter lists on unknown blocks (#11188, Albert+      Krewinkel). The reader tries to parse the rest of the opening+      line of a block, e.g., `#+begin_myblock …`, as a parameters+      list. It first assumes that the parameters are in lisp-style+      (`:key value`), then alternatively tries to read python-style+      key-value pairs (`key=value`) and falls back to reading the+      entire remaining line as a single `parameter` attribute.+    + Add support for dynamic blocks.++  * Docx writer: properly handle nested comment spans (#8189, #6959,+    mourino).++  * RST writer: Don't use simple tables with RowSpans (#11214,+    Tuong Nguyen Manh).++  * Typst writer: Escape open paren after non-space (#11210).+    This fixes an issue that occurs if an open paren comes+    right after e.g. `#strong[test]`.++  * Typst template: ensure that title block is properly centered (#11221).++  * LaTeX writer/template: small fix for unnumbered tables for+    compatibility with older LaTeX installations (#11201).+    Thanks to @priiduonu for the solution.++  * MANUAL.txt: Fixed missing backtick (#11209, FoxChillz).++  * Correct anchor references to `pandoc.text` module documentation (#11111,+    Emmanuel Ferdman).++  * Fixed golden test regeneration in Docx reader test.++  * Allow unicode-data 0.8.++  * Use citeproc 0.11. This fixes a significant performance+    regression in pandoc 3.8, which was due to a rewrite of the+    default chicago-author-date.csl file. Performance with `--citeproc`+    is now on par with what we had in pandoc 3.7, even with the+    revised Chicago styles.++## pandoc 3.8.2 (2025-10-05)++  * Markdown reader/writer: implement new `table_attributes` extension+    (#10884). When `table_attributes` is enabled (as it is by default for+    pandoc's Markdown), attributes can be attached to a table by+    including them at the end of the caption. Previously the writer+    would emit an identifier in this position, but the reader didn't+    handle it. Now arbitrary attributes are allowed, and they work in+    both the reader and writer.++  * Typst writer: don't add superfluous semicolons (#11196).+    Previously we added semicolons after inline commands not+    followed by spaces, but mainly this was to deal with one issue:+    the presence of a semicolon after an inline command, which+    would be swallowed as a command separator (#9252).+    This commits adopts an approach that should avoid so many+    superfluous semicolons: it escapes semicolons that might come+    right after a command.++  * Typst template: fix 3.8 regression in which links disappear+    (#11194). A template change in 3.8 added a show rule for links which+    causes them to disappear except in special cases.++  * Text.Pandoc.Parsing: rewrite `oneOfStrings` more efficiently.++  * LaTeX writer: Fix strikeout in links (#11192, Tuong Nguyen Manh).+    As in #1294 `\url` and `\href` need to be protected+    inside an mbox for `soul` commands.++  * Text.Pandoc.Extensions: Add `Ext_table_attributes` constructor for+    `Extension` [API change].++  * Use released texmath 0.13.0.1.++  * Update FSF contact information in COPYING (#11183, Bensun Muite).++  * MANUAL.txt: remove some redundancy (#11178, Reuben Thomas).++## pandoc 3.8.1 (2025-09-29)++  * New output format `vimdoc` (Vim documentation format) (#11132, reptee).++    + [API change] Added module Text.Pandoc.Writers.Vimdoc, exporting+      `writeVimdoc`.++  * Markdown reader:++    + Improve superscript/subscript/inline note parsing (#8652).+      We do not allow inline notes to be followed by `(` or `[`.+      Otherwise, we parse inline notes before superscripts.+      Also, the sub/superscript parsers have been adjusted so that they+      really exclude unescaped spaces (as they did not before, when the+      spaces occurred in nested inlines).+    + Fix simple table alignment (#11136, Tuong Nguyen Manh). Take wide+      characters into account when determining the alignment.++  * LaTeX reader:++    + Ignore `\pandocbounded` (#11140).++  * XML reader:++    + Parse `<MetaString>` (#11137, massifrg).++  * Typst reader:++    + Add support for reading typst pagebreak (#11101, Raymond Berger).+      The pagebreak is parsed as a HorizontalRule inside a wrapper Div+      with class `page-break`.++  * Docx reader:++    + Handle figures in indented paragraphs (#11028).+    + Change default for textwidth. This should only be used if `sectPr`+      is not found.+    + Properly calculate table column widths (#9837, #11147).+      Previously we assumed that every table took up the full text+      width. Now we read the text width from the document's `sectPr`.+    + Use Tasty.Golden for Docx reader tests. This way we can update+      them with `--accept`.++  * RST reader:++    + Fix regression in simple table parsing (#11150).+    + SkippedContent warning if table directive contains+      non-tabular content.+    + Simple tables: leading space in a cell should not cause the contents+      to be parsed as a block quote (#11146).+    + Parse `:alt:` on figure (#11140). Also give a better default if+      `alt` is not specified, using the stringified caption rather+      than the filename.+    + Support col spans for simple tables (Tuong Nguyen Manh).++  * Markdown writer:++    + Improve handling of implicit figures (#11140).+      Allow implicit figures when alt text differs from caption+      (in this case, we use an image attribute to add the alt).+    + Use approximate pipe tables when it's the only option (#11128).+      If we have a table with row/colspans that can rendered as an+      approximate pipe table (without row/colspans), and no other table+      format is enabled that could render the table, we fall back to+      an "approximate" pipe table, with no row/colspans.++  * RST writer:++    + Ensure blank line before directives (#11162).+    + Add col spans for simple tables (#10127, Tuong Nguyen Manh).++  * OpenDocument writer:++    + Add missing table elements (#10002, Tuong Nguyen Manh).+      Add missing header rows after the first one,+      footer rows as well as TableBody header rows.++  * Docx writer:++    + Fix regression (from 3.8) in highlighted code (#11156).++  * Powerpoint writer:++    + Handle single column (Tuong Nguyen Manh).++  * Typst writer:++    + Fix syntax highlighting (#11171, completes #10525).+      Previously the native typst highlighting was always used, regardless+      of the setting of `--syntax-highlighting`. With this change,+      `--syntax-highlighting=none` and `--syntax-highlighting=<stylename>`+      (with skylighting style) will work.++  * LaTeX writer:++    + Make beamer footnotes compatible with pauses (#5954).+      Previously they would appear before the content to which+      the note was attached, when there were pauses in a slide.+    + Avoid `\_` in bibliography variable (#11152).+    + Ensure that unlabelled tables don't increment counter (#11141).+    + Protect VERB in caption (#11139, Tuong Nguyen Manh).+    + Don't add links to TOC (#11124, Albert Krewinkel).+    + Fix strikeouts in beamer title (#11168, Tuong Nguyen Manh).++  * LaTeX template: Add `shorthands` variable for LaTeX output+    (#11160). If true, pandoc will allow language-specific shorthands+    when loading babel. (This is helpful, for example, in getting+    proper spacing around French punctuation.)++  * epub.css: Remove coloring for `a, a:visiting` (#11174).+    This was causing links in iOS books app not to be distinguished in+    any way (since underlining is not used there).++  * Text.Pandoc.Parsing:++    + [API chage] (Tuong Nguyen Manh). New functions `tableWithSpans`,+      `tableWithSpans'`, `toTableComponentsWithSpans` and+      `toTableComponentsWithSpans'` take a list of lists of+      (Blocks, RowSpan, ColSpan) to parse a Table with different RowSpan and+      ColSpan values accordingly. New helper functions `singleRowSpans` and+      `singleColumnSpans` help set all RowSpans or ColSpans to be 1 in case+      the table format only allows setting one or the other.++  * Text.Pandoc.Class:++    + Let `fetchItem` fail if the HTTP request is not+      successful (Albert Krewinkel). HTTP requests that don't return a 200+      error code are now treated as an error. This ensures that a warning is+      triggered when using `--embed-resources` or `--extract-media`.++  * Text.Pandoc.Writers.Shared:++    + Add new function `removeLinks` [API change] (Albert Krewinkel).+      The function converts links to spans. It is used, for example, to avoid+      nested links. The HTML writer used to put the description of nested links+      into small caps, but uses a simple *span* now.++  * Text.Pandoc.Highlighting: export typst functions+    [API change]. New exported functions `formatTypstBlock`,+    `formatTypstInline`, `styleToTypst`.++  * Text.Pandoc.XML:++    + Add `fetchpriority` to list of HTML attributes (#11176).++  * Allow unicode-data 0.7.++  * Use released djot 0.1.2.3. Fixes a bug in which indentation+    was swallowed in a code block inside a blockquote.+++## pandoc 3.8 (2025-09-06)++  * Add a new input and output format `xml`, exactly representing a Pandoc+    AST and isomorphic to the existing `native` and `json` formats (massifrg).+    XML schemas for validation can be found in `tools/pandoc-xml.*`.+    The format is documented in `doc/xml.md`. Pandoc now defaults to this+    reader and writer when the `.xml` extension is used.++    Two new exported modules are added [API change]:+    Text.Pandoc.Readers.XML, exporting `readXML`, and+    Text.Pandoc.Writers.XML, exporting `writeXML`.+    A new unexported module Text.Pandoc.XMLFormat is also added.++  * Add a new command line option `--syntax-highlighting`; this takes+    the values `none`, `default`, `idiomatic`, a style name, or a path to a+    theme file. It replaces the `--no-highlighting`, `--highlighting-style`,+    and `--listings` options, which will still work but with a deprecation+    warning. (Albert Krewinkel)++  * Create directory of output file if it doesn't exist (#11040).++  * Update `--version` copyright dates (#10961), and use a hardcoded+    string "pandoc" for the program name in `--version`, per GNU+    guidelines.++  * Add `smart_quotes` and `special_strings` extensions (Albert Krewinkel).+    Currently these only affect `org`. Org mode makes a distinction between+    smart parsing of quotes, and smart parsing of special strings like `...`.+    The finer grained control over these features is necessary to truthfully+    reproduce Emacs Org mode behavior. Special strings are enabled by default,+    while smart quotes are disabled.++  * Remove the old `compact_definition_lists` extension. This was+    neded to preserve backwards compatibility after pandoc 1.12+    was released, but at this point we can get rid of it.++  * Make `-t chunkedhtml -o -` output to stdout (as documented), rather+    than creating a directory called `-` (#11068).++  * RST reader: Support multiple header rows (#10338, TuongNM).++  * LaTeX reader:++    + Support soft hyphens (Albert Krewinkel).+    + Parse `\minisec` as unlisted level 6 headings (#10635, Albert Krewinkel).+    + Support `\ifmmode` (#10915).+    + Change handling of math environments (#9711, #9296).+      Certain environments in LaTeX will trigger math mode and can't+      occur within math mode: e.g., `align` or `equation`.  Previously+      we "downshifted" these, parsing an `align` environment as a+      Math element with `aligned`, and an `equation` environment as a+      regular display math element.  With this shift, we put these in+      Math inlines but retain the original environments.+      texmath and MathJax both handle these environments well.++  * Typst reader:++    + Fix addition of image path prefix to use posix separator.+    + Properly resolve image paths in included files (#11090).+    + Handle inline-level show rules on block content (#11017).+      Typst allows things like `smallcaps` to be applied to block-level+      content like headings.  This produces a type mismatch in pandoc,+      so before processing the output of typst-hs, we transform it,+      pulling the block-level elements outside of the inline-level+      elements.++  * Org reader:++    + Improve sub- and superscript parsing (Albert Krewinkel).+      Sub- and superscript must be preceded by a string in Org mode. Some text+      preceded by space or at the start of a paragraph was previously parsed+      incorrectly as sub- or superscript.+    + Allow "greater block" names to contain any non-space char (#4287,+      Albert Krewinkel).+    + Accept quoted values as argument values (#8869, Albert Krewinkel).+    + Recognize "fast access" characters in TODO state definitions+      (#10990, Ryan Gibb).+    + Improve org-cite parsing: Handle global prefix and suffix properly.+      Use all and only the styles mentioned in oc-basic.el.+      Allow space after `;`.++  * HTML reader:++    + Don't drop the initial newline in a `pre` element (#11064).++  * DocBook reader:++    + Add rowspan support (#10981, Sean Soon).+    + Be sensitive to startingnumber attribute on ordered lists (#10912).++  * POD reader:++    + Fix named entity lookup (#11015, Evan Silberman).++  * Man reader:++    + Support header and footer reader (Sean Soon).++  * Markdown reader:++    + Don't confuse a span after an author-in-text citation with a+      locator.  E.g. `@foo [test]{.bar}`.+      See https://github.com/jgm/pandoc/issues/9080#issuecomment-3221689892.+    + Make definition lists behave like other lists (#10889).+      If the `four_space_rule` extension is not enabled,+      figure out the indentation needed for child blocks dynamically,+      by looking at the first nonspace content after the `:` marker.+      Previously the four-space rule was always obeyed.+    + Fix tight/loose detection for definition lists, to conform to+      the documentation.++  * ODT reader:++    + Support `table-header-rows` (Tuong Nguyen Manh).++  * Docx reader:++    + Don't add highlighting if highlight color is "none" (#10900).+    + Handle strict OpenXML as well as transitional (#7691).+    + Fix `stringToInteger` (#9184). It previously converted things like+      `11ccc` to an integer; now it requires that the whole string be parsable+      as an integer.+    + Improve handling of AlternateContent. This fixes handling of+      one representation of emojis in Word (#11113).++  * LaTeX writer:++    + Control figure placement with attribute (#10369, Sean Soon).+      If a `latex-placement` attribute is present on a figure, it will be used+      as the optional positioning hint in LaTeX (e.g. `ht`). With implicit+      figures, `latex-placement` will be added to the figure (and removed from+      the image) if it is present on the image.+    + Include cancel package only if there is math that contains `\cancel`,+      `\bcancel`, or `\xcancel`.+    + Add braces around comments in `title-meta` (#10501). This is needed to+      prevent PDFs from interpreting this as a sequence of titles.+    + Set `pdf-trailer-id` if `SOURCE_DATE_EPOCH` envvar is set (#6539, Albert+      Krewinkel). The `SOURCE_DATE_EPOCH` environment variable is used to trigger+      reproducible PDF compilation, i.e., PDFs that are identical down to the+      byte level for repeated runs.+    + Be more conservative about using `\url` (#8802). We only use it when the+      URL is all ASCII, since the `\url` macro causes problems when used with+      some non-ASCII characters.+    + Support soft hyphens (Albert Krewinkel).+    + Change handling of math environments (#9711, #9296).+      When certain math environments (e.g. `align`) are found in Math+      elements, we emit them "raw" instead of putting them in `$..$`.++  * Typst writer:++    + Check `XID_Continue` in identifiers (Tuong Nguyen Manh).+    + Add escapes to prevent inadvertent lists due to automatic wrapping+      (#10047). Also simplify existing code that was meant to do this.+    + Add parentheses around typst-native year-only citations (#11044).+    + Add native Typst support for `nocite` (#10680, Albert Krewinkel).+      The `nocite` metadata field can now be used to supply+      additional citations that don't appear in the text, just as with citeproc+      and LaTeX's bibtex and natbib.+    + Set `lang` attribute in Divs (#10965).+    + Rename `numbering` variable to `section-numbering` (Albert Krewinkel).+      This is the name expected by the default template.+    + Add support for custom and/or translated "Abstract" titles (Albert+      Krewinkel, #9724).++  * Org writer:++    + Don't wrap link descriptions (#9000). Org doesn't reliable display+      these as links if they have hard breaks.+    + Disable smart quotes by default (Albert Krewinkel).++  * Markdown writer:++    + Better handling of pandoc-generated code blocks (#10926).+      Omit the wrapper sourceCode divs added by pandoc around code blocks.+      More intelligently identify which class to use for the one class+      allowed in GFM code blocks.  If there is a class of form `language-X`,+      use `X`; otherwise use the first class other than `sourceCode`.+    + Use fenced divs even with empty attributes (#10955, Carlos Scheidegger).+      Previously fenced divs were not used in this case, causing the writer to+      fall back to raw HTML.+    + Match indents in definition items (#10890, Albert Krewinkel).+      Previously, the first line of a definition details item always used a+      colon and three spaces instead of respecting the tab-stop setting, which+      could lead to round-tripping issues. Likewise, the indentation of+      continuation paragraphs in definition lists now matches the+      two-characters leader of the first line for Markua output.++  * DocBook writer:++    + Use `startingnumber` instead of `override` for start numbers on ordered+      lists (#10912).++  * ANSI writer:++    + Make `--wrap=none` work properly (#10898).++  * Djot writer:++    + Fix duplicate attributes before section headings (#10984).++  * Docx writer:++    + Ensure that documents don't start with a section separator+      (#10578, Albert Krewinkel). Any leading section separator is removed from+      the result.++  * HTML writer:++    + Unwrap "wrapper" divs (#11014). Some of the readers (e.g. djot) add+      "wrapper" divs to hold attributes for elements that have no slot for+      attributes in the pandoc AST. The HTML reader now "unwraps"+      these wrappers so that the attributes go on the intended elements.++  * Asciidoc writer:++    + Handle lists with sublists following continuations (#11006).+      These require an additional blank line in some cases.++  * HTML styles template: prefix default styles with informative CSS comment+    (Albert Krewinkel, #8819).++  * Org template: add `#+options` lines if necessary (Albert Krewinkel).+    The default template now adds `#+options` lines if non-default settings+    are used for the `smart_quotes` and `special_strings` extensions.++  * LaTeX template:++    + Don't emit empty `linkcolor=` in hypersetup (#11098).+    + Add RTL support for LuaTeX engine (Reuben Thomas).++  * Typst template:++    + Add several new variables (Christopher T. Kenny, #9956):+      `thanks`, `abstract-title`, `linestretch`, `mathfont`, `codefont`,+      `linkcolor`, `filecolor`, `citecolor`.++  * `reference.docx`:++    + Don't left-align table header row (R. N. West, #11019).+    + Update East Asia font theme in `styles.xml` to `minorEastAsia` (TomBen).+    + Update language settings in `styles.xml` for East Asia to Simplified+      Chinese (TomBen).++  * Text.Pandoc.PDF:++    + `makePDF`: automatically embed resources from media bag in HTML+      before trying to convert it with weasyprint, etc. (#11099).+      This will give better results when converting from formats like docx.+    + Use `utf8ToText` for LaTeX log messages.+    + Make images from MediaBag available in tmp dir for every PDF engine,+      not just LaTeX/ConTeXt (#10911).+    + Improve error readability when pdf-engine is not supported (Albert+      Krewinkel). Each supported engine is now printed on a line of its own.+    + Allow `pdflatex-dev` and `lualatex-dev` as PDF engines (#10991, Albert+      Krewinkel). These are the development versions of the LaTeX binaries;+      installable, e.g., with `tlmgr install latex-base-dev`.+    + Clean up `makePDF` (Albert Krewinkel).+    + Avoid encoding errors when reading LaTeX logs (#10954).++  * Text.Pandoc.Readers:++    + Raise unknown reader error for `ods`, `odp`, `odf`, `xls`,+      `xslx`, `zip` extensions.++  * Text.Pandoc.App:++    + Recognize binary signatures and fail early (Repetitive). Fail early when+      receiving binary input with recognized signature: zip[-based], including+      OpenDocument and Microsoft formats, PDF, CFBF-based (old Microsoft formats+      including .doc and .xls), DjVu.+    + Remove code duplication around version info.+      Text.Pandoc.App.CommandLineOptions and `pandoc-cli/src/pandoc.hs`+      had similar code for generating version information.+      To avoid duplication, we now export `versionInfo` from+      Text.Pandoc.App [API change]. This function has three parameters that can+      be filled in when it is called by `pandoc-cli`.++  * Text.Pandoc.Parsing:++    + `tableWith` and `tableWith'` now return a list of lists of Blocks, rather+      than a list of Blocks, for the header rows, allowing for multiple header+      rows [API change] (#10338, TuongNM).++  * Text.Pandoc.Citeproc:++    + Don't move footnotes around em-dashes (#11046).+    + Allow `--citeproc` to put the bibliography in a Div with id `refs`+      even when `--file-scope` is used (#11072). When `--file-scope`+      is used, a prefix will be added based on the filename, so the Div+      will end up having an identifier like `myfile.md__refs`.+      Previously, this prevented the bibliography from being added to+      the marked Div. Now pandoc will add the bibliography to any Div+      with the id `refs` or any id ending in `__refs`.++  * Text.Pandoc.Citeproc.BibTeX: Protect case in periodical titles (#11048).+    Thus, for example, `{npj} Quantum Information` should translate as+    `[npj]{.nocase} Quantum Information`.++  * Text.Pandoc.ImageSize:++    + Detect more JPEG file signatures (R. N. West and John MacFarlane, #11049).+    + Unpack compressed object streams in PDFs and look inside for MediaBox+      information (#10902).+    + Add Point and Pica as constructors of ImageSize [API change] (#8957).+      This will prevent unnecessary conversion of units.+    + Add Avif constructor on ImageType [API change] and support avif images+      (#10979).++  * Text.Pandoc.Writers.Shared:++    + Amend docs of `lookupMeta...` functions (#10634, Albert Krewinkel).++  * Text.Pandoc.Options:++    + Add and export `defaultWebTeXURL` WebTeX URL [API change] (#11029,+      Sean Soon). This fixes the `webtex` option when used without+      parameter in a defaults file.+    + Add type `HighlightMethod` and patterns [API Change] (Albert Krewinkel).+    + The `writerListings` and `writerHighlightStyle` fields of the+      `WriterOptions` type are replaced with `writerHighlightMethod`+      [API change] (Albert Krewinkel, #10525).++  * Text.Pandoc.Extensions:++    + Remove `Ext_compact_definition_lists` constructor for+      `Extension` [API change].+    + Add `Ext_smart_quotes` and `Ext_special_strings` constructors.+      [API change].++  * Text.Pandoc.SelfContained:++    + Try fetching relative resources without query or fragment if the original+      fetch fails. This provides a fix for #1477 in a way that doesn't raise+      the problems mentioned in #11021.++  * Text.Pandoc.Highlighting:++    + Export `defaultStyle` [API Change] (Albert Krewinkel).+      This allows to be more explicit about using a default style, and+      providing a single point of truth for its value. The variable is+      an alias for `pygments`.++  * Text.Pandoc.Class:++    + `downloadOrRead`: do not drop fragment/hash for local file paths (#11021).+      With the previous behavior it was impossible to have an image+      file containing `#` or `?`.+    + Export function `runSilently` [API Change] (Albert Krewinkel).+      The function runs an action in the PandocMonad, but returns all log+      messages reported by that action instead of adding them to the main log.+    + Make CommonState opaque. Text.Pandoc.Class now exports CommonState as+      an opaque object, without its fields. [API change]+      The internal module Text.Pandoc.Class.CommonState still exports+      the fields.+    + Text.Pandoc.Class now exports the following new functions:+      `getRequestHeaders`, `setRequestHeaders`, `getSourceURL`,+      `getTrace`. [API change]+    + CommonState now has a `stManager` field. This allows us to cache the HTTP+      client manager and reuse it for many requests, instead of creating it again+      (an expensive operation) for each request. This fixes a memory leak and+      performance issue in files with a large number of remote images (#10997).++  * Lua subsystem (Albert Krewinkel):++    + Add function `pandoc.structure.unique_identifier`.+    + Add functions `pandoc.text.superscript` and `subscript`.+    + Use proper interface functions to access the CommonState.+      The `PANDOC_STATE` is no longer a userdata object, but a table that+      behaves like the old object. Log messages in `PANDOC_STATE.log` are now+      in temporal order.+    + Add function `pandoc.path.exists`.+    + Add `normalize` function to *Pandoc* objects (#10356).+      This function performs a normalization of Pandoc documents. E.g.,+      multiple successive spaces are collapsed, and tables are normalized such+      that all rows and columns contain the same number of cells.+    + Add more UTF-8-aware file operations to `pandoc.system`.+      Functions that expect UTF-8-encoded filenames should make it easier to+      write platform-independent scripts, as the encoding of the actual+      filename depends on the system. In addition, there is a new+      generalized method to run commands, and functions to retrieve XDG+      directory names. The new functions are `command`, `copy`, `read_file`,+      `remove`, `rename`, `times`, `write_file`, `xdg`.+    + Allow hslua-2.4.+    + Require lua-module-system 1.2.3. This provides List methods to the value+      returned by `pandoc.system.list_directory` (#11032).++  * MANUAL.txt:++    + Fix broken ConTeXt links (R. N. West, #11055).+    + Add `xml` as input/output format.+    + Fix minor capitalization typo (#11052, Albert Krewinkel).++  * `doc/lua-filters`:++    + Fix docs for `pandoc.Cite` (Albert Krewinkel).+    + Don't encourage returning tables of filters from Lua filters+      (R. N. West, #10995). Use the `Pandoc:walk` method instead.++  * doc/extras.md: Fix link to pandoc-mode (Erik Post).++  * doc/lua-filters.md: Add example on using pandoc.Table constructor (#10956,+    Sean Soon).++  * Update `default.csl` from new chicago-author-date.csl, which is now+    for the 18th edition.++  * Use latest releases of citeproc, typst-hs, texmath, doclayout,+    skylighting-core, skylighting.++## pandoc 3.7.0.2 (2025-05-28)++  * RST writer:++    + Don't emit alignment markers in grid tables (#10857).++  * Asciidoc writer:++    + Add support for sidebars (GHyman83).++  * LaTeX writer:++    + Include alt option in `\includegraphics` (#6095).++  * Markdown writer:++    + Preserve figure attributes (Nikolay Yakimov, #10867).+      Fixes a regression introduced by 0d2114e, which caused the+      Markdown writer to ignore attributes on the figure if it+      has class or key-value attributes set.++  * HTML writer:++    + Use the ID prefix in the ID for the footnotes section (Benjamin Esham).++  * Text.Pandoc.Writers.Shared:++    + `gridTable`: fix (3.7) regression with missing cell alignments (#10853).+    + `gridTable`: fix headings with colspans (#10855). If the heading+      contains a colspan, we still need to include information in the header+      line about the colspecs.+    + `gridTable`: fix headerless tables. The top line should encode+      colspan information.++  * Text.Pandoc.SelfContained:++    + Fix handling of empty script element (#10862). Previously in this+      case the closing tag was dropped.+    + Do not drop `data-` attributes in script tags (#10861).++  * Lua subsystem (Albert Krewinkel):++    + Add function `pandoc.mediabag.make_data_uri` (#10876).+      The function takes a MIME type and raw data from which it creates an+      RFC 2397 data URI.++  * `tools/update-lua-module-docs`: fix handling of wikilinks+    (Albert Krewinkel).++  * `doc/lua-filters.md`: add missing docs for `pandoc.Caption`+    (Albert Krewinkel).++  * Require texmath 0.12.10.3, typst 0.8.0.1++## pandoc 3.7.0.1 (2025-05-17)++  * Text.Pandoc.Shared.Writer:  Fix numerous problems with `gridTable` and add+    tests (#10848).  These fixes affect the Markdown, RST, and Muse writers.++  * Fix context writer/template to produce tagged PDFs (#10846).+    As before, the `tagging` extension must be enabled.+    We now add the command that tells ConTeXt to start tagging.++## pandoc 3.7 (2025-05-14)++  * Add new command-line option `--variable-json` (#10341).+    This allows non-string values (booleans, lists, maps) to be given to+    template variables on the command line.++  * The `--pdf-engine` option can now take `groff` as a value.++  * Markdown writer:++    + Avoid spaces after/before open/close delimiters (#10696).+      E.g. instead of rendering `x<em> space </em>y` as `x* space *y` we render+      it as `x *space* y`.+    + Handle row/colspans in grid tables, and expand cells when it isn't+      possible to lay them out without breaking string of non-whitespace.+    + Render a figure with Para caption as implicit figure (#10755).+    + When falling back to a Div with class `figure` for a figure that+      can't be represented any other way, include a Div with class+      `caption` containing the caption.+    + Improve use of implicit figures when possible (#10758).+      When the alt differs from the caption, but only as regards formatting, we+      still use an implicit figure.+    + Omit initial newlines in gfm `math` blocks to avoid an ugly blank line.+    * Support the `four_space_rule` extension for `plain` output (#10813,+      Manolis Stamatogiannakis).++  * RST writer:++    + Handle row/colspans in grid tables, and expand cells when it isn't+      possible to lay them out without breaking string of non-whitespace.++  * Muse writer:++    + Handle row/colspans in grid tables, and expand cells when it isn't+      possible to lay them out without breaking string of non-whitespace.++  * JATS writer:++    + Fix escaping for writing-review-editing role (#10744).++  * HTML writer:++    + Remove trailing slash from default revealjs URL (#8749). This+      avoids a double slash in the URL's path component.++  * LaTeX writer:++    + Make alignment work within `multirow` in tables (#10772).++  * Typst writer:++    + Support `mark` class on spans (#10747).+    + Add equation label if math contains `\label{..}` (#10805).++  * Roff format writers (man, ms):++    + Use the most compatible form for roff escapes (#10716).+      For example, `\(xy` instead of `\[xy]`. This was the original+      AT&T troff form and is the most widely supported. The+      bracketed form causes problem for some tools, e.g.+      `makewhatis` on macOS. And emit `e` followed by an escape+      for a unicode combining accent rather than the form `\[e aa]`,+      which works for groff but not e.g. on macOS's man.+      This change affects Text.Pandoc.RoffChar,+      Text.Pandoc.Writers.Roff, and the Man and Ms writers.++  * Docx writer:++    + Ensure that figures and tables with custom styles are not dropped+      (#10705).+    + Preserve Relationships for images from reference docx (#10759).+      This should allow one to include an image in a reference.docx and+      reference it in an openxml template.+    + Don't renumber rels (#10769). We used to renumber the+      Relationships so they didn't conflict with the set of fixed+      Relationships we imposed. We are now preserving the ids+      from the reference doc's document.xml.refs, so we shouldn't+      renumber them or references introduced by the user (e.g. in+      a template) will fail.++  * Ms writer:++    + Improve PDF TOC labels. We now use the plain writer to render these,+      so that Greek characters etc. will show up properly.+    + When no `pdf-engine` variable is specified, do not use the+      `.pdfhref` macros at all (#10738). This gives better results for links+      in formats other than PDF, since the link text would simply+      disappear if it exists only in a `.pdfhref` macro. When a PDF+      engine is specified, escape the argument of `.pdfhref O` in a way+      that is appropriate.++  * OpenDocument writer:++    + Fix character styles in footnotes (#10791). Character+      styles governing the position of the footnote reference+      should not be imposed on the footnote text.++  * Powerpoint writer:++    + Use reference-doc font for captions (#9896, R. N. West).++  * DocBook writer:++    + Use literallayout element for LineBlock (#10825).++  * MediaWiki reader/writer:++    + Allow definition on same line as term (#10708).++  * LaTeX reader:++    + Skip at most one argument to LaTeX tabular newline (#7512,+      Evan Silberman).+    + Disable ligatures inside `\texttt` (#10781).+    + Support more symbol commands (#10782).++  * Commonmark Reader:++    + Handle GFM math irregularity with braces (#10631). In GFM, you need+      to use `\\{` rather than `\{` for a literal brace.++  * DocBook reader:++    + Improve handling of literallayout (#10825). This is now only made+      a CodeBlock when there is a `monospaced` class. Otherwise it is made+      a LineBlock.++  * Org reader:++    + Add AVIF to Org Reader image extensions (#10736, Christian Christiansen).+    + Don't include newlines in inine code/verbatim (#10730).+      Convert newlines to spaces as we do in other formats.+    + Change handling of inline TeX (#10836). Previously inline+      TeX was handled in a way that was different from org's own export,+      and that could lead to information loss. This was particularly noticeable+      for inline math environments such as `equation`.  Previously, an+      `equation` environment starting at the beginning of a line would create+      a raw block, splitting up the paragraph containing it (see+      #10836). On the other hand, an `equation` environment not+      at the beginning of a line would be turned into regular+      inline elements representing the math. (This would cause+      the equation number to go missing and in some cases degrade+      the math formatting.) Now, we parse all of these as raw+      "latex" inlines, which will be omitted when converting to+      formats other than LaTeX (and other formats like pandoc's+      Markdown that allow raw LaTex).++  * Beamer template: fix regression in 3.6.4, reverting the omission of+    `\date` when the document does not have a date. By default, beamer+    will display a date when no `\date` is present in the title block,+    so this was an unintended behavior change. The reverted+    change was motivated by the desire to include a custom+    `\date` in the frontmatter via header-includes. This can be+    achieved more simply by simply setting the `date` variable.+    In markdown you can even use `date` in metadata and put some+    raw LaTeX there.++  * Ms template:++    + Use T rather than P as default font family (#10738).+    + Put PDF-specific things under a conditional.+      Don't include them if `pdf-engine` isn't set.++  * Upgrade reveal.js URL to v5 (#10740, Kolen Cheung).+    v4 is no longer available on unpkg.com.++  * Text.Pandoc.PDF: Allow `groff` to be used as `--pdf-engine` with `ms`+    (#10738). When `groff` is used as a PDF engine, the `groff`+    extension to `ms` is automatically enabled. Limitations:++    - `groff` currently produces larger PDFs than `pdfroff`.+    - With `groff`, a table of contents produced with+      `--table-of-contents/--toc` will always be placed at the end of+      the document.+    - Certain characters (e.g. Greek characters) may be dropped in+      the PDF outline.++  * Text.Pandoc.Writers.Shared:++    + Export `delimited` [API change].+    + New version of `gridTable` (#6344) [API change]. This+      handles row and colspans. It also ensures that cells won't+      wrap text in places where it wouldn't normally wrap, even+      if this means making the cells wider than requested by the+      colspec (#9001, #7641). Because the parameters are+      different, this is a breaking API change.++  * Text.Pandoc.App: set `pdf-engine` variable.+    If `--pdf-engine` is specified or if a PDF is being produced, we set the+    `pdf-engine` variable. This allows writers and templates to behave+    differently depending on the PDF engine.++  * Text.Pandoc.Class and Text.Pandoc.URI:++    + Fix parsing of base64 data URIs to allow URI escapes and+      whitespace (which will be ignored) (#10704).+    + Handle percent encoding in `pBase64URI` instead of+      unescaping later, for efficiency (#10704).++  * Text.Pandoc.Citeproc.BibTeX:++    + Recognize `en` as a `langid` in biblatex bibliographies (#10764).++  * Text.Pandoc.MIME:++    + Add mime type and extension for `avif` (#10704).+    + Handle `apng`, `avif`, `jxl` (#10704).++  * Text.Pandoc.Readers.LaTeX.Math: export `inlineEnvironmentNames`.+    Internal module, not a change to the public API.++  * `reference.docx` (Andrew Dunning):++    + Remove extra spaces around text placeholders.+    + Add footnote block text sample.++  * Text.Pandoc.Class.Sandbox:++    + Add `sandboxWithFileTree` function [API change] (Albert Krewinkel).++  * Lua subsystem (Albert Krewinkel):++    + pandoc-lua-engine: add all test files to the cabal file.+    + Allow `pandoc.read` to be called in "sandbox" mode for added+      security (#10831). Readers running in a sandbox will not be+      able to access the network or file system. The sandbox is+      enabled if the fourth parameter is a list of files or+      filename/content pairs. The files are read and then made+      available in the sandbox via en ersatz file system.++  * Makefile:++    + Add target `release-checkist`.+    + Install @daisy/ace from npm if not present.+    + Use pandoc lua instead of lua.+    + Fix typo in `latex-package-dependencies` target.+    + Use `jq` instead of `json_reformat` in `validate-docx-golden-tests2`.++  * NiX infrastructure: new working `flake.nix` and simpler `shell.nix`.+    Removed old `default.nix`.++  * Require random >= 1.3 and use `splitGen`. `split` has been deprecated.++  * Use citeproc-0.9. Bump citeproc bounds for pandoc, pandoc-lua-engine.++  * Use texmath-0.12.10.1.++  * Use released typst 0.8 (partially supporting typst 0.13).++  * Use citeproc 0.9.0.1.++  * MANUAL.txt:++    + Fix default URL for revealjs.+    + Add note that `alerts` extension only works with commonmark (#9716).+    + Remove "Body Text Char" from list of Word styles that can be customized+      using a reference.docx (#10646). This doesn't seem to be present in+      pandoc-generated docx files, nor is it a Word default.+    + For pandoc lua, add note about the environment.+    + Improve documentation of `--variable` option.++  * `doc/typst-property-output.md`: Mention that `typst:no-figure` is a+    class, not an attribute (#10826, Niklas Eicker).++  * Change RELEASE-CHECKLIST to RELEASE-CHECKLIST-TEMPLATE.org. Use org-babel+    to automate many of the steps of the release.++  * INSTALL.md: update MacPorts information (#10719, Mohamed Akram).++  * COPYRIGHT: fix link to source code.++  * CONTRIBUTING.md: Fix link to discussion forum. (#10834, R. N. West).++## 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).+    Previously wikilinks were distinguished by giving them the `title`+    `wikilink`.  Now that we have link attributes, it makes more sense+    to give them the `class` `wikilink`. This change affects all readers+    and writers that support wikilinks.++  * DocBook reader:++    + Handle title inside `orderedlist` (#10594). Also some other+      elements that allow title: `blockquote`, `calloutlist`, etc.+    + Better handle `informalequation` (#10592, tombolano). Include `id`+      attribute.+    + Better handle `formalpara`, `example`, and `sidebar` (#8666, tombolano).+      Include identifiers and titles in each case.++  * Markdown reader:++    + Simplify and fix normal citation parsing (#10584).+      This fixes a bug that causes some normal citations to be+      parsed as bracketed regular citations.++  * ODT reader:++    + Create Figure elements for images that are figures (#10567).+    + Avoid producing spurious blockquotes in list items (#9505).+    + Fix unwanted block quotes (#10575). Previously the reader created+      block quotes whenever a paragraph was marked indented (even though+      this just affects the first line). With this change we still+      generate block quotes for content that has an altered left margin,+      but not for indented paragraphs.++  * Docx reader:++    + Do not issue warning for comments with `+styles` (#10571, Stephen Reindl).++  * LaTeX reader:++    + Test \{,re}newcommand arguments (#4470, Evan Silberman).++  * Pod reader:++    + Consume blanks after =encoding in pod reader (#10537, Evan Silberman).++  * JATS writer:++    + Add CRediT roles to JATS (Charles Tapley Hoyt and Jez Cope, #10152).+      Enable annotating author roles using the Contribution Role Taxonomy+      (CRediT) and export this information in conformant JATS.++  * LaTeX writer/templates:++    + Improve babel support (#8283). Previously we used the `.ini`+      files for every language, but for European languages these tend to+      provide inferior results to the `.ldf` files used by classic+      Babel. Currently Babel documentation recommends using the classic+      system for European languages written in Latin and Cyrillic+      scripts and Vietnamese. So the LaTeX writer and template now+      follow this guidance.++      Main languages in the list of languages with good "classic" support+      are added to global documentclass options and will be automatically+      handled by Babel using the `.ldf` files.++      If the main language is not in this list, the `babeloptions` variable+      will be set to `provide=*`, which will cause support to be loaded from+      the `.ini` file rather than an `.ldf`. So, for example, setting+      `-V babeloptions=''` with a polytonic Greek document will cause the+      `.ldf` support to be used instead of the `.ini`.++      The default setting of this variable can be overwritten, but in most+      cases the default should give good results.++    + Allow `csquotesoptions` to be specified.+    + Fix indentation bugs in `font-settings.latex`.++  * Docx writer:++    + Repeat reference doc's `sectPr` for each new section (#10577).+      Previously we were only carrying over the reference doc's `sectPr`+      at the end of the document, so it wouldn't affect the intermediate+      sections that are now added if `--top-level-division` is `chapter`+      or `part`. This could lead to bad results (e.g. page numbering+      starting only on the last chapter).+    + Create section divisions with `--top-level-division=part` (#10576).+    + Improve title style in reference.docx; base Author and Date+      on Title; remove condensed spacing (Andrew Dunning, #10581).++  * Typst writer:++    + Brace tables with `typst:no-figure` and `typst:text` attributes (#10563,+      Gordon Woodhull).++  * Ms writer:++    + Fix escaping of `-` (#10536). `-` should now be escaped in man+      output but not in ms output (where `\-` is a unicode minus sign).++  * HTML styles: fix style of `hr` so it works when printed (#10535, Hendrik Erz).+    Previously `background-color` was used to style the hr, but this gets ignored+    when printing.  This commit uses `border-top` instead.++  * Text.Pandoc.Shared:++    + Handle `<abbr>` as a span-like inline in `htmlSpanLikeElements`+      (#5793, Evan Silberman).++  * Text.Pandoc.MediaBag:++    + Prefer MIME type when determining extensions for MediaBag items (#10557,+      Max Heller).  This should give different results for remote images+      that are served at URLs that do not contain misleading extensions+      (e.g. `shields.io`).++  * Text.Pandoc.Citeproc:++    + Fix moving punctuation before citation notes. This previously worked with+      regular citations, but not author-in-text citations. Now it works with both.++  * `doc/lua-filters.md`:++    + Correct luacheck URL (#10589, R. N. West).+    + Add static analysis paragraph to debugging section (#10568, R. N. West).+    + Add note about extensions handling in `read` and `write` (Albert Krewinkel).++  * `doc/extras.md`:++    + Add entry for pandoc-subfigs (R. N. West).+    + Update diagram Lua filter URL and description (R. N. West).++  * MANUAL.txt:++    + Add note on using typst to produce pdf/a-2b.+    + Document top-level-division functionality with Docx (#10579, Andrew Dunning).++  * Raise xml-conduit upper bound.++  * Depend on latest commonmark-pandoc, commonmark-extensions,+    citeproc, typst.++  * Makefile: make `make binpath` quiet.++## pandoc 3.6.2 (2025-01-12)++  * New input format: `pod` (Evan Silberman). Pod ("Plain old documentation")+    is a markup languaged used principally to document Perl modules and+    programs.++  * New reader module Text.Pandoc.Readers.Pod, exporting `readPod`+    [API change].++  * Docx reader:++    + Support row heads in tables (#9495). Reader: When `w:tblLook` has+      `w:firstColumn` set (or an equivalent bit mask), we set row heads = 1+      in the AST.+    + Read table styles as custom styles when `styles` extension+      is enabled (#9603).++  * HTML reader:++    + Add size information for font awesome SVG icons (#10134).+      If the icon has class `fa-fw` or `fa-w16` or `fa-w14`, we add a width+      attribute to prevent the icon from appearing full-width in PDF or+      docx output.++  * Djot reader:++    + Use a Span with class "mark" rather than "highlighted" for+      highlighted text, for consistency with the other pandoc readers and+      writers.++  * mandoc reader:++    + Add mdoc St for C23 (Evan Silberman).++  * RST reader:++    + Fix handling of underscores (#10497). Fixes a a regression+      introduced in 3.6.++  * Docx writer:++    + Support row heads in tables (#9495). Writer: set `w:firstColumn` in+      `w:tblLook` when there are row heads. (Word only allows one, so this+      is triggered by any number of row heads > 0.)++  * Djot writer:++    + Render a Span with sole class "mark" as highlighted text.++  * Asciidoc writer:++    + Don't emit the class in a span if it's just "mark" (#10511).+      The "mark" class is used for highlighting, and Asciidoc treats+      bare `#...#` with no attributes as highlighted text.+    + Improve escaping (#10385, #2337, #6424).++  * EPUB v2 writer:++    + Fix cover image (#10505).  This is a regression introduced in 3.6.++  * Typst writer:++    + Fix handling of pixel image dimensions (#9945).+      These are now converted to inches as in the LaTeX writer.++  * Improve error message given when users specify `asciidoc` as input+    format (#8416, Santiago Zarate).++  * Allow random 1.3.++  * Use texmath 0.12.8.13 (typst improvements).++  * `lua-filters.md`: document `system.os` return values (#10523).++  * `MANUAL.txt`:++    + Improve manual's coverage of custom styles.+    + Replace LibreOffice PDF documentation link to latest so it links+      to the latest major release rather than a specific major release+      (which there are two of every year) (Stéphane Guillou).+    + Improve links and descriptions for `odt`, `opendocument` (#10518).++## pandoc 3.6.1 (2024-12-23)++  * Allow YAML bibliographies to be arrays of references (#10452).+    Previously, they had to be YAML objects with a `references` key.++  * Change `--template` to allow use of extensionless templates (#5270).+    The intent is to allow bash process substitution: e.g.,+    `--template <(echo "foo")`. Previously pandoc *always* added an+    extension based on the output format, which caused problems+    with the absolute filenames used by bash process substitution+    (e.g. `/dev/fd/11`). Now, if the template has no extension,+    pandoc will first try to find it without the extension, and+    then add the extension if it can't be found. So, in general,+    extensionless templates can now be used. But this has been+    implemented in a way that should not cause problems for+    existing uses, unless you are using a template `NAME.FORMAT`+    but happen to have an extensionless file `NAME` in the template+    search path.++  * Allow `--shift-heading-level-by=-1` to work in djot in the same way+    it works for other formats (with the top-level heading being+    promoted to metadata title) (#10459).  This needed special+    treatment because of the way djot surrounds sections with Divs.++  * RST reader:++    + Handle explicit reference links (#10484, Evan Silberman).+      This case was missed when changing the reference link strategy for+      RST to allow a single pass. (It is a regression in pandoc 3.6.)++  * Markdown reader:++    + Use T.P.URI's `pBase64DataURI` in parsing data URIs (#10075,+      Evan Silberman and John MacFarlane).+    + More efficient base64 data URI parsing (#10075, Evan+      Silberman and John MacFarlane). This should yield dramatic+      performance improvements for markdown documents containing+      large data URIs in images.++  * HTML reader:++    + Don't canonicalize data: URIs (#10075). It can be very expensive+      to call network-uri's URI parser on these.++  * LaTeX reader:++    + Handle `figure*` environment as a figure (#10472).++  * MediaWiki reader:++    + Allow empty quoted attributes (#10490).+    + Allow cells starting with `+` (#10491).++  * Textile reader:++    + Improve parsing of spans (#9878). The span needs to be separated+      from its surroundings by spaces. Also, a span can have attributes,+      which we now attach.+    + Inline constructors shouldn't trigger if closer is preceded by+      whitespace (#10414).++  * Docx writer:++    + Put chapters in separate sections, and restart footnotes+      by section by default (#2773). The main effect of this change is that+      when `--top-level-division=chapter` is used, chapters will start on+      a new page and footnote numbering will restart for each chapter.+      Both of these defaults can be overridden in the reference.docx.+    + Use styleIds not styleNames for Title, Subtitle, etc.+      (#10282). This fixes a regression introduced in pandoc 3.5.+      This change affects the default openxml template as well as the+      OpenXML writer.++  * Markdown writer:++    + Avoid collapsing of initial/final newline in markdown raw blocks.+      This makes it easy to write a filter that adds extra blank lines+      before certain elements (#10477).++  * Mediawiki writer:++    + Escape line-initial characters that would otherwise be interpreted+      as list starts (#9700).++  * LaTeX writer:++    + Properly handle boolean value for `csquotes` variable (#10403).+    + Use displayquote for block quotes with `csquotes` (#10456).++  * HTML writer:++    + Avoid calling parseURIString for data URIs (#10075).+      This was done to determine the "media category," but we can+      get that directly from the mime component of data: URIs.++  * Typst writer:++    + Properly handle data URIs in images (#10460).++  * LaTeX/Beamer templates:++    + Fix default.beamer `nocite` location (Thomas Hodgson).+      It must be inside a frame or it is ignored (#10465).+    + Move nocites from LaTeX preamble to body (#10461, Thomas+      Hodgson). Putting `\nocite` in the preamble works only with biblatex.++  * Text.Pandoc.Parsing:++    + Correct example in comment on `charsInBalanced` (Evan Silberman).++  * Text.Pandoc.Error:++    + Mention typst in rendering `PandocUnknownWriterError` for `pdf`+      (Evan Silberman).++  * Text.Pandoc.MediaBag:++    + `insertMedia`: fast path for data URIs. Avoid the slow URI+      parser from network-uri on large data URIs (#10075).++  * Text.Pandoc.Class:++    + Add shortcut for base64 data URIs in `downloadOrRead` (#10075).+      This avoids calling the slow URI parser from network-uri on+      data URIs, instead calling our own parser.++  * Text.Pandoc.MIME:++    + Fix `extensionFromMimeType`. We had a few special cases encoded,+      but as previously written they wouldn't work properly with+      modifiers like `;charset=utf-8`.++  * Text.Pandoc.URI:++    + Export `pBase64DataURI`.  Modify `isURI` to use this and avoid+      calling network-uri's inefficient `parseURI` for data URIs.++  * Text.Pandoc.PDF:++    + Fix temp file extension in `toPdfViaTempFile` (#10468).+      This fixes a regression in pandoc 3.6, which changed+      the extension from `html` to `source`. Apparently+      `wkhtmltopdf` needs it to be `.html`.  So now we have added+      a parameter to `toPdfViaTempFile` that allows the extension+      to be specified in a way that is appropriate to the PDF engine+      used.++  * Lua (Albert Krewinkel):++    + Support more elements as input to `pandoc.utils.stringify`+      (#10450). Elements of type Caption, Cell, TableHead, and TableFoot+      can now be stringified.+    + Add `Caption` constructor to `pandoc` module.++  * Miscellaneous code quality improvements (Joseph C. Sible).++  * Depend on citeproc 0.8.1.2, skylighting and skylighting-core+    0.14.5.++  * `doc/lua-filters.md: Fix links to constructors (Albert Krewinkel).+++## pandoc 3.6 (2024-12-07)++  * Add `mdoc` as input format (Evan Silberman). This change+    introduces a reader for mdoc, a roff-derived semantic markup+    language for manual pages. This reader has been developed almost+    exclusively against mandoc's documentation and implementation of+    mdoc as a reference, and the real-world manual pages tested+    against are those from the OpenBSD base system. Of ~3500 manuals+    in mdoc format shipped with a fresh OpenBSD install, 17 cause the+    mdoc reader to exit with a parse error. Any further chasing of+    edge cases is deferred to future work.++  * New module: Text.Pandoc.Readers.Mdoc, exporting `readMdoc` [API change].++  * Issue warnings for duplicate YAML metadata keys (#10312).++  * Ensure that `--sandbox` affects `--embed-resources`. Previously it+    did not (contrary to what was implied by the manual), which means+    that an image with URL `/etc/passwd` would leak an encoded version+    of that file to HTML output with `--self-contained` or+    `--embed-resources`, even if `--sandbox` was used. Thanks to+    Samuel Mortenson for pointing out the issue.++  * Text.Pandoc.App.OutputSettings: add `sandbox'` function.+    This computes the sandboxed files from Opt and avoids code repetition.++  * Docx reader:++    + Parse index references as empty spans with attributes (#10171).+      Attributes included are `entry`, and optionally `bold`, `italic`,+      `yomi`, `see`.+    + Don't create multiple paragraphs for title or subtitle (#10359).+      If there are multiple paragraphs with Title or Subtitle style,+      use only the first for metadata.+    + Handle case where Zotero `itemData` has different id from the+      `citationItem` id.  In this case we use the `citationItemId`+      in the bibliography as well, overriding the `referenceId`+      in the itemData (#10366).++  * LaTeX reader:++    + Put parsed minipage in specially marked Div (#10266).++  * HTML reader:++    + Parse footnotes defined by dpub-aria roles (#5294).++  * MediaWiki reader:++    + Fix indented tables with caption (#10390).+    + Fix parsing of col/rowspan (#6992).++  * Typst reader:++    + Avoid generating empty paragraphs.+    + Support `underparen`, `overparen`.+    + Fix `#quote` attribution. If attribution is not present, don't print+      the `--` (#10320).+    + Fix typo in unicode code point for em dash (see #10320).++  * Commonmark reader:++    + `implicit_figures` should check for empty caption+      and not produce an implicit figure in this case (#10429).++  * RST reader:++    + Use a new one-pass parsing strategy. Instead of having an initial pass+      where we collect reference definitions, we create links with target+      `##SUBST##something` or `##REF##something` or `##NOTE##something`,+      and resolve these in a pass over the parsed AST. This allows us to handle+      link references that are not at the top level (#10281).+    + Ignore newlines in URL in explicit link (#10279).+    + Handle block level substitutions.+    + Support `:file:` on raw directive (#8584).+    + Implement option lists (#10318).+    + Avoid putting metadata in Para (#7766). Create MetaInlines when possible,+      just as with markdown input. MetaBlocks is still used when there are+      multiple paragraphs or non-paragraph content.+      This change also affects field lists.+    + Fix linked substitutions (#6588). E.g. `|Python|_`.+    + Support inline anchors (#9196).+    + Explicit links define references (#5081). For example,+      ``Go to `g`_ `g <www.example.com>`_.`` should produce two links to+      www.example.com.++  * EPUB writer:++    + Use standardized filename for cover image instead of the original name+      (#10404). This avoids problems with e.g. filenames containing spaces.++  * Markdown writer:++    + Issue INFO warning when not rendering table, e.g., when `raw_html` is+      disabled and the table can't be fit into a supported markdown table+      format (#10407).+    + Respect empty LineBlock lines in `plain` output (Evan Silberman).+      The plain writer behaved as a markdown variant with `Ext_line_blocks`+      turned off, and so empty lines in a line block would get eliminated.++  * LaTeX writer:++    Ensure that beamer footnotes go on frame, not column (#5769).++  * HTML writer:++    + Unwrap empty incremental divs (#10328, Albert Krewinkel).+      Divs are unwrapped if the only purpose of the div seems to be to control+      whether lists are presented incrementally on slides.++  * Typst writer:++    + Make template sensitive to a `page-numbering` variable (#10370).+      This can be set to an empty string (or, in metadata, to false) for+      no page numbers.+    + Make `smart` extension work (#10271). If `smart` is not enabled, a command+      in the default template will disable smartquote substitutions.+      When `smart` is enabled, render curly apostrophes as straight+      and escape straight apostrophes. When `smart` is disabled,+      render curly apostrophes as curly and don't escape straight+      apostrophes. Similarly for quotes, em and en dashes. This should+      give more idiomatic typst output, with fewer unnecessary+      escapes.++  * ANSI writer:++    + Respect empty LineBlock lines (Evan Silberman).++  * JATS writer:++    + Correct spelling of suppress attribute (#10350, Andreas Deininger).++  * Typst template:++    + Remove `definitions.typst` partial.+    + Remove unnecessary definition of `endnote`.+    + Incorporate the one remaining definition into `default.typst`.+    + Use typst 0.12 code for two column layout (#10294, Luis Rivera).+    + Note: the new templates presuppose typst 0.12; if you try to use an+      earlier version of typst, an error will be raised.++  * LaTeX/Beamer template:++    + Split `fonts.latex` partial into two parts: `fonts.latex` and+      `font-settings.latex`.+    + In beamer template, load beamer theme between `fonts.latex` and+      `font-settings.latex`. This allows a theme (such as metropolis)+      to set its own default font, while still allowing the user to+      override it. This fixes a regression in pandoc 3.5 (#10297).+    + Note: Users who have custom templates based on pandoc 3.5 templates will+      need to add `font-settings.latex()` after `fonts.latex()` in the+      latex template. In a beamer template, the beamer theme-setting+      code needs to be moved between these two partials.++  * ConTeXt template: Ensure that font names don't wrap (#10305).++  * `epub.css`: remove background-color (#10264, Suraj Patil).+    With this greyish background color, epubs look bad on a Kindle (#10263).++  * Text.Pandoc.ImageSize: add WebP support (Evan Silberman, #10397).+    Add `Webp` constructor on ImageType [API change].++  * Text.Pandoc.Readers.Roff and a new unexported module+    Text.Pandoc.Readers.Roff.Escape: parameterize Roff+    escaping (Evan Silberman) [API change]. This allows code to+    be reused between the mdoc and man readers, despite the+    differing Token types.++  * Text.Pandoc.PDF:++    + PDF via LaTeX: always do max runs if `toc` is present (#10308).+      The old method (checking to see if toc hash had changed) is not+      completely reliable.+    + Use `.source` extension, not `.html`, in `toPdfViaTempFile` (#10314).++  * Text.Pandoc.Logging: add `YamlWarning` constructor to `LogMessage`+    [API change] (#10312).++  * Text.Pandoc.Format: remove duplicate typst entry (#10388, Caleb Mclennan).++  * Fix a typo in the `ua.yaml` localization for 'See' (Jens).++  * Lua subsystem (Albert Krewinkel):++    + Remove prefixes from Lua type names (#8574). Lua type names were+      inconsistent with regard to the use of prefixes; all prefixes+      are removed now, and Lua types now have the same name as the+      Haskell types. The use of app-specific prefixes is suggested by+      the Lua manual to avoid collisions. However, this shouldn't be a+      problem with pandoc, as it cannot be used as a Lua package.++  * doc/libraries.md: Add newly developed Haskell packages.+    Sort list alphabetically (Albert Krewinkel).++  * doc/lua-filters.md: document `pandoc.List:iter` method (Albert Krewinkel).+    List objects have a new function `iter` that returns an iterator+    function that returns the next list item on each call.++  * MANUAL.txt:++    + Clarify what the example of YAML EPUB metadata shows (#10405).+    + Fix typo in template syntax (#10265, Pascal Wagler).+    + Update manual with information on openxml template (#10273).+    + Clarify that `--variable` can only assign string values (#10298).++  * Fix comments in TEI writer referring to DocBook (#10430, Evan Silberman).++  * Fix several typos in documentation (#10349, Andreas Deininger).++  * Allow Diff 1.0.++  * Add font-settings.latex partial to pandoc.cabal (#10379).++  * Bump upper bound for data-default.++  * Use latest typst, texmath, pandoc-lua-marshal, commonmark-pandoc,+    commonmark-extensions, skylighting, skylighting-format-blaze-html.+++## pandoc 3.5 (2024-10-04)++  * Add command-line options `--list-of-figures/--lof` and+    `--list-of-tables/--lot` (#10029, Akash Patel).+    Only docx, latex, and context are affected by these options currently.+    Setting the `lof` and `lot` variables will also work for the formats+    that are currently supported.++  * Defaults files:  interpolation of environment variables now+    works for `to` and `from` fields (#8024). This is needed because+    these files can contain paths of custom readers/writers.++  * Docx reader:++    + Reset lists after headers in same list `numId` (#10258).+      To accomplish this, we add a Heading constructor to BodyPart and+      include on it all the information list items have.++  * DocBook reader:++    + Parse id, class, and tabstyle on tables (#10181, Erik Rask).+      Add parsing of id (xml:id), class, and tabstyle XML attributes+      for table and informaltable in the DocBook reader.+      The tabstyle value is put in the 'custom-style' attribute.++  * Dokuwiki reader:++    + Be more forgiving about misaligned lists, like dokuwiki itself (#8863).+    + Improve blockquote parsing in dokuwiki. Allow for quoted code blocks.+    + Enable smart extension.+    + Properly parse `--` and `---` as dashes.+    + Fix block quote behavior (#6461). Blockquotes are not really block+      containers in DokuWiki; the lines are interpreted literally (so,+      e.g., you can't start a list), and line breaks are added at the ends.++  * EPUB reader:++    + Fix links to other files in the EPUB, making them internal links+      to a fragment derived from the filename (#10207).  There was+      already code to handle links like `#foo`, but not to handle links+      like `ch0001.html#foo`.++  * LaTeX reader:++    + Add em, ex, px, mu to list of units for dimension args (#10212).++  * ANSI writer:++    + Fix subscripts (Evan Silberman).++  * DokuWiki writer:++    + Don't emit `<HTML>` tags (#7413). The use of these tags is now+      strongly discouraged for security reasons, and will be removed.+      We previously used them as a fallback for lists that could not+      be represented using DokuWiki syntax, e.g. ordered lists with+      fancy numbers or lists with multiple blocks in their items.+      We also used them for block quotes with multiple blocks as+      their contents. We now use the `<WRAP>` syntax (from the optional+      WRAP plugin) to handle lists with multiple blocks as their contents.+      A new method of handling block quotes with complex contents+      has the side benefit of also handling nested block quotes,+      which weren't supported before.+      `<HTML>` and `<html>` tags are only for raw HTML blocks and+      inlines, and only if the `raw_html` extension is enabled. (It is+      now a valid extension for `dokuwiki`, though off by default.)++  * Docx writer:++    + Support `--list-of-figures` and `--list-of-tables` (or `lof` and+      `lot` variables) (Akash Patel).++  * HTML writer:++    + Don't emit missing title/lang warnings if templates does not+      contain the `pagetitle` or `lang` variables respectively (#9370).++  * LaTeX writer:++    + Better fix for lists in definition lists (#10241).+      In commit a26ec96d89ccf532f7bca7591c96ba30d8544e4a we added an+      empty `\item[]` to the beginning of a list that occurs first+      in a definition list, to avoid having one item on the line with+      the label. This gave bad results in some cases (#10241) and there+      is a more idiomatic solution anyway: using `\hfill`.+    + Avoid error on `refs` div with empty citations (#10185).+      If there are no citations, don't emit an empty CSLReferences environment.++  * RST writer:++    + Change bullet list hang from 3 to 2. This accords with the style in+      the RST reference docs.+    + Handle cases where indented context starts with block quote (#10236).+      In these cases we emit an empty comment to fix the point from+      which indentation is measured; otherwise the block quote is not+      parsed as a block quote. This affects list items and admonitions.+    + Don't enclose the list table in a `.. table::`; this leads to+      doubled captions (#10226).+    + Fix alignment of list table items corresponding to cells (#10227).++  * JATS template:++    + Support `floats-group` (Albert Krewinkel, see #10196).+      The content of the `floats-group` variable is now rendered in a+      `<floats-group>` element when using the *publishing* or *archiving* tag+      sets.++  * LaTeX and Beamer templates:++    + Split old default.latex into two templates, `default.latex` and+      `default.beamer`, factoring common parts into partials:+      `fonts.latex`, `common.latex`, `passoptions.latex`,+      `hypersetup.latex`, `after-header-includes.latex`.+    + Make `default.beamer` the default template for beamer.+    + Add `shorttitle`, `shortsubtitle`, `shortauthor`, `shortinstitute`,+      `shortdate` variables to beamer template (#10248, Thomas Hodgson).+    + Make `--number-sections` work with beamer (#12045, Thomas Hodgson).+    + Support a list of images for `titlegraphic` in beamer template+      (#10246, Thomas Hodgson). Title graphic options will be+      applied to each title graphic. Images will be separated by `\enspace`.+    + Beamer theme options (#10243)+    + Add theme options to beamer template: `colorthemeoptions`,+      `fontthemeoptions`, `innerthemeoptions`, `outerthemeoptions` (#10243,+      Thomas Hodgson).+    + Don't load amsmath, amssym in beamer template. These are loaded by+      beamer automatically.++  * Text.Pandoc.SelfContained:++    + Improve handling of links to remote CSS (#10261).++  * Text.Pandoc.Class:++    + Allow extracting `data:` URIs even in PandocPure (`--sandbox`)+      (#10249).+    + Export `extractURIData` [API change].++  * Text.Pandoc.PDF:++    + Read `.toc` and `.log` files from output directory (#10186).+      When this is different from the input directory, this is+      where `.toc` and `.log` files are written.++  * Text.Pandoc.Shared:++    + Modify `addPandocAttributes` for changes in commonmark-pandoc.+      The new commonmark-pandoc version automatically adds the+      attribute `wrapper="1"` on all Divs and Spans that+      are introduced just as containers for attributes that belong+      properly to their contents.  So we don't need to add the+      attribute here. This gives much better results in some cases.+      Previously the wrapper attribute was being added even for+      explicit Divs and Spans in djot, but it is not needed in these cases.++  * Text.Pandoc.Options:++    + Add `writerListOfFigures` and `writerListOfTables` fields+      to `WriterOptions` (#8245, Akash Patel). [API change]++  * Text.Pandoc.App:++    + Add `optListOfFigures` and `optListOfTables` to `Opt` (#8245)+      [API change].++  * Lua subsystem (Albert Krewinkel):++    + Update List module (#9835). The module now comes with a method+      `:at(index[, def])` that allows to access indices, accepts+      negative indices to count from the end, and will return the+      `def` value as a default if the list has no item at the given position.+      Furthermore, the list constructor `pandoc.List` now accepts iterators.+      E.g., `pandoc.List(text:gmatch '%S+')` returns the list of words+      in `text`.+    + Support character styling via `pandoc.layout`. The `Doc` values+      produced and handled by the `pandoc.layout` module can now+      be styled using `bold`, `italic`, `underlined`, or `strikeout`. The+      style is ignored in normal rendering, but becomes visible when+      rendering to ANSI output. The `pandoc.layout.render` function+      now takes a third parameter that defines the output style,+      either *plain* or *ansi*.+    + It is now possible to return a single filter from a filter file, e.g.+      ``` lua+      -- Switch single- and double quotes+      return {+        Quoted = function (q)+          elem.quotetype = elem.quotetype == 'SingleQuote'+            and 'DoubleQuote' or 'SingleQuote'+          return elem+        end+      }+      ```+      The filter must not contain numerical indexes, or it might be treated+      as a list of filters.+    + Add `list_of_figures` and `list_of_tables` to writer options+      (Akash Patel).++  * Use latest releases of commonmark, commonmark-pandoc, texmath, djot.++  * Stop depending on package SHA (Albert Krewinkel). Use `crypton` instead.++  * `linux/make_artifacts.sh`: add riscv64 support (Olivier Benz).++  * Fix invalid XML in `test/docx/normalize.docx` (#10242).++  * `doc/lua-filters.md`: list functions in `pandoc.utils` alphabetically+    (Albert Krewinkel).++  * MANUAL.txt:++    + Clarify  use of `beamerarticle` variable (#10250).+    + Add clarification to address user issues like #6704 (Yehuda Katz).++## pandoc 3.4 (2024-09-09)++  * New output format: `ansi` (for formatted console output) (Evan Silberman).+    Most Pandoc elements are supported and printed in a reasonable way, if+    not always ideally. This version does no detection of terminal+    capabilities, nor does it fall back to different output styles for+    less-capable terminals.++  * Add command line options `--table-caption-position` and+    `--figure-caption-position`. These allow the user to specify whether+    to put captions above or below tables and figures, respectively.+    The following output formats are supported: HTML (and related such+    as EPUB), LaTeX (and Beamer), Docx, ODT/OpenDocument, Typst.++  * Change default `--pdf-engine` via HTML to WeasyPrint (#10142).+    `wkhtmltopdf` is deprecated.  `weasyprint` is the easiest-to-install,+    maintained alternative.  For better results, one might prefer+    `pagedjs-cli`.++  * Org reader:++    + Fix parsing of src blocks with an `-i` flag (#10071, Albert Krewinkel).+      Tabs are now preserved in the contents of *src* blocks if the the block+      has the `-i` flag.++  * RTF reader:++    + Handle images inside `shp` contexts (#10145).++  * RST reader:++    + Improve simple table support (#10093). Multiline rows occur+      only when the *first* cell is empty; we were previously treating+      lines with *any* empty cell as row continuations. In addition, we+      no longer wrap multiline cells in Para if they can be represented+      as Plain. This is consistent with docutils behavior.++  * LaTeX reader:++    + Math environments don't have bracketed options (#10160).+    + Parse nested tabular environments (#4746).++  * Typst reader:++    + Change how "block" elements are handled. Previously they were+      always parsed as divs.  But actually they can occur in some "inline"+      contexts.  Now we first try to parse them as inlines, and only as+      blocks if that fails.  A surrounding Div or Span element is added+      only if there is an identifier.++  * HTML reader:++    + Only parse main element's contents (if present) (#10140).+      If main has an id or class, we include a div with that id or class;+      otherwise just the contents.+    + Read TeX annotation in MathML content if present (#9971).+    + Better handle KaTeX-generated math (#9971). KaTeX emits the mathml+      followed by a span with an HTML fallback. Previously pandoc was+      converting both.  We now ignore the HTML fallback span, marked+      with class `katex-html`.++  * Docx reader:++    + Add "SuppressAuthor" and "AuthorOnly" to citationMode+      when `+citations` is used (thomjur).++  * New module: Text.Pandoc.Writers.ANSI [API change] (Evan Silberman).++  * Docx writer:++    + Support `custom-style` attribute for docx table (Sebbones).+    + Support `--number-offsets`.+    + Make table/figure rendering sensitive to caption position settings.++  * OpenDocument writer:++    + Make table/figure rendering sensitive to caption position settings.++  * Typst writer/template:++    + Implement figure caption positions by triggering a show rule in+      the default template, which determines caption positions for+      figures and tables globally.+    + Don't include trailing semicolon after `@` style citations with suffixes+      (#10148).+    + Template: move header-includes before show doc (#9996, Gordon Woodhull).++  * LaTeX writer:++    + Make table/figure rendering sensitive to caption position settings (#5116).+    + Preserve locator labels with `--natbib` (#10057).++  * HTML writer/template:++    + Make `<figcaption>` placement sensitive to caption position+      settings. For tables, `<caption>` must be the first element, and+      positioning is determined by CSS, for here we set a variable+      which the default template is sensitive to.+    + Use `makeSectionsWithOffsets` for `writerNumberOffsets`,+      instead of the old, inefficient code.+    + Don't add doc-biblioref role to every link in a citation;+      only to links to the bibliography (#10156).+    + Add `data-` when rendering `label` attribute (#10048).++  * Markdown writer:++    + Avoid emitting markdown caption if table has fallen back to raw HTML,+      which will then contain a `<caption>` tag (#10094).+    + Make math sensitive to `tex_math_gfm` extension (#9121).+      This means that in GFM output, the "new style" math will be used+      by default, e.g.++          $`x=y`$++          ```math+          x = y+          ```++      To defeat this and get the older behavior, namely++          $x=y$++          $$x=y$$++      one could use `-t gfm-tex_math_gfm`.++  * AsciiDoc writer:++    + Add `link:` prefix when needed (#10105). AsciiDoc requires it+      except for `http`, `https`, `irc`, `mailto`, `ftp` schemes (#10105).+    + Preserve original base level (#10062). We used to normalize so+      that the base level is always 1, but asciidoc no longer seems+      to care about that, and the behavior creates difficulties when+      we are converting fragments.+    + Don't emit empty figure caption (#10047).++  * ODT writer:++    + Add TableCaption to styles.xml (#10058, Ian Max Andolina).++  * LaTeX template:++    + Fix wrong beamer color in (sub)section page (Jonathan).++  * Text.Pandoc.Options:++    + Add `CaptionPosition` and new `WriterOptions` fields+      `writerFigureCaptionPosition` and `writerTableCaptionPosition`+      [API change].++  * Text.Pandoc.Opt:++    + Change default for optNumberOffset to `[]`. This behaves the same as+      `[0,0,0,0,0]`.+    + Add `Opt` fields `optFigureCaptionPosition` and+      `optTableCaptionPosition` [API change].++  * Text.Pandoc.Format: change `formatFromFilePaths` so that it is+    smarter about URLs.  URLs are parsed, and we take the format from+    the path component, if present (#10141). This means that+    `https://emacs.org/` will be treated as HTML, while+    `https://emacs.org/sample.org` will be treated as Org.++  * Text.Pandoc.URI:++    + Add unofficial `gemini:` to list of URI schemes (Pau RE).++  * Text.Pandoc.Shared:++    + Add `makeSectionsWithOffsets` [API change].+    + Remove `stripEmptyParagraphs [API change] (Albert Krewinkel).+      This function is no longer used.++  * Text.Pandoc.Highlighting: Expose `formatANSI` [API change]+    (Evan Silberman).++  * Text.Pandoc.Writers.Shared: export `to{Sub,Super}scriptInline`+    [API change] (Evan Silberman).++  * Remove use of partial functions (e.g. `head`) in code.++  * Use latest skylighting-core, skylighting, doclayout, texmath, typst.++  * pandoc-lua-engine: Add accessors for several writer options, including+    some that were added in previous releases.++  * pandoc-server: Initialize some missing fields in WriterOptions:+    `writerEpubTitlePage`, `writerChunkTemplate`, `writerListTables`,+    `writerFigureCaptionPosition`, `writerTableCaptionPosition`.++  * CONTRIBUTING.md: Summarize steps for adding a new cli option.++  * MANUAL.txt:++    + Clarify that the `--number-offset` option should only+      directly affect numbering of the first section heading in+      a document; subsequent headings will increment normally.+    + Fix asciidoc link (#10039).+    + Fix CSL Docs broken link (#10100, Tristano Ajmone).+    + Document the use of `luatexja` when CJKmainfont is used with lualatex+      (#3873, Kolen Cheung).+    + Add a `citations` (typst) section to the manual (#9127).+    + Clarify that `citations` affects both input and output for `org`.+    + Add note on `--citeproc` that you may need to disable `citations`+      extension on the output format (e.g., `-t markdown-citations`) to+      see the rendered citation (#9127, #10012).++  * INSTALL.md — reorganise info on static binaries and add conda-forge+    install options (#10098, #10069, Ian Max Andolina).++## pandoc 3.3 (2024-07-28)++  * New cli option: `--link-images`.  This causes images to be linked+    rather than embedded in ODT.++  * Allow `--number-sections` to take an optional `true|false` argument.++  * RTF reader:++    + Handle `\*\shppict` without dropping image (#10025).++  * TWiki Reader:++    + Recognize WikiWords as internal links (#9941).+    + Avoid partial function.++  * Typst reader:++    + Ignore 'pad' and just parse its body (#9958).+    + Use typst 0.5.0.5. Fixes parsing of equations like `$1.$`.++  * Docx writer:++    + Fix regression with nested lists (#9994). The bug affects e.g.+      ordered lists with bullet sublists; after the sublist the top-level+      list reverts to bullets instead of being properly numbered.+      This is a regression introduced in version 3.2.1.++  * BibTeX writer:++    + Ensure that "literal" names are enclosed in braces (#9987).++  * Man writer:++    + Use default middle header when metadata does not include `header`+      (#9943).  This change causes pandoc to omit the middle+      header parameter when `header` is not set, rather than+      emitting `""`.  The parameter is optional and man will use+      a default based on the section if it is not specified.++  * HTML templates: don't load polyfill (#9918).+    This was added in a period when MathJaX required polyfill.+    MathJaX no longer recommends this and polyfill should no+    longer be necessary on any reasonably modern browser.++  * Translations:++    + Add `ua.yaml` (Jens Oehlschlägel).+    + Add a script (`tools/update-translations.py`) and Makefile+      target (`update-translations`) to update translation data+      automatically from babel and polyglossia upstream+      (Stephen Huan).+    + Use this script to update language data, increasing the number+      of languages we cover (Stephen Huan).  Fix a few small bugs in+      existing translations.++  * Fix some mistakes with Japanese language code (#9938).+    In several places we were mistakenly assuming that the BCP 47 code for+    Japanese language was `jp`.  It is `ja`.++  * Text.Pandoc.Options:++    + New field in WriterOptions: `writerLinkImages` [API change] (#9815).++  * Text.Pandoc.App.Opt:++    + New field in Opt: `optLinkImages` [API change] (#9815).++  * Lua subsystem:++    + Keep `lpeg` and `re` as "loaded" modules (Albert Krewinkel).+      The modules `lpeg` and `re` are now treated as if they had been+      loaded with `require`. Previously the modules were only assigned+      to global values, but could be loaded again via `require`,+      thereby allowing to use a system-wide installation. However, this+      proved to be confusing.++      The old behavior can be restored by adding the following lines to+      the top of Lua scripts, or to the `init.lua` in the data dir.++          debug.registry()['_LOADED'].lpeg = nil+          debug.registry()['_LOADED'].re = nil++  * `pandoc-cli`: Include pandoc copyright in Lua version info (Albert+    Krewinkel).++  * `pandoc-cli`: Refer printing of version info to the Lua interpreter+    (Albert Krewinkel). The Lua interpreter no longer terminates when+    called with `-v` or `--version` arguments, thus improving+    compatibility with the default `lua` interpreter program.++  * Avoid partial functions in JATS reader, DocBook writer, Haddock reader.++  * Allow tls 2.1.x.++  * MANUAL.txt:++    + Make documentation of extensions clearer (#9060).+    + Fix section level for two Extensions entries.++  * lua-filters.md: Partially autogenerate docs for module `pandoc`+    (Albert Krewinkel). The documentation system isn't powerful enough to+    generate the full documentation automatically.++## pandoc 3.2.1 (2024-06-24)++  * Fix `gfm_auto_identifiers` to replace emojis with their aliases,+    as documented (#9876).++  * CSV reader:++    + Turn line breaks into LineBreaks not SoftBreaks (#9797).++  * Docx reader:++    + Support task lists (#8211).+    + Fix a small bug in parsing delimiters in numbered lists,+      which led to the default delimiter being used wrongly in some cases.+    + Improve handling of captions.+      - Turn captioned images into Figure elements. Closes #9391.+      - Improve the logic for associating elements with captions (#9358).+      - Ensure that captions that can't be associated with an+        element aren't just silently dropped (#9610).+    + Support HorizontalRule. We support both pandoc-style and the style+      described on a Microsoft support page, an empty paragraph with+      a bottom border (#6285).+    + React to `"left"` value on `jc` attribute.+    + Handle column and cell alignments (#8551). We take the column alignments+      from the first body row.+    + Fix a bug that caused comments inside insertions or deletions+      to be ignored (#9833).++  * HTML reader:++    + Better handle non-`li` elements in `ul` and `ol` (#9809).+      For example, a `p` after a closed `li` will be incorporated into+      the previous `li`. This mirrors what browsers do with this+      invalid HTML.++  * LaTeX reader:++    + Fix parsing of dimensions beginning with `.`, e.g. `\kern.1pt` (#9902).++  * Markdown reader:++    + Allow author-only textual citations (#7219). E.g. `-@reese2002`+      outside of brackets.++  * RST reader:++    + Tighten up rules for when emphasis can start (#9805).+    + Support `:cite:` role with citeproc (#9904). A subset of the+      functionality of the sphinxcontrib-bibtex extension to Sphinx+      is supported.++  * Textile reader:++    + Don't let spans begin right after a symbol (#9878).++  * Typst reader:++    + Fix an incomplete pattern match (#9807).+    + Handle inline bodies ending in a parbreak. E.g.+      ```+      `#strong[+      test+      ]+      ```++  * ConTeXt template: remove `\setupbackend[export=yes]` (#9820).++  * Docx writer:++    + Allow OpenXML templates to be used with `docx` (#8338, #9069, #7256,+      #2928). The `--reference-doc` option allows customization of styles in+      docx output, but it does not allow one to adjust the content of the output+      (e.g., changing the order in which metadata, the table of contents,+      and the body of the document are displayed), or adding boilerplate+      text before or after the document body.  For these changes, one can+      now use `--template` with an OpenXML template.  (See the default+      `openxml` template for a sample.) `--include-before-body` and+      `--include-after-body` can also now be used with `docx` output.+      The included files must be OpenXML fragments suitable for+      inclusion in the document body.+    + New unexported module Text.Pandoc.Writers.Docx.OpenXML.+    + Omit `jc` attribute on table cells with AlignDefault (#5662).+    + Better formatting for task lists. Task lists are now properly+      formatted, with no bullet (#5198).+    + Replace an expensive generic traverse to remove Space elements,+      for better performance.+    + Wrap figures with `id` in a bookmark (#8662).+    + Add eastAsia font hints to `w:r` (#9817). We do this when the text+      in the run contains any CJK characters. This ensures that ambiguous+      code points (e.g. quotation marks) will be represented as "wide"+      characters when together with CJK characters.+    + Clean up Abstract Title and Subtitle in default reference docx.+      Center Subtitle, remove color.++  * HTML writer:++    + Ensure URI escaping needed for `html4` (#9905).+      Unicode characters need not be escaped for html5, and still won't be.+    + Don't emit unnecessary classes in HTML tables (#9325, Thomas Soeiro).+      Pandoc used to emit a `header` class on the `tr` element that forms+      the table header. This is no longer needed, because `head > tr` will+      do the same thing. Similarly, pandoc used to emit `even` and `odd`+      classes on `tr`s, allowing striped styling.  This is no longer needed,+      because one can use e.g. `tbody tr:nth-child(2n)`.+      Compatibility warning:  users who relied on these classes to style+      tables may need to adjust their CSS.++  * JATS writer:++    + Support `supplementary-material` in metadata for `jats_articlepublishing`+      (#9818).++  * LaTeX writer:++    + New method for ensuring images don't overflow (#9660).+      Previously we relied on graphicx internals and made global+      changes to Gin to force images to be resized if they exceed+      textwidth.  This approach is brittle and caused problems+      with `\includesvg` (see #9660). The new approach uses a new macro+      `\pandocbounded` that is now defined in the LaTeX template.+      (Thanks here to Falk Hanisch in https://github.com/mrpiggi/svg/issues/60.)+      The LaTeX writer has been changed to enclose `\includegraphics`+      and `\includesvg` commands in this macro when they don't explicitly+      specify a width or height. In addition, the writer now adds+      `keepaspectratio` to the `\includegraphics` or `\includesvg`+      options if `height` is specified without width, or vice versa.+      Previously, this was set in the preamble as a global option.+      Users should attend to the following compatibility issues:+      - If custom templates are used with the new LaTeX writer, they will have+        to be updated to include the new `\pandocbounded` macro, or an error+        will be raised because of the undefined macro.+      - Documents that specify explicit dimensions for an image may render+        differently, if the dimensions are greater than the line width or+        page height. Previously pandoc would shrink these images to fit,+        but the new behavior takes the specified dimensions literally.+        In addition, pandoc previously always enforced `keepaspectratio`,+        even when width and height were both specified, so images with+        width and height specified that do not conform to their intrinsic+        aspect ratio will appear differently.+    + Task lists must be unordered (#9185).+    + Specify language option for `selnolig` and only include it if+      `english` or `german` is used (#9863). (This includes changes to the+      LaTeX template.) This should restore proper ligature suppression when+      lualatex is used.+    + Fix `--toc-depth` with beamer output (#9861). Previously only top-level+      sections were ever included in the TOC, regardless of the setting of+      `--toc-depth`.+    + Use `\linewidth` instead of `\columnwidth` or `\textwidth`+      for resizing figures, table cells, etc. in LaTeX (#9775).+      `\linewidth`, unlike the others, is sensitive to indented environments+      like lists.++  * LaTeX template: put `babel-lang` in options to beamer (#9868).+    This is required to make beamer use proper localized terms for+    things like "Section."++  * Markdown writer:++    + Don't print extra caption when using `implicit_figures`.+    + Ensure blank line after HTML blocks in commonmark-based formats (#9792).+    + Fix bug rendering block quotes in lists (#9908).++  * Texinfo writer:++    + Ensure proper escaping in all node/link contexts.+    + Target node rather than anchor when possible in internal links.+    + Remove illegal characters from internal link anchors (#6177).+    + Use two commas not one in `@ref`.+    + Don't add anchors to headings. We don't need them, now that we+      make internal links use the node.+    + Avoid duplicate node names.+    + Improve menus. Properly handle the case where the node name is+      different from the descriptive title.++  * Texinfo template: add variables for filename and version.++  * Typst writer:++    + Support '.typst:no-figure' and 'typst:figure:kind=kind' attributes+      (#9778, Carlos Scheidegger). This extends support for fine-grained+      properties in Typst. If the `typst:no-figure` class is present on a+      Table, the table will not be placed in a figure. If the+      `typst:figure:kind` attribute is present, its value will be used+      for the figure's `kind` (#9777). These features are documented in+      `doc/typst-property-output.md`.++  * Typst template:++    + Add subtitle (#9747, Mickaël Canouil).+    + Use content rather than string for title, author, date, email (#9823).+      This allows formatting in title, author, date, and email fields.+      Since the PDF metadata requires a string, and typst only+      converts the title to a string (not the authors), we use++  * Textile writer:++    + Get rid of header, odd, even classes on `tr` (#9376).++  * Text.Pandoc.Class:++    + `fillMediaBag`: Convert IOErrors to warnings when fetching absolute+       paths (#9859, Albert Krewinkel).  This will allow many conversions that+       would have failed with an error to succeed (albeit without images or+       other needed resources).++  * Text.Pandoc.ImageSize:++    + Don't prefer exif width/height when they conflict with image+      width/height (#9871).  That was a mistaken call in #6936.+      Usually when these values disagree, it is because the image+      has been resized by a tool that leaves the original exif values+      the same, so the width/height metadata are more likely to be+      correct that exif width/height.++  * Text.Pandoc.SelfContained:++    + Strip CRs from XML before base64 encoding for data URI+      (so tests can work on Windows).+    + Only create `<svg>` elements for SVG images when the image has+      the class `inline-svg`. Otherwise just use a `data` URI as we do+      with other images (#9787).++  * Lua subsystem (Albert Krewinkel):++    + Split Init module into more modules. The module has grown unwieldy and+      is therefore split into three internal Haskell modules, `Init`,+      `Module`, and `Run`.+    + Add function `pandoc.utils.run_lua_filter` (#9803).+    + Add function `pandoc.template.get` (#9854, co-authored by Carsten Gips).+      The function allows to specify a template with the same argument value+      that would be used with the `--template` command line parameter.+    + Keep CommonState object in the registry. The state is an internal+      value and should be treated as such. The `PANDOC_STATE` global is+      merely a copy; unsetting the global no longer breaks the Lua engine.+    + Allow passing an environment to `run_lua_filter`.+      The default is now to use a *copy* of the global environment when running+      a filter; this ensures better separation when `run_lua_filter` is used+      multiple times. A custom environment can be specified via the+      optional third parameter.+    + Set `pandoc.List` as default metatable for JSON lists (#9834).+      Lists created by `pandoc.json.decode` now behave like lists generated+      via `pandoc.List`. This also ensures that `pandoc.List` tables are+      encoded as JSON arrays when passed to `pandoc.json.encode`.++  * Text.Pandoc.Writers.Shared: export `toTaskListItem` [API change].++  * Add unexported module Text.Pandoc.Char. This exports `isCJK`.+    Use this instead of locally defined `isCJK` in T.P.Readers.MediaWiki.++  * MANUAL.txt:++    + Remove false claim that Lua mode does not support `-i` (#9757,+      Ian Max Andolina).+    + Use level-3 headings for extensions (to avoid gaps).+    + Add anchor for tagging extension.+    + Remove explicit referencess to generate anchors.+      These will be linkified automatically.+    + Fixed links to `option--reference-doc`.+    + Add a note that column widths aren't supported in pptx for Divs+      with class `columns` (#9890).+    + Fix alerts example (#9826, Ian Max Andolina).+    + Fix markup of `babelfonts` example code (Albert Krewinkel).++  * `doc/custom-writers.md`:++    + Fix usage of Template in example (Albert Krewinkel).+    + Document the separator arg of `Writer.Blocks` (Albert Krewinkel).++  * `doc/lua-filters.md` (Albert Krewinkel):++    + Fix outdated documentation for math and quoting functions and fields.+    + Autogenerate docs for module `pandoc.template` and `pandoc.layout`.+    + Document operators of the "Doc" type.++  * pandoc-lua-engine: depend on pandoc >= 3.2 (see #9755).++  * Allow crypton-connection 0.4, time 1.14.++  * Allow tasty-quickcheck 0.11.++  * Use latest emojis, skylighting, skylighting-core, citeproc, djot,+    commonmark-extensions, typst-hs++## pandoc 3.2 (2024-05-11)++  * Change to `--file-scope` behavior (#8741): previously a Div with an+    identifier derived from the filename would be added around the contents+    of each file. This caused problems for "chunking" files into chapters,+    e.g. in EPUB. We no longer add the surrounding Div. This cooperates+    better with chunking. Note, however, that if you have relied on the old+    behavior to link to the beginning of the contents of a file using+    its filename as identifier, that will no longer work.++  * Markdown reader:++    + Allow repeated labels in numbered example lists.+      Previously if you tried to use the same label as an earlier+      example list item, you'd get a new number, not the old one,+      and references to the label would go to the second occurrence.+      Now an existing label will be reused, and no new number will+      be generated.  Caveat:  this only works reliably when the+      re-used example list item occurs by itself in a list, or+      occurs in a list of previously used example list items that+      occur in exactly the same order as previously.+    + Fix `normalCite` so it doesn't consume past a closing `]` boundary+      (#9710).  This was causing an exponential performance bug on long+      lists of links containing potential emphasis characters.+    + Generalize `inlinesInBalancedBrackets` to `inBalancedBrackets`,+      with a parameter for the inner parser.+    + Auto-close unclosed divs (#9635). This applies to both fenced and+      HTML-ish varieties. Otherwise we face an exponential performance+      problem with backtracking. A warning is issued when a div is+      implicitly closed.++  * RST reader:++    + Fix `figclass` and `align` annotations for figures (#7473, Gokul+      Rajiv).++  * LaTeX writer:++    + Use `polytonicgreek` instead of `polutonikogreek` with babel (#9698).+      `polutonikogreek` is outdated. Also recognize both in the LaTeX+      reader.+    + Improve treatment of math inside soul commands (#1294, #5529).+      soul commands (`ul`, `hl`, `st`) are very fragile and the math+      must be handled specially.++  * LaTeX reader:++    + Fix over-eager macro expansion in conditionals (#9676).+    + Parse `flalign`, `flalign*` math environments (#9679). We parse+      these as Math elements with an `aligned` environment. Semantically+      it's not exactly the same, but better than falling back to raw LaTeX.++  * LaTeX template: add `titlegraphicoptions` variable (#9207, Guilhem+    Saurel).++  * Docx reader:++    + Issue warning rather than error when we can't parse EndNote citations+      (see #8433).+    + Fix anchor in header after anchor (#9626, mbracke).++  * RTF reader:++    + Don't try to handle non-default code pages (#9683). Emit a warning+      instead.++  * OpenDocument writer:++    + Implement custom-style for spans (#9657).++  * Typst writer:++    + Add blank line in definition lists with multiple definitions (see+      #9704).+    + Property output (#9648, Gordon Woodhull). The Typst writer will pass+      on specially marked attributes as raw Typst parameters on selected+      elements. This allows extensive customization using filters.+      A separate document (`doc/typst-property-output.md`) has been added+      that provides extensive documentation and examples of the use of+      this feature.++  * Markdown writer:++    + Don't try to align columns in pipe tables with lines greater than+      COLUMNS. The alignment just reduces readibility when the lines+      soft wrap.+    + Don't use `raw_attribute` syntax for raw blocks, unless there is no+      other option (see #9677).  Macros in a `raw_attribute` block don't+      get interpreted when it is read again by pandoc's markdown reader.++  * ConTeXt writer:++    + Replace depreciated `\sc` with `\setsmallcaps` (#9518, James P.+      Ascher).++  * Docx writer:++    + Use conventional styles/indents for Word bullet lists (#7280).++  * `reference.docx`:++    + Use current standard Word theme (#7280). This includes using the+      sans-serif font Aptos instead of the serif font Cambria, and+      default colors for headings.+    + Remove duplicate `DefaultParagraphFont` in `styles.xml`.++  * New module Text.Pandoc.Transforms [API change] (Albert Krewinkel).+    This module exports the following functions which were formerly+    exported from Text.Pandoc.Shared: `headerShift`,     `filterIpynbOutput`, `eastAsianLineBreakFilter`, as well as some     functions that were previously not exported. 
data/bash_completion.tpl view
@@ -34,7 +34,7 @@              return 0              ;;          --pdf-engine)-             COMPREPLY=( $(compgen -W "pdflatex lualatex xelatex latexmk tectonic wkhtmltopdf weasyprint prince context pdfroff" -- ${cur}) )+             COMPREPLY=( $(compgen -W "pdflatex lualatex xelatex latexmk tectonic wkhtmltopdf weasyprint prince context pdfroff groff" -- ${cur}) )              return 0              ;;          --print-default-data-file)
data/epub.css view
@@ -37,6 +37,13 @@   vertical-align: sub;   font-size: smaller; }+h1, h2, h3, h4, h5, h6 {+  text-indent: 0;+  text-align: left;+  font-weight: bold;+  page-break-after: avoid;+  page-break-inside: avoid;+} h1 {   margin: 3em 0 0 0;   font-size: 2em;@@ -63,13 +70,6 @@ h6 {   font-size: 1em; }-h1, h2, h3, h4, h5, h6 {-  text-indent: 0;-  text-align: left;-  font-weight: bold;-  page-break-after: avoid;-  page-break-inside: avoid;-}  ol, ul {   margin: 1em 0 0 1.7em;@@ -129,18 +129,6 @@ header {   margin-bottom: 4em;   text-align: center;-}-#TOC li {-  list-style: none;-}-#TOC ul {-  padding-left: 1.3em;-}-#TOC > ul {-  padding-left: 0;-}-#TOC a:not(:hover) {-  text-decoration: none; } code {   white-space: pre-wrap;
data/odt/content.xml view
@@ -1,2 +1,82 @@ <?xml version="1.0" encoding="UTF-8"?>-<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.3"><office:scripts/><office:font-face-decls><style:font-face style:name="StarSymbol" svg:font-family="StarSymbol"/><style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/><style:font-face style:name="Courier New" svg:font-family="&apos;Courier New&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/><style:font-face style:name="Times New Roman" svg:font-family="&apos;Times New Roman&apos;" style:font-family-generic="roman" style:font-pitch="variable"/><style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="Lucida Sans Unicode" svg:font-family="&apos;Lucida Sans Unicode&apos;" style:font-family-generic="system" style:font-pitch="variable"/><style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-family-generic="system" style:font-pitch="variable"/></office:font-face-decls><office:automatic-styles><style:style style:name="P1" style:family="paragraph" style:parent-style-name="Footer"><style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/></style:style></office:automatic-styles><office:body><office:text><text:sequence-decls><text:sequence-decl text:display-outline-level="0" text:name="Illustration"/><text:sequence-decl text:display-outline-level="0" text:name="Table"/><text:sequence-decl text:display-outline-level="0" text:name="Text"/><text:sequence-decl text:display-outline-level="0" text:name="Drawing"/></text:sequence-decls><text:p text:style-name="Standard">Hello World!</text:p></office:text></office:body></office:document-content>+<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.3">+  <office:scripts/>+  <office:font-face-decls>+    <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol"/>+    <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/>+    <style:font-face style:name="Courier New" svg:font-family="&apos;Courier New&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/>+    <style:font-face style:name="Times New Roman" svg:font-family="&apos;Times New Roman&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>+    <style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>+    <style:font-face style:name="Lucida Sans Unicode" svg:font-family="&apos;Lucida Sans Unicode&apos;" style:font-family-generic="system" style:font-pitch="variable"/>+    <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-family-generic="system" style:font-pitch="variable"/>+  </office:font-face-decls>+  <office:automatic-styles>+    <style:style style:name="DemoTable" style:family="table">+      <style:table-properties style:width="6in" table:align="margins"/>+    </style:style>+    <style:style style:name="DemoTable.A" style:family="table-column">+      <style:table-column-properties style:column-width="3in"/>+    </style:style>+  </office:automatic-styles>+  <office:body>+    <office:text>+      <text:sequence-decls>+        <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>+        <text:sequence-decl text:display-outline-level="0" text:name="Table"/>+        <text:sequence-decl text:display-outline-level="0" text:name="Text"/>+        <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>+      </text:sequence-decls>+      <text:p text:style-name="Title">Title</text:p>+      <text:p text:style-name="Subtitle">Subtitle</text:p>+      <text:p text:style-name="Author">Author</text:p>+      <text:p text:style-name="Date">Date</text:p>+      <text:p text:style-name="Abstract">Abstract.</text:p>+      <text:h text:style-name="Heading_20_1" text:outline-level="1">Heading 1</text:h>+      <text:h text:style-name="Heading_20_2" text:outline-level="2">Heading 2</text:h>+      <text:h text:style-name="Heading_20_3" text:outline-level="3">Heading 3</text:h>+      <text:h text:style-name="Heading_20_4" text:outline-level="4">Heading 4</text:h>+      <text:h text:style-name="Heading_20_5" text:outline-level="5">Heading 5</text:h>+      <text:h text:style-name="Heading_20_6" text:outline-level="6">Heading 6</text:h>+      <text:p text:style-name="First_20_paragraph">First Paragraph.</text:p>+      <text:p text:style-name="Text_20_body">Body Text. <text:span text:style-name="Emphasis">Emphasis</text:span>. <text:span text:style-name="Strong_20_Emphasis">Strong Emphasis</text:span>. <text:span text:style-name="Strikeout">Strikeout</text:span>. <text:span text:style-name="Superscript">Superscript</text:span>. <text:span text:style-name="Subscript">Subscript</text:span>. <text:span text:style-name="Source_20_Text">Source Text</text:span>. <text:span text:style-name="Highlighted">Highlighted</text:span>. <text:a xlink:type="simple" xlink:href="https://pandoc.org"><text:span text:style-name="Definition">Hyperlink</text:span></text:a>. Footnote.<text:note text:id="ftn1" text:note-class="footnote"><text:note-citation>1</text:note-citation><text:note-body><text:p text:style-name="Footnote">Footnote text.</text:p></text:note-body></text:note></text:p>+      <text:p text:style-name="Quotations">Block quote.</text:p>+      <text:p text:style-name="Preformatted_20_Text">Preformatted Text.</text:p>+      <text:list text:style-name="List_20_1">+        <text:list-item>+          <text:p text:style-name="List_20_Bullet">Bullet list item.</text:p>+        </text:list-item>+      </text:list>+      <text:list text:style-name="Numbering_20_1">+        <text:list-item>+          <text:p text:style-name="List_20_Number">Numbered list item.</text:p>+        </text:list-item>+      </text:list>+      <text:p text:style-name="TableCaption">Table caption.</text:p>+      <table:table table:name="DemoTable" table:style-name="DemoTable">+        <table:table-column table:style-name="DemoTable.A"/>+        <table:table-column table:style-name="DemoTable.A"/>+        <table:table-header-rows>+          <table:table-row>+            <table:table-cell office:value-type="string">+              <text:p text:style-name="Table_20_Heading">Table Heading</text:p>+            </table:table-cell>+            <table:table-cell office:value-type="string">+              <text:p text:style-name="Table_20_Heading">Table Heading</text:p>+            </table:table-cell>+          </table:table-row>+        </table:table-header-rows>+        <table:table-row>+          <table:table-cell office:value-type="string">+            <text:p text:style-name="Table_20_Contents">Table Contents</text:p>+          </table:table-cell>+          <table:table-cell office:value-type="string">+            <text:p text:style-name="Table_20_Contents">Table Contents</text:p>+          </table:table-cell>+        </table:table-row>+      </table:table>+      <text:p text:style-name="FigureCaption">Image caption.</text:p>+      <text:p text:style-name="Definition_20_Term">Definition Term</text:p>+      <text:p text:style-name="Definition_20_Definition">Definition.</text:p>+    </office:text>+  </office:body>+</office:document-content>
data/odt/styles.xml view
@@ -73,6 +73,26 @@       style:font-size-complex="12pt" style:language-complex="zxx"       style:country-complex="none" />     </style:default-style>+    <style:style style:name="Title" style:family="paragraph"+      style:parent-style-name="Heading" style:next-style-name="Subtitle"+      style:class="chapter">+      <style:paragraph-properties fo:text-align="center"+        style:justify-single-word="false" fo:margin-top="0in"+        fo:margin-bottom="0.0835in" style:contextual-spacing="false" />+      <style:text-properties fo:font-size="28pt" fo:font-weight="bold"+        style:font-size-asian="28pt" style:font-weight-asian="bold"+        style:font-size-complex="28pt" style:font-weight-complex="bold" />+    </style:style>+    <style:style style:name="Subtitle" style:family="paragraph"+      style:parent-style-name="Heading" style:next-style-name="Text_20_body"+      style:class="chapter">+      <style:paragraph-properties fo:text-align="center"+        style:justify-single-word="false" fo:margin-top="0.0835in"+        fo:margin-bottom="0.0835in" style:contextual-spacing="false" />+      <style:text-properties fo:font-size="18pt" fo:font-style="italic"+        style:font-size-asian="18pt" style:font-style-asian="italic"+        style:font-size-complex="18pt" style:font-style-complex="italic" />+    </style:style>     <style:style style:name="Author" style:family="paragraph"       style:parent-style-name="Standard" style:class="html">         <style:paragraph-properties fo:text-align="center" />@@ -136,6 +156,24 @@     style:parent-style-name="Text_20_body" style:class="list">       <style:text-properties style:font-name-complex="Tahoma1" />     </style:style>+    <style:style style:name="List_20_Bullet"+    style:display-name="List Bullet" style:family="paragraph"+    style:parent-style-name="List" style:class="list" />+    <style:style style:name="List_20_Bullet_20_Tight"+    style:display-name="List Bullet Tight" style:family="paragraph"+    style:parent-style-name="List" style:class="list">+      <style:paragraph-properties fo:margin-top="0in"+      fo:margin-bottom="0in" style:contextual-spacing="false" />+    </style:style>+    <style:style style:name="List_20_Number"+    style:display-name="List Number" style:family="paragraph"+    style:parent-style-name="List" style:class="list" />+    <style:style style:name="List_20_Number_20_Tight"+    style:display-name="List Number Tight" style:family="paragraph"+    style:parent-style-name="List" style:class="list">+      <style:paragraph-properties fo:margin-top="0in"+      fo:margin-bottom="0in" style:contextual-spacing="false" />+    </style:style>     <style:style style:name="Caption" style:family="paragraph"     style:parent-style-name="Standard" style:class="extra">       <style:paragraph-properties fo:margin-top="0.0835in"@@ -250,18 +288,35 @@       <style:paragraph-properties fo:margin-top="0in"       fo:margin-bottom="0in" style:contextual-spacing="false" />       <style:text-properties style:font-name="Courier New"-      fo:font-size="10pt" style:font-name-asian="Courier New"+      fo:font-family="&apos;Courier New&apos;"+      style:font-family-generic="modern"+      style:font-pitch="fixed"+      fo:font-size="10pt"+      style:font-name-asian="Courier New"+      style:font-family-asian="&apos;Courier New&apos;"+      style:font-family-generic-asian="modern"+      style:font-pitch-asian="fixed"       style:font-size-asian="10pt"       style:font-name-complex="Courier New"+      style:font-family-complex="&apos;Courier New&apos;"+      style:font-family-generic-complex="modern"+      style:font-pitch-complex="fixed"       style:font-size-complex="10pt"       fo:language="zxx" />     </style:style>-    <style:style style:name="Source_Text" style:family="text">+    <style:style style:name="Source_20_Text" style:display-name="Source Text" style:family="text">       <style:text-properties style:font-name="Courier New"-      fo:font-size="10pt" style:font-name-asian="Courier New"-      style:font-size-asian="10pt"+      fo:font-family="&apos;Courier New&apos;"+      style:font-family-generic="modern"+      style:font-pitch="fixed"+      style:font-name-asian="Courier New"+      style:font-family-asian="&apos;Courier New&apos;"+      style:font-family-generic-asian="modern"+      style:font-pitch-asian="fixed"       style:font-name-complex="Courier New"-      style:font-size-complex="10pt"+      style:font-family-complex="&apos;Courier New&apos;"+      style:font-family-generic-complex="modern"+      style:font-pitch-complex="fixed"       fo:language="zxx" />     </style:style>     <style:style style:name="Highlighted" style:family="text">
data/templates/common.latex view
@@ -69,6 +69,8 @@ $-- $if(tables)$ \usepackage{longtable,booktabs,array}+\usepackage{caption}+\captionsetup[table]{skip=6pt} \newcounter{none} % for unnumbered tables $if(multirow)$ \usepackage{multirow}
data/templates/default.beamer view
@@ -125,7 +125,7 @@ $endfor$} $endif$ $if(logo)$-\logo{\includegraphics{$logo$}}+\logo{\includegraphics$if(logooptions)$[$for(logooptions)$$logooptions$$sep$, $endfor$]$endif${$logo$}} $endif$  \begin{document}
data/templates/default.epub2 view
@@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">-<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$>+<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$> <head>   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   <meta http-equiv="Content-Style-Type" content="text/css" />
data/templates/default.epub3 view
@@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html>-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$>+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$> <head>   <meta charset="utf-8" />   <meta name="generator" content="pandoc" />
data/templates/default.html4 view
@@ -3,7 +3,7 @@ <head>   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   <meta http-equiv="Content-Style-Type" content="text/css" />-  <meta name="generator" content="pandoc" />+  <meta name="generator" content="pandoc $pandoc-version$" /> $for(author-meta)$   <meta name="author" content="$author-meta$" /> $endfor$
data/templates/default.html5 view
@@ -1,8 +1,8 @@ <!DOCTYPE html>-<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>+<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$> <head>   <meta charset="utf-8" />-  <meta name="generator" content="pandoc" />+  <meta name="generator" content="pandoc $pandoc-version$" />   <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> $for(author-meta)$   <meta name="author" content="$author-meta$" />
data/templates/default.icml view
@@ -28,6 +28,11 @@     <RootCellStyleGroup Self="pandoc_cell_styles">       <CellStyle Self="CellStyle/Cell" AppliedParagraphStyle="ParagraphStyle/$$ID/[No paragraph style]" Name="Cell" />     </RootCellStyleGroup>+$if(objectStyles)$+    <RootObjectStyleGroup Self="pandoc_object_styles">+      $objectStyles$+    </RootObjectStyleGroup>+$endif$   <Story Self="pandoc_story"       TrackChanges="false"       StoryTitle="$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$"
data/templates/default.jats_articleauthoring view
@@ -31,7 +31,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>
data/templates/default.latex view
@@ -1,3 +1,4 @@+$document-metadata.latex()$ $passoptions.latex()$ \documentclass[ $for(babel-otherlangs)$
data/templates/default.revealjs view
@@ -29,6 +29,9 @@ $else$   <link rel="stylesheet" href="$revealjs-url$/dist/theme/black.css" id="theme"> $endif$+$if(highlight-js)$+  <link rel="stylesheet" href="$revealjs-url$/plugin/highlight/$highlightjs-theme$.css">+$endif$ $for(css)$   <link rel="stylesheet" href="$css$"/> $endfor$@@ -87,6 +90,9 @@ $if(mathjax)$   <script src="$revealjs-url$/plugin/math/math.js"></script> $endif$+$if(highlight-js)$+  <script src="$revealjs-url$/plugin/highlight/highlight.js"></script>+$endif$    <script> @@ -237,13 +243,23 @@         // Enable scroll view         view: '$view/nowrap$',         // see https://revealjs.com/scroll-view/#scrollbar+$if(scrollProgressAuto)$+        scrollProgress: 'auto',+$elseif(scrollProgress)$         scrollProgress: $scrollProgress$,+$else$+        scrollProgress: false,+$endif$         // see https://revealjs.com/scroll-view/#url-activation-        scrollActivationWidth: '$scrollActivationWidth$',+        scrollActivationWidth: $scrollActivationWidth$,         // see https://revealjs.com/scroll-view/#scroll-snapping-        scrollSnap: '$scrollSnap$',+$if(scrollSnap)$+        scrollSnap: '$scrollSnap/nowrap$',+$else$+        scrollSnap: false,+$endif$         // Experimental. see https://revealjs.com/scroll-view/#scroll-snapping-        scrollLayout: '$scrollLayout$',+        scrollLayout: '$scrollLayout/nowrap$', $endif$ $if(parallaxBackgroundImage)$ @@ -320,6 +336,9 @@         plugins: [ $if(mathjax)$           RevealMath,+$endif$+$if(highlight-js)$+          RevealHighlight, $endif$           RevealNotes,           RevealSearch,
data/templates/default.rtf view
@@ -1,5 +1,8 @@ {\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 \fmodern Courier;}} {\colortbl;\red255\green0\blue0;\red0\green0\blue255;}+$if(listtable)$+$listtable$+$endif$ \widowctrl\hyphauto $for(header-includes)$ $header-includes$
+ data/templates/default.t2t view
@@ -0,0 +1,17 @@+$title$+$for(author)$$author$$sep$; $endfor$+$date$++$for(include-before)$+$include-before$++$endfor$+$if(toc)$+__TOC__++$endif$+$body$+$for(include-after)$++$include-after$+$endfor$
data/templates/default.typst view
@@ -1,19 +1,14 @@-#let horizontalrule = line(start: (25%,0%), end: (75%,0%))--#show terms: it => {-  it.children-    .map(child => [-      #strong[#child.term]-      #block(inset: (left: 1.5em, top: -0.4em))[#child.description]-      ])-    .join()-}+#set terms(hanging-indent: 1.5em)  #set table(   inset: 6pt,   stroke: none ) +#let horizontalrule = line(start: (25%,0%), end: (75%,0%))+// Polyfill divider to allow compiling with typst < 0.15:+#let divider = if "divider" in std { divider } else { horizontalRule }+ #show figure.where(   kind: table ): set figure.caption(position: $if(table-caption-position)$$table-caption-position$$else$top$endif$)@@ -65,7 +60,7 @@     ), $endif$ $if(keywords)$-  keywords: ($for(keywords)$$keyword$$sep$,$endfor$),+  keywords: ($for(keywords)$"$keywords/nowrap$"$sep$,$endfor$), $endif$ $if(date)$   date: [$date$],
+ data/templates/document-metadata.latex view
@@ -0,0 +1,20 @@+$--+$-- PDF standard support (PDF/A, PDF/UA, PDF/X)+$-- Requires LuaLaTeX and recent LaTeX (2023+)+$--+$if(pdfstandard)$+\DocumentMetadata{+$if(pdfstandard.version)$+  pdfversion=$pdfstandard.version$,+$endif$+$if(pdfstandard.standards)$+  pdfstandard={$for(pdfstandard.standards)$$it$$sep$,$endfor$},+$endif$+$if(pdfstandard.tagging)$+  tagging=on,+$endif$+$if(lang)$+  lang=$lang$,+$endif$+  xmp=true}+$endif$
data/templates/hypersetup.latex view
@@ -1,3 +1,7 @@+% fallback for those not using the hyperref driver hyperxmp:+\makeatletter+\@ifundefined{xmpquote}{\newcommand{\xmpquote}[1]{#1}}{}+\makeatother \hypersetup{ $if(title-meta)$   pdftitle={$title-meta$},@@ -12,7 +16,7 @@   pdfsubject={$subject$}, $endif$ $if(keywords)$-  pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},+  pdfkeywords={$for(keywords)$\xmpquote{$keywords$}$sep$, $endfor$}, $endif$ $if(colorlinks)$   colorlinks=true,
data/templates/styles.html view
@@ -43,7 +43,6 @@   body {     background-color: transparent;     color: black;-    font-size: 12pt;   }   p, h2, h3 {     orphans: 3;@@ -106,6 +105,7 @@ } $endif$ code {+  white-space: pre-wrap;   font-family: $if(monofont)$$monofont$$else$Menlo, Monaco, Consolas, 'Lucida Console', monospace$endif$; $if(monobackgroundcolor)$   background-color: $monobackgroundcolor$;@@ -183,10 +183,13 @@   text-decoration: none; } $endif$-code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;}-div.columns{display: flex; gap: min(4vw, 1.5em);}-div.column{flex: auto; overflow-x: auto;}+div.columns{display: flex; gap: 1.5em;}+div.column{flex: auto;}+@media screen {+div.columns{gap: min(4vw, 1.5em);}+div.column{overflow-x: auto;}+} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} /* The extra [class] is a hack that increases specificity enough to    override a similar rule in reveal.js */
data/templates/template.typst view
@@ -73,47 +73,48 @@     }   } -  block(below: 1em, width: 100%)[-    #if title != none {-      align(center, block[-          #text(weight: "bold", size: 1.5em)[#title #if thanks != none {-              footnote(thanks, numbering: "*")-              counter(footnote).update(n => n - 1)-            }]-          #(-            if subtitle != none {-              parbreak()-              text(weight: "bold", size: 1.25em)[#subtitle]-            }-           )])-    }--    #if authors != none and authors != [] {-      let count = authors.len()-      let ncols = calc.min(count, 3)-      grid(-        columns: (1fr,) * ncols,-        row-gutter: 1.5em,-        ..authors.map(author => align(center)[-          #author.name \-          #author.affiliation \-          #author.email-        ])-      )-    }+  if title != none {+    place(top, float: true, scope: "parent", clearance: 4mm, block(below: 1em, width: 100%)[+      #if title != none {+        align(center, block[+            #text(weight: "bold", size: 1.5em, hyphenate: false)[#title #if thanks != none {+                footnote(thanks, numbering: "*")+                counter(footnote).update(n => n - 1)+              }]+            #(+              if subtitle != none {+                parbreak()+                text(weight: "bold", size: 1.25em, hyphenate: false)[#subtitle]+              }+             )])+      } -    #if date != none {-      align(center)[#block(inset: 1em)[-          #date-        ]]-    }+      #if authors != none and authors != [] {+        let count = authors.len()+        let ncols = calc.min(count, 3)+        grid(+          columns: (1fr,) * ncols,+          row-gutter: 1.5em,+          ..authors.map(author => align(center)[+            #author.name \+            #author.affiliation \+            #author.email+          ])+        )+      } -    #if abstract != none {-      block(inset: 2em)[-        #text(weight: "semibold")[#abstract-title] #h(1em) #abstract-      ]-    }-  ]+      #if date != none {+        align(center)[#block(inset: 1em)[+            #date+          ]]+      } +      #if abstract != none {+        block(inset: 2em)[+          #text(weight: "semibold")[#abstract-title] #h(1em) #abstract+        ]+      }+    ])+  }   doc }
pandoc.cabal view
@@ -1,6 +1,6 @@ cabal-version:   2.4 name:            pandoc-version:         3.8.3+version:         3.10.1 build-type:      Simple license:         GPL-2.0-or-later license-file:    COPYING.md@@ -11,9 +11,7 @@ stability:       alpha homepage:        https://pandoc.org category:        Text-tested-with:     GHC == 8.10.7, GHC == 9.0.2,-                 GHC == 9.2.5, GHC == 9.4.4, GHC == 9.6.3,-                 GHC == 9.8.2, GHC == 9.10.1+tested-with:     GHC == 9.6.7, GHC == 9.8.4, GHC == 9.10.3, GHC == 9.12.2 synopsis:        Conversion between markup formats description:     Pandoc is a Haskell library for converting from one markup                  format to another.  The formats it can handle include@@ -38,7 +36,7 @@                    Vimwiki, XWiki, ZimWiki, Jira wiki, Creole)                  - Slide show formats (LaTeX Beamer, PowerPoint, Slidy,                    reveal.js, Slideous, S5, DZSlides)-                 - Data formats (CSV and TSV tables)+                 - Data formats (CSV and TSV tables, Excel spreadsheets)                  - PDF (via external programs such as pdflatex or wkhtmltopdf)                  .                  Pandoc can convert mathematical content in documents@@ -95,6 +93,7 @@                  data/templates/default.asciidoc                  data/templates/default.haddock                  data/templates/default.textile+                 data/templates/default.t2t                  data/templates/default.org                  data/templates/default.epub2                  data/templates/default.epub3@@ -103,6 +102,7 @@                  data/templates/affiliations.jats                  data/templates/default.markua                  data/templates/default.typst+                 data/templates/document-metadata.latex                  data/templates/template.typst                  data/templates/common.latex                  data/templates/hypersetup.latex@@ -208,12 +208,13 @@                  citeproc/biblatex-localization/*.lbx.strings                  -- documentation                  MANUAL.txt, COPYRIGHT-extra-doc-files:-                 changelog.md+extra-doc-files: changelog.md,+                 AUTHORS.md,+                 INSTALL.md,+                 README.md,+                 CONTRIBUTING.md,+                 BUGS extra-source-files:-                 -- documentation-                 INSTALL.md, AUTHORS.md, README.md,-                 CONTRIBUTING.md, BUGS,                  -- tests                  test/bodybg.gif                  test/*.native@@ -226,6 +227,7 @@                  test/command/9002.docx                  test/command/9603.docx                  test/command/11113.docx+                 test/command/11689.docx                  test/command/biblio.bib                  test/command/averroes.bib                  test/command/A.txt@@ -250,6 +252,8 @@                  test/command/defaults7.yaml                  test/command/defaults8.yaml                  test/command/defaults9.yaml+                 test/command/8024a.yaml+                 test/command/8024b.yaml                  test/command/3533-rst-csv-tables.csv                  test/command/3880.txt                  test/command/5182.txt@@ -275,6 +279,8 @@                  test/command/6466-whole.hs                  test/command/7861.yaml                  test/command/7861/metadata/placeholder+                 test/command/11486/scroll.revealjs+                 test/command/11498.png                  test/asciidoc-reader.adoc                  test/asciidoc-reader.native                  test/asciidoc-reader-include.rb@@ -343,6 +349,7 @@                  test/tables.typst                  test/tables.rst                  test/tables.rtf+                 test/tables.t2t                  test/tables.txt                  test/tables.fb2                  test/tables.muse@@ -386,6 +393,7 @@                  test/writer.rst                  test/writer.icml                  test/writer.rtf+                 test/writer.t2t                  test/writer.tei                  test/writer.texinfo                  test/writer.fb2@@ -457,9 +465,13 @@   Description:   Embed data files in binary for relocatable executable.   Default:       False +flag http+  Description:   Support for fetching resources using HTTP.+  Default:       True+ common common-options   default-language: Haskell2010-  build-depends:    base         >= 4.12 && < 5+  build-depends:    base         >= 4.18 && < 5   ghc-options:      -Wall -fno-warn-unused-do-bind                     -Wincomplete-record-updates                     -Wnoncanonical-monad-instances@@ -470,12 +482,11 @@                     -Wmissing-signatures                     -fhide-source-paths                     -Wmissing-export-lists--  if impl(ghc >= 8.10)-    ghc-options:    -Wunused-packages+                    -Wunused-packages+                    -Winvalid-haddock -  if impl(ghc >= 9.0)-    ghc-options:    -Winvalid-haddock+  if impl(ghc >= 9.12)+    ghc-options:    -Wno-deriving-typeable    if os(windows)     cpp-options:      -D_WINDOWS@@ -504,7 +515,7 @@   build-depends: xml-light,                  Glob                  >= 0.7      && < 0.11,                  JuicyPixels           >= 3.1.6.1  && < 3.4,-                 aeson                 >= 2.0.1.0  && < 2.3,+                 aeson                 >= 2.0.1.0  && < 2.4,                  aeson-pretty          >= 0.8.9    && < 0.9,                  array                 >= 0.5      && < 0.6,                  attoparsec            >= 0.12     && < 0.15,@@ -514,34 +525,30 @@                  blaze-markup          >= 0.8      && < 0.9,                  bytestring            >= 0.9      && < 0.13,                  case-insensitive      >= 1.2      && < 1.3,-                 citeproc              >= 0.12     && < 0.13,-                 commonmark            >= 0.2.6.1  && < 0.3,-                 commonmark-extensions >= 0.2.6    && < 0.3,-                 commonmark-pandoc     >= 0.2.3    && < 0.3,+                 citeproc              >= 0.13.0.1 && < 0.14,+                 commonmark            >= 0.3      && < 0.4,+                 commonmark-extensions >= 0.2.7.1  && < 0.3,+                 commonmark-pandoc     >= 0.3      && < 0.4,                  containers            >= 0.6.0.1  && < 0.9,-                 crypton               >= 0.30     && < 1.1,-                 crypton-connection    >= 0.3.1    && < 0.5,+                 crypton               >= 0.30     && < 1.2,                  data-default          >= 0.4      && < 0.9,                  deepseq               >= 1.3      && < 1.6,                  directory             >= 1.2.3    && < 1.4,-                 doclayout             >= 0.5.0.1  && < 0.6,+                 doclayout             >= 0.5.0.3  && < 0.6,                  doctemplates          >= 0.11     && < 0.12,-                 emojis                >= 0.1.4.1  && < 0.2,+                 emojis                >= 0.1.5    && < 0.2,                  exceptions            >= 0.8      && < 0.11,                  file-embed            >= 0.0      && < 0.1,                  filepath              >= 1.1      && < 1.6,                  gridtables            >= 0.1      && < 0.2,                  haddock-library       >= 1.10     && < 1.12,-                 http-client           >= 0.4.30   && < 0.8,-                 http-client-tls       >= 0.2.4    && < 0.4,                  http-types            >= 0.8      && < 0.13,                  ipynb                 >= 0.2      && < 0.3,                  jira-wiki-markup      >= 1.5.1    && < 1.6,                  mime-types            >= 0.1.1    && < 0.2,                  mtl                   >= 2.2      && < 2.4,-                 network               >= 2.6      && < 3.3,                  network-uri           >= 2.6      && < 2.8,-                 pandoc-types          >= 1.23.1   && < 1.24,+                 pandoc-types          >= 1.23.1.2 && < 1.24,                  parsec                >= 3.1      && < 3.2,                  pretty                >= 1.1      && < 1.2,                  pretty-show           >= 1.10     && < 1.11,@@ -555,10 +562,10 @@                  syb                   >= 0.1      && < 0.8,                  tagsoup               >= 0.14.6   && < 0.15,                  temporary             >= 1.1      && < 1.4,-                 texmath               >= 0.13.0.2 && < 0.14,+                 texmath               >= 0.13.2   && < 0.14,                  text                  >= 1.1.1.0  && < 2.2,                  text-conversions      >= 0.3      && < 0.4,-                 time                  >= 1.5      && < 1.16,+                 time                  >= 1.5      && < 1.17,                  unicode-collation     >= 0.1.1    && < 0.2,                  unicode-data          >= 0.6      && < 0.9,                  unicode-transforms    >= 0.3      && < 0.5,@@ -567,18 +574,25 @@                  zip-archive           >= 0.4.3.1  && < 0.5,                  zlib                  >= 0.5      && < 0.8,                  xml                   >= 1.3.12   && < 1.4,-                 typst                 >= 0.8.1    && < 0.9,+                 typst                 >= 0.11     && < 0.12,                  vector                >= 0.12     && < 0.14,-                 djot                  >= 0.1.2.4  && < 0.2,-                 asciidoc              >= 0.1      && < 0.2,-                 tls                   >= 2.0.1    && < 2.2,-                 crypton-x509-system   >= 1.6.7    && < 1.7+                 djot                  >= 0.1.4.1  && < 0.2,+                 asciidoc              >= 0.1.0.3  && < 0.2    if !os(windows)     build-depends:  unix >= 2.4 && < 2.9   if flag(embed_data_files)      cpp-options:   -DEMBED_DATA_FILES      other-modules: Text.Pandoc.Data.BakedIn+  if flag(http)+     cpp-options:   -DPANDOC_HTTP_SUPPORT+     build-depends:+                 crypton-connection    >= 0.3.1    && < 0.5,+                 crypton-x509-system   >= 1.6.7    && < 1.10,+                 http-client           >= 0.4.30   && < 0.8,+                 http-client-tls       >= 0.2.4    && < 0.5,+                 network               >= 2.6      && < 3.3,+                 tls                   >= 2.0.1    && < 2.5   hs-source-dirs:  src    exposed-modules: Text.Pandoc,@@ -661,6 +675,7 @@                    Text.Pandoc.Writers.Org,                    Text.Pandoc.Writers.AsciiDoc,                    Text.Pandoc.Writers.Textile,+                   Text.Pandoc.Writers.Txt2Tags,                    Text.Pandoc.Writers.MediaWiki,                    Text.Pandoc.Writers.DokuWiki,                    Text.Pandoc.Writers.XWiki,@@ -843,7 +858,7 @@                   tasty-quickcheck  >= 0.8     && < 0.12,                   text              >= 1.1.1.0 && < 2.2,                   temporary         >= 1.1     && < 1.4,-                  time              >= 1.5     && < 1.16,+                  time              >= 1.5     && < 1.17,                   xml               >= 1.3.12  && < 1.4,                   zip-archive       >= 0.4.3   && < 0.5   other-modules:  Tests.Old@@ -908,6 +923,7 @@                   Tests.Writers.Ms                   Tests.Writers.AnnotatedTable                   Tests.Writers.BBCode+                  Tests.Writers.Txt2Tags  benchmark benchmark-pandoc   import:          common-executable
src/Text/Pandoc/App.hs view
@@ -50,6 +50,7 @@ import System.FilePath ( takeBaseName, takeExtension, takeDirectory) import System.IO (nativeNewline, stdout) import qualified System.IO as IO (Newline (..))+import Data.Version (showVersion) import Text.Pandoc import Text.Pandoc.Builder (setMeta) import Text.Pandoc.MediaBag (mediaItems)@@ -227,6 +228,11 @@     report $ Deprecated "markdown_github" "Use gfm instead."    abbrevs <- readAbbreviations (optAbbreviations opts)+  -- Headings need identifiers to be linkable from a table of contents,+  -- so force auto_identifiers on when a TOC is requested (see #11041).+  let readerExts' = if writerTableOfContents writerOptions+                       then enableExtension Ext_auto_identifiers readerExts+                       else readerExts   let readerOpts = def{           readerStandalone = standalone         , readerColumns = optColumns opts@@ -235,8 +241,9 @@         , readerDefaultImageExtension = optDefaultImageExtension opts         , readerTrackChanges = optTrackChanges opts         , readerAbbreviations = abbrevs-        , readerExtensions = readerExts+        , readerExtensions = readerExts'         , readerStripComments = optStripComments opts+        , readerTypstInputs = optTypstInputs opts         }    metadataFromFile <- getMetadataFromFiles readerNameBase readerOpts@@ -357,6 +364,7 @@   setOutputFile (optOutputFile opts)   setNoCheckCertificate (optNoCheckCertificate opts) +  setRequestHeader "User-Agent" ("pandoc/" <> T.pack (showVersion pandocVersion))   mapM_ (uncurry setRequestHeader) (optRequestHeaders opts)    case lookupMetaString "lang" (optMetadata opts) of
src/Text/Pandoc/App/CommandLineOptions.hs view
@@ -31,7 +31,8 @@          defConfig, Indent(..), NumberFormat(..)) import Data.Bifunctor (second) import Data.Char (toLower)-import Data.List (intercalate, sort, foldl')+import Data.List (intercalate, sort)+import qualified Data.List as L #ifdef _WINDOWS import Data.List (isPrefixOf) #endif@@ -100,7 +101,7 @@    if (null errors && null unknownOptionErrors)      then -- thread option data structure through all supplied option actions-       runExceptT $ adjustOpts <$> (foldl' (>>=) (return defaults) actions)+       runExceptT $ adjustOpts <$> (L.foldl' (>>=) (return defaults) actions)      else return $ Left $ OptError $ PandocOptionError $ T.pack $              concat errors ++ unlines unknownOptionErrors ++              ("Try " ++ prg ++ " --help for more information.")@@ -198,7 +199,8 @@     VersionInfo -> versionInfo [] Nothing ""     Help -> do       prg <- getProgName-      UTF8.hPutStr stdout (T.pack $ usageMessage prg options)+      mapM_ (UTF8.hPutStrLn stdout . T.stripEnd . T.pack) $+        lines $ usageMessage prg options     OptError e -> E.throwIO e   exitSuccess @@ -218,8 +220,8 @@           map ("html5",) htmlEngines ++           map ("latex",) latexEngines ++           map ("beamer",) latexEngines ++-          [ ("ms", "pdfroff")-          , ("ms", "groff")+          [ ("ms", "groff")+          , ("ms", "pdfroff")           , ("typst", "typst")           , ("context", "context")           ]@@ -302,7 +304,7 @@                      let (key, val) = splitField arg                      return opt{ optMetadata = addMeta key val $                                                  optMetadata opt })-                  "KEY[:VALUE]")+                  "KEY[=VALUE]")                  ""      , Option "" ["metadata-file"]@@ -344,7 +346,7 @@                   "true|false")                  "" -    , Option "s" ["standalone"]+     , Option "s" ["standalone"]                  (OptArg                   (\arg opt -> do                         boolValue <- readBoolFromOptArg "--standalone/-s" arg@@ -366,7 +368,7 @@                      return opt{ optVariables =                                   setVariable (T.pack key) (T.pack val) $                                     optVariables opt })-                  "KEY[:VALUE]")+                  "KEY[=VALUE]")                  ""      , Option "" ["variable-json"]@@ -662,7 +664,7 @@                      let (key, val) = splitField arg                      return opt{ optRequestHeaders =                        (T.pack key, T.pack val) : optRequestHeaders opt })-                  "NAME:VALUE")+                  "NAME=VALUE")                  ""      , Option "" ["no-check-certificate"]@@ -680,6 +682,14 @@                 "FILE")                 "" -- "Specify file for custom abbreviations" +    , Option "" ["typst-input"]+                 (ReqArg+                  (\arg opt -> do+                     let (key, val) = splitField arg+                     return opt{ optTypstInputs = (T.pack key, T.pack val) : optTypstInputs opt })+                  "KEY=VALUE")+                 ""+     , Option "" ["indented-code-classes"]                   (ReqArg                    (\arg opt -> return opt { optIndentedCodeClasses = T.words $@@ -996,21 +1006,16 @@      , Option "" ["bibliography"]                  (ReqArg-                  (\arg opt -> return opt{ optMetadata =-                                            addMeta "bibliography"-                                              (normalizePath arg) $-                                              optMetadata opt })+                  (\arg opt -> return opt{ optBibliography =+                                            optBibliography opt +++                                              [normalizePath arg] })                    "FILE")                  ""       , Option "" ["csl"]                  (ReqArg                   (\arg opt -> do-                    case lookupMeta (T.pack "csl") $ optMetadata opt of-                      Just _ -> optError $ PandocOptionError-                                   "--csl option can only be used once"-                      Nothing -> return opt{ optMetadata = addMeta "csl" (normalizePath arg) $-                      optMetadata opt })+                    return opt{ optCSL = Just (normalizePath arg) })                    "FILE")                  "" 
src/Text/Pandoc/App/Opt.hs view
@@ -28,12 +28,12 @@           , fullDefaultsPath           ) where import Control.Monad.Except (throwError)-import Control.Monad.Trans (MonadIO, liftIO)+import Control.Monad.Trans (MonadIO, liftIO, lift) import Control.Monad ((>=>), foldM) import Control.Monad.State.Strict (StateT, modify, gets)-import System.FilePath ( addExtension, (</>), takeExtension, takeDirectory )+import System.FilePath ( (<.>), (</>), takeDirectory ) import System.Directory ( canonicalizePath )-import Data.Char (toLower)+import Data.Char (toLower, isSpace) import Data.Maybe (fromMaybe) import GHC.Generics hiding (Meta) import Text.Pandoc.Filter (Filter (..))@@ -62,7 +62,7 @@ import qualified Data.ByteString.Char8 as B8 import Text.Pandoc.Definition (Meta(..), MetaValue(..)) import Data.Aeson (defaultOptions, Options(..), Result(..),-                   genericToJSON, fromJSON, camelTo2)+                   genericToJSON, fromJSON, camelTo2, eitherDecodeStrict) import Data.Aeson.TH (deriveJSON) import Control.Applicative ((<|>)) import Data.Yaml@@ -184,6 +184,7 @@     , optBibliography          :: [FilePath]  -- ^ Bibliography files     , optCitationAbbreviations :: Maybe FilePath -- ^ Citation abbreviations     , optSandbox               :: Bool+    , optTypstInputs           :: [(Text, Text)] -- ^ List of parameter values for typst     } deriving (Generic, Show)  instance FromJSON Opt where@@ -271,6 +272,7 @@        <*> o .:? "bibliography" .!= optBibliography defaultOpts        <*> o .:? "citation-abbreviations"        <*> o .:? "sandbox" .!= optSandbox defaultOpts+       <*> o .:? "typst-inputs" .!= optTypstInputs defaultOpts  instance ToJSON Opt where  toJSON = genericToJSON defaultOptions{@@ -395,39 +397,49 @@                 }   where-  resolveVars :: FilePath -> StateT DefaultsState m FilePath-  resolveVars [] = return []-  resolveVars ('$':'{':xs) =+  resolveVars = expandVars (optDataDir opt)+  resolveVarsInFilter (JSONFilter fp) =+    JSONFilter <$> resolveVars fp+  resolveVarsInFilter (LuaFilter fp) =+    LuaFilter <$> resolveVars fp+  resolveVarsInFilter CiteprocFilter = return CiteprocFilter+++expandVars :: (PandocMonad m, MonadIO m)+           => Maybe FilePath+           -> FilePath+           -> StateT DefaultsState m FilePath+expandVars _ [] = return []+expandVars mbDataDir ('$':'{':xs) =     let (ys, zs) = break (=='}') xs      in if null zs            then return $ '$':'{':xs            else do-             val <- lookupEnv' ys-             (val ++) <$> resolveVars (drop 1 zs)-  resolveVars (c:cs) = (c:) <$> resolveVars cs-  lookupEnv' :: String -> StateT DefaultsState m String-  lookupEnv' "." = do+             val <- expandEnv mbDataDir ys+             (val ++) <$> expandVars mbDataDir (drop 1 zs)+expandVars mbDataDir (c:cs) = (c:) <$> expandVars mbDataDir cs++expandEnv :: (PandocMonad m, MonadIO m)+          => Maybe FilePath+          -> String+          -> StateT DefaultsState m String+expandEnv _ "." = do     mbCurDefaults <- gets curDefaults     maybe (return "")           (fmap takeDirectory . liftIO . canonicalizePath)           mbCurDefaults-  lookupEnv' "USERDATA" = do-    mbodatadir <- mapM resolveVars oDataDir-    mbdatadir  <- getUserDataDir+expandEnv mbDataDir "USERDATA" = do+    mbodatadir <- mapM (expandVars mbDataDir) mbDataDir+    mbdatadir'  <- getUserDataDir     defdatadir <- liftIO defaultUserDataDir-    return $ fromMaybe defdatadir (mbodatadir <|> mbdatadir)-  lookupEnv' v = do+    return $ fromMaybe defdatadir (mbodatadir <|> mbdatadir')+expandEnv _ v = do     mbval <- fmap T.unpack <$> lookupEnv (T.pack v)     case mbval of       Nothing -> do         report $ EnvironmentVariableUndefined (T.pack v)         return mempty       Just x  -> return x-  resolveVarsInFilter (JSONFilter fp) =-    JSONFilter <$> resolveVars fp-  resolveVarsInFilter (LuaFilter fp) =-    LuaFilter <$> resolveVars fp-  resolveVarsInFilter CiteprocFilter = return CiteprocFilter   @@ -438,8 +450,9 @@ parseDefaults n dataDir = parseDefsNames n >>= \ds -> return $ \o -> do   -- get parent defaults:   defsParent <- gets $ fromMaybe "" . curDefaults+  expandedDataDir <- mapM (expandVars dataDir) dataDir   -- get child defaults:-  defsChildren <- mapM (fullDefaultsPath dataDir) ds+  defsChildren <- mapM (\d -> expandVars expandedDataDir d >>= lift . fullDefaultsPath expandedDataDir) ds   -- expand parent in defaults inheritance graph by children:   defsGraph <- gets inheritanceGraph   let defsGraphExp = expand defsGraph defsChildren defsParent@@ -837,6 +850,7 @@     , optBibliography          = []     , optCitationAbbreviations = Nothing     , optSandbox               = False+    , optTypstInputs           = []     }  yamlToMeta :: Value -> Parser Meta@@ -858,30 +872,37 @@   setVerbosity $ optVerbosity opt   modify $ \defsState -> defsState{ curDefaults = Just file }   inp <- readFileStrict file-  case decodeEither' (B8.unlines . takeWhile (/= "...") . B8.lines $ inp) of-      Right f -> f opt-      Left err'  -> throwError $-         PandocParseError-             $ T.pack $ Data.Yaml.prettyPrintParseException err'+  let isJSON = B8.take 1 (B8.dropWhile isSpace inp) == "{"+  if isJSON+     then+       case eitherDecodeStrict inp of+         Right f -> f opt+         Left err' -> throwError $ PandocParseError $ T.pack $+            "Error parsing " <> file <> ":\n" <> err'+     else+       case decodeEither' (B8.unlines . takeWhile (/= "...") . B8.lines $ inp) of+           Right f -> f opt+           Left err'  -> throwError $ PandocParseError $ T.pack $+                  "Error parsing " <> file <> ":\n" <>+                  Data.Yaml.prettyPrintParseException err'  fullDefaultsPath :: (PandocMonad m, MonadIO m)                  => Maybe FilePath                  -> FilePath                  -> m FilePath fullDefaultsPath dataDir file = do-  let fp = if null (takeExtension file)-              then addExtension file "yaml"-              else file   defaultDataDir <- liftIO defaultUserDataDir-  let defaultFp = fromMaybe defaultDataDir dataDir </> "defaults" </> fp-  fpExists <- fileExists fp-  if fpExists-     then return fp-     else do-       defaultFpExists <- fileExists defaultFp-       if defaultFpExists-          then return defaultFp-          else return fp+  let ddir = fromMaybe defaultDataDir dataDir </> "defaults"+  let findFile [] = return file+      findFile (fp:fps) = do+        fpExists <- fileExists fp+        if fpExists+           then return fp+           else findFile fps+  findFile [file,+            file <.> "yaml",+            ddir </> file,+            ddir </> file <.> "yaml"]  -- | In a list of lists, append another list in front of every list which -- starts with specific element.
src/Text/Pandoc/Citeproc.hs view
@@ -30,7 +30,7 @@ import Text.Pandoc.Extensions (pandocExtensions) import Text.Pandoc.Logging (LogMessage(..)) import Text.Pandoc.Options (ReaderOptions(..))-import Text.Pandoc.Shared (stringify, tshow)+import Text.Pandoc.Shared (stringify, tshow, makeSections) import Data.Containers.ListUtils (nubOrd) import Text.Pandoc.Walk (query, walk, walkM) import Control.Applicative ((<|>))@@ -295,10 +295,22 @@              -> M.Map Text ItemId              -> Pandoc              -> [Citeproc.Citation Inlines]-getCitations locale otherIdsMap = Foldable.toList . query getCitation+getCitations locale otherIdsMap (Pandoc meta blocks) =+  Foldable.toList (query getCitation meta <>+                   foldMap handleBlock (makeSections False Nothing blocks))  where+  handleBlock :: Block -> Seq.Seq (Citeproc.Citation Inlines)+  handleBlock b@(Div (_,cls,_) _)+    | "section" `elem` cls+    , "reset-citation-positions" `elem` cls =+      case Seq.viewl (query getCitation b) of+        x Seq.:< xs -> addResetTo x Seq.<| xs+        Seq.EmptyL -> mempty+  handleBlock b = query getCitation b+  addResetTo citation = citation{ Citeproc.citationResetPosition = True }   getCitation (Cite cs _fallback) = Seq.singleton $     Citeproc.Citation { Citeproc.citationId = Nothing+                      , Citeproc.citationResetPosition = False                       , Citeproc.citationPrefix = Nothing                       , Citeproc.citationSuffix = Nothing                       , Citeproc.citationNoteNumber =@@ -580,7 +592,8 @@       = Cite (c:cs) (addCommas (needsPeriod zs) ils) :         addParens zs     | otherwise-      = Cite (c:cs) (concatMap noteInParens ils) : addParens zs+      = Cite (c:cs) (dropWhile (== Space) (concatMap noteInParens ils))+         : addParens zs   addParens (x:xs) = x : addParens xs    removeNotes (Span ("",["csl-note"],[]) ils) = Span ("",[],[]) ils
src/Text/Pandoc/Citeproc/BibTeX.hs view
@@ -52,7 +52,8 @@ import           Data.Char              (isAlphaNum, isDigit, isLetter,                                          isUpper, toLower, toUpper,                                          isLower, isPunctuation, isSpace)-import           Data.List              (foldl', intercalate, intersperse)+import           Data.List              (intercalate, intersperse)+import qualified Data.List as L import           Safe                   (readMay) import           Text.Printf            (printf) import           Text.DocLayout         (literal, hsep, nest, hang, Doc(..),@@ -117,7 +118,7 @@       "manuscript"        -> "unpublished"       "graphic"           | variant == Biblatex -> "artwork"       "song"              | variant == Biblatex -> "music"-      "legal_case"        | variant == Biblatex -> "jurisdictionN"+      "legal_case"        | variant == Biblatex -> "jurisdiction"       "legislation"       | variant == Biblatex -> "legislation"       "treaty"            | variant == Biblatex -> "legal"       "personal_communication" | variant == Biblatex -> "letter"@@ -187,6 +188,7 @@            , "annote"            , "url" -- not officially supported, but supported by                    -- some styles (#8287)+           , "doi"            ]    valToInlines (TextVal t) = B.text t@@ -475,12 +477,12 @@     subtitle' <- (guard isPeriodical >> getTitle "issuesubtitle")                   <|> (guard hasMaintitle >>                        guard (not isChapterlike) >>-                       getTitle "mainsubtitle")+                       getTitle "mainsubtitle" <|> return mempty)                   <|> getTitle "subtitle"                   <|> return mempty     titleaddon' <- (guard hasMaintitle >>                      guard (not isChapterlike) >>-                     getTitle "maintitleaddon")+                     getTitle "maintitleaddon" <|> return mempty)                     <|> getTitle "titleaddon"                     <|> return mempty @@ -821,7 +823,7 @@ bibComment = do   cistring "comment"   spaces'-  void inBraces <|> bibSkip <|> return ()+  void inBraces  bibPreamble :: BibParser () bibPreamble = do@@ -1115,7 +1117,7 @@ toLiteralList _ = mzero  concatWith :: Char -> [Inlines] -> Inlines-concatWith sep = foldl' go mempty+concatWith sep = L.foldl' go mempty   where go :: Inlines -> Inlines -> Inlines         go accum s           | s == mempty = accum@@ -1208,7 +1210,7 @@              | otherwise         -> "article-journal"            "book"                -> "book"            "booklet"             -> "pamphlet"-           "bookinbook"          -> "chapter"+           "bookinbook"          -> "book"            "collection"          -> "book"            "dataset"             -> "dataset"            "electronic"          -> "webpage"
src/Text/Pandoc/Citeproc/Locator.hs view
@@ -11,7 +11,7 @@ import Text.Pandoc.Citeproc.Util (splitStrWhen) import Data.Text (Text) import qualified Data.Text as T-import Data.List (foldl')+import qualified Data.List as L import Text.Pandoc.Definition import Text.Pandoc.Parsing import Text.Pandoc.Shared (stringify)@@ -196,7 +196,7 @@   where       except = notFollowedBy pBraces >> p       -- outer and inner-      surround = foldl' (\a (open, close) -> sur open close except <|> a)+      surround = L.foldl' (\a (open, close) -> sur open close except <|> a)                        except                        braces 
src/Text/Pandoc/Citeproc/Name.hs view
@@ -30,7 +30,7 @@ import qualified Data.Text              as T import           Data.List.Split        (splitWhen, wordsBy) import Data.Char (isUpper, isDigit)-import Data.List (foldl')+import qualified Data.List as L  emptyName :: Name emptyName =@@ -83,7 +83,7 @@         ag{ nameSuffix = Just $ stringify xs }       addPart ag (Space : xs) = addPart ag xs       addPart ag _ = ag-  return $ foldl' addPart emptyName commaParts+  return $ L.foldl' addPart emptyName commaParts -- First von Last -- von Last, First -- von Last, Jr ,First
src/Text/Pandoc/Class/CommonState.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {- | Module      : Text.Pandoc.Class.CommonState Copyright   : Copyright (C) 2016-2020 Jesse Rosenthal, John MacFarlane@@ -23,7 +24,9 @@ import Text.Pandoc.MediaBag (MediaBag) import Text.Pandoc.Logging (LogMessage, Verbosity (WARNING)) import Text.Pandoc.Translations.Types (Translations)+#ifdef PANDOC_HTTP_SUPPORT import Network.HTTP.Client (Manager)+#endif  -- | 'CommonState' represents state that is used by all -- instances of 'PandocMonad'.  Normally users should not@@ -51,9 +54,11 @@   , stResourcePath :: [FilePath]     -- ^ Path to search for resources like     -- included images+#ifdef PANDOC_HTTP_SUPPORT   , stManager      :: Maybe Manager     -- ^ Manager for HTTP client; this needs to persist across many requests     -- for efficiency.+#endif   , stVerbosity    :: Verbosity     -- ^ Verbosity level   , stTrace        :: Bool@@ -79,7 +84,9 @@   , stInputFiles = []   , stOutputFile = Nothing   , stResourcePath = ["."]+#ifdef PANDOC_HTTP_SUPPORT   , stManager = Nothing+#endif   , stVerbosity = WARNING   , stTrace = False   }
src/Text/Pandoc/Class/IO.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {- | Module      : Text.Pandoc.Class.IO@@ -37,31 +38,37 @@  import Control.Monad.Except (throwError) import Control.Monad.IO.Class (MonadIO, liftIO)-import Data.ByteString.Lazy (toChunks) import Data.Text (Text, pack, unpack) import Data.Time (TimeZone, UTCTime) import Data.Unique (hashUnique)+#ifdef PANDOC_HTTP_SUPPORT+import Data.ByteString.Lazy (toChunks)+import System.Environment (getEnv)+import Data.Default (def) import Network.Connection (TLSSettings(..)) import qualified Network.TLS as TLS import qualified Network.TLS.Extra as TLS+import System.X509 (getSystemCertificateStore) import Network.HTTP.Client        (httpLbs, Manager, responseBody, responseHeaders,-        Request(port, host, requestHeaders), parseUrlThrow, newManager)+        Request(port, host, requestHeaders), parseUrlThrow, newManager, HttpException) import Network.HTTP.Client.Internal (addProxy) import Network.HTTP.Client.TLS (mkManagerSettings) import Network.HTTP.Types.Header ( hContentType ) import Network.Socket (withSocketsDo)+import Text.Pandoc.Class.CommonState (CommonState (..))+import Text.Pandoc.Class.PandocMonad ( getsCommonState, modifyCommonState )+import qualified Data.CaseInsensitive as CI+#endif import Network.URI (URI(..), parseURI, unEscapeString) import System.Directory (createDirectoryIfMissing)-import System.Environment (getEnv)-import System.FilePath ((</>), takeDirectory, normalise)+import System.FilePath ((</>), takeDirectory, takeFileName, normalise, takeExtension) import qualified System.FilePath.Posix as Posix import System.IO (stderr) import System.IO.Error import System.Random (StdGen)-import Text.Pandoc.Class.CommonState (CommonState (..)) import Text.Pandoc.Class.PandocMonad-       (PandocMonad, getsCommonState, modifyCommonState,+       (PandocMonad,         getMediaBag, report, extractURIData) import Text.Pandoc.Definition (Pandoc, Inline (Image)) import Text.Pandoc.Error (PandocError (..))@@ -72,7 +79,6 @@ import qualified Control.Exception as E import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL-import qualified Data.CaseInsensitive as CI import qualified Data.Text as T import qualified Data.Time import qualified Data.Time.LocalTime@@ -82,8 +88,7 @@ import qualified System.FilePath.Glob import qualified System.Random import qualified Text.Pandoc.UTF8 as UTF8-import Data.Default (def)-import System.X509 (getSystemCertificateStore)+import Codec.Archive.Zip #ifndef EMBED_DATA_FILES import qualified Paths_pandoc as Paths #endif@@ -124,6 +129,7 @@ newUniqueHash :: MonadIO m => m Int newUniqueHash = hashUnique <$> liftIO Data.Unique.newUnique +#ifdef PANDOC_HTTP_SUPPORT getManager :: (PandocMonad m, MonadIO m) => m Manager getManager = do   mbManager <- getsCommonState stManager@@ -153,12 +159,14 @@         newManager tlsManagerSettings       modifyCommonState $ \st -> st{ stManager = Just manager }       pure manager+#endif  openURL :: (PandocMonad m, MonadIO m) => Text -> m (B.ByteString, Maybe MimeType) openURL u  | Just (URI{ uriScheme = "data:",               uriPath = upath }) <- parseURI (T.unpack u)      = pure $ extractURIData upath+#ifdef PANDOC_HTTP_SUPPORT  | otherwise = do      let toReqHeader (n, v) = (CI.mk (UTF8.fromText n), UTF8.fromText v)      customHeaders <- map toReqHeader <$> getsCommonState stRequestHeaders@@ -178,7 +186,12 @@       case res of           Right r -> return r-          Left e  -> throwError $ PandocHttpError u e+          Left (e :: HttpException)+                  -> throwError $ PandocHttpError u (T.pack (show e))+#else+ | otherwise =+     throwError $ PandocHttpError u "pandoc was compiled without HTTP support"+#endif  -- | Read the lazy ByteString contents from a file path, raising an error on -- failure.@@ -233,16 +246,26 @@   where go l' = do UTF8.hPutStr stderr "  "                    UTF8.hPutStrLn stderr l' --- | Extract media from the mediabag into a directory.+-- | Extract media from the mediabag into a directory (or a zip archive if the+-- path supplied ends in @.zip@. extractMedia :: (PandocMonad m, MonadIO m) => FilePath -> Pandoc -> m Pandoc-extractMedia dir d = do+extractMedia path d = do   media <- getMediaBag   let items = mediaItems media+  let (dir, mbZip) = case takeExtension path of+                       ".zip" -> (takeDirectory path, Just (takeFileName path))+                       _ -> (path, Nothing)   if null items     then return d     else do-      mapM_ (writeMedia dir) items+      let archive = foldr addEntry emptyArchive items+      case mbZip of+        Just fname -> writeMedia dir+                        (fname, "application/zip", fromArchive archive)+        Nothing -> mapM_ (writeMedia dir) items       return $ walk (adjustImagePath dir media) d+ where+  addEntry (fp, _mime, content) = addEntryToArchive (toEntry fp 0 content)  -- | Write the contents of a media bag to a path. -- If the path contains URI escape sequences (percent-encoding),
src/Text/Pandoc/Class/PandocMonad.hs view
@@ -534,7 +534,7 @@                   return $ replacementSpan attr src tit lab                 PandocHttpError u er -> do                   report $ CouldNotFetchResource u-                            (T.pack $ show er ++ "\rReplacing image with description.")+                            (er <> "\nReplacing image with description.")                   -- emit alt text                   return $ replacementSpan attr src tit lab                 _ -> throwError e)
src/Text/Pandoc/Error.hs view
@@ -25,16 +25,15 @@ import Data.Text (Text) import qualified Data.Text as T import GHC.Generics (Generic)-import Network.HTTP.Client (HttpException) import System.Exit (ExitCode (..), exitWith)-import System.IO (stderr)+import System.IO (stderr, hPutStrLn) import qualified Text.Pandoc.UTF8 as UTF8 import Text.Printf (printf) import Text.Pandoc.Shared (tshow) import Citeproc (CiteprocError, prettyCiteprocError)  data PandocError = PandocIOError Text IOError-                 | PandocHttpError Text HttpException+                 | PandocHttpError Text Text                  | PandocShouldNeverHappenError Text                  | PandocSomeError Text                  | PandocParseError Text@@ -69,13 +68,14 @@                  deriving (Show, Typeable, Generic)  instance Exception PandocError+ where+   displayException = T.unpack . renderError  renderError :: PandocError -> Text renderError e =   case e of     PandocIOError _ err' -> T.pack $ displayException err'-    PandocHttpError u err' ->-      "Could not fetch " <> u <> "\n" <> tshow err'+    PandocHttpError u err' -> "Could not fetch " <> u <> "\n" <> err'     PandocShouldNeverHappenError s ->       "Something we thought was impossible happened!\n" <>       "Please report this to pandoc's developers: " <> s@@ -86,49 +86,49 @@     PandocSyntaxMapError s -> s     PandocFailOnWarningError -> "Failing because there were warnings."     PandocPDFProgramNotFoundError pdfprog ->-        pdfprog <> " not found. Please select a different --pdf-engine or install " <> pdfprog+        quote pdfprog <> " not found. Please select a different --pdf-engine or install "+        <> quote pdfprog     PandocPDFError logmsg -> "Error producing PDF.\n" <> logmsg     PandocXMLError fp logmsg -> "Invalid XML" <>-        (if T.null fp then "" else " in " <> fp) <> ":\n" <> logmsg+        (if T.null fp then "" else " in " <> quote fp) <> ":\n" <> logmsg     PandocFilterError filtername msg -> "Error running filter " <>-        filtername <> ":\n" <> msg+        quote filtername <> ":\n" <> msg     PandocLuaError msg -> "Error running Lua:\n" <> msg     PandocNoScriptingEngine -> "This version of pandoc has been compiled " <>                                "without Lua support."     PandocCouldNotFindDataFileError fn ->-        "Could not find data file " <> fn+        "Could not find data file " <> quote fn     PandocCouldNotFindMetadataFileError fn ->-        "Could not find metadata file " <> fn+        "Could not find metadata file " <> quote fn     PandocResourceNotFound fn ->-        "File " <> fn <> " not found in resource path"-    PandocTemplateError s -> "Error compiling template " <> s-    PandocNoTemplateError fp -> "No template defined in " <> fp+        "File " <> quote fn <> " not found in resource path"+    PandocTemplateError s -> "Error compiling template " <> quote s+    PandocNoTemplateError fp -> "No template defined in " <> quote fp     PandocAppError s -> s     PandocEpubSubdirectoryError s ->-      "EPUB subdirectory name '" <> s <> "' contains illegal characters"+      "EPUB subdirectory name " <> quote s <> " contains illegal characters"     PandocMacroLoop s ->       "Loop encountered in expanding macro " <> s     PandocUTF8DecodingError f offset w ->-      "UTF-8 decoding error in " <> f <> " at byte offset " <> tshow offset <>-      " (" <> T.pack (printf "%2x" w) <> ").\n" <>-      "The input must be a UTF-8 encoded text."+      "UTF-8 decoding error in " <> quote f <> " at byte offset "+       <> tshow offset <> " (" <> T.pack (printf "%2x" w) <> ").\n"+       <> "The input must be a UTF-8 encoded text."     PandocIpynbDecodingError w ->       "ipynb decoding error: " <> w     PandocUnsupportedCharsetError charset ->-      "Unsupported charset " <> charset+      "Unsupported charset " <> quote charset     PandocFormatError format s ->-      "Error parsing format " <> tshow format <> ": " <> s+      "Error parsing format " <> quote format <> ": " <> s     PandocUnknownReaderError r ->-      "Unknown input format " <> r <>+      "Unknown input format " <> quote r <>       case r of         "doc" -> "\nPandoc can convert from DOCX, but not from DOC." <>                  "\nTry using Word to save your DOC file as DOCX," <>                  " and convert that with pandoc."         "pdf" -> "\nPandoc can convert to PDF, but not from PDF."-        "asciidoc" -> "\nPandoc can convert to asciidoc, but not from asciidoc."         _     -> ""     PandocUnknownWriterError w ->-       "Unknown output format " <> w <>+       "Unknown output format " <> quote w <>        case w of          "pdf" -> "To create a pdf using pandoc, use" <>                   " -t latex|beamer|context|ms|html5|typst" <>@@ -137,28 +137,32 @@          "doc" -> "\nPandoc can convert to DOCX, but not to DOC."          _     -> ""     PandocUnsupportedExtensionError ext f ->-      "The extension " <> ext <> " is not supported " <>+      "The extension " <> quote ext <> " is not supported " <>       "for " <> f <> ".\nUse --list-extensions=" <> f <> " to " <>       "list supported extensions."     PandocCiteprocError e' ->       prettyCiteprocError e'     PandocBibliographyError fp msg ->-      "Error reading bibliography file " <> fp <> ":\n" <> msg+      "Error reading bibliography file " <> quote fp <> ":\n" <> msg     PandocInputNotTextError fp ->       "Expected text as an input, but received binary data from " <>       (if T.null fp         then "stdin"-        else "file " <> fp) <>+        else "file " <> quote fp) <>       ".\nIf you intended to convert from binary format, verify that it's " <>       "supported and use\nexplicit -f FORMAT." +quote :: Text -> Text+quote s = "'" <> s <> "'"  -- | Handle PandocError by exiting with an error message. handleError :: Either PandocError a -> IO a handleError (Right r) = return r handleError (Left e) =   case e of-    PandocIOError _ err' -> ioError err'+    PandocIOError _ err' -> do+      hPutStrLn stderr $ displayException err'+      exitWith (ExitFailure 1)     _ -> err exitCode (renderError e)  where   exitCode =
src/Text/Pandoc/Extensions.hs view
@@ -521,6 +521,7 @@        , Ext_rebase_relative_paths        , Ext_wikilinks_title_after_pipe        , Ext_wikilinks_title_before_pipe+       , Ext_alerts        ]   getAll "markdown_strict"   = allMarkdownExtensions   getAll "markdown_phpextra" = allMarkdownExtensions@@ -661,6 +662,8 @@   getAll "mediawiki"       = autoIdExtensions <>     extensionsFromList     [ Ext_smart ]-  getAll "typst"           = extensionsFromList [Ext_citations, Ext_smart]+  getAll "typst"           = autoIdExtensions <>+    extensionsFromList [Ext_citations, Ext_smart]   getAll "djot"            = extensionsFromList [Ext_sourcepos]+  getAll "man"             = autoIdExtensions   getAll _                 = mempty
src/Text/Pandoc/Format.hs view
@@ -22,7 +22,7 @@ import Control.Monad.Except (throwError) import Data.Char (toLower) import Data.Foldable (asum)-import Data.List (foldl')+import qualified Data.List as L import System.FilePath (splitExtension, takeExtension) import Text.Pandoc.Class (PandocMonad) import Text.Pandoc.Error (PandocError (..))@@ -142,7 +142,7 @@  pExtensionsDiff :: (UpdateSourcePos s Char, Stream s m Char)                 => ParsecT s u m ExtensionsDiff-pExtensionsDiff = foldl' (flip ($)) mempty <$> many extMod+pExtensionsDiff = L.foldl' (flip ($)) mempty <$> many extMod   where     extMod = do       polarity <- oneOf "-+"
src/Text/Pandoc/ImageSize.hs view
@@ -374,7 +374,9 @@   let dpi = fromIntegral $ writerDpi opts   let dirToInt dir = do         dim <- findAttrBy (== QName dir Nothing Nothing) doc >>= lengthToDim-        return $ inPixel opts dim+        case dim of+           Percent _ -> mzero+           _ -> pure $ inPixel opts dim   w <- dirToInt "width" <|> (fst <$> viewboxSize)   h <- dirToInt "height" <|> (snd <$> viewboxSize)   return ImageSize {
src/Text/Pandoc/Logging.hs view
@@ -105,12 +105,14 @@   | UnclosedDiv SourcePos SourcePos   | UnsupportedCodePage Int   | YamlWarning SourcePos Text+  | UnsupportedPdfStandard Text   deriving (Show, Eq, Data, Ord, Typeable, Generic)  instance ToJSON LogMessage where   toJSON x = object $     "verbosity" .= toJSON (messageVerbosity x) :     "type" .= toJSON (show $ toConstr x) :+    "pretty" .= toJSON (showLogMessage x) :     case x of       SkippedContent s pos ->            ["contents" .= s,@@ -290,6 +292,8 @@            , "column" .= toJSON (sourceColumn pos)            , "message" .= msg            ]+      UnsupportedPdfStandard s ->+           ["contents" .= s]  showPos :: SourcePos -> Text showPos pos = Text.pack $ sn ++ "line " ++@@ -437,6 +441,8 @@        UnsupportedCodePage cpg -> "Unsupported code page " <> tshow cpg <>           ". Text will likely be garbled."        YamlWarning pos m -> "YAML warning (" <> showPos pos <> "): " <> m+       UnsupportedPdfStandard s ->+         "PDF standard '" <> s <> "' is not supported by LaTeX and will be ignored."  messageVerbosity :: LogMessage -> Verbosity messageVerbosity msg =@@ -496,3 +502,4 @@        UnclosedDiv{}                 -> WARNING        UnsupportedCodePage{}         -> WARNING        YamlWarning{}                 -> WARNING+       UnsupportedPdfStandard{}      -> WARNING
src/Text/Pandoc/Options.hs view
@@ -74,6 +74,7 @@        , readerTrackChanges          :: TrackChanges -- ^ Track changes setting for docx        , readerStripComments         :: Bool -- ^ Strip HTML comments instead of parsing as raw HTML                                              -- (only implemented in commonmark)+       , readerTypstInputs           :: [(Text, Text)] -- ^ parameters specified using --typst-input } deriving (Show, Read, Data, Typeable, Generic)  instance HasSyntaxExtensions ReaderOptions where@@ -90,6 +91,7 @@                , readerDefaultImageExtension = ""                , readerTrackChanges          = AcceptChanges                , readerStripComments         = False+               , readerTypstInputs           = []                }  defaultAbbrevs :: Set.Set Text@@ -442,7 +444,7 @@ isEnabled ext opts = ext `extensionEnabled` getExtensions opts  defaultMathJaxURL :: Text-defaultMathJaxURL = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js"+defaultMathJaxURL = "https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js"  defaultWebTeXURL :: Text defaultWebTeXURL = "https://latex.codecogs.com/png.latex?"
src/Text/Pandoc/PDF.hs view
@@ -218,7 +218,7 @@   verbosity <- getVerbosity   liftIO $ toPdfViaTempFile verbosity program args (:[]) ".html" source --- convert SVG to PDF, and pixel formatst to PNG or JPEG, for TeX formats+-- convert SVG to PDF, and pixel formats to PNG or JPEG, for TeX formats convertImages :: (PandocMonad m, MonadIO m)               => WriterOptions -> FilePath -> Inline -> m Inline convertImages opts tmpdir (Image attr ils (src, tit)) = do@@ -305,6 +305,8 @@                      x | "! Package inputenc Error" `BC.isPrefixOf` x                            && program /= "xelatex"                        -> "\nTry running pandoc with --pdf-engine=xelatex."+                     "! Package longtable Error: longtable not in 1-column mode."+                       -> "\nTry adding the .float class attribute to your tables."                      _ -> ""           return $ Left $ logmsg <> extramsg        (ExitSuccess, Nothing)  -> return $ Left ""@@ -628,6 +630,7 @@                                , "SELFAUTOPARENT"                                , "SFDFONTS"                                , "SHELL"+                               , "SOURCE_DATE_EPOCH"                                , "T1FONTS"                                , "T1INPUTS"                                , "T42FONTS"
src/Text/Pandoc/Parsing/General.hs view
@@ -284,7 +284,7 @@                => (Char -> Char -> Bool) -> [Text] -> ParsecT s st m Text oneOfStrings' _ [] = Prelude.fail "no strings to match" oneOfStrings' matches strs =-  TL.toStrict . TB.toLazyText <$> try (go (TB.fromText mempty) strs)+  TL.toStrict . TB.toLazyText <$> try (go mempty strs)  where    go acc strs' = do      c <- anyChar@@ -400,15 +400,13 @@ -- | Parse string, case insensitive. stringAnyCase :: (Stream s m Char, UpdateSourcePos s Char)               => Text -> ParsecT s st m Text-stringAnyCase = fmap T.pack . stringAnyCase' . T.unpack--stringAnyCase' :: (Stream s m Char, UpdateSourcePos s Char)-               => String -> ParsecT s st m String-stringAnyCase' [] = string ""-stringAnyCase' (x:xs) = do-  firstChar <- char (toUpper x) <|> char (toLower x)-  rest <- stringAnyCase' xs-  return (firstChar:rest)+stringAnyCase t = TL.toStrict . TB.toLazyText <$> go (T.unpack t)+  where+    go [] = string "" $> mempty+    go (x:xs) = do+      c <- char (toUpper x) <|> char (toLower x)+      rest <- go xs+      pure $ TB.singleton c <> rest  -- TODO rewrite by just adding to Sources stream? -- | Parse contents of 'str' using 'parser' and return result.@@ -484,8 +482,10 @@                               xs <- many (satisfy isEmailChar)                               return (x:xs)        isEmailChar c     = isAlphaNum c || isEmailPunct c-       isEmailPunct c    = T.any (== c) "!\"#$%&'*+-/=?^_{|}~;"+       isEmailPunct c    = c `Set.member` emailPunctChars +emailPunctChars :: Set.Set Char+emailPunctChars = Set.fromList "!\"#$%&'*+-/=?^_{|}~;"  uriScheme :: (Stream s m Char, UpdateSourcePos s Char) => ParsecT s st m Text uriScheme = oneOfStringsCI (Set.toList schemes)@@ -532,7 +532,7 @@            <|> entity            <|> try (punct <* lookAhead (void wordChar <|> void percentEscaped))     uriChunkBetween l r = try $ do chunk <- between (char l) (char r) uriChunk-                                   return (T.pack $ [l] ++ chunk ++ [r])+                                   return $ T.singleton l <> T.pack chunk <> T.singleton r  -- | Applies a parser, returns tuple of its results and its horizontal -- displacement (the difference between the source column at the end@@ -688,7 +688,7 @@   where     ident' = fromMaybe ident (lookup "id" kvs)     cls'   = maybe cls T.words $ lookup "class" kvs-    kvs'   = filter (\(k,_) -> k /= "id" || k /= "class") kvs+    kvs'   = filter (\(k,_) -> k /= "id" && k /= "class") kvs  insertIncludedFile :: (PandocMonad m, HasIncludeFiles st)                    => ParsecT a st m b -- ^ parser to apply@@ -755,8 +755,9 @@       ((pos,txt):_) ->         let ls = T.lines txt <> [""]             ln = (errLine - sourceLine pos) + 1-         in if length ls > ln && ln >= 1-               then T.concat ["\n", ls !! (ln - 1)-                             ,"\n", T.replicate (errColumn - 1) " "-                             ,"^"]-               else ""+         in case drop (ln - 1) ls of+               (l:_) | ln >= 1 ->+                 T.concat ["\n", l+                          ,"\n", T.replicate (errColumn - 1) " "+                          ,"^"]+               _ -> ""
src/Text/Pandoc/Parsing/Lists.hs view
@@ -113,7 +113,7 @@            => ParsecT s ParserState m (ListNumberStyle, Int) exampleNum = do   char '@'-  lab <- mconcat . map T.pack <$>+  lab <- T.pack . concat <$>                     many (many1 alphaNum <|>                           try (do c <- char '_' <|> char '-'                                   cs <- many1 alphaNum
src/Text/Pandoc/Parsing/Math.hs view
@@ -28,6 +28,8 @@   (UpdateSourcePos, anyChar, char, digit, newline, satisfy, space, string)  import qualified Data.Text as T+import qualified Data.Text.Lazy as TL+import qualified Data.Text.Lazy.Builder as TB  mathInlineWith :: (Stream s m Char, UpdateSourcePos s Char)  => Text -> Text -> ParsecT s st m Text mathInlineWith op cl = try $ do@@ -42,31 +44,38 @@                            (try (string "text" >>                                  (("\\text" <>) <$> inBalancedBraces 0 ""))                             <|>  (\c -> T.pack ['\\',c]) <$> anyChar))-                   <|> ("\n" <$ blankline <* notFollowedBy' blankline)+                   <|> ("\n" <$ blankline <* notFollowedBy' blankline <* notFollowedBy (char '$'))                    <|> (T.pack <$> many1 spaceChar <* notFollowedBy (char '$'))                     ) (try $ textStr cl)   notFollowedBy digit  -- to prevent capture of $5   return $ trimMath $ T.concat words'  where-  inBalancedBraces :: (Stream s m Char, UpdateSourcePos s Char) => Int -> Text -> ParsecT s st m Text-  inBalancedBraces n = fmap T.pack . inBalancedBraces' n . T.unpack+  inBalancedBraces :: (Stream s m Char, UpdateSourcePos s Char)+                   => Int -> Text -> ParsecT s st m Text+  inBalancedBraces n t =+    TL.toStrict . TB.toLazyText <$>+      go n False (TB.fromText t) (not (T.null t)) -  inBalancedBraces' :: (Stream s m Char, UpdateSourcePos s Char) => Int -> String -> ParsecT s st m String-  inBalancedBraces' 0 "" = do+  -- go depth lastWasBackslash accumulator started+  go :: (Stream s m Char, UpdateSourcePos s Char)+     => Int -> Bool -> TB.Builder -> Bool -> ParsecT s st m TB.Builder+  go 0 _ acc False = do     c <- anyChar     if c == '{'-       then inBalancedBraces' 1 "{"+       then go 1 False (acc <> TB.singleton '{') True        else mzero-  inBalancedBraces' 0 s = return $ reverse s-  inBalancedBraces' numOpen ('\\':xs) = do+  go 0 _ acc True = return acc+  go depth True acc _ = do     c <- anyChar-    inBalancedBraces' numOpen (c:'\\':xs)-  inBalancedBraces' numOpen xs = do+    go depth False (acc <> TB.singleton c) True+  go depth False acc _ = do     c <- anyChar+    let acc' = acc <> TB.singleton c     case c of-         '}' -> inBalancedBraces' (numOpen - 1) (c:xs)-         '{' -> inBalancedBraces' (numOpen + 1) (c:xs)-         _   -> inBalancedBraces' numOpen (c:xs)+         '\\' -> go depth True acc' True+         '}'  -> go (depth - 1) False acc' True+         '{'  -> go (depth + 1) False acc' True+         _    -> go depth False acc' True  mathDisplayWith :: (Stream s m Char, UpdateSourcePos s Char) => Text -> Text -> ParsecT s st m Text mathDisplayWith op cl = try $ fmap T.pack $ do
src/Text/Pandoc/Readers/AsciiDoc.hs view
@@ -37,7 +37,7 @@ import Text.Pandoc.Logging import Text.Pandoc.Sources import Control.Monad.State-import Data.List (intersperse, foldl')+import qualified Data.List as L import Data.Char (chr, ord) import qualified Data.Text as T import qualified Data.Map as M@@ -148,7 +148,7 @@          B.setMeta "version" vers .          maybe id (B.setMeta "date") mbdate .          maybe id (B.setMeta "remark") mbremark) .-    flip (foldl' (\m (k,v) ->+    flip (L.foldl' (\m (k,v) ->                     -- leave out flags that are set just for processing                     if k == "sectids" || k == "stem"                        then m@@ -363,7 +363,7 @@                          (B.str ("[" <> t <> "]"))     A.Button t -> pure $ B.spanWith ("",["button"],[])                          (B.strong $ B.str ("[" <> t <> "]"))-    A.Kbd ts -> pure $ mconcat $ intersperse (B.str "+") $+    A.Kbd ts -> pure $ mconcat $ L.intersperse (B.str "+") $          map (B.spanWith ("",["kbd"],[]) . B.strong . B.str) ts     A.Menu ts -> pure $ B.spanWith ("",["menu"],[]) $         B.strong $ B.text $ T.intercalate " › " ts
src/Text/Pandoc/Readers/Djot.hs view
@@ -37,7 +37,6 @@ import Text.Pandoc.Emoji (emojiToInline) import Control.Monad.Reader import qualified Data.Foldable as F-import Data.List (foldl') import Data.ByteString (ByteString) -- import Debug.Trace @@ -141,7 +140,7 @@                      (hs,bs):rs -> (hs,row:bs):rs                      [] -> [([],[row])]       let reverseSnd (as,bs) = (as,reverse bs)-      let bodies = reverse $ map reverseSnd $ foldl' getBody [] rest+      let bodies = reverse $ map reverseSnd $ F.foldl' getBody [] rest       let toCell (D.Cell _ al ils) =             Cell nullAttr (toAlign al) (RowSpan 1) (ColSpan 1)                    . (\is -> [Para $ toList is]) <$> convertInlines ils
src/Text/Pandoc/Readers/DocBook.hs view
@@ -46,7 +46,7 @@ import Text.Pandoc.Class.PandocMonad (PandocMonad, report) import Text.Pandoc.Options import Text.Pandoc.Logging (LogMessage(..))-import Text.Pandoc.Shared (safeRead, extractSpaces)+import Text.Pandoc.Shared (safeRead, addPandocAttributes) import Text.Pandoc.Sources (ToSources(..), sourcesToText) import Text.Pandoc.Transforms (headerShift) import Text.TeXMath (readMathML, writeTeX)@@ -173,7 +173,7 @@ [ ] errorname - An error name [ ] errortext - An error message. [ ] errortype - The classification of an error message-[ ] example - A formal example, with a title+[x] example - A formal example, with a title [ ] exceptionname - The name of an exception [ ] fax - A fax number [ ] fieldsynopsis - The name of a field in a class definition@@ -438,7 +438,7 @@ [ ] shortaffil - A brief description of an affiliation [ ] shortcut - A key combination for an action that is also accessible through     a menu-[ ] sidebar - A portion of a document that is isolated from the main+[x] sidebar - A portion of a document that is isolated from the main     narrative flow [ ] sidebarinfo - Meta-information for a Sidebar [x] simpara - A paragraph that contains only text and inline markup, no block@@ -548,6 +548,7 @@                       , dbBook          :: Bool                       , dbContent       :: [Content]                       , dbLiteralLayout :: Bool+                      , dbElementStack  :: [Text]                       } deriving Show  instance Default DBState where@@ -556,7 +557,9 @@                , dbMeta = mempty                , dbBook = False                , dbContent = []-               , dbLiteralLayout = False }+               , dbLiteralLayout = False+               , dbElementStack = []+               }   readDocBook :: (PandocMonad m, ToSources a)@@ -621,9 +624,13 @@ --  addMetadataFromElement :: PandocMonad m => Element -> DB m Blocks-addMetadataFromElement e =-  mempty <$ mapM_ handleMetadataElement+addMetadataFromElement e = do+  -- Add metadata if at root or appropriate parent element+  elementStack <- gets dbElementStack+  if take 1 elementStack `elem` [[], ["book"], ["article"]]+    then mempty <$ mapM_ handleMetadataElement                   (filterChildren ((isMetadataField . qName . elName)) e)+    else return mempty  where   handleMetadataElement elt =     case qName (elName elt) of@@ -724,9 +731,7 @@   , "articleinfo"   , "attribution"   , "authorinitials"-  , "bibliodiv"   , "biblioentry"-  , "bibliography"   , "bibliomisc"   , "bibliomixed"   , "blockquote"@@ -765,31 +770,19 @@   , "preface"   , "procedure"   , "programlisting"-  , "qandadiv"   , "question"-  , "refsect1"   , "refsect1info"-  , "refsect2"   , "refsect2info"-  , "refsect3"   , "refsect3info"-  , "refsection"   , "refsectioninfo"   , "screen"-  , "sect1"   , "sect1info"-  , "sect2"   , "sect2info"-  , "sect3"   , "sect3info"-  , "sect4"   , "sect4info"-  , "sect5"   , "sect5info"-  , "section"   , "sectioninfo"   , "simpara"-  , "simplesect"   , "substeps"   , "subtitle"   , "table"@@ -797,8 +790,14 @@   , "titleabbrev"   , "toc"   , "variablelist"-  ] ++ admonitionTags+  ] ++ sectionTags ++ admonitionTags +sectionTags :: [Text]+sectionTags = ["bibliography", "bibliodiv"+              , "sect1", "sect2", "sect3", "sect4", "sect5", "section", "simplesect"+              , "refsect1", "refsect2", "refsect3", "refsection", "qandadiv"+              ]+ admonitionTags :: [Text] admonitionTags = ["caution","danger","important","note","tip","warning"] @@ -853,9 +852,16 @@   fmap (imageWith attr imageUrl tit) capt  getBlocks :: PandocMonad m => Element -> DB m Blocks-getBlocks e =  mconcat <$>-                 mapM parseBlock (elContent e)+getBlocks e = do+  modify (\st -> st{ dbElementStack = qName (elName e) : dbElementStack st })+  blocks <- mconcat <$> mapM parseBlock (elContent e)+  modify (\st -> st{ dbElementStack = drop 1 $ dbElementStack st })+  return blocks +getRoleAttr :: Element -> [(Text, Text)] -- extract role attribute and add it to the attribute list+getRoleAttr e = case attrValue "role" e of+                  "" -> []+                  r  -> [("role", r)]  parseBlock :: PandocMonad m => Content -> DB m Blocks parseBlock (Text (CData CDataRaw _ _)) = return mempty -- DOCTYPE@@ -863,8 +869,8 @@                                      then return mempty                                      else return $ plain $ trimInlines $ text s parseBlock (CRef x) = return $ plain $ str $ T.toUpper x-parseBlock (Elem e) =-  case qName (elName e) of+parseBlock (Elem e) = do+  parsedBlock <- case qName (elName e) of         "toc"   -> skip -- skip TOC, since in pandoc it's autogenerated         "index" -> skip -- skip index, since page numbers meaningless         "para"  -> parseMixed para (elContent e)@@ -913,8 +919,8 @@         "refsect2" -> sect 2         "refsect3" -> sect 3         "refsection" -> gets dbSectionLevel >>= sect . (+1)-        l | l `elem` titledBlockElements -> parseAdmonition l-        l | l `elem` admonitionTags -> parseAdmonition l+        l | l `elem` titledBlockElements -> parseAdmonition False l+        l | l `elem` admonitionTags -> parseAdmonition True l         "area" -> skip         "areaset" -> skip         "areaspec" -> skip@@ -976,6 +982,9 @@         "title" -> return mempty     -- handled in parent element         "subtitle" -> return mempty  -- handled in parent element         _ -> skip >> getBlocks e+  if qName (elName e) `elem` sectionTags+     then return parsedBlock+     else return $ addPandocAttributes (getRoleAttr e) parsedBlock    where skip = do            let qn = qName $ elName e            let name = if "pi-" `T.isPrefixOf` qn@@ -1111,7 +1120,10 @@            modify $ \st -> st{ dbSectionLevel = n }            b <- getBlocks e            modify $ \st -> st{ dbSectionLevel = n - 1 }-           return $ headerWith (elId, classes, maybeToList titleabbrevElAsAttr++attrs) n' headerText <> b+           let hdr = addPandocAttributes (getRoleAttr e)+                        $ headerWith (elId, classes, maybeToList titleabbrevElAsAttr ++ attrs)+                                      n' headerText+           return $ hdr <> b          titleabbrevElAsAttr =            case filterChild (named "titleabbrev") e `mplus`                 (filterChild (named "info") e >>=@@ -1134,17 +1146,20 @@            b <- p            case mbt of              Nothing -> return b-             Just t -> return $ divWith (attrValue "id" e,[],[])+             Just t -> return $ divWith (attrValue "id" e, [], getRoleAttr e)                          (divWith ("", ["title"], []) (plain t) <> b)           -- Admonitions are parsed into a div. Following other Docbook tools that output HTML,          -- we parse the optional title as a div with the @title@ class, and give the          -- block itself a class corresponding to the admonition name.-         parseAdmonition label = do+         parseAdmonition alwaysIncludeTitle label = do            mbt <- getTitle            -- this will ignore the title element if it is present:            b <- getBlocks e-           let t = divWith ("", ["title"], []) (plain $ fromMaybe mempty mbt)+           let t = maybe mempty (divWith ("", ["title"], []) . plain)+                        (case mbt of+                           Nothing | alwaysIncludeTitle -> Just mempty+                           _ -> mbt)            -- we also attach the label as a class, so it can be styled properly            return $ divWith (attrValue "id" e,[label],[]) (t <> b) @@ -1234,8 +1249,8 @@      else return $ text s parseInline (CRef ref) =   return $ text $ fromMaybe (T.toUpper ref) $ lookupEntity ref-parseInline (Elem e) =-  case qName (elName e) of+parseInline (Elem e) = do+  parsedInline <- case qName (elName e) of         "anchor" -> do            return $ spanWith (attrValue "id" e, [], []) mempty         "phrase" -> do@@ -1357,6 +1372,9 @@         -- <?asciidor-br?> to in handleInstructions, above.         "pi-asciidoc-br" -> return linebreak         _          -> skip >> innerInlines id+  return $ case qName (elName e) of+    "emphasis" -> parsedInline+    _ -> addPandocAttributes (getRoleAttr e) parsedInline    where skip = do            let qn = qName $ elName e            let name = if "pi-" `T.isPrefixOf` qn@@ -1365,8 +1383,7 @@            lift $ report $ IgnoredElement name            return mempty -         innerInlines f = extractSpaces f . mconcat <$>-                          mapM parseInline (elContent e)+         innerInlines f = f . mconcat <$> mapM parseInline (elContent e)          codeWithLang = do            let classes' = case attrValue "language" e of                                "" -> []
src/Text/Pandoc/Readers/Docx.hs view
@@ -74,7 +74,8 @@ import Data.Bifunctor (bimap, first) import qualified Data.ByteString.Lazy as B import Data.Default (Default)-import Data.List (delete, intersect, foldl')+import Data.List (delete, intersect)+import qualified Data.List as L import Data.Char (isSpace) import qualified Data.Map as M import qualified Data.Text as T@@ -82,7 +83,7 @@ import Data.Sequence (ViewL (..), viewl) import qualified Data.Sequence as Seq import qualified Data.Set as Set-import Citeproc (ItemId(..), Reference(..), CitationItem(..))+import Citeproc (ItemId(..), Val(TextVal,FancyVal), Reference(..), CitationItem(..)) import qualified Citeproc import Text.Pandoc.Builder as Pandoc import Text.Pandoc.MediaBag (MediaBag)@@ -535,8 +536,13 @@                => Citeproc.Citation T.Text                -> DocxContext m [Citation] handleCitation citation = do+  let getItemId item =+        case citationItemData item >>= M.lookup "citation-key" . referenceVariables of+          Just (TextVal k) -> ItemId k+          Just (FancyVal k) -> ItemId k+          _ -> citationItemId item   let toPandocCitation item =-        Citation{ citationId = unItemId (Citeproc.citationItemId item)+        Citation{ citationId = unItemId (getItemId item)                 , citationPrefix = maybe [] (toList . text) $                                      Citeproc.citationItemPrefix item                 , citationSuffix = (toList . text) $@@ -553,8 +559,7 @@   let refs = mapMaybe (\item -> fmap (\itemData -> text <$>                                         -- see #10366, sometimes itemData has a different                                         -- id and we need to use the same one:-                                        itemData{ referenceId =-                                                    Citeproc.citationItemId item })+                                        itemData{ referenceId = getItemId item })                                   (Citeproc.citationItemData item)) items   modify $ \st ->     st{ docxReferences = foldr@@ -625,8 +630,8 @@ splitHeaderRows :: Bool -> [Docx.Row] -> ([Docx.Row], [Docx.Row]) splitHeaderRows hasFirstRowFormatting rs = bimap reverse reverse $ fst   $ if hasFirstRowFormatting-    then foldl' f ((take 1 rs, []), True) (drop 1 rs)-    else foldl' f (([], []), False) rs+    then L.foldl' f ((take 1 rs, []), True) (drop 1 rs)+    else L.foldl' f (([], []), False) rs   where     f ((headerRows, bodyRows), previousRowWasHeader) r@(Docx.Row h cs)       | h == HasTblHeader || (previousRowWasHeader && any isContinuationCell cs)@@ -713,74 +718,80 @@              in M.insert (numId, lvl) start                   (M.filterWithKey notExpired listState) }     makeHeaderAnchor $ headerWith ("", addNum classes, []) n ils-bodyPartToBlocks (Paragraph pPr parparts)-  | Just True <- pBidi pPr = do-      let pPr' = pPr { pBidi = Nothing }-      local (\s -> s{ docxInBidi = True })-        (bodyPartToBlocks (Paragraph pPr' parparts))-  | isCodeDiv pPr = do-      transform <- paragraphStyleToTransform pPr-      return $-        transform $-        codeBlock $-        T.concat $-        map parPartToText parparts-  | otherwise = do-    ils <- trimSps . smushInlines <$> mapM parPartToInlines parparts-    prevParaIls <- gets docxPrevPara-    dropIls <- gets docxDropCap-    let ils' = dropIls <> ils-    let (paraOrPlain, pPr')-          | hasStylesInheritedFrom ["Compact"] pPr = (plain, removeStyleNamed "Compact" pPr)-          | otherwise = (para, pPr)-    if dropCap pPr'-      then do modify $ \s -> s { docxDropCap = ils' }-              return mempty-      else do modify $ \s -> s { docxDropCap = mempty }-              let ils'' = (if null prevParaIls then mempty-                          else prevParaIls <> space) <> ils'-                  handleInsertion = do-                    modify $ \s -> s {docxPrevPara = mempty}-                    transform <- paragraphStyleToTransform pPr'-                    return $ transform $ paraOrPlain ils''-              opts <- asks docxOptions-              case (pChange pPr', readerTrackChanges opts) of-                  _ | null ils'', not (isEnabled Ext_empty_paragraphs opts) ->+bodyPartToBlocks (Paragraph pPr parparts) = do+  let getMainPar+        | Just True <- pBidi pPr = do+            let pPr' = pPr { pBidi = Nothing }+            local (\s -> s{ docxInBidi = True })+              (bodyPartToBlocks (Paragraph pPr' parparts))+        | isCodeDiv pPr = do+            transform <- paragraphStyleToTransform pPr+            return $+              transform $+              codeBlock $+              T.concat $+              map parPartToText parparts+        | otherwise = do+          ils <- trimSps . smushInlines <$> mapM parPartToInlines parparts+          prevParaIls <- gets docxPrevPara+          dropIls <- gets docxDropCap+          let ils' = dropIls <> ils+          let (paraOrPlain, pPr')+                | hasStylesInheritedFrom ["Compact"] pPr = (plain, removeStyleNamed "Compact" pPr)+                | otherwise = (para, pPr)+          if dropCap pPr'+            then do modify $ \s -> s { docxDropCap = ils' }                     return mempty-                  (Just (TrackedChange Insertion _), AcceptChanges) ->-                      handleInsertion-                  (Just (TrackedChange Insertion _), RejectChanges) -> do-                      modify $ \s -> s {docxPrevPara = ils''}-                      return mempty-                  (Just (TrackedChange Insertion (ChangeInfo _ cAuthor cDate))-                   , AllChanges) -> do-                      let attr = ("", ["paragraph-insertion"], addAuthorAndDate cAuthor cDate)-                          insertMark = spanWith attr mempty-                      transform <- paragraphStyleToTransform pPr'-                      return $ transform $-                        paraOrPlain $ ils'' <> insertMark-                  (Just (TrackedChange Deletion _), AcceptChanges) -> do-                      modify $ \s -> s {docxPrevPara = ils''}-                      return mempty-                  (Just (TrackedChange Deletion _), RejectChanges) ->-                      handleInsertion-                  (Just (TrackedChange Deletion (ChangeInfo _ cAuthor cDate))-                   , AllChanges) -> do-                      let attr = ("", ["paragraph-deletion"], addAuthorAndDate cAuthor cDate)-                          insertMark = spanWith attr mempty-                      transform <- paragraphStyleToTransform pPr'-                      return $ transform $-                        paraOrPlain $ ils'' <> insertMark-                  _ -> handleInsertion-bodyPartToBlocks (ListItem pPr numId lvl (Just levelInfo) parparts) = do-  -- We check whether this current numId has previously been used,-  -- since Docx expects us to pick up where we left off.+            else do modify $ \s -> s { docxDropCap = mempty }+                    let ils'' = (if null prevParaIls then mempty+                                else prevParaIls <> space) <> ils'+                        handleInsertion = do+                          modify $ \s -> s {docxPrevPara = mempty}+                          transform <- paragraphStyleToTransform pPr'+                          return $ transform $ paraOrPlain ils''+                    opts <- asks docxOptions+                    case (pChange pPr', readerTrackChanges opts) of+                        _ | null ils'', not (isEnabled Ext_empty_paragraphs opts) ->+                          return mempty+                        (Just (TrackedChange Insertion _), AcceptChanges) ->+                            handleInsertion+                        (Just (TrackedChange Insertion _), RejectChanges) -> do+                            modify $ \s -> s {docxPrevPara = ils''}+                            return mempty+                        (Just (TrackedChange Insertion (ChangeInfo _ cAuthor cDate))+                         , AllChanges) -> do+                            let attr = ("", ["paragraph-insertion"], addAuthorAndDate cAuthor cDate)+                                insertMark = spanWith attr mempty+                            transform <- paragraphStyleToTransform pPr'+                            return $ transform $+                              paraOrPlain $ ils'' <> insertMark+                        (Just (TrackedChange Deletion _), AcceptChanges) -> do+                            modify $ \s -> s {docxPrevPara = ils''}+                            return mempty+                        (Just (TrackedChange Deletion _), RejectChanges) ->+                            handleInsertion+                        (Just (TrackedChange Deletion (ChangeInfo _ cAuthor cDate))+                         , AllChanges) -> do+                            let attr = ("", ["paragraph-deletion"], addAuthorAndDate cAuthor cDate)+                                insertMark = spanWith attr mempty+                            transform <- paragraphStyleToTransform pPr'+                            return $ transform $+                              paraOrPlain $ ils'' <> insertMark+                        _ -> handleInsertion+  (if pBottomBorder pPr+      then (<> horizontalRule)+      else id)+    <$> getMainPar+bodyPartToBlocks (ListItem pPr numId lvl isRestart (Just levelInfo) parparts) = do+  -- We check whether this current abstract numbering id has previously been+  -- used, since Docx expects us to pick up where we left off -- unless this+  -- item explicitly restarts numbering (see #8367).   listState <- gets docxListState   let startFromState = M.lookup (numId, lvl) listState       Level _ fmt txt startFromLevelInfo = levelInfo       start = case startFromState of-        Just n -> n + 1-        Nothing -> fromMaybe 1 startFromLevelInfo+        Just n | not isRestart -> n + 1+        _ -> fromMaybe 1 startFromLevelInfo       kvs = [ ("level", lvl)             , ("num-id", numId)             , ("format", fmt)@@ -794,7 +805,7 @@     in M.insert (numId, lvl) start (M.filterWithKey notExpired listState) }   blks <- bodyPartToBlocks (Paragraph pPr parparts)   return $ divWith ("", ["list-item"], kvs) blks-bodyPartToBlocks (ListItem pPr _ _ _ parparts) =+bodyPartToBlocks (ListItem pPr _ _ _ _ parparts) =   let pPr' = pPr {pStyle = constructBogusParStyleData "list-paragraph": pStyle pPr}   in     bodyPartToBlocks $ Paragraph pPr' parparts@@ -836,7 +847,9 @@       alignments = case rows of                      [] -> replicate width Pandoc.AlignDefault                      Docx.Row _ cs : _ -> concatMap getAlignment cs-      widths = map ColWidth grid+      widths = map (\n -> if n == 0+                             then ColWidthDefault+                             else ColWidth n) grid    extStylesEnabled <- asks (isEnabled Ext_styles . docxOptions)   let attr = case mbsty of
src/Text/Pandoc/Readers/Docx/Combine.hs view
@@ -52,12 +52,13 @@  -} -module Text.Pandoc.Readers.Docx.Combine ( smushInlines+module Text.Pandoc.Readers.Docx.Combine ( combineBlocks+                                        , smushInlines                                         , smushBlocks                                         )        where -import Data.List+import qualified Data.List as L import Data.Bifunctor import Data.Sequence ( ViewL (..), ViewR (..), viewl, viewr, spanr, spanl                      , (><), (|>) )@@ -135,9 +136,9 @@ combineSingletonInlines x y =   let (xfs, xs) = unstackInlines x       (yfs, ys) = unstackInlines y-      shared = xfs `intersect` yfs-      x_remaining = xfs \\ shared-      y_remaining = yfs \\ shared+      shared = xfs `L.intersect` yfs+      x_remaining = xfs L.\\ shared+      y_remaining = yfs L.\\ shared       x_rem_attr = filter isAttrModifier x_remaining       y_rem_attr = filter isAttrModifier y_remaining   in@@ -182,7 +183,7 @@  smushInlines :: [Inlines] -> Inlines smushInlines xs = combineInlines xs' mempty-  where xs' = foldl' combineInlines mempty xs+  where xs' = L.foldl' combineInlines mempty xs  smushBlocks :: [Blocks] -> Blocks-smushBlocks xs = foldl' combineBlocks mempty xs+smushBlocks xs = L.foldl' combineBlocks mempty xs
src/Text/Pandoc/Readers/Docx/Parse.hs view
@@ -67,7 +67,7 @@ import Control.Monad.Except import Control.Monad.Reader import Control.Monad.State.Strict-import Data.Bits ((.|.))+import Data.Bits ((.&.)) import qualified Data.ByteString.Lazy as B import Data.Char (chr, ord, readLitChar) import Data.List@@ -96,6 +96,7 @@       lookupAttrBy,       parseXMLElement,       elChildren,+      onlyElems,       QName(QName, qName),       Content(Elem),       Element(..))@@ -160,20 +161,54 @@   | isElem ns "w" "smartTag" element   = concatMap (unwrapElement ns) (elChildren element)   | isElem ns "w" "p" element-  , textboxes@(_:_) <- findChildrenByName ns "w" "r" element >>=-                       findChildrenByName ns "mc" "AlternateContent" >>=-                       findChildrenByName ns "mc" "Fallback" >>=-                       findChildrenByName ns "w" "pict" >>=-                       findChildrenByName ns "v" "shape" >>=-                       findChildrenByName ns "v" "textbox" >>=-                       findChildrenByName ns "w" "txbxContent"-  = concatMap (unwrapElement ns) (concatMap elChildren textboxes) -- handle #9214+  , _:_ <- findChildrenByName ns "w" "r" element >>= findTextboxes+  = let result = splitP (elContent element) [] -- handle #9214, #11053+    in [element{ elName = QName "textbox-image" Nothing Nothing+              , elContent = map Elem result }]   | isElem ns "w" "r" element   , Just fallback <- findChildByName ns "mc" "AlternateContent" element >>=                      findChildByName ns "mc" "Fallback"   = [element{ elContent = concatMap (unwrapContent ns) (elContent fallback) }]   | otherwise   = [element{ elContent = concatMap (unwrapContent ns) (elContent element) }]+  where+    -- Split a w:p's children around textbox-bearing runs, preserving order.+    -- Non-textbox content is grouped into a copy of the original w:p;+    -- textbox content is unwrapped into sibling elements in place.+    splitP [] acc = [wrapP acc | hasContent acc]+    splitP (c:cs) acc+      | Elem el <- c+      , isElem ns "w" "r" el+      , tbs@(_:_) <- findTextboxes el+      = [wrapP acc | hasContent acc]+        ++ concatMap (unwrapElement ns) (concatMap elChildren tbs)+        ++ splitP cs []+      | otherwise+      = splitP cs (acc ++ [c])+    wrapP cs = element{ elContent = concatMap (unwrapContent ns) cs }+    hasContent = any (\case Elem el -> isElem ns "w" "r" el+                                                  && any (isContentElem . elName)+                                                         (elChildren el)+                            _ -> False)+    isContentElem n = qName n `elem`+      ["t", "drawing", "pict", "br", "tab", "sym", "fldChar", "instrText"]+    -- Search textbox content in the run's effective children.+    -- If AlternateContent is present, use only the fallback branch,+    -- matching the w:r unwrapping logic and avoiding duplicate textbox+    -- extraction when both direct and fallback encodings are present.+    findRunFallback run =+      findChildByName ns "mc" "AlternateContent" run >>=+      findChildByName ns "mc" "Fallback"+    findTextboxes run =+      findTextboxContent =<<+      case findRunFallback run of+        Just fallback -> findChildrenByName ns "w" "pict" fallback+        Nothing -> findChildrenByName ns "w" "pict" run+    findTextboxContent pict =+      (findChildrenByName ns "v" "shape" pict <>+       findChildrenByName ns "v" "rect" pict) >>=+      findChildrenByName ns "v" "textbox" >>=+      findChildrenByName ns "w" "txbxContent"  unwrapContent :: NameSpaces -> Content -> [Content] unwrapContent ns (Elem element) = map Elem $ unwrapElement ns element@@ -249,6 +284,7 @@                                      , pChange       :: Maybe TrackedChange                                      , pBidi         :: Maybe Bool                                      , pKeepNext     :: Bool+                                     , pBottomBorder :: Bool                                      }                       deriving Show @@ -261,13 +297,14 @@                                        , pChange = Nothing                                        , pBidi = Just False                                        , pKeepNext = False+                                       , pBottomBorder = False                                        }   data BodyPart = Paragraph ParagraphStyle [ParPart]               | Heading Int ParaStyleName ParagraphStyle T.Text T.Text (Maybe Level)                  [ParPart]-              | ListItem ParagraphStyle T.Text T.Text (Maybe Level) [ParPart]+              | ListItem ParagraphStyle T.Text T.Text Bool (Maybe Level) [ParPart]               | Tbl (Maybe T.Text) T.Text TblGrid TblLook [Row]               | Captioned ParagraphStyle [ParPart] BodyPart               | HRule@@ -291,6 +328,9 @@ data Cell = Cell Align GridSpan VMerge [BodyPart]             deriving Show +emptyCell :: Cell+emptyCell = Cell AlignDefault 1 Restart []+ type GridSpan = Integer  data VMerge = Continue@@ -460,9 +500,17 @@   return $ Document namespaces body  elemToBody :: NameSpaces -> Element -> D Body-elemToBody ns element | isElem ns "w" "body" element =-  Body . addCaptioned <$> mapD (elemToBodyPart ns) (elChildren element)-elemToBody _ _ = throwError WrongElem+elemToBody ns element+  | isElem ns "w" "body" element =+      Body . addCaptioned <$> concatMapM (elemToBodyParts ns) (elChildren element)+  | otherwise = throwError WrongElem+  where+    elemToBodyParts ns' el+      | qName (elName el) == "textbox-image"+      = addSplitGroupCaptioned . splitMixedParagraphs+          <$> mapD (elemToBodyPart ns') (elChildren el)+      | otherwise+      = ((:[]) <$> elemToBodyPart ns' el) `catchError` (\_ -> return [])  archiveToStyles :: Archive -> (CharStyleMap, ParStyleMap) archiveToStyles = archiveToStyles' getStyleId getStyleId@@ -525,22 +573,18 @@   then Just InDocument   else Nothing -relElemToRelationship :: FilePath -> DocumentLocation -> Element+relElemToRelationship :: DocumentLocation -> Element                       -> Maybe Relationship-relElemToRelationship fp relType element | qName (elName element) == "Relationship" =+relElemToRelationship relType element | qName (elName element) == "Relationship" =   do     relId <- findAttr (QName "Id" Nothing Nothing) element     target <- findAttr (QName "Target" Nothing Nothing) element-    -- target may be relative (media/image1.jpeg) or absolute-    -- (/word/media/image1.jpeg); we need to relativize it (see #7374)-    let frontOfFp = T.pack $ takeWhile (/= '_') fp-    let target' = fromMaybe target $-           T.stripPrefix frontOfFp $ T.dropWhile (== '/') target-    return $ Relationship relType relId target'-relElemToRelationship _ _ _ = Nothing+    -- target may be relative (media/image1.jpeg) or absolute (/word/media/image1.jpg)+    return $ Relationship relType relId target+relElemToRelationship _ _ = Nothing  extractTarget :: Element -> Maybe Target-extractTarget element = do (Relationship _ _ target) <- relElemToRelationship "word/" InDocument element+extractTarget element = do (Relationship _ _ target) <- relElemToRelationship InDocument element                            return target  filePathToRelationships :: Archive -> FilePath -> FilePath ->  [Relationship]@@ -548,7 +592,7 @@   | Just relType <- filePathToRelType fp docXmlPath   , Just entry <- findEntryByPath fp ar   , Just relElems <- parseXMLFromEntry entry =-  mapMaybe (relElemToRelationship fp relType) $ elChildren relElems+  mapMaybe (relElemToRelationship relType) $ elChildren relElems filePathToRelationships _ _ _ = []  archiveToRelationships :: Archive -> FilePath -> [Relationship]@@ -575,6 +619,28 @@     _ ->       lookup ilvl $ map (\l@(Level i _ _ _) -> (i, l)) lvls +-- | Given a @numId@ and level, return the abstract numbering id (the stable+-- identifier shared by all numbering instances based on the same abstract+-- numbering definition) together with a flag indicating whether this+-- particular instance restarts numbering at this level (via a+-- @w:startOverride@).  Word represents "restart numbering" by pointing the+-- first item of the restarted list at a new numId that shares the abstract+-- numbering of the original list but carries a startOverride; the remaining+-- items keep using the original numId.  Keying list continuation off the+-- abstract numbering id (rather than the numId) lets those items be treated+-- as one continuous, restarted list.  See #8367.+lookupNumberingInfo :: T.Text -> T.Text -> Numbering -> (T.Text, Bool)+lookupNumberingInfo numId ilvl (Numbering _ numbs _) =+  case lookup numId $+       map (\(Numb nid absnumid ovr) -> (nid, (absnumid, ovr))) numbs of+    Nothing -> (numId, False)+    Just (absNumId, ovrrides) ->+      let isRestart = case lookup ilvl $+                           map (\lo@(LevelOverride i _ _) -> (i, lo)) ovrrides of+                        Just (LevelOverride _ (Just _) _) -> True+                        _ -> False+      in (absNumId, isRestart)+ loElemToLevelOverride :: NameSpaces -> Element -> Maybe LevelOverride loElemToLevelOverride ns element   | isElem ns "w" "lvlOverride" element = do@@ -715,12 +781,21 @@ elemToRow :: NameSpaces -> Element -> D Row elemToRow ns element | isElem ns "w" "tr" element =   do+    let properties = findChildByName ns "w" "trPr" element+    let gridBefore = properties+                     >>= findChildByName ns "w" "gridBefore"+                     >>= findAttrByName ns "w" "val"+                     >>= stringToInteger     let cellElems = findChildrenByName ns "w" "tc" element+    let beforeCells = genericReplicate (fromMaybe 0 gridBefore) emptyCell     cells <- mapD (elemToCell ns) cellElems-    let hasTblHeader = maybe NoTblHeader (const HasTblHeader)-          (findChildByName ns "w" "trPr" element-           >>= findChildByName ns "w" "tblHeader")-    return $ Row hasTblHeader cells+    let hasTblHeader =+          case (properties >>= findChildByName ns "w" "tblHeader") of+            Nothing -> NoTblHeader+            Just he -> case findAttrByName ns "w" "val" he of+              Just "0" -> NoTblHeader+              _ -> HasTblHeader+    return $ Row hasTblHeader (beforeCells ++ cells) elemToRow _ _ = throwError WrongElem  elemToCell :: NameSpaces -> Element -> D Cell@@ -757,7 +832,7 @@ testBitMask bitMaskS n =   case (reads ("0x" ++ T.unpack bitMaskS) :: [(Int, String)]) of     []            -> False-    ((n', _) : _) -> (n' .|. n) /= 0+    ((n', _) : _) -> (n' .&. n) /= 0  pHeading :: ParagraphStyle -> Maybe (ParaStyleName, Int) pHeading = getParStyleField headingLev . pStyle@@ -767,8 +842,10 @@  mkListItem :: ParagraphStyle -> Text -> Text -> [ParPart] -> D BodyPart mkListItem parstyle numId lvl parparts = do-  lvlInfo <- lookupLevel numId lvl <$> asks envNumbering-  return $ ListItem parstyle numId lvl lvlInfo parparts+  numbering <- asks envNumbering+  let lvlInfo = lookupLevel numId lvl numbering+      (absNumId, isRestart) = lookupNumberingInfo numId lvl numbering+  return $ ListItem parstyle absNumId lvl isRestart lvlInfo parparts  pStyleIndentation :: ParagraphStyle -> Maybe ParIndentation pStyleIndentation style = (getParStyleField indent . pStyle) style@@ -786,6 +863,28 @@     = Captioned parstyle parparts x : addCaptioned xs addCaptioned (x:xs) = x : addCaptioned xs +-- Split paragraphs that contain both a Drawing and text into two body parts,+-- so that the captioning logic can combine them.+splitMixedParagraphs :: [BodyPart] -> [BodyPart]+splitMixedParagraphs [] = []+splitMixedParagraphs (Paragraph ps parts : rest)+  | (drawings@(_:_), texts@(_:_)) <- partition isDrawingPart parts+  = Paragraph ps drawings : Paragraph ps texts : splitMixedParagraphs rest+  where isDrawingPart Drawing{} = True+        isDrawingPart _         = False+splitMixedParagraphs (x:xs) = x : splitMixedParagraphs xs++-- For textbox-image groups: combine image + any adjacent text into Captioned+addSplitGroupCaptioned :: [BodyPart] -> [BodyPart]+addSplitGroupCaptioned [] = []+addSplitGroupCaptioned (Paragraph parstyle parparts : x : xs)+  | isCaptionable x+  = Captioned parstyle parparts x : addSplitGroupCaptioned xs+addSplitGroupCaptioned (x : Paragraph parstyle parparts : xs)+  | isCaptionable x+  = Captioned parstyle parparts x : addSplitGroupCaptioned xs+addSplitGroupCaptioned (x:xs) = x : addSplitGroupCaptioned xs+ isCaptionable :: BodyPart -> Bool isCaptionable (Paragraph _ [Drawing{}]) = True isCaptionable (Tbl{}) = True@@ -802,7 +901,8 @@ elemToBodyPart ns element   | isElem ns "w" "p" element   , Just (numId, lvl) <- getNumInfo ns element = do-    lvlInfo <- lookupLevel numId lvl <$> asks envNumbering+    numbering <- asks envNumbering+    let lvlInfo = lookupLevel numId lvl numbering     parstyle <- elemToParagraphStyle ns element                 <$> asks envParStyles                 <*> asks envNumbering@@ -810,23 +910,26 @@     case pHeading parstyle of       Nothing -> mkListItem parstyle numId lvl parparts       Just (parstylename, lev)-        -> return $ Heading lev parstylename parstyle numId lvl lvlInfo parparts+        -> let (absNumId, _) = lookupNumberingInfo numId lvl numbering+           in return $ Heading lev parstylename parstyle absNumId lvl lvlInfo parparts elemToBodyPart ns element   | isElem ns "w" "p" element-  , [Elem ppr] <- elContent element+  , [ppr] <- elChildren element   , isElem ns "w" "pPr" ppr-  , [Elem pbdr] <- elContent ppr+  , [pbdr] <- elChildren ppr   , isElem ns "w" "pBdr" pbdr+  , [bot] <- elChildren pbdr+  , isElem ns "w" "bottom" bot     = return HRule       -- for this style of horizontal rule, see       -- https://support.microsoft.com/en-us/office/insert-a-horizontal-line-9bf172f6-5908-4791-9bb9-2c952197b1a9 elemToBodyPart ns element -- pandoc-style horizontal rule   | isElem ns "w" "p" element-  , [Elem r] <- elContent element+  , [r] <- elChildren element   , isElem ns "w" "r" r-  , [Elem pict] <- elContent r+  , [pict] <- elChildren r   , isElem ns "w" "pict" pict-  , [Elem rect] <- elContent pict+  , [rect] <- elChildren pict   , isElem ns "v" "rect" rect     = return HRule elemToBodyPart ns element@@ -851,8 +954,10 @@                     mkListItem parstyle numId lvl parparts         Just (parstylename, lev) -> do           let (numId, lvl) = fromMaybe ("","") $ pNumInfo parstyle-          lvlInfo <- lookupLevel numId lvl <$> asks envNumbering-          return $ Heading lev parstylename parstyle numId lvl lvlInfo parparts+          numbering <- asks envNumbering+          let lvlInfo = lookupLevel numId lvl numbering+              (absNumId, _) = lookupNumberingInfo numId lvl numbering+          return $ Heading lev parstylename parstyle absNumId lvl lvlInfo parparts         Nothing -> return $ Paragraph parstyle parparts elemToBodyPart ns element   | isElem ns "w" "tbl" element = do@@ -875,9 +980,15 @@                        Just l  -> elemToTblLook ns l                        Nothing -> return defaultTblLook -    grid <- grid'+    grid'' <- grid'     tblLook <- tblLook'     rows <- mapD (elemToRow ns) (elChildren element)+    let grid = if null grid''+                  then let numcols = case rowsToRowspans rows of+                                       (cs@(_:_):_) -> sum (map fst cs)+                                       _ -> 0+                       in replicate numcols 0.0+                  else grid''     return $ Tbl mbstyle (caption <> description) grid tblLook rows elemToBodyPart _ _ = throwError WrongElem @@ -907,11 +1018,23 @@   case target of     Just filepath -> do       media <- asks envMedia-      let filepath' = case filepath of-                        ('/':rest) -> rest-                        _ -> "word/" ++ filepath+      -- the mediaName is the name we store it under in the mediabag.+      -- This is derived from the path, which might be absolute, e.g. /media/foo.jpg,+      -- or relative, media/foo.jpg (interpreted as /word/media/foo.jpg).+      -- The mediaName will strip off any leading `/` or `word/`.+      -- We assume here that the media will not be stored *both* in+      -- /media and in /word/media, which would lead to a name conflict+      -- given the scheme here for generating a mediaName.+      let (filepath', mediaName) =+            case filepath of+               ('/':rest)  -- absolute path e.g. /media/foo.jpg+                  -> (rest, case stripPrefix "word/" rest of+                              Just rest' -> rest'+                              Nothing -> rest)+               _  -- rel path to word, e.g. media/foo.jpg+                 -> ("word/" ++ filepath, filepath)       case lookup filepath' media of-        Just bs -> return (filepath, bs)+        Just bs -> return (mediaName, bs)         Nothing -> throwError DocxError     Nothing -> throwError DocxError @@ -1147,7 +1270,7 @@     (Just w, Just h) -> Just (w, h)     _                -> Nothing  where-  getDim at = filterElementName (\n -> qName n `elem` ["extent", "ext"]) el+  getDim at = filterElementName (\n -> qName n == "extent") el               >>= findAttr (QName at Nothing Nothing) >>= safeRead  @@ -1286,6 +1409,10 @@                       getTrackedChange ns       , pBidi = checkOnOff ns pPr (elemName ns "w" "bidi")       , pKeepNext = isJust $ findChildByName ns "w" "keepNext" pPr+      , pBottomBorder = case (onlyElems . elContent) <$>+                              findChildByName ns "w" "pBdr" pPr of+                              Just [x] -> isElem ns "w" "bottom" x+                              _ -> False       }   | otherwise = defaultParagraphStyle 
src/Text/Pandoc/Readers/DokuWiki.hs view
@@ -528,10 +528,11 @@ tableRows = many1 tableRow  tableRow :: PandocMonad m => DWParser m [(Alignment, B.Blocks)]-tableRow = many1Till tableCell tableRowEnd+tableRow = tableCellSeparator *> many1 tableCell <* tableRowEnd -tableRowEnd :: PandocMonad m => DWParser m Char-tableRowEnd = try $ tableCellSeparator <* manyTill spaceChar eol+-- DokuWiki just ignores stuff after the end of a table row (#11739)+tableRowEnd :: PandocMonad m => DWParser m ()+tableRowEnd = void $ manyTill anyChar eol  tableCellSeparator :: PandocMonad m => DWParser m Char tableCellSeparator = char '|' <|> char '^'@@ -542,8 +543,7 @@     cellContent = do       -- https://www.dokuwiki.org/wiki:syntax#tables       -- DokuWiki represents the alignment of cells with two spaces padding.-      tableCellSeparator-      cellInline <- manyTill inlineUnconsolidatedWhitespace (lookAhead tableCellSeparator)+      cellInline <- manyTill inlineUnconsolidatedWhitespace tableCellSeparator       let left  = [B.space, B.space] `isPrefixOf` cellInline       let right = [B.space, B.space] `isSuffixOf` cellInline       let alignment = case (left, right) of
src/Text/Pandoc/Readers/EndNote.hs view
@@ -81,6 +81,7 @@   let items = map toCitationItem $ filterElementsName (name "Cite") tree   return $ Citeproc.Citation{                      Citeproc.citationId = Nothing+                   , Citeproc.citationResetPosition = False                    , Citeproc.citationPrefix = Nothing                    , Citeproc.citationSuffix = Nothing                    , Citeproc.citationNoteNumber = Nothing
src/Text/Pandoc/Readers/HTML.hs view
@@ -33,9 +33,8 @@ import Data.Default (Default (..), def) import Data.Foldable (for_) import Data.List.Split (splitWhen)-import Data.List (foldl')+import qualified Data.List as L import qualified Data.Map as M-import Data.Maybe (fromMaybe, isJust, isNothing) import Data.Either (partitionEithers) import Data.Monoid (First (..)) import qualified Data.Set as Set@@ -70,6 +69,7 @@ import Text.Pandoc.Walk import Text.TeXMath (readMathML, writeTeX) import qualified Data.Sequence as Seq+import Data.Maybe (fromMaybe, isJust)  -- | Convert HTML-formatted string to 'Pandoc' document. readHtml :: (PandocMonad m, ToSources a)@@ -237,12 +237,13 @@           -> pLineBlock           | otherwise           -> pDiv+        "aside" -> pDiv         "section" -> pDiv         "header" -> pDiv         "main" -> pDiv         "figure" -> pFigure         "iframe" -> pIframe-        "style" -> mempty <$ pHtmlBlock "style" -- see #10643+        "style" -> pRawHtmlBlock         "textarea" -> pRawHtmlBlock         "switch"           | epubExts@@ -444,9 +445,9 @@   terms <- many1 (try $ skipMany nonItem >> pInTags "dt" inline)   defs  <- many1 (try $ skipMany nonItem >> pInTags "dd" block)   skipMany nonItem-  let term = foldl' (\x y -> if null x-                                then trimInlines y-                                else x <> B.linebreak <> trimInlines y)+  let term = L.foldl' (\x y -> if null x+                                  then trimInlines y+                                  else x <> B.linebreak <> trimInlines y)                     mempty terms   return (term, map (fixPlains True) defs) @@ -489,6 +490,7 @@ isDivLike "section" = True isDivLike "header"  = True isDivLike "main"    = True+isDivLike "aside"   = True isDivLike _         = False  pDiv :: PandocMonad m => TagParser m Blocks@@ -502,12 +504,13 @@                         | hident == ident ->                           B.Many $ Header lev ("",hclasses,hkvs) ils Seq.<| rest                     _ -> contents-  let classes' = if tag == "section"-                    then "section":classes-                    else classes-      kvs' = if tag == "main" && isNothing (lookup "role" kvs)-               then ("role", "main"):kvs-               else kvs+  let (classes', kvs') =+        case tag of+          "section" -> ("section":classes, kvs)+          "aside" -> ("aside":classes, kvs)+          "header" -> ("header":classes, kvs)+          "main" | Nothing <- lookup "role" kvs -> (classes, ("role", "main"):kvs)+          _ -> (classes, kvs)   return $ B.divWith (ident, classes', kvs') contents'  pIframe :: PandocMonad m => TagParser m Blocks@@ -538,7 +541,7 @@  pRawHtmlBlock :: PandocMonad m => TagParser m Blocks pRawHtmlBlock = do-  raw <- pHtmlBlock "script" <|> pHtmlBlock "textarea"+  raw <- pHtmlBlock "script" <|> pHtmlBlock "style" <|> pHtmlBlock "textarea"           <|> pRawTag   exts <- getOption readerExtensions   if extensionEnabled Ext_raw_html exts && not (T.null raw)@@ -646,18 +649,13 @@ pCodeBlock :: PandocMonad m => TagParser m Blocks pCodeBlock = try $ do   TagOpen _ attr' <- pSatisfy (matchTagOpen "pre" [])-  -- if the `pre` has no attributes, try if it is followed by a `code`-  -- element and use those attributes if possible.-  attr <- case attr' of-    _:_ -> pure (toAttr attr')-    []  -> option nullAttr $ do-      TagOpen _ codeAttr <- pSatisfy (matchTagOpen "code" [])-      pure $ toAttr-        [ (k, v') | (k, v) <- codeAttr-                    -- strip language from class-                  , let v' = if k == "class"-                             then fromMaybe v (T.stripPrefix "language-" v)-                             else v ]+  -- merge attributes of `pre` and `code` tags+  TagOpen _ codeAttr <- pSatisfy (matchTagOpen "code" [])+  let stripLanguagePrefix x = fromMaybe x (T.stripPrefix "language-" x)+  let modifyClasses f ("class",v) =+        ("class", T.unwords . map f . T.words $ v)+      modifyClasses _ (k,v) = (k,v)+  let attr = toAttr $ map (modifyClasses stripLanguagePrefix) $ codeAttr <> attr'   contents <- manyTill pAny (pCloses "pre" <|> eof)   let rawText = T.concat $ map tagToText contents   -- drop trailing newline if any@@ -713,7 +711,7 @@         "input"           | lookup "type" attr == Just "checkbox"           -> asks inListItem >>= guard >> pCheckbox-        "style" -> mempty <$ pHtmlBlock "style" -- see #10643+        "style" -> B.rawInline "html" <$> pHtmlBlock "style"         "script"           | Just x <- lookup "type" attr           , "math/tex" `T.isPrefixOf` x -> pScriptMath
src/Text/Pandoc/Readers/HTML/Table.hs view
@@ -20,7 +20,7 @@ import Data.Maybe (fromMaybe, isJust) import Data.Either (lefts, rights) import Data.List.NonEmpty (nonEmpty)-import Data.List (foldl')+import qualified Data.List as L import Data.Text (Text) import Text.HTML.TagSoup import Text.Pandoc.Builder (Blocks)@@ -204,9 +204,9 @@   let adjustRowHeadCols         headcolsv         (currentrow, (numheads, Row _ cells)) =-          foldl' (adjustRowHeadColsForCell currentrow) headcolsv+          L.foldl' (adjustRowHeadColsForCell currentrow) headcolsv             (take numheads cells)-  let headcols = foldl' adjustRowHeadCols+  let headcols = L.foldl' adjustRowHeadCols                          (V.replicate numrows (0 :: Int))                          (zip [(0 :: Int)..] rows)   let rowHeadCols = case V.uncons headcols of
src/Text/Pandoc/Readers/JATS.hs view
@@ -21,7 +21,7 @@ import Data.Char (isDigit, isSpace) import Data.Default import Data.Generics-import Data.List (foldl', intersperse)+import qualified Data.List as L import qualified Data.Map as Map import Data.Maybe (maybeToList, fromMaybe, catMaybes) import Data.Text (Text)@@ -31,7 +31,7 @@ import Text.Pandoc.Builder import Text.Pandoc.Class.PandocMonad (PandocMonad) import Text.Pandoc.Options-import Text.Pandoc.Shared (safeRead, extractSpaces)+import Text.Pandoc.Shared (safeRead) import Text.Pandoc.Walk (walk) import Text.Pandoc.XML.Light import Text.TeXMath (readMathML, writeTeX)@@ -290,11 +290,11 @@                      let items = filterChildren (named "def") e'                      terms' <- mapM getInlines terms                      items' <- mapM getBlocks items-                     return (mconcat $ intersperse (str "; ") terms', items')+                     return (mconcat $ L.intersperse (str "; ") terms', items')          parseFigure = do            modify $ \st -> st{ jatsInFigure = True }            capt <- case filterChild (named "caption") e of-                     Just t  -> mconcat . intersperse linebreak <$>+                     Just t  -> mconcat . L.intersperse linebreak <$>                                 mapM getInlines (filterChildren (const True) t)                      Nothing -> return mempty            contents <- getBlocks e@@ -350,7 +350,7 @@                             n <- safeRead $ "0" <> T.filter (\x -> isDigit x || x == '.') w                             if n > 0 then Just n else Nothing                       let firstBody = fromMaybe [] (headMay multipleBodyRowElements)-                      let numrows = foldl' max 0 $ map length firstBody+                      let numrows = L.foldl' max 0 $ map length firstBody                       let aligns = case colspecs of                                      [] -> replicate numrows AlignDefault                                      cs -> map toAlignment cs@@ -733,8 +733,7 @@         "fn" -> note . mconcat <$>                          mapM parseBlock (elContent e)         _          -> innerInlines id-   where innerInlines f = extractSpaces f . mconcat <$>-                          mapM parseInline (elContent e)+   where innerInlines f = f . mconcat <$> mapM parseInline (elContent e)          codeWithLang = do            let classes' = case attrValue "language" e of                                "" -> []
src/Text/Pandoc/Readers/LaTeX.hs view
@@ -110,6 +110,7 @@        (if bottomLevel < 1            then walk (adjustHeaders (1 - bottomLevel))            else id) $+       walk (resolveFootnoteMarks (sFootnoteTexts st)) $        walk (resolveRefs (sLabels st)) doc'   return $ Pandoc meta bs' @@ -124,7 +125,19 @@         _ -> x resolveRefs _ x = x +-- | Resolve footnote marks (\footnotemark) to actual notes using+-- the footnote texts collected from \footnotetext commands.+resolveFootnoteMarks :: M.Map Int Blocks -> Inline -> Inline+resolveFootnoteMarks fnTexts (Span (_, classes, kvs) _)+  | "footnote-mark" `elem` classes+  , Just numText <- lookup "note-num" kvs+  , [(n, "")] <- reads (T.unpack numText)+  = case M.lookup n fnTexts of+      Just contents -> Note (toList contents)+      Nothing       -> Str ""  -- No matching footnotetext found+resolveFootnoteMarks _ x = x + -- testParser :: LP PandocIO a -> Text -> IO a -- testParser p t = do --   res <- runIOorExplode (runParserT p defaultLaTeXState{@@ -407,6 +420,8 @@     , ("lowercase", makeLowercase <$> tok)     , ("thanks", skipopts >> note <$> grouped block)     , ("footnote", skipopts >> footnote)+    , ("footnotemark", footnotemark)+    , ("footnotetext", footnotetext)     , ("newline", pure B.linebreak)     , ("passthrough", fixPassthroughEscapes <$> tok)     -- \passthrough macro used by latex writer@@ -477,6 +492,39 @@   contents <- grouped block >>= walkM resolveNoteLabel   return $ note contents +-- | Parse \footnotemark[n]. If n is not given, increment the counter.+-- Returns a span marker that will be resolved to a Note later.+footnotemark :: PandocMonad m => LP m Inlines+footnotemark = do+  mbNum <- optionalFootnoteNum+  noteNum <- case mbNum of+    Just n  -> return n+    Nothing -> do+      updateState $ \st -> st{ sLastNoteNum = sLastNoteNum st + 1 }+      sLastNoteNum <$> getState+  return $ B.spanWith ("", ["footnote-mark"], [("note-num", tshow noteNum)]) mempty++-- | Parse \footnotetext[n]{text}. If n is not given, use current counter.+-- Stores the text in state to be resolved later.+footnotetext :: PandocMonad m => LP m Inlines+footnotetext = do+  mbNum <- optionalFootnoteNum+  noteNum <- case mbNum of+    Just n  -> return n+    Nothing -> sLastNoteNum <$> getState+  contents <- grouped block >>= walkM resolveNoteLabel+  updateState $ \st -> st{+    sFootnoteTexts = M.insert noteNum contents (sFootnoteTexts st) }+  return mempty++-- | Parse optional footnote number argument [n]+optionalFootnoteNum :: PandocMonad m => LP m (Maybe Int)+optionalFootnoteNum = option Nothing $ do+  t <- bracketedToks+  case reads (T.unpack $ untokenize t) of+    [(n, "")] -> return $ Just n+    _         -> return Nothing+ resolveNoteLabel :: PandocMonad m => Inline -> LP m Inline resolveNoteLabel (Span (_,cls,kvs) _)   | Just lab <- lookup "label" kvs = do@@ -542,7 +590,7 @@ hypertargetInline :: PandocMonad m => LP m Inlines hypertargetInline = try $ do   ref <- untokenize <$> braced-  ils <- grouped inline+  ils <- tok   return $ spanWith (ref, [], []) ils  newToggle :: (Monoid a, PandocMonad m) => [Tok] -> LP m a@@ -937,7 +985,7 @@    , ("address", mempty <$ (skipopts *> tok >>= addMeta "address"))    , ("signature", mempty <$ (skipopts *> authors))    , ("date", mempty <$ (skipopts *> tok >>= addMeta "date"))-   , ("newtheorem", newtheorem inline)+   , ("newtheorem", newtheorem)    , ("theoremstyle", theoremstyle)    -- KOMA-Script metadata commands    , ("extratitle", mempty <$ (skipopts *> tok >>= addMeta "extratitle"))@@ -1108,7 +1156,7 @@   name <- untokenize <$> braced   M.findWithDefault mzero name environments <|>     langEnvironment name <|>-    theoremEnvironment blocks opt name <|>+    theoremEnvironment blocks inlines opt name <|>     if M.member name (inlineEnvironments                        :: M.Map Text (LP PandocPure Inlines))        then mzero
src/Text/Pandoc/Readers/LaTeX/Inline.hs view
@@ -315,6 +315,26 @@   , ("dothyp", lit ".\173")   , ("colonhyp", lit ":\173")   , ("hyp", lit "-")+  -- ngerman (babel)+  , ("glq", lit "‚")+  , ("grq", lit "‘")+  , ("glqq", lit "„")+  , ("grqq", lit "“")+  , ("flq", lit "‹")+  , ("frq", lit "›")+  , ("flqq", lit "«")+  , ("frqq", lit "»")+  , ("dq", lit "\"")+  -- fontspec+  , ("guillemetleft", lit "«")+  , ("guillemotleft", lit "«")+  , ("guillemetright", lit "»")+  , ("guillemotright", lit "»")+  , ("guilsinglleft", lit "‹")+  , ("guilsinglright", lit "›")+  , ("quotedblbase", lit "„")+  , ("quotesinglbase", lit ",")+  , ("textquotedbl", lit "\"")   ]  biblatexInlineCommands :: PandocMonad m
src/Text/Pandoc/Readers/LaTeX/Math.hs view
@@ -14,7 +14,7 @@   ) where import Data.Maybe (fromMaybe, mapMaybe, listToMaybe)-import Data.List (foldl')+import qualified Data.List as L import Text.Pandoc.Walk (walk) import Text.Pandoc.Builder as B import qualified Data.Sequence as Seq@@ -135,14 +135,14 @@     Just sty -> updateState $ \s -> s{ sLastTheoremStyle = sty }   return mempty -newtheorem :: PandocMonad m => LP m Inlines -> LP m Blocks-newtheorem inline = do+newtheorem :: PandocMonad m => LP m Blocks+newtheorem = do   number <- option True (False <$ symbol '*' <* sp)   name <- untokenize <$> braced   sp   series <- option Nothing $ Just . untokenize <$> bracketedToks   sp-  showName <- tokWith inline+  showName <- braced <|> ((:[]) <$> anyTok)   sp   syncTo <- option Nothing $ Just . untokenize <$> bracketedToks   sty <- sLastTheoremStyle <$> getState@@ -160,7 +160,7 @@ extractLabelFromBlock :: Block -> Maybe Text extractLabelFromBlock (Para inlines) = extractLabel Nothing inlines   where-    extractLabel = foldl' go+    extractLabel = L.foldl' go     go :: Maybe Text -> Inline -> Maybe Text     go (Just t) _ = Just t     go Nothing (Span (_, _, attrs) _) = lookup "label" attrs@@ -168,8 +168,12 @@ extractLabelFromBlock _ = Nothing  theoremEnvironment :: PandocMonad m-                   => LP m Blocks -> LP m Inlines -> Text -> LP m Blocks-theoremEnvironment blocks opt name = do+                   => LP m Blocks+                   -> LP m Inlines+                   -> LP m Inlines+                   -> Text+                   -> LP m Blocks+theoremEnvironment blocks inlines opt name = do   resetCaption   tmap <- sTheoremMap <$> getState   case M.lookup name tmap of@@ -206,7 +210,8 @@                          PlainStyle      -> B.strong                          DefinitionStyle -> B.strong                          RemarkStyle     -> B.emph-       let title = titleEmph (theoremName tspec <> number)+       tname <- parseFromToks inlines (theoremName tspec)+       let title = titleEmph (tname <> number)                       <> optTitle <> "." <> space        return $ divWith (fromMaybe "" mblabel, [name], [])               $ addTitle title
src/Text/Pandoc/Readers/LaTeX/Parsing.hs view
@@ -141,7 +141,7 @@  data TheoremSpec =   TheoremSpec-    { theoremName    :: Inlines+    { theoremName    :: [Tok]     , theoremStyle   :: TheoremStyle     , theoremSeries  :: Maybe Text     , theoremSyncTo  :: Maybe Text@@ -165,6 +165,7 @@                             , sLastFigureNum :: DottedNum                             , sLastTableNum  :: DottedNum                             , sLastNoteNum   :: Int+                            , sFootnoteTexts :: M.Map Int Blocks                             , sTheoremMap    :: M.Map Text TheoremSpec                             , sLastTheoremStyle :: TheoremStyle                             , sLastLabel     :: Maybe Text@@ -195,6 +196,7 @@                               , sLastFigureNum = DottedNum []                               , sLastTableNum  = DottedNum []                               , sLastNoteNum   = 0+                              , sFootnoteTexts = M.empty                               , sTheoremMap    = M.empty                               , sLastTheoremStyle = PlainStyle                               , sLastLabel     = Nothing
src/Text/Pandoc/Readers/LaTeX/Table.hs view
@@ -35,6 +35,8 @@   , ("tabular*", env "tabular*" $ simpTable block inline "tabular*" True)   , ("tabularx", env "tabularx" $ simpTable block inline "tabularx" True)   , ("tabular", env "tabular"  $ simpTable block inline "tabular" False)+  , ("supertabular", env "supertabular" $ simpTable block inline "supertabular" False)+  , ("supertabular*", env "supertabular*" $ simpTable block inline "supertabular*" False)   ]  where    blocks = mconcat <$> many block@@ -377,14 +379,6 @@                         ((_,classes,kvs), Just ident) ->                            (ident,classes,kvs)                         _ -> attr-          return $ addAttrDiv attr'-                 $ maybe id removeLabel mblabel-                 $ Table nullAttr capt spec th tb tf+          return $ maybe id removeLabel mblabel+                 $ Table attr' capt spec th tb tf         go x = return x---- TODO: For now we add a Div to contain table attributes, since--- most writers don't do anything yet with attributes on Table.--- This can be removed when that changes.-addAttrDiv :: Attr -> Block -> Block-addAttrDiv ("",[],[]) b = b-addAttrDiv attr b       = Div attr [b]
src/Text/Pandoc/Readers/Man.hs view
@@ -26,23 +26,40 @@ import Text.Pandoc.Class.PandocMonad (PandocMonad(..), report) import Text.Pandoc.Logging (LogMessage(..)) import Text.Pandoc.Options+import Text.Pandoc.Parsing.Capabilities import Text.Pandoc.Parsing import Text.Pandoc.Walk (query) import Text.Pandoc.Readers.Roff  -- TODO explicit imports import qualified Text.Pandoc.Parsing as P import qualified Data.Foldable as Foldable+import qualified Data.Set as Set import Text.Pandoc.Shared (extractSpaces)  data ManState = ManState { readerOptions   :: ReaderOptions+                         , manLogMessages  :: []LogMessage+                         , manIdentifiers  :: Set.Set T.Text                          , metadata        :: Meta                          , tableCellsPlain :: Bool                          } deriving Show  instance Default ManState where   def = ManState { readerOptions   = def+                 , manLogMessages  = []+                 , manIdentifiers  = Set.empty                  , metadata        = nullMeta                  , tableCellsPlain = True } +instance HasReaderOptions ManState where+  extractReaderOptions = readerOptions++instance HasLogMessages ManState where+  addLogMessage msg st = st{ manLogMessages = msg : manLogMessages st }+  getLogMessages st = reverse $ manLogMessages st++instance HasIdentifierList ManState where+  extractIdentifierList = manIdentifiers+  updateIdentifierList f st = st{ manIdentifiers = f $ manIdentifiers st }+ type ManParser m = P.ParsecT [RoffToken] ManState m  @@ -74,6 +91,7 @@   bs <- many parseBlock <* eof   meta <- metadata <$> getState   let (Pandoc _ blocks) = doc $ mconcat bs+  reportLogMessages   return $ Pandoc meta blocks  parseBlock :: PandocMonad m => ManParser m Blocks@@ -200,9 +218,11 @@   isEmptyLine _ = False  mmacro :: PandocMonad m => T.Text -> ManParser m RoffToken-mmacro mk = msatisfy isControlLine where-  isControlLine (ControlLine mk' _ _) | mk == mk' = True-                            | otherwise = False+mmacro mk = mmacroMatching (== mk)++mmacroMatching :: PandocMonad m => (T.Text -> Bool) -> ManParser m RoffToken+mmacroMatching f = msatisfy isControlLine where+  isControlLine (ControlLine mk _ _) = f mk   isControlLine _ = False  mmacroAny :: PandocMonad m => ManParser m RoffToken@@ -415,8 +435,10 @@                  else return $ mconcat $ intersperse B.space                              $ map linePartsToInlines args   let lvl = if name == "SH" then 1 else 2-  return $ header lvl contents+  attr <- registerHeader nullAttr contents +  return $ B.headerWith attr lvl contents+ parseBlockQuote :: PandocMonad m => ManParser m Blocks parseBlockQuote = blockQuote <$>    (  (mmacro "RS" *> (mconcat <$> manyTill parseBlock (endmacro "RE")))@@ -479,7 +501,12 @@ continuation :: PandocMonad m => ManParser m Blocks continuation =       (mmacro "RS" *> (mconcat <$> manyTill parseBlock (endmacro "RE")))-  <|> try ((memptyLine <|> bareIP) *> (parsePara <|> parseCodeBlock))+  <|> (bareIP *> parsePara)+  <|> (notFollowedBy (mmacroMatching+                      (`elem` ["TP","IP","LP","P","PP","HP",+                               "RE","RS","SH","SS","SV","YS","TH",+                               "TQ","YS","AT","DT","OP","PD","UC"]))+                                *> parseBlock)  definitionListItem :: PandocMonad m                    => ManParser m (Inlines, [Blocks])
src/Text/Pandoc/Readers/Markdown.hs view
@@ -24,7 +24,8 @@ import Control.Monad.Except (throwError) import qualified Data.Bifunctor as Bifunctor import Data.Char (isAlphaNum, isPunctuation, isSpace)-import Data.List (transpose, elemIndex, sortOn, foldl')+import Data.List (transpose, elemIndex, sortOn)+import qualified Data.List as L import qualified Data.Map as M import Data.Maybe import qualified Data.Set as Set@@ -42,7 +43,6 @@ import Text.Pandoc.Class.PandocMonad (PandocMonad (..), report) import Text.Pandoc.Definition as Pandoc import Text.Pandoc.Emoji (emojiToInline)-import Text.Pandoc.Error import Safe.Foldable (maximumBounded) import Text.Pandoc.Logging import Text.Pandoc.Options@@ -198,6 +198,7 @@ litCharNoSpace :: PandocMonad m => MarkdownParser m Text litCharNoSpace = T.singleton <$> escapedChar''        <|> characterReference+       <|> (snd <$> withRaw attributes)        <|> T.singleton <$> noneOf "\n \r\t"  where    escapedChar'' = do@@ -351,13 +352,9 @@ checkNotes = do   st <- getState   let notesUsed = stateNoteRefs st-  let notesDefined = M.keys (stateNotes' st)-  mapM_ (\n -> unless (n `Set.member` notesUsed) $-                case M.lookup n (stateNotes' st) of-                   Just (pos, _) -> report (NoteDefinedButNotUsed n pos)-                   Nothing -> throwError $-                     PandocShouldNeverHappenError "note not found")-         notesDefined+  forM_ (M.toList (stateNotes' st)) $ \(n, (pos, _)) ->+    unless (n `Set.member` notesUsed) $+      report (NoteDefinedButNotUsed n pos)   referenceKey :: PandocMonad m => MarkdownParser m (F Blocks)@@ -388,7 +385,7 @@   addKvs <- option [] $ guardEnabled Ext_mmd_link_attributes                           >> many (try $ spnl >> keyValAttr)   blanklines-  let attr'  = extractIdClass $ foldl' (\x f -> f x) attr addKvs+  let attr'  = extractIdClass $ L.foldl' (\x f -> f x) attr addKvs       target = (escapeURI $ trimr src, tit)   st <- getState   let oldkeys = stateKeys st@@ -648,7 +645,7 @@   spnl   attrs <- many (attribute <* spnl)   char '}'-  return $ foldl' (\x f -> f x) nullAttr attrs+  return $ L.foldl' (\x f -> f x) nullAttr attrs  attribute :: PandocMonad m => MarkdownParser m (Attr -> Attr) attribute = identifierAttr <|> classAttr <|> keyValAttr <|> specialAttr@@ -780,7 +777,7 @@   when (sourceColumn pos /= 1) $ Prelude.fail "Not in first column"   lns <- many1 $ birdTrackLine c   -- if (as is normal) there is always a space after >, drop it-  let lns' = if all (\ln -> T.null ln || T.take 1 ln == " ") lns+  let lns' = if all (\ln -> T.null ln || T.head ln == ' ') lns                 then map (T.drop 1) lns                 else lns   blanklines@@ -817,9 +814,28 @@ blockQuote :: PandocMonad m => MarkdownParser m (F Blocks) blockQuote = do   raw <- emailBlockQuote+  (mbAlert, raw') <-+    (do guardEnabled Ext_alerts+        case raw of+          (t:ts) | "[!" `T.isPrefixOf` t ->+              case T.strip t of+                "[!TIP]" -> pure (Just "tip", ts)+                "[!WARNING]" -> pure (Just "warning", ts)+                "[!IMPORTANT]" -> pure (Just "important", ts)+                "[!CAUTION]" -> pure (Just "caution", ts)+                "[!NOTE]" -> pure (Just "note", ts)+                _ -> pure (Nothing, raw)+          _ -> pure (Nothing, raw))+      <|> pure (Nothing, raw)   -- parse the extracted block, which may contain various block elements:-  contents <- parseFromString' parseBlocks $ T.intercalate "\n" raw <> "\n\n"-  return $ B.blockQuote <$> contents+  contents <- parseFromString' parseBlocks $ T.intercalate "\n" raw' <> "\n\n"+  return $+    case mbAlert of+      Nothing -> B.blockQuote <$> contents+      Just alert ->+        (B.divWith ("", [alert], [])+          . (B.divWith ("", ["title"], []) (B.para (B.str (T.toTitle alert))) <>))+           <$> contents  -- -- list blocks@@ -966,6 +982,8 @@ orderedList :: PandocMonad m => MarkdownParser m (F Blocks) orderedList = try $ do   (start, style, delim) <- lookAhead (orderedListStart Nothing)+  ctx <- stateParserContext <$> getState+  when (ctx == ListItemState) $ guard (start == 1)   unless (style `elem` [DefaultStyle, Decimal, Example] &&           delim `elem` [DefaultDelim, Period]) $     guardEnabled Ext_fancy_lists@@ -1053,8 +1071,7 @@                    <* lookAhead header)               <|> (guardEnabled Ext_lists_without_preceding_blankline                     -- Avoid creating a paragraph in a nested list.-                    <* notFollowedBy' inList-                    <* lookAhead listStart)+                    <* notFollowedBy' (inList <* listStart))               <|> do guardEnabled Ext_native_divs                      inHtmlBlock <- stateInHtmlBlock <$> getState                      case inHtmlBlock of@@ -1148,7 +1165,7 @@                 many1 ((<>) <$> rawLaTeXBlock <*> spnl'))   return $ case B.toList result of                 [RawBlock _ cs]-                  | T.all (`elem` [' ','\t','\n']) cs -> return mempty+                  | T.all (\c -> c == ' ' || c == '\t' || c == '\n') cs -> return mempty                 -- don't create a raw block for suppressed macro defs                 _ -> return result @@ -1184,7 +1201,9 @@         return (return (B.rawBlock "html" $ stripMarkdownAttribute raw) <>                 contents <>                 return (B.rawBlock "html" rawcloser)))-      <|> return (return (B.rawBlock "html" raw) <> contents)+      <|> if T.all isSpace raw+             then return mempty+             else return (return (B.rawBlock "html" raw) <> contents)   updateState $ \st -> st{ stateInHtmlBlock = oldInHtmlBlock }   return result @@ -1386,7 +1405,20 @@ -- ending with a footer (dashed line followed by blank line). gridTable :: PandocMonad m           => MarkdownParser m (F TableComponents)-gridTable = gridTableWith' NormalizeHeader parseBlocks+gridTable = try $ do+  -- Like other block-level constructs, a grid table may be indented by+  -- up to three spaces.  The underlying grid-table parser expects the+  -- table to begin at the left margin, so strip a uniform indentation+  -- from every line before handing it off.+  indent <- T.length <$> lookAhead nonindentSpaces+  if indent == 0+     then gridTableWith' NormalizeHeader parseBlocks+     else do+       let gridLine = try $ count indent (char ' ')+                              *> lookAhead (oneOf "+|")+                              *> anyLineNewline+       rawTable <- T.concat <$> many1 gridLine+       parseFromString' (gridTableWith' NormalizeHeader parseBlocks) rawTable  pipeBreak :: PandocMonad m => MarkdownParser m ([Alignment], [Int]) pipeBreak = try $ do@@ -1588,7 +1620,7 @@   guardEnabled Ext_example_lists   try $ do     char '@'-    lab <- mconcat . map T.pack <$>+    lab <- T.pack . concat <$>                       many (many1 alphaNum <|>                             try (do c <- char '_' <|> char '-'                                     cs <- many1 alphaNum@@ -1867,7 +1899,7 @@           (before, after)             | titleAfter -> (T.drop 1 after, before)             | otherwise -> (before, T.drop 1 after)-    guard $ T.all (`notElem` ['\n','\r','\f','\t']) url+    guard $ T.all (\c -> c /= '\n' && c /= '\r' && c /= '\f' && c /= '\t') url     return . pure . constructor attr url "" $        B.text $ fromEntities title @@ -1912,7 +1944,7 @@  isSmallCapsFontVariant :: Text -> Bool isSmallCapsFontVariant s =-  T.toLower (T.filter (`notElem` [' ', '\t', ';']) s) ==+  T.toLower (T.filter (\c -> c /= ' ' && c /= '\t' && c /= ';') s) ==   "font-variant:small-caps"  regLink :: PandocMonad m@@ -2071,8 +2103,9 @@     char '^'     updateState $ \st -> st{ stateInNote = True                            , stateNoteNumber = stateNoteNumber st + 1 }-    contents <- inBalancedBrackets inlines-    notFollowedBy (char '(' <|> char '[') -- ^[link](foo)^ is superscript+    contents <- withQuoteContext NoQuote $ inBalancedBrackets inlines+    notFollowedBy (char '(' <|> char '[' <|> ('{' <$ attributes))+      -- ^[link](foo)^ is superscript     updateState $ \st -> st{ stateInNote = False }     return $ B.note . B.para <$> contents @@ -2174,7 +2207,9 @@                              then (\x -> isInlineTag x &&                                          not (isCloseBlockTag x))                              else not . isTextTag-  return $ return $ B.rawInline "html" result+  return $ if T.all isSpace result+              then return mempty+              else return $ B.rawInline "html" result  -- Emoji 
src/Text/Pandoc/Readers/MediaWiki.hs view
@@ -13,7 +13,7 @@ {- TODO: _ correctly handle tables within tables-_ parse templates?+_ parse templates(?) and built-in magic words -} module Text.Pandoc.Readers.MediaWiki ( readMediaWiki ) where @@ -28,17 +28,17 @@ import Data.Text (Text) import qualified Data.Text as T import Text.HTML.TagSoup-import Text.Pandoc.Builder (Blocks, Inlines, trimInlines) import qualified Text.Pandoc.Builder as B+import Text.Pandoc.Builder (Blocks, Inlines, trimInlines)+import Text.Pandoc.Char (isCJK) import Text.Pandoc.Class.PandocMonad (PandocMonad (..)) import Text.Pandoc.Definition import Text.Pandoc.Logging import Text.Pandoc.Options import Text.Pandoc.Parsing hiding (tableCaption)-import Text.Pandoc.Readers.HTML (htmlTag, isBlockTag, isCommentTag, toAttr)-import Text.Pandoc.Shared (safeRead, stringify, stripTrailingNewlines,-                           trim, splitTextBy, tshow, formatCode)-import Text.Pandoc.Char (isCJK)+import Text.Pandoc.Readers.HTML (htmlTag, isCommentTag, toAttr)+import Text.Pandoc.Shared (formatCode, safeRead, splitTextBy, stringify,+                           stripTrailingNewlines, trim, tshow) import Text.Pandoc.XML (fromEntities)  -- | Read mediawiki from an input string and return a Pandoc document.@@ -56,6 +56,7 @@                                             , mwLogMessages = []                                             , mwInTT = False                                             , mwAllowNewlines = True+                                            , mwMeta = nullMeta                                             }             sources   case parsed of@@ -70,6 +71,7 @@                        , mwLogMessages     :: [LogMessage]                        , mwInTT            :: Bool                        , mwAllowNewlines   :: Bool+                       , mwMeta            :: Meta                        }  type MWParser m = ParsecT Sources MWState m@@ -90,7 +92,7 @@ --  specialChars :: [Char]-specialChars = "'[]<=&*{}|\":\\"+specialChars = "'[]<=&*{}|\":\\_"  spaceChars :: [Char] spaceChars = " \n\t"@@ -102,21 +104,86 @@ newBlockTags = ["haskell","syntaxhighlight","source","gallery","references"]  isBlockTag' :: Tag Text -> Bool-isBlockTag' tag@(TagOpen t _) = (isBlockTag tag || t `elem` newBlockTags) &&-  t `notElem` eitherBlockOrInline-isBlockTag' (TagClose "ref") = True -- needed so 'special' doesn't parse it-isBlockTag' tag@(TagClose t) = (isBlockTag tag || t `elem` newBlockTags) &&-  t `notElem` eitherBlockOrInline-isBlockTag' tag = isBlockTag tag+isBlockTag' (TagOpen t _) = isBlockTagName t+isBlockTag' (TagClose t) = isBlockTagName t+isBlockTag' _ = False +isBlockTagName :: Text -> Bool+isBlockTagName t =+  t `elem` [ "blockquote"+           , "caption"+           , "col"+           , "colgroup"+           , "dd"+           , "div"+           , "dl"+           , "dt"+           , "h1"+           , "h2"+           , "h3"+           , "h4"+           , "h5"+           , "h6"+           , "hr"+           , "li"+           , "meta"+           , "ol"+           , "p"+           , "pre"+           , "rp"+           , "table"+           , "td"+           , "th"+           , "time"+           , "tr"+           , "ul"+           , "center"+           ] || t `elem` newBlockTags+ isInlineTag' :: Tag Text -> Bool isInlineTag' (TagComment _) = True-isInlineTag' (TagClose "ref") = False -- see below inlineTag-isInlineTag' t              = not (isBlockTag' t)+isInlineTag' (TagOpen t _) = isInlineTagName t+isInlineTag' (TagClose t) = isInlineTagName t+isInlineTag' _ = False -eitherBlockOrInline :: [Text]-eitherBlockOrInline = ["applet", "button", "del", "iframe", "ins",-                               "map", "area", "object"]+isInlineTagName :: Text -> Bool+isInlineTagName t =+  t `elem` [ "abbr"+           , "b"+           , "bdi"+           , "bdo"+           , "big"+           , "br"+           , "cite"+           , "code"+           , "data"+           , "del"+           , "dfn"+           , "em"+           , "i"+           , "ins"+           , "kbd"+           , "link"+           , "mark"+           , "q"+           , "rt"+           , "ruby"+           , "s"+           , "samp"+           , "small"+           , "span"+           , "strong"+           , "sub"+           , "sup"+           , "u"+           , "var"+           , "wbr"+           , "font"+           , "rb"+           , "rtc"+           , "strike"+           , "tt"+           ]  htmlComment :: PandocMonad m => MWParser m () htmlComment = () <$ htmlTag isCommentTag@@ -160,11 +227,12 @@   spaces   eof   categoryLinks <- reverse . mwCategoryLinks <$> getState+  meta <- mwMeta <$> getState   let categories = if null categoryLinks                       then mempty                       else B.para $ mconcat $ intersperse B.space categoryLinks   reportLogMessages-  return $ B.doc $ bs <> categories+  return $ Pandoc meta (B.toList bs <> B.toList categories)  -- -- block parsers@@ -533,6 +601,7 @@       <|> doubleQuotes       <|> strong       <|> emph+      <|> behaviorSwitch       <|> image       <|> internalLink       <|> externalLink@@ -571,7 +640,11 @@  inlineTag :: PandocMonad m => MWParser m Inlines inlineTag = do-  (tag, _) <- lookAhead $ htmlTag isInlineTag'+  (tag, _) <- lookAhead $ htmlTag (\tag -> case tag of+                                      TagOpen "hask" _ -> True+                                      TagOpen "ref" _ -> True+                                      TagOpen "nowiki" _ -> True+                                      _ -> isInlineTag' tag)   case tag of        TagOpen "ref" _ -> B.note . singleParaToPlain <$> blocksInTags "ref"        TagOpen "nowiki" _ -> try $ do@@ -586,6 +659,10 @@        TagOpen "del" _ -> B.strikeout <$> inlinesInTags "del"        TagOpen "sub" _ -> B.subscript <$> inlinesInTags "sub"        TagOpen "sup" _ -> B.superscript <$> inlinesInTags "sup"+       TagOpen "var" _ -> B.codeWith ("",["variable"],[]) <$> textInTags "var"+       TagOpen "samp" _ -> B.codeWith ("",["sample"],[]) <$> textInTags "samp"+       TagOpen "kbd" _ -> B.spanWith ("",["kbd"],[]) <$> inlinesInTags "kbd"+       TagOpen "mark" _ -> B.spanWith ("",["mark"],[]) <$> inlinesInTags "mark"        TagOpen "code" _ -> encode <$> inlinesInTags "code"        TagOpen "tt" _ -> do          inTT <- mwInTT <$> getState@@ -597,8 +674,15 @@        _ -> B.rawInline "html" . snd <$> htmlTag (~== tag)  special :: PandocMonad m => MWParser m Inlines-special = B.str <$> countChar 1 (notFollowedBy' (htmlTag isBlockTag') *>-                                  oneOf specialChars)+special = B.str . T.singleton <$>+  (notFollowedBy' (htmlTag (\t -> isInlineTag' t ||+                                  isBlockTag' t ||+                                  case t of+                                    TagClose "ref" -> True+                                    TagClose "hask" -> True+                                    TagClose "nowiki" -> True+                                    _ -> False)+                                  ) *> oneOf specialChars)  inlineHtml :: PandocMonad m => MWParser m Inlines inlineHtml = B.rawInline "html" . snd <$> htmlTag isInlineTag'@@ -716,3 +800,37 @@   B.doubleQuoted <$> inlinesBetween openDoubleQuote closeDoubleQuote     where openDoubleQuote = sym "\"" >> lookAhead nonspaceChar           closeDoubleQuote = try $ sym "\""++behaviorSwitch :: PandocMonad m => MWParser m Inlines+behaviorSwitch = try $ do+  let reservedMagicWords = [ "NOTOC"+              , "FORCETOC"+              , "TOC"+              , "NOEDITSECTION"+              , "NEWSECTIONLINK"+              , "NONEWSECTIONLINK"+              , "NOGALLERY"+              , "HIDDENCAT"+              , "EXPECTUNUSEDCATEGORY"+              , "NOCONTENTCONVERT"+              , "NOCC"+              , "NOTITLECONVERT"+              , "NOTC"+              , "INDEX"+              , "NOINDEX"+              , "STATICREDIRECT"+              , "EXPECTUNUSEDTEMPLATE"+              -- From popular extensions+              , "NOGLOBAL"+              , "DISAMBIG"+              , "ARCHIVEDTALK"+              , "NOTALK"+              ]+  string "__"+  name <- many1 alphaNum+  string "__"+  case name `elem` reservedMagicWords of+    True -> do+      updateState $ \st -> st{ mwMeta = B.setMeta (T.toLower $ T.pack name) True (mwMeta st) }+      return mempty+    False -> return $ B.str $ "__" <> T.pack name <> "__"
src/Text/Pandoc/Readers/ODT/Arrows/State.hs view
@@ -33,10 +33,10 @@   , iterateS'   ) where +import qualified Data.List as L import Control.Arrow import qualified Control.Category as Cat import Control.Monad-import Data.List (foldl') import Text.Pandoc.Readers.ODT.Arrows.Utils import Text.Pandoc.Readers.ODT.Generic.Fallible @@ -136,7 +136,7 @@ iterateSL :: (Foldable f, MonadPlus m)           => ArrowState s    x     y           -> ArrowState s (f x) (m y)-iterateSL a = ArrowState $ \(s,f) -> foldl' a' (s,mzero) f+iterateSL a = ArrowState $ \(s,f) -> L.foldl' a' (s,mzero) f   where a' (s',m) x = second (mplus m.return) $ runArrowState a (s',x)  
src/Text/Pandoc/Readers/ODT/ContentReader.hs view
@@ -46,6 +46,8 @@ import Text.Pandoc.Extensions (extensionsFromList, Extension(..)) import qualified Text.Pandoc.UTF8 as UTF8 +import Text.Pandoc.Readers.Docx.Combine (combineBlocks)+ import Text.Pandoc.Readers.ODT.Base import Text.Pandoc.Readers.ODT.Namespaces import Text.Pandoc.Readers.ODT.StyleReader@@ -205,11 +207,11 @@            >>^ fst  ---getCurrentListLevel :: ODTReaderSafe _x ListLevel+getCurrentListLevel :: ODTReaderSafe a ListLevel getCurrentListLevel = getExtraState >>^ currentListLevel  ---getListContinuationStartCounters :: ODTReaderSafe _x (M.Map ListLevel Int)+getListContinuationStartCounters :: ODTReaderSafe a (M.Map ListLevel Int) getListContinuationStartCounters = getExtraState >>^ listContinuationStartCounters  @@ -278,7 +280,7 @@ --------------------------------------------------------------------------------  ---readStyleByName :: ODTReader _x (StyleName, Style)+readStyleByName :: ODTReader a (StyleName, Style) readStyleByName =   findAttr NsText "style-name" >>? keepingTheValue getStyleByName >>^ liftE   where@@ -327,6 +329,7 @@   where     isCodeStyle :: StyleName -> Bool     isCodeStyle "Source_Text" = True+    isCodeStyle "Source_20_Text" = True     isCodeStyle _             = False      inlineCode :: Inlines -> Inlines@@ -365,16 +368,12 @@      hasEmphChanged :: PropertyTriple -> Bool     hasEmphChanged = swing any [ hasChanged  isEmphasised-                               , hasChangedM pitch                                , hasChanged  underline                                ]      hasChanged property triple@(_, property -> newProperty, _) =         (/= Just newProperty) (lookupPreviousValue property triple) -    hasChangedM property triple@(_, textProps,_) =-      fromMaybe False $ (/=) <$> property textProps <*> lookupPreviousValueM property triple-     lookupPreviousValue f = lookupPreviousStyleValue (fmap f . textProperties)      lookupPreviousValueM f = lookupPreviousStyleValue (f <=< textProperties)@@ -415,7 +414,7 @@      = False  ---constructPara :: ODTReaderSafe Blocks Blocks -> ODTReaderSafe Blocks Blocks+constructPara :: ODTReaderSafe a Blocks -> ODTReaderSafe a Blocks constructPara reader = proc blocks -> do   fStyle <- readStyleByName -< blocks   case fStyle of@@ -546,6 +545,14 @@ firstMatch :: a -> FirstMatch a firstMatch = FirstMatch . Alt . Just +newtype CombiningBlocks = CombiningBlocks { unCombiningBlocks :: Blocks }++instance Semigroup CombiningBlocks where+  CombiningBlocks l <> CombiningBlocks r = CombiningBlocks (combineBlocks l r)++instance Monoid CombiningBlocks where+  mempty = CombiningBlocks mempty+ -- matchingElement :: (Monoid e)                 => Namespace -> ElementName@@ -559,14 +566,20 @@ -- matchChildContent'   :: (Monoid result)                      => [ElementMatcher result]-                     ->  ODTReaderSafe _x result+                     ->  ODTReaderSafe a result matchChildContent' ls = returnV mempty >>> matchContent' ls  --+matchSmushedChildBlocks' :: [ElementMatcher CombiningBlocks] ->  ODTReaderSafe a Blocks+matchSmushedChildBlocks' ls = liftA unCombiningBlocks+                              $ returnV mempty+                                >>> matchContent' ls++-- matchChildContent    :: (Monoid result)                      => [ElementMatcher result]                      ->  ODTReaderSafe  (result, XML.Content) result-                     ->  ODTReaderSafe _x result+                     ->  ODTReaderSafe a result matchChildContent ls fallback = returnV mempty >>> matchContent ls fallback  --------------------------------------------@@ -634,34 +647,46 @@                                         ] read_plain_text  ---read_paragraph   :: BlockMatcher-read_paragraph    = matchingElement NsText "p"-                    $ constructPara-                    $ liftA para-                    $ withNewStyle-                    $ matchChildContent [ read_span-                                        , read_spaces-                                        , read_line_break-                                        , read_tab-                                        , read_link-                                        , read_note-                                        , read_citation-                                        , read_bookmark-                                        , read_bookmark_start-                                        , read_reference_start-                                        , read_bookmark_ref-                                        , read_reference_ref-                                        , read_frame-                                        , read_text_seq-                                        ] read_plain_text+read_paragraph   :: ElementMatcher CombiningBlocks+read_paragraph    = matchingElement NsText "p" $+                      liftA CombiningBlocks $ proc blocks -> do+                        fStyle <- readStyleByName -< blocks+                        case fStyle of+                          Right style | isPreformattedStyle style -> do+                            liftA (codeBlock . stringify) $ matchParagraphContent -< blocks+                          _ ->+                            constructPara $ liftA para $ withNewStyle matchParagraphContent -< blocks+                        where+                          isPreformattedStyle :: (StyleName, Style) -> Bool+                          isPreformattedStyle ("Preformatted_20_Text", _) = True+                          isPreformattedStyle (_, Style { styleParentName = Just "Preformatted_20_Text" }) = True+                          isPreformattedStyle _ = False  +matchParagraphContent :: ODTReaderSafe a Inlines+matchParagraphContent = matchChildContent [ read_span+                                          , read_spaces+                                          , read_line_break+                                          , read_tab+                                          , read_link+                                          , read_note+                                          , read_citation+                                          , read_bookmark+                                          , read_bookmark_start+                                          , read_reference_start+                                          , read_bookmark_ref+                                          , read_reference_ref+                                          , read_frame+                                          , read_text_seq+                                          ] read_plain_text++ ---------------------- -- Headers ----------------------  ---read_header      :: BlockMatcher+read_header      :: ElementMatcher CombiningBlocks read_header       = matchingElement NsText "h"                     $  proc blocks -> do   level    <- ( readAttrWithDefault NsText "outline-level" 1@@ -683,15 +708,16 @@               ) -< blocks   anchor   <- getHeaderAnchor -< children   let idAttr = (anchor, [], []) -- no classes, no key-value pairs-  arr (uncurry3 headerWith) -< (idAttr, level, children)+  arr (CombiningBlocks . uncurry3 headerWith) -< (idAttr, level, children)  ---------------------- -- Lists ----------------------  ---read_list        :: BlockMatcher+read_list        :: ElementMatcher CombiningBlocks read_list         = matchingElement NsText "list"+                    $ liftA CombiningBlocks                     $ constructList                     $ matchChildContent' [ read_list_item                                          , read_list_header@@ -706,26 +732,26 @@ read_list_element               :: ElementName -> ElementMatcher [Blocks] read_list_element listElement   = matchingElement NsText listElement                                   $ liftA (compactify.(:[]))-                                    ( matchChildContent' [ read_paragraph-                                                         , read_header-                                                         , read_list-                                                         , read_section-                                                         ]+                                    ( matchSmushedChildBlocks' [ read_paragraph+                                                               , read_header+                                                               , read_list+                                                               , read_section+                                                               ]                                     )  ---------------------- -- Sections ---------------------- -read_section :: ElementMatcher Blocks+read_section :: ElementMatcher CombiningBlocks read_section = matchingElement NsText "section"-                 $ liftA (divWith nullAttr)-                 $ matchChildContent' [ read_paragraph-                                      , read_header-                                      , read_list-                                      , read_table-                                      , read_section-                                      ]+                 $ liftA (CombiningBlocks . divWith nullAttr)+                 $ matchSmushedChildBlocks' [ read_paragraph+                                            , read_header+                                            , read_list+                                            , read_table+                                            , read_section+                                            ]   ----------------------@@ -768,7 +794,7 @@  read_note_body   :: BlockMatcher read_note_body    = matchingElement NsText "note-body"-                    $ matchChildContent' [ read_paragraph ]+                    $ matchSmushedChildBlocks' [ read_paragraph ]  ------------------------- -- Citations@@ -792,44 +818,48 @@ ----------------------  ---read_table        :: BlockMatcher+read_table        :: ElementMatcher CombiningBlocks read_table         = matchingElement NsTable "table"-                     $ liftA simpleTable'+                     $ liftA (CombiningBlocks . table')                      $ (matchChildContent' [read_table_header]) &&&-                       (matchChildContent'  [read_table_row])+                       (matchChildContent' [read_table_row]) --- | A simple table without a caption.-simpleTable' :: ([[Blocks]], [[Blocks]]) -> Blocks-simpleTable' (headers, rows) =+-- | A table without a caption.+table' :: ([[Cell]], [[Cell]]) -> Blocks+table' (headers, rows) =   table emptyCaption (replicate numcols defaults) th [tb] tf   where     defaults = (AlignDefault, ColWidthDefault)     numcols = maximum $ map length $ headers ++ rows-    toRow = Row nullAttr . map simpleCell+    toRow = Row nullAttr     th = TableHead nullAttr $ map toRow headers     tb = TableBody nullAttr 0 [] $ map toRow rows     tf = TableFoot nullAttr []  ---read_table_header :: ElementMatcher [[Blocks]]+read_table_header :: ElementMatcher [[Cell]] read_table_header = matchingElement NsTable "table-header-rows"                       $ matchChildContent' [ read_table_row                                            ]  ---read_table_row    :: ElementMatcher [[Blocks]]+read_table_row    :: ElementMatcher [[Cell]] read_table_row     = matchingElement NsTable "table-row"                      $ liftA (:[])                      $ matchChildContent'  [ read_table_cell                                            ]  ---read_table_cell   :: ElementMatcher [Blocks]+read_table_cell   :: ElementMatcher [Cell] read_table_cell    = matchingElement NsTable "table-cell"-                     $ liftA (compactify.(:[]))-                     $ matchChildContent' [ read_paragraph-                                          , read_list-                                          ]+                     $ liftA3 cell'+                       (readAttrWithDefault NsTable "number-rows-spanned" 1 >>^ RowSpan)+                       (readAttrWithDefault NsTable "number-columns-spanned" 1 >>^ ColSpan)+                     $ matchSmushedChildBlocks' [ read_paragraph+                                                , read_list+                                                ]+  where+    cell' rowSpan colSpan blocks = map (cell AlignDefault rowSpan colSpan) $ compactify [blocks]  ---------------------- -- Frames@@ -858,14 +888,15 @@       ""   -> returnV mempty -< ()       src' -> do         let exts = extensionsFromList [Ext_auto_identifiers]-        resource   <- lookupResource                          -< T.unpack src'+            src'' = fixRelativeLink src'+        resource   <- lookupResource                          -< T.unpack src''         _          <- updateMediaWithResource                 -< resource         w          <- findAttrText' NsSVG "width"             -< ()         h          <- findAttrText' NsSVG "height"            -< ()         titleNodes <- matchChildContent' [ read_frame_title ] -< ()         alt        <- matchChildContent [] read_plain_text    -< ()         arr (firstMatch . uncurry4 imageWith)                 -<-          (image_attributes w h, src', inlineListToIdentifier exts (toList titleNodes), alt)+          (image_attributes w h, src'', inlineListToIdentifier exts (toList titleNodes), alt)  read_frame_title :: InlineMatcher read_frame_title = matchingElement NsSVG "title" (matchChildContent [] read_plain_text)@@ -894,7 +925,7 @@  read_frame_text_box :: ODTReaderSafe XML.Element (FirstMatch Inlines) read_frame_text_box = proc box -> do-    paragraphs <- executeIn (matchChildContent' [ read_paragraph ]) -< box+    paragraphs <- executeIn (matchSmushedChildBlocks' [ read_paragraph ]) -< box     arr read_img_with_caption -< toList paragraphs  read_img_with_caption :: [Block] -> FirstMatch Inlines@@ -915,7 +946,7 @@ _ANCHOR_PREFIX_ = "anchor"  ---readAnchorAttr :: ODTReader _x Anchor+readAnchorAttr :: ODTReader a Anchor readAnchorAttr = findAttrText NsText "name"  -- | Beware: may fail@@ -956,7 +987,7 @@                      $ maybeAddAnchorFrom readAnchorAttr  -- | Beware: may fail-findAnchorRef :: ODTReader _x Anchor+findAnchorRef :: ODTReader a Anchor findAnchorRef = (      findAttrText NsText "ref-name"                   >>?^ (_ANCHOR_PREFIX_,)                 ) >>?! getPrettyAnchor@@ -991,13 +1022,13 @@ -- Entry point ---------------------- -read_text :: ODTReaderSafe _x Pandoc-read_text = matchChildContent' [ read_header-                               , read_paragraph-                               , read_list-                               , read_section-                               , read_table-                               ]+read_text :: ODTReaderSafe a Pandoc+read_text = matchSmushedChildBlocks' [ read_header+                                     , read_paragraph+                                     , read_list+                                     , read_section+                                     , read_table+                                     ]             >>^ doc  post_process :: Pandoc -> Pandoc@@ -1009,7 +1040,7 @@   = Table attr (Caption Nothing blks) specs th tb tf : post_process' xs post_process' bs = bs -read_body :: ODTReader _x (Pandoc, MediaBag)+read_body :: ODTReader a (Pandoc, MediaBag) read_body = executeInSub NsOffice "body"           $ executeInSub NsOffice "text"           $ liftAsSuccess
src/Text/Pandoc/Readers/ODT/Generic/XMLConverter.hs view
@@ -64,7 +64,7 @@ import           Data.Text (Text) import           Data.Default import           Data.Maybe-import           Data.List (foldl')+import qualified Data.List as L import qualified Data.List.NonEmpty as NonEmpty import           Data.List.NonEmpty (NonEmpty(..)) @@ -298,7 +298,7 @@                          => XMLConverterState nsID extraState                          -> Maybe (XMLConverterState nsID extraState)     extractNSAttrs startState-                         = foldl' (\state d -> state >>= addNS d)+                         = L.foldl' (\state d -> state >>= addNS d)                                  (Just startState)                                  nsAttribs       where nsAttribs    = mapMaybe readNSattr (XML.elAttribs element)
src/Text/Pandoc/Readers/ODT/StyleReader.hs view
@@ -45,7 +45,7 @@  import Data.Default import qualified Data.Foldable as F-import Data.List (unfoldr, foldl')+import qualified Data.List as L import qualified Data.Map as M import Data.Maybe import Data.Text (Text)@@ -114,14 +114,14 @@ -- the fonts:  -- | A reader for font pitches-fontPitchReader :: XMLReader _s _x FontPitches+fontPitchReader :: XMLReader s a FontPitches fontPitchReader = executeInSub NsOffice "font-face-decls" (                           withEveryL NsStyle "font-face" (liftAsSuccess (                               findAttr' NsStyle "name"                               &&&                               lookupDefaultingAttr NsStyle "font-pitch"                             ))-                    >>?^ ( M.fromList . foldl' accumLegalPitches [] )+                    >>?^ ( M.fromList . L.foldl' accumLegalPitches [] )                   ) `ifFailedDo` returnV (Right M.empty)   where accumLegalPitches ls (Nothing,_) = ls         accumLegalPitches ls (Just n,p)  = (n,p):ls@@ -129,7 +129,7 @@  -- | A wrapper around the font pitch reader that lifts the result into the -- state.-readFontPitches :: StyleReader x x+readFontPitches :: StyleReader a a readFontPitches = producingExtraState () () fontPitchReader  @@ -141,7 +141,7 @@ --   and use the pitch from there. -- * Return the result in a Maybe ---findPitch :: XMLReaderSafe FontPitches _x (Maybe FontPitch)+findPitch :: XMLReaderSafe FontPitches a (Maybe FontPitch) findPitch =     ( lookupAttr NsStyle "font-pitch"                   `ifFailedDo`     findAttr NsStyle "font-name"                                >>? (     keepingTheValue getExtraState@@ -416,7 +416,7 @@ --------------------------------------------------------------------------------  ---readAllStyles :: StyleReader _x Styles+readAllStyles :: StyleReader a Styles readAllStyles = (      readFontPitches                   >>?! (     readAutomaticStyles                          &&& readStyles ))@@ -424,7 +424,7 @@  -- all top elements are always on the same hierarchy level  ---readStyles :: StyleReader _x Styles+readStyles :: StyleReader a Styles readStyles = executeInSub NsOffice "styles" $ liftAsSuccess   $ liftA3 Styles     ( tryAll NsStyle "style"         readStyle        >>^ M.fromList )@@ -432,7 +432,7 @@     ( tryAll NsStyle "default-style" readDefaultStyle >>^ M.fromList )  ---readAutomaticStyles :: StyleReader _x Styles+readAutomaticStyles :: StyleReader a Styles readAutomaticStyles = executeInSub NsOffice "automatic-styles" $ liftAsSuccess   $ liftA3 Styles     ( tryAll NsStyle "style"         readStyle        >>^ M.fromList )@@ -440,12 +440,12 @@     ( returnV M.empty                                                )  ---readDefaultStyle :: StyleReader _x (StyleFamily, StyleProperties)+readDefaultStyle :: StyleReader a (StyleFamily, StyleProperties) readDefaultStyle =      lookupAttr NsStyle "family"                    >>?! keepingTheValue readStyleProperties  ---readStyle :: StyleReader _x (StyleName,Style)+readStyle :: StyleReader a (StyleName,Style) readStyle =      findAttr NsStyle "name"             >>?! keepingTheValue                    ( liftA4 Style@@ -456,13 +456,13 @@                    )  ---readStyleProperties :: StyleReaderSafe _x StyleProperties+readStyleProperties :: StyleReaderSafe a StyleProperties readStyleProperties = liftA2 SProps                        ( readTextProperties >>> choiceToMaybe )                        ( readParaProperties >>> choiceToMaybe )  ---readTextProperties :: StyleReader _x TextProperties+readTextProperties :: StyleReader a TextProperties readTextProperties =   executeInSub NsStyle "text-properties" $ liftAsSuccess     ( liftA6 PropT@@ -477,15 +477,15 @@         isFontBold = ("normal",False):("bold",True)                     :map ((,True) . tshow) ([100,200..900]::[Int]) -readUnderlineMode     :: StyleReaderSafe _x (Maybe UnderlineMode)+readUnderlineMode     :: StyleReaderSafe a (Maybe UnderlineMode) readUnderlineMode     = readLineMode "text-underline-mode"                                      "text-underline-style" -readStrikeThroughMode :: StyleReaderSafe _x (Maybe UnderlineMode)+readStrikeThroughMode :: StyleReaderSafe a (Maybe UnderlineMode) readStrikeThroughMode = readLineMode "text-line-through-mode"                                      "text-line-through-style" -readLineMode :: Text -> Text -> StyleReaderSafe _x (Maybe UnderlineMode)+readLineMode :: Text -> Text -> StyleReaderSafe a (Maybe UnderlineMode) readLineMode modeAttr styleAttr = proc x -> do   isUL <- searchAttr  NsStyle styleAttr False isLinePresent -< x   mode <- lookupAttr' NsStyle  modeAttr                     -< x@@ -501,7 +501,7 @@                     ]  ---readParaProperties :: StyleReader _x ParaProperties+readParaProperties :: StyleReader a ParaProperties readParaProperties =    executeInSub NsStyle "paragraph-properties" $ liftAsSuccess      ( liftA3 PropP@@ -527,7 +527,7 @@ ----  ---readListStyle :: StyleReader _x (StyleName, ListStyle)+readListStyle :: StyleReader a (StyleName, ListStyle) readListStyle =        findAttr NsStyle "name"   >>?! keepingTheValue@@ -540,13 +540,13 @@ -- readListLevelStyles :: Namespace -> ElementName                     -> ListLevelType-                    -> StyleReaderSafe _x (SM.SetMap Int ListLevelStyle)+                    -> StyleReaderSafe a (SM.SetMap Int ListLevelStyle) readListLevelStyles namespace elementName levelType =   tryAll namespace elementName (readListLevelStyle levelType)     >>^ SM.fromList  ---readListLevelStyle :: ListLevelType -> StyleReader _x (Int, ListLevelStyle)+readListLevelStyle :: ListLevelType -> StyleReader a (Int, ListLevelStyle) readListLevelStyle levelType =      readAttr NsText "level"                                >>?! keepingTheValue                                     ( liftA5 toListLevelStyle@@ -603,7 +603,7 @@ -- be the first element of the list, followed by its parent and so on. -- The current style is not in the list. parents               :: Style       -> Styles ->      [Style]-parents style styles = unfoldr findNextParent style -- Ha!+parents style styles = L.unfoldr findNextParent style -- Ha!   where findNextParent Style{..}           = fmap duplicate $ (`lookupStyle` styles) =<< styleParentName 
src/Text/Pandoc/Readers/Org/Blocks.hs view
@@ -38,7 +38,7 @@ import Data.Char (isSpace) import Data.Default (Default) import Data.Functor (($>))-import Data.List (find, foldl')+import qualified Data.List as L import Data.Maybe (fromMaybe, isJust, isNothing) import Data.Text (Text) import Data.List.NonEmpty (nonEmpty)@@ -130,9 +130,9 @@ blockAttributes = try $ do   kv <- many stringyMetaAttribute   guard $ all (isBlockAttr . fst) kv-  let caption = foldl' (appendValues "caption") Nothing kv-  let kvAttrs = foldl' (appendValues "attr_html") Nothing kv-  let name    = snd <$> find ((`elem` ["name", "label"]) . fst) (reverse kv)+  let caption = L.foldl' (appendValues "caption") Nothing kv+  let kvAttrs = L.foldl' (appendValues "attr_html") Nothing kv+  let name    = snd <$> L.find ((`elem` ["name", "label"]) . fst) (reverse kv)   caption' <- traverse (parseFromString inlines . (<> "\n")) caption   kvAttrs' <- parseFromString keyValues . (<> "\n") $ fromMaybe mempty kvAttrs   return BlockAttributes@@ -231,7 +231,7 @@   newline   content <- rawBlockContent "example"   let id' = fromMaybe mempty $ blockAttrName blockAttrs-  let codeBlck = B.codeBlockWith (id', "example":classes, kv) content+  let codeBlck = B.codeBlockWith (id', classes, kv) content   return . return $ codeBlck  rawBlockLines :: Monad m => (Text   -> F Blocks) -> Text -> OrgParser m (F Blocks)@@ -558,7 +558,7 @@    exampleLine = try $ exampleLineStart *> anyLine  exampleCode :: Text -> Blocks-exampleCode = B.codeBlockWith ("", ["example"], [])+exampleCode = B.codeBlockWith ("", [], [])   --
src/Text/Pandoc/Readers/RIS.hs view
@@ -23,7 +23,7 @@ import Text.Pandoc.Definition import Text.Pandoc.Parsing import Data.Char (isAsciiUpper, isDigit, isSpace, ord, chr)-import Data.List (foldl')+import qualified Data.List as L import Citeproc (Reference(..), ItemId(..), Val(..), Date(..), DateParts(..),                  toVariable) import Text.Pandoc.Builder as B@@ -185,7 +185,7 @@   return $ fixDuplicateIds $ map risRecordToReference recs  fixDuplicateIds :: [Reference Text] -> [Reference Text]-fixDuplicateIds = reverse . snd . foldl' go (mempty, [])+fixDuplicateIds = reverse . snd . L.foldl' go (mempty, [])  where    go (ids_seen, refs) ref =      case M.lookup (referenceId ref) ids_seen of
src/Text/Pandoc/Readers/RST.hs view
@@ -25,6 +25,7 @@ import qualified Data.Map as M import Data.Maybe (fromMaybe, maybeToList, isJust, isNothing, catMaybes) import Data.Sequence (ViewR (..), viewr)+import qualified Data.Set as Set import Data.Text (Text) import qualified Data.Text as T import Text.Printf (printf)@@ -170,7 +171,7 @@   return doc  resolveBlockSubstitutions :: PandocMonad m => Block -> RSTParser m Block-resolveBlockSubstitutions x@(Para [Link _attr _ (s,_)])+resolveBlockSubstitutions (Para [Link _attr ils (s,_)])   | Just ref <- T.stripPrefix "##SUBST##" s = do           substTable <- stateSubstitutions <$> getState           let key@(Key key') = toKey $ stripFirstAndLast ref@@ -178,7 +179,7 @@                Nothing     -> do                  pos <- getPosition                  logMessage $ ReferenceNotFound (tshow key') pos-                 return x+                 return $ Para ils                Just target -> case                  B.toList target of                    [bl] -> return bl@@ -186,7 +187,10 @@ resolveBlockSubstitutions x = return x  resolveReferences :: PandocMonad m => Inline -> RSTParser m Inline-resolveReferences x@(Link _ ils (s,_))+resolveReferences = resolveReferences' Set.empty++resolveReferences' :: PandocMonad m => Set.Set Key -> Inline -> RSTParser m Inline+resolveReferences' seen x@(Link _ ils (s,_))   | Just ref <- T.stripPrefix "##REF##" s = do       let isAnonKey (Key (T.uncons -> Just ('_',_))) = True           isAnonKey _                                = False@@ -199,11 +203,17 @@                     []    -> mzero -- TODO log?                     (k:_) -> return k                 else return $ toKey ref-      ((src,tit), attr) <- lookupKey [] key-      -- if anonymous link, remove key so it won't be used again-      when (isAnonKey key) $ updateState $ \st ->-                              st{ stateKeys = M.delete key keyTable }-      return $ Link attr ils (src, tit)+      if key `Set.member` seen+         then do+           pos <- getPosition+           let Key key' = key+           logMessage $ CircularReference key' pos+           return x+         else do+           ((src,tit), attr) <- lookupKey [] key+           when (isAnonKey key) $ updateState $ \st ->+                                   st{ stateKeys = M.delete key keyTable }+           resolveReferences' (Set.insert key seen) (Link attr ils (src, tit))   | Just ref <- T.stripPrefix "##NOTE##" s = do       state <- getState       let notes = stateNotes state@@ -229,18 +239,24 @@   | Just ref <- T.stripPrefix "##SUBST##" s = do           substTable <- stateSubstitutions <$> getState           let key@(Key key') = toKey $ stripFirstAndLast ref-          case M.lookup key substTable of+          if key `Set.member` seen+             then do+               pos <- getPosition+               logMessage $ CircularReference key' pos+               return $ Span ("",[],[]) ils+             else case M.lookup key substTable of                Nothing     -> do                  pos <- getPosition                  logMessage $ ReferenceNotFound (tshow key') pos-                 return x-               Just target -> case-                 B.toList target of+                 return $ Span ("",[],[]) ils+               Just target -> do+                 resolved <- case B.toList target of                    [Para [t]] -> return t                    [Para xs] -> return $ Span nullAttr xs                    bls -> return $ Span nullAttr $ blocksToInlines bls+                 resolveReferences' (Set.insert key seen) resolved   | otherwise = return x-resolveReferences x = return x+resolveReferences' _ x = return x  parseCitation :: PandocMonad m               => (Text, Text) -> RSTParser m (Inlines, [Blocks])@@ -1520,19 +1536,11 @@                        , str                        , endline                        , smart-                       , hyphens                        , escapedChar                        , symbol ] <?> "inline content"  parseInlineFromText :: PandocMonad m => Text -> RSTParser m Inlines parseInlineFromText = parseFromString' (trimInlines . mconcat <$> many inline)--hyphens :: Monad m => RSTParser m Inlines-hyphens = do-  result <- many1Char (char '-')-  optional endline-  -- don't want to treat endline after hyphen or dash as a space-  return $ B.str result  escapedChar :: Monad m => RSTParser m Inlines escapedChar = do c <- escaped anyChar
src/Text/Pandoc/Readers/RTF.hs view
@@ -20,7 +20,7 @@ import Control.Monad import Control.Monad.Except (throwError) import Crypto.Hash (hashWith, SHA1(SHA1))-import Data.List (find, foldl')+import qualified Data.List as L import Data.Word (Word8, Word16) import Data.Default import Data.Text (Text)@@ -76,6 +76,13 @@                           , sListTable   :: ListTable                           , sListOverrideTable :: ListTable                           , sEatChars    :: Int+                          , sListText    :: Bool -- True after a \listtext group,+                                                 -- marking the start of a new+                                                 -- list item+                          , sPnActive    :: Bool -- True while legacy \pn+                                                 -- paragraph numbering is in+                                                 -- effect; every paragraph in+                                                 -- scope is its own list item                           } deriving (Show)  instance Default RTFState where@@ -92,6 +99,8 @@                 , sListTable = mempty                 , sListOverrideTable = mempty                 , sEatChars = 0+                , sListText = False+                , sPnActive = False                 }  type FontTable = IntMap.IntMap FontFamily@@ -305,6 +314,26 @@             [] -> []             (x:xs) -> f x : xs } +-- | @\\plain@ resets character formatting to default values.  Unlike a+-- full reset to 'def', it must leave paragraph-level properties (such as+-- whether we are inside a table, the list level, or the outline level)+-- intact, as well as contextual properties like the current hyperlink or+-- anchor.  Resetting these caused tables to be parsed as deeply nested+-- structures when cell paragraphs used @\\plain@ after @\\intbl@.+resetCharProps :: Properties -> Properties+resetCharProps g =+  g{ gBold = False+   , gItalic = False+   , gCaps = False+   , gDeleted = False+   , gSub = False+   , gSuper = False+   , gSmallCaps = False+   , gUnderline = False+   , gFontFamily = Nothing+   , gHidden = False+   }+ addFormatting :: (Properties, Text) -> Inlines addFormatting (_, "\n") = B.linebreak addFormatting (props, _) | gHidden props = mempty@@ -432,6 +461,7 @@       case firsttok of         Tok _ (ControlWord "shppict" _) -> inGroup (foldM processTok bs toks)         Tok _ (ControlWord "shpinst" _) -> inGroup (foldM processTok bs toks)+        Tok _ (ControlWord "pn" _) -> bs <$ handlePn toks         _ -> bs <$ (do oldTextContent <- sTextContent <$> getState                        processTok mempty (Tok pos (Grouped toks))                        updateState $ \st -> st{ sTextContent = oldTextContent })@@ -454,10 +484,24 @@       bs <$ inGroup (handlePict toks)     Grouped (Tok _ (ControlWord "stylesheet" _) : toks) ->       bs <$ inGroup (handleStylesheet toks)-    Grouped (Tok _ (ControlWord "listtext" _) : _) -> do+    Grouped (Tok _ (ControlWord cw _) : _)+      -- \listtext (Word 2000+) and \pntext (legacy Word 95-style+      -- paragraph numbering) are both auto-generated list-marker+      -- destinations.  Their visible text (the bullet or number) is+      -- dropped; we synthesize markers ourselves.  The marker also+      -- appears before the paragraph's \ls/\ilvl, so processing its+      -- contents would otherwise capture the marker text as the+      -- paragraph's first run, hiding the list properties from+      -- emitBlocks (see #11686).+      | cw == "listtext" || cw == "pntext" -> do       -- eject any previous list items...sometimes TextEdit       -- doesn't put in a \par-      emitBlocks bs+      bs' <- emitBlocks bs+      -- A \listtext/\pntext group marks the beginning of a new list+      -- item.  A list paragraph lacking one is a continuation+      -- paragraph of the current item (see emitBlocks).+      updateState $ \s -> s{ sListText = True }+      pure bs'     Grouped (Tok _ (ControlWord "pgdsc" _) : _) -> pure bs     Grouped (Tok _ (ControlWord "colortbl" _) : _) -> pure bs     Grouped (Tok _ (ControlWord "listtable" _) : toks) ->@@ -546,9 +590,8 @@     ControlSymbol '~' -> bs <$ addText "\x00a0"     ControlSymbol '-' -> bs <$ addText "\x00ad"     ControlSymbol '_' -> bs <$ addText "\x2011"-    ControlWord "trowd" _ -> bs <$ do -- add new row-      updateState $ \s -> s{ sTableRows = TableRow [] : sTableRows s-                           , sCurrentCell = mempty }+    ControlWord "trowd" _ -> bs <$ beginTableRow -- begin new row+    ControlWord "row" _ -> bs <$ beginTableRow -- end current row     ControlWord "cell" _ -> bs <$ do       new <- emitBlocks mempty       curCell <- (<> new) . sCurrentCell <$> getState@@ -558,9 +601,10 @@                                     TableRow (curCell : cs) : rs                                   [] -> [TableRow [curCell]] -- shouldn't happen                            , sCurrentCell = mempty }-    ControlWord "intbl" _ ->-      emitBlocks bs <* modifyGroup (\g -> g{ gInTable = True })-    ControlWord "plain" _ -> bs <$ modifyGroup (const def)+    ControlWord "intbl" _ -> do+      ls <- closeLists 0 -- see #11364+      ((ls <>) <$> emitBlocks bs) <* modifyGroup (\g -> g{ gInTable = True })+    ControlWord "plain" _ -> bs <$ modifyGroup resetCharProps     ControlWord "lquote" _ -> bs <$ addText "\x2018"     ControlWord "rquote" _ -> bs <$ addText "\x2019"     ControlWord "ldblquote" _ -> bs <$ addText "\x201C"@@ -627,9 +671,13 @@       modifyGroup (\g -> g{ gUnderline = boolParam mbp })     ControlWord "ulnone" _ -> bs <$       modifyGroup (\g -> g{ gUnderline = False })-    ControlWord "pard" _ -> bs <$ do+    ControlWord "pard" _ -> do+      newbs <- emitBlocks bs       modifyGroup (const def)-      getStyleFormatting 0 >>= foldM processTok bs+      -- \pard resets paragraph properties, ending any legacy \pn+      -- paragraph numbering that was in effect.+      updateState $ \s -> s{ sPnActive = False }+      getStyleFormatting 0 >>= foldM processTok newbs     ControlWord "par" _ -> emitBlocks bs     _ -> pure bs @@ -671,6 +719,19 @@           closeLists lvl     _ -> pure mempty +-- Begin a new table row.  Both @\\trowd@ (which sets row defaults) and+-- @\\row@ (which ends a row) start a fresh row to be filled by subsequent+-- @\\cell@s.  We only push a new empty row when the current one already has+-- cells, so that documents repeating @\\trowd@ after @\\row@ (or omitting+-- @\\trowd@ between rows) both produce the same flat structure.+beginTableRow :: PandocMonad m => RTFParser m ()+beginTableRow =+  updateState $ \s ->+    s{ sTableRows = case sTableRows s of+                      TableRow [] : _ -> sTableRows s+                      rs -> TableRow [] : rs+     , sCurrentCell = mempty }+ closeTable :: PandocMonad m => RTFParser m Blocks closeTable = do   rawrows <- sTableRows <$> getState@@ -678,10 +739,13 @@      then return mempty      else do        let getCells (TableRow cs) = reverse cs-       let rows = map getCells . reverse $ rawrows+       -- drop empty rows produced by row terminators+       let rows = filter (not . null) . map getCells . reverse $ rawrows        updateState $ \s -> s{ sCurrentCell = mempty                             , sTableRows = [] }-       return $ B.simpleTable [] rows+       if null rows+          then return mempty+          else return $ B.simpleTable [] rows  closeContainers :: PandocMonad m => RTFParser m Blocks closeContainers = do@@ -698,7 +762,11 @@ emitBlocks :: PandocMonad m => Blocks -> RTFParser m Blocks emitBlocks bs = do   annotatedToks <- reverse . sTextContent <$> getState-  updateState $ \s -> s{ sTextContent = [] }+  -- A \listtext group marks a new item; legacy \pn paragraph numbering+  -- (sPnActive) likewise makes every paragraph its own item.  Note that+  -- sPnActive persists across \par (until \pard) and so is not reset here.+  hadListText <- (||) <$> (sListText <$> getState) <*> (sPnActive <$> getState)+  updateState $ \s -> s{ sTextContent = [], sListText = False }   let justCode = def{ gFontFamily = Just Modern }   let prop = case annotatedToks of                [] -> def@@ -723,10 +791,18 @@              (List lo parentlevel _lt items : cs)                | lo == lst                , parentlevel == level-               -- add another item to existing list-               -> do updateState $ \s ->+               -- A paragraph belonging to the current list level is+               -- either a new item (preceded by a \listtext group) or a+               -- continuation paragraph of the current item (no+               -- \listtext).  This is what allows multi-paragraph list+               -- items to be parsed correctly.+               -> do let items' = case items of+                                    (i:is) | not hadListText+                                      -> (i <> newbs) : is+                                    _ -> newbs : items+                     updateState $ \s ->                         s{ sListStack =-                             List lo level listType (newbs:items) : cs }+                             List lo level listType items' : cs }                      pure mempty                | lo /= lst || level < parentlevel                -- close parent list and add new list@@ -788,22 +864,29 @@   let isFieldMod (Tok _ (ControlWord w _)) =         w `elem` ["flddirty", "fldedit", "fldlock", "fldpriv"]       isFieldMod _ = False++  let instructionTokens (Tok _ (Grouped toks)) = Just toks+      instructionTokens unformattedTok@(Tok _ (UnformattedText _)) = Just [unformattedTok]+      instructionTokens _ = Nothing   case dropWhile isFieldMod ts of     [Tok _ (Grouped        (Tok _ (ControlSymbol '*')        :Tok _ (ControlWord "fldinst" Nothing)-       :Tok _ (Grouped instrtoks)+       :instrtoks        :_)),      Tok _ (Grouped        (Tok _ (ControlWord "fldrslt" Nothing)-       :Tok _ (Grouped resulttoks) : _))] -> do-         case getHyperlink instrtoks of-           Just linkdest -> do-             modifyGroup $ \g -> g{ gHyperlink = Just linkdest }-             result <- foldM processTok bs resulttoks-             modifyGroup $ \g -> g{ gHyperlink = Nothing }-             return result-           Nothing -> foldM processTok bs resulttoks+       :resulttoks))] -> do+         case instructionTokens instrtoks of+           Nothing -> pure bs+           Just instrtoks' ->+             case getHyperlink instrtoks' of+               Just linkdest -> do+                 modifyGroup $ \g -> g{ gHyperlink = Just linkdest }+                 result <- foldM processTok bs resulttoks+                 modifyGroup $ \g -> g{ gHyperlink = Nothing }+                 return result+               Nothing -> foldM processTok bs resulttoks     _ -> pure bs  getHyperlink :: [Tok] -> Maybe Text@@ -858,6 +941,47 @@                    Just numStyle -> Ordered (start,numStyle,Period)   return $ IntMap.insert lvl listType levelTable +-- Legacy Word-95 style paragraph numbering: {\*\pn ...}.  This+-- destination configures the auto-number (or bullet) for the current+-- list paragraph.  Unlike modern lists there is no \listtable, so we+-- synthesize an entry in the list override table here.  The \ls and+-- \ilvl that key the table appear inside the \pn group itself, as does+-- the numbering style (\pnlvlblt for a bullet, otherwise \pndec,+-- \pnucltr, etc.).  See #11686.+handlePn :: PandocMonad m => [Tok] -> RTFParser m ()+handlePn toks = do+  let ls = headDef 0 [n | Tok _ (ControlWord "ls" (Just n)) <- toks]+  let lvl = headDef 0 [n | Tok _ (ControlWord "ilvl" (Just n)) <- toks]+  let start = headDef 1 [n | Tok _ (ControlWord "pnstart" (Just n)) <- toks]+  let isBullet = not $ null [() | Tok _ (ControlWord "pnlvlblt" _) <- toks]+  let pnStyle (Tok _ (ControlWord w _)) =+        case w of+          "pndec"   -> Just Decimal+          "pnucltr" -> Just UpperAlpha+          "pnlcltr" -> Just LowerAlpha+          "pnucrm"  -> Just UpperRoman+          "pnlcrm"  -> Just LowerRoman+          _ -> Nothing+      pnStyle _ = Nothing+  let mbNumberStyle+        | isBullet  = Nothing+        | otherwise = case mapMaybe pnStyle toks of+                        (s:_) -> Just s+                        []    -> Just Decimal -- \pnlvlbody default+  let listType = case mbNumberStyle of+                   Nothing -> Bullet+                   Just numStyle -> Ordered (start, numStyle, Period)+  -- Don't clobber a type already registered via a real \listtable.+  -- \pn is a paragraph property that stays in effect (auto-numbering or+  -- bulleting every paragraph) until reset by \pard, so flag it so that+  -- each following paragraph becomes its own list item.+  updateState $ \s ->+    s{ sListOverrideTable =+         IntMap.insertWith (\new old -> IntMap.union old new) ls+           (IntMap.singleton lvl listType)+           (sListOverrideTable s)+     , sPnActive = True }+ handleListOverrideTable :: PandocMonad m => [Tok] -> RTFParser m () handleListOverrideTable toks = mapM_ handleListOverride toks @@ -895,7 +1019,7 @@                   _ -> mempty   let isBasedOn (Tok _ (ControlWord "sbasedon" (Just _))) = True       isBasedOn _ = False-  let styBasedOn = case find isBasedOn toks of+  let styBasedOn = case L.find isBasedOn toks of                      Just (Tok _ (ControlWord "sbasedon" (Just i))) -> Just i                      _ -> Nothing   let isStyleControl (Tok _ (ControlWord x _)) =@@ -920,7 +1044,7 @@  handlePict :: PandocMonad m => [Tok] -> RTFParser m () handlePict toks = do-  let pict = foldl' getPictData def toks+  let pict = L.foldl' getPictData def toks   let altText = "image"   let bytes =         if picBinary pict@@ -959,7 +1083,7 @@   processFontTable :: [Tok] -> FontTable-processFontTable = snd . foldl' go (0, mempty)+processFontTable = snd . L.foldl' go (0, mempty)  where   go (fontnum, tbl) (Tok _ tok') =     case tok' of@@ -972,7 +1096,7 @@      (ControlWord "fdecor" _) -> (fontnum, IntMap.insert fontnum Decor tbl)      (ControlWord "ftech" _) -> (fontnum, IntMap.insert fontnum Tech tbl)      (ControlWord "fbidi" _) -> (fontnum, IntMap.insert fontnum Bidi tbl)-     (Grouped ts) -> foldl' go (fontnum, tbl) ts+     (Grouped ts) -> L.foldl' go (fontnum, tbl) ts      _ -> (fontnum, tbl)  defaultAnsiWordToChar :: Word8 -> Char
src/Text/Pandoc/Readers/Roff.hs view
@@ -268,7 +268,8 @@     manyTill anyChar (try (string "T}"))   simpleCell = do     tabChar <- tableTabChar <$> getState-    many (notFollowedBy (char tabChar <|> newline) >> anyChar)+    many $ (char '\\' >> anyChar)+       <|> (notFollowedBy (char tabChar <|> newline) >> anyChar)  tableRow :: PandocMonad m => RoffLexer m [RoffTokens] tableRow = do
src/Text/Pandoc/Readers/Textile.hs view
@@ -38,7 +38,8 @@ import Control.Monad (guard, liftM) import Control.Monad.Except (throwError) import Data.Char (digitToInt, isUpper)-import Data.List (intersperse, transpose, foldl')+import Data.List (intersperse, transpose)+import qualified Data.List as L import Data.List.NonEmpty (NonEmpty(..), nonEmpty) import qualified Data.Map as M import Data.Text (Text)@@ -412,8 +413,12 @@   notFollowedBy blankline   raw <- trim . T.pack <$>          many (noneOf "|\n" <|> try (char '\n' <* notFollowedBy blankline))-  content <- mconcat <$> parseFromString' (many inline) raw-  return ((isHeader, alignment), B.plain content)+  content <- parseFromString' parseBlocks (raw <> "\n\n")+  -- Convert lone Para to Plain for backward compatibility+  let content' = case B.toList content of+                   [Para ils] -> B.plain (B.fromList ils)+                   _          -> content+  return ((isHeader, alignment), content')  -- | A table row is made of many table cells tableRow :: PandocMonad m => TextileParser m [((Bool, Alignment), Blocks)]@@ -732,7 +737,7 @@  -- | Html / CSS attributes attributes :: PandocMonad m => TextileParser m Attr-attributes = foldl' (flip ($)) ("",[],[]) <$>+attributes = L.foldl' (flip ($)) ("",[],[]) <$>   try (do special <- option id specialAttribute           attrs <- many attribute           return (special : attrs))
src/Text/Pandoc/Readers/Typst.hs view
@@ -29,9 +29,12 @@ import Text.Pandoc.Definition import Typst ( parseTypst, evaluateTypst ) import Text.Pandoc.Error (PandocError(..))+import Text.Pandoc.Translations (Term(References), translateTerm) import Text.Pandoc.Shared (tshow, blocksToInlines)+import Text.Pandoc.Parsing (registerHeader, reportLogMessages) import Control.Monad.Except (throwError) import Control.Monad (MonadPlus (mplus), void, guard, foldM)+import Control.Monad.Trans (lift) import qualified Data.Foldable as F import qualified Data.Map as M import Data.Maybe (catMaybes, fromMaybe, isJust)@@ -58,7 +61,7 @@ -- | Read Typst from an input string and return a Pandoc document. readTypst :: (PandocMonad m, ToSources a)            => ReaderOptions -> a -> m Pandoc-readTypst _opts inp = do+readTypst opts inp = do   let sources = toSources inp   let inputName = case sources of         Sources ((pos, _):_) -> sourceName pos@@ -71,13 +74,13 @@                   currentUTCTime = getCurrentTime,                   lookupEnvVar = fmap (fmap T.unpack) . lookupEnv . T.pack,                   checkExistence = fileExists }-      res <- evaluateTypst ops inputName parsed+      res <- evaluateTypst ops (readerTypstInputs opts) inputName parsed       case res of         Left e -> throwError $ PandocParseError $ tshow e         Right content -> do           let content' = fixNesting content           let labs = findLabels [content']-          runParserT pPandoc defaultPState{ sLabels = labs }+          runParserT pPandoc defaultPState{ sLabels = labs, sOptions = opts }             inputName [content'] >>=               either (throwError . PandocParseError . T.pack . show) pure @@ -140,8 +143,9 @@   | Just (VContent elts) <- M.lookup "body" fields   = let elts' = fmap fixNesting elts         fields' = M.insert "body" (VContent elts') fields-        in if isInline el-              then case getField "body" fields' of+        in if isBlock el+              then Elt name pos fields'+              else case getField "body" fields' of                         Just ([el'@(Elt name' pos' fields'')] :: Seq Content)                           | isBlock el'                           , not (isInline el')@@ -152,7 +156,6 @@                                                   (Elt name pos fields'')))                                         fields'                         _ -> Elt name pos fields'-              else Elt name pos fields' fixNesting x = x  pPandoc :: PandocMonad m => P m B.Pandoc@@ -186,6 +189,7 @@         (if null keywords             then id             else B.setMeta "keywords" keywords) $ meta+  reportLogMessages   pure $ Pandoc meta' (B.toList bs)  pBlocks :: PandocMonad m => P m B.Blocks@@ -262,8 +266,9 @@   ,("heading", \_ mbident fields -> do       body <- getField "body" fields       lev <- getField "level" fields <|> pure 1-      B.headerWith (fromMaybe "" mbident,[],[]) lev-         <$> pWithContents pInlines body)+      ils <- pWithContents pInlines body+      attr <- registerHeader (fromMaybe "" mbident,[],[]) ils+      pure $ B.headerWith attr lev ils)   ,("quote", \_ _ fields -> do       getField "block" fields >>= guard       body <- getField "body" fields >>= pWithContents pBlocks@@ -383,6 +388,7 @@               >> M.lookup "angle" fields ) of         Nothing -> pure B.horizontalRule         _ -> pure mempty)+  ,("divider", \_ _ _fields -> pure B.horizontalRule)   ,("numbering", \_ _ fields -> do       numStyle <- getField "numbering" fields       (nums :: V.Vector Integer) <- getField "numbers" fields@@ -401,6 +407,31 @@   ,("pad", \_ _ fields ->  -- ignore paddingy       getField "body" fields >>= pWithContents pBlocks)   ,("pagebreak", \_ _ _ -> pure $ B.divWith ("", ["page-break"], [("wrapper", "1")]) B.horizontalRule)+  ,("bibliography", \_ _ fields -> do+      let getSources v = case v of+                      VString t -> MetaString t+                      VArray xs -> MetaList $ map getSources $ V.toList xs+                      _ -> MetaBool True -- should not occur+      let mbSources = getSources <$> M.lookup "sources" fields++      let updateBibliography x = updateState $ \s ->+             s{ sMeta = B.setMeta "bibliography" x (sMeta s) }+      maybe (pure ()) updateBibliography mbSources++      let title' = M.lookup "title" fields+      mbTitle <- case title' of+                   Just VNone -> pure Nothing+                   Just (VContent cs) -> Just <$> pWithContents pInlines cs+                   Just (VString t) -> pure $ Just $ B.text t+                   _ -> Just . B.text <$> lift (translateTerm References)+      let hdr = maybe mempty (B.header 1) mbTitle+      pure $ hdr <> B.divWith ("refs", [], []) mempty)+  ,("rotate", \_ _ fields -> do+      body <- getField "body" fields >>= pWithContents pBlocks+      let kvs = case M.lookup "angle" fields of+                    Just (VAngle ang) -> [("angle", T.pack $ show ang)]+                    _ -> []+      pure $ B.divWith ("", ["rotate"], kvs) body)   ]  inlineHandlers :: PandocMonad m =>@@ -547,6 +578,12 @@   ,("block", \_ mbident fields ->       maybe id (\ident -> B.spanWith (ident, [], [])) mbident         <$> (getField "body" fields >>= pWithContents pInlines))+  ,("rotate", \_ _ fields -> do+      body <- getField "body" fields >>= pWithContents pInlines+      let kvs = case M.lookup "angle" fields of+                    Just (VAngle ang) -> [("angle", T.pack $ show ang)]+                    _ -> []+      pure $ B.spanWith ("", ["rotate"], kvs) body)   ]  getInlineBody :: PandocMonad m => M.Map Identifier Val -> P m (Seq Content)
src/Text/Pandoc/Readers/Typst/Parsing.hs view
@@ -16,10 +16,13 @@ where import Control.Monad (MonadPlus) import Control.Monad.Reader (lift)+import Data.Default (def) import qualified Data.Foldable as F import qualified Data.Map as M import Data.Maybe (fromMaybe) import Data.Sequence (Seq)+import Data.Set (Set)+import qualified Data.Set as Set import Data.Text (Text) import Text.Parsec     ( ParsecT, getInput, setInput, tokenPrim )@@ -27,18 +30,38 @@     ( Identifier, Content(Elt), FromVal(..), Val(VNone) ) import Text.Pandoc.Class.PandocMonad ( PandocMonad, report ) import Text.Pandoc.Logging (LogMessage(..))+import Text.Pandoc.Options (ReaderOptions)+import Text.Pandoc.Parsing.Capabilities+    ( HasReaderOptions(..), HasIdentifierList(..), HasLogMessages(..) ) import Text.Pandoc.Definition  data PState = PState         { sLabels :: [Text]-        , sMeta :: Meta }+        , sMeta :: Meta+        , sOptions :: ReaderOptions+        , sIdentifiers :: Set Text+        , sLogMessages :: [LogMessage] }         deriving (Show) +instance HasReaderOptions PState where+  extractReaderOptions = sOptions++instance HasIdentifierList PState where+  extractIdentifierList = sIdentifiers+  updateIdentifierList f st = st{ sIdentifiers = f (sIdentifiers st) }++instance HasLogMessages PState where+  addLogMessage m st = st{ sLogMessages = m : sLogMessages st }+  getLogMessages = reverse . sLogMessages+ defaultPState :: PState defaultPState =   PState   { sLabels = []-  , sMeta = mempty }+  , sMeta = mempty+  , sOptions = def+  , sIdentifiers = Set.empty+  , sLogMessages = [] }  type P m a = ParsecT [Content] PState m a -- state tracks a list of labels in the document
src/Text/Pandoc/SelfContained.hs view
@@ -431,7 +431,7 @@             report $ CouldNotFetchResource r ""             return $ CouldNotFetch e           PandocHttpError u er -> do-            report $ CouldNotFetchResource u (tshow er)+            report $ CouldNotFetchResource u er             return $ CouldNotFetch e           _ -> throwError e    removeQueryAndFragment = T.takeWhile (\c -> c /= '#' && c /= '?')
src/Text/Pandoc/Shared.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE BangPatterns          #-} {-# LANGUAGE CPP                   #-} {-# LANGUAGE FlexibleContexts      #-} {-# LANGUAGE MultiParamTypeClasses #-}@@ -56,6 +57,7 @@                      inlineListToIdentifier,                      textToIdentifier,                      isHeaderBlock,+                     hasLineBreaks,                      onlySimpleTableCells,                      isTightList,                      taskListItemFromAscii,@@ -90,7 +92,8 @@ import Data.Char (isAlpha, isLower, isSpace, isUpper, toLower, isAlphaNum,                   generalCategory, GeneralCategory(NonSpacingMark,                   SpacingCombiningMark, EnclosingMark, ConnectorPunctuation))-import Data.List (find, foldl', groupBy, intercalate, intersperse, union)+import Data.List (find, groupBy, intercalate, intersperse, union)+import qualified Data.List as L import qualified Data.Map as M import Data.Maybe (mapMaybe) import Data.Monoid (Any (..) )@@ -138,23 +141,27 @@ -- /not/ indices but text widths, which will be different for East Asian -- characters, emojis, etc. splitTextByIndices :: [Int] -> T.Text -> [T.Text]-splitTextByIndices ns = splitTextByRelIndices (zipWith (-) ns (0:ns)) . T.unpack+splitTextByIndices ns = splitByRelWidths (zipWith (-) ns (0:ns))  where-  splitTextByRelIndices [] cs = [T.pack cs]-  splitTextByRelIndices (x:xs) cs =-    let (first, rest) = splitAt' x cs-     in T.pack first : splitTextByRelIndices xs rest+  splitByRelWidths [] t = [t]+  splitByRelWidths (w:ws) t =+    let (first, rest) = splitAtWidth w t+     in first : splitByRelWidths ws rest --- | Returns a pair whose first element is a prefix of @t@ and that has--- width @n@, and whose second is the remainder of the string.+-- | Split a @Text@ at a given display width, where width is determined+-- by 'charWidth' (East Asian characters, emojis, etc. count as 2). -- -- Note: Do *not* replace this with 'T.splitAt', which is not sensitive -- to character widths!-splitAt' :: Int {-^ n -} -> [Char] {-^ t -} -> ([Char],[Char])-splitAt' _ []          = ([],[])-splitAt' n xs | n <= 0 = ([],xs)-splitAt' n (x:xs)      = (x:ys,zs)-  where (ys,zs) = splitAt' (n - charWidth x) xs+splitAtWidth :: Int -> T.Text -> (T.Text, T.Text)+splitAtWidth n t+  | n <= 0    = (T.empty, t)+  | otherwise = T.splitAt (go 0 0 t) t+  where+    go !idx !w t'+      | w >= n    = idx+      | T.null t' = idx+      | otherwise = go (idx + 1) (w + charWidth (T.head t')) (T.tail t')  -- -- Text processing@@ -235,20 +242,23 @@ toRomanNumeral :: Int -> T.Text toRomanNumeral x   | x >= 4000 || x < 0 = "?"-  | x >= 1000 = "M" <> toRomanNumeral (x - 1000)-  | x >= 900  = "CM" <> toRomanNumeral (x - 900)-  | x >= 500  = "D" <> toRomanNumeral (x - 500)-  | x >= 400  = "CD" <> toRomanNumeral (x - 400)-  | x >= 100  = "C" <> toRomanNumeral (x - 100)-  | x >= 90   = "XC" <> toRomanNumeral (x - 90)-  | x >= 50   = "L"  <> toRomanNumeral (x - 50)-  | x >= 40   = "XL" <> toRomanNumeral (x - 40)-  | x >= 10   = "X" <> toRomanNumeral (x - 10)-  | x == 9    = "IX"-  | x >= 5    = "V" <> toRomanNumeral (x - 5)-  | x == 4    = "IV"-  | x >= 1    = "I" <> toRomanNumeral (x - 1)-  | otherwise = ""+  | otherwise = T.pack (go x)+  where+    go n+      | n >= 1000 = 'M'       : go (n - 1000)+      | n >= 900  = 'C' : 'M' : go (n - 900)+      | n >= 500  = 'D'       : go (n - 500)+      | n >= 400  = 'C' : 'D' : go (n - 400)+      | n >= 100  = 'C'       : go (n - 100)+      | n >= 90   = 'X' : 'C' : go (n - 90)+      | n >= 50   = 'L'       : go (n - 50)+      | n >= 40   = 'X' : 'L' : go (n - 40)+      | n >= 10   = 'X'       : go (n - 10)+      | n == 9    = "IX"+      | n >= 5    = 'V'       : go (n - 5)+      | n == 4    = "IV"+      | n >= 1    = 'I'       : go (n - 1)+      | otherwise = []  -- | Convert tabs to spaces. Tabs will be preserved if tab stop is set to 0. tabFilter :: Int       -- ^ Tab stop@@ -261,7 +271,7 @@          in  if T.null s2                 then s1                 else s1 <> T.replicate-                       (tabStop - (T.length s1 `mod` tabStop)) (T.pack " ")+                       (tabStop - (T.length s1 `mod` tabStop)) " "                        <> go (T.drop 1 s2)  --@@ -407,9 +417,9 @@   let (others, final) = (init items, last items)   in  case reverse (B.toList final) of            (Para a:xs)-             | null [Para x | Para x <- xs ++ concatMap B.toList others]+             | not (any isPara xs || any (any isPara . B.toList) others)              -> others ++ [B.fromList (reverse (Plain a : xs))]-           _ | null [Para x | Para x <- concatMap B.toList items]+           _ | not (any (any isPara . B.toList) items)              -> items            _ -> map (fmap plainToPara) items @@ -559,16 +569,25 @@       | all (\case                Header level' _ _ -> level' > level                _                 -> True) ys-      , "column" `notElem` dclasses-      , "columns" `notElem` dclasses-      , "fragment" `notElem` dclasses = do+      , "section" `elem` dclasses+        || ("column" `notElem` dclasses &&+            "columns" `notElem` dclasses &&+            "fragment" `notElem` dclasses &&+            "cell" `notElem` dclasses) = do     inner <- go (Header level hattr title':ys)     rest <- go xs     return $       case inner of-            [Div divattr'@(dident',_,_) zs]-              | T.null dident || T.null dident' || dident == dident'-              -> Div (combineAttr divattr' divattr) zs : rest+            [Div divattr'@(dident',_,_) zs@(Header level' hattr' title'' : zs')]+              | dident == dident'+                -> Div (combineAttr divattr' divattr) zs : rest+              | (_,dclasses',dkvs) <- combineAttr divattr' divattr+              , ("",hclasses,hkvs) <- hattr'+                -> if T.null dident+                      then Div (dident',dclasses',dkvs) zs : rest+                      else Div (dident,dclasses',dkvs)+                             (Header level' (dident',hclasses,hkvs) title''+                               : zs') : rest             _ -> Div divattr inner : rest   go (Div attr xs : rest) = do     xs' <- go xs@@ -607,6 +626,18 @@                      x  -> x     numIdent n = baseIdent <> "-" <> tshow n +-- | True if inlines include a LineBreak (possibly embedded), with the exception+-- of line breaks in Notes.+hasLineBreaks :: [Inline] -> Bool+hasLineBreaks = getAny . query isLineBreak . walk removeNote+  where+    removeNote :: Inline -> Inline+    removeNote (Note _) = Str ""+    removeNote x        = x+    isLineBreak :: Inline -> Any+    isLineBreak LineBreak = Any True+    isLineBreak _         = Any False+ -- | True if block is a Header block. isHeaderBlock :: Block -> Bool isHeaderBlock Header{} = True@@ -641,8 +672,13 @@ taskListItemFromAscii = handleTaskListItem fromMd   where     fromMd (Str "[" : Space : Str "]" : Space : is) = Str "☐" : Space : is+    fromMd (Str "[ ]"                 : Space : is) = Str "☒" : Space : is     fromMd (Str "[x]"                 : Space : is) = Str "☒" : Space : is     fromMd (Str "[X]"                 : Space : is) = Str "☒" : Space : is+    fromMd [Str "[" , Space , Str "]"] = [Str "☐"]+    fromMd [Str "[ ]"]                 = [Str "☐"]+    fromMd [Str "[x]"]                 = [Str "☒"]+    fromMd [Str "[X]"]                 = [Str "☒"]     fromMd is = is  -- | Convert a list item containing text starting with @U+2610 BALLOT BOX@@@ -650,6 +686,10 @@ taskListItemToAscii :: Extensions -> [Block] -> [Block] taskListItemToAscii = handleTaskListItem toMd   where+    toMd [Str "☐"] = [rawMd "[ ]"]+    toMd [Str "☒"] = [rawMd "[x]"]+    toMd [Str "❏"] = [rawMd "[ ]"]+    toMd [Str "✓"] = [rawMd "[x]"]     toMd (Str "☐" : Space : is) = rawMd "[ ]" : Space : is     toMd (Str "☒" : Space : is) = rawMd "[x]" : Space : is     toMd (Str "❏" : Space : is) = rawMd "[ ]" : Space : is@@ -713,11 +753,12 @@ -- | Render HTML tags. renderTags' :: [Tag T.Text] -> T.Text renderTags' = renderTagsOptions-               renderOptions{ optMinimize = matchTags ["hr", "br", "img",-                                                       "meta", "link", "col",-                                                       "use", "path", "rect"]-                            , optRawTag   = matchTags ["script", "style"] }-              where matchTags tags = flip elem tags . T.toLower+               renderOptions{ optMinimize = \t -> T.toLower t `Set.member` minimizeTags+                            , optRawTag   = \t -> T.toLower t `Set.member` rawTags }+  where+    minimizeTags = Set.fromList ["hr","br","img","meta","link","col",+                                 "use","path","rect"]+    rawTags = Set.fromList ["script","style"]  -- -- File handling@@ -733,7 +774,7 @@ -- | Canonicalizes a file path by removing redundant @.@ and @..@. makeCanonical :: FilePath -> FilePath makeCanonical = Posix.joinPath . transformPathParts . splitDirectories- where  transformPathParts = reverse . foldl' go []+ where  transformPathParts = reverse . L.foldl' go []         go as        "."  = as         go ("..":as) ".." = ["..", ".."] <> as         go (_:as)    ".." = as@@ -749,7 +790,7 @@ -- > collapseFilePath "parent/foo/.." ==  "parent" -- > collapseFilePath "/parent/foo/../../bar" ==  "/bar" collapseFilePath :: FilePath -> FilePath-collapseFilePath = Posix.joinPath . reverse . foldl' go [] . splitDirectories+collapseFilePath = Posix.joinPath . reverse . L.foldl' go [] . splitDirectories   where     go rs "." = rs     go r@(p:rs) ".." = case p of
src/Text/Pandoc/Translations.hs view
@@ -23,7 +23,7 @@ import Text.Pandoc.Class (PandocMonad(..), toTextM, report) import Text.Pandoc.Class.CommonState (CommonState(..)) import Text.Pandoc.Data (readDataFile)-import Text.Pandoc.Error (PandocError(..))+import Data.Containers.ListUtils (nubOrd) import Text.Pandoc.Logging (LogMessage(..)) import Control.Monad.Except (catchError) import qualified Data.Text as T@@ -56,34 +56,29 @@        Nothing -> return mempty  -- no language defined        Just (_, Just t) -> return t        Just (lang, Nothing) -> do  -- read from file-         let translationFile = "translations/" <> renderLang lang <> ".yaml"-         let fallbackFile = "translations/" <> langLanguage lang <> ".yaml"-         let getTrans fp = do-               txt <- readDataFile fp >>= toTextM fp-               case readTranslations txt of-                    Left e   -> do+         let translationFiles = map (\x -> "translations/" <> T.unpack x <> ".yaml")+               (nubOrd [renderLang lang,+                      langLanguage lang <> maybe "" ("-" <>) (langScript lang),+                      langLanguage lang])+         let getTrans [] = return mempty+             getTrans (fp:fps) = do+               result <- catchError (Right <$> (readDataFile fp >>= toTextM fp))+                             (\_ -> pure (Left ""))+               case result >>= readTranslations of+                  Left e+                    | null fps -> do                       report $ CouldNotLoadTranslations (renderLang lang)-                        (T.pack fp <> ": " <> e)+                                  (T.pack fp <> ": " <> e)                       -- make sure we don't try again...                       modifyCommonState $ \st ->                         st{ stTranslations = Nothing }                       return mempty-                    Right t -> do-                      modifyCommonState $ \st ->-                                  st{ stTranslations = Just (lang, Just t) }-                      return t-         catchError (getTrans $ T.unpack translationFile)-           (\_ ->-             catchError (getTrans $ T.unpack fallbackFile)-               (\e -> do-                 report $ CouldNotLoadTranslations (renderLang lang)-                          $ case e of-                               PandocCouldNotFindDataFileError _ ->-                                 "data file " <> fallbackFile <> " not found"-                               _ -> ""-                 -- make sure we don't try again...-                 modifyCommonState $ \st -> st{ stTranslations = Nothing }-                 return mempty))+                    | otherwise -> getTrans fps+                  Right t -> do+                    modifyCommonState $ \st ->+                        st{ stTranslations = Just (lang, Just t) }+                    return t+         getTrans translationFiles  -- | Get a translation from the current term map. -- Issue a warning if the term is not defined.
src/Text/Pandoc/UTF8.hs view
@@ -8,7 +8,7 @@    Stability   : alpha    Portability : portable -UTF-8 aware string IO functions that will work with GHC 6.10, 6.12, or 7.+UTF-8 aware string IO functions. -} module Text.Pandoc.UTF8 ( readFile                         , getContents
src/Text/Pandoc/Writers.hs view
@@ -75,6 +75,7 @@     , writeTEI     , writeTexinfo     , writeTextile+    , writeTxt2Tags     , writeTypst     , writeXML     , writeXWiki@@ -135,6 +136,7 @@ import Text.Pandoc.Writers.TEI import Text.Pandoc.Writers.Texinfo import Text.Pandoc.Writers.Textile+import Text.Pandoc.Writers.Txt2Tags import Text.Pandoc.Writers.Typst import Text.Pandoc.Writers.XML import Text.Pandoc.Writers.XWiki@@ -202,6 +204,7 @@   ,("xwiki"        , TextWriter writeXWiki)   ,("zimwiki"      , TextWriter writeZimWiki)   ,("textile"      , TextWriter writeTextile)+  ,("t2t"          , TextWriter writeTxt2Tags)   ,("typst"        , TextWriter writeTypst)   ,("rtf"          , TextWriter writeRTF)   ,("org"          , TextWriter writeOrg)
src/Text/Pandoc/Writers/AsciiDoc.hs view
@@ -163,6 +163,7 @@   needsEscape '+' = True   needsEscape '`' = True   needsEscape '*' = True+  needsEscape '#' = True   needsEscape '_' = True   needsEscape '<' = True   needsEscape '>' = True@@ -593,7 +594,9 @@                                    _           -> False        isSpacy Start (Str xs)          | Just (c, _) <- T.uncons xs = isPunctuation c || isSpace c-       isSpacy _ _ = True+       isSpacy End (Link{}) = True+       isSpacy End (Image{}) = True+       isSpacy _ _ = False  setIntraword :: PandocMonad m => Bool -> ADW m () setIntraword b = modify $ \st -> st{ intraword = b }@@ -609,25 +612,27 @@   contents <- inlineListToAsciiDoc opts lst   isIntraword <- gets intraword   let marker = if isIntraword then "__" else "_"-  return $ marker <> contents <> marker+  return $ delimited marker marker contents inlineToAsciiDoc opts (Underline lst) = do   contents <- inlineListToAsciiDoc opts lst-  return $ "[.underline]#" <> contents <> "#"+  return $ delimited "[.underline]#" "#" contents inlineToAsciiDoc opts (Strong lst) = do   contents <- inlineListToAsciiDoc opts lst   isIntraword <- gets intraword   let marker = if isIntraword then "**" else "*"-  return $ marker <> contents <> marker+  return $ delimited marker marker contents inlineToAsciiDoc opts (Strikeout lst) = do   contents <- inlineListToAsciiDoc opts lst-  return $ "[line-through]#" <> contents <> "#"+  return $ delimited "[line-through]#" "#" contents inlineToAsciiDoc opts (Superscript lst) = do   contents <- inlineListToAsciiDoc opts lst-  return $ "^" <> contents <> "^"+  return $ delimited "^" "^" contents inlineToAsciiDoc opts (Subscript lst) = do   contents <- inlineListToAsciiDoc opts lst-  return $ "~" <> contents <> "~"-inlineToAsciiDoc opts (SmallCaps lst) = inlineListToAsciiDoc opts lst+  return $ delimited "~" "~" contents+inlineToAsciiDoc opts (SmallCaps lst) = do+  contents <- inlineListToAsciiDoc opts lst+  return $ delimited "[smallcaps]#" "#" contents inlineToAsciiDoc opts (Quoted qt lst) = do   isLegacy <- gets legacy   contents <- inlineListToAsciiDoc opts lst
src/Text/Pandoc/Writers/DocBook.hs view
@@ -17,7 +17,7 @@ import Data.Generics (everywhere, mkT) import Data.List (nub, partition) import Data.Maybe (isNothing)-import Data.Monoid (All (..), Any (..))+import Data.Monoid (All (..)) import Data.Text (Text) import qualified Data.Text as T import qualified Text.Pandoc.Builder as B@@ -343,16 +343,6 @@         else inTagsIndented "figure" $              inTagsSimple "title" title $$              mconcat mediaobjects--hasLineBreaks :: [Inline] -> Bool-hasLineBreaks = getAny . query isLineBreak . walk removeNote-  where-    removeNote :: Inline -> Inline-    removeNote (Note _) = Str ""-    removeNote x        = x-    isLineBreak :: Inline -> Any-    isLineBreak LineBreak = Any True-    isLineBreak _         = Any False  alignmentToString :: Alignment -> Text alignmentToString alignment = case alignment of
src/Text/Pandoc/Writers/Docx.hs view
@@ -29,726 +29,848 @@ import Control.Monad.Except (throwError) import Control.Monad.Reader ( ReaderT(runReaderT) ) import Control.Monad.State.Strict ( StateT(runStateT) )-import qualified Data.ByteString.Lazy as BL-import Data.Containers.ListUtils (nubOrd)-import Data.Char (isSpace)-import Data.List (isPrefixOf, isSuffixOf)-import Data.String (fromString)-import qualified Data.Map as M-import Data.Maybe (fromMaybe, mapMaybe, maybeToList)-import qualified Data.Set as Set-import qualified Data.Text as T-import Data.Text (Text)-import Data.Time.Clock.POSIX-import Skylighting-import Text.Pandoc.Class (PandocMonad, toLang)-import qualified Text.Pandoc.Class.PandocMonad as P-import Text.Pandoc.Data (readDataFile, readDefaultDataFile)-import Data.Time-import qualified Text.Pandoc.UTF8 as UTF8-import Text.Pandoc.Definition-import Text.Pandoc.Error-import Text.Pandoc.Highlighting (defaultStyle)-import Text.Pandoc.MIME (getMimeTypeDef)-import Text.Pandoc.Options-import Text.Pandoc.Readers.Docx.Parse (extractTarget)-import Text.Pandoc.Writers.Docx.StyleMap-import Text.Pandoc.Writers.Docx.Types-import Text.Pandoc.Writers.Docx.OpenXML (writeOpenXML, maxListLevel)-import Text.Pandoc.Shared-import Text.Pandoc.Walk-import Text.Pandoc.Writers.Shared-import Text.Pandoc.Writers.OOXML-import Text.Pandoc.XML.Light as XML-import Data.Generics (mkT, everywhere)-import Text.Collate.Lang (renderLang, Lang(..))--writeDocx :: (PandocMonad m)-          => WriterOptions  -- ^ Writer options-          -> Pandoc         -- ^ Document to convert-          -> m BL.ByteString-writeDocx opts doc = do-  let Pandoc meta blocks = walk fixDisplayMath doc-  setupTranslations meta-  let blocks' = makeSectionsWithOffsets (writerNumberOffset opts)-                   True Nothing blocks-  let doc' = Pandoc meta blocks'--  username <- P.lookupEnv "USERNAME"-  utctime <- P.getTimestamp-  oldUserDataDir <- P.getUserDataDir-  P.setUserDataDir Nothing-  res <- readDefaultDataFile "reference.docx"-  P.setUserDataDir oldUserDataDir-  let distArchive = toArchive $ BL.fromStrict res-  refArchive <- case writerReferenceDoc opts of-                     Just f  -> toArchive . BL.fromStrict . fst-                                   <$> P.fetchItem (T.pack f)-                     Nothing -> toArchive . BL.fromStrict <$>-                          readDataFile "reference.docx"--  parsedDoc <- parseXml refArchive distArchive "word/document.xml"-  let wname f qn = qPrefix qn == Just "w" && f (qName qn)-  let mbsectpr = filterElementName (wname (=="sectPr")) parsedDoc--  -- Gets the template size-  let mbpgsz = mbsectpr >>= filterElementName (wname (=="pgSz"))-  let mbAttrSzWidth = mbpgsz >>= lookupAttrBy ((=="w") . qName) . elAttribs--  let mbpgmar = mbsectpr >>= filterElementName (wname (=="pgMar"))-  let mbAttrMarLeft = mbpgmar >>= lookupAttrBy ((=="left") . qName) . elAttribs-  let mbAttrMarRight = mbpgmar >>= lookupAttrBy ((=="right") . qName) . elAttribs--  -- Get the available area (converting the size and the margins to int and-  -- doing the difference-  let pgContentWidth = do-                         w <- mbAttrSzWidth >>= safeRead-                         r <- mbAttrMarRight >>= safeRead-                         l <- mbAttrMarLeft >>= safeRead-                         pure $ w - r - l--  -- styles-  mblang <- toLang $ getLang opts meta-  -- TODO FIXME avoid this generic traversal!-  -- lang is in w:docDefaults /  w:rPr  /  w:lang-  let addLang :: Element -> Element-      addLang = case mblang of-                  Nothing -> id-                  Just l  -> everywhere (mkT (go l))-        where-          go :: Lang -> Element -> Element-          go lang e'-           | qName (elName e') == "lang"-             = if isEastAsianLang lang-                  then e'{ elAttribs =-                             map (setattr "eastAsia" (renderLang lang)) $-                             elAttribs e' }-                  else-                    if isBidiLang lang-                       then e'{ elAttribs =-                                 map (setattr "bidi" (renderLang lang)) $-                                 elAttribs e' }-                       else e'{ elAttribs =-                                 map (setattr "val" (renderLang lang)) $-                                 elAttribs e' }-           | otherwise = e'--          setattr attrname l (XML.Attr qn@(QName s _ _) _)-            | s == attrname  = XML.Attr qn l-          setattr _ _ x      = x--          isEastAsianLang Lang{ langLanguage = lang } =-             lang == "zh" || lang == "ja" || lang == "ko"-          isBidiLang Lang{ langLanguage = lang } =-             lang == "he" || lang == "ar"--  let stylepath = "word/styles.xml"-  styledoc <- addLang <$> parseXml refArchive distArchive stylepath--  -- parse styledoc for heading styles-  let styleMaps = getStyleMaps refArchive--  let tocTitle = case lookupMetaInlines "toc-title" meta of-                   [] -> stTocTitle defaultWriterState-                   ls -> ls--  let isRTLmeta = case lookupMeta "dir" meta of-        Just (MetaString "rtl")        -> True-        Just (MetaInlines [Str "rtl"]) -> True-        _                              -> False--  let env = defaultWriterEnv {-          envRTL = isRTLmeta-        , envChangesAuthor = fromMaybe "unknown" username-        , envChangesDate   = T.pack $ formatTime defaultTimeLocale "%FT%XZ" utctime-        , envPrintWidth = maybe 420 (`quot` 20) pgContentWidth-        }--  let isImageNode e = findAttr (QName "Type" Nothing Nothing) e == Just "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"-  let isHeaderNode e = findAttr (QName "Type" Nothing Nothing) e == Just "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header"-  let isFooterNode e = findAttr (QName "Type" Nothing Nothing) e == Just "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer"-  parsedRels <- filterElements-                  (\e -> isImageNode e || isHeaderNode e || isFooterNode e)-              <$> parseXml refArchive distArchive "word/_rels/document.xml.rels"-  let getRelId e =-        case findAttr (QName "Id" Nothing Nothing) e of-          Just ident -> T.stripPrefix "rId" ident >>= safeRead-          Nothing -> Nothing-  let relIds = mapMaybe getRelId parsedRels-  let maxRelId = if null relIds then 0 else maximum relIds--  let headers = filter isHeaderNode parsedRels-  let footers = filter isFooterNode parsedRels-  -- word/_rels/document.xml.rels-  let addBaseRel (url', target') (maxId, rels) =-        case [e | e <- rels-                , findAttr (QName "Target" Nothing Nothing) e ==-                   Just target'] of-          [] -> (maxId + 1, mknode "Relationship"-                            [("Type",url')-                            ,("Id","rId" <> tshow (maxId + 1))-                            ,("Target",target')] () : rels)-          _ -> (maxId, rels)--  let (newMaxRelId, baserels) = foldr addBaseRel (maxRelId, parsedRels)-                    [("http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",-                      "numbering.xml")-                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",-                      "styles.xml")-                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",-                      "settings.xml")-                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",-                      "webSettings.xml")-                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",-                      "fontTable.xml")-                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",-                      "theme/theme1.xml")-                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",-                      "footnotes.xml")-                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",-                      "comments.xml")-                    ]--  let initialSt = defaultWriterState {-          stStyleMaps  = styleMaps-        , stTocTitle   = tocTitle-        , stCurId      = newMaxRelId + 1-        }--  -- adjust contents to add sectPr from reference.docx-  let sectpr = case mbsectpr of-        Just sectpr' -> add_attrs (elAttribs sectpr') $ mknode "w:sectPr" []-                             (elChildren sectpr')-        Nothing      -> mknode "w:sectPr" []-                          [ mknode "w:footnotePr" []-                            [ mknode "w:numRestart" [("w:val","eachSect")] () ]-                          ]--  ((contents, footnotes, comments), st) <- runStateT-                         (runReaderT-                          (writeOpenXML opts{ writerWrapText = WrapNone }-                                        doc')-                          env{ envSectPr = Just sectpr })-                         initialSt-  let epochtime = floor $ utcTimeToPOSIXSeconds utctime-  let imgs = M.elems $ stImages st--  -- create entries for images in word/media/...-  let toImageEntry (_,path,_,img) = toEntry ("word/" ++ path) epochtime $ toLazy img-  let imageEntries = map toImageEntry imgs--  let stdAttributes =-            [("xmlns:w","http://schemas.openxmlformats.org/wordprocessingml/2006/main")-            ,("xmlns:m","http://schemas.openxmlformats.org/officeDocument/2006/math")-            ,("xmlns:r","http://schemas.openxmlformats.org/officeDocument/2006/relationships")-            ,("xmlns:o","urn:schemas-microsoft-com:office:office")-            ,("xmlns:v","urn:schemas-microsoft-com:vml")-            ,("xmlns:w10","urn:schemas-microsoft-com:office:word")-            ,("xmlns:a","http://schemas.openxmlformats.org/drawingml/2006/main")-            ,("xmlns:pic","http://schemas.openxmlformats.org/drawingml/2006/picture")-            ,("xmlns:wp","http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]--- -- we create [Content_Types].xml and word/_rels/document.xml.rels-  -- from scratch rather than reading from reference.docx,-  -- because Word sometimes changes these files when a reference.docx is modified,-  -- e.g. deleting the reference to footnotes.xml or removing default entries-  -- for image content types.--  -- [Content_Types].xml-  let mkOverrideNode (part', contentType') = mknode "Override"-               [("PartName", T.pack part')-               ,("ContentType", contentType')] ()-  let mkImageOverride (_, imgpath, mbMimeType, _) =-          mkOverrideNode ("/word/" <> imgpath,-                          fromMaybe "application/octet-stream" mbMimeType)-  let mkMediaOverride imgpath =-          mkOverrideNode ("/" <> imgpath, getMimeTypeDef imgpath)-  let overrides = map mkOverrideNode (-                  [("/word/webSettings.xml",-                    "application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml")-                  ,("/word/numbering.xml",-                    "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml")-                  ,("/word/settings.xml",-                    "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml")-                  ,("/word/theme/theme1.xml",-                    "application/vnd.openxmlformats-officedocument.theme+xml")-                  ,("/word/fontTable.xml",-                    "application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml")-                  ,("/docProps/app.xml",-                    "application/vnd.openxmlformats-officedocument.extended-properties+xml")-                  ,("/docProps/core.xml",-                    "application/vnd.openxmlformats-package.core-properties+xml")-                  ,("/docProps/custom.xml",-                    "application/vnd.openxmlformats-officedocument.custom-properties+xml")-                  ,("/word/styles.xml",-                    "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml")-                  ,("/word/document.xml",-                    "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml")-                  ,("/word/comments.xml",-                    "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml")-                  ,("/word/footnotes.xml",-                    "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml")-                  ] ++-                  map (\x -> (maybe "" (T.unpack . ("/word/" <>)) (extractTarget x),-                       "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml")) headers ++-                  map (\x -> (maybe "" (T.unpack . ("/word/" <>)) (extractTarget x),-                       "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml")) footers) ++-                    map mkImageOverride imgs ++-                    [ mkMediaOverride (eRelativePath e)-                        | e <- zEntries refArchive-                        , "word/media/" `isPrefixOf` eRelativePath e ]--  let mkDefaultNode (ext, mt) =-        mknode "Default" [("Extension",ext),("ContentType",mt)] ()-  let defaultnodes = map mkDefaultNode-        [("xml", "application/xml"),-         ("rels", "application/vnd.openxmlformats-package.relationships+xml"),-         ("odttf",-           "application/vnd.openxmlformats-officedocument.obfuscatedFont")]-  let contentTypesDoc = mknode "Types" [("xmlns","http://schemas.openxmlformats.org/package/2006/content-types")] $ defaultnodes ++ overrides-  let contentTypesEntry = toEntry "[Content_Types].xml" epochtime-        $ renderXml contentTypesDoc--  let toImgRel (ident,path,_,_) =  mknode "Relationship" [("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"),("Id",T.pack ident),("Target",T.pack path)] ()-  let imgrels = map toImgRel imgs-  let toLinkRel (src,ident) =  mknode "Relationship" [("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"),("Id",ident),("Target",src),("TargetMode","External") ] ()-  let linkrels = map toLinkRel $ M.toList $ stExternalLinks st-  let reldoc = mknode "Relationships" [("xmlns","http://schemas.openxmlformats.org/package/2006/relationships")] $ baserels ++ imgrels ++ linkrels-  let relEntry = toEntry "word/_rels/document.xml.rels" epochtime-        $ renderXml reldoc--  let contents' = BL.fromStrict $ UTF8.fromText contents--  -- word/document.xml-  let contentEntry = toEntry "word/document.xml" epochtime contents'--  -- footnotes-  let notes = mknode "w:footnotes" stdAttributes footnotes-  let footnotesEntry = toEntry "word/footnotes.xml" epochtime $ renderXml notes--  -- footnote rels-  let footnoteRelEntry = toEntry "word/_rels/footnotes.xml.rels" epochtime-        $ renderXml $ mknode "Relationships" [("xmlns","http://schemas.openxmlformats.org/package/2006/relationships")]-        linkrels--  -- comments-  let commentsEntry = toEntry "word/comments.xml" epochtime-        $ renderXml $ mknode "w:comments" stdAttributes comments--  -- styles--  -- We only want to inject paragraph and text properties that-  -- are not already in the style map. Note that keys in the stylemap-  -- are normalized as lowercase.-  let newDynamicParaProps = filter-        (\sty -> not $ hasStyleName sty $ smParaStyle styleMaps)-        (Set.toList $ stDynamicParaProps st)--      newDynamicTextProps = filter-        (\sty -> not $ hasStyleName sty $ smCharStyle styleMaps)-        (Set.toList $ stDynamicTextProps st)--  let newstyles = map newParaPropToOpenXml newDynamicParaProps ++-                  map newTextPropToOpenXml newDynamicTextProps ++-                  (case writerHighlightMethod opts of-                     Skylighting sty -> styleToOpenXml styleMaps sty-                     DefaultHighlighting -> styleToOpenXml styleMaps-                                              defaultStyle-                     _ -> [])-  let styledoc' = styledoc{ elContent = elContent styledoc ++-                                           map Elem newstyles }-  let styleEntry = toEntry stylepath epochtime $ renderXml styledoc'--  -- construct word/numbering.xml-  let numpath = "word/numbering.xml"-  numbering <- parseXml refArchive distArchive numpath-  let newNumElts = mkNumbering (stLists st)-  let pandocAdded e =-       case findAttrBy ((== "abstractNumId") . qName) e >>= safeRead of-         Just numid -> numid >= (990 :: Int)-         Nothing    ->-           case findAttrBy ((== "numId") . qName) e >>= safeRead of-             Just numid -> numid >= (1000 :: Int)-             Nothing    -> False-  let oldElts = filter (not . pandocAdded) $ onlyElems (elContent numbering)-  let allElts = oldElts ++ newNumElts-  let numEntry = toEntry numpath epochtime $ renderXml numbering{ elContent =-                       -- we want all the abstractNums first, then the nums,-                       -- otherwise things break:-                       [Elem e | e <- allElts-                               , qName (elName e) == "abstractNum" ] ++-                       [Elem e | e <- allElts-                               , qName (elName e) == "num" ] }--  let keywords = case lookupMeta "keywords" meta of-                       Just (MetaList xs) -> map stringify xs-                       _                  -> []--  -- docProps/core.xml-  let docPropsPath = "docProps/core.xml"-  let extraCoreProps = ["subject","lang","category","description"]-  let extraCorePropsMap = M.fromList $ zip extraCoreProps-                       ["dc:subject","dc:language","cp:category","dc:description"]-  let lookupMetaString' :: Text -> Meta -> Text-      lookupMetaString' key' meta' =-        case key' of-             "description"    -> T.intercalate "_x000d_\n" (map stringify $ lookupMetaBlocks "description" meta')-             key''            -> lookupMetaString key'' meta'--  let docProps = mknode "cp:coreProperties"-          [("xmlns:cp","http://schemas.openxmlformats.org/package/2006/metadata/core-properties")-          ,("xmlns:dc","http://purl.org/dc/elements/1.1/")-          ,("xmlns:dcterms","http://purl.org/dc/terms/")-          ,("xmlns:dcmitype","http://purl.org/dc/dcmitype/")-          ,("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance")]-          $ mktnode "dc:title" [] (stringify $ docTitle meta)-          : mktnode "dc:creator" [] (T.intercalate "; " (map stringify $ docAuthors meta))-          : [ mktnode (M.findWithDefault "" k extraCorePropsMap) [] (lookupMetaString' k meta)-            | k <- M.keys (unMeta meta), k `elem` extraCoreProps]-          ++ mknode "cp:keywords" [] (T.intercalate ", " keywords)-          : (\x -> [ mknode "dcterms:created" [("xsi:type","dcterms:W3CDTF")] x-                   , mknode "dcterms:modified" [("xsi:type","dcterms:W3CDTF")] x-                   ]) (T.pack $ formatTime defaultTimeLocale "%FT%XZ" utctime)-  let docPropsEntry = toEntry docPropsPath epochtime $ renderXml docProps--  -- docProps/custom.xml-  let customProperties :: [(Text, Text)]-      customProperties = [ (k, lookupMetaString k meta)-                         | k <- M.keys (unMeta meta)-                         , k `notElem` (["title", "author", "keywords"]-                                       ++ extraCoreProps)]-  let mkCustomProp (k, v) pid = mknode "property"-         [("fmtid","{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")-         ,("pid", tshow pid)-         ,("name", k)] $ mknode "vt:lpwstr" [] v-  let customPropsPath = "docProps/custom.xml"-  let customProps = mknode "Properties"-          [("xmlns","http://schemas.openxmlformats.org/officeDocument/2006/custom-properties")-          ,("xmlns:vt","http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")-          ] $ zipWith mkCustomProp customProperties [(2 :: Int)..]-  let customPropsEntry = toEntry customPropsPath epochtime $ renderXml customProps--  let relsPath = "_rels/.rels"-  let rels = mknode "Relationships" [("xmlns", "http://schemas.openxmlformats.org/package/2006/relationships")]-        $ map (\attrs -> mknode "Relationship" attrs ())-        [ [("Id","rId1")-          ,("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument")-          ,("Target","word/document.xml")]-        , [("Id","rId4")-          ,("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties")-          ,("Target","docProps/app.xml")]-        , [("Id","rId3")-          ,("Type","http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties")-          ,("Target","docProps/core.xml")]-        , [("Id","rId5")-          ,("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties")-          ,("Target","docProps/custom.xml")]-        ]-  let relsEntry = toEntry relsPath epochtime $ renderXml rels--  -- we use dist archive for settings.xml, because Word sometimes-  -- adds references to footnotes or endnotes we don't have...-  -- we do, however, copy some settings over from reference-  let settingsPath = "word/settings.xml"--  settingsEntry <- copyChildren refArchive distArchive settingsPath epochtime-                      -- note: these must go in the following order:-                     [ "writeProtection"-                     , "view"-                     , "zoom"-                     , "removePersonalInformation"-                     , "removeDateAndTime"-                     , "doNotDisplayPageBoundaries"-                     , "displayBackgroundShape"-                     , "printPostScriptOverText"-                     , "printFractionalCharacterWidth"-                     , "printFormsData"-                     , "embedTrueTypeFonts"-                     , "embedSystemFonts"-                     , "saveSubsetFonts"-                     , "saveFormsData"-                     , "mirrorMargins"-                     , "alignBordersAndEdges"-                     , "bordersDoNotSurroundHeader"-                     , "bordersDoNotSurroundFooter"-                     , "gutterAtTop"-                     , "hideSpellingErrors"-                     , "hideGrammaticalErrors"-                     , "activeWritingStyle"-                     , "proofState"-                     , "formsDesign"-                     , "attachedTemplate"-                     , "linkStyles"-                     , "stylePaneFormatFilter"-                     , "stylePaneSortMethod"-                     , "documentType"-                     , "mailMerge"-                     , "revisionView"-                     , "trackRevisions"-                     , "doNotTrackMoves"-                     , "doNotTrackFormatting"-                     , "documentProtection"-                     , "autoFormatOverride"-                     , "styleLockTheme"-                     , "styleLockQFSet"-                     , "defaultTabStop"-                     , "autoHyphenation"-                     , "consecutiveHyphenLimit"-                     , "hyphenationZone"-                     , "doNotHyphenateCaps"-                     , "showEnvelope"-                     , "summaryLength"-                     , "clickAndTypeStyle"-                     , "defaultTableStyle"-                     , "evenAndOddHeaders"-                     , "bookFoldRevPrinting"-                     , "bookFoldPrinting"-                     , "bookFoldPrintingSheets"-                     , "drawingGridHorizontalSpacing"-                     , "drawingGridVerticalSpacing"-                     , "displayHorizontalDrawingGridEvery"-                     , "displayVerticalDrawingGridEvery"-                     , "doNotUseMarginsForDrawingGridOrigin"-                     , "drawingGridHorizontalOrigin"-                     , "drawingGridVerticalOrigin"-                     , "doNotShadeFormData"-                     , "noPunctuationKerning"-                     , "characterSpacingControl"-                     , "printTwoOnOne"-                     , "strictFirstAndLastChars"-                     , "noLineBreaksAfter"-                     , "noLineBreaksBefore"-                     , "savePreviewPicture"-                     , "doNotValidateAgainstSchema"-                     , "saveInvalidXml"-                     , "ignoreMixedContent"-                     , "alwaysShowPlaceholderText"-                     , "doNotDemarcateInvalidXml"-                     , "saveXmlDataOnly"-                     , "useXSLTWhenSaving"-                     , "saveThroughXslt"-                     , "showXMLTags"-                     , "alwaysMergeEmptyNamespace"-                     , "updateFields"-                     , "hdrShapeDefaults"-                     -- , "footnotePr" -- this can cause problems, see #9522-                     -- , "endnotePr"-                     , "compat"-                     , "docVars"-                     , "rsids"-                     , "attachedSchema"-                     , "themeFontLang"-                     , "clrSchemeMapping"-                     , "doNotIncludeSubdocsInStats"-                     , "doNotAutoCompressPictures"-                     , "forceUpgrade"-                     , "captions"-                     , "readModeInkLockDown"-                     , "smartTagType"-                     , "shapeDefaults"-                     , "doNotEmbedSmartTags"-                     , "decimalSymbol"-                     , "listSeparator" ]--  let entryFromArchive arch path =-         maybe (throwError $ PandocSomeError-                           $ T.pack $ path ++ " missing in reference docx")-               return-               (findEntryByPath path arch `mplus` findEntryByPath path distArchive)-  docPropsAppEntry <- entryFromArchive refArchive "docProps/app.xml"-  themeEntry <- entryFromArchive refArchive "word/theme/theme1.xml"-  fontTableEntry <- entryFromArchive refArchive "word/fontTable.xml"-  let fontTableRelsEntries = maybeToList $-       findEntryByPath "word/_rels/fontTable.xml.rels" refArchive-  let fontEntries = [entry | entry <- zEntries refArchive-                           , "word/fonts/" `isPrefixOf` (eRelativePath entry)]-                        -- or parse fontTable.xml.rels?-  webSettingsEntry <- entryFromArchive refArchive "word/webSettings.xml"-  headerFooterEntries <- mapM (entryFromArchive refArchive . ("word/" ++)) $-                         mapMaybe (fmap T.unpack . extractTarget)-                         (headers ++ footers)-  let miscRelEntries = [ e | e <- zEntries refArchive-                       , "word/_rels/" `isPrefixOf` eRelativePath e-                       , ".xml.rels" `isSuffixOf` eRelativePath e-                       , eRelativePath e /= "word/_rels/document.xml.rels"-                       , eRelativePath e /= "word/_rels/footnotes.xml.rels" ]-  let otherMediaEntries = [ e | e <- zEntries refArchive-                          , "word/media/" `isPrefixOf` eRelativePath e ]--  -- Create archive-  let archive = foldr addEntryToArchive emptyArchive $-                  contentTypesEntry : relsEntry : contentEntry : relEntry :-                  footnoteRelEntry : numEntry : styleEntry : footnotesEntry :-                  commentsEntry :-                  docPropsEntry : docPropsAppEntry : customPropsEntry :-                  themeEntry :-                  settingsEntry : webSettingsEntry :-                  fontTableEntry :-                  fontTableRelsEntries ++ fontEntries ++-                  imageEntries ++ headerFooterEntries ++-                  miscRelEntries ++ otherMediaEntries-  return $ fromArchive archive--newParaPropToOpenXml :: ParaStyleName -> Element-newParaPropToOpenXml (fromStyleName -> s) =-  let styleId = T.filter (not . isSpace) s-  in mknode "w:style" [ ("w:type", "paragraph")-                      , ("w:customStyle", "1")-                      , ("w:styleId", styleId)]-     [ mknode "w:name" [("w:val", s)] ()-     , mknode "w:basedOn" [("w:val","BodyText")] ()-     , mknode "w:qFormat" [] ()-     ]--newTextPropToOpenXml :: CharStyleName -> Element-newTextPropToOpenXml (fromStyleName -> s) =-  let styleId = T.filter (not . isSpace) s-  in mknode "w:style" [ ("w:type", "character")-                      , ("w:customStyle", "1")-                      , ("w:styleId", styleId)]-     [ mknode "w:name" [("w:val", s)] ()-     , mknode "w:basedOn" [("w:val","BodyTextChar")] ()-     ]--styleToOpenXml :: StyleMaps -> Style -> [Element]-styleToOpenXml sm style =-  maybeToList parStyle ++ mapMaybe toStyle alltoktypes-  where alltoktypes = enumFromTo KeywordTok NormalTok-        toStyle toktype | hasStyleName (fromString $ show toktype) (smCharStyle sm) = Nothing-                        | otherwise = Just $-                          mknode "w:style" [("w:type","character"),-                           ("w:customStyle","1"),("w:styleId", tshow toktype)]-                             [ mknode "w:name" [("w:val", tshow toktype)] ()-                             , mknode "w:basedOn" [("w:val","VerbatimChar")] ()-                             , mknode "w:rPr" [] $-                               [ mknode "w:b" [] () | tokFeature tokenBold toktype ] ++-                               [ mknode "w:i" [] () | tokFeature tokenItalic toktype ] ++-                               [ mknode "w:color" [("w:val", tokCol toktype)] ()-                                 | tokCol toktype /= "auto" ] ++-                               [ mknode "w:u" [] () | tokFeature tokenUnderline toktype ] ++-                               [ mknode "w:shd" [("w:val","clear")-                                                ,("w:fill",tokBg toktype)] ()-                                 | tokBg toktype /= "auto" ]-                             ]-        tokStyles = tokenStyles style-        tokFeature f toktype = maybe False f $ M.lookup toktype tokStyles-        tokCol toktype = maybe "auto" (T.pack . drop 1 . fromColor)-                         $ (tokenColor =<< M.lookup toktype tokStyles)-                           `mplus` defaultColor style-        tokBg toktype = maybe "auto" (T.pack . drop 1 . fromColor)-                         $ (tokenBackground =<< M.lookup toktype tokStyles)-                           `mplus` backgroundColor style-        parStyle | hasStyleName "Source Code" (smParaStyle sm) = Nothing-                 | otherwise = Just $-                   mknode "w:style" [("w:type","paragraph"),-                           ("w:customStyle","1"),("w:styleId","SourceCode")]-                             [ mknode "w:name" [("w:val","Source Code")] ()-                             , mknode "w:basedOn" [("w:val","Normal")] ()-                             , mknode "w:link" [("w:val","VerbatimChar")] ()-                             , mknode "w:pPr" []-                               $ mknode "w:wordWrap" [("w:val","off")] ()-                               :-                         maybe [] (\col -> [mknode "w:shd" [("w:val","clear"),("w:fill", T.pack $ drop 1 $ fromColor col)] ()]) (backgroundColor style)-                             ]--copyChildren :: (PandocMonad m)-             => Archive -> Archive -> String -> Integer -> [Text] -> m Entry-copyChildren refArchive distArchive path timestamp elNames = do-  ref  <- parseXml refArchive distArchive path-  dist <- parseXml distArchive distArchive path-  els <- foldM (addEl ref dist) [] (reverse elNames)-  return $ toEntry path timestamp-         $ renderXml dist{ elContent = map cleanElem els }-  where-    addEl ref dist els name =-      case filterChildName (hasName name) ref `mplus`-             filterChildName (hasName name) dist of-        Just el -> pure (el : els)-        Nothing -> pure els-    hasName name = (== name) . qName-    cleanElem el@Element{elName=name} = Elem el{elName=name{qURI=Nothing}}---- this is the lowest number used for a list numId-baseListId :: Int-baseListId = 1000--mkNumbering :: [ListMarker] -> [Element]-mkNumbering lists =-  elts ++ zipWith mkNum lists [baseListId..(baseListId + length lists - 1)]-    where elts = map mkAbstractNum (nubOrd lists)--mkNum :: ListMarker -> Int -> Element-mkNum marker numid =-  mknode "w:num" [("w:numId",tshow numid)]-   $ mknode "w:abstractNumId" [("w:val",listMarkerToId marker)] ()-   : case marker of-       NoMarker     -> []-       BulletMarker -> []-       CheckboxMarker _ -> []-       NumberMarker _ _ start ->-          map (\lvl -> mknode "w:lvlOverride" [("w:ilvl",tshow (lvl :: Int))]-              $ mknode "w:startOverride" [("w:val",tshow start)] ())-                [0..maxListLevel]--mkAbstractNum :: ListMarker -> Element-mkAbstractNum marker =-  mknode "w:abstractNum" [("w:abstractNumId",listMarkerToId marker)]-    $ mknode "w:nsid" [("w:val", T.justifyRight 8 '0' ("A" <> listMarkerToId marker))] ()-    : mknode "w:multiLevelType" [("w:val","multilevel")] ()-    : map (mkLvl marker)-      [0..maxListLevel]--mkLvl :: ListMarker -> Int -> Element-mkLvl marker lvl =-  mknode "w:lvl" [("w:ilvl",tshow lvl)] $-    (case marker of-        NumberMarker{} -> [mknode "w:start" [("w:val",start)] ()]-        _ -> []) ++-    [ mknode "w:numFmt" [("w:val",fmt)] ()-    , mknode "w:lvlText" [("w:val", lvltxt)] ()-    , mknode "w:lvlJc" [("w:val","left")] ()-    , mknode "w:pPr" [] $-        mknode "w:ind" [ ("w:left",tshow $ lvl * step + step)-                       , ("w:hanging",tshow hang)-                       ] ()-    ] ++-    maybe [] (\font ->-                [ mknode "w:rPr" []-                  [ mknode "w:rFonts" [ ("w:ascii", font)-                                      , ("w:hAnsi", font)-                                      , ("w:cs", font)-                                      , ("w:hint", "default") ] () ]]) mbfont-    where (fmt, lvltxt, mbfont, start) =-            case marker of-                 NoMarker             -> ("bullet"," ", Nothing, "1")-                 BulletMarker         -> bulletFor lvl-                 CheckboxMarker False -> ("bullet","\9744", Nothing, "1")-                 CheckboxMarker True  -> ("bullet","\9746", Nothing, "1")-                 NumberMarker st de n -> (styleFor st lvl-                                         ,patternFor de ("%" <> tshow (lvl + 1))-                                         ,Nothing-                                         ,tshow n)-          step = 720-          hang :: Int-          hang = 360-          bulletFor 0 = ("bullet", "\xf0b7", Just "Symbol", "1") -- filled circle-          bulletFor 1 = ("bullet", "o", Just "Courier New", "1") -- open o-          bulletFor 2 = ("bullet", "\xf0a7", Just "Wingdings", "1")  -- closed box-          bulletFor x = bulletFor (x `mod` 3)-          styleFor UpperAlpha _   = "upperLetter"-          styleFor LowerAlpha _   = "lowerLetter"-          styleFor UpperRoman _   = "upperRoman"-          styleFor LowerRoman _   = "lowerRoman"-          styleFor Decimal _      = "decimal"-          styleFor DefaultStyle 0 = "decimal"-          styleFor DefaultStyle 1 = "lowerLetter"-          styleFor DefaultStyle 2 = "lowerRoman"-          styleFor DefaultStyle 3 = "decimal"-          styleFor DefaultStyle 4 = "lowerLetter"-          styleFor DefaultStyle 5 = "lowerRoman"-          styleFor DefaultStyle x = styleFor DefaultStyle (x `mod` 6)-          styleFor _ _            = "decimal"-          patternFor OneParen s  = s <> ")"-          patternFor TwoParens s = "(" <> s <> ")"-          patternFor _ s         = s <> "."+import qualified Data.ByteString as B+import qualified Data.ByteString.Lazy as BL+import Data.Containers.ListUtils (nubOrd)+import Data.Char (isSpace)+import Data.List (isPrefixOf, isSuffixOf)+import Data.String (fromString)+import qualified Data.Map as M+import Data.Maybe (fromMaybe, mapMaybe, maybeToList)+import qualified Data.Set as Set+import qualified Data.Text as T+import Data.Text (Text)+import Data.Time.Clock.POSIX+import Skylighting+import Text.Pandoc.Class (PandocMonad, toLang)+import qualified Text.Pandoc.Class.PandocMonad as P+import Text.Pandoc.Data (readDataFile, readDefaultDataFile)+import Data.Time+import qualified Text.Pandoc.UTF8 as UTF8+import Text.Pandoc.Definition+import Text.Pandoc.Error+import Text.Pandoc.Highlighting (defaultStyle)+import Text.Pandoc.MIME (MimeType, getMimeTypeDef)+import Text.Pandoc.Options+import Text.Pandoc.Writers.Docx.StyleMap+import Text.Pandoc.Writers.Docx.Types+import Text.Pandoc.Writers.Docx.OpenXML (writeOpenXML, maxListLevel)+import Text.Pandoc.Shared+import Text.Pandoc.Walk+import Text.Pandoc.Writers.Shared+import Text.Pandoc.Writers.OOXML+import Text.Pandoc.XML.Light as XML+import Text.Collate.Lang (renderLang, Lang(..))++writeDocx :: (PandocMonad m)+          => WriterOptions  -- ^ Writer options+          -> Pandoc         -- ^ Document to convert+          -> m BL.ByteString+writeDocx opts doc = do+  -- Phase 1: Document preprocessing+  let Pandoc meta blocks = walk fixDisplayMath doc+  setupTranslations meta+  let blocks' = makeSectionsWithOffsets (writerNumberOffset opts)+                   True Nothing blocks+  let doc' = Pandoc meta blocks'++  -- Phase 2: Archive loading+  (refArchive, distArchive, username, utctime) <- loadArchives opts+  let epochtime = floor $ utcTimeToPOSIXSeconds utctime++  -- Phase 3: Page layout extraction+  (mbsectpr, pgContentWidth) <- extractPageLayout refArchive distArchive++  -- Phase 4: Language & style setup+  mblang <- toLang $ getLang opts meta+  let addLang = mkLangTransformer mblang+  styledoc <- addLang <$> parseXml refArchive distArchive "word/styles.xml"+  let styleMaps = getStyleMaps refArchive++  let tocTitle = case lookupMetaInlines "toc-title" meta of+                   [] -> stTocTitle defaultWriterState+                   ls -> ls++  let isRTLmeta = case lookupMeta "dir" meta of+        Just (MetaString "rtl")        -> True+        Just (MetaInlines [Str "rtl"]) -> True+        _                              -> False++  let env = defaultWriterEnv {+          envRTL = isRTLmeta+        , envChangesAuthor = fromMaybe "unknown" username+        , envChangesDate   = T.pack $ formatTime defaultTimeLocale "%FT%XZ" utctime+        , envPrintWidth = maybe 420 (`quot` 20) pgContentWidth+        }++  -- Phase 5: Relationship extraction+  (baserels, headers, footers, newMaxRelId) <- extractRelationships refArchive distArchive++  let initialSt = defaultWriterState {+          stStyleMaps  = styleMaps+        , stTocTitle   = tocTitle+        , stCurId      = newMaxRelId + 1+        }++  -- Phase 6: Core content generation+  -- adjust contents to add sectPr from reference.docx+  let sectpr = case mbsectpr of+        Just sectpr' -> setWmlPrefix sectpr'+        Nothing      -> mknode "w:sectPr" []+                          [ mknode "w:footnotePr" []+                            [ mknode "w:numRestart" [("w:val","eachSect")] () ]+                          ]++  ((contents, footnotes, comments), st) <- runStateT+                         (runReaderT+                          (writeOpenXML opts{ writerWrapText = WrapNone }+                                        doc')+                          env{ envSectPr = Just sectpr })+                         initialSt+  let imgs = M.elems $ stImages st++  -- Phase 7: XML document construction+  -- We create [Content_Types].xml and word/_rels/document.xml.rels+  -- from scratch rather than reading from reference.docx,+  -- because Word sometimes changes these files when a reference.docx is modified,+  -- e.g. deleting the reference to footnotes.xml or removing default entries+  -- for image content types.+  let contentTypesEntry = mkContentTypesEntry epochtime imgs headers footers refArchive+  let relEntry = mkDocumentRelsEntry epochtime baserels imgs (stExternalLinks st)+  let contentEntry = toEntry "word/document.xml" epochtime+                       (BL.fromStrict $ UTF8.fromText contents)+  let footnotesEntry = mkFootnotesEntry epochtime footnotes+  let footnoteRelEntry = mkFootnoteRelsEntry epochtime (stExternalLinks st)+  let commentsEntry = mkCommentsEntry epochtime comments+  let styleEntry = mkStylesEntry epochtime styledoc styleMaps st opts+  numEntry <- mkNumberingEntry refArchive distArchive epochtime (stLists st)+  let docPropsEntry = mkCorePropsEntry epochtime utctime meta+  let customPropsEntry = mkCustomPropsEntry epochtime meta+  let relsEntry = mkPackageRelsEntry epochtime++  -- we use dist archive for settings.xml, because Word sometimes+  -- adds references to footnotes or endnotes we don't have...+  -- we do, however, copy some settings over from reference+  settingsEntry <- copyChildren refArchive distArchive "word/settings.xml"+                     epochtime settingsElementNames++  -- Phase 8: Archive assembly+  let toImageEntry (_, path, _, img) = toEntry ("word/" ++ path) epochtime $ toLazy img+  let imageEntries = map toImageEntry imgs++  refEntries <- collectReferenceEntries refArchive distArchive headers footers++  let archive = foldr addEntryToArchive emptyArchive $+                  contentTypesEntry : relsEntry : contentEntry : relEntry :+                  footnoteRelEntry : numEntry : styleEntry : footnotesEntry :+                  commentsEntry :+                  docPropsEntry : customPropsEntry :+                  settingsEntry :+                  imageEntries ++ refEntries+  return $ fromArchive archive++newParaPropToOpenXml :: ParaStyleName -> Element+newParaPropToOpenXml (fromStyleName -> s) =+  let styleId = T.filter (not . isSpace) s+  in mknode "w:style" [ ("w:type", "paragraph")+                      , ("w:customStyle", "1")+                      , ("w:styleId", styleId)]+     [ mknode "w:name" [("w:val", s)] ()+     , mknode "w:basedOn" [("w:val","BodyText")] ()+     , mknode "w:qFormat" [] ()+     ]++newTextPropToOpenXml :: CharStyleName -> Element+newTextPropToOpenXml (fromStyleName -> s) =+  let styleId = T.filter (not . isSpace) s+  in mknode "w:style" [ ("w:type", "character")+                      , ("w:customStyle", "1")+                      , ("w:styleId", styleId)]+     [ mknode "w:name" [("w:val", s)] ()+     , mknode "w:basedOn" [("w:val","BodyTextChar")] ()+     ]++styleToOpenXml :: StyleMaps -> Style -> [Element]+styleToOpenXml sm style =+  maybeToList parStyle ++ mapMaybe toStyle alltoktypes+  where alltoktypes = enumFromTo KeywordTok NormalTok+        toStyle toktype | hasStyleName (fromString $ show toktype) (smCharStyle sm) = Nothing+                        | otherwise = Just $+                          mknode "w:style" [("w:type","character"),+                           ("w:customStyle","1"),("w:styleId", tshow toktype)]+                             [ mknode "w:name" [("w:val", tshow toktype)] ()+                             , mknode "w:basedOn" [("w:val","VerbatimChar")] ()+                             , mknode "w:rPr" [] $+                               [ mknode "w:b" [] () | tokFeature tokenBold toktype ] +++                               [ mknode "w:i" [] () | tokFeature tokenItalic toktype ] +++                               [ mknode "w:color" [("w:val", tokCol toktype)] ()+                                 | tokCol toktype /= "auto" ] +++                               [ mknode "w:u" [] () | tokFeature tokenUnderline toktype ] +++                               [ mknode "w:shd" [("w:val","clear")+                                                ,("w:fill",tokBg toktype)] ()+                                 | tokBg toktype /= "auto" ]+                             ]+        tokStyles = tokenStyles style+        tokFeature f toktype = maybe False f $ M.lookup toktype tokStyles+        tokCol toktype = maybe "auto" (T.pack . drop 1 . fromColor)+                         $ (tokenColor =<< M.lookup toktype tokStyles)+                           `mplus` defaultColor style+        tokBg toktype = maybe "auto" (T.pack . drop 1 . fromColor)+                         $ (tokenBackground =<< M.lookup toktype tokStyles)+                           `mplus` backgroundColor style+        parStyle | hasStyleName "Source Code" (smParaStyle sm) = Nothing+                 | otherwise = Just $+                   mknode "w:style" [("w:type","paragraph"),+                           ("w:customStyle","1"),("w:styleId","SourceCode")]+                             [ mknode "w:name" [("w:val","Source Code")] ()+                             , mknode "w:basedOn" [("w:val","Normal")] ()+                             , mknode "w:link" [("w:val","VerbatimChar")] ()+                             , mknode "w:pPr" []+                               $ mknode "w:wordWrap" [("w:val","off")] ()+                               :+                         maybe [] (\col -> [mknode "w:shd" [("w:val","clear"),("w:fill", T.pack $ drop 1 $ fromColor col)] ()]) (backgroundColor style)+                             ]++copyChildren :: (PandocMonad m)+             => Archive -> Archive -> String -> Integer -> [Text] -> m Entry+copyChildren refArchive distArchive path timestamp elNames = do+  ref  <- parseXml refArchive distArchive path+  dist <- parseXml distArchive distArchive path+  els <- foldM (addEl ref dist) [] (reverse elNames)+  return $ toEntry path timestamp+         $ renderXml dist{ elContent = map cleanElem els }+  where+    addEl ref dist els name =+      case filterChildName (hasName name) ref `mplus`+             filterChildName (hasName name) dist of+        Just el -> pure (el : els)+        Nothing -> pure els+    hasName name = (== name) . qName+    cleanElem el@Element{elName=name} = Elem el{elName=name{qURI=Nothing}}++-- this is the lowest number used for a list numId+baseListId :: Int+baseListId = 1000++-- | Standard XML namespace attributes for docx elements+stdAttributes :: [(Text, Text)]+stdAttributes =+  [("xmlns:w","http://schemas.openxmlformats.org/wordprocessingml/2006/main")+  ,("xmlns:m","http://schemas.openxmlformats.org/officeDocument/2006/math")+  ,("xmlns:r","http://schemas.openxmlformats.org/officeDocument/2006/relationships")+  ,("xmlns:o","urn:schemas-microsoft-com:office:office")+  ,("xmlns:v","urn:schemas-microsoft-com:vml")+  ,("xmlns:w10","urn:schemas-microsoft-com:office:word")+  ,("xmlns:a","http://schemas.openxmlformats.org/drawingml/2006/main")+  ,("xmlns:pic","http://schemas.openxmlformats.org/drawingml/2006/picture")+  ,("xmlns:wp","http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]++-- | Settings elements to copy from reference.docx (order matters)+settingsElementNames :: [Text]+settingsElementNames =+  [ "writeProtection"+  , "view"+  , "zoom"+  , "removePersonalInformation"+  , "removeDateAndTime"+  , "doNotDisplayPageBoundaries"+  , "displayBackgroundShape"+  , "printPostScriptOverText"+  , "printFractionalCharacterWidth"+  , "printFormsData"+  , "embedTrueTypeFonts"+  , "embedSystemFonts"+  , "saveSubsetFonts"+  , "saveFormsData"+  , "mirrorMargins"+  , "alignBordersAndEdges"+  , "bordersDoNotSurroundHeader"+  , "bordersDoNotSurroundFooter"+  , "gutterAtTop"+  , "hideSpellingErrors"+  , "hideGrammaticalErrors"+  , "activeWritingStyle"+  , "proofState"+  , "formsDesign"+  , "attachedTemplate"+  , "linkStyles"+  , "stylePaneFormatFilter"+  , "stylePaneSortMethod"+  , "documentType"+  , "mailMerge"+  , "revisionView"+  , "trackRevisions"+  , "doNotTrackMoves"+  , "doNotTrackFormatting"+  , "documentProtection"+  , "autoFormatOverride"+  , "styleLockTheme"+  , "styleLockQFSet"+  , "defaultTabStop"+  , "autoHyphenation"+  , "consecutiveHyphenLimit"+  , "hyphenationZone"+  , "doNotHyphenateCaps"+  , "showEnvelope"+  , "summaryLength"+  , "clickAndTypeStyle"+  , "defaultTableStyle"+  , "evenAndOddHeaders"+  , "bookFoldRevPrinting"+  , "bookFoldPrinting"+  , "bookFoldPrintingSheets"+  , "drawingGridHorizontalSpacing"+  , "drawingGridVerticalSpacing"+  , "displayHorizontalDrawingGridEvery"+  , "displayVerticalDrawingGridEvery"+  , "doNotUseMarginsForDrawingGridOrigin"+  , "drawingGridHorizontalOrigin"+  , "drawingGridVerticalOrigin"+  , "doNotShadeFormData"+  , "noPunctuationKerning"+  , "characterSpacingControl"+  , "printTwoOnOne"+  , "strictFirstAndLastChars"+  , "noLineBreaksAfter"+  , "noLineBreaksBefore"+  , "savePreviewPicture"+  , "doNotValidateAgainstSchema"+  , "saveInvalidXml"+  , "ignoreMixedContent"+  , "alwaysShowPlaceholderText"+  , "doNotDemarcateInvalidXml"+  , "saveXmlDataOnly"+  , "useXSLTWhenSaving"+  , "saveThroughXslt"+  , "showXMLTags"+  , "alwaysMergeEmptyNamespace"+  , "updateFields"+  , "hdrShapeDefaults"+  -- , "footnotePr" -- this can cause problems, see #9522+  -- , "endnotePr"+  , "compat"+  , "docVars"+  , "rsids"+  , "attachedSchema"+  , "themeFontLang"+  , "clrSchemeMapping"+  , "doNotIncludeSubdocsInStats"+  , "doNotAutoCompressPictures"+  , "forceUpgrade"+  , "captions"+  , "readModeInkLockDown"+  , "smartTagType"+  , "shapeDefaults"+  , "doNotEmbedSmartTags"+  , "decimalSymbol"+  , "listSeparator" ]++mkNumbering :: [ListMarker] -> [Element]+mkNumbering lists =+  elts ++ zipWith mkNum lists [baseListId..(baseListId + length lists - 1)]+    where elts = map mkAbstractNum (nubOrd lists)++mkNum :: ListMarker -> Int -> Element+mkNum marker numid =+  mknode "w:num" [("w:numId",tshow numid)]+   $ mknode "w:abstractNumId" [("w:val",listMarkerToId marker)] ()+   : case marker of+       NoMarker     -> []+       BulletMarker -> []+       CheckboxMarker _ -> []+       NumberMarker _ _ start ->+          map (\lvl -> mknode "w:lvlOverride" [("w:ilvl",tshow (lvl :: Int))]+              $ mknode "w:startOverride" [("w:val",tshow start)] ())+                [0..maxListLevel]++mkAbstractNum :: ListMarker -> Element+mkAbstractNum marker =+  mknode "w:abstractNum" [("w:abstractNumId",listMarkerToId marker)]+    $ mknode "w:nsid" [("w:val", T.justifyRight 8 '0' ("A" <> listMarkerToId marker))] ()+    : mknode "w:multiLevelType" [("w:val","multilevel")] ()+    : map (mkLvl marker)+      [0..maxListLevel]++mkLvl :: ListMarker -> Int -> Element+mkLvl marker lvl =+  mknode "w:lvl" [("w:ilvl",tshow lvl)] $+    (case marker of+        NumberMarker{} -> [mknode "w:start" [("w:val",start)] ()]+        _ -> []) +++    [ mknode "w:numFmt" [("w:val",fmt)] ()+    , mknode "w:lvlText" [("w:val", lvltxt)] ()+    , mknode "w:lvlJc" [("w:val","left")] ()+    , mknode "w:pPr" [] $+        mknode "w:ind" [ ("w:left",tshow $ lvl * step + step)+                       , ("w:hanging",tshow hang)+                       ] ()+    ] +++    maybe [] (\font ->+                [ mknode "w:rPr" []+                  [ mknode "w:rFonts" [ ("w:ascii", font)+                                      , ("w:hAnsi", font)+                                      , ("w:cs", font)+                                      , ("w:hint", "default") ] () ]]) mbfont+    where (fmt, lvltxt, mbfont, start) =+            case marker of+                 NoMarker             -> ("bullet"," ", Nothing, "1")+                 BulletMarker         -> bulletFor lvl+                 CheckboxMarker False -> ("bullet","\9744", Nothing, "1")+                 CheckboxMarker True  -> ("bullet","\9746", Nothing, "1")+                 NumberMarker st de n -> (styleFor st lvl+                                         ,patternFor de ("%" <> tshow (lvl + 1))+                                         ,Nothing+                                         ,tshow n)+          step = 720+          hang :: Int+          hang = 360+          bulletFor 0 = ("bullet", "\xf0b7", Just "Symbol", "1") -- filled circle+          bulletFor 1 = ("bullet", "o", Just "Courier New", "1") -- open o+          bulletFor 2 = ("bullet", "\xf0a7", Just "Wingdings", "1")  -- closed box+          bulletFor x = bulletFor (x `mod` 3)+          styleFor UpperAlpha _   = "upperLetter"+          styleFor LowerAlpha _   = "lowerLetter"+          styleFor UpperRoman _   = "upperRoman"+          styleFor LowerRoman _   = "lowerRoman"+          styleFor Decimal _      = "decimal"+          styleFor DefaultStyle 0 = "decimal"+          styleFor DefaultStyle 1 = "lowerLetter"+          styleFor DefaultStyle 2 = "lowerRoman"+          styleFor DefaultStyle 3 = "decimal"+          styleFor DefaultStyle 4 = "lowerLetter"+          styleFor DefaultStyle 5 = "lowerRoman"+          styleFor DefaultStyle x = styleFor DefaultStyle (x `mod` 6)+          styleFor _ _            = "decimal"+          patternFor OneParen s  = s <> ")"+          patternFor TwoParens s = "(" <> s <> ")"+          patternFor _ s         = s <> "."++-- | Build language transformer function for modifying XML elements.+-- Navigates directly to w:docDefaults/w:rPr/w:lang instead of generic traversal.+mkLangTransformer :: Maybe Lang -> (Element -> Element)+mkLangTransformer Nothing  = id+mkLangTransformer (Just lang) = modifyAtPath path updateLangAttrs+  where+    -- Path is: w:docDefaults / w:rPrDefault / w:rPr / w:lang+    path = [named "docDefaults", named "rPrDefault", named "rPr", named "lang"]+    named n = (== n) . qName++    updateLangAttrs e+      | isEastAsianLang lang = e{ elAttribs = map (setattr "eastAsia") $ elAttribs e }+      | isBidiLang lang      = e{ elAttribs = map (setattr "bidi") $ elAttribs e }+      | otherwise            = e{ elAttribs = map (setattr "val") $ elAttribs e }++    setattr attrname (XML.Attr qn@(QName s _ _) _)+      | s == attrname  = XML.Attr qn (renderLang lang)+    setattr _ x        = x++    isEastAsianLang Lang{ langLanguage = l } = l == "zh" || l == "ja" || l == "ko"+    isBidiLang Lang{ langLanguage = l } = l == "he" || l == "ar"++-- | Modify an element at a specific path in the XML tree.+-- The path is a list of predicates that match element names at each level.+modifyAtPath :: [(QName -> Bool)] -> (Element -> Element) -> Element -> Element+modifyAtPath [] f e = f e+modifyAtPath (p:ps) f e = e{ elContent = map go (elContent e) }+  where+    go (Elem el) | p (elName el) = Elem (modifyAtPath ps f el)+    go c = c++setWmlPrefix :: Element -> Element+setWmlPrefix el =+  add_attrs (map fixWmlAttr (elAttribs el)) $+    mknode "w:sectPr" [] (map fixWmlChild (elChildren el))+  where+    fixWmlAttr attr = attr{ attrKey = fixWmlQName (attrKey attr) }+    fixWmlQName qn+      | isWmlNamespace qn = qn{ qPrefix = Just "w" }+      | otherwise = qn+    fixWmlChild e+      | qPrefix (elName e) /= Just "w"+      , isWmlNamespace (elName e) =+          e{ elName = fixWmlQName (elName e)+           , elAttribs = map fixWmlAttr (elAttribs e) }+      | otherwise = e++-- | Load reference and distribution archives+loadArchives :: PandocMonad m+             => WriterOptions+             -> m (Archive, Archive, Maybe Text, UTCTime)+loadArchives opts = do+  username <- P.lookupEnv "USERNAME"+  utctime <- P.getTimestamp+  oldUserDataDir <- P.getUserDataDir+  P.setUserDataDir Nothing+  res <- readDefaultDataFile "reference.docx"+  P.setUserDataDir oldUserDataDir+  let distArchive = toArchive $ BL.fromStrict res+  refArchive <- case writerReferenceDoc opts of+                   Just f  -> toArchive . BL.fromStrict . fst+                                 <$> P.fetchItem (T.pack f)+                   Nothing -> toArchive . BL.fromStrict <$>+                        readDataFile "reference.docx"+  return (refArchive, distArchive, username, utctime)++isWmlNamespace :: QName -> Bool+isWmlNamespace qn =+  qURI qn == Just+    "http://schemas.openxmlformats.org/wordprocessingml/2006/main" ||+  qURI qn == Just "http://purl.oclc.org/ooxml/wordprocessingml/main"++-- | Extract page dimensions from template+extractPageLayout :: PandocMonad m+                  => Archive -> Archive -> m (Maybe Element, Maybe Integer)+extractPageLayout refArchive distArchive = do+  parsedDoc <- parseXml refArchive distArchive "word/document.xml"+  let wname f qn = isWmlNamespace qn && f (qName qn)+  let mbsectpr = filterElementName (wname (=="sectPr")) parsedDoc++  -- Gets the template size+  let mbpgsz = mbsectpr >>= filterElementName (wname (=="pgSz"))+  let mbAttrSzWidth = mbpgsz >>= lookupAttrBy ((=="w") . qName) . elAttribs++  let mbpgmar = mbsectpr >>= filterElementName (wname (=="pgMar"))+  let mbAttrMarLeft = mbpgmar >>= lookupAttrBy ((=="left") . qName) . elAttribs+  let mbAttrMarRight = mbpgmar >>= lookupAttrBy ((=="right") . qName) . elAttribs++  -- Get the available area (converting the size and the margins to int and+  -- doing the difference+  let pgContentWidth = do+                         w <- mbAttrSzWidth >>= safeRead+                         r <- mbAttrMarRight >>= safeRead+                         l <- mbAttrMarLeft >>= safeRead+                         pure $ w - r - l++  return (mbsectpr, pgContentWidth)++-- | Parse and augment relationships from reference.docx+extractRelationships :: PandocMonad m+                     => Archive -> Archive+                     -> m ([Element], [Element], [Element], Int)+extractRelationships refArchive distArchive = do+  let isImageNode e = findAttr (QName "Type" Nothing Nothing) e == Just "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"+  let isHeaderNode e = findAttr (QName "Type" Nothing Nothing) e == Just "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header"+  let isFooterNode e = findAttr (QName "Type" Nothing Nothing) e == Just "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer"+  parsedRels <- filterElements+                  (\e -> isImageNode e || isHeaderNode e || isFooterNode e)+              <$> parseXml refArchive distArchive "word/_rels/document.xml.rels"+  let getRelId e =+        case findAttr (QName "Id" Nothing Nothing) e of+          Just ident -> T.stripPrefix "rId" ident >>= safeRead+          Nothing -> Nothing+  let relIds = mapMaybe getRelId parsedRels+  let maxRelId = if null relIds then 0 else maximum relIds++  let headers = filter isHeaderNode parsedRels+  let footers = filter isFooterNode parsedRels+  -- word/_rels/document.xml.rels+  let addBaseRel (url', target') (maxId, rels) =+        case [e | e <- rels+                , findAttr (QName "Target" Nothing Nothing) e ==+                   Just target'] of+          [] -> (maxId + 1, mknode "Relationship"+                            [("Type",url')+                            ,("Id","rId" <> tshow (maxId + 1))+                            ,("Target",target')] () : rels)+          _ -> (maxId, rels)++  let (newMaxRelId, baserels) = foldr addBaseRel (maxRelId, parsedRels)+                    [("http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",+                      "numbering.xml")+                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",+                      "styles.xml")+                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",+                      "settings.xml")+                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",+                      "webSettings.xml")+                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",+                      "fontTable.xml")+                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",+                      "theme/theme1.xml")+                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",+                      "footnotes.xml")+                    ,("http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",+                      "comments.xml")+                    ]++  return (baserels, headers, footers, newMaxRelId)++-- | Create footnotes XML entry+mkFootnotesEntry :: Integer -> [Element] -> Entry+mkFootnotesEntry epochtime footnotes =+  let notes = mknode "w:footnotes" stdAttributes footnotes+  in toEntry "word/footnotes.xml" epochtime $ renderXml notes++-- | Create footnote relationships entry+mkFootnoteRelsEntry :: Integer -> M.Map Text Text -> Entry+mkFootnoteRelsEntry epochtime externalLinks =+  let linkrels = map toLinkRel $ M.toList externalLinks+      toLinkRel (src, ident) = mknode "Relationship"+        [("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink")+        ,("Id",ident)+        ,("Target",src)+        ,("TargetMode","External")] ()+  in toEntry "word/_rels/footnotes.xml.rels" epochtime+       $ renderXml $ mknode "Relationships"+           [("xmlns","http://schemas.openxmlformats.org/package/2006/relationships")]+           linkrels++-- | Create comments XML entry+mkCommentsEntry :: Integer -> [Element] -> Entry+mkCommentsEntry epochtime comments =+  toEntry "word/comments.xml" epochtime+    $ renderXml $ mknode "w:comments" stdAttributes comments++-- | Create package-level relationships entry+mkPackageRelsEntry :: Integer -> Entry+mkPackageRelsEntry epochtime =+  let rels = mknode "Relationships"+        [("xmlns", "http://schemas.openxmlformats.org/package/2006/relationships")]+        $ map (\attrs -> mknode "Relationship" attrs ())+        [ [("Id","rId1")+          ,("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument")+          ,("Target","word/document.xml")]+        , [("Id","rId4")+          ,("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties")+          ,("Target","docProps/app.xml")]+        , [("Id","rId3")+          ,("Type","http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties")+          ,("Target","docProps/core.xml")]+        , [("Id","rId5")+          ,("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties")+          ,("Target","docProps/custom.xml")]+        ]+  in toEntry "_rels/.rels" epochtime $ renderXml rels++-- | Create content types manifest entry+mkContentTypesEntry :: Integer+                    -> [(String, String, Maybe MimeType, B.ByteString)]  -- imgs+                    -> [Element]  -- headers+                    -> [Element]  -- footers+                    -> Archive    -- refArchive+                    -> Entry+mkContentTypesEntry epochtime imgs headers footers refArchive =+  let mkOverrideNode (part', contentType') = mknode "Override"+           [("PartName", T.pack part')+           ,("ContentType", contentType')] ()+      mkImageOverride (_, imgpath, mbMimeType, _) =+          mkOverrideNode ("/word/" <> imgpath,+                          fromMaybe "application/octet-stream" mbMimeType)+      mkMediaOverride imgpath =+          mkOverrideNode ("/" <> imgpath, getMimeTypeDef imgpath)+      unrelativize ('/':xs) = '/':xs+      unrelativize xs = "/word/" ++ xs+      overrides = map mkOverrideNode (+                  [("/word/webSettings.xml",+                    "application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml")+                  ,("/word/numbering.xml",+                    "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml")+                  ,("/word/settings.xml",+                    "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml")+                  ,("/word/theme/theme1.xml",+                    "application/vnd.openxmlformats-officedocument.theme+xml")+                  ,("/word/fontTable.xml",+                    "application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml")+                  ,("/docProps/app.xml",+                    "application/vnd.openxmlformats-officedocument.extended-properties+xml")+                  ,("/docProps/core.xml",+                    "application/vnd.openxmlformats-package.core-properties+xml")+                  ,("/docProps/custom.xml",+                    "application/vnd.openxmlformats-officedocument.custom-properties+xml")+                  ,("/word/styles.xml",+                    "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml")+                  ,("/word/document.xml",+                    "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml")+                  ,("/word/comments.xml",+                    "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml")+                  ,("/word/footnotes.xml",+                    "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml")+                  ] +++                  map (\x -> (maybe "" (unrelativize . T.unpack) (extractTarget x),+                       "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml")) headers +++                  map (\x -> (maybe "" (unrelativize . T.unpack) (extractTarget x),+                       "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml")) footers) +++                    map mkImageOverride imgs +++                    [ mkMediaOverride (eRelativePath e)+                        | e <- zEntries refArchive+                        , "word/media/" `isPrefixOf` eRelativePath e+                        , not ("/" `isSuffixOf` eRelativePath e) ]+      mkDefaultNode (ext, mt) =+        mknode "Default" [("Extension",ext),("ContentType",mt)] ()+      defaultnodes = map mkDefaultNode+        [("xml", "application/xml"),+         ("rels", "application/vnd.openxmlformats-package.relationships+xml"),+         ("odttf",+           "application/vnd.openxmlformats-officedocument.obfuscatedFont")]+      contentTypesDoc = mknode "Types"+        [("xmlns","http://schemas.openxmlformats.org/package/2006/content-types")]+        $ defaultnodes ++ overrides+  in toEntry "[Content_Types].xml" epochtime $ renderXml contentTypesDoc++-- | Create document relationships entry+mkDocumentRelsEntry :: Integer+                    -> [Element]  -- baserels+                    -> [(String, String, Maybe MimeType, B.ByteString)]  -- imgs+                    -> M.Map Text Text  -- externalLinks+                    -> Entry+mkDocumentRelsEntry epochtime baserels imgs externalLinks =+  let toImgRel (ident, path, _, _) = mknode "Relationship"+        [("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/image")+        ,("Id",T.pack ident)+        ,("Target",T.pack path)] ()+      imgrels = map toImgRel imgs+      toLinkRel (src, ident) = mknode "Relationship"+        [("Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink")+        ,("Id",ident)+        ,("Target",src)+        ,("TargetMode","External")] ()+      linkrels = map toLinkRel $ M.toList externalLinks+      reldoc = mknode "Relationships"+        [("xmlns","http://schemas.openxmlformats.org/package/2006/relationships")]+        $ baserels ++ imgrels ++ linkrels+  in toEntry "word/_rels/document.xml.rels" epochtime $ renderXml reldoc++-- | Create styles entry with dynamic additions+mkStylesEntry :: Integer -> Element -> StyleMaps -> WriterState -> WriterOptions -> Entry+mkStylesEntry epochtime styledoc styleMaps st opts =+  let stylepath = "word/styles.xml"+      -- We only want to inject paragraph and text properties that+      -- are not already in the style map. Note that keys in the stylemap+      -- are normalized as lowercase.+      newDynamicParaProps = filter+        (\sty -> not $ hasStyleName sty $ smParaStyle styleMaps)+        (Set.toList $ stDynamicParaProps st)++      newDynamicTextProps = filter+        (\sty -> not $ hasStyleName sty $ smCharStyle styleMaps)+        (Set.toList $ stDynamicTextProps st)++      newstyles = map newParaPropToOpenXml newDynamicParaProps +++                  map newTextPropToOpenXml newDynamicTextProps +++                  (case writerHighlightMethod opts of+                     Skylighting sty -> styleToOpenXml styleMaps sty+                     DefaultHighlighting -> styleToOpenXml styleMaps+                                              defaultStyle+                     _ -> [])+      styledoc' = styledoc{ elContent = elContent styledoc +++                                           map Elem newstyles }+  in toEntry stylepath epochtime $ renderXml styledoc'++-- | Create core document properties entry+mkCorePropsEntry :: Integer -> UTCTime -> Meta -> Entry+mkCorePropsEntry epochtime utctime meta =+  let metaValueToText (MetaString s)    = s+      metaValueToText (MetaInlines ils) = stringify ils+      metaValueToText (MetaBlocks bs)   = stringify bs+      metaValueToText (MetaBool b)      = T.pack (show b)+      metaValueToText _                 = ""+      keywords = case lookupMeta "keywords" meta of+                       Just (MetaList xs) -> map metaValueToText xs+                       _                  -> []+      docPropsPath = "docProps/core.xml"+      extraCoreProps = ["subject","lang","category","description"]+      extraCorePropsMap = M.fromList $ zip extraCoreProps+                       ["dc:subject","dc:language","cp:category","dc:description"]+      lookupMetaString' :: Text -> Meta -> Text+      lookupMetaString' key' meta' =+        case key' of+             "description" -> T.intercalate "_x000d_\n"+                                (map stringify $ lookupMetaBlocks "description" meta')+             key''         -> lookupMetaString key'' meta'++      docProps = mknode "cp:coreProperties"+          [("xmlns:cp","http://schemas.openxmlformats.org/package/2006/metadata/core-properties")+          ,("xmlns:dc","http://purl.org/dc/elements/1.1/")+          ,("xmlns:dcterms","http://purl.org/dc/terms/")+          ,("xmlns:dcmitype","http://purl.org/dc/dcmitype/")+          ,("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance")]+          $ mktnode "dc:title" [] (stringify $ docTitle meta)+          : mktnode "dc:creator" [] (T.intercalate "; " (map stringify $ docAuthors meta))+          : [ mktnode (M.findWithDefault "" k extraCorePropsMap) [] (lookupMetaString' k meta)+            | k <- M.keys (unMeta meta), k `elem` extraCoreProps]+          ++ mknode "cp:keywords" [] (T.intercalate ", " keywords)+          : (\x -> [ mknode "dcterms:created" [("xsi:type","dcterms:W3CDTF")] x+                   , mknode "dcterms:modified" [("xsi:type","dcterms:W3CDTF")] x+                   ]) (T.pack $ formatTime defaultTimeLocale "%FT%XZ" utctime)+  in toEntry docPropsPath epochtime $ renderXml docProps++-- | Create custom document properties entry+mkCustomPropsEntry :: Integer -> Meta -> Entry+mkCustomPropsEntry epochtime meta =+  let extraCoreProps = ["subject","lang","category","description"]+      customProperties :: [(Text, Text)]+      customProperties = [ (k, lookupMetaString k meta)+                         | k <- M.keys (unMeta meta)+                         , k `notElem` (["title", "author", "keywords"]+                                       ++ extraCoreProps)]+      mkCustomProp (k, v) pid = mknode "property"+         [("fmtid","{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")+         ,("pid", tshow pid)+         ,("name", k)] $ mknode "vt:lpwstr" [] v+      customPropsPath = "docProps/custom.xml"+      customProps = mknode "Properties"+          [("xmlns","http://schemas.openxmlformats.org/officeDocument/2006/custom-properties")+          ,("xmlns:vt","http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes")+          ] $ zipWith mkCustomProp customProperties [(2 :: Int)..]+  in toEntry customPropsPath epochtime $ renderXml customProps++-- | Create numbering entry+mkNumberingEntry :: PandocMonad m+                 => Archive -> Archive -> Integer -> [ListMarker] -> m Entry+mkNumberingEntry refArchive distArchive epochtime lists = do+  let numpath = "word/numbering.xml"+  numbering <- parseXml refArchive distArchive numpath+  let newNumElts = mkNumbering lists+  let pandocAdded e =+       case findAttrBy ((== "abstractNumId") . qName) e >>= safeRead of+         Just numid -> numid >= (990 :: Int)+         Nothing    ->+           case findAttrBy ((== "numId") . qName) e >>= safeRead of+             Just numid -> numid >= (1000 :: Int)+             Nothing    -> False+  let oldElts = filter (not . pandocAdded) $ onlyElems (elContent numbering)+  let allElts = oldElts ++ newNumElts+  return $ toEntry numpath epochtime $ renderXml numbering{ elContent =+                       -- we want all the abstractNums first, then the nums,+                       -- otherwise things break:+                       [Elem e | e <- allElts+                               , qName (elName e) == "abstractNum" ] +++                       [Elem e | e <- allElts+                               , qName (elName e) == "num" ] }++-- | Collect auxiliary entries from reference archive+collectReferenceEntries :: PandocMonad m+                        => Archive -> Archive -> [Element] -> [Element]+                        -> m [Entry]+collectReferenceEntries refArchive distArchive headers footers = do+  let entryFromArchive arch path =+         maybe (throwError $ PandocSomeError+                           $ T.pack $ path ++ " missing in reference docx")+               return+               (findEntryByPath path arch `mplus` findEntryByPath path distArchive)+  docPropsAppEntry <- entryFromArchive refArchive "docProps/app.xml"+  themeEntry <- entryFromArchive refArchive "word/theme/theme1.xml"+  fontTableEntry <- entryFromArchive refArchive "word/fontTable.xml"+  let fontTableRelsEntries = maybeToList $+       findEntryByPath "word/_rels/fontTable.xml.rels" refArchive+  let fontEntries = [entry | entry <- zEntries refArchive+                           , "word/fonts/" `isPrefixOf` (eRelativePath entry)]+  webSettingsEntry <- entryFromArchive refArchive "word/webSettings.xml"+  let unrelativize ('/':xs) = xs+      unrelativize xs = "word/" ++ xs+  headerFooterEntries <- mapM (entryFromArchive refArchive . unrelativize) $+                         mapMaybe (fmap T.unpack . extractTarget)+                         (headers ++ footers)+  let miscRelEntries = [ e | e <- zEntries refArchive+                       , "word/_rels/" `isPrefixOf` eRelativePath e+                       , ".xml.rels" `isSuffixOf` eRelativePath e+                       , eRelativePath e /= "word/_rels/document.xml.rels"+                       , eRelativePath e /= "word/_rels/footnotes.xml.rels" ]+  let otherMediaEntries = [ e | e <- zEntries refArchive+                          , "word/media/" `isPrefixOf` eRelativePath e ]+  return $ docPropsAppEntry : themeEntry : fontTableEntry : webSettingsEntry+         : fontTableRelsEntries ++ fontEntries ++ headerFooterEntries+         ++ miscRelEntries ++ otherMediaEntries++extractTarget :: Element -> Maybe Text+extractTarget = findAttr (QName "Target" Nothing Nothing)
src/Text/Pandoc/Writers/Docx/OpenXML.hs view
@@ -20,7 +20,7 @@ -} module Text.Pandoc.Writers.Docx.OpenXML ( writeOpenXML, maxListLevel ) where -import Control.Monad ((>=>), when, unless)+import Control.Monad (when, unless) import Control.Applicative ((<|>)) import Control.Monad.Except (catchError) import Crypto.Hash (hashWith, SHA1(SHA1))@@ -329,14 +329,6 @@ blocksToOpenXML opts =   fmap concat . mapM (blockToOpenXML opts)   . separateTables . filter (not . isForeignRawBlock)-  >=>-  \case-    a@(x:xs) -> do-      sep <- sectionSeparator-      if Just x == sep-        then pure xs-        else pure a-    [] -> pure []  isForeignRawBlock :: Block -> Bool isForeignRawBlock (RawBlock format _) = format /= "openxml"@@ -414,9 +406,19 @@                 Nothing -> return []            else return []   contents <- (number ++) <$> inlinesToOpenXML opts lst-  addSectionBreak <- sectionSeparator >>= \case-    Just sep | isSection -> pure (sep:)-    _  -> pure id+  -- Add section break before section-level headers, but not for the first one+  -- to avoid a blank first page (#10578, #11482).+  addSectionBreak <- if isSection+    then do+      isFirst <- gets stFirstSectionHeader+      if isFirst+        then do+          modify $ \s -> s { stFirstSectionHeader = False }+          pure id+        else sectionSeparator >>= \case+          Just sep -> pure (sep:)+          Nothing  -> pure id+    else pure id   addSectionBreak <$>     if T.null ident        then return [Elem $ mknode "w:p" [] (map Elem paraProps ++ contents)]@@ -436,6 +438,10 @@      else block blockToOpenXML' opts (Para lst)   | null lst && not (isEnabled Ext_empty_paragraphs opts) = return []+  | [Math InlineMath _] <- lst+     = blockToOpenXML' opts (Para (lst ++ [Str "\x200B"])) -- see #11674+       -- we add a space to prevent Word from displaying the single+       -- inline math element with display math style   | otherwise = do       isFirstPara <- gets stFirstPara       let displayMathPara = case lst of@@ -905,6 +911,7 @@ inlineToOpenXML' opts (Note bs) = do   notes <- gets stFootnotes   notenum <- getUniqueId+  oldFirstPara <- gets stFirstPara   footnoteStyle <- rStyleM "Footnote Reference"   let notemarker = mknode "w:r" []                    [ mknode "w:rPr" [] footnoteStyle@@ -920,6 +927,7 @@                                 , envInNote = True })               (withParaPropM (pStyleM "Footnote Text") $                blocksToOpenXML opts $ insertNoteRef bs)+  modify $ \s -> s{ stFirstPara = oldFirstPara }   let newnote = mknode "w:footnote" [("w:id", notenum)] contents   modify $ \s -> s{ stFootnotes = newnote : notes }   return [ Elem $ mknode "w:r" []
src/Text/Pandoc/Writers/Docx/Types.hs view
@@ -121,6 +121,7 @@        , stDelId          :: Int        , stStyleMaps      :: StyleMaps        , stFirstPara      :: Bool+       , stFirstSectionHeader :: Bool  -- ^ True until first section header is processed        , stNumIdUsed      :: Bool  -- ^ True if the current numId (envListNumId) has been used.                                    --   Should only be used once, for the first paragraph.        , stInTable        :: Bool@@ -146,6 +147,7 @@       , stDelId          = 1       , stStyleMaps      = StyleMaps M.empty M.empty       , stFirstPara      = False+      , stFirstSectionHeader = True       , stNumIdUsed      = False       , stInTable        = False       , stInList         = False
src/Text/Pandoc/Writers/EPUB.hs view
@@ -466,8 +466,8 @@ pandocToEPUB version opts doc = do   let doc' = ensureValidXmlIdentifiers doc   -- handle pictures-  Pandoc meta blocks <- walkM (transformInline opts) doc' >>=-                        walkM transformBlock+  Pandoc meta blocks <- walkM (transformInline version opts) doc' >>=+                        walkM (transformBlock version)   picEntries <- mapMaybe (snd . snd) <$> gets stMediaPaths    epubSubdir <- gets stEpubSubdir@@ -1048,10 +1048,9 @@         coverageNodes = maybe [] (dcTag' "coverage") $ epubCoverage md         rightsNodes = maybe [] (dcTag' "rights") $ epubRights md         coverImageNodes = maybe []-            (\img -> [unode "meta" !  [(metaprop,"cover"),-                                       ("content",toId img)] $ ()-                        | version == EPUB2])-            $ mbCoverImage+            (\img -> [unode "meta" !  [("name","cover"),+                                       ("content",toId img)] $ ()])+            mbCoverImage         modifiedNodes = [ unode "meta" ! [(metaprop, "dcterms:modified")] $                showDateTimeISO8601 currentTime | version == EPUB3 ]         belongsToCollectionNodes =@@ -1141,11 +1140,18 @@         schemeToOnix "ISBN-13"              = "15"         schemeToOnix "Legal deposit number" = "17"         schemeToOnix "URN"                  = "22"-        schemeToOnix "OCLC"                 = "23"+        schemeToOnix "OCLC number"          = "23"+        schemeToOnix "Co-publisher’s ISBN-13" = "24"         schemeToOnix "ISMN-13"              = "25"         schemeToOnix "ISBN-A"               = "26"-        schemeToOnix "JP"                   = "27"-        schemeToOnix "OLCC"                 = "28"+        schemeToOnix "JP e-code"            = "27"+        schemeToOnix "OLCC number"          = "28"+        schemeToOnix "JP Magazine ID"       = "29"+        schemeToOnix "UPC-12+5"             = "30"+        schemeToOnix "BNF Control number"   = "31"+        schemeToOnix "ISSN-13"              = "34"+        schemeToOnix "ARK"                  = "35"+        schemeToOnix "Digital file internal version number" = "36"         schemeToOnix _                      = "01"  showDateTimeISO8601 :: UTCTime -> Text@@ -1197,42 +1203,47 @@   modify $ \st -> st { stMediaNextId = nextId + 1 }   return $ "file" ++ show nextId ++ ext -isHtmlFormat :: Format -> Bool-isHtmlFormat (Format "html") = True-isHtmlFormat (Format "html4") = True-isHtmlFormat (Format "html5") = True-isHtmlFormat _ = False+isHtmlFormat :: EPUBVersion -> Format -> Bool+isHtmlFormat _ (Format "html") = True+isHtmlFormat _ (Format "html4") = True+isHtmlFormat _ (Format "html5") = True+isHtmlFormat _ (Format "epub") = True+isHtmlFormat EPUB2 (Format "epub2") = True+isHtmlFormat EPUB3 (Format "epub3") = True+isHtmlFormat _ _ = False  transformBlock  :: PandocMonad m-                => Block+                => EPUBVersion+                -> Block                 -> E m Block-transformBlock (RawBlock fmt raw)-  | isHtmlFormat fmt = do+transformBlock version (RawBlock fmt raw)+  | isHtmlFormat version fmt = do   let tags = parseTags raw   tags' <- mapM transformTag tags   return $ RawBlock fmt (renderTags' tags')-transformBlock b = return b+transformBlock _ b = return b  transformInline  :: PandocMonad m-                 => WriterOptions+                 => EPUBVersion+                 -> WriterOptions                  -> Inline                  -> E m Inline-transformInline _opts (Image attr@(_,_,kvs) lab (src,tit))+transformInline _ _opts (Image attr@(_,_,kvs) lab (src,tit))   | isNothing (lookup "external" kvs) = do     newsrc <- modifyMediaRef $ T.unpack src     return $ Image attr lab ("../" <> newsrc, tit)-transformInline opts x@(Math t m)+transformInline _ opts x@(Math t m)   | WebTeX url <- writerHTMLMathMethod opts = do     newsrc <- modifyMediaRef (T.unpack (url <> urlEncode m))     let mathclass = if t == DisplayMath then "display" else "inline"     return $ Span ("",["math",mathclass],[])                 [Image nullAttr [x] ("../" <> newsrc, "")]-transformInline _opts (RawInline fmt raw)-  | isHtmlFormat fmt = do+transformInline version _opts (RawInline fmt raw)+  | isHtmlFormat version fmt = do   let tags = parseTags raw   tags' <- mapM transformTag tags   return $ RawInline fmt (renderTags' tags')-transformInline _ x = return x+transformInline _ _ x = return x  (!) :: (t -> Element) -> [(Text, Text)] -> t -> Element (!) f attrs n = add_attrs (map (\(k,v) -> Attr (unqual k) v) attrs) (f n)
src/Text/Pandoc/Writers/GridTable.hs view
@@ -82,10 +82,15 @@   -> [B.TableBody]   -> B.TableFoot   -> Table-toTable attr caption colSpecs  thead tbodies tfoot =+toTable attr caption colSpecs thead' tbodies' tfoot' =   Table attr caption colSpecs' rowHeads thGrid tbGrids tfGrid   where-    colSpecs' = listArray (ColIndex 1, ColIndex $ length colSpecs) colSpecs+    -- normalize in case it's invalid shape:+    thead = B.normalizeTableHead numcols thead'+    tbodies = map (B.normalizeTableBody numcols) tbodies'+    tfoot = B.normalizeTableFoot numcols tfoot'+    numcols = length colSpecs+    colSpecs' = listArray (ColIndex 1, ColIndex numcols) colSpecs     rowHeads = case listToMaybe tbodies of       Nothing -> RowHeadColumns 0       Just (TableBody _attr rowHeadCols _headerRows _rows) -> rowHeadCols
src/Text/Pandoc/Writers/HTML.hs view
@@ -35,7 +35,8 @@ import Control.Monad ( liftM, when, foldM, unless ) import Control.Monad.Trans ( MonadTrans(lift) ) import Data.Char (ord, isSpace, isAscii)-import Data.List (intercalate, intersperse, partition, delete, (\\), foldl')+import Data.List (intercalate, intersperse, partition, delete, (\\))+import qualified Data.List as L import Data.List.NonEmpty (NonEmpty((:|))) import Data.Containers.ListUtils (nubOrd) import Data.Maybe (fromMaybe, isJust, isNothing)@@ -48,7 +49,7 @@ import Numeric (showHex) import Text.DocLayout (render, literal, Doc) import Text.Blaze.Internal (MarkupM (Empty), customLeaf, customParent)-import Text.DocTemplates (FromContext (lookupContext), Context (..))+import Text.DocTemplates (FromContext (lookupContext), Context (..), Val(..)) import qualified Text.DocTemplates.Internal as DT import Text.Blaze.Html hiding (contents) import Text.Pandoc.Definition@@ -125,7 +126,7 @@ strToHtml :: Text -> Html strToHtml t     | T.any isSpecial t =-       let !x = foldl' go mempty $ T.groupBy samegroup t+       let !x = L.foldl' go mempty $ T.groupBy samegroup t         in x     | otherwise = toHtml t   where@@ -433,10 +434,20 @@                          defField "backgroundTransition" ("fade" :: Doc Text) .                          defField "viewDistance" ("3" :: Doc Text) .                          defField "mobileViewDistance" ("2" :: Doc Text) .-                         defField "scrollProgress" True .+                         (case (lookupContext "scrollProgress" metadata+                                   :: Maybe (Val Text)) of+                            Just (BoolVal False) -> id+                            Just (BoolVal True) -> defField "scrollProgress" True+                            _  -> defField "scrollProgressAuto" True) .                          defField "scrollActivationWidth" ("0" :: Doc Text) .                          defField "scrollSnap" ("mandatory" :: Doc Text) .-                         defField "scrollLayout" ("full" :: Doc Text)+                         defField "scrollLayout" ("full" :: Doc Text) .+                         (case writerHighlightMethod opts of+                            IdiomaticHighlighting+                             | slideVariant == RevealJsSlides ->+                              defField "highlight-js" True .+                              defField "highlightjs-theme" ("monokai" :: Doc Text)+                            _ -> id)                       else id) .                   defField "document-css" (isNothing mCss && slideVariant == NoSlides) .                   defField "quotes" (stQuotes st) .@@ -674,7 +685,7 @@  addAttrs :: PandocMonad m          => WriterOptions -> Attr -> Html -> StateT WriterState m Html-addAttrs opts attr h = foldl' (!) h <$> attrsToHtml opts attr+addAttrs opts attr h = L.foldl' (!) h <$> attrsToHtml opts attr  toAttrs :: PandocMonad m         => [(Text, Text)] -> StateT WriterState m [Attribute]@@ -794,8 +805,8 @@         if titleSlide            -- title slides have no content of their own            then let (as, bs) = break isSec xs-                in  (breakOnPauses as, bs)-           else ([], breakOnPauses xs)+                in  (walk breakOnPauses as, bs)+           else ([], walk breakOnPauses xs)   let secttag  = if html5                     then H5.section                     else H.div@@ -940,6 +951,7 @@   return $ if html5 then H5.hr else H.hr blockToHtmlInner opts (CodeBlock (id',classes,keyvals) rawCode) = do   html5 <- gets stHtml5+  slideVariant <- gets stSlideVariant   id'' <- if T.null id'              then do                modify $ \st -> st{ stCodeBlockNum = stCodeBlockNum st + 1 }@@ -957,23 +969,37 @@       adjCode  = if tolhs                     then T.unlines . map ("> " <>) . T.lines $ rawCode                     else rawCode-      highlighted = highlight (writerSyntaxMap opts)-                      (if html5 then formatHtmlBlock else formatHtml4Block)-                      (id'',classes',keyvals) adjCode-      hlCode   = case writerHighlightMethod opts of-                   Skylighting _ -> highlighted-                   DefaultHighlighting -> highlighted-                   _ -> Left ""-  case hlCode of-         Left msg -> do-           unless (T.null msg) $-             report $ CouldNotHighlight msg-           addAttrs opts (id',classes,keyvals)-             $ H.pre $ H.code $ toHtml adjCode-         Right h -> modify (\st -> st{ stHighlighting = True }) >>-                    -- we set writerIdentifierPrefix to "" since id'' already-                    -- includes it:-                    addAttrs opts{writerIdentifierPrefix = ""} (id'',[],keyvals) h+      isIdiomaticRevealJs = slideVariant == RevealJsSlides &&+                            writerHighlightMethod opts == IdiomaticHighlighting+  if isIdiomaticRevealJs+     then do+       -- For idiomatic reveal.js highlighting, put attributes on <code>+       -- with language- prefix, and let highlight.js do the highlighting.+       modify (\st -> st{ stHighlighting = True })+       let (langClasses, otherClasses) = case classes' of+             (lang:rest) -> (["language-" <> lang], rest)+             []          -> ([], [])+           codeAttrs = (id', langClasses ++ otherClasses, keyvals)+       codeTag <- addAttrs opts codeAttrs $ H.code $ toHtml adjCode+       return $ H.pre codeTag+     else do+       let highlighted = highlight (writerSyntaxMap opts)+                           (if html5 then formatHtmlBlock else formatHtml4Block)+                           (id'',classes',keyvals) adjCode+           hlCode   = case writerHighlightMethod opts of+                        Skylighting _ -> highlighted+                        DefaultHighlighting -> highlighted+                        _ -> Left ""+       case hlCode of+              Left msg -> do+                unless (T.null msg) $+                  report $ CouldNotHighlight msg+                addAttrs opts (id',classes,keyvals)+                  $ H.pre $ H.code $ toHtml adjCode+              Right h -> modify (\st -> st{ stHighlighting = True }) >>+                         -- we set writerIdentifierPrefix to "" since id'' already+                         -- includes it:+                         addAttrs opts{writerIdentifierPrefix = ""} (id'',[],keyvals) h blockToHtmlInner opts (BlockQuote blocks) = do   -- in S5, treat list in blockquote specially   -- if default is incremental, make it nonincremental;@@ -1046,7 +1072,7 @@                                    numstyle']                    else [])   l <- ordList opts contents-  return $ foldl' (!) l attribs+  return $ L.foldl' (!) l attribs blockToHtmlInner opts (DefinitionList lst) = do   contents <- mapM (\(term, defs) ->                   do term' <- liftM H.dt $ inlineListToHtml opts term@@ -1413,7 +1439,7 @@                                = Just (t . H.u, cs)                              | otherwise                                = Just (t, c:cs)-                            spanLikeTags = foldl' go Nothing+                            spanLikeTags = L.foldl' go Nothing                         in case spanLikeTags classes of                             Just (tag, cs) -> do                               h <- inlineListToHtml opts ils@@ -1610,7 +1636,7 @@                               Just "audio" -> mediaTag H5.audio "Audio"                               Just _       -> (H5.embed, [])                               _            -> imageTag-                        return $ foldl' (!) tag $ attributes ++ specAttrs+                        return $ L.foldl' (!) tag $ attributes ++ specAttrs                         -- note:  null title included, as in Markdown.pl     (Note contents) -> do                         notes <- gets stNotes@@ -1688,14 +1714,16 @@       let kvs = [("role","doc-backlink") | html5]       let backlink = Link ("",["footnote-back"],kvs)                         [Str ref] ("#" <> "fnref" <> ref,"")-      let blocks' =-           case blocks of-             (Para ils : rest) ->-                Para (backlink : Str "." : Space : ils) : rest-             (Plain ils : rest) ->-                Plain (backlink : Str "." : Space : ils) : rest-             _ -> Para [backlink , Str "."] : blocks-      contents <- blockListToHtml opts blocks'+      let addBacklinkInlines bs+             | epubv == EPUB3 = bs+             | otherwise =+                 case bs of+                   (Para ils : rest) ->+                     Para (backlink : Str "." : Space : ils) : rest+                   (Plain ils : rest) ->+                     Plain (backlink : Str "." : Space : ils) : rest+                   _ -> Para [backlink , Str "."] : blocks+      contents <- blockListToHtml opts (addBacklinkInlines blocks)       let noteItem = (if epubv == EPUB3                          then H5.aside ! customAttribute "epub:type" "footnote" ! customAttribute "role" "doc-footnote"                          else H.div) ! prefixedId opts ("fn" <> ref)@@ -1767,9 +1795,19 @@ isRawHtml :: PandocMonad m => Format -> StateT WriterState m Bool isRawHtml f = do   html5 <- gets stHtml5+  epubVersion <- gets stEPUBVersion   return $ f == Format "html" ||            ((html5 && f == Format "html5") || f == Format "html4") ||+           isEpubFormat epubVersion f ||            isSlideVariant f++-- | Check to see if Format matches with an EPUB variant+isEpubFormat :: Maybe EPUBVersion -> Format -> Bool+isEpubFormat Nothing _ = False+isEpubFormat (Just EPUB2) f =+  f == Format "epub" || f == Format "epub2"+isEpubFormat (Just EPUB3) f =+  f == Format "epub" || f == Format "epub3"  -- | Check to see if Format matches with an HTML slide variant isSlideVariant :: Format -> Bool
src/Text/Pandoc/Writers/ICML.hs view
@@ -44,6 +44,7 @@ data WriterState = WriterState{     blockStyles  :: Set.Set Text   , inlineStyles :: Set.Set Text+  , objectStyles :: Set.Set Text   , links        :: Hyperlink   , listDepth    :: Int   , maxListDepth :: Int@@ -55,6 +56,7 @@ defaultWriterState = WriterState{     blockStyles  = Set.empty   , inlineStyles = Set.empty+  , objectStyles = Set.empty   , links        = []   , listDepth    = 1   , maxListDepth = 0@@ -147,9 +149,10 @@              meta   (main, st) <- runStateT (blocksToICML opts [] blocks) defaultWriterState   let context = defField "body" main-              $ defField "charStyles" (charStylesToDoc st)-              $ defField "parStyles"  (parStylesToDoc st)-              $ defField "hyperlinks" (hyperlinksToDoc $ links st) metadata+              $ defField "charStyles"   (charStylesToDoc st)+              $ defField "parStyles"    (parStylesToDoc st)+              $ defField "objectStyles" (objectStylesToDoc st)+              $ defField "hyperlinks"   (hyperlinksToDoc $ links st) metadata   return $ render colwidth $     (if writerPreferAscii opts then fmap toEntities else id) $     case writerTemplate opts of@@ -272,6 +275,16 @@                          else empty       in  inTags True "CharacterStyle" ([("Self", "CharacterStyle/"<>s), ("Name", s)] ++ attrs') props +-- | Convert a WriterState with its object styles to the ICML listing of Object Styles.+objectStylesToDoc :: WriterState -> Doc Text+objectStylesToDoc st = vcat $ map makeStyle $ Set.toAscList $ objectStyles st+  where+    makeStyle s =+      let attrs = []+          props = inTags True "Properties" [] $+                    inTags False "BasedOn" [("type", "string")] (text "$ID/None")+      in  inTags True "ObjectStyle" ([("Self", "ObjectStyle/"<>s), ("Name", s)] ++ attrs) props+ -- | Escape colon characters as %3a escapeColons :: Text -> Text escapeColons txt = Text.replace ":" "%3a" txt@@ -601,6 +614,10 @@       attrs = [("AppliedCharacterStyle", stl)]   in  (stlStr, attrs) +-- | Key for specifying user-defined object (image) styles+objectStyleKey :: Text+objectStyleKey = "object-style"+ -- | Assemble an ICML Image. imageICML :: PandocMonad m => WriterOptions -> Style -> Attr -> Target -> WS m (Doc Text) imageICML opts style attr (src, _) = do@@ -647,19 +664,31 @@                 then mempty                 else  selfClosingTag "Link" [("Self", "ueb"),                                              ("LinkResourceURI", src')]-      image  = inTags True "Image"-                   [("Self","ue6"), ("ItemTransform", scale<>" -"<>hw<>" -"<>hh)]-                 $ vcat [-                     inTags True "Properties" [] $ vcat [-                         inTags True "Profile" [("type","string")] $ text "$ID/Embedded"-                       , selfClosingTag "GraphicBounds" [("Left","0"), ("Top","0")-                         , ("Right",  showFl $ ow*ow / imgWidth)-                         , ("Bottom", showFl $ oh*oh / imgHeight)]-                       , contents-                       ]-                   , link-                   ]-      doc    = inTags True "CharacterStyleRange" attrs-                 $ inTags True "Rectangle" [("Self","uec"), ("StrokeWeight", "0"),-                     ("ItemTransform", scale<>" "<>hw<>" -"<>hh)] (props $$ image)-  state $ \st -> (doc, st{ inlineStyles = Set.insert stlStr $ inlineStyles st } )+      (_,_,kvs) = attr+      applyObjectStyle = lookup objectStyleKey kvs+      image = inTags True "Image"+            [("Self","ue6"), ("ItemTransform", scale <> " -" <> hw <> " -" <> hh)]+            $ vcat [+                inTags True "Properties" [] $ vcat [+                    inTags True "Profile" [("type","string")] $ text "$ID/Embedded",+                    selfClosingTag "GraphicBounds" [("Left","0"), ("Top","0"),+                    ("Right", showFl $ ow * ow / imgWidth),+                    ("Bottom", showFl $ oh * oh / imgHeight)],+                    contents+                ],+                link+            ]+      doc   = inTags True "CharacterStyleRange" attrs+          $ inTags True "Rectangle"+              ([("Self","uec"),+                ("StrokeWeight", "0"),+                ("ItemTransform", scale <> " " <> hw <> " -" <> hh)] +++                maybe [] (\aos -> [("AppliedObjectStyle", "ObjectStyle/" <> aos)]) applyObjectStyle+              )+              (props $$ image)+  state $ \st -> (doc, st{+      inlineStyles = Set.insert stlStr $ inlineStyles st,+      objectStyles = case applyObjectStyle of+          Just styleName -> Set.insert styleName $ objectStyles st+          Nothing        -> objectStyles st+    })
src/Text/Pandoc/Writers/JATS.hs view
@@ -360,11 +360,21 @@   return $ inTags True cls attr contents blockToJATS opts (Div (ident,_,kvs) bs) = do   contents <- blocksToJATS opts bs-  let attr = [("id", escapeNCName ident) | not (T.null ident)] ++-             [("xml:lang",l) | ("lang",l) <- kvs] ++-             [(k,v) | (k,v) <- kvs, k `elem` ["specific-use",-                 "content-type", "orientation", "position"]]-  return $ inTags True "boxed-text" attr contents+  -- Attributes that are allowed on both @<p>@ and @<boxed-text>@ elements+  let generic_attr = [("id", escapeNCName ident) | not (T.null ident)] +++                     [("xml:lang",l) | ("lang",l) <- kvs] +++                     [(k,v) | (k,v) <- kvs, k `elem` ["specific-use",+                                                      "content-type"]]+  let boxed_attr = [(k,v) | (k,v) <- kvs, k `elem` ["orientation", "position"]]+  let attr = generic_attr <> boxed_attr+  return $+    if null attr+    then contents+    else -- The contents must be wrapped in an appropriate element.+      let element = if null boxed_attr+                    then "p"+                    else "boxed-text"+      in inTags True element (generic_attr <> boxed_attr) contents blockToJATS opts (Header _ _ title) = do   title' <- inlinesToJATS opts (map fixLineBreak title)   return $ inTagsSimple "title" title'@@ -439,12 +449,36 @@   capt <- if null longcapt           then pure empty           else inTagsSimple "caption" <$> blocksToJATS opts longcapt-  figbod <- blocksToJATS opts $ walk unsetAltIfDupl body-  let figattr = [("id", escapeNCName ident) | not (T.null ident)] ++-                [(k,v) | (k,v) <- kvs-                       , k `elem` [ "fig-type", "orientation"-                                  , "position", "specific-use"]]-  return $ inTags True "fig" figattr $ capt $$ figbod++  -- We handle the element specially if it's a figure with subfigures, i.e., if+  -- all immediate children are figures themselves.+  let hasSubfigures = all (\case { Figure{} -> True; _ -> False}) body+      needsWrapping = if hasSubfigures+                      then (const False)+                      else \case+                        -- Wrap all figure content elements, except for those+                        -- allowed as direct subelements.+                        BlockQuote{}    -> False+                        CodeBlock{}     -> False+                        Para{}          -> False+                        Plain [Image{}] -> False+                        Plain [Math{}]  -> False+                        Table{}         -> False+                        _               -> True++  children <- wrappedBlocksToJATS needsWrapping opts $ walk unsetAltIfDupl body+  let (tag, allowedAttributes) =+        if hasSubfigures+        then ( "fig-group"+             , ["content-type", "orientation", "position", "specific-use"]+             )+        else ("fig"+             , ["fig-type", "orientation", "position", "specific-use"]+             )+  let xmlattr =  [("id", escapeNCName ident) | not (T.null ident)] +++                 [(k,v) | (k,v) <- kvs+                        , k `elem` allowedAttributes]+  return $ inTags True tag xmlattr $ capt $$ children  -- | Convert a list of inline elements to JATS. inlinesToJATS :: PandocMonad m => WriterOptions -> [Inline] -> JATS m (Doc Text)
src/Text/Pandoc/Writers/LaTeX.hs view
@@ -33,13 +33,15 @@ import Crypto.Hash (hashWith, MD5(MD5)) import Data.Containers.ListUtils (nubOrd) import Data.Char (isDigit, isAscii, isLetter)-import Data.List (intersperse, (\\))-import Data.Maybe (catMaybes, fromMaybe, isJust, mapMaybe, isNothing)+import Data.List (intersperse, partition, (\\))+import qualified Data.Set as Set+import Data.Maybe (catMaybes, fromMaybe, isJust, listToMaybe, 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.DocTemplates (Context(..), FromContext(lookupContext), Val(..), renderTemplate)+import qualified Data.Map as M import Text.Collate.Lang (renderLang) import Text.Pandoc.Class.PandocMonad (PandocMonad, getPOSIXTime, lookupEnv,                                       report, toLang)@@ -54,14 +56,16 @@ import Text.Pandoc.URI import Text.Pandoc.Slides import Text.Pandoc.Walk (query, walk, walkM)+import Text.Pandoc.Writers.LaTeX.Util (getAccumulatedNotes) import Text.Pandoc.Writers.LaTeX.Caption (getCaption) import Text.Pandoc.Writers.LaTeX.Table (tableToLaTeX) import Text.Pandoc.Writers.LaTeX.Citation (citationsToNatbib,                                            citationsToBiblatex)-import Text.Pandoc.Writers.LaTeX.Types (LW, WriterState (..), startingState)+import Text.Pandoc.Writers.LaTeX.Types (LW, WriterState (..), startingState,+                                        PdfStandard (..)) import Text.Pandoc.Writers.LaTeX.Lang (toBabel) import Text.Pandoc.Writers.LaTeX.Util (stringToLaTeX, StringContext(..),-                                       toLabel, inCmd,+                                       toLabel, inCmd, withExternalNotes,                                        wrapDiv, hypertarget, labelFor,                                        getListingsLanguage, mbBraced) import Text.Pandoc.Writers.Shared@@ -221,6 +225,9 @@   let bibliography' = map unescapeUnderscore <$>                         getField "bibliography" metadata +  -- Process PDF standard metadata for DocumentMetadata+  pdfStd <- processPdfStandard metadata+   let context  =  (case bibliography' of                      Nothing -> id                      Just xs -> resetField "bibliography" xs) $@@ -293,6 +300,13 @@                   (if reproduciblePDF                     then defField "pdf-trailer-id" trailerID                     else id) $+                  (if not (null (pdfStandards pdfStd)) || isJust (pdfVersion pdfStd)+                    then resetField "pdfstandard" $ MapVal $ Context $ M.fromList+                           [ ("standards", ListVal $ map (SimpleVal . literal) (pdfStandards pdfStd))+                           , ("version", maybe NullVal (SimpleVal . literal) (pdfVersion pdfStd))+                           , ("tagging", BoolVal (pdfTagging pdfStd))+                           ]+                    else id) $                   metadata   let babelLang = mblang >>= toBabel   let context' =@@ -649,8 +663,9 @@   let spacing = if all (isTightList . snd) lst                    then text "\\tightlist"                    else empty+  notes <- getAccumulatedNotes   return $ text ("\\begin{description}" <> inc) $$ spacing $$ vcat items $$-               "\\end{description}"+               "\\end{description}" $$ notes blockToLaTeX HorizontalRule =             return   "\\begin{center}\\rule{0.5\\linewidth}{0.5pt}\\end{center}"@@ -664,7 +679,7 @@                (Ann.toTable attr blkCapt specs thead tbodies tfoot) blockToLaTeX (Figure (ident, _, kvs) captnode body) = do   opts <- gets stOptions-  (capt, captForLof, footnotes) <- getCaption inlineListToLaTeX True captnode+  (capt, captForLof) <- withExternalNotes $ getCaption inlineListToLaTeX captnode   lab <- labelFor ident   let caption = "\\caption" <> captForLof <> braces capt <> lab       placement = case lookup "latex-placement" kvs of@@ -690,6 +705,7 @@         Table {}  -> Any True         _         -> Any False)   st <- get+  footnotes <- getAccumulatedNotes   return $ (case () of     _ | containsTable body ->           -- placing a longtable in a figure or center environment does@@ -749,9 +765,9 @@ defListItemToLaTeX :: PandocMonad m => ([Inline], [[Block]]) -> LW m (Doc Text) defListItemToLaTeX (term, defs) = do     -- needed to turn off 'listings' because it breaks inside \item[...]:-    modify $ \s -> s{stInItem = True}-    term' <- inlineListToLaTeX term-    modify $ \s -> s{stInItem = False}+    modify $ \s -> s{ stInItem = True }+    term' <- withExternalNotes $ inlineListToLaTeX term+    modify $ \s -> s{ stInItem = False }     -- put braces around term if it contains an internal link,     -- since otherwise we get bad bracket interactions: \item[\hyperref[..]     let isInternalLink (Link _ _ (src,_))@@ -1414,3 +1430,85 @@            then return True            else pCancel       _ -> pCancel++-- PDF standard support for DocumentMetadata++-- | PDF standards supported by LaTeX's DocumentMetadata+-- See: https://github.com/latex3/latex2e documentmetadata-support.dtx+latexSupportedStandards :: Set.Set Text+latexSupportedStandards = Set.fromList+  [ -- PDF/A standards (note: a-1a is NOT supported by LaTeX, only a-1b)+    "a-1b", "a-2a", "a-2b", "a-2u", "a-3a", "a-3b", "a-3u"+  , "a-4", "a-4e", "a-4f"+    -- PDF/X standards+  , "x-4", "x-4p", "x-5g", "x-5n", "x-5pg", "x-6", "x-6n", "x-6p"+    -- PDF/UA standards+  , "ua-1", "ua-2"+  ]++-- | Standards that require PDF tagging (document structure)+-- PDF/A level "a" variants and PDF/UA require tagged structure+taggingRequiredStandards :: Set.Set Text+taggingRequiredStandards = Set.fromList+  ["a-2a", "a-3a", "ua-1", "ua-2"]++-- | Valid PDF versions for DocumentMetadata+validPdfVersions :: Set.Set Text+validPdfVersions = Set.fromList+  ["1.4", "1.5", "1.6", "1.7", "2.0"]++-- | PDF version required by each standard+-- LaTeX defaults to PDF 2.0 with \DocumentMetadata, but some standards+-- have maximum version requirements that are incompatible with 2.0+standardRequiredVersion :: M.Map Text Text+standardRequiredVersion = M.fromList+  [ ("a-1b", "1.4")  -- PDF/A-1 requires exactly PDF 1.4+    -- PDF/A-2 and PDF/A-3 require 1.7; must set explicitly since LaTeX defaults to 2.0+  , ("a-2a", "1.7"), ("a-2b", "1.7"), ("a-2u", "1.7")+  , ("a-3a", "1.7"), ("a-3b", "1.7"), ("a-3u", "1.7")+    -- PDF/A-4, PDF/UA-1, PDF/UA-2 work with PDF 2.0 (the default)+  ]++-- | Normalize a PDF standard string: lowercase, strip "pdf" prefix+normalizePdfStandard :: Text -> Text+normalizePdfStandard t =+  let lower = T.toLower t+  in case T.stripPrefix "pdf" lower of+       Just rest -> T.dropWhile (`elem` ['-', '/']) rest+       Nothing   -> lower++-- | Normalize a PDF version string+-- Handles YAML parsing quirk where 2.0 becomes integer 2, then string "2"+normalizeVersion :: Text -> Text+normalizeVersion t+  | t == "2" = "2.0"+  | otherwise = t++-- | Check if text is a valid PDF version (after normalization)+isPdfVersion :: Text -> Bool+isPdfVersion t = Set.member (normalizeVersion t) validPdfVersions++-- | Process pdfstandard metadata, returning PDF standard settings+processPdfStandard :: PandocMonad m+                   => Context Text+                   -> m PdfStandard+processPdfStandard ctx = do+  let standards = fromMaybe [] $ getField "pdfstandard" ctx+      normalized = map normalizePdfStandard standards+      (versions, pdfStds) = partition isPdfVersion normalized+      validStandards = filter (`Set.member` latexSupportedStandards) pdfStds+      invalidStandards = filter (\s -> not (Set.member s latexSupportedStandards)+                                    && not (isPdfVersion s)) pdfStds+      needsTagging = any (`Set.member` taggingRequiredStandards) validStandards+      -- Use explicit version if provided, otherwise infer from standards+      -- Apply normalizeVersion to handle YAML parsing "2" -> "2.0"+      explicitVersion = normalizeVersion <$> listToMaybe versions+      inferredVersion = listToMaybe $ mapMaybe (`M.lookup` standardRequiredVersion) validStandards+      version = explicitVersion <|> inferredVersion+  -- Warn about unsupported standards+  mapM_ (report . UnsupportedPdfStandard) invalidStandards+  return PdfStandard+    { pdfStandards = validStandards+    , pdfVersion = version+    , pdfTagging = needsTagging+    }
src/Text/Pandoc/Writers/LaTeX/Caption.hs view
@@ -21,29 +21,20 @@ import Text.DocLayout (Doc, brackets, empty) import Text.Pandoc.Shared import Text.Pandoc.Walk-import Text.Pandoc.Writers.LaTeX.Notes (notesToLaTeX)-import Text.Pandoc.Writers.LaTeX.Types-  ( LW, WriterState (stExternalNotes, stNotes, stInCaption) )+import Text.Pandoc.Writers.LaTeX.Types ( LW, WriterState (stInCaption) )  --- | Produces the components of a LaTeX 'caption' command. Returns a triple--- containing the caption text, the short caption for the list of--- figures/tables, and the footnote definitions.+-- | Produces the components of a LaTeX 'caption' command. Returns a pair+-- containing the caption text and the short caption for the list of+-- figures/tables. getCaption :: PandocMonad m            => ([Inline] -> LW m (Doc Text)) -- ^ inlines converter-           -> Bool                          -- ^ whether to extract notes            -> Caption-           -> LW m (Doc Text, Doc Text, Doc Text)-getCaption inlineListToLaTeX externalNotes (Caption maybeShort long) = do+           -> LW m (Doc Text, Doc Text)+getCaption inlineListToLaTeX (Caption maybeShort long) = do   modify $ \st -> st{ stInCaption = True }   let long' = blocksToInlines long-  oldExternalNotes <- gets stExternalNotes-  modify $ \st -> st{ stExternalNotes = externalNotes, stNotes = [] }   capt <- inlineListToLaTeX long'-  footnotes <- if externalNotes-                  then notesToLaTeX <$> gets stNotes-                  else return empty-  modify $ \st -> st{ stExternalNotes = oldExternalNotes, stNotes = [] }   -- We can't have footnotes in the list of figures/tables, so remove them:   let getNote (Note _) = Any True       getNote _        = Any False@@ -55,4 +46,4 @@                              else return empty                   Just short -> toShortCapt short   modify $ \st -> st{ stInCaption = False }-  return (capt, captForLof, footnotes)+  return (capt, captForLof)
src/Text/Pandoc/Writers/LaTeX/Citation.hs view
@@ -21,7 +21,7 @@ import Text.Pandoc.Options import Text.Pandoc.Class.PandocMonad (PandocMonad) import Text.Pandoc.Definition-import Data.List (foldl')+import qualified Data.List as L import Text.DocLayout (Doc, brackets, empty, (<+>), text, isEmpty, literal,                        braces) import Text.Pandoc.Walk@@ -73,7 +73,7 @@  citationsToNatbib inlineListToLaTeX cits = do   cits' <- mapM convertOne cits-  return $ text "\\citetext{" <> foldl' combineTwo empty cits' <> text "}"+  return $ text "\\citetext{" <> L.foldl' combineTwo empty cits' <> text "}"   where     citeCommand' = citeCommand inlineListToLaTeX     combineTwo a b | isEmpty a = b@@ -182,7 +182,7 @@                     NormalCitation -> "\\autocites"        groups <- mapM (citeArgumentsList inlineListToLaTeX)-                     (reverse (foldl' grouper [] (c:cs)))+                     (reverse (L.foldl' grouper [] (c:cs)))        return $ text cmd <> mconcat groups 
src/Text/Pandoc/Writers/LaTeX/Lang.hs view
@@ -40,7 +40,7 @@ toBabel (Lang "en" _ (Just "NZ") _ _ _) = Just "newzealand" toBabel (Lang "en" _ (Just "UK") _ _ _) = Just "british" toBabel (Lang "en" _ (Just "US") _ _ _) = Just "american"-toBabel (Lang "fr" _ (Just "CA") _ _ _) = Just "canadien"+toBabel (Lang "fr" _ (Just "CA") _ _ _) = Just "french" toBabel (Lang "fra" _ _ vars _ _)   | "aca" `elem` vars                   = Just "acadian" toBabel (Lang "grc" _ _ _ _ _)          = Just "ancientgreek"
src/Text/Pandoc/Writers/LaTeX/Table.hs view
@@ -1,5 +1,7 @@ {-# LANGUAGE LambdaCase        #-} {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleContexts #-} {- |    Module      : Text.Pandoc.Writers.LaTeX.Table    Copyright   : Copyright (C) 2006-2024 John MacFarlane@@ -24,17 +26,17 @@ import Text.Pandoc.Class.PandocMonad (PandocMonad) import Text.Pandoc.Definition import Text.DocLayout-  ( Doc, braces, cr, empty, hcat, hsep, isEmpty, literal, nest-  , text, vcat, ($$) )+  ( Doc, braces, brackets, cr, empty, hcat, hsep, isEmpty, literal, nest+  , text, vcat, ($$)) import Text.Pandoc.Shared (splitBy, tshow) import Text.Pandoc.Walk (walk, query) import Data.Monoid (Any(..)) import Text.Pandoc.Writers.LaTeX.Caption (getCaption)-import Text.Pandoc.Writers.LaTeX.Notes (notesToLaTeX) import Text.Pandoc.Writers.LaTeX.Types-  ( LW, WriterState (stBeamer, stExternalNotes, stInMinipage, stMultiRow-                    , stNotes, stTable, stOptions) )-import Text.Pandoc.Writers.LaTeX.Util (labelFor)+  ( LW, WriterState (stBeamer, stInMinipage, stMultiRow+                    , stTable, stOptions) )+import Text.Pandoc.Writers.LaTeX.Util (labelFor, withExternalNotes,+                                       getAccumulatedNotes) import Text.Printf (printf) import qualified Text.Pandoc.Builder as B import qualified Text.Pandoc.Writers.AnnotatedTable as Ann@@ -46,30 +48,103 @@              -> Ann.Table              -> LW m (Doc Text) tableToLaTeX inlnsToLaTeX blksToLaTeX tbl = do+  let (Ann.Table (ident, classes, kvs) caption specs thead tbodies tfoot) = tbl+  let placement = brackets $ maybe mempty (text . T.unpack)+                           $ lookup "latex-placement" kvs+  -- if the float class is included in table attributes, we generate a floating+  -- table environment; otherwise we use longtable+  beamer <- gets stBeamer+  let float = "float" `elem` classes+  let renderTable = do+       capt <- captionToLaTeX inlnsToLaTeX caption ident+       let isSimpleTable =+             all ((== ColWidthDefault) . snd) specs &&+             all (all isSimpleCell)+               (mconcat [ headRows thead+                        , concatMap bodyRows tbodies+                        , footRows tfoot+                        ])+       let colDesc' = colDescriptors isSimpleTable tbl+       let colDesc = braces ("@{}" <> colDesc' <> "@{}")+                     -- the @{} removes extra space at beginning and end+       let colCount = ColumnCount $ length specs+       let mkHead = headToLaTeX blksToLaTeX isSimpleTable colCount+       let mkRow = rowToLaTeX blksToLaTeX isSimpleTable colCount BodyCell+       if float+          then tableToLaTeXTable placement colDesc mkHead mkRow capt thead tbodies tfoot+          else tableToLaTeXLongtable colDesc mkHead mkRow capt thead tbodies tfoot+  -- See #5367 -- footnotehyper/footnote don't work in beamer,+  -- so we need to produce the notes outside the table...+  if float || beamer+     then ($$) <$> withExternalNotes renderTable <*> getAccumulatedNotes+     else renderTable++tableToLaTeXTable :: PandocMonad m+                  => Doc Text+                  -> Doc Text+                  -> (Ann.TableHead -> LW m (Doc Text))+                  -> ([Ann.Cell] -> LW m (Doc Text))+                  -> Doc Text+                  -> Ann.TableHead+                  -> [Ann.TableBody]+                  -> Ann.TableFoot+                  -> LW m (Doc Text)+tableToLaTeXTable placement colDesc mkHead mkRow capt thead tbodies tfoot = do   opts <- gets stOptions-  let (Ann.Table (ident, _, _) caption specs thead tbodies tfoot) = tbl-  CaptionDocs capt captNotes <- captionToLaTeX inlnsToLaTeX caption ident   let hasTopCaption = not (isEmpty capt) &&                         writerTableCaptionPosition opts == CaptionAbove   let hasBottomCaption = not (isEmpty capt) &&                           writerTableCaptionPosition opts == CaptionBelow-  let isSimpleTable =-        all ((== ColWidthDefault) . snd) specs &&-        all (all isSimpleCell)-          (mconcat [ headRows thead-                   , concatMap bodyRows tbodies-                   , footRows tfoot-                   ])-  let removeNote (Note _) = Span ("", [], []) []-      removeNote x        = x-  let colCount = ColumnCount $ length specs+  head' <- if isEmptyHead thead+               then return "\\toprule\\noalign{}"+               else mkHead thead+  rows' <- mapM mkRow $ mconcat (map bodyRows tbodies)+  lastfoot <- mapM mkRow $ footRows tfoot+  let foot' = (if isEmptyFoot tfoot+                  then mempty+                  else "\\midrule\\noalign{}" $$ vcat lastfoot)+              $$ "\\bottomrule\\noalign{}"+  modify $ \s -> s{ stTable = True }+  let makeUnnumbered x = "{\\def\\LTcaptype{none} % do not increment counter" $$ x $$ "}"+  return+    $ (if null capt then makeUnnumbered else id)+    $ "\\begin{table}" <> placement+    $$ "\\centering"+    $$ (if hasTopCaption+           then capt <> "\\tabularnewline"+           else mempty)+    $$ "\\begin{tabular}" <> colDesc+    $$ head'+    $$ vcat rows'+    $$ foot'+    $$ "\\end{tabular}"+    $$ (if hasBottomCaption+           then capt <> "\\tabularnewline"+           else mempty)+    $$ "\\end{table}"+++tableToLaTeXLongtable :: PandocMonad m+                      => Doc Text+                      -> (Ann.TableHead -> LW m (Doc Text))+                      -> ([Ann.Cell] -> LW m (Doc Text))+                      -> Doc Text+                      -> Ann.TableHead+                      -> [Ann.TableBody]+                      -> Ann.TableFoot+                      -> LW m (Doc Text)+tableToLaTeXLongtable colDesc mkHead mkRow capt thead tbodies tfoot = do+  opts <- gets stOptions+  let hasTopCaption = not (isEmpty capt) &&+                        writerTableCaptionPosition opts == CaptionAbove+  let hasBottomCaption = not (isEmpty capt) &&+                          writerTableCaptionPosition opts == CaptionBelow   -- The first head is not repeated on the following pages. If we were to just   -- use a single head, without a separate first head, then the caption would be   -- repeated on all pages that contain a part of the table. We avoid this by   -- making the caption part of the first head. The downside is that we must   -- duplicate the header rows for this.   head' <- do-    let mkHead = headToLaTeX blksToLaTeX isSimpleTable colCount     case (hasTopCaption, isEmptyHead thead) of       (False, True) -> return "\\toprule\\noalign{}"       (False, False)  -> mkHead thead@@ -79,15 +154,15 @@       (True, False)   -> do         -- avoid duplicate notes in head and firsthead:         firsthead <- mkHead thead+        let removeNote (Note _) = Span ("", [], []) []+            removeNote x        = x         repeated  <- mkHead (walk removeNote thead)         return $ capt <> "\\tabularnewline"                  $$ firsthead                  $$ "\\endfirsthead"                  $$ repeated-  rows' <- mapM (rowToLaTeX blksToLaTeX isSimpleTable colCount BodyCell) $-                mconcat (map bodyRows tbodies)-  lastfoot <- mapM (rowToLaTeX blksToLaTeX isSimpleTable colCount BodyCell) $-                    footRows tfoot+  rows' <- mapM mkRow $ mconcat (map bodyRows tbodies)+  lastfoot <- mapM mkRow $ footRows tfoot   let foot' = (if isEmptyFoot tfoot                   then mempty                   else "\\midrule\\noalign{}" $$ vcat lastfoot)@@ -96,14 +171,11 @@                      then "\\tabularnewline" $$ capt                      else mempty)   modify $ \s -> s{ stTable = True }-  notes <- notesToLaTeX <$> gets stNotes   beamer <- gets stBeamer   let makeUnnumbered x = "{\\def\\LTcaptype{none} % do not increment counter" $$ x $$ "}"   return     $ (if null capt then makeUnnumbered else id)-    $ "\\begin{longtable}[]" <>-          braces ("@{}" <> colDescriptors isSimpleTable tbl <> "@{}")-          -- the @{} removes extra space at beginning and end+    $ "\\begin{longtable}[]" <> colDesc     $$ head'     $$ "\\endhead"     $$ vcat@@ -120,8 +192,6 @@                   ,  vcat rows'                   ])     $$ "\\end{longtable}"-    $$ captNotes-    $$ notes  isSimpleCell :: Ann.Cell -> Bool isSimpleCell (Ann.Cell _ _ (Cell _attr _align _rowspan _colspan blocks)) =@@ -184,28 +254,18 @@   AlignCenter  -> "c"   AlignDefault -> "l" -data CaptionDocs =-  CaptionDocs-  { captionCommand :: Doc Text-  , captionNotes :: Doc Text-  }- captionToLaTeX :: PandocMonad m                => ([Inline] -> LW m (Doc Text))                -> Caption                -> Text     -- ^ table identifier (label)-               -> LW m CaptionDocs+               -> LW m (Doc Text) captionToLaTeX inlnsToLaTeX caption ident = do-  (captionText, captForLot, captNotes) <- getCaption inlnsToLaTeX False caption+  (captionText, captForLot) <- getCaption inlnsToLaTeX caption   label <- labelFor ident-  return $ CaptionDocs-    { captionNotes = captNotes-    , captionCommand = if isEmpty captionText && isEmpty label-                       then empty-                       else "\\caption" <> captForLot <>-                            braces captionText-                            <> label-    }+  return $ if isEmpty captionText && isEmpty label+              then empty+              else "\\caption" <> captForLot <>+                     braces captionText <> label  type BlocksWriter m = [Block] -> LW m (Doc Text) @@ -322,11 +382,6 @@   let align = case align' of                 AlignDefault -> specAlign                 _            -> align'-  beamer <- gets stBeamer-  externalNotes <- gets stExternalNotes-  -- See #5367 -- footnotehyper/footnote don't work in beamer,-  -- so we need to produce the notes outside the table...-  modify $ \st -> st{ stExternalNotes = beamer }   let isPlainOrPara = \case         Para{}  -> True         Plain{} -> True@@ -352,7 +407,6 @@                   (if hasLineBreaks then "\\strut" else mempty)                   <> cr <>                   "\\end{minipage}"-  modify $ \st -> st{ stExternalNotes = externalNotes }   when (rowspan /= RowSpan 1) $     modify (\st -> st{ stMultiRow = True })   let inMultiColumn x = case colspan of
src/Text/Pandoc/Writers/LaTeX/Types.hs view
@@ -2,6 +2,7 @@   ( LW   , WriterState (..)   , startingState+  , PdfStandard (..)   ) where  import Control.Monad.State.Strict (StateT)@@ -55,6 +56,13 @@   , stInSoulCommand :: Bool          -- ^ in a soul command like ul   , stCancel        :: Bool          -- ^ true if document uses \cancel   , stInCaption     :: Bool          -- ^ true if in a caption+  }++-- | PDF standard settings for DocumentMetadata+data PdfStandard = PdfStandard+  { pdfStandards :: [Text]     -- ^ list of standards (e.g., ["a-2b", "ua-1"])+  , pdfVersion   :: Maybe Text -- ^ PDF version (e.g., "1.7", "2.0")+  , pdfTagging   :: Bool       -- ^ whether tagging is required   }  startingState :: WriterOptions -> WriterState
src/Text/Pandoc/Writers/LaTeX/Util.hs view
@@ -18,6 +18,8 @@   , labelFor   , getListingsLanguage   , mbBraced+  , withExternalNotes+  , getAccumulatedNotes   ) where @@ -27,6 +29,7 @@ import Text.Pandoc.Options (WriterOptions(..), isEnabled) import Text.Pandoc.Writers.LaTeX.Types (LW, WriterState(..)) import Text.Pandoc.Writers.LaTeX.Lang (toBabel)+import Text.Pandoc.Writers.LaTeX.Notes (notesToLaTeX) import Text.Pandoc.Highlighting (toListingsLanguage) import Text.DocLayout import Text.Pandoc.Definition@@ -285,3 +288,20 @@ mbBraced x = if not (T.all isAlphaNum x)                 then "{" <> x <> "}"                 else x++withExternalNotes :: PandocMonad m+                  => LW m a+                  -> LW m a+withExternalNotes p = do+  oldExternalNotes <- gets stExternalNotes+  modify $ \st -> st{ stExternalNotes = True }+  res <- p+  modify $ \st -> st{ stExternalNotes = oldExternalNotes }+  return res++getAccumulatedNotes :: PandocMonad m+                    => LW m (Doc Text)+getAccumulatedNotes = do+  res <- notesToLaTeX <$> gets stNotes+  modify $ \st -> st{ stNotes = [] }+  return res
src/Text/Pandoc/Writers/Man.hs view
@@ -14,7 +14,7 @@  -} module Text.Pandoc.Writers.Man ( writeMan ) where-import Control.Monad ( liftM, zipWithM, forM, unless )+import Control.Monad ( liftM, zipWithM, unless ) import Control.Monad.State.Strict ( StateT, gets, modify, evalStateT ) import Control.Monad.Trans (MonadTrans(lift)) import Data.List (intersperse)@@ -241,7 +241,7 @@   labelText <- inlineListToMan opts label   contents <- if null defs                  then return empty-                 else liftM vcat $ forM defs $ \case+                 else case mconcat defs of                           (x:xs) -> do                             first' <- blockToMan opts $                                       case x of
src/Text/Pandoc/Writers/Markdown.hs view
@@ -28,9 +28,10 @@ import Data.List (intersperse, sortOn, union, find) import Data.List.NonEmpty (nonEmpty, NonEmpty(..)) import qualified Data.Map as M-import Data.Maybe (fromMaybe, mapMaybe, isNothing)+import Data.Maybe (fromMaybe, mapMaybe, isNothing, isJust) import qualified Data.Set as Set import Data.Text (Text)+import Text.Read (readMaybe) import Data.Char (isSpace) import qualified Data.Text as T import Text.HTML.TagSoup (Tag (..), isTagText, parseTags)@@ -55,6 +56,7 @@                                            WriterState(..),                                            WriterEnv(..),                                            Ref, Refs, MD, evalMD)+import Skylighting (lookupSyntax)  -- | Convert Pandoc to Markdown. writeMarkdown :: PandocMonad m => WriterOptions -> Pandoc -> m Text@@ -177,12 +179,20 @@       if hasNewlines x          then hang 0 ("|" <> cr) x          else case x of-                Text _ t | isSpecialString t ->+                Text _ t | isSpecialString t || looksLikeNumber t ->                          "\"" <> fmap escapeInDoubleQuotes x <> "\""                 _ | isNothing (foldM needsDoubleQuotes True x) ->                          "\"" <> fmap escapeInDoubleQuotes x <> "\""                   | otherwise -> x     where+      -- we need to put quotes around numbers that begin with 0+      -- or have decimal points, because their YAML renderings+      -- may differ. See #11715.+      looksLikeNumber t = case readMaybe (T.unpack t) of+                     Nothing -> False+                     Just (_ :: Double) ->+                       (T.any (== '.') t && T.takeEnd 1 t == "0") ||+                       T.take 1 t == "0"       isSpecialString t = Set.member t specialStrings       specialStrings = Set.fromList        ["y", "Y", "yes", "Yes", "YES", "n", "N",@@ -376,15 +386,10 @@   | isEnabled Ext_alerts opts   , (cls:_) <- classes   , cls `elem` ["note", "tip", "warning", "caution", "important"]-  , (Div ("", ["title"], []) _ : Para ils : bs') <- bs-   = blockToMarkdown' opts $ BlockQuote $-       (Para (RawInline (Format "markdown") (case cls of-         "note" -> "[!NOTE]\n"-         "tip" -> "[!TIP]\n"-         "warning" -> "[!WARNING]\n"-         "caution" -> "[!CAUTION]\n"-         "important" -> "[!IMPORTANT]\n"-         _ -> "[!NOTE]\n") : ils)) : bs'+  , (Div ("", ["title"], []) _ : bs') <- bs = do+    contents <- blockListToMarkdown opts bs'+    let alertLabel = literal $ "[!" <> T.toUpper cls <> "]"+    pure $ text "> " <> alertLabel $$ prefixed "> " contents $$ blankline   | otherwise = do     contents <- blockListToMarkdown opts bs     variant <- asks envVariant@@ -529,15 +534,19 @@                        isEnabled Ext_attributes opts ->                                     space <> attrsToMarkdown opts attr                      | otherwise -> empty+  let setext = level <= 2 && writerSetextHeaders opts ||+                              (variant == Commonmark &&+                               hasLineBreaks inlines) -- #11341   contents <- inlineListToMarkdown opts $-                 -- ensure no newlines; see #3736-                 walk lineBreakToSpace $+                 (if variant == Commonmark && setext+                     then id+                     else -- ensure no newlines; see #3736+                          walk lineBreakToSpace) $                    if level == 1 && variant == PlainText &&                       isEnabled Ext_gutenberg opts                       then capitalize inlines                       else inlines -  let setext = writerSetextHeaders opts   when (not setext && isEnabled Ext_literate_haskell opts) $     report $ ATXHeadingInLHS level (render Nothing contents) @@ -579,7 +588,10 @@           tildes <> attrs <> cr <> literal str <> cr <> tildes <> blankline      _ | variant == Markua -> blankline <> attrsToMarkua opts attribs <> cr <> backticks <> cr <>                                 literal str <> cr <> backticks <> cr <> blankline-       | otherwise -> nest (writerTabStop opts) (literal str) <> blankline+       | otherwise -> -- don't use nest: see #11542+           let addIndent "" = "\n"+               addIndent x  = (T.replicate (writerTabStop opts) " ") <> x <> "\n"+          in  literal (mconcat $ map addIndent (T.lines str)) $$ blankline    where      endlineLen c = maybe 3 ((+1) . maximum) $ nonEmpty                         [T.length ln@@ -594,7 +606,7 @@                  then nowrap $ " " <> classOrAttrsToMarkdown opts attribs                  else                    let (_,cls,_) = attribs-                    in case getLangFromClasses cls of+                    in case getLangFromClasses opts cls of                               Just l -> " " <> literal l                               Nothing -> empty blockToMarkdown' opts (BlockQuote blocks) = do@@ -611,6 +623,9 @@   let (caption, aligns, widths, headers, rows) = toLegacyTable blkCapt specs thead tbody tfoot   let isColRowSpans (Cell _ _ rs cs _) = rs > 1 || cs > 1   let rowHasColRowSpans (Row _ cs) = any isColRowSpans cs+  let hasFooter = case tfoot of+                    TableFoot _ [] -> False+                    _ -> True   let tbodyHasColRowSpans (TableBody _ _ rhs rs) =         any rowHasColRowSpans rhs || any rowHasColRowSpans rs   let theadHasColRowSpans (TableHead _ rs) = any rowHasColRowSpans rs@@ -630,7 +645,8 @@         = blankline $$ (": " <> caption'') $$ blankline         | otherwise = blankline $$ caption'' $$ blankline   let hasSimpleCells = onlySimpleTableCells $ headers : rows-  let isSimple = hasSimpleCells && all (==0) widths && not hasColRowSpans+  let isSimple = hasSimpleCells && not hasFooter &&+                 all (==0) widths && not hasColRowSpans   let isPlainBlock (Plain _) = True       isPlainBlock _         = False   let hasBlocks = not (all (all (all isPlainBlock)) $ headers:rows)@@ -656,12 +672,13 @@          isEnabled Ext_pipe_tables opts -> do            tbl <- mkTable (pipeTable opts)            return $ (tbl $$ caption''') $$ blankline-       | not (hasBlocks || hasColRowSpans) &&+       | not (hasBlocks || hasColRowSpans || hasFooter) &&          isEnabled Ext_multiline_tables opts -> do            tbl <- mkTable (pandocTable opts True)            return $ nest 2 (tbl $$ caption''') $$ blankline        | isEnabled Ext_grid_tables opts &&-          (hasColRowSpans || writerColumns opts >= 8 * numcols) -> do+          (hasColRowSpans || writerColumns opts >= 8 * numcols+                          || hasFooter) -> do            tbl <- gridTable opts blockListToMarkdown                      specs thead tbody tfoot            return $ (tbl $$ caption''') $$ blankline@@ -707,13 +724,8 @@              | otherwise = DefaultDelim   let attribs = (start', sty', delim')   let markers  = orderedListMarkers attribs-  let markers' = case variant of-                        Markua -> markers-                        _ -> map (\m -> if T.length m < 3-                                   then m <> T.replicate (3 - T.length m) " "-                                   else m) markers   contents <- inList $-              zipWithM (orderedListItemToMarkdown opts) markers' items+              zipWithM (orderedListItemToMarkdown opts) markers items   return $ (if isTightList items then vcat else vsep) contents <> blankline blockToMarkdown' opts (DefinitionList items) = do   contents <- inList $ mapM (definitionListItemToMarkdown opts) items@@ -826,15 +838,18 @@   let exts = writerExtensions opts   contents <- blockListToMarkdown opts $ taskListItemToAscii exts bs   variant <- asks envVariant+  let beginsWithCodeBlock = case bs of+                             CodeBlock{} : _ -> True+                             _ -> False   let sps = case writerTabStop opts - T.length marker of-                   n | n > 0 -> literal $ T.replicate n " "-                   _ -> literal " "+                   _ | beginsWithCodeBlock -> 1 -- see #11762+                   _ | variant == Markua -> 1+                   n | n > 0 -> n+                   _ -> 1   let ind = if isEnabled Ext_four_space_rule opts                then writerTabStop opts-               else max (writerTabStop opts) (T.length marker + 1)-  let start = case variant of-              Markua -> literal marker <> " "-              _      -> literal marker <> sps+               else T.length marker + sps+  let start = literal marker <> literal (T.replicate sps " ")   -- remove trailing blank line if item ends with a tight list   let contents' = if itemEndsWithTightList bs                      then chomp contents <> cr@@ -858,8 +873,10 @@                         _ -> ":"        let leadingChars = case tabStop of                             -- Always use two leading characters for Markua-                            n | n >= 2 && variant /= Markua -> n-                            _ -> 2+                            n | variant == Markua -> 2+                              | isEnabled Ext_four_space_rule opts+                              , n >= 2 -> n+                              | otherwise -> 2        let sps = literal $ T.replicate (leadingChars - 1) " "        let isTight = case defs of                         ((Plain _ : _): _) -> True@@ -949,11 +966,11 @@  -- Identify the class in a list of classes that corresponds to -- the language syntax.  language-X turns to X.-getLangFromClasses :: [Text] -> Maybe Text-getLangFromClasses cs =+getLangFromClasses :: WriterOptions -> [Text] -> Maybe Text+getLangFromClasses opts cs =   case find ("language-" `T.isPrefixOf`) cs of     Just x -> Just (T.drop 9 x)     Nothing ->-      case filter (/= "sourceCode") cs of+      case [x | x <- cs, isJust (lookupSyntax x (writerSyntaxMap opts))] of         (x:_) -> Just x         [] -> Nothing
src/Text/Pandoc/Writers/Markdown/Inline.hs view
@@ -74,6 +74,9 @@     | isEnabled Ext_smart opts = '\\':'-':go('-':cs)   go ('.':'.':'.':cs)     | isEnabled Ext_smart opts = '\\':'.':'.':'.':go cs+  go (':':':':':':cs)+    | isEnabled Ext_fenced_divs opts -- see #11571+    = '\\':':':':':':': (takeWhile (==':') cs ++ go cs)   go (c:'_':d:cs)     | isAlphaNum c     , isAlphaNum d =@@ -89,6 +92,9 @@     | isEnabled Ext_mark opts = '\\':'=':go ('=':cs)   go ('~':'~':cs)     | isEnabled Ext_strikeout opts = '\\':'~':go ('~':cs)+  go ('&':cs)+    | Right _ <- parse characterReference "" ('&':cs)+    = '\\':'&': go cs   go (c:cs) =     case c of        '[' -> '\\':c:go cs@@ -500,24 +506,24 @@                         else escapeText opts) $ str   return $ literal str' inlineToMarkdown opts (Math InlineMath str) = do+  let str' = T.strip str   variant <- asks envVariant   case () of     _ | variant == Markua -> return $ "`" <> literal str <> "`" <> "$"       | otherwise -> case writerHTMLMathMethod opts of           WebTeX url ->-            let str' = T.strip str-             in inlineToMarkdown opts+             inlineToMarkdown opts                   (Image nullAttr [Str str'] (url <> urlEncode str', str'))           _ | isEnabled Ext_tex_math_gfm opts ->-                return $ "$`" <> literal str <> "`$"+                return $ "$`" <> literal str' <> "`$"             | isEnabled Ext_tex_math_dollars opts ->-                return $ delimited "$" "$" (literal str)+                return $ "$" <> literal str' <> "$"             | isEnabled Ext_tex_math_single_backslash opts ->-                return $ "\\(" <> literal str <> "\\)"+                return $ "\\(" <> literal str' <> "\\)"             | isEnabled Ext_tex_math_double_backslash opts ->-                return $ "\\\\(" <> literal str <> "\\\\)"+                return $ "\\\\(" <> literal str' <> "\\\\)"             | otherwise ->-                texMathToInlines InlineMath str >>=+                texMathToInlines InlineMath str' >>=                   inlineListToMarkdown opts .                     (if variant == PlainText then makeMathPlainer else id) @@ -540,7 +546,7 @@                              $$ literal (T.dropAround (=='\n') str)                              $$ literal "```") <> cr             | isEnabled Ext_tex_math_dollars opts ->-                return $ delimited "$$" "$$" (literal str)+                return $ "$$" <> literal str <> "$$"             | isEnabled Ext_tex_math_single_backslash opts ->                 return $ "\\[" <> literal str <> "\\]"             | isEnabled Ext_tex_math_double_backslash opts ->@@ -583,7 +589,7 @@   if variant == PlainText || isEnabled Ext_hard_line_breaks opts      then return cr      else return $-          if isEnabled Ext_escaped_line_breaks opts+          if variant == Commonmark || isEnabled Ext_escaped_line_breaks opts              then "\\" <> cr              else "  " <> cr inlineToMarkdown _ Space = do
src/Text/Pandoc/Writers/MediaWiki.hs view
@@ -26,7 +26,7 @@ import Text.Pandoc.ImageSize import Text.Pandoc.Logging import Text.Pandoc.Options-import Text.DocLayout (render, literal)+import Text.DocLayout import Text.Pandoc.Shared import Text.Pandoc.URI import Text.Pandoc.Templates (renderTemplate)@@ -61,21 +61,21 @@ pandocToMediaWiki (Pandoc meta blocks) = do   opts <- asks options   metadata <- metaToContext opts-              (fmap (literal . trimr) . blockListToMediaWiki)-              (fmap (literal . trimr) . inlineListToMediaWiki)+              (fmap chomp . blockListToMediaWiki)+              (fmap chomp . inlineListToMediaWiki)               meta   body <- blockListToMediaWiki blocks   notesExist <- gets stNotes   let notes = if notesExist-                 then "\n<references />"-                 else ""+                 then cr <> literal "<references />"+                 else mempty   let main = body <> notes   let context = defField "body" main                 $ defField "toc" (writerTableOfContents opts) metadata-  return $+  return $ render Nothing $     case writerTemplate opts of          Nothing  -> main-         Just tpl -> render Nothing $ renderTemplate tpl context+         Just tpl -> renderTemplate tpl context  -- | Escape special characters for MediaWiki. escapeText :: Text -> Text@@ -84,12 +84,14 @@ -- | Convert Pandoc block element to MediaWiki. blockToMediaWiki :: PandocMonad m                  => Block         -- ^ Block element-                 -> MediaWikiWriter m Text+                 -> MediaWikiWriter m (Doc Text)  blockToMediaWiki (Div attrs bs) = do   contents <- blockListToMediaWiki bs-  return $ render Nothing (tagWithAttrs "div" attrs) <> "\n\n" <>-                     contents <> "\n\n" <> "</div>"+  return $ tagWithAttrs "div" attrs $$+            contents $$+            literal "</div>" $$+            blankline  blockToMediaWiki (Plain inlines) =   inlineListToMediaWiki inlines@@ -97,60 +99,69 @@ blockToMediaWiki (SimpleFigure attr txt (src, tit)) = do   capt <- inlineListToMediaWiki txt   img  <- imageToMediaWiki attr+  let capt' = render Nothing capt   let opt = if T.null tit                then-                 if T.null capt+                 if T.null capt'                     then ""-                    else "alt=" <> capt+                    else "alt=" <> capt'                else "alt=" <> tit-  return $ "[[" <>-            T.intercalate "|"-            (filter (not . T.null) ["File:" <> src-                                 , "thumb"-                                 , "none"-                                 , img-                                 , opt-                                 , capt-                                 ]) <>-            "]]\n"+  let separator = "<nowiki></nowiki>"+  -- External images (URIs) cannot use [[File:...]] syntax;+  -- they must be rendered as bare URLs. MediaWiki will auto-embed+  -- them when $wgAllowExternalImages is enabled.+  return $ if isURI src+           then literal (separator <> src <> separator) <> cr+           else literal ("[[" <>+                  T.intercalate "|"+                  (filter (not . T.null) ["File:" <> src+                                       , "thumb"+                                       , "none"+                                       , img+                                       , opt+                                       , capt'+                                       ]) <>+                  "]]") <> cr  blockToMediaWiki (Para inlines) = do   tags <- asks useTags   lev <- asks listLevel   contents <- inlineListToMediaWiki inlines-  let initEsc = if startsWithListMarker contents -- #9700-                   then "\\"-                   else ""+  let contents' = render Nothing contents+  let initEsc = if startsWithListMarker contents'+                   then literal "<nowiki></nowiki>"+                   else mempty   return $ if tags-              then  "<p>" <> contents <> "</p>"-              else initEsc <> contents <> if null lev then "\n" else ""+              then literal "<p>" <> contents <> literal "</p>"+              else initEsc <> contents $$+                   if null lev then blankline else mempty  blockToMediaWiki (LineBlock lns) =   blockToMediaWiki $ linesToPara lns  blockToMediaWiki b@(RawBlock f str)-  | f == Format "mediawiki" = return str-  | f == Format "html"      = return str-  | otherwise               = "" <$ report (BlockNotRendered b)+  | f == Format "mediawiki" = return $ literal str+  | f == Format "html"      = return $ literal str+  | otherwise               = mempty <$ report (BlockNotRendered b) -blockToMediaWiki HorizontalRule = return "\n-----\n"+blockToMediaWiki HorizontalRule = return $ blankline <> literal "-----" <> blankline  blockToMediaWiki (Header level (ident,_,_) inlines) = do   let autoId = T.replace " " "_" $ stringify inlines   contents <- inlineListToMediaWiki inlines-  let eqs = T.replicate level "="+  let eqs = literal $ T.replicate level "="   return $     (if T.null ident || autoId == ident-        then ""-        else "<span id=\"" <> ident <> "\"></span>\n")-    <> eqs <> " " <> contents <> " " <> eqs <> "\n"+        then mempty+        else literal ("<span id=\"" <> ident <> "\"></span>") <> cr)+    <> eqs <> space <> contents <> space <> eqs <> blankline  blockToMediaWiki (CodeBlock (_,classes,keyvals) str) = do   let at  = Set.fromList classes `Set.intersection` highlightingLangs   let numberLines = any (`elem` ["number","numberLines", "number-lines"])                     classes   let start = lookup "startFrom" keyvals-  return $+  return $ literal $     case Set.toList at of        [] -> "<pre" <> (if null classes                            then ">"@@ -165,7 +176,7 @@  blockToMediaWiki (BlockQuote blocks) = do   contents <- blockListToMediaWiki blocks-  return $ "<blockquote>" <> contents <> "</blockquote>"+  return $ literal "<blockquote>" <> chomp contents <> cr <> literal "</blockquote>"  blockToMediaWiki (Table attr capt colSpecs thead tbody tfoot) = do     tableToMediaWiki (Ann.toTable attr capt colSpecs thead tbody tfoot)@@ -176,11 +187,11 @@   if tags      then do         contents <- local (\ s -> s { useTags = True }) $ mapM listItemToMediaWiki items-        return $ "<ul>\n" <> vcat contents <> "</ul>\n"+        return $ literal "<ul>" <> cr <> vcat contents <> literal "</ul>" <> blankline      else do         lev <- asks listLevel         contents <- local (\s -> s { listLevel = listLevel s <> "*" }) $ mapM listItemToMediaWiki items-        return $ vcat contents <> if null lev then "\n" else ""+        return $ vcat contents <> if null lev then blankline else mempty  blockToMediaWiki x@(OrderedList attribs items) = do   tags <-@@ -188,11 +199,11 @@   if tags      then do         contents <- local (\s -> s { useTags = True }) $ mapM listItemToMediaWiki items-        return $ "<ol" <> listAttribsToText attribs <> ">\n" <> vcat contents <> "</ol>\n"+        return $ literal ("<ol" <> listAttribsToText attribs <> ">") <> cr <> vcat contents <> literal "</ol>" <> blankline      else do         lev <- asks listLevel         contents <- local (\s -> s { listLevel = listLevel s <> "#" }) $ mapM listItemToMediaWiki items-        return $ vcat contents <> if null lev then "\n" else ""+        return $ vcat contents <> if null lev then blankline else mempty  blockToMediaWiki x@(DefinitionList items) = do   tags <-@@ -200,11 +211,11 @@   if tags      then do         contents <- local (\s -> s { useTags = True }) $ mapM definitionListItemToMediaWiki items-        return $ "<dl>\n" <> vcat contents <> "</dl>\n"+        return $ literal "<dl>" <> cr <> vcat contents <> literal "</dl>" <> blankline      else do         lev <- asks listLevel         contents <- local (\s -> s { listLevel = listLevel s <> ";" }) $ mapM definitionListItemToMediaWiki items-        return $ vcat contents <> if null lev then "\n" else ""+        return $ vcat contents <> if null lev then blankline else mempty  blockToMediaWiki (Figure (ident, classes, kvs) _ body) =   blockToMediaWiki (Div (ident, ["figure"] `DL.union` classes, kvs) body)@@ -223,20 +234,20 @@           else "")  -- | Convert bullet or ordered list item (list of blocks) to MediaWiki.-listItemToMediaWiki :: PandocMonad m => [Block] -> MediaWikiWriter m Text+listItemToMediaWiki :: PandocMonad m => [Block] -> MediaWikiWriter m (Doc Text) listItemToMediaWiki items = do   contents <- blockListToMediaWiki items   tags <- asks useTags   if tags-     then return $ "<li>" <> contents <> "</li>"+     then return $ literal "<li>" <> chomp contents <> literal "</li>"      else do        marker <- asks listLevel-       return $ T.pack marker <> " " <> contents+       return $ literal (T.pack marker) <> space <> chomp contents  -- | Convert definition list item (label, list of blocks) to MediaWiki. definitionListItemToMediaWiki :: PandocMonad m                               => ([Inline],[[Block]])-                              -> MediaWikiWriter m Text+                              -> MediaWikiWriter m (Doc Text) definitionListItemToMediaWiki (label, items) = do   modify $ \st -> st{ stInDefLabel = True }   labelText <- inlineListToMediaWiki label@@ -244,12 +255,12 @@   contents <- mapM blockListToMediaWiki items   tags <- asks useTags   if tags-     then return $ "<dt>" <> labelText <> "</dt>\n" <>-           T.intercalate "\n" (map (\d -> "<dd>" <> d <> "</dd>") contents)+     then return $ literal "<dt>" <> chomp labelText <> literal "</dt>" <> cr <>+           vcat (map (\d -> literal "<dd>" <> chomp d <> literal "</dd>") contents)      else do        marker <- asks listLevel-       return $ T.pack marker <> " " <> labelText <> "\n" <>-           T.intercalate "\n" (map (\d -> T.pack (init marker) <> ": " <> d) contents)+       return $ literal (T.pack marker) <> space <> chomp labelText <> cr <>+           vcat (map (\d -> literal (T.pack (init marker)) <> literal ": " <> chomp d) contents)  -- | True if the list can be handled by simple wiki markup, False if HTML tags will be needed. isSimpleList :: Block -> Bool@@ -286,59 +297,53 @@ isPlainOrPara (Para  _) = True isPlainOrPara _         = False --- | Concatenates strings with line breaks between them.-vcat :: [Text] -> Text-vcat = T.intercalate "\n"- -- Auxiliary functions for tables: -tableToMediaWiki :: PandocMonad m => Ann.Table -> MediaWikiWriter m Text+tableToMediaWiki :: PandocMonad m => Ann.Table -> MediaWikiWriter m (Doc Text) tableToMediaWiki (Ann.Table attr capt _ thead tbodies tfoot) = do     let (ident,classes,kvs) = attr     caption <- case capt of         Caption _ [] -> return mempty         Caption _ longCapt -> do             c <- blockListToMediaWiki longCapt-            return [ "|+ " <> trimr c ]+            return $ literal "|+ " <> chomp c <> cr     head' <- tableHeadToMW thead-    bodies' <- concat <$> mapM tableBodyToMW tbodies+    bodies' <- mconcat <$> mapM tableBodyToMW tbodies     foot' <- tableFootToMW tfoot-    return $ T.unlines $ [-            "{|" <> (render Nothing (htmlAttrs (ident, "wikitable":classes, kvs)))-        ] <> caption <> head' <> bodies' <> foot' <> [-            "|}"-        ]+    return $ literal "{|" <> htmlAttrs (ident, "wikitable":classes, kvs) <> cr+             <> caption <> head' <> bodies' <> foot'+             <> literal "|}" <> blankline -tableHeadToMW :: PandocMonad m => Ann.TableHead -> MediaWikiWriter m [Text]+tableHeadToMW :: PandocMonad m => Ann.TableHead -> MediaWikiWriter m (Doc Text) tableHeadToMW (Ann.TableHead _ rows) = headerRowsToMW rows -tableFootToMW :: PandocMonad m => Ann.TableFoot -> MediaWikiWriter m [Text]+tableFootToMW :: PandocMonad m => Ann.TableFoot -> MediaWikiWriter m (Doc Text) tableFootToMW (Ann.TableFoot _ rows) = headerRowsToMW rows -tableBodyToMW :: PandocMonad m => Ann.TableBody -> MediaWikiWriter m [Text]+tableBodyToMW :: PandocMonad m => Ann.TableBody -> MediaWikiWriter m (Doc Text) tableBodyToMW (Ann.TableBody _ _ headerRows bodyRows) = do   headerRows' <- headerRowsToMW headerRows   bodyRows' <- bodyRowsToMW bodyRows   return $ headerRows' <> bodyRows' -headerRowsToMW :: PandocMonad m => [Ann.HeaderRow] -> MediaWikiWriter m [Text]-headerRowsToMW rows = (\x -> mconcat x) <$> mapM headerRowToMW rows+headerRowsToMW :: PandocMonad m => [Ann.HeaderRow] -> MediaWikiWriter m (Doc Text)+headerRowsToMW rows = mconcat <$> mapM headerRowToMW rows -headerRowToMW :: PandocMonad m => Ann.HeaderRow -> MediaWikiWriter m [Text]+headerRowToMW :: PandocMonad m => Ann.HeaderRow -> MediaWikiWriter m (Doc Text) headerRowToMW (Ann.HeaderRow attr _ cells) = do-  cells' <- (\x -> mconcat x) <$> mapM (cellToMW "!") cells-  return $ ["|-" <> (render Nothing (htmlAttrs attr))] <> cells'+  cells' <- mconcat <$> mapM (cellToMW "!") cells+  return $ literal "|-" <> htmlAttrs attr <> cr <> cells' -bodyRowsToMW :: PandocMonad m => [Ann.BodyRow] -> MediaWikiWriter m [Text]-bodyRowsToMW rows = (\x -> mconcat x) <$> mapM bodyRowToMW rows+bodyRowsToMW :: PandocMonad m => [Ann.BodyRow] -> MediaWikiWriter m (Doc Text)+bodyRowsToMW rows = mconcat <$> mapM bodyRowToMW rows -bodyRowToMW :: PandocMonad m => Ann.BodyRow -> MediaWikiWriter m [Text]+bodyRowToMW :: PandocMonad m => Ann.BodyRow -> MediaWikiWriter m (Doc Text) bodyRowToMW (Ann.BodyRow attr _ headCells bodyCells) = do-  headCells' <- (\x -> mconcat x) <$> mapM (cellToMW "!") headCells-  bodyCells' <- (\x -> mconcat x) <$> mapM (cellToMW "|") bodyCells-  return $ ["|-" <> (render Nothing (htmlAttrs attr))] <> headCells' <> bodyCells'+  headCells' <- mconcat <$> mapM (cellToMW "!") headCells+  bodyCells' <- mconcat <$> mapM (cellToMW "|") bodyCells+  return $ literal "|-" <> htmlAttrs attr <> cr <> headCells' <> bodyCells' -cellToMW :: PandocMonad m => Text -> Ann.Cell -> MediaWikiWriter m [Text]+cellToMW :: PandocMonad m => Text -> Ann.Cell -> MediaWikiWriter m (Doc Text) cellToMW marker (Ann.Cell (colSpec :| _) _ (Cell attr align rowspan colspan content)) = do   content' <- blockListToMediaWiki content   let (ident,classes,keyVals) = attr@@ -355,14 +360,12 @@   let colspan' = case colspan of                   ColSpan 1 -> mempty                   ColSpan n -> [("colspan", T.pack(show n))]-  let attrs' = addPipeIfNotEmpty (render Nothing (htmlAttrs (ident, classes, rowspan' <> colspan' <> keyVals')))-  return [marker <> attrs' <> addSpaceIfNotEmpty(content')]--addPipeIfNotEmpty :: Text -> Text-addPipeIfNotEmpty f = if T.null f then f else f <> "|"--addSpaceIfNotEmpty :: Text -> Text-addSpaceIfNotEmpty f = if T.null f then f else " " <> f+  let attrs' = htmlAttrs (ident, classes, rowspan' <> colspan' <> keyVals')+  let attrsRendered = render Nothing attrs'+  let pipeAttr = if T.null attrsRendered then mempty else attrs' <> literal "|"+  let contentRendered = render Nothing content'+  let spaceContent = if T.null contentRendered then mempty else space <> chomp content'+  return $ literal marker <> pipeAttr <> spaceContent <> cr  imageToMediaWiki :: PandocMonad m => Attr -> MediaWikiWriter m Text imageToMediaWiki attr = do@@ -384,14 +387,14 @@ -- | Convert list of Pandoc block elements to MediaWiki. blockListToMediaWiki :: PandocMonad m                      => [Block]       -- ^ List of block elements-                     -> MediaWikiWriter m Text+                     -> MediaWikiWriter m (Doc Text) blockListToMediaWiki blocks =   vcat <$> mapM blockToMediaWiki blocks  -- | Convert list of Pandoc inline elements to MediaWiki.-inlineListToMediaWiki :: PandocMonad m => [Inline] -> MediaWikiWriter m Text+inlineListToMediaWiki :: PandocMonad m => [Inline] -> MediaWikiWriter m (Doc Text) inlineListToMediaWiki lst =-  fmap T.concat $ mapM inlineToMediaWiki $ fixup lst+  hcat <$> mapM inlineToMediaWiki (fixup lst)     where      fixup [] = []      fixup (Str t : x : xs)@@ -404,119 +407,129 @@      isLinkOrImage _         = False  -- | Convert Pandoc inline element to MediaWiki.-inlineToMediaWiki :: PandocMonad m => Inline -> MediaWikiWriter m Text+inlineToMediaWiki :: PandocMonad m => Inline -> MediaWikiWriter m (Doc Text)  inlineToMediaWiki (Span attrs ils) = do   contents <- inlineListToMediaWiki ils-  return $ render Nothing (tagWithAttrs "span" attrs) <> contents <> "</span>"+  return $ tagWithAttrs "span" attrs <> contents <> literal "</span>"  inlineToMediaWiki (Emph lst) = do   contents <- inlineListToMediaWiki lst-  return $ "''" <> contents <> "''"+  return $ literal "''" <> contents <> literal "''"  inlineToMediaWiki (Underline lst) = do   contents <- inlineListToMediaWiki lst-  return $ "<u>" <> contents <> "</u>"+  return $ literal "<u>" <> contents <> literal "</u>"  inlineToMediaWiki (Strong lst) = do   contents <- inlineListToMediaWiki lst-  return $ "'''" <> contents <> "'''"+  return $ literal "'''" <> contents <> literal "'''"  inlineToMediaWiki (Strikeout lst) = do   contents <- inlineListToMediaWiki lst-  return $ "<s>" <> contents <> "</s>"+  return $ literal "<s>" <> contents <> literal "</s>"  inlineToMediaWiki (Superscript lst) = do   contents <- inlineListToMediaWiki lst-  return $ "<sup>" <> contents <> "</sup>"+  return $ literal "<sup>" <> contents <> literal "</sup>"  inlineToMediaWiki (Subscript lst) = do   contents <- inlineListToMediaWiki lst-  return $ "<sub>" <> contents <> "</sub>"+  return $ literal "<sub>" <> contents <> literal "</sub>"  inlineToMediaWiki (SmallCaps lst) = inlineListToMediaWiki lst  inlineToMediaWiki (Quoted SingleQuote lst) = do   contents <- inlineListToMediaWiki lst-  return $ "\8216" <> contents <> "\8217"+  return $ literal "\8216" <> contents <> literal "\8217"  inlineToMediaWiki (Quoted DoubleQuote lst) = do   contents <- inlineListToMediaWiki lst-  return $ "\8220" <> contents <> "\8221"+  return $ literal "\8220" <> contents <> literal "\8221"  inlineToMediaWiki (Cite _  lst) = inlineListToMediaWiki lst  inlineToMediaWiki (Code _ str) =-  return $ "<code>" <> escapeText str <> "</code>"+  return $ literal $ "<code>" <> escapeText str <> "</code>"  inlineToMediaWiki (Str str) = do   inDefLabel <- gets stInDefLabel-  return $+  return $ literal $     if inDefLabel        then T.intercalate "<nowiki>:</nowiki>" $               map escapeText $ T.splitOn ":" str        else escapeText str -inlineToMediaWiki (Math mt str) = return $+inlineToMediaWiki (Math mt str) = return $ literal $   "<math display=\"" <>   (if mt == DisplayMath then "block" else "inline") <>   "\">" <> str <> "</math>"   -- note:  str should NOT be escaped  inlineToMediaWiki il@(RawInline f str)-  | f == Format "mediawiki" = return str-  | f == Format "html"      = return str-  | otherwise               = "" <$ report (InlineNotRendered il)+  | f == Format "mediawiki" = return $ literal str+  | f == Format "html"      = return $ literal str+  | otherwise               = mempty <$ report (InlineNotRendered il) -inlineToMediaWiki LineBreak = return "<br />\n"+inlineToMediaWiki LineBreak = return $ literal "<br />" <> cr  inlineToMediaWiki SoftBreak = do   wrapText <- gets (writerWrapText . stOptions)   listlevel <- asks listLevel   case wrapText of-       WrapAuto     -> return " "-       WrapNone     -> return " "+       WrapAuto     -> return space+       WrapNone     -> return space        WrapPreserve -> if null listlevel-                          then return "\n"-                          else return " "+                          then return cr+                          else return space -inlineToMediaWiki Space = return " "+inlineToMediaWiki Space = return space  inlineToMediaWiki (Link _ txt (src, _)) = do   -- We need to remove links from link text, because an <a> element is   -- not allowed inside another <a> element.   label <- inlineListToMediaWiki (removeLinks txt)+  let label' = render Nothing label   case txt of-     [Str s] | isURI src && escapeURI s == src -> return src-     _  -> return $ if isURI src-       then "[" <> src <> " " <> label <> "]"+     [Str s] | isURI src && escapeURI s == src -> return $ literal src+     _  -> return $ literal $ if isURI (T.takeWhile (/= '#') src) -- see #11562+       then "[" <> src <> " " <> label' <> "]"        else-         if src == label+         if src == label'            then "[[" <> src' <> "]]"-           else "[[" <> src' <> "|" <> label <> "]]"+           else "[[" <> src' <> "|" <> label' <> "]]"        -- with leading / it's a link to a help page        where src' = fromMaybe src $ T.stripPrefix "/" src  inlineToMediaWiki (Image attr alt (source, tit)) = do-  img  <- imageToMediaWiki attr-  alt' <- inlineListToMediaWiki alt-  let txt = if T.null alt'-               then if T.null tit-                       then ""-                       else tit-               else alt'-  return $ "[[" <>-           T.intercalate "|"-           (filter (not . T.null)-            [ "File:" <> source-            , img-            , txt-            ]) <> "]]"+  let separator = "<nowiki></nowiki>"+  -- External images (URIs) cannot use [[File:...]] syntax;+  -- they must be rendered as bare URLs. MediaWiki will auto-embed+  -- them when $wgAllowExternalImages is enabled.+  if isURI source+     then return $ literal $ separator <> source <> separator+     else do+       img  <- imageToMediaWiki attr+       alt' <- inlineListToMediaWiki alt+       let altText = render Nothing alt'+       let txt = if T.null altText+                    then if T.null tit+                            then ""+                            else tit+                    else altText+       return $ literal $ "[[" <>+                T.intercalate "|"+                (filter (not . T.null)+                 [ "File:" <> source+                 , img+                 , txt+                 ]) <> "]]"  inlineToMediaWiki (Note contents) = do   contents' <- blockListToMediaWiki contents   modify (\s -> s { stNotes = True })-  return $ "<ref>" <> stripTrailingNewlines contents' <> "</ref>"+  let rendered = render Nothing contents'+  return $ literal $ "<ref>" <> stripTrailingNewlines rendered <> "</ref>"   -- note - does not work for notes with multiple blocks  highlightingLangs :: Set.Set Text
src/Text/Pandoc/Writers/ODT.hs view
@@ -17,7 +17,7 @@ import Control.Monad.State.Strict (StateT, evalStateT, gets, modify, lift) import Control.Monad (MonadPlus(mplus)) import qualified Data.ByteString.Lazy as B-import Data.Maybe (fromMaybe)+import Data.Maybe (fromMaybe, listToMaybe) import Data.Generics (everywhere', mkT) import Data.List (isPrefixOf) import qualified Data.Map as Map@@ -102,7 +102,8 @@                                 readDataFile "reference.odt"   -- handle formulas and pictures   -- picEntriesRef <- P.newIORef ([] :: [Entry])-  doc' <- walkM (transformPicMath opts) $ walk fixDisplayMath doc+  let refTextWidth = referenceTextWidthPt opts refArchive+  doc' <- walkM (transformPicMath opts refTextWidth) $ walk fixDisplayMath doc   newContents <- lift $ writeOpenDocument opts{writerWrapText = WrapNone} doc'   epochtime <- floor `fmap` lift P.getPOSIXTime   let contentEntry = toEntry "content.xml" epochtime@@ -212,9 +213,10 @@                 . maybe id addLang mbLang                 . transformElement (\qn -> qName qn == "styles" &&                                       qPrefix qn == Just "office" )-                     (case writerHighlightMethod opts of+                     (addListItemStyles .+                      (case writerHighlightMethod opts of                         Skylighting style -> addHlStyles style-                        _ -> id)+                        _ -> id))                 $ d )         | otherwise = pure e   entries <- mapM goEntry (zEntries arch)@@ -228,6 +230,56 @@    isHlStyle (Elem e) = "Tok" `T.isSuffixOf` (qName (elName e))    isHlStyle _ = False +-- | Ensure the office:styles element contains paragraph styles for+-- list items used by the OpenDocument writer.  This injects only the+-- styles that are missing, so a user-supplied reference.odt may+-- override any of them.+addListItemStyles :: Element -> Element+addListItemStyles el =+  el{ elContent = elContent el ++ map Elem missingStyles }+ where+   existing = [ T.concat [ attrVal a+                         | a <- elAttribs e+                         , qName (attrKey a) == "name"+                         , qPrefix (attrKey a) == Just "style" ]+              | Elem e <- elContent el+              , qName (elName e) == "style"+              , qPrefix (elName e) == Just "style" ]+   missingStyles =+     [ s | s <- listItemStyleElements+         , styleNameOf s `notElem` existing ]+   styleNameOf e = T.concat [ attrVal a+                            | a <- elAttribs e+                            , qName (attrKey a) == "name"+                            , qPrefix (attrKey a) == Just "style" ]++listItemStyleElements :: [Element]+listItemStyleElements =+  [ mkParaStyle "List_20_Bullet" "List Bullet" Nothing+  , mkParaStyle "List_20_Bullet_20_Tight" "List Bullet Tight" (Just tightProps)+  , mkParaStyle "List_20_Number" "List Number" Nothing+  , mkParaStyle "List_20_Number_20_Tight" "List Number Tight" (Just tightProps)+  ]+ where+   styleQN n p = QName n Nothing (Just p)+   mkAttr p n v = Attr (styleQN n p) v+   tightProps =+     Element (styleQN "paragraph-properties" "style")+       [ mkAttr "fo" "margin-top" "0in"+       , mkAttr "fo" "margin-bottom" "0in"+       , mkAttr "style" "contextual-spacing" "false"+       ] [] Nothing+   mkParaStyle name display mbProps =+     Element (styleQN "style" "style")+       [ mkAttr "style" "name" name+       , mkAttr "style" "display-name" display+       , mkAttr "style" "family" "paragraph"+       , mkAttr "style" "parent-style-name" "List"+       , mkAttr "style" "class" "list"+       ]+       (maybe [] (\p -> [Elem p]) mbProps)+       Nothing+ -- top-down search transformElement :: (QName -> Bool)                  -> (Element -> Element)@@ -252,16 +304,49 @@           updateLangAttr x = x  -- | transform both Image and Math elements-transformPicMath :: PandocMonad m => WriterOptions ->Inline -> O m Inline-transformPicMath opts (Image attr@(id', cls, _) lab (src,t)) = catchError+-- | Width of the text area in points, from the reference document's+-- page layout (page width minus horizontal margins).  This mirrors how+-- the docx writer derives its print width from the reference docx+-- section properties.+referenceTextWidthPt :: WriterOptions -> Archive -> Maybe Double+referenceTextWidthPt opts archive = do+  entry <- findEntryByPath "styles.xml" archive+  styles <- either (const Nothing) Just $+    parseXMLElement $ toTextLazy $ fromEntry entry+  layout <- listToMaybe $ filterElementsName+    ((== "page-layout-properties") . qName) styles+  let dim attrName = do+        v <- findAttrBy ((== attrName) . qName) layout+        d <- lengthToDim v+        Just $ 72 * inInch opts d+  pageWidth <- dim "page-width"+  let margin = fromMaybe 0 . dim+  Just $ pageWidth - margin "margin-left" - margin "margin-right"++transformPicMath :: PandocMonad m+                 => WriterOptions -> Maybe Double -> Inline -> O m Inline+transformPicMath opts mbTextWidthPt (Image attr@(id', cls, _) lab (src,t)) =+  catchError    (do (img, mbMimeType) <- P.fetchItem src        (ptX, ptY) <- case imageSize opts img of                        Right s  -> return $ sizeInPoints s                        Left msg -> do                          report $ CouldNotDetermineImageSize src msg                          return (100, 100)+       let textWidthPt = fromMaybe 420 mbTextWidthPt        let dims =              case (getDim Width, getDim Height) of+               -- Percent dimensions are not valid ODF lengths.  When both+               -- dimensions are given and the width is relative, resolve+               -- it against the reference document's text width (as the+               -- docx writer does) and let the height follow the image's+               -- aspect ratio.+               (Just (Percent wp), Just _) ->+                 let wIn = wp / 100 * textWidthPt / 72+                 in [ ("width", tshow (Inch wIn))+                    , ("height", tshow (Inch (wIn / ratio))) ]+               (Just w@(Inch i), Just (Percent _)) ->+                 [("width", tshow w), ("height", tshow (Inch (i / ratio)))]                (Just w, Just h)              -> [("width", tshow w), ("height", tshow h)]                (Just w@(Percent _), Nothing) -> [("rel-width", tshow w),("rel-height", "scale"),("width", tshow ptX <> "pt"),("height", tshow ptY <> "pt")]                (Nothing, Just h@(Percent _)) -> [("rel-width", "scale"),("rel-height", tshow h),("width", tshow ptX <> "pt"),("height", tshow ptY <> "pt")]@@ -296,14 +381,18 @@        report $ CouldNotFetchResource src $ T.pack (show e)        return $ Emph lab) -transformPicMath _ (Math t math) = do+transformPicMath _ _ (Math t math) = do   entries <- gets stEntries   let dt = if t == InlineMath then DisplayInline else DisplayBlock-  case writeMathML dt <$> readTeX math of+  case readTeX math of        Left  _ -> return $ Math t math-       Right r -> do+       Right exps -> do          let conf = XL.useShortEmptyTags (const False) XL.defaultConfigPP-         let mathml = XL.ppcTopElement conf r+         let starMath =+               writeStarMath dt exps <> "\n" <> starMathCommentFromTeX math+         let mathmlElement =+               addStarMathAnnotation starMath (writeMathML dt exps)+         let mathml = XL.ppcTopElement conf mathmlElement          epochtime <- floor `fmap` lift P.getPOSIXTime          let dirname = "Formula-" ++ show (length entries) ++ "/"          let fname = dirname ++ "content.xml"@@ -326,7 +415,48 @@                                         , ("xlink:show", "embed")                                         , ("xlink:actuate", "onLoad")] -transformPicMath _ x = return x+transformPicMath _ _ x = return x++starMathCommentFromTeX :: T.Text -> T.Text+starMathCommentFromTeX tex =+  case T.lines normalized of+    []       -> "%% TeX:"+    (l : ls) ->+      T.intercalate "\n" (("%% TeX: " <> l) : map ("%% " <>) ls)+ where+  normalized = T.replace "\r\n" "\n" (T.replace "\r" "\n" tex)++addStarMathAnnotation :: T.Text -> XL.Element -> XL.Element+addStarMathAnnotation starMath e =+  case XL.elContent e of+    [XL.Elem sem] | XL.qName (XL.elName sem) == "semantics" ->+      e { XL.elContent = [XL.Elem (withAnnotation sem)] }+    _ ->+      e { XL.elContent = [XL.Elem (mkSemantics (XL.elContent e))] }+ where+  mkSemantics cs =+    XL.Element (mkMathQName "semantics") [] (cs ++ [XL.Elem annotation]) Nothing++  withAnnotation sem =+    sem { XL.elContent =+            filter (not . isStarMathAnnotation) (XL.elContent sem)+            ++ [XL.Elem annotation] }++  annotation =+    XL.Element (mkMathQName "annotation")+      [XL.Attr (XL.QName "encoding" Nothing Nothing) "StarMath 5.0"]+      [XL.Text (XL.CData XL.CDataText (T.unpack starMath) Nothing)]+      Nothing++  isStarMathAnnotation (XL.Elem el) =+    XL.qName (XL.elName el) == "annotation" &&+    any (\a -> XL.qName (XL.attrKey a) == "encoding"+               && XL.attrVal a == "StarMath 5.0")+        (XL.elAttribs el)+  isStarMathAnnotation _ = False++  mkMathQName n =+    XL.QName n (XL.qURI $ XL.elName e) (XL.qPrefix $ XL.elName e)  documentSettings :: Bool -> B.ByteString documentSettings isTextMode = fromStringLazy $ render Nothing
src/Text/Pandoc/Writers/OpenDocument.hs view
@@ -19,7 +19,8 @@ import Control.Monad.State.Strict ( StateT(..), modify, gets, lift ) import Data.Char (chr) import Data.Foldable (find)-import Data.List (sortOn, sortBy, foldl')+import Data.List (sortOn, sortBy)+import qualified Data.List as L import qualified Data.Map as Map import Data.Ord (comparing, Down (Down)) import qualified Data.Set as Set@@ -50,6 +51,29 @@ plainToPara (Plain x) = Para x plainToPara x         = x +-- Names of predefined styles in the reference.odt; see data/odt/styles.xml.+defaultBulletListStyleName, defaultNumberedListStyleName :: Text+defaultBulletListStyleName   = "List_20_1"+defaultNumberedListStyleName = "Numbering_20_1"++bulletItemStyleName, bulletItemTightStyleName,+  numberItemStyleName, numberItemTightStyleName :: Text+bulletItemStyleName      = "List_20_Bullet"+bulletItemTightStyleName = "List_20_Bullet_20_Tight"+numberItemStyleName      = "List_20_Number"+numberItemTightStyleName = "List_20_Number_20_Tight"++-- | Predefined inline style names for single-style spans.+wellKnownTextStyle :: Set.Set TextStyle -> Maybe Text+wellKnownTextStyle s = case Set.toList s of+  [Italic] -> Just "Emphasis"+  [Bold]   -> Just "Strong_20_Emphasis"+  [Strike] -> Just "Strikeout"+  [Sub]    -> Just "Subscript"+  [Sup]    -> Just "Superscript"+  [Pre]    -> Just "Source_20_Text"+  _        -> Nothing+ -- -- OpenDocument writer --@@ -65,7 +89,8 @@     WriterState { stNotes          :: [Doc Text]                 , stTableStyles    :: [Doc Text]                 , stParaStyles     :: [Doc Text]-                , stListStyles     :: [(Int, [Doc Text])]+                , stListOverrides  :: Map.Map (ListNumberStyle,ListNumberDelim)+                                        (Text, Doc Text)                 , stTextStyles     :: Map.Map (Set.Set TextStyle)                                         (Text, Doc Text)                 , stTextStyleAttr  :: Set.Set TextStyle@@ -84,7 +109,7 @@     WriterState { stNotes          = []                 , stTableStyles    = []                 , stParaStyles     = []-                , stListStyles     = []+                , stListOverrides  = Map.empty                 , stTextStyles     = Map.empty                 , stTextStyleAttr  = Set.empty                 , stIndentPara     = 0@@ -120,10 +145,6 @@ resetIndent :: PandocMonad m => OD m () resetIndent = modify $ \s -> s { stIndentPara = stIndentPara s - 1 } -inTightList :: PandocMonad m => OD m a -> OD m a-inTightList  f = modify (\s -> s { stTight = True  }) >> f >>= \r ->-                 modify (\s -> s { stTight = False }) >> return r- setInDefinitionList :: PandocMonad m => Bool -> OD m () setInDefinitionList b = modify $  \s -> s { stInDefinition = b } @@ -162,22 +183,25 @@   at <- gets stTextStyleAttr   if Set.null at      then return d-     else do-       styles <- gets stTextStyles-       case Map.lookup at styles of-            Just (styleName, _) -> return $-              inTags False "text:span" [("text:style-name",styleName)] d-            Nothing -> do-              let styleName = "T" <> tshow (Map.size styles + 1)-              addTextStyle at (styleName,-                     inTags False "style:style"-                       [("style:name", styleName)-                       ,("style:family", "text")]-                       $ selfClosingTag "style:text-properties"-                          (sortOn fst . Map.toList-                                $ foldl' textStyleAttr mempty (Set.toList at)))-              return $ inTags False-                  "text:span" [("text:style-name",styleName)] d+     else case wellKnownTextStyle at of+       Just styleName -> return $+         inTags False "text:span" [("text:style-name", styleName)] d+       Nothing -> do+         styles <- gets stTextStyles+         case Map.lookup at styles of+              Just (styleName, _) -> return $+                inTags False "text:span" [("text:style-name",styleName)] d+              Nothing -> do+                let styleName = "T" <> tshow (Map.size styles + 1)+                addTextStyle at (styleName,+                       inTags False "style:style"+                         [("style:name", styleName)+                         ,("style:family", "text")]+                         $ selfClosingTag "style:text-properties"+                            (sortOn fst . Map.toList+                                  $ L.foldl' textStyleAttr mempty (Set.toList at)))+                return $ inTags False+                    "text:span" [("text:style-name",styleName)] d  formulaStyles :: [Doc Text] formulaStyles = [formulaStyle InlineMath, formulaStyle DisplayMath]@@ -262,10 +286,8 @@   let styles   = stTableStyles s ++ stParaStyles s ++ formulaStyles ++                      map snd (sortBy (comparing (Down . fst)) (                         Map.elems (stTextStyles s)))-      listStyle (n,l) = inTags True "text:list-style"-                          [("style:name", "L" <> tshow n)] (vcat l)-  let listStyles  = map listStyle (stListStyles s)-  let automaticStyles = vcat $ reverse $ styles ++ listStyles+  let listStyles  = map snd (Map.elems (stListOverrides s))+  let automaticStyles = vcat $ reverse styles ++ listStyles   let context = defField "body" body               . defField "toc" (writerTableOfContents opts)               . defField "toc-depth" (tshow $ writerTOCDepth opts)@@ -285,56 +307,101 @@ withParagraphStyle _ _ [] = return empty  inPreformattedTags :: PandocMonad m => [Doc Text] -> OD m (Doc Text)-inPreformattedTags s = do-  n <- paraStyle [("style:parent-style-name","Preformatted_20_Text")]-  return $ inParagraphTagsWithStyle ("P" <> tshow n) $ hcat s+inPreformattedTags s =+  return $ inParagraphTagsWithStyle "Preformatted_20_Text" $ hcat s +-- | Get the list-style name to use for an ordered list with the given+-- numbering style and delimiter, registering an override automatic style+-- if needed.  Lists with default style/delimiter use the predefined+-- @Numbering_20_1@ style and no override is generated.+orderedListStyleName :: PandocMonad m+                     => ListNumberStyle -> ListNumberDelim -> OD m Text+orderedListStyleName ns nd+  | (ns == DefaultStyle || ns == Decimal) &&+    (nd == DefaultDelim || nd == Period) =+      return defaultNumberedListStyleName+  | otherwise = do+      overrides <- gets stListOverrides+      case Map.lookup (ns, nd) overrides of+        Just (name, _) -> return name+        Nothing -> do+          let name = "Pandoc_5f_Numbering_5f_" <>+                       tshow (Map.size overrides + 1)+              doc = inTags True "text:list-style"+                      [("style:name", name)]+                      (vcat (map (orderedListLevel ns nd) [1..10]))+          modify $ \s -> s { stListOverrides =+                               Map.insert (ns, nd) (name, doc)+                                          (stListOverrides s) }+          return name++orderedListLevel :: ListNumberStyle -> ListNumberDelim -> Int -> Doc Text+orderedListLevel ns nd lvl =+    let suffix = case nd of+                   OneParen  -> [("style:num-suffix", ")")]+                   TwoParens -> [("style:num-prefix", "(")+                                ,("style:num-suffix", ")")]+                   _         -> [("style:num-suffix", ".")]+        format = case ns of+                   UpperAlpha -> "A"+                   LowerAlpha -> "a"+                   UpperRoman -> "I"+                   LowerRoman -> "i"+                   _          -> "1"+    in inTags True "text:list-level-style-number"+              ([ ("text:level"      , tshow lvl)+               , ("text:style-name" , "Numbering_20_Symbols")+               , ("style:num-format", format)+               ] ++ suffix)+              (selfClosingTag "style:list-level-properties"+                 [ ("text:space-before",+                      T.pack (printf "%.4fin" (0.1972 * fromIntegral (lvl - 1) :: Double)))+                 , ("text:min-label-width", "0.1965in")+                 , ("text:min-label-distance", "0.1in")+                 ])+ orderedListToOpenDocument :: PandocMonad m-                          => WriterOptions -> Int -> [[Block]] -> OD m (Doc Text)-orderedListToOpenDocument o pn bs =+                          => WriterOptions -> Text -> [[Block]]+                          -> OD m (Doc Text)+orderedListToOpenDocument o paraName bs =     vcat . map (inTagsIndented "text:list-item") <$>-    mapM (orderedItemToOpenDocument o pn . map plainToPara) bs+    mapM (orderedItemToOpenDocument o paraName . map plainToPara) bs  orderedItemToOpenDocument :: PandocMonad m-                          => WriterOptions -> Int -> [Block] -> OD m (Doc Text)-orderedItemToOpenDocument  o n bs = vcat <$> mapM go bs- where go (OrderedList a l) = newLevel a l-       go (Para          l) = inParagraphTagsWithStyle ("P" <> tshow n) <$>+                          => WriterOptions -> Text -> [Block]+                          -> OD m (Doc Text)+orderedItemToOpenDocument  o paraName bs = vcat <$> mapM go bs+ where go (OrderedList a l) = orderedList a l+       go (Para          l) = inParagraphTagsWithStyle paraName <$>                                 inlinesToOpenDocument o l        go b                 = blockToOpenDocument o b-       newLevel a l = do-         nn <- length <$> gets stParaStyles-         liststyles <- gets stListStyles-         let ls = case liststyles of-                    [] -> (1,[])  -- should never happen-                    (s:_) -> s-         modify $ \s -> s { stListStyles = orderedListLevelStyle a ls :-                                 drop 1 (stListStyles s) }-         inTagsIndented "text:list" <$> orderedListToOpenDocument o nn l+       orderedList a@(_,ns,nd) l = do+         lstName <- orderedListStyleName ns nd+         let pn = if isTightList l then numberItemTightStyleName+                                   else numberItemStyleName+         let listAttrs = ("text:style-name", lstName) : startValueAttr a+         inTags True "text:list" listAttrs <$>+           orderedListToOpenDocument o pn l +-- | Generate a @text:start-value@ attribute when the start value is not 1.+startValueAttr :: ListAttributes -> [(Text, Text)]+startValueAttr (s,_,_) | s /= 1 = [("text:start-value", tshow s)]+startValueAttr _                = []+ isTightList :: [[Block]] -> Bool isTightList []          = False isTightList (b:_)     | Plain {} : _ <- b = True     | otherwise         = False -newOrderedListStyle :: PandocMonad m-                    => Bool -> ListAttributes -> OD m (Int,Int)-newOrderedListStyle b a = do-  ln <- (+) 1 . length  <$> gets stListStyles-  let nbs = orderedListLevelStyle a (ln, [])-  pn <- if b then inTightList (paraListStyle ln) else paraListStyle ln-  modify $ \s -> s { stListStyles = nbs : stListStyles s }-  return (ln,pn)- bulletListToOpenDocument :: PandocMonad m                          => WriterOptions -> [[Block]] -> OD m (Doc Text) bulletListToOpenDocument o b = do-  ln <- (+) 1 . length <$> gets stListStyles-  (pn,ns) <- if isTightList b then inTightList (bulletListStyle ln) else bulletListStyle ln-  modify $ \s -> s { stListStyles = ns : stListStyles s }-  is <- listItemsToOpenDocument ("P" <> tshow pn) o b-  return $ inTags True "text:list" [("text:style-name", "L" <> tshow ln)] is+  let pn = if isTightList b then bulletItemTightStyleName+                            else bulletItemStyleName+  is <- listItemsToOpenDocument pn o b+  return $ inTags True "text:list"+             [("text:style-name", defaultBulletListStyleName)] is  listItemsToOpenDocument :: PandocMonad m                         => Text -> WriterOptions -> [[Block]] -> OD m (Doc Text)@@ -353,16 +420,18 @@   return $ t' $$ d'  inBlockQuote :: PandocMonad m-             => WriterOptions -> Int -> [Block] -> OD m (Doc Text)-inBlockQuote  o i (b:bs)+             => WriterOptions -> Text -> [Block] -> OD m (Doc Text)+inBlockQuote  o sty (b:bs)     | BlockQuote l <- b = do increaseIndent                              ni <- paraStyle                                    [("style:parent-style-name","Quotations")]-                             go =<< inBlockQuote o ni (map plainToPara l)-    | Para       l <- b = go =<< inParagraphTagsWithStyle ("P" <> tshow i) <$> inlinesToOpenDocument o l+                             inner <- inBlockQuote o ni (map plainToPara l)+                             resetIndent+                             go inner+    | Para       l <- b = go =<< inParagraphTagsWithStyle sty <$> inlinesToOpenDocument o l     | otherwise         = go =<< blockToOpenDocument o b-    where go  block  = ($$) block <$> inBlockQuote o i bs-inBlockQuote     _ _ [] =  resetIndent >> return empty+    where go  block  = ($$) block <$> inBlockQuote o sty bs+inBlockQuote     _ _ [] = return empty  -- | Convert a list of Pandoc blocks to OpenDocument. blocksToOpenDocument :: PandocMonad m => WriterOptions -> [Block] -> OD m (Doc Text)@@ -424,13 +493,16 @@         if T.null ident           then i           else fmap mkBookmarkedDiv i-      mkBlockQuote  b = do increaseIndent-                           i <- paraStyle-                                 [("style:parent-style-name","Quotations")]-                           inBlockQuote o i (map plainToPara b)-      orderedList a b = do (ln,pn) <- newOrderedListStyle (isTightList b) a-                           inTags True "text:list" [ ("text:style-name", "L" <> tshow ln)]-                                      <$> orderedListToOpenDocument o pn b+      mkBlockQuote  b = do sty <- paraStyle+                                    [("style:parent-style-name","Quotations")]+                           inBlockQuote o sty (map plainToPara b)+      orderedList a@(_,ns,nd) b = do+        lstName <- orderedListStyleName ns nd+        let pn = if isTightList b then numberItemTightStyleName+                                  else numberItemStyleName+        let listAttrs = ("text:style-name", lstName) : startValueAttr a+        inTags True "text:list" listAttrs <$>+          orderedListToOpenDocument o pn b       table :: PandocMonad m => WriterOptions -> Ann.Table -> OD m (Doc Text)       table opts           (Ann.Table (ident, _, _) (Caption _ c) colspecs thead tbodies tfoot) = do@@ -590,14 +662,9 @@       aa = alignAttrib align       a = [ ("table:style-name" , s )           , ("office:value-type", "string" ) ] ++ csa ++ rsa-  itemParaStyle <- case aa of-                     [] -> return 0-                     _  -> paraStyleFromParent n aa-  let itemParaStyle' = case itemParaStyle of-                         0 -> n-                         x -> "P" <> tshow x+  itemParaStyle <- paraStyleFromParent n aa   inTags True "table:table-cell" a <$>-    withParagraphStyle o itemParaStyle' (map plainToPara i)+    withParagraphStyle o itemParaStyle (map plainToPara i)  -- | Convert a list of inline elements to OpenDocument. inlinesToOpenDocument :: PandocMonad m => WriterOptions -> [Inline] -> OD m (Doc Text)@@ -670,7 +737,7 @@     where       unhighlighted s = inlinedCode $ preformatted s       inlinedCode s = return $ inTags False "text:span"-                                 [("text:style-name", "Source_Text")] s+                                 [("text:style-name", "Source_20_Text")] s       mkImg (_, _, kvs) s _ = do                id' <- gets stImageId                modify (\st -> st{ stImageId = id' + 1 })@@ -680,8 +747,14 @@                    getDims (("height", h):xs) = ("svg:height", h) : getDims xs                    getDims (("rel-height", w):xs) = ("style:rel-height", w) : getDims xs                    getDims (_:xs) =                             getDims xs+               -- Image is an Inline: anchor the frame as a character so+               -- it flows with the text.  Without an explicit anchor,+               -- consumers default to paragraph anchoring and float the+               -- frame beside the following text.                return $ inTags False "draw:frame"-                        (("draw:name", "img" <> tshow id') : getDims kvs) $+                        (("draw:name", "img" <> tshow id')+                         : ("text:anchor-type", "as-char")+                         : getDims kvs) $                      selfClosingTag "draw:image" [ ("xlink:href"   , s       )                                                  , ("xlink:type"   , "simple")                                                  , ("xlink:show"   , "embed" )@@ -760,55 +833,6 @@             then linkOrReference             else link -bulletListStyle :: PandocMonad m => Int -> OD m (Int,(Int,[Doc Text]))-bulletListStyle l = do-  let doStyles  i = inTags True "text:list-level-style-bullet"-                    [ ("text:level"      , tshow (i + 1))-                    , ("text:style-name" , "Bullet_20_Symbols"  )-                    , ("style:num-suffix", "."                  )-                    , ("text:bullet-char", T.singleton (bulletList !! i))-                    ] (listLevelStyle (1 + i))-      bulletList  = map chr $ cycle [8226,9702,9642]-      listElStyle = map doStyles [0..9]-  pn <- paraListStyle l-  return (pn, (l, listElStyle))--orderedListLevelStyle :: ListAttributes -> (Int, [Doc Text]) -> (Int,[Doc Text])-orderedListLevelStyle (s,n, d) (l,ls) =-    let suffix    = case d of-                      OneParen  -> [("style:num-suffix", ")")]-                      TwoParens -> [("style:num-prefix", "(")-                                   ,("style:num-suffix", ")")]-                      _         -> [("style:num-suffix", ".")]-        format    = case n of-                      UpperAlpha -> "A"-                      LowerAlpha -> "a"-                      UpperRoman -> "I"-                      LowerRoman -> "i"-                      _          -> "1"-        listStyle = inTags True "text:list-level-style-number"-                    ([ ("text:level"      , tshow $ 1 + length ls )-                     , ("text:style-name" , "Numbering_20_Symbols")-                     , ("style:num-format", format                )-                     , ("text:start-value", tshow s               )-                     ] ++ suffix) (listLevelStyle (1 + length ls))-    in  (l, ls ++ [listStyle])--listLevelStyle :: Int -> Doc Text-listLevelStyle i =-    let indent = tshow (0.25 + (0.25 * fromIntegral i :: Double)) in-    inTags True "style:list-level-properties"-                       [ ("text:list-level-position-and-space-mode",-                          "label-alignment")-                       , ("fo:text-align", "right")-                       ] $-       selfClosingTag "style:list-level-label-alignment"-                      [ ("text:label-followed-by", "listtab")-                      , ("text:list-tab-stop-position", indent <> "in")-                      , ("fo:text-indent", "-0.25in")-                      , ("fo:margin-left", indent <> "in")-                      ]- tableStyle :: Int -> Double -> [(Char,Double)] -> Doc Text tableStyle num textWidth wcs =     let tableId        = "Table" <> tshow (num + 1)@@ -846,15 +870,17 @@         columnStyles   = map colStyle wcs     in cellStyles $$ table $$ vcat columnStyles -paraStyle :: PandocMonad m => [(Text,Text)] -> OD m Int+-- | Generate (or reuse) a paragraph style with the given attributes.+-- When the only attribute is @style:parent-style-name@ and no+-- indent/tight overrides are active, the parent name is returned+-- directly (no @Pn@ automatic style is created), so that the+-- predefined style passes through unchanged.+paraStyle :: PandocMonad m => [(Text,Text)] -> OD m Text paraStyle attrs = do-  pn <- (+)   1 . length       <$> gets stParaStyles   i  <- (*) (0.5 :: Double) . fromIntegral <$> gets stIndentPara   b  <- gets stInDefinition   t  <- gets stTight-  let styleAttr = [ ("style:name"             , "P" <> tshow pn)-                  , ("style:family"           , "paragraph"   )]-      indentVal = flip (<>) "in" . tshow $ if b then max 0.5 i else i+  let indentVal = flip (<>) "in" . tshow $ if b then max 0.5 i else i       tight     = if t then [ ("fo:margin-top"          , "0in"    )                             , ("fo:margin-bottom"       , "0in"    )]                        else []@@ -865,31 +891,32 @@                            , ("style:auto-text-indent" , "false"  )]                       else []       attributes = indent <> tight-      paraProps = if null attributes-                     then mempty-                     else selfClosingTag-                             "style:paragraph-properties" attributes-  addParaStyle $ inTags True "style:style" (styleAttr <> attrs) paraProps-  return pn--paraStyleFromParent :: PandocMonad m => Text -> [(Text,Text)] -> OD m Int-paraStyleFromParent parent attrs = do-  pn <- (+) 1 . length  <$> gets stParaStyles-  let styleAttr = [ ("style:name"             , "P" <> tshow pn)-                  , ("style:family"           , "paragraph")-                  , ("style:parent-style-name", parent)]-      paraProps = if null attrs-                     then mempty-                     else selfClosingTag-                          "style:paragraph-properties" attrs-  addParaStyle $ inTags True "style:style" styleAttr paraProps-  return pn-+  case (attributes, attrs) of+    ([], [("style:parent-style-name", parent)]) -> return parent+    _ -> do+      pn <- (+) 1 . length <$> gets stParaStyles+      let name      = "P" <> tshow pn+          styleAttr = [ ("style:name"  , name)+                      , ("style:family", "paragraph") ]+          paraProps = if null attributes+                         then mempty+                         else selfClosingTag+                                 "style:paragraph-properties" attributes+      addParaStyle $ inTags True "style:style" (styleAttr <> attrs) paraProps+      return name -paraListStyle :: PandocMonad m => Int -> OD m Int-paraListStyle l = paraStyle-  [("style:parent-style-name","Text_20_body")-  ,("style:list-style-name", "L" <> tshow l)]+paraStyleFromParent :: PandocMonad m => Text -> [(Text,Text)] -> OD m Text+paraStyleFromParent parent attrs+  | null attrs = return parent+  | otherwise  = do+      pn <- (+) 1 . length <$> gets stParaStyles+      let name      = "P" <> tshow pn+          styleAttr = [ ("style:name"             , name)+                      , ("style:family"           , "paragraph")+                      , ("style:parent-style-name", parent)]+          paraProps = selfClosingTag "style:paragraph-properties" attrs+      addParaStyle $ inTags True "style:style" styleAttr paraProps+      return name  paraTableStyles :: Text -> Int -> [Alignment] -> [(Text, Doc Text)] paraTableStyles _ _ [] = []
src/Text/Pandoc/Writers/Powerpoint/Output.hs view
@@ -1365,6 +1365,132 @@ shapesToElements layout shps =  concat <$> mapM (shapeToElements layout) shps +-- | Create a GraphicFrame element with explicit positioning+graphicFrameToElementsWithPosition ::+  PandocMonad m =>+  Integer ->  -- x position+  Integer ->  -- y position+  Integer ->  -- width (cx)+  Integer ->  -- height (cy)+  [Graphic] ->+  [ParaElem] ->+  P m [(ShapeId, Element)]+graphicFrameToElementsWithPosition x y cx cy tbls caption = do+  let cy' = if not $ null caption then cy - captionHeight else cy++  elements <- mapM (graphicToElement cx) tbls+  let graphicFrameElts =+        ( 6+        , mknode "p:graphicFrame" [] $+          [ mknode "p:nvGraphicFramePr" []+            [ mknode "p:cNvPr" [("id", "6"), ("name", "Content Placeholder 5")] ()+            , mknode "p:cNvGraphicFramePr" []+              [mknode "a:graphicFrameLocks" [("noGrp", "1")] ()]+            , mknode "p:nvPr" []+              [mknode "p:ph" [("idx", "1")] ()]+            ]+          , mknode "p:xfrm" []+            [ mknode "a:off" [("x", tshow $ 12700 * x),+                              ("y", tshow $ 12700 * y)] ()+            , mknode "a:ext" [("cx", tshow $ 12700 * cx),+                              ("cy", tshow $ 12700 * cy')] ()+            ]+          ] <> elements+        )++  if not $ null caption+    then do capElt <- createCaption ((x, y), (cx, cy)) caption+            return [graphicFrameElts, capElt]+    else return [graphicFrameElts]++-- | Create a TextBox element with explicit positioning+textBoxToElementWithPosition ::+  PandocMonad m =>+  Element ->+  Integer ->  -- x position+  Integer ->  -- y position+  Integer ->  -- width (cx)+  Integer ->  -- height (cy)+  [Paragraph] ->+  P m (Maybe ShapeId, Element)+textBoxToElementWithPosition layout x y cx cy paras+  | ns <- elemToNameSpaces layout+  , Just cSld <- findChild (elemName ns "p" "cSld") layout+  , Just spTree <- findChild (elemName ns "p" "spTree") cSld = do+      (shapeId, sp) <- getContentShape ns spTree+      elements <- mapM paragraphToElement paras+      let txBody = mknode "p:txBody" [] $+                   [mknode "a:bodyPr" [] (), mknode "a:lstStyle" [] ()] <> elements+          -- Create spPr with explicit positioning+          xfrm = mknode "a:xfrm" []+                   [ mknode "a:off" [("x", tshow $ 12700 * x),+                                     ("y", tshow $ 12700 * y)] ()+                   , mknode "a:ext" [("cx", tshow $ 12700 * cx),+                                     ("cy", tshow $ 12700 * cy)] ()+                   ]+          spPr = mknode "p:spPr" [] [xfrm]+      return+        . (shapeId,)+        . surroundWithMathAlternate+        . replaceNamedChildren ns "p" "txBody" [txBody]+        . replaceNamedChildren ns "p" "spPr" [spPr]+        $ sp+textBoxToElementWithPosition _ _ _ _ _ _ = return (Nothing, mknode "p:sp" [] ())++-- | Convert shapes to elements with vertical stacking+-- This positions multiple shapes vertically within a content area,+-- preserving the original order of shapes from the source document+shapesToElementsStacked ::+  PandocMonad m =>+  Element ->    -- layout+  Integer ->    -- x position of content area+  Integer ->    -- y position of content area+  Integer ->    -- width (cx) of content area+  Integer ->    -- total height (cy) of content area+  [Shape] ->+  P m [(Maybe ShapeId, Content)]+shapesToElementsStacked layout x y cx totalCy shapes = do+  -- Calculate heights for each shape based on content size+  let gap = 10  -- Small gap between elements++      -- Count "units" for each shape based on content+      -- Text paragraphs need more space than table rows (bullets have more padding)+      shapeUnits :: Shape -> Int+      shapeUnits (TextBox paras) = max 2 (length paras * 2)  -- 2 units per paragraph+      shapeUnits (GraphicFrame tbls _) =+        max 2 $ sum [1 + length rows | Tbl _ _ _ rows <- tbls]  -- header + data rows+      shapeUnits (Pic {}) = 4  -- images get moderate space+      shapeUnits (RawOOXMLShape _) = 2++      -- Calculate total units and height per unit+      totalUnits = sum $ map shapeUnits shapes+      heightPerUnit :: Double+      heightPerUnit = if totalUnits > 0+                      then fromIntegral totalCy / fromIntegral totalUnits+                      else fromIntegral totalCy++  -- Process shapes in order, tracking Y position+  let go :: PandocMonad m => Integer -> [Shape] -> P m [(Maybe ShapeId, Content)]+      go _ [] = return []+      go currentY (shape:rest) = do+        let units = shapeUnits shape+            shapeHeight = round $ fromIntegral units * heightPerUnit+            heightWithGap = shapeHeight - gap++        elts <- case shape of+          GraphicFrame tbls caption ->+            map (bimap Just Elem) <$>+              graphicFrameToElementsWithPosition x currentY cx heightWithGap tbls caption+          TextBox paras -> do+            elt <- textBoxToElementWithPosition layout x currentY cx heightWithGap paras+            return [(fst elt, Elem (snd elt))]+          _ -> return []  -- Skip other shapes for now++        restElts <- go (currentY + shapeHeight) rest+        return $ elts ++ restElts++  go y shapes+ graphicFrameToElements ::   PandocMonad m =>   Element ->@@ -1566,9 +1692,33 @@       (shapeId, element) <- nonBodyTextToElement layout [PHType "title"] hdrShape       let hdrShapeElements = [Elem element | not (null hdrShape)]           contentHeaderId = if null hdrShape then Nothing else shapeId-      content' <- local-                         (\env -> env {envPlaceholder = Placeholder ObjType 0})-                         (shapesToElements layout shapes)++      -- Check if we have multiple content shapes that need stacking+      let hasMultipleShapes = length shapes > 1+          hasGraphicAndText = any isGraphicFrame shapes && any isTextBox shapes+            where+              isGraphicFrame (GraphicFrame _ _) = True+              isGraphicFrame _ = False+              isTextBox (TextBox _) = True+              isTextBox _ = False++      content' <- if hasMultipleShapes && hasGraphicAndText+        then do+          -- Get content area dimensions for stacking+          master <- getMaster+          (pageWidth, pageHeight) <- asks envPresentationSize+          ((x, y), (cx, cy)) <- local (\env -> env {envPlaceholder = Placeholder ObjType 0})+                                      (getContentShapeSize ns layout master)+                                `catchError`+                                (\_ -> return ((0, 0), (pageWidth, pageHeight)))+          -- Use stacked layout for multiple shapes+          local (\env -> env {envPlaceholder = Placeholder ObjType 0})+                (shapesToElementsStacked layout x y cx cy shapes)+        else+          -- Use regular layout for single shapes+          local (\env -> env {envPlaceholder = Placeholder ObjType 0})+                (shapesToElements layout shapes)+       let contentContentIds = mapMaybe fst content'           contentElements = snd <$> content'       footer <- footerElements content@@ -1688,8 +1838,33 @@                     (shapesToElements layout textShapes)       let contentWithCaptionCaptionIds = mapMaybe fst text           textElements = snd <$> text-      content <- local (\env -> env {envPlaceholder = Placeholder ObjType 0})-                       (shapesToElements layout contentShapes)++      -- Check if we have multiple content shapes that need stacking+      let hasMultipleShapes = length contentShapes > 1+          hasGraphicAndText = any isGraphicFrame contentShapes && any isTextBox contentShapes+            where+              isGraphicFrame (GraphicFrame _ _) = True+              isGraphicFrame _ = False+              isTextBox (TextBox _) = True+              isTextBox _ = False++      content <- if hasMultipleShapes && hasGraphicAndText+        then do+          -- Get content area dimensions for stacking+          master <- getMaster+          (pageWidth, pageHeight) <- asks envPresentationSize+          ((x, y), (cx, cy)) <- local (\env -> env {envPlaceholder = Placeholder ObjType 0})+                                      (getContentShapeSize ns layout master)+                                `catchError`+                                (\_ -> return ((0, 0), (pageWidth, pageHeight)))+          -- Use stacked layout for multiple shapes+          local (\env -> env {envPlaceholder = Placeholder ObjType 0})+                (shapesToElementsStacked layout x y cx cy contentShapes)+        else+          -- Use regular layout for single shapes+          local (\env -> env {envPlaceholder = Placeholder ObjType 0})+                (shapesToElements layout contentShapes)+       let contentWithCaptionContentIds = mapMaybe fst content           contentElements = snd <$> content       footer <- footerElements contentWithCaption@@ -2689,12 +2864,16 @@   mediaInfos <- mconcat . M.elems <$> gets stMediaIds   filePaths <- patternsToFilePaths $ inheritedPatterns p   let mediaFps = filter (match (compile "ppt/media/image*")) filePaths+      fontFps = filter (match (compile "ppt/fonts/*")) filePaths   let defaults = [ DefaultContentType "xml" "application/xml"                  , DefaultContentType "rels" "application/vnd.openxmlformats-package.relationships+xml"                  ]       mediaDefaults = nub $                       mapMaybe mediaContentType mediaInfos <>                       mapMaybe mediaFileContentType mediaFps+      fontDefaults = [ DefaultContentType "fntdata" "application/x-fontdata"+                     | any (\fp -> takeExtension fp == ".fntdata") fontFps+                     ]        inheritedOverrides = mapMaybe pathToOverride filePaths       createdOverrides = mapMaybe pathToOverride [ "docProps/core.xml"@@ -2708,7 +2887,7 @@                        relativePaths   speakerNotesOverrides <- mapMaybe pathToOverride <$> getSpeakerNotesFilePaths   return $ ContentTypes-    (defaults <> mediaDefaults)+    (defaults <> mediaDefaults <> fontDefaults)     (inheritedOverrides <> createdOverrides <> slideOverrides <> speakerNotesOverrides)  presML :: T.Text
src/Text/Pandoc/Writers/Powerpoint/Presentation.hs view
@@ -176,11 +176,6 @@ runPres env st p = (pres, reverse $ stLog finalSt)   where (pres, finalSt) = runState (runReaderT p env) st --- GHC 7.8 will still complain about concat <$> mapM unless we specify--- Functor. We can get rid of this when we stop supporting GHC 7.8.-concatMapM        :: (Monad m) => (a -> m [b]) -> [a] -> m [b]-concatMapM f xs   =  liftM concat (mapM f xs)- type Pixels = Integer  data Presentation = Presentation DocProps [Slide]@@ -348,7 +343,7 @@ --------------------------------------------------  inlinesToParElems :: [Inline] -> Pres [ParaElem]-inlinesToParElems = concatMapM inlineToParElems+inlinesToParElems = fmap mconcat . mapM inlineToParElems  inlineToParElems :: Inline -> Pres [ParaElem] inlineToParElems (Str s) = do@@ -484,7 +479,7 @@                                                  , pPropIndent = Just 0                                                  }                 , envRunProps = (envRunProps r){rPropForceSize = Just blockQuoteSize}})$-  concatMapM blockToParagraphs blks+  mconcat <$> mapM blockToParagraphs blks -- TODO: work out the format blockToParagraphs blk@(RawBlock _ _) = do addLogMessage $ BlockNotRendered blk                                           return []@@ -508,7 +503,7 @@                                            , pPropIndent = Nothing                                            , pPropIncremental = incremental                                            }}) $-    concatMapM multiParList blksLst+    mconcat <$> mapM multiParList blksLst blockToParagraphs (OrderedList listAttr blksLst) = do   pProps <- asks envParaProps   incremental <- listShouldBeIncremental@@ -518,7 +513,7 @@                                            , pPropIndent = Nothing                                            , pPropIncremental = incremental                                            }}) $-    concatMapM multiParList blksLst+    mconcat <$> mapM multiParList blksLst blockToParagraphs (DefinitionList entries) = do   incremental <- listShouldBeIncremental   let go :: ([Inline], [[Block]]) -> Pres [Paragraph]@@ -526,11 +521,12 @@         term <-blockToParagraphs $ Para [Strong ils]         -- For now, we'll treat each definition term as a         -- blockquote. We can extend this further later.-        definition <- concatMapM (blockToParagraphs . BlockQuote) blksLst+        definition <-+          mconcat <$> mapM (blockToParagraphs . BlockQuote) blksLst         return $ term ++ definition   local (\env -> env {envParaProps =                        (envParaProps env) {pPropIncremental = incremental}})-    $ concatMapM go entries+    $ mconcat <$> mapM go entries blockToParagraphs (Div (_, classes, _) blks) = let   hasIncremental = "incremental" `elem` classes   hasNonIncremental = "nonincremental" `elem` classes@@ -538,7 +534,7 @@                    | hasNonIncremental -> Just InNonIncremental                    | otherwise -> Nothing   addIncremental env = env { envInIncrementalDiv = incremental }-  in local addIncremental (concatMapM blockToParagraphs blks)+  in local addIncremental (mconcat <$> mapM blockToParagraphs blks) blockToParagraphs (Figure attr capt blks) = -- This never seems to be used:   blockToParagraphs (Shared.figureDiv attr capt blks) blockToParagraphs hr@HorizontalRule = notRendered hr@@ -563,7 +559,7 @@                   , pPropLevel = level + 1                   }                 })-        $ concatMapM blockToParagraphs bs+        $ mconcat <$> mapM blockToParagraphs bs   return $ p ++ ps  cellToParagraphs :: Alignment -> SimpleCell -> Pres [Paragraph]@@ -701,12 +697,14 @@   let (nts, blks') = span isNotesDiv blks   case cur of     [Header n _ _] | n == slideLevel || slideLevel == 0 ->-                            splitBlocks' [] (acc ++ [cur ++ [tbl] ++ nts]) blks'-    _ -> splitBlocks' []-         (if any notText cur-          then acc ++ ([cur | not (null cur)]) ++ [tbl : nts]-          else acc ++ ([cur ++ [tbl] ++ nts]))-         blks'+                            -- Header + table: add to current and continue accumulating+                            splitBlocks' (cur ++ [tbl] ++ nts) acc blks'+    _ -> let (newCur, newAcc) = if any notText cur+                                -- Current has notText: save current, table starts new+                                then ([tbl] ++ nts, acc ++ ([cur | not (null cur)]))+                                -- Current is text-only: add table to current and continue+                                else (cur ++ [tbl] ++ nts, acc)+         in splitBlocks' newCur newAcc blks' splitBlocks' cur acc (d@(Div (_, classes, _) _): blks) | "columns" `elem` classes =  do   slideLevel <- asks envSlideLevel   let (nts, blks') = span isNotesDiv blks@@ -779,13 +777,22 @@           if makesBlankSlide (blk : blks)           then pure (mkSlide BlankSlide)           else mkSlide . ContentSlide [] <$> blocksToShapes (blk : blks)+        -- Check if there's a table in the content+        hasTable = any isTable (blk : blks)+          where+            isTable Table{} = True+            isTable _ = False         in case break notText (blk : blks) of           ([], _) -> contentOrBlankSlide           (_, []) -> contentOrBlankSlide-          (textBlocks, contentBlocks) -> do-            textShapes <- blocksToShapes textBlocks-            contentShapes <- blocksToShapes contentBlocks-            return (mkSlide (ContentWithCaptionSlide [] textShapes contentShapes))+          (textBlocks, contentBlocks)+            -- When there's a table with surrounding text, use ContentSlide+            -- to keep everything in one column with proper vertical stacking+            | hasTable -> mkSlide . ContentSlide [] <$> blocksToShapes (blk : blks)+            | otherwise -> do+                textShapes <- blocksToShapes textBlocks+                contentShapes <- blocksToShapes contentBlocks+                return (mkSlide (ContentWithCaptionSlide [] textShapes contentShapes)) bodyBlocksToSlide _ [] spkNotes = do   sldId <- asks envCurSlideId   return $@@ -824,7 +831,7 @@ blockToSpeakerNotes :: Block -> Pres SpeakerNotes blockToSpeakerNotes (Div (_, ["notes"], _) blks) =   local (\env -> env{envInSpeakerNotes=True}) $-  SpeakerNotes <$> concatMapM blockToParagraphs blks+  SpeakerNotes . mconcat <$> mapM blockToParagraphs blks blockToSpeakerNotes _ = return mempty  handleSpeakerNotes :: Block -> Pres ()@@ -891,6 +898,12 @@   subtitle <- inlinesToParElems $ lookupMetaInlines "subtitle" meta   authors <- mapM inlinesToParElems $ docAuthors meta   date <- inlinesToParElems $ docDate meta+  -- Get speaker notes from metadata "notes" field+  let notesBlocks = lookupMetaBlocks "notes" meta+  speakerNotes <- if null notesBlocks+                  then return mempty+                  else local (\env -> env{envInSpeakerNotes=True}) $+                       SpeakerNotes . mconcat <$> mapM blockToParagraphs notesBlocks   if null title && null subtitle && null authors && null date     then return Nothing     else return $@@ -898,7 +911,7 @@          Slide          metadataSlideId          (MetadataSlide title subtitle authors date)-         mempty+         speakerNotes          Nothing  addSpeakerNotesToMetaSlide :: Slide -> [Block] -> Pres (Slide, [Block])
src/Text/Pandoc/Writers/RST.hs view
@@ -20,7 +20,8 @@                   GeneralCategory(                         ClosePunctuation, OpenPunctuation, InitialQuote,                          FinalQuote, DashPunctuation, OtherPunctuation))-import Data.List (transpose, intersperse, foldl')+import Data.List (transpose, intersperse)+import qualified Data.List as L import qualified Data.List.NonEmpty as NE import Data.Maybe (fromMaybe) import qualified Data.Text as T@@ -674,7 +675,7 @@   | null contents = [outer]   | otherwise     = combineAll contents   where contents = dropInlineParent outer-        combineAll = foldl' combine []+        combineAll = L.foldl' combine []          combine :: [Inline] -> Inline -> [Inline]         combine f i =
src/Text/Pandoc/Writers/RTF.hs view
@@ -15,6 +15,8 @@                                ) where import Control.Monad.Except (catchError, throwError) import Control.Monad+import Control.Monad.Reader (ReaderT, runReaderT, asks)+import Control.Monad.State.Strict (State, runState, get, put) import qualified Data.ByteString as B import Data.Char (chr, isDigit, ord, isAlphaNum) import qualified Data.Map as M@@ -34,6 +36,8 @@ import Text.Pandoc.Writers.Math import Text.Pandoc.Writers.Shared import Text.Printf (printf)+import Text.Read (readMaybe)+import Text.DocTemplates (lookupContext)  -- | Convert Image inlines into a raw RTF embedded image, read from a file, -- or a MediaBag, or the internet.@@ -83,6 +87,14 @@      return x) rtfEmbedImage _ x = return x +-- | Configuration for the RTF writer.+newtype WriterConfig = WriterConfig+  { fontSize :: Int  -- ^ base font size in half points+  }++defaultWriterConfig :: WriterConfig+defaultWriterConfig = WriterConfig { fontSize = 12 }+ -- | Convert Pandoc to a string in rich text format. writeRTF :: PandocMonad m => WriterOptions -> Pandoc -> m Text writeRTF options doc = do@@ -98,12 +110,24 @@                     $ metamap   metadata <- metaToContext options               (fmap (literal . T.concat) .+                flip runReaderT defaultWriterConfig .                 mapM (blockToRTF 0 AlignDefault))-              (fmap literal . inlinesToRTF)+              (fmap literal . flip runReaderT defaultWriterConfig .+                inlinesToRTF)               meta'-  body <- blocksToRTF 0 AlignDefault blocks-  toc <- blocksToRTF 0 AlignDefault [toTableOfContents options blocks]+  let config = defaultWriterConfig{+                   fontSize = maybe 24 (floor . (* (2.0 :: Double)))+                               $ lookupContext "fontsize" metadata >>=+                                 T.stripSuffix "pt" >>= readMaybe . T.unpack }+  -- Tag list blocks with a list id and level so that the rendered RTF+  -- carries proper \ls/\ilvl references and a \listtable, which lets+  -- lists (including multi-paragraph list items) round-trip.+  let (blocks', listDefs) = prepareLists blocks+  body <- runReaderT (blocksToRTF 0 AlignDefault blocks') config+  toc <- runReaderT (blocksToRTF 0 AlignDefault [toTableOfContents options blocks])+           config   let context = defField "body" body+              $ maybe id (defField "listtable") (listTableRTF listDefs)               $ defField "spacer" spacer               $ (if writerTableOfContents options                     then defField "table-of-contents" toc@@ -119,6 +143,73 @@                         Just (_,'\n') -> body                         _             -> body <> T.singleton '\n' +-- | Information about a list needed to build the RTF list table:+-- a unique id (used both as @\\listid@ and @\\ls@), the list level+-- (@\\ilvl@) at which the list occurs, and its kind (bullet, or ordered+-- with the given attributes).+data ListInfo = ListInfo Int Int (Either () ListAttributes)++-- | Walk the document and tag every list with a unique id and its+-- nesting level, returning the tagged blocks together with the+-- information needed to build the list table.  Tagged lists are wrapped+-- in a @Div@ with the @__rtflist@ class and @ls@/@lvl@ attributes,+-- which 'blockToRTF' recognizes.+prepareLists :: [Block] -> ([Block], [ListInfo])+prepareLists bs =+  let (bs', (_, defs)) = runState (mapM (goBlock 0) bs) (1, [])+  in  (bs', reverse defs)+ where+  tag :: Int -> Either () ListAttributes -> [[Block]]+      -> ([[Block]] -> Block) -> State (Int, [ListInfo]) Block+  tag level kind items ctor = do+    (n, defs) <- get+    put (n + 1, ListInfo n level kind : defs)+    items' <- mapM (mapM (goBlock (level + 1))) items+    return $ Div ("", ["__rtflist"], [("ls", tshow n), ("lvl", tshow level)])+                 [ctor items']+  goBlock :: Int -> Block -> State (Int, [ListInfo]) Block+  goBlock level (BulletList items) = tag level (Left ()) items BulletList+  goBlock level (OrderedList attrs items) =+    tag level (Right attrs) items (OrderedList attrs)+  goBlock level (BlockQuote bs') = BlockQuote <$> mapM (goBlock level) bs'+  goBlock level (Div attr bs') = Div attr <$> mapM (goBlock level) bs'+  goBlock level (Figure attr capt bs') =+    Figure attr capt <$> mapM (goBlock level) bs'+  goBlock _ b = return b++-- | RTF @\\levelnfc@ number-format code for an ordered-list style.+listNfc :: ListNumberStyle -> Int+listNfc UpperRoman = 1+listNfc LowerRoman = 2+listNfc UpperAlpha = 3+listNfc LowerAlpha = 4+listNfc _          = 0 -- Decimal, DefaultStyle, Example++-- | Build the @\\listtable@ and @\\listoverridetable@ for the collected+-- lists, or 'Nothing' if the document contains no lists.+listTableRTF :: [ListInfo] -> Maybe Text+listTableRTF [] = Nothing+listTableRTF infos = Just $+  "{\\*\\listtable" <> T.concat (map listEntry infos) <> "}\n" <>+  "{\\*\\listoverridetable" <> T.concat (map overrideEntry infos) <> "}\n"+ where+  listEntry (ListInfo lid level kind) =+    "{\\list\\listtemplateid" <> tshow lid <>+    T.concat [ levelEntry i kind | i <- [0..level] ] <>+    "{\\listname ;}\\listid" <> tshow lid <> "}\n"+  levelEntry i kind =+    let (nfc, start) = case kind of+                         Left ()           -> (23 :: Int, 1 :: Int)+                         Right (s, sty, _) -> (listNfc sty, s)+        li = (i + 1) * 360+    in "{\\listlevel\\levelnfc" <> tshow nfc <> "\\levelnfcn" <> tshow nfc <>+       "\\leveljc0\\leveljcn0\\levelfollow0\\levelstartat" <> tshow start <>+       "\\levelindent0{\\leveltext\\'01\\u8226 ?;}{\\levelnumbers;}\\fi-360\\li" <>+       tshow li <> "\\lin" <> tshow li <> " }"+  overrideEntry (ListInfo lid _ _) =+    "{\\listoverride\\listid" <> tshow lid <>+    "\\listoverridecount0\\ls" <> tshow lid <> "}"+ -- | Convert unicode characters (> 127) into rich text format representation. handleUnicode :: Text -> Text handleUnicode = T.concatMap $ \c ->@@ -163,36 +254,41 @@ codeStringToRTF str = T.intercalate "\\line\n" $ T.lines (stringToRTF str)  -- | Make a paragraph with first-line indent, block indent, and space after.-rtfParSpaced :: Int       -- ^ space after (in twips)+rtfParSpaced :: PandocMonad m+             => Int       -- ^ space after (in twips)              -> Int       -- ^ block indent (in twips)              -> Int       -- ^ first line indent (relative to block) (in twips)              -> Alignment -- ^ alignment              -> Text    -- ^ string with content-             -> Text-rtfParSpaced spaceAfter indent firstLineIndent alignment content =+             -> ReaderT WriterConfig m Text+rtfParSpaced spaceAfter indent firstLineIndent alignment content = do+  fontsize <- asks fontSize   let alignString = case alignment of                            AlignLeft    -> "\\ql "                            AlignRight   -> "\\qr "                            AlignCenter  -> "\\qc "                            AlignDefault -> "\\ql "-  in  "{\\pard " <> alignString <>-      "\\f0 \\sa" <> tshow spaceAfter <> " \\li" <> T.pack (show indent) <>+  return $ "{\\pard " <> alignString <>+      "\\f0 " <> renderFontSize fontsize <>+      " \\sa" <> tshow spaceAfter <> " \\li" <> T.pack (show indent) <>       " \\fi" <> tshow firstLineIndent <> " " <> content <> "\\par}\n"  -- | Default paragraph.-rtfPar :: Int       -- ^ block indent (in twips)+rtfPar :: PandocMonad m+       => Int       -- ^ block indent (in twips)        -> Int       -- ^ first line indent (relative to block) (in twips)        -> Alignment -- ^ alignment        -> Text    -- ^ string with content-       -> Text+       -> ReaderT WriterConfig m Text rtfPar = rtfParSpaced 180  -- | Compact paragraph (e.g. for compact list items).-rtfCompact ::  Int       -- ^ block indent (in twips)-           ->  Int       -- ^ first line indent (relative to block) (in twips)-           ->  Alignment -- ^ alignment-           ->  Text    -- ^ string with content-           ->  Text+rtfCompact :: PandocMonad m+           => Int       -- ^ block indent (in twips)+           -> Int       -- ^ first line indent (relative to block) (in twips)+           -> Alignment -- ^ alignment+           -> Text    -- ^ string with content+           -> ReaderT WriterConfig m Text rtfCompact = rtfParSpaced 0  -- number of twips to indent@@ -221,7 +317,7 @@             => Int             -> Alignment             -> [Block]-            -> m Text+            -> ReaderT WriterConfig m Text blocksToRTF indent align = fmap T.concat . mapM (blockToRTF indent align)  -- | Convert Pandoc block element to RTF.@@ -229,38 +325,55 @@            => Int       -- ^ indent level            -> Alignment -- ^ alignment            -> Block     -- ^ block to convert-           -> m Text+           -> ReaderT WriterConfig m Text+blockToRTF indent alignment (Div (_, classes, kvs) [blk])+  | "__rtflist" `elem` classes+  , Just ls <- lookup "ls" kvs >>= readInt+  , Just level <- lookup "lvl" kvs >>= readInt =+  case blk of+    BulletList lst -> spaceAtEnd . T.concat <$>+      mapM (listItemToRTF alignment indent (Just (ls, level))+              (bulletMarker indent)) lst+    OrderedList attribs lst -> spaceAtEnd . T.concat <$>+      zipWithM (listItemToRTF alignment indent (Just (ls, level)))+               (orderedMarkers indent attribs) lst+    _ -> blocksToRTF indent alignment [blk] blockToRTF indent alignment (Div _ bs) =   blocksToRTF indent alignment bs blockToRTF indent alignment (Plain lst) =-  rtfCompact indent 0 alignment <$> inlinesToRTF lst+  inlinesToRTF lst >>= rtfCompact indent 0 alignment blockToRTF indent alignment (Para lst) =-  rtfPar indent 0 alignment <$> inlinesToRTF lst+  inlinesToRTF lst >>= rtfPar indent 0 alignment blockToRTF indent alignment (LineBlock lns) =   blockToRTF indent alignment $ linesToPara lns blockToRTF indent alignment (BlockQuote lst) =   blocksToRTF (indent + indentIncrement) alignment lst-blockToRTF indent _ (CodeBlock _ str) =-  return $ rtfPar indent 0 AlignLeft ("\\f1 " <> codeStringToRTF str)+blockToRTF indent _ (CodeBlock _ str) = do+  fontsize <- asks fontSize+  rtfPar indent 0 AlignLeft+         $ "\\f1 " <> renderFontSize fontsize <> " " <> codeStringToRTF str blockToRTF _ _ b@(RawBlock f str)   | f == Format "rtf" = return str   | otherwise         = do       report $ BlockNotRendered b       return "" blockToRTF indent alignment (BulletList lst) = spaceAtEnd . T.concat <$>-  mapM (listItemToRTF alignment indent (bulletMarker indent)) lst+  mapM (listItemToRTF alignment indent Nothing (bulletMarker indent)) lst blockToRTF indent alignment (OrderedList attribs lst) =   spaceAtEnd . T.concat <$>-   zipWithM (listItemToRTF alignment indent) (orderedMarkers indent attribs) lst+   zipWithM (listItemToRTF alignment indent Nothing)+            (orderedMarkers indent attribs) lst blockToRTF indent alignment (DefinitionList lst) = spaceAtEnd . T.concat <$>   mapM (definitionListItemToRTF alignment indent) lst-blockToRTF indent _ HorizontalRule = return $+blockToRTF indent _ HorizontalRule =   rtfPar indent 0 AlignCenter "\\emdash\\emdash\\emdash\\emdash\\emdash" blockToRTF indent alignment (Header level _ lst) = do   contents <- inlinesToRTF lst-  return $ rtfPar indent 0 alignment $+  fontsize <- asks fontSize+  rtfPar indent 0 alignment $              "\\outlinelevel" <> tshow (level - 1) <>-             " \\b \\fs" <> tshow (40 - (level * 4)) <> " " <> contents+             " \\b " <> renderFontSize (fontsize + ((6 - level) * 2)) <>+             " " <> contents blockToRTF indent alignment (Table _ blkCapt specs thead tbody tfoot) = do   let (caption, aligns, sizes, headers, rows) = toLegacyTable blkCapt specs thead tbody tfoot   caption' <- inlinesToRTF caption@@ -268,12 +381,13 @@                 then return ""                 else tableRowToRTF True indent aligns sizes headers   rows' <- T.concat <$> mapM (tableRowToRTF False indent aligns sizes) rows-  return $ header' <> rows' <> rtfPar indent 0 alignment caption'+  ((header' <> rows') <>) <$> rtfPar indent 0 alignment caption' blockToRTF indent alignment (Figure attr capt body) =   blockToRTF indent alignment $ figureDiv attr capt body  tableRowToRTF :: PandocMonad m-              => Bool -> Int -> [Alignment] -> [Double] -> [[Block]] -> m Text+              => Bool -> Int -> [Alignment] -> [Double] -> [[Block]]+              -> ReaderT WriterConfig m Text tableRowToRTF header indent aligns sizes' cols = do   let totalTwips = 6 * 1440 -- 6 inches   let sizes = if all (== 0) sizes'@@ -293,7 +407,8 @@   let end = "}\n\\intbl\\row}\n"   return $ start <> columns <> end -tableItemToRTF :: PandocMonad m => Int -> Alignment -> [Block] -> m Text+tableItemToRTF :: PandocMonad m+               => Int -> Alignment -> [Block] -> ReaderT WriterConfig m Text tableItemToRTF indent alignment item = do   contents <- blocksToRTF indent alignment item   return $ "{" <> T.replace "\\pard" "\\pard\\intbl" contents <> "\\cell}\n"@@ -303,22 +418,58 @@ spaceAtEnd :: Text -> Text spaceAtEnd str = maybe str (<> "\\sa180\\par}\n") $ T.stripSuffix "\\par}\n" str +-- | Parse a decimal integer stored in a tag attribute.+readInt :: Text -> Maybe Int+readInt = safeRead++-- | Inject an @\\ls@/@\\ilvl@ reference into an already-rendered list+-- paragraph (used for continuation paragraphs of a multi-paragraph list+-- item, which carry the list reference but no @\\listtext@ marker).  The+-- reference is inserted right before the @\\fi@ first-line-indent control+-- word, where the reader expects to find the paragraph's list properties.+addListRef :: Int -> Int -> Text -> Text+addListRef ls level t =+  let ref = "\\ls" <> tshow ls <> "\\ilvl" <> tshow level+      (pref, suff) = T.breakOn "\\fi" t+  in if T.null suff then t else pref <> ref <> suff+ -- | Convert list item (list of blocks) to RTF. listItemToRTF :: PandocMonad m-              => Alignment  -- ^ alignment-              -> Int        -- ^ indent level-              -> Text     -- ^ list start marker-              -> [Block]    -- ^ list item (list of blocks)-              -> m Text-listItemToRTF alignment indent marker [] = return $-  rtfCompact (indent + listIncrement) (negate listIncrement) alignment-             (marker <> "\\tx" <> tshow listIncrement <> "\\tab ")-listItemToRTF alignment indent marker (listFirst:listRest) = do+              => Alignment        -- ^ alignment+              -> Int              -- ^ indent level+              -> Maybe (Int, Int) -- ^ list reference (@\\ls@, @\\ilvl@), if+                                  -- the list is part of the list table+              -> Text             -- ^ list start marker+              -> [Block]          -- ^ list item (list of blocks)+              -> ReaderT WriterConfig m Text+listItemToRTF alignment indent mbref marker [] =+  rtfCompact (indent + listIncrement) (negate listIncrement) alignment $+    case mbref of+      Nothing -> marker <> "\\tx" <> tshow listIncrement <> "\\tab "+      Just (ls, level) ->+        "\\ls" <> tshow ls <> "\\ilvl" <> tshow level <>+        "\\tx" <> tshow listIncrement <> " {\\listtext\\tab " <> marker <> "\\tab}"+listItemToRTF alignment indent mbref marker (listFirst:listRest) = do   let f = blockToRTF (indent + listIncrement) alignment   first <- f listFirst-  rest <- mapM f listRest-  let listMarker = "\\fi" <> tshow (negate listIncrement) <> " " <> marker <>-                   "\\tx" <> tshow listIncrement <> "\\tab"+  -- Continuation paragraphs carry the same \ls/\ilvl reference but no+  -- \listtext marker, so the reader merges them into the current item.+  -- Nested lists are tagged Divs that already carry their own reference,+  -- so they are left untouched.+  rest <- forM listRest $ \b -> do+            t <- f b+            return $ case mbref of+              Just (ls, level) | not (isTaggedList b) -> addListRef ls level t+              _ -> t+  let listMarker = case mbref of+        Nothing ->+          "\\fi" <> tshow (negate listIncrement) <> " " <> marker <>+          "\\tx" <> tshow listIncrement <> "\\tab"+        Just (ls, level) ->+          "\\fi" <> tshow (negate listIncrement) <>+          "\\ls" <> tshow ls <> "\\ilvl" <> tshow level <>+          "\\tx" <> tshow listIncrement <>+          " {\\listtext\\tab " <> marker <> "\\tab}"   -- Find the first occurrence of \\fi or \\fi-, then replace it and the following   -- digits with the list marker.   let insertListMarker t = case popDigit $ optionDash $ T.drop 3 suff of@@ -336,12 +487,18 @@    -- insert the list marker into the (processed) first block   return $ insertListMarker first <> T.concat rest +-- | Is this a list block tagged by 'prepareLists' (and hence already+-- carrying its own @\\ls@/@\\ilvl@ reference)?+isTaggedList :: Block -> Bool+isTaggedList (Div (_, classes, _) _) = "__rtflist" `elem` classes+isTaggedList _ = False+ -- | Convert definition list item (label, list of blocks) to RTF. definitionListItemToRTF :: PandocMonad m                         => Alignment          -- ^ alignment                         -> Int                -- ^ indent level                         -> ([Inline],[[Block]]) -- ^ list item (list of blocks)-                        -> m Text+                        -> ReaderT WriterConfig m Text definitionListItemToRTF alignment indent (label, defs) = do   labelText <- blockToRTF indent alignment (Plain label)   itemsText <- blocksToRTF (indent + listIncrement) alignment (concat defs)@@ -350,13 +507,13 @@ -- | Convert list of inline items to RTF. inlinesToRTF :: PandocMonad m              => [Inline]   -- ^ list of inlines to convert-             -> m Text+             -> ReaderT WriterConfig m Text inlinesToRTF lst = T.concat <$> mapM inlineToRTF lst  -- | Convert inline item to RTF. inlineToRTF :: PandocMonad m             => Inline         -- ^ inline to convert-            -> m Text+            -> ReaderT WriterConfig m Text inlineToRTF (Span _ lst) = inlinesToRTF lst inlineToRTF (Emph lst) = do   contents <- inlinesToRTF lst@@ -385,7 +542,10 @@ inlineToRTF (Quoted DoubleQuote lst) = do   contents <- inlinesToRTF lst   return $ "\\u8220\"" <> contents <> "\\u8221\""-inlineToRTF (Code _ str) = return $ "{\\f1 " <> codeStringToRTF str <> "}"+inlineToRTF (Code _ str) = do+  fontsize <- asks fontSize+  return $ "{\\f1 " <> renderFontSize fontsize <>+           " " <> codeStringToRTF str <> "}" inlineToRTF (Str str) = return $ stringToRTF str inlineToRTF (Math t str) = texMathToInlines t str >>= inlinesToRTF inlineToRTF (Cite _ lst) = inlinesToRTF lst@@ -407,3 +567,6 @@   body <- T.concat <$> mapM (blockToRTF 0 AlignDefault) contents   return $ "{\\super\\chftn}{\\*\\footnote\\chftn\\~\\plain\\pard " <>     body <> "}"++renderFontSize :: Int -> Text+renderFontSize halfPoints = "\\fs" <> tshow halfPoints
src/Text/Pandoc/Writers/Shared.hs view
@@ -63,7 +63,8 @@ import Data.Either (isRight) import Data.Aeson (ToJSON (..), encode) import Data.Char (chr, ord, isSpace, isLetter, isUpper)-import Data.List (groupBy, intersperse, foldl', transpose)+import Data.List (groupBy, intersperse, transpose, zipWith4)+import qualified Data.List as L import Data.List.NonEmpty (NonEmpty((:|))) import Data.Text.Conversions (FromText(..)) import qualified Data.Map as M@@ -79,7 +80,7 @@ import Text.Pandoc.Shared (stringify, makeSections, blocksToInlines) import Text.Pandoc.Walk (Walkable(..)) import qualified Text.Pandoc.UTF8 as UTF8-import Text.Pandoc.XML (escapeStringForXML)+import Text.Pandoc.XML (escapeStringForXML, rdfaAttributes, html5Attributes) import Text.DocTemplates (Context(..), Val(..), TemplateTarget,                           ToContext(..), FromContext(..)) import Text.Pandoc.Chunks (tocToList, toTOCTree)@@ -88,6 +89,7 @@ import Text.Pandoc.Translations (setTranslations) import Data.Maybe (fromMaybe) import qualified Text.Pandoc.Writers.AnnotatedTable as Ann+import qualified Data.Set as Set  -- import Debug.Trace @@ -205,9 +207,19 @@   ,if null classes       then empty       else "class=" <> doubleQuotes (text $ T.unpack (T.unwords classes))-  ,hsep (map (\(k,v) -> text (T.unpack k) <> "=" <>+  ,hsep (map (\(k,v) -> formatKey k <> "=" <>                 doubleQuotes (text $ T.unpack (escapeStringForXML v))) kvs)   ])+ where+   formatKey x = text . T.unpack $+        if (x `Set.member` (html5Attributes <> rdfaAttributes)+            && x /= "label") -- #10048+             || T.any (== ':') x -- e.g. epub: namespace+             || "data-" `T.isPrefixOf` x+             || "aria-" `T.isPrefixOf` x+             || x == "markdown" -- #11685+           then x+           else "data-" <> x  addSpaceIfNotEmpty :: HasChars a => Doc a -> Doc a addSpaceIfNotEmpty f = if isEmpty f then f else " " <> f@@ -321,9 +333,18 @@              (setTopBorder DoubleLine . setBottomBorder DoubleLine) footCells   pure $ gridRows $ redoWidths opts colspecs rows +data ColWidthInfo =+  ColWidthInfo+  { colWidthSpecified :: Int+  , colWidthFull :: Int+  , colWidthMin :: Int+  , colWidthUsed :: Int }+  deriving (Show, Ord, Eq)+ -- Returns (current widths, full widths, min widths)-extractColWidths :: WriterOptions -> [[RenderedCell Text]] -> ([Int], [Int], [Int])-extractColWidths opts rows = (currentwidths, fullwidths, minwidths)+extractColWidths :: WriterOptions -> [[RenderedCell Text]] -> [ColWidthInfo]+extractColWidths opts rows =+  zipWith4 ColWidthInfo specifiedwidths fullwidths minwidths currentwidths  where    getWidths calcOffset =      map (fromMaybe 0 . maximumMay) (transpose (map (concatMap (getCellWidths calcOffset)) rows))@@ -331,11 +352,15 @@                                  (calcOffset c `div` (cellColSpan c) +                                   calcOffset c `rem` (cellColSpan c))    fullwidths = getWidths (max 1 . offset . cellContents)-   currentwidths = getWidths cellWidth    minwidths =      case writerWrapText opts of        WrapNone -> fullwidths        _ -> getWidths (minOffset . cellContents)+   specifiedwidths = getWidths cellWidth+   currentwidths = zipWith (\specw minw -> if specw == 0+                                              then 0+                                              else max specw minw)+                           specifiedwidths minwidths  resetWidths :: [Int] -> [RenderedCell Text] -> [RenderedCell Text] resetWidths _ [] = []@@ -352,21 +377,37 @@ redoWidths opts colspecs rows = map (resetWidths newwidths) rows  where   numcols = length colspecs-  isSimple = all ((== ColWidthDefault) . snd) colspecs-  (actualwidths, fullwidths, minwidths) = extractColWidths opts rows-  totwidth = writerColumns opts - (3 * numcols) - 1-  evenwidth = totwidth `div` numcols + totwidth `rem` numcols-  keepwidths = filter (< evenwidth) fullwidths-  evenwidth' = (totwidth - sum keepwidths) `div`-                (numcols - length keepwidths)-  ensureMinWidths = zipWith max minwidths-  newwidths = ensureMinWidths $-              case isSimple of-                True | sum fullwidths <= totwidth -> fullwidths-                     | otherwise -> map (\w -> if w < evenwidth-                                                  then w-                                                  else evenwidth') fullwidths-                False -> actualwidths+  widthInfos = extractColWidths opts rows+  colsAvailable = writerColumns opts - (3 * numcols) - 1+  -- now, we need to change colWidthUsed 0 to an appropriate number;+  -- either the full width if it fits easily, or an appropriate fraction+  -- of the remaining width.  This must be done recursively, because+  -- once we decide that the full width can fit, that may leave less+  -- space for the remaining columns with default width to fill.+  recalculateWidths finalRun numRuns infos =+    let numUnassigned = length (filter ((== 0) . colWidthUsed) infos)+        unusedCols = colsAvailable - sum (map colWidthUsed infos)+        defwidth = if numUnassigned == 0+                      then 0+                      else unusedCols `div` numUnassigned+        infos' = map (\info -> if colWidthUsed info == 0+                                  then if finalRun+                                          then info{ colWidthUsed =+                                                      max (colWidthMin info) defwidth }+                                          else if colWidthFull info <= defwidth+                                               then info{ colWidthUsed = colWidthFull info }+                                               else info+                                  else info) infos+     in if finalRun || numRuns > 4+           then infos'+           else if infos == infos'+                 then recalculateWidths True (numRuns + 1) infos+                       -- run again, filling in unassigned widths with a fraction of the+                       -- remaining width+                 else recalculateWidths False (numRuns + 1) infos'+                       -- run again, filling in unassigned widths only if the full with+                       -- would be less than the fraction of remaining width+  newwidths = map colWidthUsed $ recalculateWidths False (1 :: Int) widthInfos  makeDummy :: RenderedCell Text -> RenderedCell Text makeDummy c =@@ -381,7 +422,7 @@                   cellTopBorder = NoLine }  addDummies :: [[RenderedCell Text]] -> [[RenderedCell Text]]-addDummies = reverse . foldl' go []+addDummies = reverse . L.foldl' go []  where    go [] cs = [cs]    go (prevRow:rs) cs = addDummiesToRow prevRow cs : prevRow : rs@@ -468,7 +509,7 @@  formatHeaderLine :: Show a => LineStyle -> [[RenderedCell a]] -> Doc Text formatHeaderLine lineStyle rows =-  literal $ foldl'+  literal $ L.foldl'     (\t row -> combineBorders t (render Nothing $ formatBorder (const lineStyle) True row))     mempty rows @@ -479,7 +520,7 @@                             then char '|'                             else char '+'  where-   (lastBorderStyle, borderParts) = foldl' addBorder (NoLine, mempty) cs+   (lastBorderStyle, borderParts) = L.foldl' addBorder (NoLine, mempty) cs    addBorder (prevBorderStyle, accum) c =      (borderStyle c, accum <> char junctionChar <> toBorderSection c)       where junctionChar = case (borderStyle c, prevBorderStyle) of@@ -533,7 +574,7 @@  toCharWidth :: WriterOptions -> Double -> Int toCharWidth opts width =-  max 1 (floor (width * fromIntegral (writerColumns opts)) - 3)+  max 0 (floor (width * fromIntegral (writerColumns opts)) - 3)  gridRow :: (Monad m, HasChars a)         => WriterOptions
src/Text/Pandoc/Writers/Texinfo.hs view
@@ -17,7 +17,8 @@ import Control.Monad.State.Strict     ( StateT, MonadState(get), gets, modify, evalStateT ) import Data.Char (chr, ord, isAlphaNum)-import Data.List (maximumBy, transpose, foldl')+import Data.List (maximumBy, transpose)+import qualified Data.List as L import Data.List.NonEmpty (nonEmpty) import Data.Ord (comparing) import qualified Data.Map as M@@ -47,7 +48,7 @@               , stOptions     :: WriterOptions -- writer options               } -data Context = NormalContext | NodeContext+data Context = NormalContext | NodeContext | ArgumentContext   deriving (Eq, Show)  withContext :: PandocMonad m => Context -> TI m a -> TI m a@@ -137,6 +138,7 @@           escChar '\x2026' = "@dots{}"           escChar '\x2019' = "'"           escChar ',' | context == NodeContext = ""+          escChar ',' | context == ArgumentContext = "@comma{}"           escChar ':' | context == NodeContext = ""           escChar '.' | context == NodeContext = ""           escChar '(' | context == NodeContext = ""@@ -148,6 +150,19 @@ inCmd :: Text -> Doc Text -> Doc Text inCmd cmd contents = char '@' <> literal cmd <> braces contents +isCodeOrBreak :: Inline -> Bool+isCodeOrBreak (Code{}) = True+isCodeOrBreak LineBreak = True+isCodeOrBreak _ = False++isCode :: Inline -> Bool+isCode (Code{}) = True+isCode _ = False++codeToStr :: Inline -> Inline+codeToStr (Code _ s) = Str s+codeToStr x = x+ -- | Convert Pandoc block element to Texinfo. blockToTexinfo :: PandocMonad m                => Block     -- ^ Block to convert@@ -158,8 +173,12 @@ blockToTexinfo (Plain lst) =   inlineListToTexinfo lst -blockToTexinfo (Para lst) =-  inlineListToTexinfo lst    -- this is handled differently from Plain in blockListToTexinfo+-- this is handled differently from Plain in blockListToTexinfo+blockToTexinfo (Para lst)+  | all isCodeOrBreak lst+      = (\xs -> "@example" $$ vcat xs $$ "@end example")+          <$> mapM (inlineToTexinfo . codeToStr) (filter isCode lst)+  | otherwise = inlineListToTexinfo lst  blockToTexinfo (LineBlock lns) =   blockToTexinfo $ linesToPara lns@@ -223,7 +242,8 @@              text "@end iftex" $$              text "@ifnottex" $$              text (replicate 72 '-') $$-             text "@end ifnottex"+             text "@end ifnottex" $$+             blankline  blockToTexinfo (Header 0 _ lst) = do   txt <- if null lst@@ -330,7 +350,7 @@                      -> [[Block]]                      -> TI m (Doc Text) tableAnyRowToTexinfo itemtype aligns cols =-  (literal itemtype $$) . foldl' (\row item -> row $$+  (literal itemtype $$) . L.foldl' (\row item -> row $$   (if isEmpty row then empty else text " @tab ") <> item) empty <$> zipWithM alignedBlock aligns cols  alignedBlock :: PandocMonad m@@ -510,7 +530,7 @@                   Nothing -> literal <$> stringToTexinfo                                     (T.filter (not . disallowedInNode) src)                   Just node -> pure $ literal node-      contents <- withContext NodeContext $ inlineListToTexinfo txt+      contents <- withContext ArgumentContext $ inlineListToTexinfo txt       return $ text "@ref"         <> braces (target <> if contents == target                                 then mempty@@ -519,13 +539,13 @@       [Str x] | escapeURI x == src ->  -- autolink                   return $ literal $ "@url{" <> x <> "}"       _ -> do-        contents <- withContext NodeContext $ inlineListToTexinfo txt+        contents <- withContext ArgumentContext $ inlineListToTexinfo txt         src1 <- stringToTexinfo src         return $ literal ("@uref{" <> src1 <> ",") <> contents <>                  char '}'  inlineToTexinfo (Image attr alternate (source, _)) = do-  content <- withContext NodeContext $ inlineListToTexinfo alternate+  content <- withContext ArgumentContext $ inlineListToTexinfo alternate   opts <- gets stOptions   let showDim dim = case dimension dim attr of                       (Just (Pixel a))   -> showInInch opts (Pixel a) <> "in"
+ src/Text/Pandoc/Writers/Txt2Tags.hs view
@@ -0,0 +1,377 @@+{-# LANGUAGE OverloadedStrings #-}+{- |+   Module      : Text.Pandoc.Writers.Txt2Tags+   Copyright   : Copyright (C) 2008-2024 Eric Forgeot, based on John MacFarlane DokuWiki writer+   License     : GNU GPL, version 2 or above++   Maintainer  : Eric Forgeot+   Stability   : alpha+   Portability : portable++Conversion of 'Pandoc' documents to Txt2Tags markup.++Txt2Tags:  <https://www.txt2tags.org/>+-}++module Text.Pandoc.Writers.Txt2Tags ( writeTxt2Tags ) where+import Control.Monad (zipWithM)+import Control.Monad.Reader (ReaderT, asks, local, runReaderT)+import Data.Default (Default (..))+import Data.List (transpose)+import Data.List.NonEmpty (nonEmpty)+import Data.Text (Text)+import qualified Data.Text as T+import Text.Pandoc.Class.PandocMonad (PandocMonad, report)+import Text.Pandoc.Definition+import Text.Pandoc.ImageSize+import Text.Pandoc.Logging+import Text.Pandoc.Options (WrapOption (..), WriterOptions (writerTableOfContents,+                            writerTemplate, writerWrapText))+import Text.Pandoc.Shared (figureDiv, linesToPara, removeFormatting, trimr)+import Text.Pandoc.URI (escapeURI, isURI)+import Text.Pandoc.Templates (renderTemplate)+import Text.DocLayout (render, literal)+import Text.Pandoc.Writers.Shared (defField, metaToContext, toLegacyTable)++data WriterEnvironment = WriterEnvironment {+    stIndent      :: Text  -- Indentation prefix for the current list nesting level+  , stBackSlashLB :: Bool  -- True inside table cells (use \\ for line breaks)+  }++instance Default WriterEnvironment where+  def = WriterEnvironment { stIndent      = ""+                          , stBackSlashLB = False }++type Txt2Tags m = ReaderT WriterEnvironment m++-- | Convert Pandoc to Txt2Tags.+writeTxt2Tags :: PandocMonad m => WriterOptions -> Pandoc -> m Text+writeTxt2Tags opts document =+  runTxt2Tags (pandocToTxt2Tags opts document)++runTxt2Tags :: PandocMonad m => Txt2Tags m a -> m a+runTxt2Tags = flip runReaderT def++-- | Return Txt2Tags representation of document.+pandocToTxt2Tags :: PandocMonad m+                 => WriterOptions -> Pandoc -> Txt2Tags m Text+pandocToTxt2Tags opts (Pandoc meta blocks) = do+  metadata <- metaToContext opts+              (fmap (literal . trimr) . blockListToTxt2Tags opts)+              (fmap (literal . trimr) . inlineListToTxt2Tags opts)+              meta+  body <- blockListToTxt2Tags opts blocks+  let context = defField "body" body+              $ defField "toc" (writerTableOfContents opts) metadata+  return $+    case writerTemplate opts of+       Nothing  -> body+       Just tpl -> render Nothing $ renderTemplate tpl context++-- | Escape special characters for Txt2Tags.+-- The %%text%% syntax disables Txt2Tags formatting interpretation.+escapeString :: Text -> Text+escapeString = T.replace "``" "%%``%%" .+               T.replace "--" "%%--%%" .+               T.replace "__" "%%__%%" .+               T.replace "**" "%%**%%" .+               T.replace "//" "%%//%%"++-- | Convert Pandoc block element to Txt2Tags.+blockToTxt2Tags :: PandocMonad m+                => WriterOptions -- ^ Options+                -> Block         -- ^ Block element+                -> Txt2Tags m Text++blockToTxt2Tags opts (Div _attrs bs) = do+  contents <- blockListToTxt2Tags opts bs+  indent <- asks stIndent+  return $ contents <> if T.null indent then "\n" else ""++blockToTxt2Tags opts (Plain inlines) =+  inlineListToTxt2Tags opts inlines++blockToTxt2Tags opts (Para inlines) = do+  indent <- asks stIndent+  contents <- inlineListToTxt2Tags opts inlines+  return $ contents <> if T.null indent then "\n" else ""++blockToTxt2Tags opts (LineBlock lns) =+  blockToTxt2Tags opts $ linesToPara lns++blockToTxt2Tags _ b@(RawBlock f str)+  | f == Format "txt2tags" = return str+  -- Use the Txt2Tags raw area syntax (""") for block-level HTML pass-through:+  | f == Format "html" = return $ "\"\"\"\n" <> str <> "\n\"\"\"\n"+  | otherwise = "" <$ report (BlockNotRendered b)++blockToTxt2Tags _ HorizontalRule = return "\n--------------------\n"++blockToTxt2Tags opts (Header level _ inlines) = do+  -- Formatting is not allowed in headers, so strip it+  contents <- inlineListToTxt2Tags opts $ removeFormatting inlines+  let eqs = T.replicate level "="+  return $ eqs <> " " <> contents <> " " <> eqs <> "\n"++-- | Txt2Tags verbatim area uses ``` delimiters.+blockToTxt2Tags _ (CodeBlock _ str) =+  return $ "```\n" <> str <>+           (if "\n" `T.isSuffixOf` str then "" else "\n") <> "```\n"++-- | Txt2Tags has no blockquote syntax; render content without special markup.+blockToTxt2Tags opts (BlockQuote blocks) =+  blockListToTxt2Tags opts blocks++blockToTxt2Tags opts (Table _ blkCapt specs thead tbody tfoot) = do+  let (capt, aligns, _, headers, rows) = toLegacyTable blkCapt specs thead tbody tfoot+  captionDoc <- if null capt+                   then return ""+                   else do+                      c <- inlineListToTxt2Tags opts capt+                      return $ c <> "\n"+  headers' <- if all null headers+                 then return []+                 else zipWithM (tableItemToTxt2Tags opts) aligns headers+  rows' <- mapM (zipWithM (tableItemToTxt2Tags opts) aligns) rows+  let widths = map (maybe 0 maximum . nonEmpty . map T.length)+                   $ transpose (headers':rows')+  let padTo (width, al) s =+          case width - T.length s of+               x | x > 0 ->+                 if al == AlignLeft || al == AlignDefault+                    then s <> T.replicate x " "+                    else if al == AlignRight+                            then T.replicate x " " <> s+                            else T.replicate (x `div` 2) " " <>+                                 s <> T.replicate (x - x `div` 2) " "+                 | otherwise -> s+  let renderRow sep cells =+        sep <> T.intercalate sep (zipWith padTo (zip widths aligns) cells) <> sep+  return $ captionDoc <>+           (if null headers' then "" else renderRow "|" headers' <> "\n") <>+           T.unlines (map (renderRow "|") rows')++blockToTxt2Tags opts (BulletList items) = do+  indent <- asks stIndent+  contents <- local (\s -> s { stIndent = stIndent s <> "  " })+                (mapM (listItemToTxt2Tags opts) items)+  return $ vcat contents <> if T.null indent then "\n" else ""++blockToTxt2Tags opts (OrderedList _attribs items) = do+  indent <- asks stIndent+  contents <- local (\s -> s { stIndent = stIndent s <> "  " })+                (mapM (orderedListItemToTxt2Tags opts) items)+  return $ vcat contents <> if T.null indent then "\n" else ""++blockToTxt2Tags opts (Figure attr capt body) =+  blockToTxt2Tags opts $ figureDiv attr capt body++blockToTxt2Tags opts (DefinitionList items) = do+  indent <- asks stIndent+  contents <- local (\s -> s { stIndent = stIndent s <> "  " })+                (mapM (definitionListItemToTxt2Tags opts) items)+  return $ vcat contents <> if T.null indent then "\n" else ""++-- Auxiliary functions for lists:++-- | Convert bullet list item (list of blocks) to Txt2Tags.+listItemToTxt2Tags :: PandocMonad m+                   => WriterOptions -> [Block] -> Txt2Tags m Text+listItemToTxt2Tags opts items = do+  bs <- mapM (blockToTxt2Tags opts) items+  indent <- asks stIndent+  -- BulletList increments indent by "  ", so T.drop 2 gives the marker position:+  -- level 1 -> "", level 2 -> "  ", etc.+  let markerIndent = T.drop 2 indent+  -- Use newlines between blocks; T.stripEnd preserves leading spaces (e.g. nested+  -- list indentation) while removing trailing newlines that would create blank lines.+  let contents = T.intercalate "\n" (map T.stripEnd bs)+  return $ markerIndent <> "- " <> contents++-- | Convert ordered list item (list of blocks) to Txt2Tags.+orderedListItemToTxt2Tags :: PandocMonad m => WriterOptions -> [Block] -> Txt2Tags m Text+orderedListItemToTxt2Tags opts items = do+  bs <- mapM (blockToTxt2Tags opts) items+  indent <- asks stIndent+  -- OrderedList increments indent by "  ", so T.drop 2 gives the marker position+  let markerIndent = T.drop 2 indent+  let contents = T.intercalate "\n" (map T.stripEnd bs)+  return $ markerIndent <> "+ " <> contents++-- | Convert definition list item (label, list of blocks) to Txt2Tags.+-- Txt2Tags has no native definition list syntax; we use ": **term**" as a+-- label followed by indented definition content.+definitionListItemToTxt2Tags :: PandocMonad m+                             => WriterOptions+                             -> ([Inline], [[Block]])+                             -> Txt2Tags m Text+definitionListItemToTxt2Tags opts (label, items) = do+  labelText <- inlineListToTxt2Tags opts label+  contents  <- mapM (blockListToTxt2Tags opts) items+  indent    <- asks stIndent+  let markerIndent = T.drop 2 indent+  let defIndent    = markerIndent <> "  "+  let fmtItem c    = defIndent <> T.stripEnd c+  return $ markerIndent <> ": **" <> labelText <> "**\n" <>+           T.intercalate "\n" (map fmtItem contents)++-- | Concatenates strings with newlines between them.+vcat :: [Text] -> Text+vcat = T.intercalate "\n"++-- | For each string in the input list, replace newlines with Txt2Tags line+-- breaks (\\). Then join the list using double line breaks to simulate+-- paragraph breaks in table cells.+backSlashLineBreaks :: [Text] -> Text+backSlashLineBreaks ls = vcatBackSlash $ map (T.pack . escape . T.unpack) ls+  where+    vcatBackSlash = T.intercalate "\\\\ \\\\ " -- simulate paragraph break+    escape ['\n']    = "" -- remove trailing newlines+    escape ('\n':cs) = "\\\\ " <> escape cs+    escape (c:cs)    = c : escape cs+    escape []        = []++-- Auxiliary functions for tables:++tableItemToTxt2Tags :: PandocMonad m+                    => WriterOptions+                    -> Alignment+                    -> [Block]+                    -> Txt2Tags m Text+tableItemToTxt2Tags opts align' item = do+  -- In Txt2Tags, alignment is indicated by spaces around cell content:+  -- leading space -> right, trailing space -> left, both -> center.+  let mkcell x = (if align' == AlignRight || align' == AlignCenter+                     then "  "+                     else "") <> x <>+                 (if align' == AlignLeft || align' == AlignCenter+                     then "  "+                     else "")+  contents <- local (\s -> s { stBackSlashLB = True }) $+                blockListToTxt2Tags opts item+  return $ mkcell contents++-- | Convert list of Pandoc block elements to Txt2Tags.+blockListToTxt2Tags :: PandocMonad m+                    => WriterOptions -- ^ Options+                    -> [Block]       -- ^ List of block elements+                    -> Txt2Tags m Text+blockListToTxt2Tags opts blocks = do+  backSlash <- asks stBackSlashLB+  let blocks' = consolidateRawBlocks blocks+  if backSlash+    then backSlashLineBreaks <$> mapM (blockToTxt2Tags opts) blocks'+    else vcat <$> mapM (blockToTxt2Tags opts) blocks'++consolidateRawBlocks :: [Block] -> [Block]+consolidateRawBlocks [] = []+consolidateRawBlocks (RawBlock f1 b1 : RawBlock f2 b2 : xs)+  | f1 == f2 = consolidateRawBlocks (RawBlock f1 (b1 <> "\n" <> b2) : xs)+consolidateRawBlocks (x:xs) = x : consolidateRawBlocks xs++-- | Convert list of Pandoc inline elements to Txt2Tags.+inlineListToTxt2Tags :: PandocMonad m+                     => WriterOptions -> [Inline] -> Txt2Tags m Text+inlineListToTxt2Tags opts lst =+  T.concat <$> mapM (inlineToTxt2Tags opts) lst++-- | Render inlines wrapped in the given left and right delimiters.+surroundInlines :: PandocMonad m+                => WriterOptions -> Text -> Text -> [Inline] -> Txt2Tags m Text+surroundInlines opts left right lst = do+  contents <- inlineListToTxt2Tags opts lst+  return $ left <> contents <> right++-- | Convert Pandoc inline element to Txt2Tags.+inlineToTxt2Tags :: PandocMonad m+                 => WriterOptions -> Inline -> Txt2Tags m Text++inlineToTxt2Tags opts (Span _attrs ils) =+  inlineListToTxt2Tags opts ils++inlineToTxt2Tags opts (Emph lst) = surroundInlines opts "//" "//" lst++inlineToTxt2Tags opts (Underline lst) = surroundInlines opts "__" "__" lst++inlineToTxt2Tags opts (Strong lst) = surroundInlines opts "**" "**" lst++inlineToTxt2Tags opts (Strikeout lst) = surroundInlines opts "--" "--" lst++-- Txt2Tags has no superscript/subscript syntax; fall back to HTML tags.+inlineToTxt2Tags opts (Superscript lst) = surroundInlines opts "<sup>" "</sup>" lst++inlineToTxt2Tags opts (Subscript lst) = surroundInlines opts "<sub>" "</sub>" lst++inlineToTxt2Tags opts (SmallCaps lst) = inlineListToTxt2Tags opts lst++inlineToTxt2Tags opts (Quoted SingleQuote lst) = surroundInlines opts "\8216" "\8217" lst++inlineToTxt2Tags opts (Quoted DoubleQuote lst) = surroundInlines opts "\8220" "\8221" lst++inlineToTxt2Tags opts (Cite _ lst) = inlineListToTxt2Tags opts lst++-- | Inline code uses Txt2Tags verbatim syntax (double backticks).+inlineToTxt2Tags _ (Code _ str) =+  return $ "``" <> str <> "``"++inlineToTxt2Tags _ (Str str) = return $ escapeString str++inlineToTxt2Tags _ (Math mathType str) = return $ delim <> str <> delim+                                 -- note: str should NOT be escaped+  where delim = case mathType of+                     DisplayMath -> "$$"+                     InlineMath  -> "$"++inlineToTxt2Tags _ il@(RawInline f str)+  | f == Format "txt2tags" = return str+  -- Use the Txt2Tags inline raw syntax ("") for HTML pass-through:+  | f == Format "html" = return $ "\"\"" <> str <> "\"\""+  | otherwise = "" <$ report (InlineNotRendered il)++inlineToTxt2Tags _ LineBreak = do+  backSlash <- asks stBackSlashLB+  return $ if backSlash then "\n" else "\\\\\n"++inlineToTxt2Tags opts SoftBreak =+  case writerWrapText opts of+       WrapNone     -> return " "+       WrapAuto     -> return " "+       WrapPreserve -> return "\n"++inlineToTxt2Tags _ Space = return " "++inlineToTxt2Tags opts (Link _ txt (src, _)) = do+  label <- inlineListToTxt2Tags opts txt+  case txt of+     [Str s] | "mailto:" `T.isPrefixOf` src -> return $ "<" <> s <> ">"+             | escapeURI s == src -> return src+     _ -> if isURI src+             then return $ "[" <> label <> " " <> src <> "]"+             else return $ "[" <> label <> " " <> src' <> "]"+                    where src' = case T.uncons src of+                                    Just ('/', xs) -> xs+                                    _              -> src++inlineToTxt2Tags opts (Image attr alt (source, tit)) = do+  alt' <- inlineListToTxt2Tags opts alt+  let txt = case (tit, alt) of+              ("", []) -> ""+              ("", _ ) -> "|" <> alt'+              (_ , _ ) -> "|" <> tit+  return $ "[" <> source <> imageDims opts attr <> txt <> "]"++-- | Txt2Tags has no footnote syntax; render note content inline in parentheses.+inlineToTxt2Tags opts (Note contents) = do+  contents' <- blockListToTxt2Tags opts contents+  return $ "(" <> T.strip contents' <> ")"++imageDims :: WriterOptions -> Attr -> Text+imageDims opts attr = go (toPx $ dimension Width attr) (toPx $ dimension Height attr)+  where+    toPx = fmap (showInPixel opts) . checkPct+    checkPct (Just (Percent _)) = Nothing+    checkPct maybeDim           = maybeDim+    go (Just w) Nothing  = "?" <> w+    go (Just w) (Just h) = "?" <> w <> "x" <> h+    go Nothing  (Just h) = "?0x" <> h+    go Nothing  Nothing  = ""
src/Text/Pandoc/Writers/Typst.hs view
@@ -18,7 +18,7 @@     writeTypst   ) where import Text.Pandoc.Definition-import Text.Pandoc.Class ( PandocMonad, report )+import Text.Pandoc.Class ( PandocMonad, report, runPure, fetchItem ) import Text.Pandoc.ImageSize ( dimension, Dimension(Pixel), Direction(..),                                showInInch ) import Text.Pandoc.Options ( WriterOptions(..), WrapOption(..), isEnabled,@@ -33,10 +33,11 @@ import Text.Pandoc.Writers.Shared ( lookupMetaInlines, lookupMetaString,                                     metaToContext, defField, resetField,                                     setupTranslations )-import Text.Pandoc.Shared (isTightList, orderedListMarkers, tshow)+import Text.Pandoc.Shared (isTightList, orderedListMarkers, tshow, stringify) import Text.Pandoc.Highlighting (highlight, formatTypstBlock, formatTypstInline,                                  styleToTypst) import Text.Pandoc.Translations (Term(Abstract), translateTerm)+import Text.Pandoc.Error (PandocError(PandocSomeError)) import Text.Pandoc.Walk (query) import Text.Pandoc.Writers.Math (convertMath) import qualified Text.TeXMath as TM@@ -44,11 +45,13 @@ import Text.DocTemplates (renderTemplate) import Text.Pandoc.Extensions (Extension(..)) import Text.Pandoc.Logging (LogMessage(..))+import qualified Text.Pandoc.UTF8 as UTF8 import Text.Collate.Lang (Lang(..), parseLang) import Text.Printf (printf) import Data.Char (isDigit) import Data.Maybe (fromMaybe) import Unicode.Char (isXIDContinue)+import qualified Data.ByteString as B  -- | Convert Pandoc to Typst. writeTypst :: PandocMonad m => WriterOptions -> Pandoc -> m Text@@ -135,6 +138,9 @@ pickTypstAttrs :: [(Text, Text)] -> ([(Text, Text)],[(Text, Text)]) pickTypstAttrs = foldr go ([],[])   where+    go ("lang",lang)+      | Right l <- parseLang lang+      = second (("lang", tshow  (langLanguage l)):)     go (k,v) =       case T.splitOn ":" k of         ["typst", "text", x] -> second ((x,v):)@@ -161,10 +167,10 @@  toTypstSetText :: [(Text, Text)] -> Doc Text toTypstSetText [] = ""-toTypstSetText typstTextAttrs = "set text" <> parens (toTypstPropsListSep typstTextAttrs) <> "; "+toTypstSetText typstTextAttrs = "set text" <> parens (toTypstPropsListSep typstTextAttrs) <> ";"  toTypstPoundSetText :: [(Text, Text)] -> Doc Text-toTypstPoundSetText [] = ""+toTypstPoundSetText [] = mempty toTypstPoundSetText typstTextAttrs = "#" <> toTypstSetText typstTextAttrs  toTypstBracesSetText :: [(Text, Text)] -> Doc Text -> Doc Text@@ -229,7 +235,7 @@       contents <- blocksToTypst blocks       return $ "#quote(block: true)[" $$ chomp contents $$ "]" $$ blankline     HorizontalRule ->-      return $ blankline <> "#horizontalrule" <> blankline+      return $ blankline <> "#divider()" <> blankline     OrderedList attribs items -> do       let addBlock = case attribs of                        (1, DefaultStyle, DefaultDelim) -> id@@ -258,8 +264,11 @@       return $ (if isTightList items                    then vcat items'                    else vsep items') $$ blankline-    DefinitionList items ->-      ($$ blankline) . vsep <$> mapM defListItemToTypst items+    DefinitionList items -> do+      let concat' = if all (isTightList . snd) items+                    then vcat+                    else vsep+      ($$ blankline) . concat' <$> mapM defListItemToTypst items     Table (ident,tabclasses,tabkvs) (Caption _ caption) colspecs thead tbodies tfoot -> do       let lab = toLabel FreestandingLabel ident       capt' <- if null caption@@ -310,7 +319,7 @@                      ColSpan n -> [ "colspan: " <> tshow n ]) ++                   map formatTypstProp typstAttrs2             cellContents <- blocksToTypst bs-            let contents2 = brackets (toTypstPoundSetText typstTextAttrs <> cellContents)+            let contents2 = brackets (toTypstPoundSetText typstTextAttrs $$ cellContents)             pure $ if null cellattrs                       then contents2                       else "table.cell" <>@@ -363,12 +372,13 @@     Figure (ident,_,_) (Caption _mbshort capt) blocks -> do       caption <- blocksToTypst capt       opts <-  gets stOptions+      let toImage (Image attr inlines (src, _)) =+            Just $ mkImage opts False src attr (getAlt attr inlines)+          toImage _ = Nothing       contents <- case blocks of                      -- don't need #box around block-level image-                     [Para [Image attr _ (src, _)]]-                       -> pure $ mkImage opts False src attr-                     [Plain [Image attr _ (src, _)]]-                       -> pure $ mkImage opts False src attr+                     [Para [img]] | Just i <- toImage img -> pure i+                     [Plain [img]] | Just i <- toImage img -> pure i                      _ -> brackets <$> blocksToTypst blocks       let lab = toLabel FreestandingLabel ident       return $ "#figure(" <> nest 2 ((contents <> ",")@@ -381,17 +391,10 @@     Div (ident,_,kvs) blocks -> do       let lab = toLabel FreestandingLabel ident       let (typstAttrs,typstTextAttrs) = pickTypstAttrs kvs-      -- Handle lang attribute for Div elements-      let langAttrs = case lookup "lang" kvs of-                        Nothing -> []-                        Just lang -> case parseLang lang of-                                       Left _ -> []-                                       Right l -> [("lang",-                                                    tshow (langLanguage l))]-      let allTypstTextAttrs = typstTextAttrs ++ langAttrs       contents <- blocksToTypst blocks       return $ "#block" <> toTypstPropsListParens typstAttrs <> "["-        $$ toTypstPoundSetText allTypstTextAttrs <> contents+        $$ toTypstPoundSetText typstTextAttrs+        $$ contents         $$ ("]" <+> lab)  defListItemToTypst :: PandocMonad m => ([Inline], [[Block]]) -> TW m (Doc Text)@@ -400,7 +403,10 @@   term' <- inlinesToTypst term   modify $ \st -> st{ stEscapeContext = NormalContext }   defns' <- mapM blocksToTypst defns-  return $ nowrap ("/ " <> term' <> ": " <> "#block[") $$+  return $+    case defns of+      [[Plain _]] -> hang 4 (nowrap ("/ " <> term' <> ": ")) (vcat defns')+      _ -> nowrap ("/ " <> term' <> ": " <> "#block[") $$             chomp (vsep defns') $$ "]"  listItemToTypst :: PandocMonad m => Int -> Doc Text -> [Block] -> TW m (Doc Text)@@ -409,6 +415,10 @@   return $ hang ind (marker <> space) contents  inlinesToTypst :: PandocMonad m => [Inline] -> TW m (Doc Text)+inlinesToTypst (i@(Span (ident,_,_) _):is) | not (T.null ident) =+  -- insert a zero-width space U+200B before the label+  -- because a typst label refers to preceding element (see #11568)+  ("\x200B" <>) . hcat <$> mapM inlineToTypst (escapeParens (i:is)) inlinesToTypst ils = hcat <$> mapM inlineToTypst (escapeParens ils)  -- Add an escape before a parenthesis right after a non-space element.@@ -443,7 +453,7 @@         WrapPreserve -> return cr         WrapAuto     -> return space         WrapNone     -> return space-    LineBreak -> return (space <> "\\" <> cr)+    LineBreak -> return (space <> "\\" <> space)     Math mathType str -> do       res <- convertMath TM.writeTypst mathType str       case res of@@ -529,16 +539,16 @@                     (if inlines == [Str src]                           then mempty                           else nowrap $ brackets contents)-    Image attr _inlines (src,_tit) -> do+    Image attr inlines (src,_tit) -> do       opts <-  gets stOptions-      pure $ mkImage opts True src attr+      pure $ mkImage opts True src attr (getAlt attr inlines)     Note blocks -> do       contents <- blocksToTypst blocks       return $ "#footnote" <> brackets (chomp contents)  -- see #9104; need box or image is treated as block-level-mkImage :: WriterOptions -> Bool -> Text -> Attr -> Doc Text-mkImage opts useBox src attr+mkImage :: WriterOptions -> Bool -> Text -> Attr -> Maybe Text -> Doc Text+mkImage opts useBox src attr mbAlt   | useBox = "#box" <> parens coreImage   | otherwise = coreImage  where@@ -552,12 +562,34 @@      (case dimension Width attr of         Nothing -> mempty         Just dim -> ", width: " <> showDim dim)+  altAttr = case mbAlt of+              Just alt -> ", alt: " <> doubleQuoted alt+              Nothing -> mempty   isData = "data:" `T.isPrefixOf` src'-  dataSvg = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><image xlink:href=\"" <> src' <> "\" /></svg>"-  coreImage-    | isData = "image.decode" <> parens(doubleQuoted dataSvg <> dimAttrs)-    | otherwise = "image" <> parens (doubleQuoted src' <> dimAttrs)+  eitherImageData = if isData+                       then runPure (fetchItem src)+                       else Left $ PandocSomeError "not a data URI"+  toArray = parens . hcat . intersperse "," . map (literal . tshow) . B.unpack+  attrs = dimAttrs <> altAttr+  coreImage = "image" <> parens+    (case eitherImageData of+      Right (contents, Just "image/svg+xml")+        -> "bytes" <> parens (doubleQuoted (UTF8.toText contents)) <> attrs+      Right (bytes, _mime) -> "bytes" <> parens (toArray bytes) <> attrs+      Left _ -> doubleQuoted src' <> attrs) +-- | Extract alt text from image attributes and inlines.+-- Use explicit alt attribute if present; otherwise use inlines.+-- Empty alt="" means decorative image (no alt text).+getAlt :: Attr -> [Inline] -> Maybe Text+getAlt (_, _, kvs) imgInlines =+  case lookup "alt" kvs of+    Just "" -> Nothing  -- decorative+    Just alt -> Just alt+    Nothing -> case imgInlines of+                 [] -> Nothing+                 _ -> Just (stringify imgInlines)+ textstyle :: PandocMonad m => Doc Text -> [Inline] -> TW m (Doc Text) textstyle s inlines = do   (s <>) . brackets . fixInitialAfterBreakEscape@@ -579,25 +611,35 @@ escapeTypst :: Bool -> EscapeContext -> Text -> Doc Text escapeTypst smart context t =   (case T.uncons t of-    Just (c, _)+    Just (c, rest)       | c == ';' -> char '\\' -- see #9252+      | c == '.'+      , not (T.null rest) -> char '\\' -- see #11511       | needsEscapeAtLineStart c || isOrderedListMarker t         -> afterBreak "\\"     _ -> mempty) <>-  (literal (T.replace "//" "\\/\\/"-    (if T.any needsEscape t-        then T.concatMap escapeChar t-        else t)))+   literal (snd $ T.foldl' go ('\n', mempty) t)   where+    go (lastc, t') c+      | needsEscape c = (c, t' <> escapeChar c)+      | c == '-', lastc == '-', smart = (c, t' <> T.pack ['\\',c])+      | c == '/', lastc == '/' = (c, t' <> T.pack ['\\',c])+      | otherwise = (c, T.snoc t' c)     escapeChar c       | c == '\160' = "~"+      | c == '\8216', smart = "'" -- left quote       | c == '\8217', smart = "'" -- apostrophe+      | c == '\8220', smart = "\"" -- left double quote+      | c == '\8221', smart = "\"" -- right double quote       | c == '\8212', smart = "---" -- em dash       | c == '\8211', smart = "--" -- en dash       | needsEscape c = "\\" <> T.singleton c       | otherwise = T.singleton c     needsEscape '\160' = True+    needsEscape '\8216' = smart     needsEscape '\8217' = smart+    needsEscape '\8220' = smart+    needsEscape '\8221' = smart     needsEscape '\8212' = smart     needsEscape '\8211' = smart     needsEscape '\'' = smart
test/Tests/MediaBag.hs view
@@ -7,42 +7,50 @@ import Text.Pandoc.Class.IO (extractMedia) import Text.Pandoc.Class (fillMediaBag, runIOorExplode) import System.IO.Temp (withTempDirectory)-import Text.Pandoc.Shared (inDirectory) import System.FilePath import Text.Pandoc.Builder as B-import System.Directory (doesFileExist, copyFile)+import qualified Data.Text as T+import System.Directory (doesFileExist, makeAbsolute)  tests :: [TestTree] tests = [   testCase "test fillMediaBag & extractMedia" $-      withTempDirectory "." "extractMediaTest" $ \tmpdir -> inDirectory tmpdir $ do-        copyFile "../../test/lalune.jpg" "moon.jpg"+      withTempDirectory "." "extractMediaTest" $ \tmpdir -> do+        -- Use absolute paths so the test does not need to change+        -- the process-wide current directory (which is not thread-safe+        -- and breaks other tests running in parallel).+        absTmpdir <- makeAbsolute tmpdir+        absLalune <- makeAbsolute "lalune.jpg"         let d = B.doc $-                  B.para (B.image "../../test/lalune.jpg" "" mempty) <>-                  B.para (B.image "moon.jpg" "" mempty) <>+                  -- simple relative path -> extracted with original name+                  B.para (B.image "lalune.jpg" "" mempty) <>+                  -- absolute path -> extracted with hashed name+                  B.para (B.image (T.pack absLalune) "" mempty) <>                   B.para (B.image "data:image/png;base64,cHJpbnQgImhlbGxvIgo=;.lua+%2f%2e%2e%2f%2e%2e%2fa%2elua" "" mempty) <>                   B.para (B.image "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" "" mempty)+        let fooDir = absTmpdir </> "foo"         runIOorExplode $ do           fillMediaBag d-          extractMedia "foo" d-        exists1 <- doesFileExist ("foo" </> "moon.jpg")+          extractMedia fooDir d+        exists1 <- doesFileExist (fooDir </> "lalune.jpg")         assertBool "file in directory is not extracted with original name" exists1-        exists2 <- doesFileExist ("foo" </> "f9d88c3dbe18f6a7f5670e994a947d51216cdf0e.jpg")-        assertBool "file above directory is not extracted with hashed name" exists2-        exists3 <- doesFileExist ("foo" </> "2a0eaa89f43fada3e6c577beea4f2f8f53ab6a1d.png")-        exists4 <- doesFileExist "a.lua"+        exists2 <- doesFileExist (fooDir </> "f9d88c3dbe18f6a7f5670e994a947d51216cdf0e.jpg")+        assertBool "file with absolute path is not extracted with hashed name" exists2+        exists3 <- doesFileExist (fooDir </> "2a0eaa89f43fada3e6c577beea4f2f8f53ab6a1d.png")+        exists4 <- doesFileExist (absTmpdir </> "a.lua")         assertBool "data uri with malicious payload gets written outside of destination dir"           (exists3 && not exists4)-        exists5 <- doesFileExist ("foo" </> "d5fceb6532643d0d84ffe09c40c481ecdf59e15a.gif")+        exists5 <- doesFileExist (fooDir </> "d5fceb6532643d0d84ffe09c40c481ecdf59e15a.gif")         assertBool "data uri with gif is not properly decoded" exists5         -- double-encoded version:         let e = B.doc $                   B.para (B.image "data:image/png;base64,cHJpbnQgInB3bmVkIgo=;.lua+%252f%252e%252e%252f%252e%252e%252fb%252elua" "" mempty)+        let barDir = absTmpdir </> "bar"         runIOorExplode $ do           fillMediaBag e-          extractMedia "bar" e-        exists6 <- doesFileExist ("bar" </> "772ceca21a2751863ec46cb23db0e7fc35b9cff8.png")-        exists7 <- doesFileExist "b.lua"+          extractMedia barDir e+        exists6 <- doesFileExist (barDir </> "772ceca21a2751863ec46cb23db0e7fc35b9cff8.png")+        exists7 <- doesFileExist (absTmpdir </> "b.lua")         assertBool "data uri with double-encoded malicious payload gets written outside of destination dir"           (exists6 && not exists7)   ]
test/Tests/Old.hs view
@@ -173,7 +173,8 @@       "haddock-reader.haddock" "haddock-reader.native"     ]   , testGroup "txt2tags"-    [ test' "reader" ["-r", "t2t", "-w", "native", "-s"]+    [ testGroup "writer" $ writerTests' "t2t"+    , test' "reader" ["-r", "t2t", "-w", "native", "-s"]         "txt2tags.t2t" "txt2tags.native" ]   , testGroup "epub" [       test' "features" ["-r", "epub", "-w", "native", "-s"]@@ -344,7 +345,7 @@ s5WriterTest :: FilePath -> String -> [String] -> String -> TestTree s5WriterTest pandocPath modifier opts format   = test pandocPath (format ++ " writer (" ++ modifier ++ ")")-    (["-r", "native", "-w", format] ++ opts)+    (["-r", "native", "-w", format] ++ opts ++ ["--variable", "pandoc-version="])     "s5.native"  ("s5-" ++ modifier <.> "html")  fb2WriterTest :: FilePath -> String -> [String] -> String -> String -> TestTree
test/Tests/Readers/Docx.hs view
@@ -215,6 +215,18 @@             "text in shape format"             "docx/text_in_shape_format.docx"             "docx/text_in_shape_format.native"+          , testCompare+            "image inside textbox content"+            "docx/textbox_image.docx"+            "docx/textbox_image.native"+          , testCompare+            "image inside textbox content with duplicate encoding"+            "docx/textbox_image_duplicate_encoding.docx"+            "docx/textbox_image_duplicate_encoding.native"+          , testCompare+            "image with textbox caption in same paragraph"+            "docx/image_with_textbox_caption.docx"+            "docx/image_with_textbox_caption.native"           ]         , testGroup "blocks"           [ testCompare@@ -270,6 +282,10 @@             "docx/lists_sublist_reset.docx"             "docx/lists_sublist_reset.native"           , testCompare+            "style-based list restarted on one item (#8367)"+            "docx/lists_restart_8367.docx"+            "docx/lists_restart_8367.native"+          , testCompare             "definition lists"             "docx/definition_list.docx"             "docx/definition_list.native"@@ -318,6 +334,10 @@             "docx/table_with_list_cell.docx"             "docx/table_with_list_cell.native"           , testCompare+            "a table with gridBefore"+            "docx/table_gridbefore.docx"+            "docx/table_gridbefore.native"+          , testCompare             "a table with a header which contains rowspans greater than 1"             "docx/table_header_rowspan.docx"             "docx/table_header_rowspan.native"@@ -469,6 +489,15 @@           [ testMediaBag             "image extraction"             "docx/image.docx"+          , testMediaBag+            "image inside textbox content populates media bag"+            "docx/textbox_image.docx"+          , testMediaBag+            "image inside textbox content with duplicate encoding populates media bag"+            "docx/textbox_image_duplicate_encoding.docx"+          , testMediaBag+            "image with textbox caption in same paragraph populates media bag"+            "docx/image_with_textbox_caption.docx"           ]         , testGroup "custom styles"           [ testCompare
test/Tests/Readers/HTML.hs view
@@ -124,7 +124,7 @@         , testGroup "header"           [ test htmlNativeDivs "<header> is parsed as a div" $             "<header id=\"title\">Title</header>" =?>-            divWith ("title", mempty, mempty) (plain "Title")+            divWith ("title", ["header"], mempty) (plain "Title")           ]         , testGroup "code block"           [ test html "attributes in pre > code element" $
test/Tests/Readers/Markdown.hs view
@@ -375,6 +375,12 @@           , test markdownSmart "unclosed double quote"             ("**this should \"be bold**"             =?> para (strong "this should \8220be bold"))+          , test markdownSmart "single quote in inline note within single quotes" $ -- issue #11613+              "'a^['b'.] c.'" =?>+              para (singleQuoted ("a" <> note (para (singleQuoted "b" <> ".")) <> space <> "c."))+          , test markdownSmart "double quote in inline note within double quotes" $ -- issue #11613+              "\"a^[\"b\".] c.\"" =?>+              para (doubleQuoted ("a" <> note (para (doubleQuoted "b" <> ".")) <> space <> "c."))           ]         , testGroup "sub- and superscripts"           [
test/Tests/Readers/ODT.hs view
@@ -167,6 +167,7 @@ namesOfTestsComparingToNative   = [ "blockquote"                                   , "image"                                   , "imageIndex"+                                  , "imageRelative"                                   , "imageWithCaption"                                   , "inlinedCode"                                   , "listContinueNumbering"@@ -175,6 +176,8 @@                                   , "orderedListRoman"                                   , "orderedListSimple"                                   , "orderedListHeader"+                                  , "preformattedText"+                                  , "preformattedTextParentStyle"                                   , "referenceToChapter"                                   , "referenceToListItem"                                   , "referenceToText"@@ -186,6 +189,7 @@ --                                , "table"                                   , "textMixedStyles"                                   , "tableWithContents"+                                  , "tableWithSpans"                                   , "unicode"                                   , "unorderedList"                                   , "unorderedListHeader"
test/Tests/Readers/Org/Block.hs view
@@ -43,7 +43,7 @@       T.unlines [ ": echo hello"                 , ": echo dear tester"                 ] =?>-      codeBlockWith ("", ["example"], []) "echo hello\necho dear tester\n"+      codeBlockWith ("", [], []) "echo hello\necho dear tester\n"    , "Example block surrounded by text" =:       T.unlines [ "Greetings"@@ -52,7 +52,7 @@                 , "Bye"                 ] =?>       mconcat [ para "Greetings"-              , codeBlockWith ("", ["example"], [])+              , codeBlockWith ("", [], [])                               "echo hello\necho dear tester\n"               , para "Bye"               ]
test/Tests/Readers/Org/Block/CodeBlock.hs view
@@ -99,7 +99,7 @@            results' = "65\n"        in codeBlockWith ("", classes, params) code'           <>-          codeBlockWith ("", ["example"], []) results'+          codeBlockWith ("", [], []) results'    , "Source block with results and :exports code" =:        T.unlines [ "#+begin_src emacs-lisp :exports code"@@ -126,7 +126,7 @@                  , "#+RESULTS:"                  , ": 65" ] =?>        let results' = "65\n"-       in codeBlockWith ("", ["example"], []) results'+       in codeBlockWith ("", [], []) results'    , "Source block with results and :exports none" =:        T.unlines [ "#+begin_src emacs-lisp :exports none"@@ -171,7 +171,7 @@                  , "a rule."                  , "#+eND_exAMPle"                  ] =?>-       codeBlockWith ("", ["example"], [])+       codeBlockWith ("", [], [])                      "A chosen representation of\na rule.\n"    , "Code block with caption" =:
test/Tests/Readers/RST.hs view
@@ -220,5 +220,34 @@           , "include newlines" =:             "**before\nafter**" =?>             para (strong (text "before\nafter"))+          , "bare reference reusing a named target resolves correctly" =:+            T.unlines+              [ ".. _target:"+              , ""+              , "See `alias <target_>`_ and again alias_."+              ] =?>+            divWith ("target",[],[])+              (para ("See " <> link "#target" "" "alias" <> " and again " <>+                     link "#target" "" "alias" <> "."))+          , "self-referencing named target does not loop forever" =:+            "See `a <a_>`_." =?>+            para ("See " <> link "##REF##a" "" "a" <> ".")+          , "reference to internal target embedded in a substitution" =:+            T.unlines+              [ ".. _target:"+              , ""+              , "See |sub|."+              , ""+              , ".. |sub| replace:: `text <target_>`_"+              ] =?>+            divWith ("target",[],[])+              (para ("See " <> link "#target" "" "text" <> "."))+          , "circular substitution does not loop forever" =:+            T.unlines+              [ ".. |a| replace:: |a|"+              , ""+              , "Test |a| here."+              ] =?>+            para ("Test " <> spanWith ("",[],[]) "|a|" <> " here.")           ]         ]
test/Tests/Readers/RTF.hs view
@@ -35,6 +35,8 @@                     , "formatting"                     , "list_simple"                     , "list_complex"+                    , "list_multiparagraph"+                    , "list_legacy"                     , "bookmark"                     , "table_simple"                     , "table_error_codes"
test/Tests/Writers/Docx.hs view
@@ -1,11 +1,46 @@+{-# LANGUAGE OverloadedStrings #-} module Tests.Writers.Docx (tests) where -import Text.Pandoc+import Codec.Archive.Zip (Archive, findEntryByPath, fromEntry, toArchive)+import qualified Data.ByteString.Lazy as BL+import Data.List (isInfixOf, isPrefixOf)+import qualified Data.Map as M+import Data.Text (Text)+import qualified Data.Text as Text+import qualified Data.Text.IO as T import Test.Tasty-import Tests.Writers.OOXML import Test.Tasty.HUnit-import Data.List (isPrefixOf)+import Tests.Writers.OOXML+import Text.Pandoc+import Text.XML.Light ( Element, QName(QName), findAttr, findElements+                      , parseXMLDoc ) +wmlName :: String -> QName+wmlName n = QName n+  (Just "http://schemas.openxmlformats.org/wordprocessingml/2006/main")+  (Just "w")++entryBytes :: String -> Archive -> IO BL.ByteString+entryBytes path archive =+  maybe (assertFailure $ "Missing " ++ path) (return . fromEntry) $+    findEntryByPath path archive++entryXml :: String -> Archive -> IO Element+entryXml path archive =+  maybe (assertFailure $ "Invalid " ++ path) return . parseXMLDoc+    =<< entryBytes path archive++documentXml :: WriterOptions -> Pandoc -> IO Element+documentXml opts doc =+  entryXml "word/document.xml" . toArchive =<<+    runIOorExplode (setVerbosity ERROR >> writeDocx opts doc)++documentXmlFromNative :: WriterOptions -> FilePath -> IO Element+documentXmlFromNative opts fp = do+  txt <- T.readFile fp+  entryXml "word/document.xml" . toArchive =<<+    runIOorExplode (setVerbosity ERROR >> readNative def txt >>= writeDocx opts)+ -- we add an extra check to make sure that we're not writing in the -- toplevel docx directory. We don't want to accidentally overwrite an -- Word-generated docx file used to test the reader.@@ -213,5 +248,108 @@             def             "docx/document-properties-short-desc.native"             "docx/golden/document-properties-short-desc.docx"+          ]+        , testGroup "top-level-division"+          [ testCase "no section break before first chapter (#10578)" $ do+              let opts = def{ writerTopLevelDivision = TopLevelChapter }+              doc <- documentXml opts $ Pandoc mempty+                [ Header 1 ("ch1", [], []) [Str "Chapter", Space, Str "1"]+                , Para [Str "First", Space, Str "chapter."]+                ]+              let sectPrCount = length $ findElements (wmlName "sectPr") doc+              assertBool ("Expected 1 sectPr, found " ++ show sectPrCount)+                (sectPrCount == 1)+          , testCase "section breaks between chapters (#11482)" $ do+              let opts = def{ writerTopLevelDivision = TopLevelChapter }+              doc <- documentXml opts $ Pandoc mempty+                [ Header 1 ("ch1", [], []) [Str "Chapter", Space, Str "1"]+                , Para [Str "First", Space, Str "chapter."]+                , Header 1 ("ch2", [], []) [Str "Chapter", Space, Str "2"]+                , Para [Str "Second", Space, Str "chapter."]+                , Header 1 ("ch3", [], []) [Str "Chapter", Space, Str "3"]+                , Para [Str "Third", Space, Str "chapter."]+                ]+              let sectPrCount = length $ findElements (wmlName "sectPr") doc+              assertBool ("Expected 3 sectPrs, found " ++ show sectPrCount)+                (sectPrCount == 3)+          ]+        , testGroup "reference docx"+          [ testCase "no media directory override in content types" $ do+              let opts = def{writerReferenceDoc=Just "docx/inline_images.docx"}+              txt <- T.readFile "docx/inline_formatting.native"+              bs <- runIOorExplode $ do+                mblang <- toLang (Just (Text.pack "en-US") :: Maybe Text)+                maybe (return ()) setTranslations mblang+                setVerbosity ERROR+                readNative def txt >>= writeDocx opts+              doc <- entryXml "[Content_Types].xml" $ toArchive bs+              let partNameAttr = QName "PartName" Nothing Nothing+              let overrideName = QName "Override" Nothing Nothing+              let overrides = findElements overrideName doc+              let hasBadOverride =+                    any (\el -> findAttr partNameAttr el == Just "/word/media/")+                        overrides+              assertBool "Found invalid /word/media/ Override in [Content_Types].xml"+                (not hasBadOverride)+          , testCase "language from reference docx is preserved" $ do+              -- First, verify that the german-reference.docx actually has de-DE+              refBs <- BL.readFile "docx/german-reference.docx"+              let refArchive = toArchive refBs+              refStylesXml <- show <$> entryBytes "word/styles.xml" refArchive+              let getLangLines = filter ("w:lang" `isInfixOf`) . lines+              assertBool ("german-reference.docx w:lang line: " +++                  unlines (getLangLines refStylesXml))+                (any ("de-DE" `isInfixOf`) (getLangLines refStylesXml))+              -- Now test that using this reference preserves the language+              let opts = def{writerReferenceDoc=Just "docx/german-reference.docx"}+              txt <- T.readFile "docx/inline_formatting.native"+              bs <- runIOorExplode $ do+                setVerbosity ERROR+                readNative def txt >>= writeDocx opts+              stylesXml <- show <$> entryBytes "word/styles.xml" (toArchive bs)+              -- Find the w:lang line for debugging+              -- Check that the styles.xml contains the German language+              assertBool ("Language from reference docx not preserved. w:lang lines: " ++ unlines (getLangLines stylesXml))+                (any ("de-DE" `isInfixOf`) (getLangLines stylesXml))+          , testCase "section properties from non-w-prefix reference docx" $ do+              let opts = def{writerReferenceDoc=Just "docx/ns0-reference.docx"}+              doc <- documentXmlFromNative opts "docx/inline_formatting.native"+              case findElements (wmlName "sectPr") doc of+                [] -> assertFailure "sectPr not found in output"+                sectPr:_ -> do+                  assertBool "pgSz not found in output"+                    (not $ null $ findElements (wmlName "pgSz") sectPr)+                  findAttr (wmlName "type") sectPr @?= Just "continuous"+          , testCase "language from metadata overrides reference docx" $ do+              -- Use a reference docx with German language, but specify French in metadata+              let opts = def{writerReferenceDoc=Just "docx/german-reference.docx"}+              bs <- runIOorExplode $ do+                setVerbosity ERROR+                -- Create a document with French language metadata+                let doc = Pandoc (Meta $ M.fromList [("lang", MetaString "fr-FR")])+                                 [Para [Str "Test"]]+                writeDocx opts doc+              stylesXml <- show <$> entryBytes "word/styles.xml" (toArchive bs)+              -- Check that the styles.xml contains the French language (not German)+              let getLangLines = filter ("w:lang" `isInfixOf`) . lines+              assertBool "Language from metadata did not override reference docx (expected fr-FR)"+                (any ("fr-FR" `isInfixOf`) (getLangLines stylesXml))+          ]+        , testGroup "paragraph styles"+          [ testCase "FirstParagraph after heading with footnote (#11573)" $ do+              let opts = def+              bs <- runIOorExplode $ do+                setVerbosity ERROR+                let doc = Pandoc mempty+                          [ Header 3 ("heading-with-note", [], [])+                              [Note [Para [Str "note"]], Str "Heading"]+                          , Para [Str "Para", Space, Str "after."]+                          ]+                writeDocx opts doc+              docXml <- show <$> entryBytes "word/document.xml" (toArchive bs)+              assertBool+                ("Expected FirstParagraph style after heading with footnote, got: "+                  ++ docXml)+                ("FirstParagraph" `isInfixOf` docXml)           ]         ]
test/Tests/Writers/HTML.hs view
@@ -102,13 +102,13 @@   , testGroup "sample with style"     [ "samp should wrap highlighted code" =:       codeWith ("",["sample","haskell"],[]) ">>="-      =?> ("<samp><code class=\"sourceCode haskell\">" +++      =?> ("<samp><code class=\"sourceCode haskell sample\">" ++           "<span class=\"op\">&gt;&gt;=</span></code></samp>")     ]   , testGroup "variable with style"     [ "var should wrap highlighted code" =:       codeWith ("",["haskell","variable"],[]) ">>="-      =?> ("<var><code class=\"sourceCode haskell\">" +++      =?> ("<var><code class=\"sourceCode haskell variable\">" ++           "<span class=\"op\">&gt;&gt;=</span></code></var>")     ]   , testGroup "footnotes"
test/Tests/Writers/Powerpoint.hs view
@@ -78,6 +78,10 @@       def       "pptx/tables/input.native"       "pptx/tables/output.pptx"+    , pptxTests "table with surrounding content stays on same slide"+      def+      "pptx/table-with-surrounding-content/input.native"+      "pptx/table-with-surrounding-content/output.pptx"     , pptxTests "table of contents"       def{ writerTableOfContents = True }       "pptx/slide-breaks/input.native"@@ -126,6 +130,10 @@       def       "pptx/speaker-notes-after-metadata/input.native"       "pptx/speaker-notes-after-metadata/output.pptx"+    , pptxTests "speaker notes from metadata field"+      def+      "pptx/metadata-speaker-notes/input.native"+      "pptx/metadata-speaker-notes/output.pptx"     , pptxTests "remove empty slides"       def       "pptx/remove-empty-slides/input.native"
+ test/Tests/Writers/Txt2Tags.hs view
@@ -0,0 +1,124 @@+{-# LANGUAGE OverloadedStrings #-}+module Tests.Writers.Txt2Tags (tests) where++import Data.Text (Text)+import Test.Tasty+import Test.Tasty.HUnit (HasCallStack)+import Tests.Helpers+import Text.Pandoc+import Text.Pandoc.Arbitrary ()+import Text.Pandoc.Builder++txt2tags :: (ToPandoc a) => a -> Text+txt2tags = purely (writeTxt2Tags def) . toPandoc++infix 4 =:+(=:) :: (ToString a, ToPandoc a, HasCallStack)+     => String -> (a, Text) -> TestTree+(=:) = test txt2tags++tests :: [TestTree]+tests =+  [ testGroup "inline formatting"+    [ "bold"      =: strong "text"    =?> "**text**"+    , "italic"    =: emph "text"      =?> "//text//"+    , "underline" =: underline "text" =?> "__text__"+    , "strikeout" =: strikeout "text" =?> "--text--"+    , "inline code" =: code "foo"     =?> "``foo``"+    ]+  , testGroup "escape special characters"+    [ "escape bold marker"      =: str "a**b" =?> "a%%**%%b"+    , "escape italic marker"    =: str "a//b" =?> "a%%//%%b"+    , "escape underline marker" =: str "a__b" =?> "a%%__%%b"+    , "escape strikeout marker" =: str "a--b" =?> "a%%--%%b"+    , "escape code marker"      =: str "a``b" =?> "a%%``%%b"+    ]+  , testGroup "headers"+    [ "h1" =: header 1 "Heading" =?> "= Heading =\n"+    , "h2" =: header 2 "Heading" =?> "== Heading ==\n"+    , "h3" =: header 3 "Heading" =?> "=== Heading ===\n"+    , "h4" =: header 4 "Heading" =?> "==== Heading ====\n"+    ]+  , testGroup "code blocks"+    [ "no trailing newline in source"+        =: codeBlock "foo"+        =?> "```\nfoo\n```\n"+    , "trailing newline preserved"+        =: codeBlock "foo\n"+        =?> "```\nfoo\n```\n"+    ]+  , testGroup "lists"+    [ "bullet list"+        =: bulletList [para "foo", para "bar"]+        =?> "- foo\n- bar\n"+    , "ordered list"+        =: orderedList [para "foo", para "bar"]+        =?> "+ foo\n+ bar\n"+    , "nested bullet list"+        =: bulletList [para "a" <> bulletList [para "b"]]+        =?> "- a\n  - b\n"+    , "nested ordered list"+        =: orderedList [para "a" <> orderedList [para "b"]]+        =?> "+ a\n  + b\n"+    ]+  , testGroup "definition lists"+    [ "single term and definition"+        =: definitionList [("term", [para "definition"])]+        =?> ": **term**\n  definition\n"+    , "multiple terms"+        =: definitionList+            [ ("foo", [para "def foo"])+            , ("bar", [para "def bar"])+            ]+        =?> ": **foo**\n  def foo\n: **bar**\n  def bar\n"+    , "multiple definitions for one term"+        =: definitionList [("term", [para "def1", para "def2"])]+        =?> ": **term**\n  def1\n  def2\n"+    ]+  , testGroup "blockquote"+    -- Txt2Tags has no blockquote syntax; content is rendered without special markup.+    [ "blockquote rendered as plain content"+        =: blockQuote (para "quoted")+        =?> "quoted\n"+    ]+  , testGroup "horizontal rule"+    [ "hr" =: horizontalRule =?> "\n--------------------\n"+    ]+  , testGroup "tables"+    [ "table with headers"+        =: simpleTable [plain "A", plain "B"]+                       [[plain "1", plain "2"]]+        =?> "|A|B|\n|1|2|\n"+    , "table without headers"+        =: simpleTable [] [[plain "1", plain "2"]]+        =?> "|1|2|\n"+    ]+  , testGroup "links"+    [ "link with label"+        =: link "http://example.com" "" "example"+        =?> "[example http://example.com]"+    , "autolink"+        =: link "http://example.com" "" "http://example.com"+        =?> "http://example.com"+    , "email"+        =: link "mailto:user@example.com" "" "user@example.com"+        =?> "<user@example.com>"+    ]+  , testGroup "images"+    [ "simple image (no title, no alt)"+        -- Use imageWith + mempty to get truly empty alt ([]) vs str "" which gives [Str ""]+        =: imageWith ("", [], []) "image.png" "" mempty+        =?> "[image.png]"+    , "image with title"+        =: image "image.png" "My title" "ignored alt"+        =?> "[image.png|My title]"+    , "image with alt text (no title)"+        =: image "image.png" "" "alt text"+        =?> "[image.png|alt text]"+    ]+  , testGroup "raw blocks"+    [ "txt2tags passthrough"+        =: rawBlock "txt2tags" "raw content"+        =?> "raw content"+    ]+  ]
+ test/command/1023.md view
@@ -0,0 +1,129 @@+```+% pandoc -t latex+:  Here's the caption.+It may span multiple lines. {.float #ident latex-placement="ht"}++---------------------------------------------------------------+ Centered   Left             Right+  Header    Aligned        Aligned  Default aligned+----------  ---------  -----------  ---------------------------+   First    row               12.0  Example of a row that spans+                                    multiple lines.++   Second   row                5.0  Here's another one.  Note+                                    the blank line between rows.+---------------------------------------------------------------+^D+\begin{table}[ht]+\centering+\caption{Here's the caption. It may span multiple+lines.}\label{ident}\tabularnewline+\begin{tabular}{@{}+  >{\centering\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1667}}+  >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1528}}+  >{\raggedleft\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1806}}+  >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3889}}@{}}+\toprule\noalign{}+\begin{minipage}[b]{\linewidth}\centering+Centered Header+\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright+Left Aligned+\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft+Right Aligned+\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright+Default aligned+\end{minipage} \\+\midrule\noalign{}+First & row & 12.0 & Example of a row that spans multiple lines. \\+Second & row & 5.0 & Here's another one. Note the blank line between+rows. \\+\bottomrule\noalign{}+\end{tabular}+\end{table}++```++```+% pandoc -t latex+: Simple table with no column headers {.float #ident}++-------     ------ ----------   -------+     12     12        12             12+    123     123       123           123+      1     1          1              1+-------     ------ ----------   -------+^D+\begin{table}[]+\centering+\caption{Simple table with no column+headers}\label{ident}\tabularnewline+\begin{tabular}{@{}rlcr@{}}+\toprule\noalign{}+12 & 12 & 12 & 12 \\+123 & 123 & 123 & 123 \\+1 & 1 & 1 & 1 \\+\bottomrule\noalign{}+\end{tabular}+\end{table}++```++```+% pandoc -t latex++--------------------+---------------------+---------------+---------------++| Name^[In English.] | Capital             | Population\   | Area\         |+|                    |                     | (in 2018)     | (in km^2^)    |++:==================:+:====================+:==============+:==============++| Denmark            | Copenhagen          | 5,809,502     | 43,094        |++--------------------+---------------------+---------------+---------------++| Finland            | Helsinki            | 5,537,364     | 338,145       |++--------------------+---------------------+---------------+---------------++| Iceland^[Brrr.]    | Reykjavik           | 343,518       | 103,000       |++--------------------+---------------------+---------------+---------------++| Norway             | Oslo                | 5,372,191     | 323,802       |++--------------------+---------------------+---------------+---------------++| Sweden             | Stockholm           | 10,313,447    | 450,295       |++====================+=====================+===============+===============++| Total              |                     | 27,376,022    | 1,258,336     |++====================+=====================+===============+===============+++: States belonging to the *Nordics.* {#nordics source="wikipedia" .float}+^D+\begin{table}[]+\centering+\caption{States belonging to the+\emph{Nordics.}}\label{nordics}\tabularnewline+\begin{tabular}{@{}+  >{\centering\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2727}}+  >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2857}}+  >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2078}}+  >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2078}}@{}}+\toprule\noalign{}+\begin{minipage}[b]{\linewidth}\centering+Name\footnotemark{}+\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright+Capital+\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright+Population\\+(in 2018)\strut+\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright+Area\\+(in km\textsuperscript{2})\strut+\end{minipage} \\+\midrule\noalign{}+Denmark & Copenhagen & 5,809,502 & 43,094 \\+Finland & Helsinki & 5,537,364 & 338,145 \\+Iceland\footnotemark{} & Reykjavik & 343,518 & 103,000 \\+Norway & Oslo & 5,372,191 & 323,802 \\+Sweden & Stockholm & 10,313,447 & 450,295 \\+\midrule\noalign{}+Total & & 27,376,022 & 1,258,336 \\+\bottomrule\noalign{}+\end{tabular}+\end{table}+\addtocounter{footnote}{-1}+\footnotetext{In English.}+\addtocounter{footnote}{1}+\footnotetext{Brrr.}++```
test/command/10271.md view
@@ -16,7 +16,7 @@ % pandoc -f markdown-smart -t typst+smart "don't do it---" ^D-\"don\'t do it---\"+\"don\'t do it-\-\-\"  ``` ```
+ test/command/10643.md view
@@ -0,0 +1,11 @@+```+% pandoc -f html -t native+<p>A<style></style>B</p>+^D+[ Para+    [ Str "A"+    , RawInline (Format "html") "<style></style>"+    , Str "B"+    ]+]+```
test/command/10791.md view
@@ -5,10 +5,11 @@ [^1]: **Heart of the Ocean** (海洋之心) – The Heart of the Ocean ^D <text:p text:style-name="Text_20_body">Aboard-<text:span text:style-name="T1">the luxury cruise ship Heart of the-Ocean</text:span><text:note text:id="ftn0" text:note-class="footnote"><text:note-citation>1</text:note-citation><text:note-body><text:p text:style-name="Footnote"><text:span text:style-name="T1">Heart+<text:span text:style-name="Strong_20_Emphasis">the luxury cruise ship+Heart of the+Ocean</text:span><text:note text:id="ftn0" text:note-class="footnote"><text:note-citation>1</text:note-citation><text:note-body><text:p text:style-name="Footnote"><text:span text:style-name="Strong_20_Emphasis">Heart of the Ocean</text:span> (海洋之心) – The Heart of the-Ocean</text:p></text:note-body></text:note><text:span text:style-name="T1">+Ocean</text:p></text:note-body></text:note><text:span text:style-name="Strong_20_Emphasis"> in the Atlantic Ocean</text:span>…</text:p>  ```
+ test/command/10942.md view
@@ -0,0 +1,97 @@+Ungrouped field instruction:+```+% pandoc -f rtf -t native+{\rtf1\ansi\deff0+{\fonttbl{\f0\froman Times New Roman;}}+{\colortbl;\red0\green0\blue0;}+\deftab720++\trowd\trleft0\cellx2000\cellx4000+\pard\intbl+{{\field{\*\fldinst HYPERLINK "https://example.com" }{\fldrslt {\hich\af0\loch\hich\af0\loch\cf0\f0\cf0\f0\loch+{\*\bkmkstart _dx_frag_StartFragment}{\*\bkmkend _dx_frag_StartFragment}Problem Text}}}}\cell+\pard\intbl Normal Text\cell+\row++\trowd\trleft0\cellx2000\cellx4000+\pard\intbl Simple Text\cell+\pard\intbl More Text\cell+\row+}+^D+[ Table+    ( "" , [] , [] )+    (Caption Nothing [])+    [ ( AlignDefault , ColWidthDefault )+    , ( AlignDefault , ColWidthDefault )+    ]+    (TableHead ( "" , [] , [] ) [])+    [ TableBody+        ( "" , [] , [] )+        (RowHeadColumns 0)+        []+        [ Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Para+                    [ Link+                        ( "" , [] , [] )+                        [ Str "Problem" , Space , Str "Text" ]+                        ( "https://example.com" , "" )+                    ]+                ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Para [ Str "Normal" , Space , Str "Text" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Para [ Str "Simple" , Space , Str "Text" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Para [ Str "More" , Space , Str "Text" ] ]+            ]+        ]+    ]+    (TableFoot ( "" , [] , [] ) [])+]+```++Additionally, ungrouped field result:+```+% pandoc -f rtf -t native+{\rtf1\ansi\ansicpg1252\cocoartf2867+\cocoatextscaling0\cocoaplatform1{\fonttbl\f0\fnil\fcharset0 HelveticaNeue;}+{\colortbl;\red255\green255\blue255;\red0\green0\blue0;}+{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;}+\paperw11905\paperh16837\margl1133\margr1133\margb1133\margt1133+\deftab720+\pard\pardeftab720\partightenfactor0+{\field{\*\fldinst{HYPERLINK "https://example.com"}}{\fldrslt +\f0\fs22 \cf2 \up0 \nosupersub \ul \ulc2 link}}}+^D+[ Para+    [ Underline+        [ Link+            ( "" , [] , [] )+            [ Str "link" ]+            ( "https://example.com" , "" )+        ]+    ]+]+```
test/command/10965.md view
@@ -5,7 +5,8 @@ ::: ^D #block[-#set text(lang: "en"); This text should be in English.+#set text(lang: "en");+This text should be in English.  ] ```@@ -17,7 +18,8 @@ ::: ^D #block[-#set text(lang: "fr"); Ce texte devrait être en français.+#set text(lang: "fr");+Ce texte devrait être en français.  ] ```@@ -29,7 +31,8 @@ ::: ^D #block[-#set text(lang: "de"); Dieser Text sollte auf Deutsch sein.+#set text(lang: "de");+Dieser Text sollte auf Deutsch sein.  ] ```
+ test/command/11299.md view
@@ -0,0 +1,28 @@+```+% pandoc -f mediawiki -t native+<foo>++<samp>x</samp>++<kbd>x</kbd>++<var>x</var>++<mark>This is ''highlighted''</mark>+^D+[ Para [ Str "<foo>" ]+, Para [ Code ( "" , [ "sample" ] , [] ) "x" ]+, Para [ Span ( "" , [ "kbd" ] , [] ) [ Str "x" ] ]+, Para [ Code ( "" , [ "variable" ] , [] ) "x" ]+, Para+    [ Span+        ( "" , [ "mark" ] , [] )+        [ Str "This"+        , Space+        , Str "is"+        , Space+        , Emph [ Str "highlighted" ]+        ]+    ]+]+```
+ test/command/11300.md view
@@ -0,0 +1,67 @@+```+% pandoc -f docbook -t native -s+<?xml version="1.0"?>+<book xmlns="http://docbook.org/ns/docbook" version="5.0" dir="ltr">+  <info>+    <title>Book title</title>+    <subtitle>Book subtitle</subtitle>+  </info>+  <chapter>+    <info>+      <title>Chapter title</title>+    </info>+    <para>My sentence</para>+  </chapter>+</book>+^D+Pandoc+  Meta+    { unMeta =+        fromList+          [ ( "subtitle"+            , MetaInlines [ Str "Book" , Space , Str "subtitle" ]+            )+          , ( "title"+            , MetaInlines [ Str "Book" , Space , Str "title" ]+            )+          ]+    }+  [ Header+      1 ( "" , [] , [] ) [ Str "Chapter" , Space , Str "title" ]+  , Para [ Str "My" , Space , Str "sentence" ]+  ]+```++```+% pandoc -f docbook -t native -s+<?xml version="1.0"?>+<book xmlns="http://docbook.org/ns/docbook" version="5.0" dir="ltr">+  <chapter>+    <info>+      <title>Chapter title</title>+    </info>+    <para>My sentence</para>+  </chapter>+  <info>+    <title>Book title</title>+    <subtitle>Book subtitle</subtitle>+  </info>+</book>+^D+Pandoc+  Meta+    { unMeta =+        fromList+          [ ( "subtitle"+            , MetaInlines [ Str "Book" , Space , Str "subtitle" ]+            )+          , ( "title"+            , MetaInlines [ Str "Book" , Space , Str "title" ]+            )+          ]+    }+  [ Header+      1 ( "" , [] , [] ) [ Str "Chapter" , Space , Str "title" ]+  , Para [ Str "My" , Space , Str "sentence" ]+  ]+```
+ test/command/11312.md view
@@ -0,0 +1,21 @@+```+% pandoc -f mediawiki -t texinfo+foofoo++ bar+ baz++foofoo+^D+@node Top+@top Top++foofoo++@example+bar+baz+@end example++foofoo+```
+ test/command/11323.md view
@@ -0,0 +1,12 @@+```+% pandoc -f rst+foo-+   bar+^D+<dl>+<dt>foo-</dt>+<dd>+<p>bar</p>+</dd>+</dl>+```
+ test/command/11341.md view
@@ -0,0 +1,9 @@+```+% pandoc -t commonmark -f html+<h1>The Hobbit<br>or<br>There and Back Again</h1>+^D+The Hobbit\+or\+There and Back Again+====================+```
+ test/command/11342.md view
@@ -0,0 +1,33 @@+Subfigures should be converted to *fig-group* elements.++```+% pandoc -f latex -t jats+\begin{figure}[H]+  \begin{subfigure}+    \centering+    \includegraphics[height=1.5in]{assets/A.png}+    \caption{Graph for function *A*.}+    \label{fig:A}+  \end{subfigure}+  \begin{subfigure}+    \centering+    \includegraphics[height=1.5in]{assets/B.png}+    \caption{Graph for function *B*.}+    \label{fig:B}+  \end{subfigure}+  \label{fig:graphs}+  \caption{Function graphs.}+\end{figure}+^D+<fig-group id="figU003Agraphs">+  <caption><p>Function graphs.</p></caption>+  <fig id="figU003AA">+    <caption><p>Graph for function *A*.</p></caption>+    <graphic mimetype="image" mime-subtype="png" xlink:href="assets/A.png" />+  </fig>+  <fig id="figU003AB">+    <caption><p>Graph for function *B*.</p></caption>+    <graphic mimetype="image" mime-subtype="png" xlink:href="assets/B.png" />+  </fig>+</fig-group>+```
+ test/command/11348.md view
@@ -0,0 +1,61 @@+```+% pandoc -f markdown -t native+$ invalid opening inline math$++$+invalid opening inline math$++$invalid closing inline math $++$invalid closing inline math+$++$valid inline math$+^D+[ Para+    [ Str "$"+    , Space+    , Str "invalid"+    , Space+    , Str "opening"+    , Space+    , Str "inline"+    , Space+    , Str "math$"+    ]+, Para+    [ Str "$"+    , SoftBreak+    , Str "invalid"+    , Space+    , Str "opening"+    , Space+    , Str "inline"+    , Space+    , Str "math$"+    ]+, Para+    [ Str "$invalid"+    , Space+    , Str "closing"+    , Space+    , Str "inline"+    , Space+    , Str "math"+    , Space+    , Str "$"+    ]+, Para+    [ Str "$invalid"+    , Space+    , Str "closing"+    , Space+    , Str "inline"+    , Space+    , Str "math"+    , SoftBreak+    , Str "$"+    ]+, Para [ Math InlineMath "valid inline math" ]+]+```
+ test/command/11362.md view
@@ -0,0 +1,17 @@+```+% pandoc -f markdown -t asciidoc+This is a _test_[^1].++And yet another **one**[^1].++We can also try to write #hashtags [this]{.test}.++[^1]: Test footnote.+^D+This is a __test__footnote:[Test footnote.].++And yet another **one**footnote:[Test footnote.].++We can also try to write ++#++hashtags [.test]#this#.++```
+ test/command/11364.md view
@@ -0,0 +1,75 @@+```+% pandoc -f rtf -t native+{\rtf1\ansi\deff3\adeflang1025+{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}{\f4\fnil\fprq0\fcharset2 OpenSymbol{\*\falt Arial Unicode MS};}{\f5\fswiss\fprq2\fcharset0 Liberation Sans{\*\falt Arial};}{\f6\fnil\fprq2\fcharset0 Noto Sans CJK SC;}{\f7\fnil\fprq2\fcharset0 Matangi Light;}{\f8\fnil\fprq0\fcharset128 Matangi Light;}{\f9\fnil\fprq0\fcharset128 OpenSymbol{\*\falt Arial Unicode MS};}}+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}+{\stylesheet{\s0\snext0\widctlpar\hyphpar0\ltrpar\kerning1\cf0\rtlch\af7\afs24\alang1081\ltrch\hich\af3\afs24\alang1033\dbch\af10\langfe2052\loch\f3\fs24\lang1033 Normal;}+{\*\cs15\snext15\rtlch\af4\ltrch\hich\af4\dbch\af4\loch\f4 Bullets;}+{\s16\sbasedon0\snext17\sb240\sa120\keepn\rtlch\af7\afs28\ltrch\hich\af5\afs28\dbch\af6\loch\f5\fs28 Heading;}+{\s17\sbasedon0\snext17\sl276\slmult1\sb0\sa140 Body Text;}+{\s18\sbasedon17\snext18\rtlch\af8\ltrch List;}+{\s19\sbasedon0\snext19\sb120\sa120\noline\rtlch\af8\afs24\ai\ltrch\fs24\i caption;}+{\s20\sbasedon0\snext20\noline\rtlch\af8\ltrch Index;}+{\s21\sbasedon0\snext21\nowidctlpar\noline Table Contents;}+}{\*\listtable{\list\listtemplateid1+{\listlevel\levelnfc23\leveljc0\levelstartat1\levelfollow0{\leveltext \'01\u8226 ?;}{\levelnumbers;}\f9\rtlch\af4\ltrch\fi-360\li720}+{\listlevel\levelnfc23\leveljc0\levelstartat1\levelfollow0{\leveltext \'01\u9702 ?;}{\levelnumbers;}\f9\rtlch\af4\ltrch\fi-360\li1080}+{\listlevel\levelnfc23\leveljc0\levelstartat1\levelfollow0{\leveltext \'01\u9642 ?;}{\levelnumbers;}\f9\rtlch\af4\ltrch\fi-360\li1440}+{\listlevel\levelnfc23\leveljc0\levelstartat1\levelfollow0{\leveltext \'01\u8226 ?;}{\levelnumbers;}\f9\rtlch\af4\ltrch\fi-360\li1800}+{\listlevel\levelnfc23\leveljc0\levelstartat1\levelfollow0{\leveltext \'01\u9702 ?;}{\levelnumbers;}\f9\rtlch\af4\ltrch\fi-360\li2160}+{\listlevel\levelnfc23\leveljc0\levelstartat1\levelfollow0{\leveltext \'01\u9642 ?;}{\levelnumbers;}\f9\rtlch\af4\ltrch\fi-360\li2520}+{\listlevel\levelnfc23\leveljc0\levelstartat1\levelfollow0{\leveltext \'01\u8226 ?;}{\levelnumbers;}\f9\rtlch\af4\ltrch\fi-360\li2880}+{\listlevel\levelnfc23\leveljc0\levelstartat1\levelfollow0{\leveltext \'01\u9702 ?;}{\levelnumbers;}\f9\rtlch\af4\ltrch\fi-360\li3240}+{\listlevel\levelnfc23\leveljc0\levelstartat1\levelfollow0{\leveltext \'01\u9642 ?;}{\levelnumbers;}\f9\rtlch\af4\ltrch\fi-360\li3600}\listid1}+{\list\listtemplateid2+{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi0\li0}+{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi0\li0}+{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi0\li0}+{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi0\li0}+{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi0\li0}+{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi0\li0}+{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi0\li0}+{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi0\li0}+{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi0\li0}\listid2}+}{\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}{\*\generator LibreOffice/25.8.4.2$Linux_X86_64 LibreOffice_project/580$Build-2}{\info{\creatim\yr2025\mo12\dy28\hr10\min51}{\revtim\yr2025\mo12\dy28\hr10\min53}{\printim\yr0\mo0\dy0\hr0\min0}}{\*\userprops}\deftab709+\hyphauto1\viewscale140\formshade\nobrkwrptbl\paperh15840\paperw12240\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sftnnar\saftnnrlc\sectunlocked1\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\fet\aftnrstcont\aftnstart1\aftnnrlc+{\*\ftnsep\chftnsep}\pgndec\pard\plain \s0\widctlpar\hyphpar0\ltrpar\kerning1\cf0\rtlch\af7\afs24\alang1081\ltrch\hich\af3\afs24\alang1033\dbch\af10\langfe2052\loch\f3\fs24\lang1033{\listtext\pard\plain \rtlch\af4\ltrch\hich\af4\dbch\af4\loch\f4 \u8226\'95\tab}\ilvl0\ls1 \fi-360\li720\lin720\ql\ltrpar{+List item}+\par \trowd\trql\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clbrdrt\brdrs\brdrw10\brdrcf1\clpadfl3\clpadl55\clbrdrl\brdrs\brdrw10\brdrcf1\clpadft3\clpadt55\clbrdrb\brdrs\brdrw10\brdrcf1\clpadfb3\clpadb55\clpadfr3\clpadr55\cellx4986\clbrdrt\brdrs\brdrw10\brdrcf1\clpadfl3\clpadl55\clbrdrl\brdrs\brdrw10\brdrcf1\clpadft3\clpadt55\clbrdrb\brdrs\brdrw10\brdrcf1\clpadfb3\clpadb55\clbrdrr\brdrs\brdrw10\brdrcf1\clpadfr3\clpadr55\cellx9972\pard\plain \s21\nowidctlpar\noline\intbl\ql\ltrpar{+A}\cell\pard\plain \s21\nowidctlpar\noline\intbl\ql\ltrpar{+B}\cell\row\pard \pard\plain \s0\widctlpar\hyphpar0\ltrpar\kerning1\cf0\rtlch\af7\afs24\alang1081\ltrch\hich\af3\afs24\alang1033\dbch\af10\langfe2052\loch\f3\fs24\lang1033\ql\ltrpar+\par }+^D+[ BulletList+    [ [ Para [ Str "List" , Space , Str "item" ] ] ]+, Table+    ( "" , [] , [] )+    (Caption Nothing [])+    [ ( AlignDefault , ColWidthDefault )+    , ( AlignDefault , ColWidthDefault )+    ]+    (TableHead ( "" , [] , [] ) [])+    [ TableBody+        ( "" , [] , [] )+        (RowHeadColumns 0)+        []+        [ Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Para [ Str "A" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Para [ Str "B" ] ]+            ]+        ]+    ]+    (TableFoot ( "" , [] , [] ) [])+]+```
+ test/command/11374.md view
@@ -0,0 +1,6 @@+```+% pandoc -f native -t asciidoc+[ Para [ SmallCaps [ Str "foo" ] ] ]+^D+[smallcaps]#foo#+```
+ test/command/11384.md view
@@ -0,0 +1,17 @@+```+% pandoc -t markdown -f native+[ Para [ Math DisplayMath "\ne = mc^2\n" ] ]+^D+$$+e = mc^2+$$+```++But we need to collapse spaces around inline math:++```+% pandoc -t markdown -f native+[ Para [ Math InlineMath "\ne=mc\n" ]]+^D+$e=mc$+```
+ test/command/11409.md view
@@ -0,0 +1,11 @@+```+% pandoc -t native+text^[sup]{.class}^+^D+[ Para+    [ Str "text"+    , Superscript+        [ Span ( "" , [ "class" ] , [] ) [ Str "sup" ] ]+    ]+]+```
+ test/command/11420.md view
@@ -0,0 +1,15 @@+````+% pandoc -t revealjs --syntax-highlighting=idiomatic+# Slide++```python+def hello():+    print("Hello")+```+^D+<section id="slide" class="slide level1">+<h1>Slide</h1>+<pre><code class="language-python">def hello():+    print(&quot;Hello&quot;)</code></pre>+</section>+````
+ test/command/11422.md view
@@ -0,0 +1,12 @@+```+% pandoc -f docbook -t markdown+<example>+    <para>+      Example without a title.+    </para>+</example>+^D+::: example+Example without a title.+:::+```
+ test/command/11450.md view
@@ -0,0 +1,62 @@+Test for \footnotemark and \footnotetext (issue #11450)++```+% pandoc -f latex -t native+Text\footnotemark{}.+\footnotetext{The footnote content.}+^D+[ Para+    [ Str "Text"+    , Note+        [ Para+            [ Str "The"+            , Space+            , Str "footnote"+            , Space+            , Str "content."+            ]+        ]+    , Str "."+    ]+]+```++With explicit footnote numbers:++```+% pandoc -f latex -t native+First\footnotemark[1] and second\footnotemark[2].+\footnotetext[1]{First note.}+\footnotetext[2]{Second note.}+^D+[ Para+    [ Str "First"+    , Note [ Para [ Str "First" , Space , Str "note." ] ]+    , Space+    , Str "and"+    , Space+    , Str "second"+    , Note [ Para [ Str "Second" , Space , Str "note." ] ]+    , Str "."+    ]+]+```++Mixed with regular footnotes:++```+% pandoc -f latex -t native+Text\footnotemark[1] and more\footnote{Regular footnote.}+\footnotetext[1]{Marked footnote.}+^D+[ Para+    [ Str "Text"+    , Note [ Para [ Str "Marked" , Space , Str "footnote." ] ]+    , Space+    , Str "and"+    , Space+    , Str "more"+    , Note [ Para [ Str "Regular" , Space , Str "footnote." ] ]+    ]+]+```
+ test/command/11455.md view
@@ -0,0 +1,26 @@+```+% pandoc -f textile -t html+| foo | bar |+| table+* item 1+* item 2+* item 3 | xxx |+^D+<table>+<tbody>+<tr>+<td>foo</td>+<td>bar</td>+</tr>+<tr>+<td><p>table</p>+<ul>+<li>item 1</li>+<li>item 2</li>+<li>item 3</li>+</ul></td>+<td>xxx</td>+</tr>+</tbody>+</table>+```
+ test/command/11463.md view
@@ -0,0 +1,13 @@+```+% pandoc -t typst+'hi' and \'+^D+'hi' and \'+```++```+% pandoc -f markdown -t typst | pandoc -f typst -t markdown+"hi" \" 'hi' and \'+^D+"hi" \" 'hi' and \'+```
+ test/command/11479.md view
@@ -0,0 +1,31 @@+```+% pandoc -f docbook -t gfm+<important>+<itemizedlist>+<listitem>+<simpara>Test.</simpara>+</listitem>+<listitem>+<simpara>Test 2.</simpara>+</listitem>+</itemizedlist>+</important>+^D+> [!IMPORTANT]+> - Test.+>+> - Test 2.+```++```+% pandoc -f gfm -t gfm+> [!IMPORTANT]+> - Test.+>+> - Test 2.+^D+> [!IMPORTANT]+> - Test.+>+> - Test 2.+```
+ test/command/11486.md view
@@ -0,0 +1,82 @@+```+% pandoc -t revealjs --template=command/11486/scroll.revealjs+---+view: scroll+---+^D+        scrollActivationWidth: 0,+        scrollSnap: 'mandatory',+        scrollProgress: 'auto',+```++```+% pandoc -t revealjs --template=command/11486/scroll.revealjs+---+view: scroll+scrollSnap: false+---+^D+        scrollActivationWidth: 0,+        scrollSnap: false,+        scrollProgress: 'auto',+```++```+% pandoc -t revealjs --template=command/11486/scroll.revealjs+---+view: scroll+scrollSnap: proximity+---+^D+        scrollActivationWidth: 0,+        scrollSnap: 'proximity',+        scrollProgress: 'auto',+```++```+% pandoc -t revealjs --template=command/11486/scroll.revealjs+---+view: scroll+scrollActivationWidth: 500+---+^D+        scrollActivationWidth: 500,+        scrollSnap: 'mandatory',+        scrollProgress: 'auto',+```++```+% pandoc -t revealjs --template=command/11486/scroll.revealjs+---+view: scroll+scrollProgress: true+---+^D+        scrollActivationWidth: 0,+        scrollSnap: 'mandatory',+        scrollProgress: true,+```++```+% pandoc -t revealjs --template=command/11486/scroll.revealjs+---+view: scroll+scrollProgress: false+---+^D+        scrollActivationWidth: 0,+        scrollSnap: 'mandatory',+        scrollProgress: false,+```++```+% pandoc -t revealjs --template=command/11486/scroll.revealjs+---+view: scroll+scrollProgress: auto+---+^D+        scrollActivationWidth: 0,+        scrollSnap: 'mandatory',+        scrollProgress: 'auto',+```
+ test/command/11486/scroll.revealjs view
@@ -0,0 +1,15 @@+$if(view)$+        scrollActivationWidth: $scrollActivationWidth$,+$if(scrollSnap)$+        scrollSnap: '$scrollSnap/nowrap$',+$else$+        scrollSnap: false,+$endif$+$if(scrollProgressAuto)$+        scrollProgress: 'auto',+$elseif(scrollProgress)$+        scrollProgress: $scrollProgress$,+$else$+        scrollProgress: false,+$endif$+$endif$
+ test/command/11490.md view
@@ -0,0 +1,13 @@+```+% pandoc -t markdown+&lt;&amp;lt;+^D+\<\&lt;+```++```+% pandoc -t markdown+&amp;#xa0;+^D+\&#xa0;+```
+ test/command/11494.md view
@@ -0,0 +1,73 @@+External images should not use [[File:...]] syntax.++Inline external image:+```+% pandoc -f native -t mediawiki+[Para [Image ("",[],[]) [] ("https://example.org/image.png", "")]]+^D+<nowiki></nowiki>https://example.org/image.png<nowiki></nowiki>+```++Inline local image (should still use [[File:]]):+```+% pandoc -f native -t mediawiki+[Para [Image ("",[],[]) [] ("local.png", "")]]+^D+[[File:local.png]]+```++Figure with external image (from markdown):+```+% pandoc -f markdown -t mediawiki+![](https://example.org/figure.png)+^D+<nowiki></nowiki>https://example.org/figure.png<nowiki></nowiki>+```++Local image (from markdown, no caption):+```+% pandoc -f markdown -t mediawiki+![](local.png)+^D+[[File:local.png]]+```++Figure with caption and external image:+```+% pandoc -f markdown -t mediawiki+![Caption](https://example.org/figure.png)+^D+<div class="figure">+<nowiki></nowiki>https://example.org/figure.png<nowiki></nowiki>+</div>+```++Figure with caption and local image:+```+% pandoc -f markdown -t mediawiki+![Caption](local.png)+^D+<div class="figure">+[[File:local.png|Caption]]+</div>+```++SimpleFigure with external image (native format with fig: title):+```+% pandoc -f native -t mediawiki+[Figure ("",[],[]) (Caption Nothing []) [Para [Image ("",[],[]) [Str "caption"] ("https://example.org/figure.png", "fig:")]]]+^D+<div class="figure">+<nowiki></nowiki>https://example.org/figure.png<nowiki></nowiki>+</div>+```++SimpleFigure with local image (native format with fig: title):+```+% pandoc -f native -t mediawiki+[Figure ("",[],[]) (Caption Nothing []) [Para [Image ("",[],[]) [Str "caption"] ("local.png", "fig:")]]]+^D+<div class="figure">+[[File:local.png|thumb|none|alt=caption|caption]]+</div>+```
+ test/command/11498.md view
@@ -0,0 +1,121 @@+```+% pandoc -f markdown -t icml+![](command/11498.png){object-style="myStyle"}+^D+<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/Paragraph">+  <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">+    <Rectangle Self="uec" StrokeWeight="0" ItemTransform="1 0 0 1 32 -32" AppliedObjectStyle="ObjectStyle/myStyle">+      <Properties>+        <PathGeometry>+          <GeometryPathType PathOpen="false">+            <PathPointArray>+              <PathPointType Anchor="-32 -32" LeftDirection="-32 -32" RightDirection="-32 -32" />+              <PathPointType Anchor="-32 32" LeftDirection="-32 32" RightDirection="-32 32" />+              <PathPointType Anchor="32 32" LeftDirection="32 32" RightDirection="32 32" />+              <PathPointType Anchor="32 -32" LeftDirection="32 -32" RightDirection="32 -32" />+            </PathPointArray>+          </GeometryPathType>+        </PathGeometry>+      </Properties>+      <Image Self="ue6" ItemTransform="1 0 0 1 -32 -32">+        <Properties>+          <Profile type="string">+            $ID/Embedded+          </Profile>+          <GraphicBounds Left="0" Top="0" Right="64" Bottom="64" />+        </Properties>+        <Link Self="ueb" LinkResourceURI="file:command/11498.png" />+      </Image>+    </Rectangle>+  </CharacterStyleRange>+</ParagraphStyleRange>+```+```+% pandoc -s -f markdown -t icml+![](command/11498.png){object-style="myStyle"}+^D+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>+<?aid style="50" type="snippet" readerVersion="6.0" featureSet="513" product="8.0(370)" ?>+<?aid SnippetType="InCopyInterchange"?>+<Document DOMVersion="8.0" Self="pandoc_doc">+    <RootCharacterStyleGroup Self="pandoc_character_styles">+      <CharacterStyle Self="$ID/NormalCharacterStyle" Name="Default" />+      <CharacterStyle Self="CharacterStyle/" Name="">+        <Properties>+          <BasedOn type="object">$ID/NormalCharacterStyle</BasedOn>+        </Properties>+      </CharacterStyle>+    </RootCharacterStyleGroup>+    <RootParagraphStyleGroup Self="pandoc_paragraph_styles">+      <ParagraphStyle Self="$ID/NormalParagraphStyle" Name="$ID/NormalParagraphStyle"+          SpaceBefore="6" SpaceAfter="6"> <!-- paragraph spacing -->+        <Properties>+          <TabList type="list">+            <ListItem type="record">+              <Alignment type="enumeration">LeftAlign</Alignment>+              <AlignmentCharacter type="string">.</AlignmentCharacter>+              <Leader type="string"></Leader>+              <Position type="unit">10</Position> <!-- first tab stop -->+            </ListItem>+          </TabList>+        </Properties>+      </ParagraphStyle>+      <ParagraphStyle Self="ParagraphStyle/Paragraph" Name="Paragraph" LeftIndent="0">+        <Properties>+          <BasedOn type="object">$ID/NormalParagraphStyle</BasedOn>+        </Properties>+      </ParagraphStyle>+    </RootParagraphStyleGroup>+    <RootTableStyleGroup Self="pandoc_table_styles">+      <TableStyle Self="TableStyle/Table" Name="Table" />+    </RootTableStyleGroup>+    <RootCellStyleGroup Self="pandoc_cell_styles">+      <CellStyle Self="CellStyle/Cell" AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]" Name="Cell" />+    </RootCellStyleGroup>+    <RootObjectStyleGroup Self="pandoc_object_styles">+      <ObjectStyle Self="ObjectStyle/myStyle" Name="myStyle">+        <Properties>+          <BasedOn type="string">$ID/None</BasedOn>+        </Properties>+      </ObjectStyle>+    </RootObjectStyleGroup>+  <Story Self="pandoc_story"+      TrackChanges="false"+      StoryTitle=""+      AppliedTOCStyle="n"+      AppliedNamedGrid="n" >+    <StoryPreference OpticalMarginAlignment="true" OpticalMarginSize="12" />++<!-- body needs to be non-indented, otherwise code blocks are indented too far -->+<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/Paragraph">+  <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">+    <Rectangle Self="uec" StrokeWeight="0" ItemTransform="1 0 0 1 32 -32" AppliedObjectStyle="ObjectStyle/myStyle">+      <Properties>+        <PathGeometry>+          <GeometryPathType PathOpen="false">+            <PathPointArray>+              <PathPointType Anchor="-32 -32" LeftDirection="-32 -32" RightDirection="-32 -32" />+              <PathPointType Anchor="-32 32" LeftDirection="-32 32" RightDirection="-32 32" />+              <PathPointType Anchor="32 32" LeftDirection="32 32" RightDirection="32 32" />+              <PathPointType Anchor="32 -32" LeftDirection="32 -32" RightDirection="32 -32" />+            </PathPointArray>+          </GeometryPathType>+        </PathGeometry>+      </Properties>+      <Image Self="ue6" ItemTransform="1 0 0 1 -32 -32">+        <Properties>+          <Profile type="string">+            $ID/Embedded+          </Profile>+          <GraphicBounds Left="0" Top="0" Right="64" Bottom="64" />+        </Properties>+        <Link Self="ueb" LinkResourceURI="file:command/11498.png" />+      </Image>+    </Rectangle>+  </CharacterStyleRange>+</ParagraphStyleRange>++  </Story>+  +</Document>+```
+ test/command/11498.png view

binary file changed (absent → 1306 bytes)

+ test/command/11511.md view
@@ -0,0 +1,6 @@+```+% pandoc -f html -t typst+<p><a href="http://torch.utils.data" rel="noopener noreferrer nofollow" target="_blank">torch.utils.data</a>.Dataset</p>+^D+#link("http://torch.utils.data")[torch.utils.data]\.Dataset+```
+ test/command/11534.md view
@@ -0,0 +1,42 @@+```+% pandoc -f markdown+lists_without_preceding_blankline+alerts -t native+:::: caution+::: title+Caution+:::++Foo bar, wuppie fluppie!+::::+^D+[ Div+    ( "" , [ "caution" ] , [] )+    [ Div ( "" , [ "title" ] , [] ) [ Para [ Str "Caution" ] ]+    , Para+        [ Str "Foo"+        , Space+        , Str "bar,"+        , Space+        , Str "wuppie"+        , Space+        , Str "fluppie!"+        ]+    ]+]+```++```+% pandoc -f markdown+lists_without_preceding_blankline -t native+hello+- a+- b+c+^D+[ Para [ Str "hello" ]+, BulletList+    [ [ Plain [ Str "a" ] ]+    , [ Plain [ Str "b" , SoftBreak , Str "c" ] ]+    ]+]++```+
+ test/command/11542.md view
@@ -0,0 +1,47 @@+```+% pandoc -f native -t markdown+[ DefinitionList+    [ ( [ Str "Input" ]+      , [ [ CodeBlock ( "" , [] , [] ) "Term\n\n  : Def" ] ]+      )+    ]+]+^D+Input++:     Term++        : Def+```++```+% pandoc -f markdown -t native+Input++:     Term++        : Def+^D+[ DefinitionList+    [ ( [ Str "Input" ]+      , [ [ CodeBlock ( "" , [] , [] ) "Term\n\n  : Def" ] ]+      )+    ]+]+```++```+% pandoc -f native -t markdown+four_space_rule+[ DefinitionList+    [ ( [ Str "Input" ]+      , [ [ CodeBlock ( "" , [] , [] ) "Term\n\n  : Def" ] ]+      )+    ]+]+^D+Input++:       Term++          : Def+```
+ test/command/11562.md view
@@ -0,0 +1,10 @@+```+% pandoc -t mediawiki+[example](https://example.com/#/#room)++[example](https://example.com/##)+^D+[https://example.com/#/#room example]++[https://example.com/## example]+```
+ test/command/11571.md view
@@ -0,0 +1,18 @@+```+% pandoc -t markdown+:::+A+:::+^D+\::: A \:::+```++```+% pandoc -t commonmark+fenced_divs+:::+A+:::+^D+\::: A \:::+```+
+ test/command/11583.md view
@@ -0,0 +1,16 @@+```+% pandoc -t typst+::: {lang=en}+1. item+2. item+3. item+:::+^D+#block[+#set text(lang: "en");++ item++ item++ item++]+```
+ test/command/11588.md view
@@ -0,0 +1,10 @@+```+% pandoc --typst-input foo=FOO --typst-input bar="bar bim" -f typst -t plain+#sys.inputs.at("foo");++#sys.inputs.at("bar");+^D+FOO++bar bim+```
+ test/command/11589.md view
@@ -0,0 +1,20 @@+```+% pandoc -f markdown -t native+t^[a]{.cb}\ b^+t^[a]{fg=yellow bg=blue}\ b^+^D+[ Para+    [ Str "t"+    , Superscript+        [ Span ( "" , [ "cb" ] , [] ) [ Str "a" ] , Str "\160b" ]+    , SoftBreak+    , Str "t"+    , Superscript+        [ Span+            ( "" , [] , [ ( "fg" , "yellow" ) , ( "bg" , "blue" ) ] )+            [ Str "a" ]+        , Str "\160b"+        ]+    ]+]+```
+ test/command/11598.md view
@@ -0,0 +1,16 @@+```+% pandoc -f typst --wrap=none+#rotate(90deg, figure(+  [body text here inside rotate],+  caption: "Figure 1: How a caption gets lost when rotating",+  supplement: none,+))+^D+<div class="rotate" data-angle="90.0">+<figure>+<p>body text here inside rotate</p>+<figcaption><p>Figure 1: How a caption gets lost when rotating</p></figcaption>+</figure>+</div>++```
+ test/command/11604.md view
@@ -0,0 +1,22 @@+```+% pandoc -f latex -t typst+\begin{table}+  \caption{Caption}\label{tab}+  \begin{tabular}{cc}+    a & b \\ c & d+  \end{tabular}+\end{table}+^D+#figure(+  align(center)[#table(+    columns: 2,+    align: (center,center,),+    [a], [b],+    [c], [d],+  )]+  , caption: [Caption]+  , kind: table+  )+<tab>++```
+ test/command/11608.md view
@@ -0,0 +1,54 @@+```+% pandoc -f latex -t plain+\documentclass[english]{article}+\usepackage[T1]{fontenc}+\usepackage[utf8]{inputenc}+\usepackage{amsthm}+\theoremstyle{plain}+\newtheorem{thm}{\protect\theoremname}+\newtheorem{prop}[thm]{\protect\propositionname}+\usepackage{babel}+\providecommand{\propositionname}{Proposition}+\providecommand{\theoremname}{Theorem}++\begin{document}+\begin{thm}+first theorem+\end{thm}+\begin{prop}+first proposition+\end{prop}++\end{document}+<div class="thm">+<p><strong>Theorem 1</strong>. <em>first theorem</em></p>+</div>+<div class="prop">+<p><strong>Proposition 2</strong>. <em>first proposition</em></p>+</div>+jgm@Johns-MacBook-Air:~/src/pandoc % `make binpath` -f latex -t plain+\documentclass[english]{article}+\usepackage[T1]{fontenc}+\usepackage[utf8]{inputenc}+\usepackage{amsthm}+\theoremstyle{plain}+\newtheorem{thm}{\protect\theoremname}+\newtheorem{prop}[thm]{\protect\propositionname}+\usepackage{babel}+\providecommand{\propositionname}{Proposition}+\providecommand{\theoremname}{Theorem}++\begin{document}+\begin{thm}+first theorem+\end{thm}+\begin{prop}+first proposition+\end{prop}++\end{document}+^D+Theorem 1. first theorem++Proposition 2. first proposition+```
+ test/command/11635.md view
@@ -0,0 +1,28 @@+```+% pandoc -f man -t html+.TH "TEST" "1" "2026-05-08"  "test v1.0.0" "test manual"+.SH HEADING+.TS+tab(;);+l l.+this is a table element \+written in two lines;abcdefg+another \+one;123456+.TE+^D+<h1 id="heading">HEADING</h1>+<table>+<tbody>+<tr>+<td style="text-align: left;">this is a table element written in two+lines</td>+<td style="text-align: left;">abcdefg</td>+</tr>+<tr>+<td style="text-align: left;">another one</td>+<td style="text-align: left;">123456</td>+</tr>+</tbody>+</table>+```
+ test/command/11664.md view
@@ -0,0 +1,35 @@+```+% pandoc -t markdown -f html+<table>+        <colgroup>+                <col width="1%"/>+                <col />+        </colgroup>+        <tbody>+                <tr>+                        <td>+                                <p>A</p><p>B</p>+                        </td>+                        <td>+                                Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do+                                eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut+                                enim ad minim veniam, quis nostrud exercitation ullamco laboris+                                nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor+                                in reprehenderit in voluptate velit esse cillum dolore eu fugiat+                                nulla pariatur. Excepteur sint occaecat cupidatat non proident,+                                sunt in culpa qui officia deserunt mollit anim id est laborum.+                        </td>+                </tr>+        </tbody>+</table>+^D++---+------------------------------------------------------------------++| A | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do  |+|   | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut   |+| B | enim ad minim veniam, quis nostrud exercitation ullamco laboris  |+|   | nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor   |+|   | in reprehenderit in voluptate velit esse cillum dolore eu fugiat |+|   | nulla pariatur. Excepteur sint occaecat cupidatat non proident,  |+|   | sunt in culpa qui officia deserunt mollit anim id est laborum.   |++---+------------------------------------------------------------------++```
+ test/command/11668.md view
@@ -0,0 +1,42 @@+```+% pandoc -f man -t html+TH "TEST" "1" "2026-05-25" "test v1.0.0" "test manual"+.SH HEADING+.TP 4+This is the unindented tag.+This text, along with the table, should be indented.+.TS+tab(;);+l l.+aaa;bbb+ccc;ddd+.TE+This should still be indented, until some other macro is called to change it.+.PP+Like this.+^D+<p>TH "TEST" "1" "2026-05-25" "test v1.0.0" "test manual"</p>+<h1 id="heading">HEADING</h1>+<dl>+<dt>This is the unindented tag.</dt>+<dd>+<p>This text, along with the table, should be indented.</p>+<table>+<tbody>+<tr>+<td style="text-align: left;">aaa</td>+<td style="text-align: left;">bbb</td>+</tr>+<tr>+<td style="text-align: left;">ccc</td>+<td style="text-align: left;">ddd</td>+</tr>+</tbody>+</table>+<p>This should still be indented, until some other macro is called to+change it.</p>+</dd>+</dl>+<p>Like this.</p>++```
+ test/command/11673.md view
@@ -0,0 +1,6 @@+```+% pandoc -t typst+[Bonjour]{lang=fr} world.+^D+#text(lang: "fr")[Bonjour] world.+```
+ test/command/11682.md view
@@ -0,0 +1,81 @@+Cell paragraphs that use `\plain` after `\intbl`, together with a single+`\trowd` and `\row` row terminators, should produce a flat table rather+than deeply nested tables.++```+% pandoc -f rtf -t native+{\rtf1\ansi\deff0+{\fonttbl{\f0 Times;}{\f1 Times;}{\f2 Times;}}+\trowd\trgaph60\trleft0+\clvertalt\cellx3245+\clvertalt\cellx6490+\clvertalt\cellx9735+\pard\intbl\s0\ql\plain\f0\fs20\plain\f2\fs22 A\plain\f1\fs22\cell+\pard\intbl\s0\ql\plain\f0\fs20\plain\f2\fs22 B\plain\f1\fs22\cell+\pard\intbl\s0\ql\plain\f0\fs20\plain\f2\fs22 C\plain\f1\fs22\cell+\intbl\row+\pard\intbl\s0\ql\plain\f0\fs20\plain\f2\fs22 1\plain\f1\fs22\cell+\pard\intbl\s0\ql\plain\f0\fs20\plain\f2\fs22 2\plain\f1\fs22\cell+\pard\intbl\s0\ql\plain\f0\fs20\plain\f2\fs22 3\plain\f1\fs22\cell+\intbl\row+}+^D+[ Table+    ( "" , [] , [] )+    (Caption Nothing [])+    [ ( AlignDefault , ColWidthDefault )+    , ( AlignDefault , ColWidthDefault )+    , ( AlignDefault , ColWidthDefault )+    ]+    (TableHead ( "" , [] , [] ) [])+    [ TableBody+        ( "" , [] , [] )+        (RowHeadColumns 0)+        []+        [ Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Para [ Str "A" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Para [ Str "B" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Para [ Str "C" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Para [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Para [ Str "2" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Para [ Str "3" ] ]+            ]+        ]+    ]+    (TableFoot ( "" , [] , [] ) [])+]+```
+ test/command/11685.md view
@@ -0,0 +1,18 @@+```+% pandoc -f rst -t markdown_mmd+.. note::++    ``code``+^D+<div class="note" markdown="1">++<div class="title" markdown="1">++Note++</div>++`code`++</div>+```
+ test/command/11689.docx view

binary file changed (absent → 15080 bytes)

+ test/command/11689.md view
@@ -0,0 +1,18 @@+```+% pandoc command/11689.docx -t native+^D+[ Para [ Str "Horizontal" , Space , Str "Line" ]+, Para [ Str "Hyphens" ]+, HorizontalRule+, Para [ Str "Underlines" ]+, HorizontalRule+, Para [ Str "Equal" , Space , Str "Signs" ]+, HorizontalRule+, Para [ Str "Asterisks" ]+, HorizontalRule+, Para [ Str "Number" , Space , Str "Signs" ]+, HorizontalRule+, Para [ Str "Tildes" ]+, HorizontalRule+]+```
+ test/command/11701.md view
@@ -0,0 +1,9 @@+````+% pandoc -f html -t gfm+<pre style="white-space: pre-wrap"><code class="hljs language-bash">echo hello+</code></pre>+^D+``` bash+echo hello+```+````
+ test/command/11712.md view
@@ -0,0 +1,8 @@+```+% pandoc -f gfm -t gfm+- [ ]+- [ ] bubbles+^D+- [ ]+- [ ] bubbles+```
+ test/command/11715.md view
@@ -0,0 +1,10 @@+```+% pandoc -f native -t markdown -s+Pandoc Meta {unMeta = fromList [ ("format_version", MetaString "3.10") ] } []+^D+---+format_version: "3.10"+---+++```
+ test/command/11727.md view
@@ -0,0 +1,8 @@+```+% pandoc -f rst -t markdown+[file|URL|PLAYLIST]++^D+2> [WARNING] Reference not found for '"url"' at line 4 column 1+\[file\|URL\|PLAYLIST\]+```
+ test/command/11735.md view
@@ -0,0 +1,14 @@+```+% pandoc+- Value ends with+  2.+- Gilda+  (1946)+^D+<ul>+<li>Value ends with+2.</li>+<li>Gilda+(1946)</li>+</ul>+```
+ test/command/11739.md view
@@ -0,0 +1,40 @@+```+% pandoc -f dokuwiki -t native+| a | extra stuff+| b | extra stuff+after+^D+[ Table+    ( "" , [] , [] )+    (Caption Nothing [])+    [ ( AlignDefault , ColWidthDefault ) ]+    (TableHead ( "" , [] , [] ) [])+    [ TableBody+        ( "" , [] , [] )+        (RowHeadColumns 0)+        []+        [ Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "a" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "b" ] ]+            ]+        ]+    ]+    (TableFoot ( "" , [] , [] ) [])+, Para [ Str "after" ]+]++```
+ test/command/11745.md view
@@ -0,0 +1,26 @@+```+% pandoc --section-divs+# Book Title++::: {#ch1 .section}+## Chapter 1+Hello world.+:::++::: {#ch2 .section}+## Chapter 2+Goodbye world.+:::+^D+<section id="book-title" class="level1">+<h1>Book Title</h1>+<section id="ch1" class="level2">+<h2 id="chapter-1">Chapter 1</h2>+<p>Hello world.</p>+</section>+<section id="ch2" class="level2">+<h2 id="chapter-2">Chapter 2</h2>+<p>Goodbye world.</p>+</section>+</section>+```
+ test/command/11749.md view
@@ -0,0 +1,23 @@+```+% pandoc -t texinfo+Before++----++After+^D+@node Top+@top Top++Before++@iftex+@bigskip@hrule@bigskip+@end iftex+@ifnottex+------------------------------------------------------------------------+@end ifnottex++After++```
+ test/command/11758.md view
@@ -0,0 +1,13 @@+```+% pandoc -t texinfo+[a.b](url)++[a,b](url)+^D+@node Top+@top Top++@uref{url,a.b}++@uref{url,a@comma{}b}+```
+ test/command/11762.md view
@@ -0,0 +1,12 @@+```+% pandoc -f native -t commonmark | pandoc -f commonmark -t native+[ OrderedList+    ( 1 , Decimal , Period )+    [ [ CodeBlock ( "" , [] , [] ) "hi" ] ]+]+^D+[ OrderedList+    ( 1 , Decimal , Period )+    [ [ CodeBlock ( "" , [] , [] ) "hi" ] ]+]+```
test/command/2434.md view
@@ -6,23 +6,23 @@     2. beta     * gamma ^D-<text:list text:style-name="L1">+<text:list text:style-name="Numbering_20_1">   <text:list-item>-    <text:p text:style-name="P1">a</text:p>+    <text:p text:style-name="List_20_Number_20_Tight">a</text:p>   </text:list-item>   <text:list-item>-    <text:p text:style-name="P1">b</text:p>-    <text:list>+    <text:p text:style-name="List_20_Number_20_Tight">b</text:p>+    <text:list text:style-name="Numbering_20_1">       <text:list-item>-        <text:p text:style-name="P1">alpha</text:p>+        <text:p text:style-name="List_20_Number_20_Tight">alpha</text:p>       </text:list-item>       <text:list-item>-        <text:p text:style-name="P1">beta</text:p>+        <text:p text:style-name="List_20_Number_20_Tight">beta</text:p>       </text:list-item>     </text:list>-    <text:list text:style-name="L2">+    <text:list text:style-name="List_20_1">       <text:list-item>-        <text:p text:style-name="P2">gamma</text:p>+        <text:p text:style-name="List_20_Bullet_20_Tight">gamma</text:p>       </text:list-item>     </text:list>   </text:list-item>@@ -40,20 +40,23 @@      more text -- this line is missing in the odt output ^D-<text:list text:style-name="L1">+<text:list text:style-name="Pandoc_5f_Numbering_5f_1">   <text:list-item>-    <text:p text:style-name="P1">text</text:p>-    <text:p text:style-name="P1">some text</text:p>-    <text:list>+    <text:p text:style-name="List_20_Number">text</text:p>+    <text:p text:style-name="List_20_Number">some text</text:p>+    <text:list text:style-name="Pandoc_5f_Numbering_5f_2">       <text:list-item>-        <text:p text:style-name="P1">sub item 1</text:p>+        <text:p text:style-name="List_20_Number_20_Tight">sub item+        1</text:p>       </text:list-item>       <text:list-item>-        <text:p text:style-name="P1">sub item 2</text:p>+        <text:p text:style-name="List_20_Number_20_Tight">sub item+        2</text:p>       </text:list-item>     </text:list>-    <text:p text:style-name="P1">more text – this line is missing in the-    odt output</text:p>+    <text:p text:style-name="List_20_Number">more text – this line is+    missing in the odt output</text:p>   </text:list-item> </text:list> ```+
test/command/4186.md view
@@ -5,7 +5,7 @@ #+end_example ^D [ CodeBlock-    ( "" , [ "example" ] , [] )+    ( "" , [] , [] )     "    This should retain the four leading spaces\n" ] ```@@ -40,13 +40,13 @@ ^D <ul> <li><p>depth 1</p>-<pre id="bob" class="example"><code>    Vertical alignment is four spaces beyond the appearance of the word &quot;depth&quot;.+<pre id="bob"><code>    Vertical alignment is four spaces beyond the appearance of the word &quot;depth&quot;. </code></pre> <ul> <li><p>depth 2</p>-<pre class="example"><code>Vertically aligned with the second appearance of the word &quot;depth&quot;.+<pre><code>Vertically aligned with the second appearance of the word &quot;depth&quot;. </code></pre>-<pre class="example"><code>    Vertical alignment is four spaces beyond the second+<pre><code>    Vertical alignment is four spaces beyond the second     appearance of the word &quot;depth&quot;.     The &quot;begin&quot; portion is a component of     this deeper list element, so that guarantees@@ -55,7 +55,7 @@ </code></pre> <p>Still inside the inner list element</p></li> </ul>-<pre id="carrie" class="example"><code>This belongs to the outer list element, and is aligned accordingly, since the NAME attribute is not indented deeply enough. It is not enough for the BEGIN alone to be aligned deeply if the block is meant to have a NAME.+<pre id="carrie"><code>This belongs to the outer list element, and is aligned accordingly, since the NAME attribute is not indented deeply enough. It is not enough for the BEGIN alone to be aligned deeply if the block is meant to have a NAME. </code></pre> <p>Still in the shallower list element since the preceding example block forced the deeper list element to terminate.</p></li>
test/command/5474-figures.md view
@@ -6,10 +6,10 @@ ![Second image](lalune.jpg)  ^D-<text:p text:style-name="FigureWithCaption"><draw:frame draw:name="img1"><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p>+<text:p text:style-name="FigureWithCaption"><draw:frame draw:name="img1" text:anchor-type="as-char"><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p> <text:p text:style-name="FigureCaption">Figure <text:sequence text:ref-name="refIllustration0" text:name="Illustration" text:formula="ooow:Illustration+1" style:num-format="1">1</text:sequence>: First image</text:p>-<text:p text:style-name="FigureWithCaption"><draw:frame draw:name="img2"><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p>+<text:p text:style-name="FigureWithCaption"><draw:frame draw:name="img2" text:anchor-type="as-char"><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p> <text:p text:style-name="FigureCaption">Figure <text:sequence text:ref-name="refIllustration1" text:name="Illustration" text:formula="ooow:Illustration+1" style:num-format="1">2</text:sequence>: Second image</text:p> ```
test/command/5543.md view
@@ -4,5 +4,5 @@ :   description ^D 1\. item-:   description+: description ```
test/command/5876.md view
@@ -48,13 +48,13 @@ % pandoc -s -t native --data-dir=command/5876 --metadata-file=does-not-exist.yaml Hello ^D-2> Could not find metadata file does-not-exist.yaml+2> Could not find metadata file 'does-not-exist.yaml' => 98 ``` ``` % pandoc -s -t native --metadata-file=does-not-exist.yaml Hello ^D-2> Could not find metadata file does-not-exist.yaml+2> Could not find metadata file 'does-not-exist.yaml' => 98 ```
test/command/6137.md view
@@ -38,79 +38,76 @@     , Space     , Str "work."     ]-, Div+, Table     ( "tbl:label" , [] , [] )-    [ Table+    (Caption+       Nothing+       [ Plain+           [ Str "This"+           , Space+           , Str "caption"+           , Space+           , Str "has"+           , Space+           , Str "no"+           , Space+           , Str "number."+           ]+       ])+    [ ( AlignLeft , ColWidthDefault )+    , ( AlignCenter , ColWidthDefault )+    , ( AlignRight , ColWidthDefault )+    ]+    (TableHead ( "" , [] , [] ) [])+    [ TableBody         ( "" , [] , [] )-        (Caption-           Nothing-           [ Plain-               [ Str "This"-               , Space-               , Str "caption"-               , Space-               , Str "has"-               , Space-               , Str "no"-               , Space-               , Str "number."-               ]-           ])-        [ ( AlignLeft , ColWidthDefault )-        , ( AlignCenter , ColWidthDefault )-        , ( AlignRight , ColWidthDefault )-        ]-        (TableHead ( "" , [] , [] ) [])-        [ TableBody+        (RowHeadColumns 0)+        []+        [ Row             ( "" , [] , [] )-            (RowHeadColumns 0)-            []-            [ Row+            [ Cell                 ( "" , [] , [] )-                [ Cell-                    ( "" , [] , [] )-                    AlignDefault-                    (RowSpan 1)-                    (ColSpan 1)-                    [ Plain [ Str "\8212\8212\8211" ] ]-                , Cell-                    ( "" , [] , [] )-                    AlignDefault-                    (RowSpan 1)-                    (ColSpan 1)-                    [ Plain [ Str "\8212\8212\8211" ] ]-                , Cell-                    ( "" , [] , [] )-                    AlignDefault-                    (RowSpan 1)-                    (ColSpan 1)-                    [ Plain [ Str "\8212\8212\8211" ] ]-                ]-            , Row+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "\8212\8212\8211" ] ]+            , Cell                 ( "" , [] , [] )-                [ Cell-                    ( "" , [] , [] )-                    AlignDefault-                    (RowSpan 1)-                    (ColSpan 1)-                    [ Plain [ Str "\8212\8212\8211" ] ]-                , Cell-                    ( "" , [] , [] )-                    AlignDefault-                    (RowSpan 1)-                    (ColSpan 1)-                    [ Plain [ Str "\8212\8212\8211" ] ]-                , Cell-                    ( "" , [] , [] )-                    AlignDefault-                    (RowSpan 1)-                    (ColSpan 1)-                    [ Plain [ Str "\8212\8212\8211" ] ]-                ]+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "\8212\8212\8211" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "\8212\8212\8211" ] ]             ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "\8212\8212\8211" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "\8212\8212\8211" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "\8212\8212\8211" ] ]+            ]         ]-        (TableFoot ( "" , [] , [] ) [])     ]+    (TableFoot ( "" , [] , [] ) []) , Para     [ Str "This"     , Space
test/command/6719.md view
@@ -4,7 +4,7 @@ <emphasis>emphasized </emphasis>text </para> ^D-[ Para [ Emph [ Str "emphasized" ] , Space , Str "text" ] ]+[ Para [ Emph [ Str "emphasized" , Space ] , Str "text" ] ] ```  ```@@ -13,6 +13,6 @@ <italic> hi  </italic>there </p> ^D-[ Para [ Emph [ Str "hi" ] , Space , Str "there" ] ]+[ Para [ Emph [ Space , Str "hi" , Space ] , Str "there" ] ] ``` 
test/command/6774.md view
@@ -21,7 +21,7 @@ <text:p text:style-name="First_20_paragraph">Chapter 1 references <text:bookmark-ref text:reference-format="text" text:ref-name="chapter1">The Chapter</text:bookmark-ref></text:p>-<text:p text:style-name="FigureWithCaption"><draw:frame draw:name="img1"><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p>+<text:p text:style-name="FigureWithCaption"><draw:frame draw:name="img1" text:anchor-type="as-char"><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p> <text:p text:style-name="FigureCaption">Voyage dans la Lune</text:p> <text:p text:style-name="Text_20_body">Image 1 references <text:sequence-ref text:reference-format="caption" text:ref-name="lalune">La@@ -38,7 +38,7 @@ Chapter<text:bookmark-end text:name="chapter1" /></text:h> <text:p text:style-name="First_20_paragraph">Chapter 1 references <text:bookmark-ref text:reference-format="number" text:ref-name="chapter1"></text:bookmark-ref></text:p>-<text:p text:style-name="FigureWithCaption"><draw:frame draw:name="img1"><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p>+<text:p text:style-name="FigureWithCaption"><draw:frame draw:name="img1" text:anchor-type="as-char"><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p> <text:p text:style-name="FigureCaption">lalune</text:p> <text:p text:style-name="Text_20_body">Image 1 references <text:sequence-ref text:reference-format="value" text:ref-name="lalune"></text:sequence-ref></text:p>@@ -55,7 +55,7 @@ <text:p text:style-name="First_20_paragraph">Chapter 1 references <text:bookmark-ref text:reference-format="number" text:ref-name="chapter1"></text:bookmark-ref><text:s /><text:bookmark-ref text:reference-format="text" text:ref-name="chapter1">The Chapter</text:bookmark-ref></text:p>-<text:p text:style-name="FigureWithCaption"><draw:frame draw:name="img1"><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p>+<text:p text:style-name="FigureWithCaption"><draw:frame draw:name="img1" text:anchor-type="as-char"><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p> <text:p text:style-name="FigureCaption">Voyage dans la Lune</text:p> <text:p text:style-name="Text_20_body">Image 1 references <text:sequence-ref text:reference-format="value" text:ref-name="lalune"></text:sequence-ref><text:s /><text:sequence-ref text:reference-format="caption" text:ref-name="lalune">La
test/command/6858.md view
@@ -27,13 +27,13 @@  \*FvwmAnimate: Color color -:   Tells **FvwmAnimate** what color to draw with. The color is-    \"XOR\'ed\" (exclusive ORed) onto the background.+: Tells **FvwmAnimate** what color to draw with. The color is+  \"XOR\'ed\" (exclusive ORed) onto the background.  \*FvwmAnimate: Pixmap pixmap -:   Tells **FvwmAnimate** to use **pixmap** to draw with. This can be-    useful if **\*FvwmAnimate: Color** gives poor results.+: Tells **FvwmAnimate** to use **pixmap** to draw with. This can be+  useful if **\*FvwmAnimate: Color** gives poor results. ```  ```
+ test/command/7201.md view
@@ -0,0 +1,47 @@+```+% pandoc -t revealjs --slide-level=1+# Overview++:::::::::::::: {.columns}+::: {.column width="40%"}++Left column++:::+::: {.column width="60%"}++* First list+    * subitem++. . .++* Second list+    * subitem+:::+::::::::::::::+^D+<section id="overview" class="slide level1">+<h1>Overview</h1>+<div class="columns">+<div class="column" style="width:40%;">+<p>Left column</p>+</div><div class="column" style="width:60%;">+<ul>+<li>First list+<ul>+<li>subitem</li>+</ul></li>+</ul>+<div class="fragment">+<ul>+<li>Second list+<ul>+<li>subitem</li>+</ul></li>+</ul>+</div>+</div>+</div>+</section>++```
+ test/command/7418.md view
@@ -0,0 +1,10 @@+```+% pandoc -f markdown+raw_tex -t latex+Lorem \hypertarget{anchor} etc++Lorem \hyperlink{anchor}{the link} etc+^D+Lorem \hypertarget{anchor} etc++Lorem \hyperlink{anchor}{the link} etc+```
test/command/7521.md view
@@ -5,7 +5,7 @@ - two ^D <ul>-<li>one </li>+<li>one</li> <li>two</li> </ul> ```
+ test/command/7582.md view
@@ -0,0 +1,28 @@+```+% pandoc -t revealjs+# Slide++::: columns+:::: column+Left column+::::++. . .++:::: column+Right column+::::+:::+^D+<section id="slide" class="slide level1">+<h1>Slide</h1>+<div class="columns">+<div class="column">+<p>Left column</p>+</div><div class="fragment"><div class="column">+<p>Right column</p>+</div></div>+</div>+</section>++```
test/command/7861.md view
@@ -2,6 +2,6 @@ % pandoc -s -t native --data-dir=command/7861 --metadata-file=../../7861.yaml Hello ^D-2> Could not find metadata file ../../7861.yaml+2> Could not find metadata file '../../7861.yaml' => 98 ```
+ test/command/8024.md view
@@ -0,0 +1,10 @@+```+% pandoc -d command/8024a.yaml -t markdown+Hello, if this works the text should be wrapped.+^D+Hello, if this+works the text+should be+wrapped.++```
+ test/command/8024a.yaml view
@@ -0,0 +1,2 @@+defaults: ${.}/8024b.yaml+
+ test/command/8024b.yaml view
@@ -0,0 +1,3 @@+wrap: auto+columns: 15+
+ test/command/8240.md view
@@ -0,0 +1,14 @@+```+% pandoc -t latex+Header[^fn]:+:    Some other text.++[^fn]: A footnote.+^D+\begin{description}+\tightlist+\item[Header\footnotemark{}:]+Some other text.+\end{description}+\footnotetext{A footnote.}+```
test/command/8256.md view
@@ -16,14 +16,13 @@     <style:font-face style:name="Courier New" style:font-family-generic="modern" style:font-pitch="fixed" svg:font-family="'Courier New'" />   </office:font-face-decls>   <office:automatic-styles>-    <style:style style:name="T1" style:family="text"><style:text-properties fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic" /></style:style>     <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Formula"><style:graphic-properties style:vertical-pos="middle" style:vertical-rel="text" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" style:wrap="none" /></style:style>     <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Formula"><style:graphic-properties style:vertical-pos="middle" style:vertical-rel="text" /></style:style>   </office:automatic-styles> <office:body> <office:text> <text:p text:style-name="Title">This-<text:span text:style-name="T1">is</text:span><text:line-break />a+<text:span text:style-name="Emphasis">is</text:span><text:line-break />a test</text:p> <text:p text:style-name="Author">Someone</text:p> <text:p text:style-name="Text_20_body">Testing.</text:p>
test/command/8665.md view
@@ -24,6 +24,6 @@ [cols=",",options="header",] |=== <|h1 <|h2-<|!@#$%^&++*++()++{++}{vbar}~?{plus}-',."++<>[]\`++ <|col 2+<|!@++#++$%^&++*++()++{++}{vbar}~?{plus}-',."++<>[]\`++ <|col 2 |=== ```
+ test/command/8783.md view
@@ -0,0 +1,33 @@+```+% pandoc -f rtf -t native+{\rtf1\ansi\ansicpg1252\cocoartf2867+\cocoatextscaling0\cocoaplatform1{\fonttbl\f0\fnil\fcharset0 HelveticaNeue;}+{\colortbl;\red255\green255\blue255;\red0\green0\blue0;}+{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;}+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid1\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid1}+{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2}}+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}+\paperw11905\paperh16837\margl1133\margr1133\margb1133\margt1133+\deftab720+\pard\pardeftab720\partightenfactor0++\f0\fs22 \cf2 \up0 \nosupersub \ulnone First paragraph\+\pard\tx20\tx360\pardeftab720\li360\fi-360\partightenfactor0+\ls1\ilvl0\cf2 \up0 \nosupersub \ulnone {\listtext	1.	}\cf2 \up0 \nosupersub \ulnone Numbered item\+\pard\pardeftab720\partightenfactor0+\cf2 Second paragraph\+\pard\tx20\tx180\pardeftab720\li180\fi-180\partightenfactor0+\ls2\ilvl0\cf2 \up0 \nosupersub \ulnone {\listtext	\uc0\u8226 	}\cf2 \up0 \nosupersub \ulnone Bullet item\+\pard\pardeftab720\partightenfactor0+\cf2 New paragraph}+^D+[ Para [ Str "First" , Space , Str "paragraph" ]+, OrderedList+    ( 1 , Decimal , Period )+    [ [ Para [ Str "Numbered" , Space , Str "item" ] ] ]+, Para [ Str "Second" , Space , Str "paragraph" ]+, BulletList+    [ [ Para [ Str "Bullet" , Space , Str "item" ] ] ]+, Para [ Str "New" , Space , Str "paragraph" ]+]+```
+ test/command/8852.md view
@@ -0,0 +1,43 @@+Github Formatted Markdown Identifiers+```+% pandoc -f man+gfm_auto_identifiers -t html+.TH "TEST" "1" "2026-05-08"  "test v1.0.0" "test manual"+.SH 1st HEADING+.SH C++ & Rust+.SH HEADING+.SH HEADING+^D+<h1 id="1st-heading">1st HEADING</h1>+<h1 id="c--rust">C++ &amp; Rust</h1>+<h1 id="heading">HEADING</h1>+<h1 id="heading-1">HEADING</h1>+```++Ascii Identifiers test+```+% pandoc -f man+ascii_identifiers -t html+.TH "TEST" "1" "2026-05-08"  "test v1.0.0" "test manual"+.SH Über den Flüssen+^D+<h1 id="uber-den-flussen">Über den Flüssen</h1>+```++Headers without Auto Identifiers test+```+% pandoc -f man-auto_identifiers -t native+.TH "TEST" "1" "2026-05-08"  "test v1.0.0" "test manual"+.SS Level 2+.SS different styles:+.SS Ordered+.SS Ordered+^D+[ Header+    2 ( "" , [] , [] ) [ Str "Level" , Space , Str "2" ]+, Header+    2+    ( "" , [] , [] )+    [ Str "different" , Space , Str "styles:" ]+, Header 2 ( "" , [] , [] ) [ Str "Ordered" ]+, Header 2 ( "" , [] , [] ) [ Str "Ordered" ]+]+```
+ test/command/8880.md view
@@ -0,0 +1,42 @@+Raw EPUB attributes are rendered in EPUB output.++```+% pandoc -f native -t epub --metadata title=Raw -o - | pandoc -f epub -t html+[ RawBlock (Format "epub") "<p>ok</p>" ]+^D+<p><span id="title_page.xhtml"></span></p>+<p><span id="ch001.xhtml"></span></p>+<section id="ch001.xhtml_raw" class="unnumbered level1">+<h1 class="unnumbered">Raw</h1>+<p>ok</p>+</section>+```++Raw EPUB2 attributes are omitted from EPUB3 output.++```+% pandoc -f markdown -t epub3 --metadata title=Raw -o - | pandoc -f epub -t html+~~~ {=epub2}+<p>ok</p>+~~~+^D+<p><span id="title_page.xhtml"></span></p>+<p><span id="ch001.xhtml"></span></p>+<section id="ch001.xhtml_raw" class="unnumbered level1">+<h1 class="unnumbered">Raw</h1>+</section>+```++```+% pandoc -f markdown -t epub3 --metadata title=Raw -o - | pandoc -f epub -t html+~~~ {=epub3}+<p>ok</p>+~~~+^D+<p><span id="title_page.xhtml"></span></p>+<p><span id="ch001.xhtml"></span></p>+<section id="ch001.xhtml_raw" class="unnumbered level1">+<h1 class="unnumbered">Raw</h1>+<p>ok</p>+</section>+```
test/command/8966.md view
@@ -3,7 +3,7 @@ **Samsonov T.E.** Shape-Adaptive Geometric Simplification of Heterogeneous Line Datasets / T. E. Samsonov, O. P. Yakimova // International Journal of Geographical Information Science. — 2017. — Vol. 31. — № 8. — pp. 1485-1520. ^D #strong[Samsonov T.E.] Shape-Adaptive Geometric Simplification of-Heterogeneous Line Datasets / T. E. Samsonov, O. P. Yakimova \/\/+Heterogeneous Line Datasets / T. E. Samsonov, O. P. Yakimova /\/ International Journal of Geographical Information Science. --- 2017. --- Vol. 31. --- № 8. --- pp.~1485-1520. ```
test/command/8997.md view
@@ -24,7 +24,7 @@     , Space     , Str "colon"     ]-, CodeBlock ( "" , [ "example" ] , [] ) "aaa\n\nbbb\n"+, CodeBlock ( "" , [] , [] ) "aaa\n\nbbb\n" , Header     1     ( "has-no-space-after-second-colon" , [] , [] )@@ -40,7 +40,7 @@     , Space     , Str "colon"     ]-, CodeBlock ( "" , [ "example" ] , [] ) "aaa\n\nbbb\n"+, CodeBlock ( "" , [] , [] ) "aaa\n\nbbb\n" ] ``` @@ -56,7 +56,7 @@     1     ( "only-the-colon" , [] , [] )     [ Str "only" , Space , Str "the" , Space , Str "colon" ]-, CodeBlock ( "" , [ "example" ] , [] ) "\n"+, CodeBlock ( "" , [] , [] ) "\n" , Header     1     ( "only-the-colon-and-a-space" , [] , [] )@@ -72,6 +72,6 @@     , Space     , Str "space"     ]-, CodeBlock ( "" , [ "example" ] , [] ) "\n"+, CodeBlock ( "" , [] , [] ) "\n" ] ```
+ test/command/9136.md view
@@ -0,0 +1,89 @@+Verify that the OpenDocument writer uses predefined list, paragraph, and+text styles instead of generating per-instance automatic styles.++```+% pandoc -t opendocument+- one+- two++1. ordered one+2. ordered two++Some *italic*, **bold**, ~~strike~~, and `code`.++> A block quote.++Final paragraph.+^D+<text:list text:style-name="List_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">one</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">two</text:p>+  </text:list-item>+</text:list>+<text:list text:style-name="Numbering_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">ordered+    one</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">ordered+    two</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Some+<text:span text:style-name="Emphasis">italic</text:span>,+<text:span text:style-name="Strong_20_Emphasis">bold</text:span>,+<text:span text:style-name="Strikeout">strike</text:span>, and+<text:span text:style-name="Source_20_Text">code</text:span>.</text:p>+<text:p text:style-name="Quotations">A block quote.</text:p>+<text:p text:style-name="First_20_paragraph">Final paragraph.</text:p>+```++A non-default ordered list (start value other than 1, or non-decimal+format) generates a single named override style, not one per instance.++```+% pandoc -t opendocument+A) upper-alpha one+B) upper-alpha two++5. start at five+6. and continue+^D+<text:list text:style-name="Pandoc_5f_Numbering_5f_1">+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">upper-alpha+    one</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">upper-alpha+    two</text:p>+  </text:list-item>+</text:list>+<text:list text:style-name="Numbering_20_1" text:start-value="5">+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">start at+    five</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">and+    continue</text:p>+  </text:list-item>+</text:list>+```++A nested block quote uses the predefined `Quotations` style for the+outer paragraph, and inherits indent from it for the inner paragraph.++```+% pandoc -t opendocument+> First.+>+> > Nested.+^D+<text:p text:style-name="Quotations">First.</text:p>+<text:p text:style-name="P1">Nested.</text:p>+```
test/command/9201.md view
@@ -12,7 +12,7 @@  **\--help** -:   This is line one.+: This is line one. -    This is line two.+  This is line two. ```
test/command/9236.md view
@@ -9,25 +9,26 @@ And inline: ![minimal](command/minimal.svg){height=2in} and ![minimal](command/minimal.svg). ^D-#figure(image("command/minimal.svg", width: 3in),+#figure(image("command/minimal.svg", width: 3in, alt: "minimal"),   caption: [     minimal   ] ) -#figure(image("command/minimal.svg", height: 2in, width: 3in),+#figure(image("command/minimal.svg", height: 2in, width: 3in, alt: "minimal"),   caption: [     minimal   ] ) -#figure(image("command/minimal.svg"),+#figure(image("command/minimal.svg", alt: "minimal"),   caption: [     minimal   ] ) -And inline: #box(image("command/minimal.svg", height: 2in)) and-#box(image("command/minimal.svg")).+And inline:+#box(image("command/minimal.svg", height: 2in, alt: "minimal")) and+#box(image("command/minimal.svg", alt: "minimal")).  ```
test/command/9391.md view
@@ -3,7 +3,7 @@ ^D <p>Lorem ipsum.</p> <figure>-<img src="media/image1.png" style="width:1.10263in;height:1.10263in" />+<img src="media/image1.png" style="width:1.09702in;height:1.09702in" /> <figcaption><p>Blue square.</p></figcaption> </figure> ```
test/command/9472.md view
@@ -62,6 +62,10 @@ \usepackage{bookmark} \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available \urlstyle{same}+% fallback for those not using the hyperref driver hyperxmp:+\makeatletter+\@ifundefined{xmpquote}{\newcommand{\xmpquote}[1]{#1}}{}+\makeatother \hypersetup{   pdflang={de-DE},   hidelinks,
test/command/9700.md view
@@ -8,7 +8,7 @@ ^D This is a normal sentence with a manual text footnote* -\* The footnote explains why it couldn’t just be inside parentheses+<nowiki></nowiki>* The footnote explains why it couldn’t just be inside parentheses -\#foobar #foobar+<nowiki></nowiki>#foobar #foobar ```
+ test/command/9716.md view
@@ -0,0 +1,13 @@+```+% pandoc -f markdown+alerts -t native+> [!TIP]+> A suggestion.+^D+[ Div+    ( "" , [ "tip" ] , [] )+    [ Div ( "" , [ "title" ] , [] ) [ Para [ Str "Tip" ] ]+    , Para [ Str "A" , Space , Str "suggestion." ]+    ]+]++```
test/command/biblatex-crossref-nested.md view
@@ -53,7 +53,7 @@   publisher: Publisher   publisher-place: Location   title: Macbeth \[title field of bookinbook-1\]-  type: chapter+  type: book   volume: 3   volume-title: Tragedies \[title field of book-1\] - author:
test/command/figures-mediawiki.md view
@@ -6,9 +6,6 @@  ^D <div id="fig-id" class="figure">- [[File:foo.png|thumb|none]]-- </div> ```
test/command/gfm.md view
@@ -220,3 +220,15 @@ - [ ] foo - [x] bar ```++```+% pandoc -f native -t gfm+[ BulletList+    [ [ Plain [ Str "\9744" ] ]+    , [ Plain [ Str "\9746" ] ]+    ]+]+^D+- [ ]+- [x]+```
+ test/command/grid-table-indented.md view
@@ -0,0 +1,65 @@+Like other block-level constructs, grid tables may be indented by up to+three spaces and are still recognized as tables.++```+% pandoc -f markdown -t html+   +---+---++   | a | b |+   +===+===++   | 1 | 2 |+   +---+---++^D+<table style="width:11%;">+<colgroup>+<col style="width: 5%" />+<col style="width: 5%" />+</colgroup>+<thead>+<tr>+<th>a</th>+<th>b</th>+</tr>+</thead>+<tbody>+<tr>+<td>1</td>+<td>2</td>+</tr>+</tbody>+</table>+```++A headerless indented grid table is recognized too.++```+% pandoc -f markdown -t html+  +------+------++  | foo  | bar  |+  +------+------++^D+<table style="width:19%;">+<colgroup>+<col style="width: 9%" />+<col style="width: 9%" />+</colgroup>+<tbody>+<tr>+<td>foo</td>+<td>bar</td>+</tr>+</tbody>+</table>+```++A grid table indented four spaces is a code block, not a table.++```+% pandoc -f markdown -t html+    +---+---++    | a | b |+    +---+---++^D+<pre><code>+---+---++| a | b |++---+---+</code></pre>+```
+ test/command/mediawiki_behavior_switches.md view
@@ -0,0 +1,16 @@+```+% pandoc -f mediawiki -t native+____INDEX____+__NOINDEX__+__noindex__+__FOOBAR__+^D+[ Para+    [ Str "____"+    , SoftBreak+    , Str "__noindex__"+    , SoftBreak+    , Str "__FOOBAR__"+    ]+]+```
+ test/command/pdfstandard.md view
@@ -0,0 +1,616 @@+PDF standard support: basic PDF/A-2b test (infers version 1.7)+```+% pandoc -t latex -s+---+pdfstandard: a-2b+lang: en-US+---++Test document.+^D+\DocumentMetadata{+  pdfversion=1.7,+  pdfstandard={a-2b},+  lang=en-US,+  xmp=true}+% Options for packages loaded elsewhere+\PassOptionsToPackage{unicode}{hyperref}+\PassOptionsToPackage{hyphens}{url}+\documentclass[+  american,+]{article}+\usepackage{xcolor}+\usepackage{amsmath,amssymb}+\setcounter{secnumdepth}{-\maxdimen} % remove section numbering+\usepackage{iftex}+\ifPDFTeX+  \usepackage[T1]{fontenc}+  \usepackage[utf8]{inputenc}+  \usepackage{textcomp} % provide euro and other symbols+\else % if luatex or xetex+  \usepackage{unicode-math} % this also loads fontspec+  \defaultfontfeatures{Scale=MatchLowercase}+  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}+\fi+\usepackage{lmodern}+\ifPDFTeX\else+  % xetex/luatex font selection+\fi+% Use upquote if available, for straight quotes in verbatim environments+\IfFileExists{upquote.sty}{\usepackage{upquote}}{}+\IfFileExists{microtype.sty}{% use microtype if available+  \usepackage[]{microtype}+  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts+}{}+\makeatletter+\@ifundefined{KOMAClassName}{% if non-KOMA class+  \IfFileExists{parskip.sty}{%+    \usepackage{parskip}+  }{% else+    \setlength{\parindent}{0pt}+    \setlength{\parskip}{6pt plus 2pt minus 1pt}}+}{% if KOMA class+  \KOMAoptions{parskip=half}}+\makeatother+\ifLuaTeX+\usepackage[bidi=basic,shorthands=off]{babel}+\else+\usepackage[bidi=default,shorthands=off]{babel}+\fi+\ifLuaTeX+  \usepackage{selnolig} % disable illegal ligatures+\fi+\setlength{\emergencystretch}{3em} % prevent overfull lines+\providecommand{\tightlist}{%+  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}+\usepackage{bookmark}+\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available+\urlstyle{same}+% fallback for those not using the hyperref driver hyperxmp:+\makeatletter+\@ifundefined{xmpquote}{\newcommand{\xmpquote}[1]{#1}}{}+\makeatother+\hypersetup{+  pdflang={en-US},+  hidelinks,+  pdfcreator={LaTeX via pandoc}}++\author{}+\date{}++\begin{document}++Test document.++\end{document}+```++PDF standard support: PDF/UA-1 with tagging+```+% pandoc -t latex -s+---+pdfstandard: ua-1+lang: en-US+---++Accessible document.+^D+\DocumentMetadata{+  pdfstandard={ua-1},+  tagging=on,+  lang=en-US,+  xmp=true}+% Options for packages loaded elsewhere+\PassOptionsToPackage{unicode}{hyperref}+\PassOptionsToPackage{hyphens}{url}+\documentclass[+  american,+]{article}+\usepackage{xcolor}+\usepackage{amsmath,amssymb}+\setcounter{secnumdepth}{-\maxdimen} % remove section numbering+\usepackage{iftex}+\ifPDFTeX+  \usepackage[T1]{fontenc}+  \usepackage[utf8]{inputenc}+  \usepackage{textcomp} % provide euro and other symbols+\else % if luatex or xetex+  \usepackage{unicode-math} % this also loads fontspec+  \defaultfontfeatures{Scale=MatchLowercase}+  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}+\fi+\usepackage{lmodern}+\ifPDFTeX\else+  % xetex/luatex font selection+\fi+% Use upquote if available, for straight quotes in verbatim environments+\IfFileExists{upquote.sty}{\usepackage{upquote}}{}+\IfFileExists{microtype.sty}{% use microtype if available+  \usepackage[]{microtype}+  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts+}{}+\makeatletter+\@ifundefined{KOMAClassName}{% if non-KOMA class+  \IfFileExists{parskip.sty}{%+    \usepackage{parskip}+  }{% else+    \setlength{\parindent}{0pt}+    \setlength{\parskip}{6pt plus 2pt minus 1pt}}+}{% if KOMA class+  \KOMAoptions{parskip=half}}+\makeatother+\ifLuaTeX+\usepackage[bidi=basic,shorthands=off]{babel}+\else+\usepackage[bidi=default,shorthands=off]{babel}+\fi+\ifLuaTeX+  \usepackage{selnolig} % disable illegal ligatures+\fi+\setlength{\emergencystretch}{3em} % prevent overfull lines+\providecommand{\tightlist}{%+  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}+\usepackage{bookmark}+\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available+\urlstyle{same}+% fallback for those not using the hyperref driver hyperxmp:+\makeatletter+\@ifundefined{xmpquote}{\newcommand{\xmpquote}[1]{#1}}{}+\makeatother+\hypersetup{+  pdflang={en-US},+  hidelinks,+  pdfcreator={LaTeX via pandoc}}++\author{}+\date{}++\begin{document}++Accessible document.++\end{document}+```++PDF standard support: multiple standards with version+```+% pandoc -t latex -s+---+pdfstandard:+  - a-2b+  - ua-1+  - "1.7"+lang: de-DE+---++Multi-standard document.+^D+\DocumentMetadata{+  pdfversion=1.7,+  pdfstandard={a-2b,ua-1},+  tagging=on,+  lang=de-DE,+  xmp=true}+% Options for packages loaded elsewhere+\PassOptionsToPackage{unicode}{hyperref}+\PassOptionsToPackage{hyphens}{url}+\documentclass[+  ngerman,+]{article}+\usepackage{xcolor}+\usepackage{amsmath,amssymb}+\setcounter{secnumdepth}{-\maxdimen} % remove section numbering+\usepackage{iftex}+\ifPDFTeX+  \usepackage[T1]{fontenc}+  \usepackage[utf8]{inputenc}+  \usepackage{textcomp} % provide euro and other symbols+\else % if luatex or xetex+  \usepackage{unicode-math} % this also loads fontspec+  \defaultfontfeatures{Scale=MatchLowercase}+  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}+\fi+\usepackage{lmodern}+\ifPDFTeX\else+  % xetex/luatex font selection+\fi+% Use upquote if available, for straight quotes in verbatim environments+\IfFileExists{upquote.sty}{\usepackage{upquote}}{}+\IfFileExists{microtype.sty}{% use microtype if available+  \usepackage[]{microtype}+  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts+}{}+\makeatletter+\@ifundefined{KOMAClassName}{% if non-KOMA class+  \IfFileExists{parskip.sty}{%+    \usepackage{parskip}+  }{% else+    \setlength{\parindent}{0pt}+    \setlength{\parskip}{6pt plus 2pt minus 1pt}}+}{% if KOMA class+  \KOMAoptions{parskip=half}}+\makeatother+\ifLuaTeX+\usepackage[bidi=basic,shorthands=off]{babel}+\else+\usepackage[bidi=default,shorthands=off]{babel}+\fi+\ifLuaTeX+  \usepackage{selnolig} % disable illegal ligatures+\fi+\setlength{\emergencystretch}{3em} % prevent overfull lines+\providecommand{\tightlist}{%+  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}+\usepackage{bookmark}+\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available+\urlstyle{same}+% fallback for those not using the hyperref driver hyperxmp:+\makeatletter+\@ifundefined{xmpquote}{\newcommand{\xmpquote}[1]{#1}}{}+\makeatother+\hypersetup{+  pdflang={de-DE},+  hidelinks,+  pdfcreator={LaTeX via pandoc}}++\author{}+\date{}++\begin{document}++Multi-standard document.++\end{document}+```++PDF standard support: PDF/A-1b infers version 1.4+```+% pandoc -t latex -s+---+pdfstandard: a-1b+lang: en-US+---++PDF/A-1 document.+^D+\DocumentMetadata{+  pdfversion=1.4,+  pdfstandard={a-1b},+  lang=en-US,+  xmp=true}+% Options for packages loaded elsewhere+\PassOptionsToPackage{unicode}{hyperref}+\PassOptionsToPackage{hyphens}{url}+\documentclass[+  american,+]{article}+\usepackage{xcolor}+\usepackage{amsmath,amssymb}+\setcounter{secnumdepth}{-\maxdimen} % remove section numbering+\usepackage{iftex}+\ifPDFTeX+  \usepackage[T1]{fontenc}+  \usepackage[utf8]{inputenc}+  \usepackage{textcomp} % provide euro and other symbols+\else % if luatex or xetex+  \usepackage{unicode-math} % this also loads fontspec+  \defaultfontfeatures{Scale=MatchLowercase}+  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}+\fi+\usepackage{lmodern}+\ifPDFTeX\else+  % xetex/luatex font selection+\fi+% Use upquote if available, for straight quotes in verbatim environments+\IfFileExists{upquote.sty}{\usepackage{upquote}}{}+\IfFileExists{microtype.sty}{% use microtype if available+  \usepackage[]{microtype}+  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts+}{}+\makeatletter+\@ifundefined{KOMAClassName}{% if non-KOMA class+  \IfFileExists{parskip.sty}{%+    \usepackage{parskip}+  }{% else+    \setlength{\parindent}{0pt}+    \setlength{\parskip}{6pt plus 2pt minus 1pt}}+}{% if KOMA class+  \KOMAoptions{parskip=half}}+\makeatother+\ifLuaTeX+\usepackage[bidi=basic,shorthands=off]{babel}+\else+\usepackage[bidi=default,shorthands=off]{babel}+\fi+\ifLuaTeX+  \usepackage{selnolig} % disable illegal ligatures+\fi+\setlength{\emergencystretch}{3em} % prevent overfull lines+\providecommand{\tightlist}{%+  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}+\usepackage{bookmark}+\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available+\urlstyle{same}+% fallback for those not using the hyperref driver hyperxmp:+\makeatletter+\@ifundefined{xmpquote}{\newcommand{\xmpquote}[1]{#1}}{}+\makeatother+\hypersetup{+  pdflang={en-US},+  hidelinks,+  pdfcreator={LaTeX via pandoc}}++\author{}+\date{}++\begin{document}++PDF/A-1 document.++\end{document}+```++PDF standard support: PDF/A-4 with no version inference (uses default 2.0)+```+% pandoc -t latex -s+---+pdfstandard: a-4+lang: en-US+---++PDF/A-4 document.+^D+\DocumentMetadata{+  pdfstandard={a-4},+  lang=en-US,+  xmp=true}+% Options for packages loaded elsewhere+\PassOptionsToPackage{unicode}{hyperref}+\PassOptionsToPackage{hyphens}{url}+\documentclass[+  american,+]{article}+\usepackage{xcolor}+\usepackage{amsmath,amssymb}+\setcounter{secnumdepth}{-\maxdimen} % remove section numbering+\usepackage{iftex}+\ifPDFTeX+  \usepackage[T1]{fontenc}+  \usepackage[utf8]{inputenc}+  \usepackage{textcomp} % provide euro and other symbols+\else % if luatex or xetex+  \usepackage{unicode-math} % this also loads fontspec+  \defaultfontfeatures{Scale=MatchLowercase}+  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}+\fi+\usepackage{lmodern}+\ifPDFTeX\else+  % xetex/luatex font selection+\fi+% Use upquote if available, for straight quotes in verbatim environments+\IfFileExists{upquote.sty}{\usepackage{upquote}}{}+\IfFileExists{microtype.sty}{% use microtype if available+  \usepackage[]{microtype}+  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts+}{}+\makeatletter+\@ifundefined{KOMAClassName}{% if non-KOMA class+  \IfFileExists{parskip.sty}{%+    \usepackage{parskip}+  }{% else+    \setlength{\parindent}{0pt}+    \setlength{\parskip}{6pt plus 2pt minus 1pt}}+}{% if KOMA class+  \KOMAoptions{parskip=half}}+\makeatother+\ifLuaTeX+\usepackage[bidi=basic,shorthands=off]{babel}+\else+\usepackage[bidi=default,shorthands=off]{babel}+\fi+\ifLuaTeX+  \usepackage{selnolig} % disable illegal ligatures+\fi+\setlength{\emergencystretch}{3em} % prevent overfull lines+\providecommand{\tightlist}{%+  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}+\usepackage{bookmark}+\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available+\urlstyle{same}+% fallback for those not using the hyperref driver hyperxmp:+\makeatletter+\@ifundefined{xmpquote}{\newcommand{\xmpquote}[1]{#1}}{}+\makeatother+\hypersetup{+  pdflang={en-US},+  hidelinks,+  pdfcreator={LaTeX via pandoc}}++\author{}+\date{}++\begin{document}++PDF/A-4 document.++\end{document}+```++PDF standard support: numeric YAML version (2 becomes 2.0)+```+% pandoc -t latex -s+---+pdfstandard:+  - ua-1+  - 2+lang: en-US+---++PDF 2.0 document.+^D+\DocumentMetadata{+  pdfversion=2.0,+  pdfstandard={ua-1},+  tagging=on,+  lang=en-US,+  xmp=true}+% Options for packages loaded elsewhere+\PassOptionsToPackage{unicode}{hyperref}+\PassOptionsToPackage{hyphens}{url}+\documentclass[+  american,+]{article}+\usepackage{xcolor}+\usepackage{amsmath,amssymb}+\setcounter{secnumdepth}{-\maxdimen} % remove section numbering+\usepackage{iftex}+\ifPDFTeX+  \usepackage[T1]{fontenc}+  \usepackage[utf8]{inputenc}+  \usepackage{textcomp} % provide euro and other symbols+\else % if luatex or xetex+  \usepackage{unicode-math} % this also loads fontspec+  \defaultfontfeatures{Scale=MatchLowercase}+  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}+\fi+\usepackage{lmodern}+\ifPDFTeX\else+  % xetex/luatex font selection+\fi+% Use upquote if available, for straight quotes in verbatim environments+\IfFileExists{upquote.sty}{\usepackage{upquote}}{}+\IfFileExists{microtype.sty}{% use microtype if available+  \usepackage[]{microtype}+  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts+}{}+\makeatletter+\@ifundefined{KOMAClassName}{% if non-KOMA class+  \IfFileExists{parskip.sty}{%+    \usepackage{parskip}+  }{% else+    \setlength{\parindent}{0pt}+    \setlength{\parskip}{6pt plus 2pt minus 1pt}}+}{% if KOMA class+  \KOMAoptions{parskip=half}}+\makeatother+\ifLuaTeX+\usepackage[bidi=basic,shorthands=off]{babel}+\else+\usepackage[bidi=default,shorthands=off]{babel}+\fi+\ifLuaTeX+  \usepackage{selnolig} % disable illegal ligatures+\fi+\setlength{\emergencystretch}{3em} % prevent overfull lines+\providecommand{\tightlist}{%+  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}+\usepackage{bookmark}+\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available+\urlstyle{same}+% fallback for those not using the hyperref driver hyperxmp:+\makeatletter+\@ifundefined{xmpquote}{\newcommand{\xmpquote}[1]{#1}}{}+\makeatother+\hypersetup{+  pdflang={en-US},+  hidelinks,+  pdfcreator={LaTeX via pandoc}}++\author{}+\date{}++\begin{document}++PDF 2.0 document.++\end{document}+```++PDF standard support: explicit version overrides inferred version+```+% pandoc -t latex -s+---+pdfstandard:+  - a-2b+  - "1.5"+lang: en-US+---++Explicit version document.+^D+\DocumentMetadata{+  pdfversion=1.5,+  pdfstandard={a-2b},+  lang=en-US,+  xmp=true}+% Options for packages loaded elsewhere+\PassOptionsToPackage{unicode}{hyperref}+\PassOptionsToPackage{hyphens}{url}+\documentclass[+  american,+]{article}+\usepackage{xcolor}+\usepackage{amsmath,amssymb}+\setcounter{secnumdepth}{-\maxdimen} % remove section numbering+\usepackage{iftex}+\ifPDFTeX+  \usepackage[T1]{fontenc}+  \usepackage[utf8]{inputenc}+  \usepackage{textcomp} % provide euro and other symbols+\else % if luatex or xetex+  \usepackage{unicode-math} % this also loads fontspec+  \defaultfontfeatures{Scale=MatchLowercase}+  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}+\fi+\usepackage{lmodern}+\ifPDFTeX\else+  % xetex/luatex font selection+\fi+% Use upquote if available, for straight quotes in verbatim environments+\IfFileExists{upquote.sty}{\usepackage{upquote}}{}+\IfFileExists{microtype.sty}{% use microtype if available+  \usepackage[]{microtype}+  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts+}{}+\makeatletter+\@ifundefined{KOMAClassName}{% if non-KOMA class+  \IfFileExists{parskip.sty}{%+    \usepackage{parskip}+  }{% else+    \setlength{\parindent}{0pt}+    \setlength{\parskip}{6pt plus 2pt minus 1pt}}+}{% if KOMA class+  \KOMAoptions{parskip=half}}+\makeatother+\ifLuaTeX+\usepackage[bidi=basic,shorthands=off]{babel}+\else+\usepackage[bidi=default,shorthands=off]{babel}+\fi+\ifLuaTeX+  \usepackage{selnolig} % disable illegal ligatures+\fi+\setlength{\emergencystretch}{3em} % prevent overfull lines+\providecommand{\tightlist}{%+  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}+\usepackage{bookmark}+\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available+\urlstyle{same}+% fallback for those not using the hyperref driver hyperxmp:+\makeatletter+\@ifundefined{xmpquote}{\newcommand{\xmpquote}[1]{#1}}{}+\makeatother+\hypersetup{+  pdflang={en-US},+  hidelinks,+  pdfcreator={LaTeX via pandoc}}++\author{}+\date{}++\begin{document}++Explicit version document.++\end{document}+```
+ test/command/pptx-table-content-same-slide.md view
@@ -0,0 +1,121 @@+Test that content after a table stays on the same slide.++```+% pandoc -t native+## Slide with Bullets and Table++- First bullet before table+- Second bullet before table++| A | B |+|---|---|+| 1 | 2 |++- Third bullet after table+- Fourth bullet after table+^D+[ Header+    2+    ( "slide-with-bullets-and-table" , [] , [] )+    [ Str "Slide"+    , Space+    , Str "with"+    , Space+    , Str "Bullets"+    , Space+    , Str "and"+    , Space+    , Str "Table"+    ]+, BulletList+    [ [ Plain+          [ Str "First"+          , Space+          , Str "bullet"+          , Space+          , Str "before"+          , Space+          , Str "table"+          ]+      ]+    , [ Plain+          [ Str "Second"+          , Space+          , Str "bullet"+          , Space+          , Str "before"+          , Space+          , Str "table"+          ]+      ]+    ]+, Table+    ( "" , [] , [] )+    (Caption Nothing [])+    [ ( AlignDefault , ColWidthDefault )+    , ( AlignDefault , ColWidthDefault )+    ]+    (TableHead+       ( "" , [] , [] )+       [ Row+           ( "" , [] , [] )+           [ Cell+               ( "" , [] , [] )+               AlignDefault+               (RowSpan 1)+               (ColSpan 1)+               [ Plain [ Str "A" ] ]+           , Cell+               ( "" , [] , [] )+               AlignDefault+               (RowSpan 1)+               (ColSpan 1)+               [ Plain [ Str "B" ] ]+           ]+       ])+    [ TableBody+        ( "" , [] , [] )+        (RowHeadColumns 0)+        []+        [ Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "2" ] ]+            ]+        ]+    ]+    (TableFoot ( "" , [] , [] ) [])+, BulletList+    [ [ Plain+          [ Str "Third"+          , Space+          , Str "bullet"+          , Space+          , Str "after"+          , Space+          , Str "table"+          ]+      ]+    , [ Plain+          [ Str "Fourth"+          , Space+          , Str "bullet"+          , Space+          , Str "after"+          , Space+          , Str "table"+          ]+      ]+    ]+]+```
+ test/command/reset-citation-positions.md view
@@ -0,0 +1,41 @@+```+% pandoc --citeproc -t plain --csl command/chicago-fullnote-bibliography.csl+---+suppress-bibliography: true+references:+- id: foo+  name: John doe+  title: A Book+  type: book+  publisher: Oxford University Press+  issued: 2010+...++# Chapter one++Blah [@foo, p. 7].++Blah [@foo, p. 8].++# Chapter two {.reset-citation-positions}++Blah [@foo, p. 57].+^D+Chapter one++Blah.[1]++Blah.[2]++Chapter two++Blah.[3]++[1] A Book (Oxford University Press, 2010), 7.++[2] A Book, 8.++[3] A Book (Oxford University Press, 2010), 57.++```+
test/command/table-with-column-span.md view
@@ -315,11 +315,11 @@   <table:table-column table:style-name="Table1.P" />   <table:table-row>     <table:table-cell table:style-name="TableRowCell" office:value-type="string" table:number-columns-spanned="8">-      <text:p text:style-name="Table_20_Contents"><text:span text:style-name="T1">Octet+      <text:p text:style-name="Table_20_Contents"><text:span text:style-name="Strong_20_Emphasis">Octet       no. 1</text:span></text:p>     </table:table-cell>     <table:table-cell table:style-name="TableRowCell" office:value-type="string" table:number-columns-spanned="8">-      <text:p text:style-name="Table_20_Contents"><text:span text:style-name="T1">Octet+      <text:p text:style-name="Table_20_Contents"><text:span text:style-name="Strong_20_Emphasis">Octet       no. 2</text:span></text:p>     </table:table-cell>   </table:table-row>
+ test/command/typst-auto-identifiers.md view
@@ -0,0 +1,37 @@+With `auto_identifiers` enabled, headings without an explicit label get+automatic identifiers, with collisions disambiguated:++```+% pandoc -f typst+auto_identifiers -t native+= Introduction++Text.++== A Sub Section++= Introduction+^D+[ Header+    1 ( "introduction" , [] , [] ) [ Str "Introduction" ]+, Para [ Str "Text." ]+, Header+    2+    ( "a-sub-section" , [] , [] )+    [ Str "A" , Space , Str "Sub" , Space , Str "Section" ]+, Header+    1 ( "introduction-1" , [] , [] ) [ Str "Introduction" ]+]+```++The extension is off by default, so headings have no identifiers:++```+% pandoc -f typst -t native+= Introduction++Text.+^D+[ Header 1 ( "" , [] , [] ) [ Str "Introduction" ]+, Para [ Str "Text." ]+]+```
+ test/command/typst-image-alt.md view
@@ -0,0 +1,78 @@+```+% pandoc -f markdown-implicit_figures -t typst+![Alt text from inlines](image.png)+^D+#box(image("image.png", alt: "Alt text from inlines"))+```++```+% pandoc -f markdown-implicit_figures -t typst+![](image.png){alt="Explicit alt attribute"}+^D+#box(image("image.png", alt: "Explicit alt attribute"))+```++```+% pandoc -f markdown-implicit_figures -t typst+![Inlines ignored](image.png){alt="Explicit wins"}+^D+#box(image("image.png", alt: "Explicit wins"))+```++```+% pandoc -f markdown-implicit_figures -t typst+![](image.png)+^D+#box(image("image.png"))+```++```+% pandoc -f markdown-implicit_figures -t typst+![Inlines ignored for decorative](image.png){alt=""}+^D+#box(image("image.png"))+```++```+% pandoc -t typst+![Caption text](image.png){alt="Alt text describing the image"}++^D+#figure(image("image.png", alt: "Alt text describing the image"),+  caption: [+    Caption text+  ]+)+```++```+% pandoc -t typst+![Caption only](image.png)++^D+#figure(image("image.png", alt: "Caption only"),+  caption: [+    Caption only+  ]+)+```++```+% pandoc -f markdown -t typst+![Caption](test.png){alt="A \"quoted\" phrase and C:\\path\\file"}+^D+#figure(image("test.png", alt: "A \"quoted\" phrase and C:\\path\\file"),+  caption: [+    Caption+  ]+)++```++```+% pandoc -f html -t typst+<img src="data:image/png;base64,iVBORw0KGgo=" alt="A small red dot">+^D+#box(image(bytes((137,80,78,71,13,10,26,10)), alt: "A small red dot"))++```
+ test/command/typst-images.md view
@@ -0,0 +1,32 @@+```+% pandoc -t typst+![dot](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAC4jAAAuIwF4pT92AAAASUlEQVQYGa3OWwoAIAgEQNf739k0EjVCfxKCHtMqiEh0jcWjOKBAkQjPe7MFdun/IbRdDNb05nvolzWzEx0DdozK96W1PzjNHxcgphkBs9CoHwAAAABJRU5ErkJggg==){width=1in}+^D+#figure(image(bytes((137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,10,0,0,0,10,8,6,0,0,0,141,50,207,189,0,0,0,9,112,72,89,115,0,0,46,35,0,0,46,35,1,120,165,63,118,0,0,0,73,73,68,65,84,24,25,173,206,91,10,0,32,8,4,64,215,251,223,217,52,18,53,66,127,18,130,30,211,42,136,72,116,141,197,163,56,160,64,145,8,207,123,179,5,118,233,255,33,180,93,12,214,244,230,123,232,151,53,179,19,29,3,118,140,202,247,165,181,63,56,205,31,23,32,166,25,1,179,208,168,31,0,0,0,0,73,69,78,68,174,66,96,130)), width: 1in, alt: "dot"),+  caption: [+    dot+  ]+)+```++```+% pandoc -t typst+![dot](dot.png){width="1in"}+^D+#figure(image("dot.png", width: 1in, alt: "dot"),+  caption: [+    dot+  ]+)+```++```+% pandoc -t typst+![chicken](data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%20100%22%20aria-label%3D%22Chicken%22%3E%20%3Cpath%20d%3D%22M76.5%2033.3l-8.3-6.6%204-5c-1.3-2-1.3-4.7.1-6.6%203.4-3.8%208.7-2%2010.2%202.2%204.5.7%207.5%205.4%204.4%209.4a5.7%205.7%200%2001-6.4%201.6zM73%2026.2l3%202.4%203.8-4.7c1.3%201%203.5%202%204.5.7%202.1-2.9-1.5-5.4-4.7-3.5%201.2-4.6-2.7-6.2-4.5-3.9-.7%202.2.2%203%201.7%204.2z%22%2F%3E%20%3Cpath%20d%3D%22M54%2072.3a19.1%2019.1%200%2001-19.2-17.8%2021.4%2021.4%200%20014.7-15.2c3.5-4.3%208.4-7.1%2013.7-8l3.1-.1c8.2-.9%2012.9-5.5%2013-5.6l1-1%208.2%206.5-1%201.3c-3.3%204-2.8%2011.3-2.5%2014.2a21.5%2021.5%200%2001-4.4%2017.5%2021.2%2021.2%200%2001-16.5%208.2zM70.6%2029a27%2027%200%2001-14%205.5l-3%20.2a18%2018%200%2000-11.3%206.7%2018%2018%200%2000-4%2012.8%2016%2016%200%200015.9%2014.7c5.4%200%2010.4-2.5%2014-6.9A18%2018%200%200072%2049.4c0-.8-.2-1.6-.3-2.2-.5-4-.7-10.7%202.1-15.5z%22%2F%3E%20%3Cpath%20d%3D%22M46%2087C22.6%2087%20.5%2087%20.5%2066.8c0-19%2020.4-34.6%2045.5-34.6%201.2%200%202.5%200%203.7.2%2010.1.6%209.7-.1.5%203.2a18.3%2018.3%200%2000-12%2018.6%2016%2016%200%200015.9%2014.7c5.4%200%2010.4-2.5%2014-6.9A18%2018%200%200072%2049.4c-.6-4-.4-7.4-.2-11.3a35.8%2035.8%200%200119.5%2026A11.7%2011.7%200%200187.8%2087H46zm-2.8-51.3c-22%201-39.4%2014.6-39.4%2031%200%2015.8%2016%2016.9%2042.2%2016.9h41.8c4.6%200%208.4-3.8%208.4-8.4-.4-4.8-3.2-7.7-8.1-8.4-.3-10.4-7.4-18.4-13.3-22.7.1%202%20.5%204.3.7%206.1%200%205-1.6%2010-4.8%2014A21.2%2021.2%200%200154%2072.3a19.1%2019.1%200%2001-19.3-17.8%2021.4%2021.4%200%20018.4-18.8z%22%2F%3E%20%3C%2Fsvg%3E)+^D+#figure(image(bytes("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" aria-label=\"Chicken\"> <path d=\"M76.5 33.3l-8.3-6.6 4-5c-1.3-2-1.3-4.7.1-6.6 3.4-3.8 8.7-2 10.2 2.2 4.5.7 7.5 5.4 4.4 9.4a5.7 5.7 0 01-6.4 1.6zM73 26.2l3 2.4 3.8-4.7c1.3 1 3.5 2 4.5.7 2.1-2.9-1.5-5.4-4.7-3.5 1.2-4.6-2.7-6.2-4.5-3.9-.7 2.2.2 3 1.7 4.2z\"/> <path d=\"M54 72.3a19.1 19.1 0 01-19.2-17.8 21.4 21.4 0 014.7-15.2c3.5-4.3 8.4-7.1 13.7-8l3.1-.1c8.2-.9 12.9-5.5 13-5.6l1-1 8.2 6.5-1 1.3c-3.3 4-2.8 11.3-2.5 14.2a21.5 21.5 0 01-4.4 17.5 21.2 21.2 0 01-16.5 8.2zM70.6 29a27 27 0 01-14 5.5l-3 .2a18 18 0 00-11.3 6.7 18 18 0 00-4 12.8 16 16 0 0015.9 14.7c5.4 0 10.4-2.5 14-6.9A18 18 0 0072 49.4c0-.8-.2-1.6-.3-2.2-.5-4-.7-10.7 2.1-15.5z\"/> <path d=\"M46 87C22.6 87 .5 87 .5 66.8c0-19 20.4-34.6 45.5-34.6 1.2 0 2.5 0 3.7.2 10.1.6 9.7-.1.5 3.2a18.3 18.3 0 00-12 18.6 16 16 0 0015.9 14.7c5.4 0 10.4-2.5 14-6.9A18 18 0 0072 49.4c-.6-4-.4-7.4-.2-11.3a35.8 35.8 0 0119.5 26A11.7 11.7 0 0187.8 87H46zm-2.8-51.3c-22 1-39.4 14.6-39.4 31 0 15.8 16 16.9 42.2 16.9h41.8c4.6 0 8.4-3.8 8.4-8.4-.4-4.8-3.2-7.7-8.1-8.4-.3-10.4-7.4-18.4-13.3-22.7.1 2 .5 4.3.7 6.1 0 5-1.6 10-4.8 14A21.2 21.2 0 0154 72.3a19.1 19.1 0 01-19.3-17.8 21.4 21.4 0 018.4-18.8z\"/> </svg>"), alt: "chicken"),+  caption: [+    chicken+  ]+)+```
test/command/typst-property-output.md view
@@ -26,7 +26,8 @@ <div typst:text:fill="purple">foo</div> ^D #block[-#set text(fill: purple); foo+#set text(fill: purple);+foo ] ``` @@ -63,7 +64,7 @@ </table> ^D #figure(-  align(center)[#set text(fill: orange); #table(+  align(center)[#set text(fill: orange);#table(     columns: 2,     align: (auto,auto,),     [A], [B],@@ -98,7 +99,8 @@   align(center)[#table(     columns: 2,     align: (auto,auto,),-    [A], [#set text(fill: fuchsia); B],+    [A], [#set text(fill: fuchsia);+    B],   )]   , kind: table   )@@ -114,7 +116,8 @@   align(center)[#table(     columns: 2,     align: (auto,center,),-    [A], table.cell(align: center)[#set text(fill: maroon); B],+    [A], table.cell(align: center)[#set text(fill: maroon);+    B],   )]   , kind: table   )@@ -169,7 +172,7 @@ ^D Paragraph before. -#{set text(size: 3em); table(+#{set text(size: 3em);table(   columns: 3,   align: (auto,auto,auto,),   [A], [B], [C],@@ -195,7 +198,7 @@ Paragraph before.  #figure(-  align(center)[#set text(size: 3em); #table(+  align(center)[#set text(size: 3em);#table(     columns: 3,     align: (auto,auto,auto,),     [A], [B], [C],
test/djot-reader.native view
@@ -1175,11 +1175,14 @@           , Code ( "" , [] , [] ) "$"           , Str ","           , Space-          , Code ( "" , [] , [] ) "\\`, "-          , Str "$"-          , Code ( "" , [] , [] ) ", "-          , Str "<html>"-          , Code ( "" , [] , [] ) "."+          , Code ( "" , [] , [] ) "\\"+          , Str ","+          , Space+          , Code ( "" , [] , [] ) "\\$"+          , Str ","+          , Space+          , Code ( "" , [] , [] ) "<html>"+          , Str "."           ]       , Para           [ Span
test/docbook-reader.docbook view
@@ -27,9 +27,9 @@   This is a set of tests for pandoc. Most of them are adapted from John   Gruber’s markdown test suite. </para>-<sect1 id="headers">+<sect1 id="headers" role="sect1role">   <title>Headers</title>-  <sect2 id="level-2-with-an-embedded-link">+  <sect2 id="level-2-with-an-embedded-link" role="sect2role">     <title>Level 2 with an <ulink url="/url">embedded link</ulink></title>     <sect3 id="level-3-with-emphasis">       <title>Level 3 with <emphasis>emphasis</emphasis></title>@@ -74,6 +74,9 @@   <para>     Here’s a regular paragraph.   </para>+  <para role="pararole">+    And here’s a regular paragraph with a role.+  </para>   <para>     In Markdown 1.0.0 and earlier. Version 8. This line turns into a list     item. Because a hard-wrapped line in the middle of a paragraph looked like@@ -93,6 +96,11 @@       This is a block quote. It is pretty short.     </para>   </blockquote>+  <blockquote role="roleblockquote">+    <para>+      This is a block quote with a role.+    </para>+  </blockquote>   <blockquote>     <para>       Code in a block quote:@@ -234,6 +242,26 @@       </listitem>     </orderedlist>     <para>+      with role:+    </para>+    <orderedlist role="listrole" numeration="arabic">+      <listitem>+        <para>+          First+        </para>+      </listitem>+      <listitem>+        <para>+          Second+        </para>+      </listitem>+      <listitem>+        <para>+          Third+        </para>+      </listitem>+    </orderedlist>+    <para>       and tight:     </para>     <orderedlist spacing="compact" numeration="arabic">@@ -703,6 +731,12 @@     So is <emphasis role="strong"><emphasis>this</emphasis></emphasis> word.   </para>   <para>+    So is <emphasis role="emphasisrole"><emphasis>this</emphasis></emphasis> word with a role.+  </para>+  <para>+    So is <phrase role="phraserole"><phrase>this</phrase></phrase> phrase with a role.+  </para>+  <para>     This is code: <literal>&gt;</literal>, <literal>$</literal>,     <literal>\</literal>, <literal>\$</literal>,     <literal>&lt;html&gt;</literal>.@@ -1408,7 +1442,7 @@   <para>     Table with attributes   </para>-  <table xml:id="mytableid1" class="mytableclass1 mytableclass2" tabstyle="mytabstyle1">+  <table xml:id="mytableid1" class="mytableclass1 mytableclass2" tabstyle="mytabstyle1" role="tablerole1">     <title>       Attribute table caption     </title>@@ -1444,7 +1478,7 @@   <para>     Table with attributes, without caption   </para>-  <informaltable xml:id="mytableid2" class="mytableclass3 mytableclass4" tabstyle="mytabstyle2">+  <informaltable xml:id="mytableid2" class="mytableclass3 mytableclass4" tabstyle="mytabstyle2" role="tablerole2">     <tgroup>       <thead> 	<th>
test/docbook-reader.native view
@@ -62,10 +62,16 @@       , Space       , Str "suite."       ]-  , Header 1 ( "headers" , [] , [] ) [ Str "Headers" ]   , Header+      1+      ( "headers" , [] , [ ( "role" , "sect1role" ) ] )+      [ Str "Headers" ]+  , Header       2-      ( "level-2-with-an-embedded-link" , [] , [] )+      ( "level-2-with-an-embedded-link"+      , []+      , [ ( "role" , "sect2role" ) ]+      )       [ Str "Level"       , Space       , Str "2"@@ -151,6 +157,29 @@       , Space       , Str "paragraph."       ]+  , Div+      ( ""+      , []+      , [ ( "wrapper" , "1" ) , ( "role" , "pararole" ) ]+      )+      [ Para+          [ Str "And"+          , Space+          , Str "here\8217s"+          , Space+          , Str "a"+          , Space+          , Str "regular"+          , Space+          , Str "paragraph"+          , Space+          , Str "with"+          , Space+          , Str "a"+          , Space+          , Str "role."+          ]+      ]   , Para       [ Str "In"       , Space@@ -251,6 +280,31 @@           , Str "short."           ]       ]+  , Div+      ( ""+      , []+      , [ ( "wrapper" , "1" ) , ( "role" , "roleblockquote" ) ]+      )+      [ BlockQuote+          [ Para+              [ Str "This"+              , Space+              , Str "is"+              , Space+              , Str "a"+              , Space+              , Str "block"+              , Space+              , Str "quote"+              , Space+              , Str "with"+              , Space+              , Str "a"+              , Space+              , Str "role."+              ]+          ]+      ]   , BlockQuote       [ Para           [ Str "Code"@@ -348,6 +402,19 @@       , [ Para [ Str "Second" ] ]       , [ Para [ Str "Third" ] ]       ]+  , Para [ Str "with" , Space , Str "role:" ]+  , Div+      ( ""+      , []+      , [ ( "wrapper" , "1" ) , ( "role" , "listrole" ) ]+      )+      [ OrderedList+          ( 1 , Decimal , DefaultDelim )+          [ [ Para [ Str "First" ] ]+          , [ Para [ Str "Second" ] ]+          , [ Para [ Str "Third" ] ]+          ]+      ]   , Para [ Str "and" , Space , Str "tight:" ]   , OrderedList       ( 1 , Decimal , DefaultDelim )@@ -932,6 +999,38 @@       , Str "word."       ]   , Para+      [ Str "So"+      , Space+      , Str "is"+      , Space+      , Emph [ Emph [ Str "this" ] ]+      , Space+      , Str "word"+      , Space+      , Str "with"+      , Space+      , Str "a"+      , Space+      , Str "role."+      ]+  , Para+      [ Str "So"+      , Space+      , Str "is"+      , Space+      , Span+          ( "" , [ "phraserole" ] , [ ( "role" , "phraserole" ) ] )+          [ Str "this" ]+      , Space+      , Str "phrase"+      , Space+      , Str "with"+      , Space+      , Str "a"+      , Space+      , Str "role."+      ]+  , Para       [ Str "This"       , Space       , Str "is"@@ -2570,7 +2669,9 @@   , Table       ( "mytableid1"       , [ "mytableclass1" , "mytableclass2" ]-      , [ ( "custom-style" , "mytabstyle1" ) ]+      , [ ( "role" , "tablerole1" )+        , ( "custom-style" , "mytabstyle1" )+        ]       )       (Caption          Nothing@@ -2636,7 +2737,9 @@   , Table       ( "mytableid2"       , [ "mytableclass3" , "mytableclass4" ]-      , [ ( "custom-style" , "mytabstyle2" ) ]+      , [ ( "role" , "tablerole2" )+        , ( "custom-style" , "mytabstyle2" )+        ]       )       (Caption Nothing [])       [ ( AlignDefault , ColWidthDefault )
+ test/docx/german-reference.docx view

binary file changed (absent → 10405 bytes)

+ test/docx/image_with_textbox_caption.docx view

binary file changed (absent → 19882 bytes)

+ test/docx/image_with_textbox_caption.native view
@@ -0,0 +1,44 @@+[ Figure+    ( "" , [] , [] )+    (Caption+       Nothing+       [ Para+           [ Str "1"+           , Space+           , Str "Daniel"+           , Space+           , Str "Schliebner:"+           , Space+           , Str "Cantor'sches"+           , Space+           , Str "Diagonalverfahren."+           , Space+           , Str "Von"+           , Space+           , Str "Mengen,"+           , Space+           , Str "Unendlichkeiten"+           , Space+           , Str "und"+           , Space+           , Str "Wahnsinn,"+           , Space+           , Str "Pdf:"+           , Space+           , Str+               "https://www2.informatik.hu-berlin.de/~kossahl/Uni/Ma1/Cantor.pdf"+           ]+       ])+    [ Plain+        [ Image+            ( ""+            , []+            , [ ( "width" , "2.3680555555555554in" )+              , ( "height" , "0.9340277777777778in" )+              ]+            )+            []+            ( "media/image1.emf" , "" )+        ]+    ]+]
+ test/docx/lists_restart_8367.docx view

binary file changed (absent → 22718 bytes)

+ test/docx/lists_restart_8367.native view
@@ -0,0 +1,13 @@+[Header 1 ("section-1",[],[]) [Str "Section",Space,Str "1"]+,OrderedList (1,Decimal,Period)+ [[Para [Str "Item",Space,Str "1"]]+ ,[Para [Str "Item",Space,Str "2"]]+ ,[Para [Str "Item",Space,Str "3"]]]+,Para [Str "Conclusion"]+,Header 1 ("section-2",[],[]) [Str "Section",Space,Str "2"]+,OrderedList (1,Decimal,Period)+ [[Para [Str "Item",Space,Str "1"]]+ ,[Para [Str "Item",Space,Str "2"]]+ ,[Para [Str "Item",Space,Str "3"]]+ ,[Para [Str "Item",Space,Str "4"]]]+,Para [Str "Conclusion"]]
+ test/docx/ns0-reference.docx view

binary file changed (absent → 2289 bytes)

+ test/docx/table_gridbefore.docx view

binary file changed (absent → 13143 bytes)

+ test/docx/table_gridbefore.native view
@@ -0,0 +1,823 @@+[ Table+    ( "" , [] , [] )+    (Caption Nothing [])+    [ ( AlignDefault , ColWidth 7.883369330453563e-3 )+    , ( AlignDefault , ColWidth 3.0669546436285097e-2 )+    , ( AlignDefault , ColWidth 3.0669546436285097e-2 )+    , ( AlignDefault , ColWidth 3.0669546436285097e-2 )+    , ( AlignDefault , ColWidth 3.0669546436285097e-2 )+    , ( AlignDefault , ColWidth 3.0669546436285097e-2 )+    , ( AlignDefault , ColWidth 3.0669546436285097e-2 )+    , ( AlignDefault , ColWidth 3.0669546436285097e-2 )+    , ( AlignDefault , ColWidth 3.0669546436285097e-2 )+    , ( AlignDefault , ColWidth 3.0669546436285097e-2 )+    , ( AlignDefault , ColWidth 0.42861771058315334 )+    ]+    (TableHead+       ( "" , [] , [] )+       [ Row+           ( "" , [] , [] )+           [ Cell+               ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+           , Cell+               ( "" , [] , [] )+               AlignDefault+               (RowSpan 1)+               (ColSpan 8)+               [ Plain [ Str "Bits" ] ]+           , Cell+               ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+           , Cell+               ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+           ]+       ])+    [ TableBody+        ( "" , [] , [] )+        (RowHeadColumns 0)+        []+        [ Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "8" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "7" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "6" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "5" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "4" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "3" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "2" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "TEXT" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "BINARY" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "HYPERLINKS" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "FILEURL" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "LOCATION" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "ENHANCED" , Space , Str "STATUS" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain+                    [ Str "Value"+                    , Space+                    , Str "allocated"+                    , Space+                    , Str "for"+                    , Space+                    , Str "use"+                    , Space+                    , Str "in"+                    , Space+                    , Str "interworking"+                    , Space+                    , Str "(NOTE)"+                    ]+                ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "LOCATION" , Space , Str "ALTITUDE" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "LOCATION" , Space , Str "TIMESTAMP" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 2)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "0" ] ]+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "CODED" , Space , Str "TEXT" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 10)+                [ Plain+                    [ Str "All"+                    , Space+                    , Str "other"+                    , Space+                    , Str "values"+                    , Space+                    , Str "are"+                    , Space+                    , Str "reserved."+                    ]+                ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 10)+                [ Plain+                    [ Str "NOTE:"+                    , Space+                    , Str "Usage"+                    , Space+                    , Str "of"+                    , Space+                    , Str "this"+                    , Space+                    , Str "value"+                    , Space+                    , Str "is"+                    , Space+                    , Str "described"+                    , Space+                    , Str "in"+                    , Space+                    , Str "3GPP\160TS\160\&29.582\160[48]."+                    ]+                ]+            ]+        ]+    ]+    (TableFoot ( "" , [] , [] ) [])+]
+ test/docx/textbox_image.docx view

binary file changed (absent → 40379 bytes)

+ test/docx/textbox_image.native view
@@ -0,0 +1,30 @@+[ Para+    [ Str "The"+    , Space+    , Str "image"+    , Space+    , Str "is"+    , Space+    , Str "below."+    ]+, Para+    [ Image+        ( ""+        , []+        , [ ( "width" , "4.543038057742782in" )+          , ( "height" , "2.9166666666666665in" )+          ]+        )+        []+        ( "media/image1.png" , "" )+    ]+, Para+    [ Str "The"+    , Space+    , Str "image"+    , Space+    , Str "is"+    , Space+    , Str "above."+    ]+]
+ test/docx/textbox_image_duplicate_encoding.docx view

binary file changed (absent → 36750 bytes)

+ test/docx/textbox_image_duplicate_encoding.native view
@@ -0,0 +1,30 @@+[ Para+    [ Str "The"+    , Space+    , Str "image"+    , Space+    , Str "is"+    , Space+    , Str "below."+    ]+, Para+    [ Image+        ( ""+        , []+        , [ ( "width" , "4.543038057742782in" )+          , ( "height" , "2.9166666666666665in" )+          ]+        )+        []+        ( "media/image1.png" , "" )+    ]+, Para+    [ Str "The"+    , Space+    , Str "image"+    , Space+    , Str "is"+    , Space+    , Str "above."+    ]+]
test/man-reader.native view
@@ -42,11 +42,11 @@       , Space       , Str "*"       ]-  , Header 1 ( "" , [] , [] ) [ Str "Headers" ]+  , Header 1 ( "headers" , [] , [] ) [ Str "Headers" ]   , Header-      1 ( "" , [] , [] ) [ Str "Level" , Space , Str "1" ]+      1 ( "level-1" , [] , [] ) [ Str "Level" , Space , Str "1" ]   , Header-      2 ( "" , [] , [] ) [ Str "Level" , Space , Str "2" ]+      2 ( "level-2" , [] , [] ) [ Str "Level" , Space , Str "2" ]   , Para       [ Str "*"       , Space@@ -58,7 +58,7 @@       , Space       , Str "*"       ]-  , Header 1 ( "" , [] , [] ) [ Str "Paragraphs" ]+  , Header 1 ( "paragraphs" , [] , [] ) [ Str "Paragraphs" ]   , Para       [ Str "Here's"       , Space@@ -159,7 +159,9 @@       , Str "*"       ]   , Header-      1 ( "" , [] , [] ) [ Str "Block" , Space , Str "Quotes" ]+      1+      ( "block-quotes" , [] , [] )+      [ Str "Block" , Space , Str "Quotes" ]   , Para       [ Str "Code"       , Space@@ -182,7 +184,9 @@       , [ Para [ Str "item" , Space , Str "two" ] ]       ]   , Header-      1 ( "" , [] , [] ) [ Str "Code" , Space , Str "Blocks" ]+      1+      ( "code-blocks" , [] , [] )+      [ Str "Code" , Space , Str "Blocks" ]   , Para [ Str "Code:" ]   , CodeBlock       ( "" , [] , [] )@@ -201,22 +205,22 @@       , Space       , Str "*"       ]-  , Header 1 ( "" , [] , [] ) [ Str "Lists" ]-  , Header 2 ( "" , [] , [] ) [ Str "Unordered" ]+  , Header 1 ( "lists" , [] , [] ) [ Str "Lists" ]+  , Header 2 ( "unordered" , [] , [] ) [ Str "Unordered" ]   , Para [ Str "Asterisks:" ]   , BulletList       [ [ Para [ Str "asterisk" , Space , Str "1" ] ]       , [ Para [ Str "asterisk" , Space , Str "2" ] ]       , [ Para [ Str "asterisk" , Space , Str "3" ] ]       ]-  , Header 2 ( "" , [] , [] ) [ Str "Ordered" ]+  , Header 2 ( "ordered" , [] , [] ) [ Str "Ordered" ]   , OrderedList       ( 1 , Decimal , Period )       [ [ Para [ Str "First" ] ]       , [ Para [ Str "Second" ] ]       , [ Para [ Str "Third" ] ]       ]-  , Header 2 ( "" , [] , [] ) [ Str "Nested" ]+  , Header 2 ( "nested" , [] , [] ) [ Str "Nested" ]   , BulletList       [ [ Para [ Str "Tab" ]         , BulletList@@ -254,7 +258,7 @@       ]   , Header       2-      ( "" , [] , [] )+      ( "different-styles" , [] , [] )       [ Str "different" , Space , Str "styles:" ]   , OrderedList       ( 1 , UpperAlpha , Period )@@ -292,7 +296,7 @@             ]         ]       ]-  , Header 2 ( "" , [] , [] ) [ Str "Ordered" ]+  , Header 2 ( "ordered-1" , [] , [] ) [ Str "Ordered" ]   , Para [ Str "Definition" , Space , Str "lists" ]   , DefinitionList       [ ( [ Strong [ Str "term1" ] ]@@ -323,7 +327,7 @@       ]   , Header       1-      ( "" , [] , [] )+      ( "special-characters" , [] , [] )       [ Str "Special" , Space , Str "Characters" ]   , Para       [ Str "AT&T"@@ -364,7 +368,7 @@   , Para [ Str "Bang:" , Space , Str "!" ]   , Para [ Str "Plus:" , Space , Str "+" ]   , Para [ Str "Minus:" , Space , Str "-" ]-  , Header 1 ( "" , [] , [] ) [ Str "Links" ]+  , Header 1 ( "links" , [] , [] ) [ Str "Links" ]   , Para       [ Link           ( "" , [] , [] )@@ -379,7 +383,7 @@           ( "mailto:me@example.com" , "" )       , Str "."       ]-  , Header 1 ( "" , [] , [] ) [ Str "Macros" ]+  , Header 1 ( "macros" , [] , [] ) [ Str "Macros" ]   , Para       [ Strong [ Str "Me" , Space , Str "Myself" ]       , Space@@ -406,7 +410,7 @@       , Strong [ Str "Author" ]       , Str "."       ]-  , Header 1 ( "" , [] , [] ) [ Str "Tables" ]+  , Header 1 ( "tables" , [] , [] ) [ Str "Tables" ]   , Table       ( "" , [] , [] )       (Caption Nothing [])
+ test/odt/native/imageRelative.native view
@@ -0,0 +1,10 @@+[ Para+    [ Image+        ( ""+        , []+        , [ ( "width" , "5.292cm" ) , ( "height" , "5.292cm" ) ]+        )+        []+        ( "../../lalune.jpg" , "" )+    ]+]
+ test/odt/native/preformattedText.native view
@@ -0,0 +1,4 @@+[ CodeBlock+    ( "" , [] , [] )+    "void main() {\n    printf(\"Hello world\");\n}"+]
+ test/odt/native/preformattedTextParentStyle.native view
@@ -0,0 +1,4 @@+[ CodeBlock+    ( "" , [] , [] )+    "void main() {\n    printf(\"Hello world\");\n}"+]
+ test/odt/native/sourceText.native view
@@ -0,0 +1,11 @@+[ Header+    1+    ( "test-foo" , [] , [] )+    [ Span ( "anchor" , [] , [] ) []+    , Str "Test"+    , Space+    , Code ( "" , [] , [] ) "foo"+    ]+, Para+    [ Str "Hello" , Space , Code ( "" , [] , [] ) "world" ]+]
+ test/odt/native/tableWithSpans.native view
@@ -0,0 +1,134 @@+[ Table+    ( "" , [] , [] )+    (Caption Nothing [])+    [ ( AlignDefault , ColWidthDefault )+    , ( AlignDefault , ColWidthDefault )+    , ( AlignDefault , ColWidthDefault )+    ]+    (TableHead+       ( "" , [] , [] )+       [ Row+           ( "" , [] , [] )+           [ Cell+               ( "" , [] , [] )+               AlignDefault+               (RowSpan 2)+               (ColSpan 1)+               [ Plain+                   [ Str "H1"+                   , Space+                   , Str "Rowspan"+                   , Space+                   , Str "2"+                   ]+               ]+           , Cell+               ( "" , [] , [] )+               AlignDefault+               (RowSpan 1)+               (ColSpan 1)+               [ Plain [ Str "H1-2" ] ]+           , Cell+               ( "" , [] , [] )+               AlignDefault+               (RowSpan 1)+               (ColSpan 1)+               [ Plain [ Str "H1-3" ] ]+           ]+       , Row+           ( "" , [] , [] )+           [ Cell+               ( "" , [] , [] )+               AlignDefault+               (RowSpan 1)+               (ColSpan 2)+               [ Plain [ Str "H2-2/3" ] ]+           ]+       ])+    [ TableBody+        ( "" , [] , [] )+        (RowHeadColumns 0)+        []+        [ Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "B1-1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "B1-2" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 3)+                (ColSpan 1)+                [ Plain [ Str "Rowspan" , Space , Str "3" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "B2-1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "B2-2" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 2)+                [ Plain [ Str "Columnspan" , Space , Str "2" ] ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "B4-1" ] ]+            , Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 2)+                (ColSpan 2)+                [ Plain+                    [ Str "Columnspan"+                    , Space+                    , Str "&"+                    , Space+                    , Str "Rowspan"+                    , Space+                    , Str "2"+                    ]+                ]+            ]+        , Row+            ( "" , [] , [] )+            [ Cell+                ( "" , [] , [] )+                AlignDefault+                (RowSpan 1)+                (ColSpan 1)+                [ Plain [ Str "B5-1" ] ]+            ]+        ]+    ]+    (TableFoot ( "" , [] , [] ) [])+, Para []+]
+ test/odt/odt/imageRelative.odt view

binary file changed (absent → 16213 bytes)

+ test/odt/odt/preformattedText.odt view

binary file changed (absent → 7342 bytes)

+ test/odt/odt/preformattedTextParentStyle.odt view

binary file changed (absent → 7150 bytes)

+ test/odt/odt/sourceText.odt view

binary file changed (absent → 6805 bytes)

+ test/odt/odt/tableWithSpans.odt view

binary file changed (absent → 10695 bytes)

test/pptx/comparison/non-text-first/output.pptx view

binary file changed (44459 → 44499 bytes)

test/pptx/comparison/non-text-first/templated.pptx view

binary file changed (57553 → 57591 bytes)

test/pptx/footer/basic/output.pptx view

binary file changed (52718 → 52690 bytes)

test/pptx/footer/fixed-date/output.pptx view

binary file changed (51344 → 51318 bytes)

test/pptx/footer/higher-slide-number/output.pptx view

binary file changed (52729 → 52701 bytes)

test/pptx/footer/no-title-slide/output.pptx view

binary file changed (52303 → 52277 bytes)

+ test/pptx/metadata-speaker-notes/input.native view
@@ -0,0 +1,3 @@+Pandoc (Meta {unMeta = fromList [("author",MetaInlines [Str "Jesse",Space,Str "Rosenthal"]),("notes",MetaBlocks [Para [Str "These",Space,Str "are",Space,Str "speaker",Space,Str "notes",Space,Str "from",Space,Str "metadata."]]),("title",MetaInlines [Str "Testing"])]})+[Header 1 ("a-header",[],[]) [Str "A",Space,Str "header"]+,Para [Str "And",Space,Str "a",Space,Str "new",Space,Str "slide."]]
+ test/pptx/metadata-speaker-notes/output.pptx view

binary file changed (absent → 31689 bytes)

+ test/pptx/metadata-speaker-notes/templated.pptx view

binary file changed (absent → 44773 bytes)

test/pptx/slide-level-0/h1-h2-with-table/output.pptx view

binary file changed (27885 → 27849 bytes)

test/pptx/slide-level-0/h1-h2-with-table/templated.pptx view

binary file changed (40979 → 40948 bytes)

+ test/pptx/table-with-surrounding-content/input.native view
@@ -0,0 +1,34 @@+[Header 2 ("slide-with-bullets-and-table",[],[]) [Str "Slide",Space,Str "with",Space,Str "Bullets",Space,Str "and",Space,Str "Table"]+,BulletList+ [[Plain [Str "First",Space,Str "bullet",Space,Str "point",Space,Str "before",Space,Str "the",Space,Str "table"]]+ ,[Plain [Str "Second",Space,Str "bullet",Space,Str "point",Space,Str "before",Space,Str "the",Space,Str "table"]]]+,Table ("",[],[]) (Caption Nothing [])+ [(AlignDefault,ColWidthDefault)+ ,(AlignDefault,ColWidthDefault)]+ (TableHead ("",[],[])+ [Row ("",[],[])+  [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)+   [Plain [Str "Column",Space,Str "A"]]+  ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)+   [Plain [Str "Column",Space,Str "B"]]]])+ [(TableBody ("",[],[]) (RowHeadColumns 0)+  []+  [Row ("",[],[])+   [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)+    [Plain [Str "Value",Space,Str "1"]]+   ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)+    [Plain [Str "Value",Space,Str "2"]]]+  ,Row ("",[],[])+   [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)+    [Plain [Str "Value",Space,Str "3"]]+   ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)+    [Plain [Str "Value",Space,Str "4"]]]])]+ (TableFoot ("",[],[]) [])+,BulletList+ [[Plain [Str "Third",Space,Str "bullet",Space,Str "point",Space,Str "after",Space,Str "the",Space,Str "table"]]+ ,[Plain [Str "Fourth",Space,Str "bullet",Space,Str "point",Space,Str "after",Space,Str "the",Space,Str "table"]]]+,Header 2 ("second-slide-for-reference",[],[]) [Str "Second",Space,Str "Slide",Space,Str "for",Space,Str "Reference"]+,BulletList+ [[Plain [Str "This",Space,Str "slide",Space,Str "has",Space,Str "just",Space,Str "bullets"]]+ ,[Plain [Str "No",Space,Str "table",Space,Str "here"]]+ ,[Plain [Str "Everything",Space,Str "stays",Space,Str "together"]]]]
+ test/pptx/table-with-surrounding-content/output.pptx view

binary file changed (absent → 28886 bytes)

+ test/pptx/table-with-surrounding-content/templated.pptx view

binary file changed (absent → 41984 bytes)

+ test/rtf/list_legacy.native view
@@ -0,0 +1,14 @@+Pandoc+  Meta { unMeta = fromList [] }+  [ OrderedList+      ( 1 , Decimal , Period )+      [ [ Para [ Str "A" ] ]+      , [ Para [ Str "Numbered" ] ]+      , [ Para [ Str "List" ] ]+      ]+  , BulletList+      [ [ Para [ Str "A" ] ]+      , [ Para [ Str "Bulleted" ] ]+      , [ Para [ Str "List" ] ]+      ]+  ]
+ test/rtf/list_legacy.rtf view
@@ -0,0 +1,4 @@+{\rtf1\ansi\deff0{\fonttbl{\f0 Helvetica;}{\f2 Symbol;}{\f3 Symbol;}}+\plain\plain\f0\fs20\pard\ssparaaux0\s0{\pntext\pard\plain\f2\fs22 1.\tab}{\*\pn\pnlvlbody\pnstart1\pndec\ls3\ilvl0\pnhang{\pntxta \'2e}}\ls3\ilvl0\fi-360\li360\ql\plain\f0\fs20 A\par Numbered\par List\par+\pard\ssparaaux0\s0{\pntext\pard\plain\f3\fs22 \'b7\tab}{\*\pn\pnlvlblt\ls5\ilvl0\pnhang\pnf3{\pntxtb \'b7}}\ls5\ilvl0\fi-360\li360\ql\plain\f0\fs20 A\par Bulleted\par List\par+}
+ test/rtf/list_multiparagraph.native view
@@ -0,0 +1,25 @@+Pandoc+  Meta { unMeta = fromList [] }+  [ BulletList+      [ [ Para+            [ Str "First"+            , Space+            , Str "item,"+            , Space+            , Str "paragraph"+            , Space+            , Str "one."+            ]+        , Para+            [ Str "First"+            , Space+            , Str "item,"+            , Space+            , Str "paragraph"+            , Space+            , Str "two."+            ]+        ]+      , [ Para [ Str "Second" , Space , Str "item." ] ]+      ]+  ]
+ test/rtf/list_multiparagraph.rtf view
@@ -0,0 +1,12 @@+{\rtf1\ansi\ansicpg1252+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}+{\colortbl;\red0\green0\blue0;}+{\*\listtable{\list\listtemplateid1{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}+\pard\li720\fi-360+\ls1\ilvl0 {\listtext\tab \u8226 \tab}First item, paragraph one.\par+\pard\li720\fi-360+\ls1\ilvl0 First item, paragraph two.\par+\pard\li720\fi-360+\ls1\ilvl0 {\listtext\tab \u8226 \tab}Second item.\par+}
test/s5-basic.html view
@@ -14,10 +14,13 @@     /* Default styles provided by pandoc.     ** See https://pandoc.org/MANUAL.html#variables-for-html for config info.     */-    code{white-space: pre-wrap;}     span.smallcaps{font-variant: small-caps;}-    div.columns{display: flex; gap: min(4vw, 1.5em);}-    div.column{flex: auto; overflow-x: auto;}+    div.columns{display: flex; gap: 1.5em;}+    div.column{flex: auto;}+    @media screen {+    div.columns{gap: min(4vw, 1.5em);}+    div.column{overflow-x: auto;}+    }     div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}     /* The extra [class] is a hack that increases specificity enough to        override a similar rule in reveal.js */
test/s5-fancy.html view
@@ -14,10 +14,13 @@     /* Default styles provided by pandoc.     ** See https://pandoc.org/MANUAL.html#variables-for-html for config info.     */-    code{white-space: pre-wrap;}     span.smallcaps{font-variant: small-caps;}-    div.columns{display: flex; gap: min(4vw, 1.5em);}-    div.column{flex: auto; overflow-x: auto;}+    div.columns{display: flex; gap: 1.5em;}+    div.column{flex: auto;}+    @media screen {+    div.columns{gap: min(4vw, 1.5em);}+    div.column{overflow-x: auto;}+    }     div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}     /* The extra [class] is a hack that increases specificity enough to        override a similar rule in reveal.js */@@ -40,7 +43,7 @@   <!-- S5 JS -->   <script src="s5/default/slides.js" type="text/javascript"></script>   <script defer=""-  src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js"+  src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js"   type="text/javascript"></script> </head> <body>
test/s5-inserts.html view
@@ -3,7 +3,7 @@ <head>   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   <meta http-equiv="Content-Style-Type" content="text/css" />-  <meta name="generator" content="pandoc" />+  <meta name="generator" content="pandoc " />   <meta name="author" content="Sam Smith" />   <meta name="author" content="Jen Jones" />   <meta name="date" content="2006-07-15" />@@ -12,10 +12,13 @@     /* Default styles provided by pandoc.     ** See https://pandoc.org/MANUAL.html#variables-for-html for config info.     */-    code{white-space: pre-wrap;}     span.smallcaps{font-variant: small-caps;}-    div.columns{display: flex; gap: min(4vw, 1.5em);}-    div.column{flex: auto; overflow-x: auto;}+    div.columns{display: flex; gap: 1.5em;}+    div.column{flex: auto;}+    @media screen {+    div.columns{gap: min(4vw, 1.5em);}+    div.column{overflow-x: auto;}+    }     div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}     /* The extra [class] is a hack that increases specificity enough to        override a similar rule in reveal.js */
test/tables.rtf view
@@ -1,16 +1,16 @@-{\pard \ql \f0 \sa180 \li0 \fi0 Simple table with caption:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Simple table with caption:\par} { \trowd \trgaph120 \clbrdrb\brdrs\cellx2160\clbrdrb\brdrs\cellx4320\clbrdrb\brdrs\cellx6480\clbrdrb\brdrs\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 Right\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Left\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Center\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 Center\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Default\par} \cell} } \intbl\row}@@ -19,13 +19,13 @@ \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell} } \intbl\row}@@ -34,13 +34,13 @@ \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell} } \intbl\row}@@ -49,30 +49,30 @@ \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell} } \intbl\row}-{\pard \ql \f0 \sa180 \li0 \fi0 Demonstration of simple table syntax.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Simple table without caption:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Demonstration of simple table syntax.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Simple table without caption:\par} { \trowd \trgaph120 \clbrdrb\brdrs\cellx2160\clbrdrb\brdrs\cellx4320\clbrdrb\brdrs\cellx6480\clbrdrb\brdrs\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 Right\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Left\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Center\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 Center\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Default\par} \cell} } \intbl\row}@@ -81,13 +81,13 @@ \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell} } \intbl\row}@@ -96,13 +96,13 @@ \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell} } \intbl\row}@@ -111,30 +111,30 @@ \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell} } \intbl\row}-{\pard \ql \f0 \sa180 \li0 \fi0 \par}-{\pard \ql \f0 \sa180 \li0 \fi0 Simple table indented two spaces:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Simple table indented two spaces:\par} { \trowd \trgaph120 \clbrdrb\brdrs\cellx2160\clbrdrb\brdrs\cellx4320\clbrdrb\brdrs\cellx6480\clbrdrb\brdrs\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 Right\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Left\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Center\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 Center\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Default\par} \cell} } \intbl\row}@@ -143,13 +143,13 @@ \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell} } \intbl\row}@@ -158,13 +158,13 @@ \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell} } \intbl\row}@@ -173,30 +173,30 @@ \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell} } \intbl\row}-{\pard \ql \f0 \sa180 \li0 \fi0 Demonstration of simple table syntax.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Multiline table with caption:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Demonstration of simple table syntax.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Multiline table with caption:\par} { \trowd \trgaph120 \clbrdrb\brdrs\cellx1296\clbrdrb\brdrs\cellx2484\clbrdrb\brdrs\cellx3888\clbrdrb\brdrs\cellx6912 \trkeep\intbl {-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Centered Header\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 Centered Header\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left Aligned\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Left Aligned\par} \cell}-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right Aligned\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 Right Aligned\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default aligned\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Default aligned\par} \cell} } \intbl\row}@@ -205,13 +205,13 @@ \cellx1296\cellx2484\cellx3888\cellx6912 \trkeep\intbl {-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 First\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 First\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 row\par} \cell}-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12.0\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 12.0\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par} \cell} } \intbl\row}@@ -220,30 +220,30 @@ \cellx1296\cellx2484\cellx3888\cellx6912 \trkeep\intbl {-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Second\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 Second\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 row\par} \cell}-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 5.0\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 5.0\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Here\u8217's another one. Note the blank line between rows.\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Here\u8217's another one. Note the blank line between rows.\par} \cell} } \intbl\row}-{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's the caption. It may span multiple lines.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Multiline table without caption:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here\u8217's the caption. It may span multiple lines.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Multiline table without caption:\par} { \trowd \trgaph120 \clbrdrb\brdrs\cellx1296\clbrdrb\brdrs\cellx2484\clbrdrb\brdrs\cellx3888\clbrdrb\brdrs\cellx6912 \trkeep\intbl {-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Centered Header\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 Centered Header\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left Aligned\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Left Aligned\par} \cell}-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right Aligned\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 Right Aligned\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default aligned\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Default aligned\par} \cell} } \intbl\row}@@ -252,13 +252,13 @@ \cellx1296\cellx2484\cellx3888\cellx6912 \trkeep\intbl {-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 First\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 First\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 row\par} \cell}-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12.0\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 12.0\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par} \cell} } \intbl\row}@@ -267,30 +267,30 @@ \cellx1296\cellx2484\cellx3888\cellx6912 \trkeep\intbl {-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Second\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 Second\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 row\par} \cell}-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 5.0\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 5.0\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Here\u8217's another one. Note the blank line between rows.\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Here\u8217's another one. Note the blank line between rows.\par} \cell} } \intbl\row}-{\pard \ql \f0 \sa180 \li0 \fi0 \par}-{\pard \ql \f0 \sa180 \li0 \fi0 Table without column headers:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Table without column headers:\par} { \trowd \trgaph120 \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell}-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 12\par} \cell} } \intbl\row}@@ -299,13 +299,13 @@ \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell}-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 123\par} \cell} } \intbl\row}@@ -314,30 +314,30 @@ \cellx2160\cellx4320\cellx6480\cellx8640 \trkeep\intbl {-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell}-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell}-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 1\par} \cell} } \intbl\row}-{\pard \ql \f0 \sa180 \li0 \fi0 \par}-{\pard \ql \f0 \sa180 \li0 \fi0 Multiline table without column headers:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Multiline table without column headers:\par} { \trowd \trgaph120 \cellx1296\cellx2484\cellx3888\cellx6912 \trkeep\intbl {-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 First\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 First\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 row\par} \cell}-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12.0\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 12.0\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par} \cell} } \intbl\row}@@ -346,14 +346,14 @@ \cellx1296\cellx2484\cellx3888\cellx6912 \trkeep\intbl {-{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Second\par}+{{\pard\intbl \qc \f0 \fs24 \sa0 \li0 \fi0 Second\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 row\par} \cell}-{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 5.0\par}+{{\pard\intbl \qr \f0 \fs24 \sa0 \li0 \fi0 5.0\par} \cell}-{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Here\u8217's another one. Note the blank line between rows.\par}+{{\pard\intbl \ql \f0 \fs24 \sa0 \li0 \fi0 Here\u8217's another one. Note the blank line between rows.\par} \cell} } \intbl\row}-{\pard \ql \f0 \sa180 \li0 \fi0 \par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \par}
+ test/tables.t2t view
@@ -0,0 +1,46 @@+Simple table with caption:++Demonstration of simple table syntax.+|  Right|Left  |  Center  |Default|+|     12|12    |    12    |12     |+|    123|123   |   123    |123    |+|      1|1     |    1     |1      |++Simple table without caption:++|  Right|Left  |  Center  |Default|+|     12|12    |    12    |12     |+|    123|123   |   123    |123    |+|      1|1     |    1     |1      |++Simple table indented two spaces:++Demonstration of simple table syntax.+|  Right|Left  |  Center  |Default|+|     12|12    |    12    |12     |+|    123|123   |   123    |123    |+|      1|1     |    1     |1      |++Multiline table with caption:++Here’s the caption. It may span multiple lines.+|  Centered Header  |Left Aligned  |  Right Aligned|Default aligned                                        |+|       First       |row           |           12.0|Example of a row that spans multiple lines.            |+|      Second       |row           |            5.0|Here’s another one. Note the blank line between rows.  |++Multiline table without caption:++|  Centered Header  |Left Aligned  |  Right Aligned|Default aligned                                        |+|       First       |row           |           12.0|Example of a row that spans multiple lines.            |+|      Second       |row           |            5.0|Here’s another one. Note the blank line between rows.  |++Table without column headers:++|   12|12   |  12   |   12|+|  123|123  |  123  |  123|+|    1|1    |   1   |    1|++Multiline table without column headers:++|  First   |row  |  12.0|Example of a row that spans multiple lines.          |+|  Second  |row  |   5.0|Here’s another one. Note the blank line between rows.|
test/tables/nordics.markdown view
@@ -1,18 +1,18 @@-  --------------------------------------------------------------------------------           Name           Capital                 Population\     Area\-                                                  (in 2018)       (in km^2^)-  ----------------------- ----------------------- --------------- ----------------          Denmark         Copenhagen              5,809,502       43,094--          Finland         Helsinki                5,537,364       338,145--          Iceland         Reykjavik               343,518         103,000--          Norway          Oslo                    5,372,191       323,802--          Sweden          Stockholm               10,313,447      450,295--           Total                                  27,376,022      1,258,336-  -------------------------------------------------------------------------------++-----------------------+-----------------------+---------------+---------------++| Name                  | Capital               | Population\   | Area\         |+|                       |                       | (in 2018)     | (in km^2^)    |++:=====================:+:======================+:==============+:==============++| Denmark               | Copenhagen            | 5,809,502     | 43,094        |++-----------------------+-----------------------+---------------+---------------++| Finland               | Helsinki              | 5,537,364     | 338,145       |++-----------------------+-----------------------+---------------+---------------++| Iceland               | Reykjavik             | 343,518       | 103,000       |++-----------------------+-----------------------+---------------+---------------++| Norway                | Oslo                  | 5,372,191     | 323,802       |++-----------------------+-----------------------+---------------+---------------++| Sweden                | Stockholm             | 10,313,447    | 450,295       |++=======================+=======================+===============+===============++| Total                 |                       | 27,376,022    | 1,258,336     |++=======================+=======================+===============+===============+ -  : States belonging to the *Nordics.* {#nordics source="wikipedia"}+: States belonging to the *Nordics.* {#nordics source="wikipedia"}
test/tables/nordics.mediawiki view
@@ -1,4 +1,4 @@-{| id="nordics" class="wikitable" source="wikipedia"+{| id="nordics" class="wikitable" data-source="wikipedia" |+ States belonging to the ''Nordics.'' |- ! style="text-align: center;"| Name
test/tables/nordics.typst view
@@ -3,9 +3,7 @@     columns: (30%, 30%, 20%, 20%),     align: (center,left,left,left,),     table.header(table.cell(align: center)[Name], table.cell(align: center)[Capital], table.cell(align: center)[Population-      \-      (in 2018)], table.cell(align: center)[Area \-      (in km#super[2])],),+      \ (in 2018)], table.cell(align: center)[Area \ (in km#super[2])],),     table.hline(),     [Denmark], [Copenhagen], [5,809,502], [43,094],     [Finland], [Helsinki], [5,537,364], [338,145],
test/tables/students.mediawiki view
@@ -1,4 +1,4 @@-{| id="students" class="wikitable" source="mdn"+{| id="students" class="wikitable" data-source="mdn" |+ List of Students |- ! style="text-align: center;"| Student ID
test/test-pandoc.hs view
@@ -53,6 +53,7 @@ import qualified Tests.Writers.TEI import qualified Tests.Writers.Markua import qualified Tests.Writers.BBCode+import qualified Tests.Writers.Txt2Tags import qualified Tests.XML import qualified Tests.MediaBag import Text.Pandoc.Shared (inDirectory)@@ -86,6 +87,7 @@           , testGroup "Ms" Tests.Writers.Ms.tests           , testGroup "AnnotatedTable" Tests.Writers.AnnotatedTable.tests           , testGroup "BBCode" Tests.Writers.BBCode.tests+          , testGroup "Txt2Tags" Tests.Writers.Txt2Tags.tests           ]         , testGroup "Readers"           [ testGroup "LaTeX" Tests.Readers.LaTeX.tests
test/testsuite.native view
@@ -595,7 +595,7 @@             , Str "continuation"             ]         , OrderedList-            ( 4 , LowerRoman , Period )+            ( 1 , LowerRoman , Period )             [ [ Plain                   [ Str "sublist"                   , Space@@ -603,13 +603,13 @@                   , Space                   , Str "roman"                   , Space-                  , Str "numerals,"+                  , Str "numerals"                   , SoftBreak                   , Str "starting"                   , Space                   , Str "with"                   , Space-                  , Str "4"+                  , Str "i."                   ]               ]             , [ Plain [ Str "more" , Space , Str "items" ]@@ -624,13 +624,13 @@       ]   , Para [ Str "Nesting:" ]   , OrderedList-      ( 1 , UpperAlpha , Period )+      ( 4 , UpperAlpha , Period )       [ [ Plain [ Str "Upper" , Space , Str "Alpha" ]         , OrderedList             ( 1 , UpperRoman , Period )             [ [ Plain [ Str "Upper" , Space , Str "Roman." ]               , OrderedList-                  ( 6 , Decimal , TwoParens )+                  ( 1 , Decimal , TwoParens )                   [ [ Plain                         [ Str "Decimal"                         , Space@@ -638,10 +638,10 @@                         , Space                         , Str "with"                         , Space-                        , Str "6"+                        , Str "1"                         ]                     , OrderedList-                        ( 3 , LowerAlpha , OneParen )+                        ( 1 , LowerAlpha , OneParen )                         [ [ Plain                               [ Str "Lower"                               , Space
test/testsuite.txt view
@@ -237,18 +237,18 @@      with a continuation -    iv. sublist with roman numerals,-        starting with 4-    v.  more items+    i.  sublist with roman numerals+        starting with i.+    ii. more items         (A)  a subsublist         (B)  a subsublist  Nesting: -A.  Upper Alpha+D.  Upper Alpha     I.  Upper Roman.-        (6) Decimal start with 6-            c)  Lower alpha with paren+        (1) Decimal start with 1+            a)  Lower alpha with paren  Autonumbering: 
test/typst-reader.native view
@@ -528,8 +528,7 @@                       (RowSpan 1)                       (ColSpan 1)                       [ CodeBlock-                          ( "" , [] , [] )-                          "-- document body here --\n  "+                          ( "" , [] , [] ) "-- document body here --"                       ]                   ]               ]@@ -1300,7 +1299,7 @@                                   ( "" , [ "box" ] , [] )                                   [ Math InlineMath "\\cap"                                   , Str "\8192"-                                  , Code ( "" , [] , [] ) "sect"+                                  , Code ( "" , [] , [] ) "inter"                                   ]                               ]                           ]@@ -1596,7 +1595,7 @@                                   ( "" , [ "box" ] , [] )                                   [ Math InlineMath "\1488"                                   , Str "\8192"-                                  , Code ( "" , [] , [] ) "alef"+                                  , Code ( "" , [] , [] ) "aleph"                                   ]                               ]                           ]@@ -3120,7 +3119,7 @@                                   ( "" , [ "box" ] , [] )                                   [ Math InlineMath "\\partial"                                   , Str "\8192"-                                  , Code ( "" , [] , [] ) "diff"+                                  , Code ( "" , [] , [] ) "partial"                                   ]                               ]                           ]@@ -3151,7 +3150,7 @@                                   ( "" , [ "box" ] , [] )                                   [ Math InlineMath "\\oplus"                                   , Str "\8192"-                                  , Code ( "" , [] , [] ) "plus.circle"+                                  , Code ( "" , [] , [] ) "plus.o"                                   ]                               ]                           ]@@ -3196,7 +3195,7 @@                                   ( "" , [ "box" ] , [] )                                   [ Math InlineMath "\\ominus"                                   , Str "\8192"-                                  , Code ( "" , [] , [] ) "minus.circle"+                                  , Code ( "" , [] , [] ) "minus.o"                                   ]                               ]                           ]@@ -3210,8 +3209,7 @@                                   ( "" , [ "box" ] , [] )                                   [ Math InlineMath "\295"                                   , Str "\8192"-                                  , Code-                                      ( "" , [] , [] ) "planck.reduce"+                                  , Code ( "" , [] , [] ) "planck"                                   ]                               ]                           ]@@ -3242,7 +3240,7 @@                                   ( "" , [ "box" ] , [] )                                   [ Math InlineMath "\\odot"                                   , Str "\8192"-                                  , Code ( "" , [] , [] ) "dot.circle"+                                  , Code ( "" , [] , [] ) "dot.o"                                   ]                               ]                           ]@@ -3289,7 +3287,7 @@                                   ( "" , [ "box" ] , [] )                                   [ Math InlineMath "\\otimes"                                   , Str "\8192"-                                  , Code ( "" , [] , [] ) "times.circle"+                                  , Code ( "" , [] , [] ) "times.o"                                   ]                               ]                           ]@@ -3920,7 +3918,7 @@                                   ( "" , [ "box" ] , [] )                                   [ Math InlineMath "\\bigcap"                                   , Str "\8192"-                                  , Code ( "" , [] , [] ) "sect.big"+                                  , Code ( "" , [] , [] ) "inter.big"                                   ]                               ]                           ]@@ -3971,7 +3969,8 @@                                   [ Math InlineMath "\\langle\\rangle"                                   , Str "\8192"                                   , Code-                                      ( "" , [] , [] ) "angle.l angle.r"+                                      ( "" , [] , [] )+                                      "chevron.l chevron.r"                                   ]                               ]                           ]@@ -4132,7 +4131,7 @@                           (ColSpan 1)                           [ CodeBlock                               ( "" , [] , [] )-                              "lr([sum_(k = 0)^n e^(k^2)], size: #50%)\n  "+                              "lr([sum_(k = 0)^n e^(k^2)], size: #50%)"                           ]                       ]                   ]@@ -4199,7 +4198,7 @@                           (ColSpan 1)                           [ CodeBlock                               ( "" , [] , [] )-                              "lr(angle.l i, 2^(2^i) angle.r)\n  "+                              "lr(angle.l i, 2^(2^i) angle.r)"                           ]                       ]                   ]@@ -4274,8 +4273,7 @@                           AlignDefault                           (RowSpan 1)                           (ColSpan 1)-                          [ CodeBlock-                              ( "" , [] , [] ) "(1 / n^(alpha))\n  "+                          [ CodeBlock ( "" , [] , [] ) "(1 / n^(alpha))"                           ]                       ]                   , Row@@ -4297,7 +4295,7 @@                           (ColSpan 1)                           [ CodeBlock                               ( "" , [] , [] )-                              "paren.l 1 / n^(alpha) paren.r\n  "+                              "paren.l 1 / n^(alpha) paren.r"                           ]                       ]                   ]@@ -4362,7 +4360,7 @@                           (ColSpan 1)                           [ CodeBlock                               ( "" , [] , [] )-                              "lr(frac(dif f, dif x) |)_(x_0)\n  "+                              "lr(frac(dif f, dif x) |)_(x_0)"                           ]                       ]                   ]@@ -4431,7 +4429,7 @@                           (RowSpan 1)                           (ColSpan 1)                           [ CodeBlock-                              ( "" , [] , [] ) "$ mat(a, b; c, d) $\n  "+                              ( "" , [] , [] ) "$ mat(a, b; c, d) $"                           ]                       ]                   ]@@ -4576,7 +4574,7 @@                           (ColSpan 1)                           [ CodeBlock                               ( "" , [] , [] )-                              "$ f_n = cases(\n    a &\"if\" n = 0,\n    r dot f_(n - 1) &\"else\"\n  ) $\n  "+                              "$ f_n = cases(\n  a &\"if\" n = 0,\n  r dot f_(n - 1) &\"else\"\n) $"                           ]                       ]                   ]@@ -4784,7 +4782,7 @@                           (RowSpan 1)                           (ColSpan 1)                           [ CodeBlock-                              ( "" , [] , [] ) "$ S = k dot lg W $\n  "+                              ( "" , [] , [] ) "$ S = k dot lg W $"                           ]                       ]                   ]@@ -4837,7 +4835,7 @@                           (ColSpan 1)                           [ CodeBlock                               ( "" , [] , [] )-                              "$ sin(x) = x - x^3 / 3! \\\n      + x^5 / 5! - dots.h.c $\n  "+                              "$ sin(x) = x - x^3 / 3! \\\n    + x^5 / 5! - dots.h.c $"                           ]                       ]                   ]@@ -4886,7 +4884,7 @@                           (ColSpan 1)                           [ CodeBlock                               ( "" , [] , [] )-                              "$ nabla dot bold(D) &= rho \\\n    nabla dot bold(B) &= 0 $\n  "+                              "$ nabla dot bold(D) &= rho \\\n  nabla dot bold(B) &= 0 $"                           ]                       ]                   ]@@ -4977,8 +4975,7 @@                           AlignDefault                           (RowSpan 1)                           (ColSpan 1)-                          [ CodeBlock ( "" , [] , [] ) "f: RR -> RR\n  "-                          ]+                          [ CodeBlock ( "" , [] , [] ) "f: RR -> RR" ]                       ]                   , Row                       ( "" , [] , [] )@@ -5027,7 +5024,7 @@                           (ColSpan 1)                           [ CodeBlock                               ( "" , [] , [] )-                              "lim_(h -> 0) (f(x + h) - f(x)) / h\n  "+                              "lim_(h -> 0) (f(x + h) - f(x)) / h"                           ]                       ]                   , Row@@ -5050,7 +5047,7 @@                           (ColSpan 1)                           [ CodeBlock                               ( "" , [] , [] )-                              "integral x^2 dif x = x^3 \\/ 3 + C\n  "+                              "integral x^2 dif x = x^3 \\/ 3 + C"                           ]                       ]                   , Row@@ -5073,7 +5070,7 @@                           (ColSpan 1)                           [ CodeBlock                               ( "" , [] , [] )-                              "nabla = bold(i) dif / (dif x) + bold(j) dif / (dif y) + bold(k) dif / (dif z)\n  "+                              "nabla = bold(i) dif / (dif x) + bold(j) dif / (dif y) + bold(k) dif / (dif z)"                           ]                       ]                   ]@@ -5225,7 +5222,7 @@                           (ColSpan 1)                           [ CodeBlock                               ( "" , [] , [] )-                              "sigma^2 = sqrt(sum(x_i - mu)^2 \\/ N)\n  "+                              "sigma^2 = sqrt(sum(x_i - mu)^2 \\/ N)"                           ]                       ]                   , Row@@ -5248,7 +5245,7 @@                           (ColSpan 1)                           [ CodeBlock                               ( "" , [] , [] )-                              "E(X) = mu_X = sum(x_i - P(x_i))\n  "+                              "E(X) = mu_X = sum(x_i - P(x_i))"                           ]                       ]                   ]@@ -5303,7 +5300,7 @@                       (ColSpan 1)                       [ CodeBlock                           ( "" , [] , [] )-                          "1 / sqrt(2 sigma^2 pi)\n    e^(- (x - mu)^2 / (2 sigma^2))\n  "+                          "1 / sqrt(2 sigma^2 pi)\n  e^(- (x - mu)^2 / (2 sigma^2))"                       ]                   ]               ]
test/undergradmath.typ view
@@ -167,13 +167,13 @@   columns: 3,   column-gutter: 1em,   cell($union$, `union`), cell($RR$, [`RR`, `bb(R)`]), cell($forall$, `forall`),-  cell($sect$, `sect`), cell($bb(Z)$, [`ZZ`, `bb(Z)`]), cell($exists$, `exists`),+  cell($inter$, `inter`), cell($bb(Z)$, [`ZZ`, `bb(Z)`]), cell($exists$, `exists`),   cell($subset$, `subset`), cell($bb(Q)$, [`QQ`, `bb(Q)`]), cell($not$, `not`),   cell($subset.eq$, `subset.eq`), cell($bb(N)$, [`NN`, `bb(N)`]), cell($or$, `or`),   cell($supset$, `supset`), cell($bb(C)$, [`CC`, `bb(C)`]), cell($and$, `and`),   cell($supset.eq$, `supset.eq`), cell($diameter$, [`diameter`]), cell($tack.r$, `tack.r`),   cell($in$, `in`), cell($nothing$, `nothing`), cell($models$, `models`),-  cell($in.not$, `in.not`), cell($alef$, `alef`), cell($without$, `without`),+  cell($in.not$, `in.not`), cell($aleph$, `aleph`), cell($without$, `without`), ))  Negate an operator, as in $subset.not$, with `subset.not`.@@ -257,11 +257,11 @@   cell($>>$, [`>>`, `gt.double`]), cell($tilde.equiv.not$, `tilde.equiv.not`), cell($divides$, `divides`),   cell($approx$, `approx`), cell($tilde$, `tilde`), cell($divides.not$, `divides.not`),   cell($\u{224D}$, [`\u{224D}` @tricky]), cell($tilde.eq$, `tilde.eq`), cell($n!$, `n!`),-  cell($equiv$, `equiv`), cell($tilde.not$, `tilde.not`), cell($diff$, `diff`),-  cell($prec$, `prec`), cell($plus.circle$, `plus.circle`), cell($nabla$, `nabla`),-  cell($prec.eq$, `prec.eq`), cell($minus.circle$, `minus.circle`), cell($planck.reduce$, `planck.reduce`),-  cell($succ$, `succ`), cell($dot.circle$, `dot.circle`), cell($circle.stroked.tiny$, `circle.stroked.tiny`),-  cell($succ.eq$, `succ.eq`), cell($times.circle$, `times.circle`), cell($star$, `star`),+  cell($equiv$, `equiv`), cell($tilde.not$, `tilde.not`), cell($partial$, `partial`),+  cell($prec$, `prec`), cell($plus.o$, `plus.o`), cell($nabla$, `nabla`),+  cell($prec.eq$, `prec.eq`), cell($minus.o$, `minus.o`), cell($planck$, `planck`),+  cell($succ$, `succ`), cell($dot.o$, `dot.o`), cell($circle.stroked.tiny$, `circle.stroked.tiny`),+  cell($succ.eq$, `succ.eq`), cell($times.o$, `times.o`), cell($star$, `star`),   cell($prop$, `prop`), cell($\u{2298}$, [`\u{2298}` @tricky]), cell($sqrt("")$, `sqrt("")`),   cell($\u{2250}$, [`\u{2250}` @tricky]), cell($harpoon.tr$, `harpoon.tr`), cell($checkmark$, `checkmark`), ))@@ -294,14 +294,14 @@ #align(center, table(   columns: 3,   cell($integral$, `integral`), cell($integral.triple$, `integral.triple`), cell($union.big$, `union.big`),-  cell($integral.double$, `integral.double`), cell($integral.cont$, `integral.cont`), cell($sect.big$, `sect.big`),+  cell($integral.double$, `integral.double`), cell($integral.cont$, `integral.cont`), cell($inter.big$, `inter.big`), ))  = Fences #align(center, table(   columns: 3,   column-gutter: 1.5em,-  cell($()$, `()`), cell($angle.l angle.r$, `angle.l angle.r`), cell($abs("")$, `abs("")`),+  cell($()$, `()`), cell($chevron.l chevron.r$, `chevron.l chevron.r`), cell($abs("")$, `abs("")`),   cell($[]$, `[]`), cell($floor("")$, `floor("")`), cell($norm("")$, `norm("")`),   cell(${}$, `{}`), cell($ceil("")$, `ceil("")`), ))@@ -322,7 +322,7 @@ #align(center, table(   columns: 2,   column-gutter: 1em,-  $ lr(angle.l i, 2^(2^i) angle.r) $,+  $ lr(chevron.l i, 2^(2^i) chevron.r) $,   ```   lr(angle.l i, 2^(2^i) angle.r)   ```,
test/writer.asciidoc view
@@ -233,8 +233,8 @@ . and now 3 + with a continuation-[lowerroman, start=4]-.. sublist with roman numerals, starting with 4+[lowerroman]+.. sublist with roman numerals starting with i. .. more items [upperalpha] ... a subsublist@@ -242,13 +242,13 @@  Nesting: -[upperalpha]+[upperalpha, start=4] . Upper Alpha [upperroman] .. Upper Roman.-[arabic, start=6]-... Decimal start with 6-[loweralpha, start=3]+[arabic]+... Decimal start with 1+[loweralpha] .... Lower alpha with paren  Autonumbering:@@ -529,7 +529,7 @@  Greater-than: ++>++ -Hash: #+Hash: ++#++  Period: . 
test/writer.asciidoc_legacy view
@@ -232,8 +232,8 @@ . and now 3 + with a continuation-[lowerroman, start=4]-.. sublist with roman numerals, starting with 4+[lowerroman]+.. sublist with roman numerals starting with i. .. more items [upperalpha] ... a subsublist@@ -241,13 +241,13 @@  Nesting: -[upperalpha]+[upperalpha, start=4] . Upper Alpha [upperroman] .. Upper Roman.-[arabic, start=6]-... Decimal start with 6-[loweralpha, start=3]+[arabic]+... Decimal start with 1+[loweralpha] .... Lower alpha with paren  Autonumbering:@@ -528,7 +528,7 @@  Greater-than: ++>++ -Hash: #+Hash: ++#++  Period: . 
test/writer.bbcode view
@@ -260,7 +260,7 @@ with a continuation  [list=i]-[*]sublist with roman numerals, starting with 4+[*]sublist with roman numerals starting with i. [*]more items  [list=A]@@ -279,7 +279,7 @@ [*]Upper Roman.  [list=1]-[*]Decimal start with 6+[*]Decimal start with 1  [list=a] [*]Lower alpha with paren
test/writer.context view
@@ -431,9 +431,9 @@    with a continuation -  \startenumerate[r,packed][start=4,stopper=.]+  \startenumerate[r,packed][stopper=.]   \item-    sublist with roman numerals, starting with 4+    sublist with roman numerals starting with i.   \item     more items     \startenumerate[A,packed][left=(,stopper=)]@@ -447,16 +447,16 @@  Nesting: -\startenumerate[A,packed][stopper=.]+\startenumerate[A,packed][start=4,stopper=.] \item   Upper Alpha   \startenumerate[R,packed][stopper=.]   \item     Upper Roman.-    \startenumerate[n,packed][start=6,left=(,stopper=)]+    \startenumerate[n,packed][left=(,stopper=)]     \item-      Decimal start with 6-      \startenumerate[a,packed][start=3,stopper=)]+      Decimal start with 1+      \startenumerate[a,packed][stopper=)]       \item         Lower alpha with paren       \stopenumerate
test/writer.djot view
@@ -256,21 +256,21 @@      with a continuation -    iv. sublist with roman numerals, starting with 4-    v. more items+    i. sublist with roman numerals starting with i.+    ii. more items -       (A) a subsublist-       (B) a subsublist+        (A) a subsublist+        (B) a subsublist  Nesting: -A. Upper Alpha+D. Upper Alpha     I. Upper Roman. -      (6) Decimal start with 6+      (1) Decimal start with 1 -          c) Lower alpha with paren+          a) Lower alpha with paren  Autonumbering: 
test/writer.docbook4 view
@@ -525,10 +525,10 @@           <para>             with a continuation           </para>-          <orderedlist numeration="lowerroman" spacing="compact" startingnumber="4">+          <orderedlist numeration="lowerroman" spacing="compact">             <listitem>               <para>-                sublist with roman numerals, starting with 4+                sublist with roman numerals starting with i.               </para>             </listitem>             <listitem>@@ -554,7 +554,7 @@       <para>         Nesting:       </para>-      <orderedlist numeration="upperalpha" spacing="compact">+      <orderedlist numeration="upperalpha" spacing="compact" startingnumber="4">         <listitem>           <para>             Upper Alpha@@ -564,12 +564,12 @@               <para>                 Upper Roman.               </para>-              <orderedlist numeration="arabic" spacing="compact" startingnumber="6">+              <orderedlist numeration="arabic" spacing="compact">                 <listitem>                   <para>-                    Decimal start with 6+                    Decimal start with 1                   </para>-                  <orderedlist numeration="loweralpha" spacing="compact" startingnumber="3">+                  <orderedlist numeration="loweralpha" spacing="compact">                     <listitem>                       <para>                         Lower alpha with paren
test/writer.docbook5 view
@@ -527,10 +527,10 @@           <para>             with a continuation           </para>-          <orderedlist numeration="lowerroman" spacing="compact" startingnumber="4">+          <orderedlist numeration="lowerroman" spacing="compact">             <listitem>               <para>-                sublist with roman numerals, starting with 4+                sublist with roman numerals starting with i.               </para>             </listitem>             <listitem>@@ -556,7 +556,7 @@       <para>         Nesting:       </para>-      <orderedlist numeration="upperalpha" spacing="compact">+      <orderedlist numeration="upperalpha" spacing="compact" startingnumber="4">         <listitem>           <para>             Upper Alpha@@ -566,12 +566,12 @@               <para>                 Upper Roman.               </para>-              <orderedlist numeration="arabic" spacing="compact" startingnumber="6">+              <orderedlist numeration="arabic" spacing="compact">                 <listitem>                   <para>-                    Decimal start with 6+                    Decimal start with 1                   </para>-                  <orderedlist numeration="loweralpha" spacing="compact" startingnumber="3">+                  <orderedlist numeration="loweralpha" spacing="compact">                     <listitem>                       <para>                         Lower alpha with paren
test/writer.dokuwiki view
@@ -211,7 +211,7 @@   - <WRAP> and now 3 with a continuation-    - sublist with roman numerals, starting with 4+    - sublist with roman numerals starting with i.     - more items       - a subsublist       - a subsublist@@ -219,16 +219,10 @@  Nesting: -  - <WRAP>-Upper Alpha-    - <WRAP>-Upper Roman.-      - <WRAP>-Decimal start with 6+  - Upper Alpha+    - Upper Roman.+      - Decimal start with 1         - Lower alpha with paren-</WRAP>-</WRAP>-</WRAP>  Autonumbering: 
test/writer.fb2 view
@@ -307,16 +307,16 @@ <empty-line /> <p>    with a continuation</p> <empty-line />-<p>(3) iv. sublist with roman numerals,-starting with 4</p>-<p>(3) v. more items</p>-<p>(3) v. (A) a subsublist</p>-<p>(3) v. (B) a subsublist</p>+<p>(3) i. sublist with roman numerals+starting with i.</p>+<p>(3) ii. more items</p>+<p>(3) ii. (A) a subsublist</p>+<p>(3) ii. (B) a subsublist</p> <p>Nesting:</p>-<p>A. Upper Alpha</p>-<p>A. I. Upper Roman.</p>-<p>A. I. (6) Decimal start with 6</p>-<p>A. I. (6) c) Lower alpha with paren</p>+<p>D. Upper Alpha</p>+<p>D. I. Upper Roman.</p>+<p>D. I. (1) Decimal start with 1</p>+<p>D. I. (1) a) Lower alpha with paren</p> <p>Autonumbering:</p> <p>1. Autonumber.</p> <p>2. More.</p>
test/writer.haddock view
@@ -240,17 +240,17 @@      with a continuation -    4.  sublist with roman numerals, starting with 4-    5.  more items+    1.  sublist with roman numerals starting with i.+    2.  more items         (1) a subsublist         (2) a subsublist  Nesting: -1.  Upper Alpha+4.  Upper Alpha     1.  Upper Roman.-        (6) Decimal start with 6-            3)  Lower alpha with paren+        (1) Decimal start with 1+            1)  Lower alpha with paren  Autonumbering: 
test/writer.html4 view
@@ -3,7 +3,7 @@ <head>   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   <meta http-equiv="Content-Style-Type" content="text/css" />-  <meta name="generator" content="pandoc" />+  <meta name="generator" content="pandoc " />   <meta name="author" content="John MacFarlane" />   <meta name="author" content="Anonymous" />   <meta name="date" content="2006-07-17" />@@ -44,7 +44,6 @@       body {         background-color: transparent;         color: black;-        font-size: 12pt;       }       p, h2, h3 {         orphans: 3;@@ -94,6 +93,7 @@       color: #606060;     }     code {+      white-space: pre-wrap;       font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;       font-size: 85%;       margin: 0;@@ -157,10 +157,13 @@     #TOC a:not(:hover) {       text-decoration: none;     }-    code{white-space: pre-wrap;}     span.smallcaps{font-variant: small-caps;}-    div.columns{display: flex; gap: min(4vw, 1.5em);}-    div.column{flex: auto; overflow-x: auto;}+    div.columns{display: flex; gap: 1.5em;}+    div.column{flex: auto;}+    @media screen {+    div.columns{gap: min(4vw, 1.5em);}+    div.column{overflow-x: auto;}+    }     div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}     /* The extra [class] is a hack that increases specificity enough to        override a similar rule in reveal.js */@@ -363,8 +366,8 @@ <li><p>begins with 2</p></li> <li><p>and now 3</p> <p>with a continuation</p>-<ol start="4" style="list-style-type: lower-roman">-<li>sublist with roman numerals, starting with 4</li>+<ol style="list-style-type: lower-roman">+<li>sublist with roman numerals starting with i.</li> <li>more items <ol style="list-style-type: upper-alpha"> <li>a subsublist</li>@@ -373,13 +376,13 @@ </ol></li> </ol> <p>Nesting:</p>-<ol style="list-style-type: upper-alpha">+<ol start="4" style="list-style-type: upper-alpha"> <li>Upper Alpha <ol style="list-style-type: upper-roman"> <li>Upper Roman.-<ol start="6" style="list-style-type: decimal">-<li>Decimal start with 6-<ol start="3" style="list-style-type: lower-alpha">+<ol style="list-style-type: decimal">+<li>Decimal start with 1+<ol style="list-style-type: lower-alpha"> <li>Lower alpha with paren</li> </ol></li> </ol></li>
test/writer.html5 view
@@ -1,8 +1,8 @@ <!DOCTYPE html>-<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">+<html xmlns="http://www.w3.org/1999/xhtml"> <head>   <meta charset="utf-8" />-  <meta name="generator" content="pandoc" />+  <meta name="generator" content="pandoc " />   <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />   <meta name="author" content="John MacFarlane" />   <meta name="author" content="Anonymous" />@@ -44,7 +44,6 @@       body {         background-color: transparent;         color: black;-        font-size: 12pt;       }       p, h2, h3 {         orphans: 3;@@ -94,6 +93,7 @@       color: #606060;     }     code {+      white-space: pre-wrap;       font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;       font-size: 85%;       margin: 0;@@ -157,10 +157,13 @@     #TOC a:not(:hover) {       text-decoration: none;     }-    code{white-space: pre-wrap;}     span.smallcaps{font-variant: small-caps;}-    div.columns{display: flex; gap: min(4vw, 1.5em);}-    div.column{flex: auto; overflow-x: auto;}+    div.columns{display: flex; gap: 1.5em;}+    div.column{flex: auto;}+    @media screen {+    div.columns{gap: min(4vw, 1.5em);}+    div.column{overflow-x: auto;}+    }     div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}     /* The extra [class] is a hack that increases specificity enough to        override a similar rule in reveal.js */@@ -363,8 +366,8 @@ <li><p>begins with 2</p></li> <li><p>and now 3</p> <p>with a continuation</p>-<ol start="4" type="i">-<li>sublist with roman numerals, starting with 4</li>+<ol type="i">+<li>sublist with roman numerals starting with i.</li> <li>more items <ol type="A"> <li>a subsublist</li>@@ -373,13 +376,13 @@ </ol></li> </ol> <p>Nesting:</p>-<ol type="A">+<ol start="4" type="A"> <li>Upper Alpha <ol type="I"> <li>Upper Roman.-<ol start="6" type="1">-<li>Decimal start with 6-<ol start="3" type="a">+<ol type="1">+<li>Decimal start with 1+<ol type="a"> <li>Lower alpha with paren</li> </ol></li> </ol></li>
test/writer.icml view
@@ -334,13 +334,13 @@           </TabList>         </Properties>       </ParagraphStyle>-      <ParagraphStyle Self="ParagraphStyle/NumList &gt; NumList &gt; NumList &gt; NumList &gt; first &gt; beginsWith-3 &gt; lowerAlpha" Name="NumList &gt; NumList &gt; NumList &gt; NumList &gt; first &gt; beginsWith-3 &gt; lowerAlpha" NumberingExpression="^#.^t" NumberingLevel="4" BulletsAndNumberingListType="NumberedList" LeftIndent="30">+      <ParagraphStyle Self="ParagraphStyle/NumList &gt; NumList &gt; NumList &gt; NumList &gt; first &gt; lowerAlpha" Name="NumList &gt; NumList &gt; NumList &gt; NumList &gt; first &gt; lowerAlpha" NumberingExpression="^#.^t" NumberingLevel="4" BulletsAndNumberingListType="NumberedList" LeftIndent="30">         <Properties>           <BasedOn type="object">$ID/NormalParagraphStyle</BasedOn>           <NumberingFormat type="string">a, b, c, d...</NumberingFormat>         </Properties>       </ParagraphStyle>-      <ParagraphStyle Self="ParagraphStyle/NumList &gt; NumList &gt; NumList &gt; first &gt; beginsWith-6" Name="NumList &gt; NumList &gt; NumList &gt; first &gt; beginsWith-6" NumberingExpression="^#.^t" NumberingLevel="3" BulletsAndNumberingListType="NumberedList" LeftIndent="20">+      <ParagraphStyle Self="ParagraphStyle/NumList &gt; NumList &gt; NumList &gt; first" Name="NumList &gt; NumList &gt; NumList &gt; first" NumberingExpression="^#.^t" NumberingLevel="3" BulletsAndNumberingListType="NumberedList" LeftIndent="20">         <Properties>           <BasedOn type="object">$ID/NormalParagraphStyle</BasedOn>         </Properties>@@ -357,18 +357,12 @@           <NumberingFormat type="string">A, B, C, D...</NumberingFormat>         </Properties>       </ParagraphStyle>-      <ParagraphStyle Self="ParagraphStyle/NumList &gt; NumList &gt; beginsWith-4 &gt; lowerRoman" Name="NumList &gt; NumList &gt; beginsWith-4 &gt; lowerRoman" NumberingExpression="^#.^t" NumberingLevel="2" BulletsAndNumberingListType="NumberedList" LeftIndent="10">-        <Properties>-          <BasedOn type="object">$ID/NormalParagraphStyle</BasedOn>-          <NumberingFormat type="string">i, ii, iii, iv...</NumberingFormat>-        </Properties>-      </ParagraphStyle>       <ParagraphStyle Self="ParagraphStyle/NumList &gt; NumList &gt; first" Name="NumList &gt; NumList &gt; first" NumberingExpression="^#.^t" NumberingLevel="2" BulletsAndNumberingListType="NumberedList" LeftIndent="10">         <Properties>           <BasedOn type="object">$ID/NormalParagraphStyle</BasedOn>         </Properties>       </ParagraphStyle>-      <ParagraphStyle Self="ParagraphStyle/NumList &gt; NumList &gt; first &gt; beginsWith-4 &gt; lowerRoman" Name="NumList &gt; NumList &gt; first &gt; beginsWith-4 &gt; lowerRoman" NumberingExpression="^#.^t" NumberingLevel="2" BulletsAndNumberingListType="NumberedList" LeftIndent="10">+      <ParagraphStyle Self="ParagraphStyle/NumList &gt; NumList &gt; first &gt; lowerRoman" Name="NumList &gt; NumList &gt; first &gt; lowerRoman" NumberingExpression="^#.^t" NumberingLevel="2" BulletsAndNumberingListType="NumberedList" LeftIndent="10">         <Properties>           <BasedOn type="object">$ID/NormalParagraphStyle</BasedOn>           <NumberingFormat type="string">i, ii, iii, iv...</NumberingFormat>@@ -380,6 +374,12 @@           <NumberingFormat type="string">I, II, III, IV...</NumberingFormat>         </Properties>       </ParagraphStyle>+      <ParagraphStyle Self="ParagraphStyle/NumList &gt; NumList &gt; lowerRoman" Name="NumList &gt; NumList &gt; lowerRoman" NumberingExpression="^#.^t" NumberingLevel="2" BulletsAndNumberingListType="NumberedList" LeftIndent="10">+        <Properties>+          <BasedOn type="object">$ID/NormalParagraphStyle</BasedOn>+          <NumberingFormat type="string">i, ii, iii, iv...</NumberingFormat>+        </Properties>+      </ParagraphStyle>       <ParagraphStyle Self="ParagraphStyle/NumList &gt; Paragraph" Name="NumList &gt; Paragraph" NumberingExpression="^#.^t" NumberingLevel="1" BulletsAndNumberingListType="NumberedList" LeftIndent="0">         <Properties>           <BasedOn type="object">$ID/NormalParagraphStyle</BasedOn>@@ -405,7 +405,7 @@           <BasedOn type="object">$ID/NormalParagraphStyle</BasedOn>         </Properties>       </ParagraphStyle>-      <ParagraphStyle Self="ParagraphStyle/NumList &gt; first &gt; upperAlpha" Name="NumList &gt; first &gt; upperAlpha" NumberingExpression="^#.^t" NumberingLevel="1" BulletsAndNumberingListType="NumberedList" LeftIndent="0">+      <ParagraphStyle Self="ParagraphStyle/NumList &gt; first &gt; beginsWith-4 &gt; upperAlpha" Name="NumList &gt; first &gt; beginsWith-4 &gt; upperAlpha" NumberingExpression="^#.^t" NumberingLevel="1" BulletsAndNumberingListType="NumberedList" LeftIndent="0">         <Properties>           <BasedOn type="object">$ID/NormalParagraphStyle</BasedOn>           <NumberingFormat type="string">A, B, C, D...</NumberingFormat>@@ -1144,13 +1144,13 @@   </CharacterStyleRange> </ParagraphStyleRange> <Br />-<ParagraphStyleRange NumberingStartAt="4" AppliedParagraphStyle="ParagraphStyle/NumList &gt; NumList &gt; first &gt; beginsWith-4 &gt; lowerRoman" NumberingContinue="false">+<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/NumList &gt; NumList &gt; first &gt; lowerRoman" NumberingContinue="false">   <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">-    <Content>sublist with roman numerals, starting with 4</Content>+    <Content>sublist with roman numerals starting with i.</Content>   </CharacterStyleRange> </ParagraphStyleRange> <Br />-<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/NumList &gt; NumList &gt; beginsWith-4 &gt; lowerRoman">+<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/NumList &gt; NumList &gt; lowerRoman">   <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">     <Content>more items</Content>   </CharacterStyleRange>@@ -1174,7 +1174,7 @@   </CharacterStyleRange> </ParagraphStyleRange> <Br />-<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/NumList &gt; first &gt; upperAlpha" NumberingContinue="false">+<ParagraphStyleRange NumberingStartAt="4" AppliedParagraphStyle="ParagraphStyle/NumList &gt; first &gt; beginsWith-4 &gt; upperAlpha" NumberingContinue="false">   <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">     <Content>Upper Alpha</Content>   </CharacterStyleRange>@@ -1186,13 +1186,13 @@   </CharacterStyleRange> </ParagraphStyleRange> <Br />-<ParagraphStyleRange NumberingStartAt="6" AppliedParagraphStyle="ParagraphStyle/NumList &gt; NumList &gt; NumList &gt; first &gt; beginsWith-6" NumberingContinue="false">+<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/NumList &gt; NumList &gt; NumList &gt; first" NumberingContinue="false">   <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">-    <Content>Decimal start with 6</Content>+    <Content>Decimal start with 1</Content>   </CharacterStyleRange> </ParagraphStyleRange> <Br />-<ParagraphStyleRange NumberingStartAt="3" AppliedParagraphStyle="ParagraphStyle/NumList &gt; NumList &gt; NumList &gt; NumList &gt; first &gt; beginsWith-3 &gt; lowerAlpha" NumberingContinue="false">+<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/NumList &gt; NumList &gt; NumList &gt; NumList &gt; first &gt; lowerAlpha" NumberingContinue="false">   <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">     <Content>Lower alpha with paren</Content>   </CharacterStyleRange>
test/writer.jats_archiving view
@@ -361,11 +361,9 @@         <p>with a continuation</p>         <list list-type="roman-lower">           <list-item>-            <label>iv.</label>-            <p>sublist with roman numerals, starting with 4</p>+            <p>sublist with roman numerals starting with i.</p>           </list-item>           <list-item>-            <label>v.</label>             <p>more items</p>             <list list-type="alpha-upper">               <list-item>@@ -384,17 +382,18 @@     <p>Nesting:</p>     <list list-type="alpha-upper">       <list-item>+        <label>D.</label>         <p>Upper Alpha</p>         <list list-type="roman-upper">           <list-item>             <p>Upper Roman.</p>             <list list-type="order">               <list-item>-                <label>(6)</label>-                <p>Decimal start with 6</p>+                <label>(1)</label>+                <p>Decimal start with 1</p>                 <list list-type="alpha-lower">                   <list-item>-                    <label>c)</label>+                    <label>a)</label>                     <p>Lower alpha with paren</p>                   </list-item>                 </list>@@ -576,27 +575,15 @@ <sec id="html-blocks">   <title>HTML Blocks</title>   <p>Simple block on one line:</p>-  <boxed-text>-    <p>foo</p>-  </boxed-text>+  <p>foo</p>   <p>And nested without indentation:</p>-  <boxed-text>-    <boxed-text>-      <boxed-text>-        <p>foo</p>-      </boxed-text>-    </boxed-text>-    <boxed-text>-      <p>bar</p>-    </boxed-text>-  </boxed-text>+  <p>foo</p>+  <p>bar</p>   <p>Interpreted markdown in a table:</p>   <p>This is <italic>emphasized</italic></p>   <p>And this is <bold>strong</bold></p>   <p>Here’s a simple block:</p>-  <boxed-text>-    <p>foo</p>-  </boxed-text>+  <p>foo</p>   <p>This should be a code block, though:</p>   <preformat>&lt;div&gt;     foo@@ -604,13 +591,7 @@   <p>As should this:</p>   <preformat>&lt;div&gt;foo&lt;/div&gt;</preformat>   <p>Now, nested:</p>-  <boxed-text>-    <boxed-text>-      <boxed-text>-        <p>foo</p>-      </boxed-text>-    </boxed-text>-  </boxed-text>+  <p>foo</p>   <p>This should just be an HTML comment:</p>   <p>Multiline:</p>   <p>Code block:</p>
test/writer.jats_articleauthoring view
@@ -358,11 +358,9 @@         <p>with a continuation</p>         <list list-type="order">           <list-item>-            <label>iv.</label>-            <p>sublist with roman numerals, starting with 4</p>+            <p>sublist with roman numerals starting with i.</p>           </list-item>           <list-item>-            <label>v.</label>             <p>more items</p>             <list list-type="order">               <list-item>@@ -381,17 +379,18 @@     <p>Nesting:</p>     <list list-type="order">       <list-item>+        <label>D.</label>         <p>Upper Alpha</p>         <list list-type="order">           <list-item>             <p>Upper Roman.</p>             <list list-type="order">               <list-item>-                <label>(6)</label>-                <p>Decimal start with 6</p>+                <label>(1)</label>+                <p>Decimal start with 1</p>                 <list list-type="order">                   <list-item>-                    <label>c)</label>+                    <label>a)</label>                     <p>Lower alpha with paren</p>                   </list-item>                 </list>@@ -573,27 +572,15 @@ <sec id="html-blocks">   <title>HTML Blocks</title>   <p>Simple block on one line:</p>-  <boxed-text>-    <p>foo</p>-  </boxed-text>+  <p>foo</p>   <p>And nested without indentation:</p>-  <boxed-text>-    <boxed-text>-      <boxed-text>-        <p>foo</p>-      </boxed-text>-    </boxed-text>-    <boxed-text>-      <p>bar</p>-    </boxed-text>-  </boxed-text>+  <p>foo</p>+  <p>bar</p>   <p>Interpreted markdown in a table:</p>   <p>This is <italic>emphasized</italic></p>   <p>And this is <bold>strong</bold></p>   <p>Here’s a simple block:</p>-  <boxed-text>-    <p>foo</p>-  </boxed-text>+  <p>foo</p>   <p>This should be a code block, though:</p>   <preformat>&lt;div&gt;     foo@@ -601,13 +588,7 @@   <p>As should this:</p>   <preformat>&lt;div&gt;foo&lt;/div&gt;</preformat>   <p>Now, nested:</p>-  <boxed-text>-    <boxed-text>-      <boxed-text>-        <p>foo</p>-      </boxed-text>-    </boxed-text>-  </boxed-text>+  <p>foo</p>   <p>This should just be an HTML comment:</p>   <p>Multiline:</p>   <p>Code block:</p>
test/writer.jats_publishing view
@@ -361,11 +361,9 @@         <p>with a continuation</p>         <list list-type="roman-lower">           <list-item>-            <label>iv.</label>-            <p>sublist with roman numerals, starting with 4</p>+            <p>sublist with roman numerals starting with i.</p>           </list-item>           <list-item>-            <label>v.</label>             <p>more items</p>             <list list-type="alpha-upper">               <list-item>@@ -384,17 +382,18 @@     <p>Nesting:</p>     <list list-type="alpha-upper">       <list-item>+        <label>D.</label>         <p>Upper Alpha</p>         <list list-type="roman-upper">           <list-item>             <p>Upper Roman.</p>             <list list-type="order">               <list-item>-                <label>(6)</label>-                <p>Decimal start with 6</p>+                <label>(1)</label>+                <p>Decimal start with 1</p>                 <list list-type="alpha-lower">                   <list-item>-                    <label>c)</label>+                    <label>a)</label>                     <p>Lower alpha with paren</p>                   </list-item>                 </list>@@ -576,27 +575,15 @@ <sec id="html-blocks">   <title>HTML Blocks</title>   <p>Simple block on one line:</p>-  <boxed-text>-    <p>foo</p>-  </boxed-text>+  <p>foo</p>   <p>And nested without indentation:</p>-  <boxed-text>-    <boxed-text>-      <boxed-text>-        <p>foo</p>-      </boxed-text>-    </boxed-text>-    <boxed-text>-      <p>bar</p>-    </boxed-text>-  </boxed-text>+  <p>foo</p>+  <p>bar</p>   <p>Interpreted markdown in a table:</p>   <p>This is <italic>emphasized</italic></p>   <p>And this is <bold>strong</bold></p>   <p>Here’s a simple block:</p>-  <boxed-text>-    <p>foo</p>-  </boxed-text>+  <p>foo</p>   <p>This should be a code block, though:</p>   <preformat>&lt;div&gt;     foo@@ -604,13 +591,7 @@   <p>As should this:</p>   <preformat>&lt;div&gt;foo&lt;/div&gt;</preformat>   <p>Now, nested:</p>-  <boxed-text>-    <boxed-text>-      <boxed-text>-        <p>foo</p>-      </boxed-text>-    </boxed-text>-  </boxed-text>+  <p>foo</p>   <p>This should just be an HTML comment:</p>   <p>Multiline:</p>   <p>Code block:</p>
test/writer.jira view
@@ -172,7 +172,7 @@ # begins with 2 # and now 3 with a continuation-## sublist with roman numerals, starting with 4+## sublist with roman numerals starting with i. ## more items ### a subsublist ### a subsublist@@ -181,7 +181,7 @@  # Upper Alpha ## Upper Roman.-### Decimal start with 6+### Decimal start with 1 #### Lower alpha with paren  Autonumbering:
test/writer.latex view
@@ -65,6 +65,10 @@ \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available \urlstyle{same} \VerbatimFootnotes % allow verbatim text in footnotes+% fallback for those not using the hyperref driver hyperxmp:+\makeatletter+\@ifundefined{xmpquote}{\newcommand{\xmpquote}[1]{#1}}{}+\makeatother \hypersetup{   pdftitle={Pandoc Test Suite},   pdfauthor={John MacFarlane; Anonymous},@@ -428,10 +432,9 @@    \begin{enumerate}   \def\labelenumii{\roman{enumii}.}-  \setcounter{enumii}{3}   \tightlist   \item-    sublist with roman numerals, starting with 4+    sublist with roman numerals starting with i.   \item     more items @@ -450,6 +453,7 @@  \begin{enumerate} \def\labelenumi{\Alph{enumi}.}+\setcounter{enumi}{3} \tightlist \item   Upper Alpha@@ -462,14 +466,12 @@      \begin{enumerate}     \def\labelenumiii{(\arabic{enumiii})}-    \setcounter{enumiii}{5}     \tightlist     \item-      Decimal start with 6+      Decimal start with 1        \begin{enumerate}       \def\labelenumiv{\alph{enumiv})}-      \setcounter{enumiv}{2}       \tightlist       \item         Lower alpha with paren
test/writer.man view
@@ -254,9 +254,9 @@ .RS 4 .PP with a continuation-.IP "iv." 4-sublist with roman numerals, starting with 4-.IP " v." 4+.IP " i." 4+sublist with roman numerals starting with i.+.IP "ii." 4 more items .RS 4 .IP "(A)" 4@@ -267,16 +267,16 @@ .RE .PP Nesting:-.IP "A." 3+.IP "D." 3 Upper Alpha .RS 4 .IP "I." 3 Upper Roman. .RS 4-.IP "(6)" 4-Decimal start with 6+.IP "(1)" 4+Decimal start with 1 .RS 4-.IP "c)" 3+.IP "a)" 3 Lower alpha with paren .RE .RE@@ -359,27 +359,40 @@ .TP apple red fruit+.RS computer+.RE .TP orange orange fruit+.RS bank+.RE .PP Multiple definitions, loose: .TP apple red fruit+.RS+.PP computer+.RE .TP orange orange fruit+.RS+.PP bank+.RE .PP Blank line after term, indented marker, alternate markers: .TP apple red fruit+.RS+.PP computer+.RE .TP orange orange fruit
test/writer.markdown view
@@ -230,17 +230,17 @@      with a continuation -    iv. sublist with roman numerals, starting with 4-    v.  more items+    i.  sublist with roman numerals starting with i.+    ii. more items         (A) a subsublist         (B) a subsublist  Nesting: -A.  Upper Alpha+D.  Upper Alpha     I.  Upper Roman.-        (6) Decimal start with 6-            c)  Lower alpha with paren+        (1) Decimal start with 1+            a)  Lower alpha with paren  Autonumbering: @@ -261,93 +261,93 @@ Tight using spaces:  apple-:   red fruit+: red fruit  orange-:   orange fruit+: orange fruit  banana-:   yellow fruit+: yellow fruit  Tight using tabs:  apple-:   red fruit+: red fruit  orange-:   orange fruit+: orange fruit  banana-:   yellow fruit+: yellow fruit  Loose:  apple -:   red fruit+: red fruit  orange -:   orange fruit+: orange fruit  banana -:   yellow fruit+: yellow fruit  Multiple blocks with italics:  *apple* -:   red fruit+: red fruit -    contains seeds, crisp, pleasant to taste+  contains seeds, crisp, pleasant to taste  *orange* -:   orange fruit+: orange fruit -        { orange code block }+      { orange code block } -    > orange block quote+  > orange block quote  Multiple definitions, tight:  apple-:   red fruit-:   computer+: red fruit+: computer  orange-:   orange fruit-:   bank+: orange fruit+: bank  Multiple definitions, loose:  apple -:   red fruit+: red fruit -:   computer+: computer  orange -:   orange fruit+: orange fruit -:   bank+: bank  Blank line after term, indented marker, alternate markers:  apple -:   red fruit+: red fruit -:   computer+: computer  orange -:   orange fruit+: orange fruit -    1.  sublist-    2.  sublist+  1.  sublist+  2.  sublist  # HTML Blocks 
test/writer.markua view
@@ -192,7 +192,7 @@  1. Item 1, graf one. -    Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.+   Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.  2. Item 2. @@ -209,9 +209,9 @@  1. First 2. Second:-    * Fee-    * Fie-    * Foe+   * Fee+   * Fie+   * Foe 3. Third  Same thing but with paragraphs:@@ -220,9 +220,9 @@  2. Second: -    * Fee-    * Fie-    * Foe+   * Fee+   * Fie+   * Foe  3. Third @@ -244,25 +244,25 @@  3) and now 3 -    with a continuation+   with a continuation -    iv. sublist with roman numerals, starting with 4-    v. more items-        A) a subsublist-        B) a subsublist+   i. sublist with roman numerals starting with i.+   ii. more items+       A) a subsublist+       B) a subsublist  Nesting: -A. Upper Alpha-    I. Upper Roman.-        6) Decimal start with 6-            c) Lower alpha with paren+D. Upper Alpha+   I. Upper Roman.+      1) Decimal start with 1+         a) Lower alpha with paren  Autonumbering:  1. Autonumber. 2. More.-    1. Nested.+   1. Nested.  Should not be a list item: 
test/writer.mediawiki view
@@ -1,6 +1,5 @@ This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite. - -----  <span id="headers"></span>@@ -34,7 +33,6 @@  with no blank line - -----  <span id="paragraphs"></span>@@ -49,7 +47,6 @@ There should be a hard line break<br /> here. - -----  <span id="block-quotes"></span>@@ -74,12 +71,12 @@ <blockquote>nested </blockquote> <blockquote>nested-</blockquote></blockquote>+</blockquote>+</blockquote> This should not be a block quote: 2 &gt; 1.  And a following paragraph. - -----  <span id="code-blocks"></span>@@ -219,28 +216,23 @@ <li><p>begins with 2</p></li> <li><p>and now 3</p> <p>with a continuation</p>-<ol start="4" style="list-style-type: lower-roman;">-<li>sublist with roman numerals, starting with 4</li>+<ol style="list-style-type: lower-roman;">+<li>sublist with roman numerals starting with i.</li> <li>more items <ol style="list-style-type: upper-alpha;"> <li>a subsublist</li>-<li>a subsublist</li></ol>-</li></ol>-</li></ol>+<li>a subsublist</li></ol></li></ol></li></ol>  Nesting: -<ol style="list-style-type: upper-alpha;">+<ol start="4" style="list-style-type: upper-alpha;"> <li>Upper Alpha <ol style="list-style-type: upper-roman;"> <li>Upper Roman.-<ol start="6" style="list-style-type: decimal;">-<li>Decimal start with 6-<ol start="3" style="list-style-type: lower-alpha;">-<li>Lower alpha with paren</li></ol>-</li></ol>-</li></ol>-</li></ol>+<ol style="list-style-type: decimal;">+<li>Decimal start with 1+<ol style="list-style-type: lower-alpha;">+<li>Lower alpha with paren</li></ol></li></ol></li></ol></li></ol>  Autonumbering: @@ -254,7 +246,6 @@  B. Williams - -----  <span id="definition-lists"></span>@@ -296,7 +287,8 @@ <dt>''orange''</dt> <dd><p>orange fruit</p> <pre>{ orange code block }</pre>-<blockquote><p>orange block quote</p></blockquote></dd></dl>+<blockquote><p>orange block quote</p>+</blockquote></dd></dl>  Multiple definitions, tight: @@ -332,31 +324,26 @@ Simple block on one line:  <div>- foo- </div>+ And nested without indentation:  <div>- <div>- <div>- foo - </div>  </div>-<div> +<div> bar- </div>  </div>+ Interpreted markdown in a table:  <table>@@ -373,11 +360,10 @@ Here’s a simple block:  <div>- foo - </div>+ This should be a code block, though:  <pre>&lt;div&gt;@@ -389,18 +375,15 @@ Now, nested:  <div>- <div>- <div>- foo- </div>  </div>  </div>+ This should just be an HTML comment:  <!-- Comment -->@@ -463,7 +446,6 @@  These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. - -----  <span id="smart-quotes-ellipses-dashes"></span>@@ -485,13 +467,12 @@  Ellipses…and…and…. - -----  <span id="latex"></span> = LaTeX = -* +* * <math display="inline">2+2=4</math> * <math display="inline">x \in y</math> * <math display="inline">\alpha \wedge \omega</math>@@ -509,8 +490,6 @@  Here’s a LaTeX table: -- -----  <span id="special-characters"></span>@@ -566,7 +545,6 @@  Minus: - - -----  <span id="links"></span>@@ -651,12 +629,10 @@ From “Voyage dans la Lune” by Georges Melies (1902):  <div class="figure">- [[File:lalune.jpg|lalune]]- </div>-Here is a movie [[File:movie.jpg|movie]] icon. +Here is a movie [[File:movie.jpg|movie]] icon.  ----- 
test/writer.ms view
@@ -394,9 +394,9 @@ .RS 5 .LP with a continuation-.IP " iv." 5-sublist with roman numerals, starting with 4-.IP "  v." 5+.IP "  i." 5+sublist with roman numerals starting with i.+.IP " ii." 5 more items .RS 5 .IP " (A)" 5@@ -407,16 +407,16 @@ .RE .LP Nesting:-.IP " A." 4+.IP " D." 4 Upper Alpha .RS 4 .IP " I." 4 Upper Roman. .RS 4-.IP " (6)" 5-Decimal start with 6+.IP " (1)" 5+Decimal start with 1 .RS 5-.IP " c)" 4+.IP " a)" 4 Lower alpha with paren .RE .RE
test/writer.muse view
@@ -223,17 +223,17 @@      with a continuation -    iv. sublist with roman numerals, starting with 4-    v. more items-       A. a subsublist-       B. a subsublist+    i. sublist with roman numerals starting with i.+    ii. more items+        A. a subsublist+        B. a subsublist  Nesting: - A. Upper Alpha+ D. Upper Alpha     I. Upper Roman.-       6. Decimal start with 6-          c. Lower alpha with paren+       1. Decimal start with 1+          a. Lower alpha with paren  Autonumbering: 
test/writer.native view
@@ -572,7 +572,7 @@         , Para             [ Str "with" , Space , Str "a" , Space , Str "continuation" ]         , OrderedList-            ( 4 , LowerRoman , Period )+            ( 1 , LowerRoman , Period )             [ [ Plain                   [ Str "sublist"                   , Space@@ -580,13 +580,13 @@                   , Space                   , Str "roman"                   , Space-                  , Str "numerals,"+                  , Str "numerals"                   , SoftBreak                   , Str "starting"                   , Space                   , Str "with"                   , Space-                  , Str "4"+                  , Str "i."                   ]               ]             , [ Plain [ Str "more" , Space , Str "items" ]@@ -601,13 +601,13 @@       ]   , Para [ Str "Nesting:" ]   , OrderedList-      ( 1 , UpperAlpha , Period )+      ( 4 , UpperAlpha , Period )       [ [ Plain [ Str "Upper" , Space , Str "Alpha" ]         , OrderedList             ( 1 , UpperRoman , Period )             [ [ Plain [ Str "Upper" , Space , Str "Roman." ]               , OrderedList-                  ( 6 , Decimal , TwoParens )+                  ( 1 , Decimal , TwoParens )                   [ [ Plain                         [ Str "Decimal"                         , Space@@ -615,10 +615,10 @@                         , Space                         , Str "with"                         , Space-                        , Str "6"+                        , Str "1"                         ]                     , OrderedList-                        ( 3 , LowerAlpha , OneParen )+                        ( 1 , LowerAlpha , OneParen )                         [ [ Plain                               [ Str "Lower"                               , Space
test/writer.opendocument view
@@ -4,1908 +4,958 @@     <style:font-face style:name="Courier New" style:font-family-generic="modern" style:font-pitch="fixed" svg:font-family="'Courier New'" />   </office:font-face-decls>   <office:automatic-styles>-    <text:list-style style:name="L1">-      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-number>-    </text:list-style>-    <text:list-style style:name="L2">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L3">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L4">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L5">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L6">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L7">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L8">-      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-number>-    </text:list-style>-    <text:list-style style:name="L9">-      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-number>-    </text:list-style>-    <text:list-style style:name="L10">-      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-number>-    </text:list-style>-    <text:list-style style:name="L11">-      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-number>-    </text:list-style>-    <text:list-style style:name="L12">-      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-number>-    </text:list-style>-    <text:list-style style:name="L13">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L14">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L15">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L16">-      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-number>-    </text:list-style>-    <text:list-style style:name="L17">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L18">-      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-number>-    </text:list-style>-    <text:list-style style:name="L19">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L20">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L21">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L22">-      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="2" style:num-prefix="(" style:num-suffix=")">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-number>-      <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="i" text:start-value="4" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-number>-      <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="A" text:start-value="1" style:num-prefix="(" style:num-suffix=")">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-number>-    </text:list-style>-    <text:list-style style:name="L23">-      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="A" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-number>-      <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="I" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-number>-      <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="6" style:num-prefix="(" style:num-suffix=")">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-number>-      <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-format="a" text:start-value="3" style:num-suffix=")">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-number>-    </text:list-style>-    <text:list-style style:name="L24">-      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-number>-      <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-number>-    </text:list-style>-    <text:list-style style:name="L25">-      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-number>-    </text:list-style>-    <text:list-style style:name="L26">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L27">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L28">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L29">-      <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.0in" fo:text-indent="-0.25in" fo:margin-left="1.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.0in" fo:text-indent="-0.25in" fo:margin-left="2.0in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-      <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in" />-        </style:list-level-properties>-      </text:list-level-style-bullet>-    </text:list-style>-    <text:list-style style:name="L30">-      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="1" text:start-value="1" style:num-suffix=".">-        <style:list-level-properties text:list-level-position-and-space-mode="label-alignment" fo:text-align="right">-          <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in" />-        </style:list-level-properties>-      </text:list-level-style-number>-    </text:list-style>-    <style:style style:name="T1" style:family="text"><style:text-properties fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic" /></style:style>-    <style:style style:name="T2" style:family="text"><style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold" /></style:style>-    <style:style style:name="T3" style:family="text"><style:text-properties fo:font-style="italic" fo:font-weight="bold" style:font-style-asian="italic" style:font-style-complex="italic" style:font-weight-asian="bold" style:font-weight-complex="bold" /></style:style>-    <style:style style:name="T4" style:family="text"><style:text-properties style:text-line-through-style="solid" /></style:style>-    <style:style style:name="T5" style:family="text"><style:text-properties fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic" style:text-line-through-style="solid" /></style:style>-    <style:style style:name="T6" style:family="text"><style:text-properties style:text-position="super 58%" /></style:style>-    <style:style style:name="T7" style:family="text"><style:text-properties fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic" style:text-position="super 58%" /></style:style>-    <style:style style:name="T8" style:family="text"><style:text-properties style:text-position="sub 58%" /></style:style>-    <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Formula"><style:graphic-properties style:vertical-pos="middle" style:vertical-rel="text" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" style:wrap="none" /></style:style>-    <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Formula"><style:graphic-properties style:vertical-pos="middle" style:vertical-rel="text" /></style:style>-    <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Quotations">-      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />-    </style:style>-    <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Quotations">-      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />-    </style:style>-    <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />-    </style:style>-    <style:style style:name="P4" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />-    </style:style>-    <style:style style:name="P5" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />-    </style:style>-    <style:style style:name="P6" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L1">-      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P7" style:family="paragraph" style:parent-style-name="Quotations">-      <style:paragraph-properties fo:margin-left="1.0in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />-    </style:style>-    <style:style style:name="P8" style:family="paragraph" style:parent-style-name="Quotations">-      <style:paragraph-properties fo:margin-left="1.0in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />-    </style:style>-    <style:style style:name="P9" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P10" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P11" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P12" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P13" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P14" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P15" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P16" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P17" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P18" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P19" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L2">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P20" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L3">-    </style:style>-    <style:style style:name="P21" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L4">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P22" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L5">-    </style:style>-    <style:style style:name="P23" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L6">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P24" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L7">-    </style:style>-    <style:style style:name="P25" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L8">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P26" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L9">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P27" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L10">-    </style:style>-    <style:style style:name="P28" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L11">-    </style:style>-    <style:style style:name="P29" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L12">-    </style:style>-    <style:style style:name="P30" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L13">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P31" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L14">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P32" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L15">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P33" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L16">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P34" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L17">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P35" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L18">-    </style:style>-    <style:style style:name="P36" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L19">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P37" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L20">-    </style:style>-    <style:style style:name="P38" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L21">-    </style:style>-    <style:style style:name="P39" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L22">-    </style:style>-    <style:style style:name="P40" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L23">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P41" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L24">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P42" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />-    </style:style>-    <style:style style:name="P43" style:family="paragraph" style:parent-style-name="Quotations">-      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />-    </style:style>-    <style:style style:name="P44" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L25">-      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P45" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P46" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P47" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P48" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P49" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P50" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P51" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L26">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P52" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L27">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P53" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L28">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P54" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P55" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L29">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-    <style:style style:name="P56" style:family="paragraph" style:parent-style-name="Quotations">-      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />-    </style:style>-    <style:style style:name="P57" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P58" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">-    </style:style>-    <style:style style:name="P59" style:family="paragraph" style:parent-style-name="Quotations">-      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />-    </style:style>-    <style:style style:name="P60" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L30">-      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" />-    </style:style>-  </office:automatic-styles>-<office:body>-<office:text>-<text:p text:style-name="Title">Pandoc Test Suite</text:p>-<text:p text:style-name="Author">John MacFarlane</text:p>-<text:p text:style-name="Author">Anonymous</text:p>-<text:p text:style-name="Date">July 17, 2006</text:p>-<text:p text:style-name="Text_20_body">This is a set of tests for pandoc. Most-of them are adapted from John Gruber’s markdown test suite.</text:p>-<text:p text:style-name="Horizontal_20_Line" />-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="headers" />Headers<text:bookmark-end text:name="headers" /></text:h>-<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="level-2-with-an-embedded-link" />Level-2 with an-<text:a xlink:type="simple" xlink:href="/url" office:name=""><text:span text:style-name="Definition">embedded-link</text:span></text:a><text:bookmark-end text:name="level-2-with-an-embedded-link" /></text:h>-<text:h text:style-name="Heading_20_3" text:outline-level="3"><text:bookmark-start text:name="level-3-with-emphasis" />Level-3 with-<text:span text:style-name="T1">emphasis</text:span><text:bookmark-end text:name="level-3-with-emphasis" /></text:h>-<text:h text:style-name="Heading_20_4" text:outline-level="4"><text:bookmark-start text:name="level-4" />Level-4<text:bookmark-end text:name="level-4" /></text:h>-<text:h text:style-name="Heading_20_5" text:outline-level="5"><text:bookmark-start text:name="level-5" />Level-5<text:bookmark-end text:name="level-5" /></text:h>-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="level-1" />Level-1<text:bookmark-end text:name="level-1" /></text:h>-<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="level-2-with-emphasis" />Level-2 with-<text:span text:style-name="T1">emphasis</text:span><text:bookmark-end text:name="level-2-with-emphasis" /></text:h>-<text:h text:style-name="Heading_20_3" text:outline-level="3"><text:bookmark-start text:name="level-3" />Level-3<text:bookmark-end text:name="level-3" /></text:h>-<text:p text:style-name="First_20_paragraph">with no blank line</text:p>-<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="level-2" />Level-2<text:bookmark-end text:name="level-2" /></text:h>-<text:p text:style-name="First_20_paragraph">with no blank line</text:p>-<text:p text:style-name="Horizontal_20_Line" />-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="paragraphs" />Paragraphs<text:bookmark-end text:name="paragraphs" /></text:h>-<text:p text:style-name="First_20_paragraph">Here’s a regular-paragraph.</text:p>-<text:p text:style-name="Text_20_body">In Markdown 1.0.0 and earlier. Version 8.-This line turns into a list item. Because a hard-wrapped line in the middle of a-paragraph looked like a list item.</text:p>-<text:p text:style-name="Text_20_body">Here’s one with a bullet. *-criminey.</text:p>-<text:p text:style-name="Text_20_body">There should be a hard line-break<text:line-break />here.</text:p>-<text:p text:style-name="Horizontal_20_Line" />-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="block-quotes" />Block-Quotes<text:bookmark-end text:name="block-quotes" /></text:h>-<text:p text:style-name="First_20_paragraph">E-mail style:</text:p>-<text:p text:style-name="P1">This is a block quote. It is pretty short.</text:p>-<text:p text:style-name="P2">Code in a block quote:</text:p>-<text:p text:style-name="P3">sub status {</text:p>-<text:p text:style-name="P4"><text:s text:c="4" />print &quot;working&quot;;</text:p>-<text:p text:style-name="P5">}</text:p>-<text:p text:style-name="P2">A list:</text:p>-<text:list text:style-name="L1">-  <text:list-item>-    <text:p text:style-name="P6">item one</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P6">item two</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="P2">Nested block quotes:</text:p>-<text:p text:style-name="P7">nested</text:p>-<text:p text:style-name="P8">nested</text:p>-<text:p text:style-name="First_20_paragraph">This should not be a block quote: 2-&gt; 1.</text:p>-<text:p text:style-name="Text_20_body">And a following paragraph.</text:p>-<text:p text:style-name="Horizontal_20_Line" />-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="code-blocks" />Code-Blocks<text:bookmark-end text:name="code-blocks" /></text:h>-<text:p text:style-name="First_20_paragraph">Code:</text:p>-<text:p text:style-name="P9">---- (should be four hyphens)</text:p>-<text:p text:style-name="P10"></text:p>-<text:p text:style-name="P11">sub status {</text:p>-<text:p text:style-name="P12"><text:s text:c="4" />print &quot;working&quot;;</text:p>-<text:p text:style-name="P13">}</text:p>-<text:p text:style-name="P14"></text:p>-<text:p text:style-name="P15">this code block is indented by one tab</text:p>-<text:p text:style-name="First_20_paragraph">And:</text:p>-<text:p text:style-name="P16"><text:s text:c="4" />this code block is indented by two tabs</text:p>-<text:p text:style-name="P17"></text:p>-<text:p text:style-name="P18">These should not be escaped: <text:s text:c="1" />\$ \\ \&gt; \[ \{</text:p>-<text:p text:style-name="Horizontal_20_Line" />-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="lists" />Lists<text:bookmark-end text:name="lists" /></text:h>-<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="unordered" />Unordered<text:bookmark-end text:name="unordered" /></text:h>-<text:p text:style-name="First_20_paragraph">Asterisks tight:</text:p>-<text:list text:style-name="L2">-  <text:list-item>-    <text:p text:style-name="P19">asterisk 1</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P19">asterisk 2</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P19">asterisk 3</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">Asterisks loose:</text:p>-<text:list text:style-name="L3">-  <text:list-item>-    <text:p text:style-name="P20">asterisk 1</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P20">asterisk 2</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P20">asterisk 3</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">Pluses tight:</text:p>-<text:list text:style-name="L4">-  <text:list-item>-    <text:p text:style-name="P21">Plus 1</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P21">Plus 2</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P21">Plus 3</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">Pluses loose:</text:p>-<text:list text:style-name="L5">-  <text:list-item>-    <text:p text:style-name="P22">Plus 1</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P22">Plus 2</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P22">Plus 3</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">Minuses tight:</text:p>-<text:list text:style-name="L6">-  <text:list-item>-    <text:p text:style-name="P23">Minus 1</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P23">Minus 2</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P23">Minus 3</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">Minuses loose:</text:p>-<text:list text:style-name="L7">-  <text:list-item>-    <text:p text:style-name="P24">Minus 1</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P24">Minus 2</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P24">Minus 3</text:p>-  </text:list-item>-</text:list>-<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="ordered" />Ordered<text:bookmark-end text:name="ordered" /></text:h>-<text:p text:style-name="First_20_paragraph">Tight:</text:p>-<text:list text:style-name="L8">-  <text:list-item>-    <text:p text:style-name="P25">First</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P25">Second</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P25">Third</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">and:</text:p>-<text:list text:style-name="L9">-  <text:list-item>-    <text:p text:style-name="P26">One</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P26">Two</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P26">Three</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">Loose using tabs:</text:p>-<text:list text:style-name="L10">-  <text:list-item>-    <text:p text:style-name="P27">First</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P27">Second</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P27">Third</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">and using spaces:</text:p>-<text:list text:style-name="L11">-  <text:list-item>-    <text:p text:style-name="P28">One</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P28">Two</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P28">Three</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">Multiple paragraphs:</text:p>-<text:list text:style-name="L12">-  <text:list-item>-    <text:p text:style-name="P29">Item 1, graf one.</text:p>-    <text:p text:style-name="P29">Item 1. graf two. The quick brown fox jumped-    over the lazy dog’s back.</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P29">Item 2.</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P29">Item 3.</text:p>-  </text:list-item>-</text:list>-<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="nested" />Nested<text:bookmark-end text:name="nested" /></text:h>-<text:list text:style-name="L13">-  <text:list-item>-    <text:p text:style-name="P30">Tab</text:p><text:list text:style-name="L14">-      <text:list-item>-        <text:p text:style-name="P31">Tab</text:p><text:list text:style-name="L15">-          <text:list-item>-            <text:p text:style-name="P32">Tab</text:p>-          </text:list-item>-        </text:list>-      </text:list-item>-    </text:list>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">Here’s another:</text:p>-<text:list text:style-name="L16">-  <text:list-item>-    <text:p text:style-name="P33">First</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P33">Second:</text:p>-    <text:list text:style-name="L17">-      <text:list-item>-        <text:p text:style-name="P34">Fee</text:p>-      </text:list-item>-      <text:list-item>-        <text:p text:style-name="P34">Fie</text:p>-      </text:list-item>-      <text:list-item>-        <text:p text:style-name="P34">Foe</text:p>-      </text:list-item>-    </text:list>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P33">Third</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">Same thing but with-paragraphs:</text:p>-<text:list text:style-name="L18">-  <text:list-item>-    <text:p text:style-name="P35">First</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P35">Second:</text:p>-    <text:list text:style-name="L19">-      <text:list-item>-        <text:p text:style-name="P36">Fee</text:p>-      </text:list-item>-      <text:list-item>-        <text:p text:style-name="P36">Fie</text:p>-      </text:list-item>-      <text:list-item>-        <text:p text:style-name="P36">Foe</text:p>-      </text:list-item>-    </text:list>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P35">Third</text:p>-  </text:list-item>-</text:list>-<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="tabs-and-spaces" />Tabs-and spaces<text:bookmark-end text:name="tabs-and-spaces" /></text:h>-<text:list text:style-name="L20">-  <text:list-item>-    <text:p text:style-name="P37">this is a list item indented with-    tabs</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P37">this is a list item indented with-    spaces</text:p><text:list text:style-name="L21">-      <text:list-item>-        <text:p text:style-name="P38">this is an example list item indented with-        tabs</text:p>-      </text:list-item>-      <text:list-item>-        <text:p text:style-name="P38">this is an example list item indented with-        spaces</text:p>-      </text:list-item>-    </text:list>-  </text:list-item>-</text:list>-<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="fancy-list-markers" />Fancy-list markers<text:bookmark-end text:name="fancy-list-markers" /></text:h>-<text:list text:style-name="L22">-  <text:list-item>-    <text:p text:style-name="P39">begins with 2</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P39">and now 3</text:p>-    <text:p text:style-name="P39">with a continuation</text:p>-    <text:list>-      <text:list-item>-        <text:p text:style-name="P39">sublist with roman numerals, starting with-        4</text:p>-      </text:list-item>-      <text:list-item>-        <text:p text:style-name="P39">more items</text:p>-        <text:list>-          <text:list-item>-            <text:p text:style-name="P39">a subsublist</text:p>-          </text:list-item>-          <text:list-item>-            <text:p text:style-name="P39">a subsublist</text:p>-          </text:list-item>-        </text:list>-      </text:list-item>-    </text:list>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">Nesting:</text:p>-<text:list text:style-name="L23">-  <text:list-item>-    <text:p text:style-name="P40">Upper Alpha</text:p>-    <text:list>-      <text:list-item>-        <text:p text:style-name="P40">Upper Roman.</text:p>-        <text:list>-          <text:list-item>-            <text:p text:style-name="P40">Decimal start with 6</text:p>-            <text:list>-              <text:list-item>-                <text:p text:style-name="P40">Lower alpha with paren</text:p>-              </text:list-item>-            </text:list>-          </text:list-item>-        </text:list>-      </text:list-item>-    </text:list>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">Autonumbering:</text:p>-<text:list text:style-name="L24">-  <text:list-item>-    <text:p text:style-name="P41">Autonumber.</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P41">More.</text:p>-    <text:list>-      <text:list-item>-        <text:p text:style-name="P41">Nested.</text:p>-      </text:list-item>-    </text:list>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">Should not be a list item:</text:p>-<text:p text:style-name="Text_20_body">M.A. 2007</text:p>-<text:p text:style-name="Text_20_body">B. Williams</text:p>-<text:p text:style-name="Horizontal_20_Line" />-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="definition-lists" />Definition-Lists<text:bookmark-end text:name="definition-lists" /></text:h>-<text:p text:style-name="First_20_paragraph">Tight using spaces:</text:p>-<text:p text:style-name="Definition_20_Term_20_Tight">apple</text:p>-<text:p text:style-name="Definition_20_Definition_20_Tight">red fruit</text:p>-<text:p text:style-name="Definition_20_Term_20_Tight">orange</text:p>-<text:p text:style-name="Definition_20_Definition_20_Tight">orange-fruit</text:p>-<text:p text:style-name="Definition_20_Term_20_Tight">banana</text:p>-<text:p text:style-name="Definition_20_Definition_20_Tight">yellow-fruit</text:p>-<text:p text:style-name="First_20_paragraph">Tight using tabs:</text:p>-<text:p text:style-name="Definition_20_Term_20_Tight">apple</text:p>-<text:p text:style-name="Definition_20_Definition_20_Tight">red fruit</text:p>-<text:p text:style-name="Definition_20_Term_20_Tight">orange</text:p>-<text:p text:style-name="Definition_20_Definition_20_Tight">orange-fruit</text:p>-<text:p text:style-name="Definition_20_Term_20_Tight">banana</text:p>-<text:p text:style-name="Definition_20_Definition_20_Tight">yellow-fruit</text:p>-<text:p text:style-name="First_20_paragraph">Loose:</text:p>-<text:p text:style-name="Definition_20_Term">apple</text:p>-<text:p text:style-name="Definition_20_Definition">red fruit</text:p>-<text:p text:style-name="Definition_20_Term">orange</text:p>-<text:p text:style-name="Definition_20_Definition">orange fruit</text:p>-<text:p text:style-name="Definition_20_Term">banana</text:p>-<text:p text:style-name="Definition_20_Definition">yellow fruit</text:p>-<text:p text:style-name="First_20_paragraph">Multiple blocks with-italics:</text:p>-<text:p text:style-name="Definition_20_Term"><text:span text:style-name="T1">apple</text:span></text:p>-<text:p text:style-name="Definition_20_Definition">red-fruit</text:p><text:p text:style-name="Definition_20_Definition">contains seeds,-crisp, pleasant to taste</text:p>-<text:p text:style-name="Definition_20_Term"><text:span text:style-name="T1">orange</text:span></text:p>-<text:p text:style-name="Definition_20_Definition">orange-fruit</text:p><text:p text:style-name="P42">{ orange code block }</text:p><text:p text:style-name="P43">orange-block quote</text:p>-<text:p text:style-name="First_20_paragraph">Multiple definitions,-tight:</text:p>-<text:p text:style-name="Definition_20_Term_20_Tight">apple</text:p>-<text:p text:style-name="Definition_20_Definition_20_Tight">red fruit</text:p>-<text:p text:style-name="Definition_20_Definition_20_Tight">computer</text:p>-<text:p text:style-name="Definition_20_Term_20_Tight">orange</text:p>-<text:p text:style-name="Definition_20_Definition_20_Tight">orange-fruit</text:p>-<text:p text:style-name="Definition_20_Definition_20_Tight">bank</text:p>-<text:p text:style-name="First_20_paragraph">Multiple definitions,-loose:</text:p>-<text:p text:style-name="Definition_20_Term">apple</text:p>-<text:p text:style-name="Definition_20_Definition">red fruit</text:p>-<text:p text:style-name="Definition_20_Definition">computer</text:p>-<text:p text:style-name="Definition_20_Term">orange</text:p>-<text:p text:style-name="Definition_20_Definition">orange fruit</text:p>-<text:p text:style-name="Definition_20_Definition">bank</text:p>-<text:p text:style-name="First_20_paragraph">Blank line after term, indented-marker, alternate markers:</text:p>-<text:p text:style-name="Definition_20_Term">apple</text:p>-<text:p text:style-name="Definition_20_Definition">red fruit</text:p>-<text:p text:style-name="Definition_20_Definition">computer</text:p>-<text:p text:style-name="Definition_20_Term">orange</text:p>-<text:p text:style-name="Definition_20_Definition">orange-fruit</text:p><text:list text:style-name="L25">-  <text:list-item>-    <text:p text:style-name="P44">sublist</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P44">sublist</text:p>-  </text:list-item>-</text:list>-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="html-blocks" />HTML-Blocks<text:bookmark-end text:name="html-blocks" /></text:h>-<text:p text:style-name="First_20_paragraph">Simple block on one line:</text:p>-<text:p text:style-name="Text_20_body">foo</text:p>-<text:p text:style-name="Text_20_body">And nested without indentation:</text:p>-<text:p text:style-name="Text_20_body">foo</text:p>-<text:p text:style-name="Text_20_body">bar</text:p>-<text:p text:style-name="Text_20_body">Interpreted markdown in a table:</text:p>-<text:p text:style-name="Text_20_body">This is-<text:span text:style-name="T1">emphasized</text:span></text:p>-<text:p text:style-name="Text_20_body">And this is-<text:span text:style-name="T2">strong</text:span></text:p>-<text:p text:style-name="Text_20_body">Here’s a simple block:</text:p>-<text:p text:style-name="Text_20_body">foo</text:p>-<text:p text:style-name="Text_20_body">This should be a code block,-though:</text:p>-<text:p text:style-name="P45">&lt;div&gt;</text:p>-<text:p text:style-name="P46"><text:s text:c="4" />foo</text:p>-<text:p text:style-name="P47">&lt;/div&gt;</text:p>-<text:p text:style-name="First_20_paragraph">As should this:</text:p>-<text:p text:style-name="P48">&lt;div&gt;foo&lt;/div&gt;</text:p>-<text:p text:style-name="First_20_paragraph">Now, nested:</text:p>-<text:p text:style-name="Text_20_body">foo</text:p>-<text:p text:style-name="Text_20_body">This should just be an HTML-comment:</text:p>-<text:p text:style-name="Text_20_body">Multiline:</text:p>-<text:p text:style-name="Text_20_body">Code block:</text:p>-<text:p text:style-name="P49">&lt;!-- Comment --&gt;</text:p>-<text:p text:style-name="First_20_paragraph">Just plain comment, with trailing-spaces on the line:</text:p>-<text:p text:style-name="Text_20_body">Code:</text:p>-<text:p text:style-name="P50">&lt;hr /&gt;</text:p>-<text:p text:style-name="First_20_paragraph">Hr’s:</text:p>-<text:p text:style-name="Horizontal_20_Line" />-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="inline-markup" />Inline-Markup<text:bookmark-end text:name="inline-markup" /></text:h>-<text:p text:style-name="First_20_paragraph">This is-<text:span text:style-name="T1">emphasized</text:span>, and so-<text:span text:style-name="T1">is this</text:span>.</text:p>-<text:p text:style-name="Text_20_body">This is-<text:span text:style-name="T2">strong</text:span>, and so-<text:span text:style-name="T2">is this</text:span>.</text:p>-<text:p text:style-name="Text_20_body">An-<text:a xlink:type="simple" xlink:href="/url" office:name=""><text:span text:style-name="Definition"><text:span text:style-name="T1">emphasized-link</text:span></text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body"><text:span text:style-name="T3">This is-strong and em.</text:span></text:p>-<text:p text:style-name="Text_20_body">So is-<text:span text:style-name="T3">this</text:span> word.</text:p>-<text:p text:style-name="Text_20_body"><text:span text:style-name="T3">This is-strong and em.</text:span></text:p>-<text:p text:style-name="Text_20_body">So is-<text:span text:style-name="T3">this</text:span> word.</text:p>-<text:p text:style-name="Text_20_body">This is code:-<text:span text:style-name="Source_Text">&gt;</text:span>,-<text:span text:style-name="Source_Text">$</text:span>,-<text:span text:style-name="Source_Text">\</text:span>,-<text:span text:style-name="Source_Text">\$</text:span>,-<text:span text:style-name="Source_Text">&lt;html&gt;</text:span>.</text:p>-<text:p text:style-name="Text_20_body"><text:span text:style-name="T4">This is-</text:span><text:span text:style-name="T5">strikeout</text:span><text:span text:style-name="T4">.</text:span></text:p>-<text:p text:style-name="Text_20_body">Superscripts:-a<text:span text:style-name="T6">bc</text:span>d-a<text:span text:style-name="T7">hello</text:span>-a<text:span text:style-name="T6">hello there</text:span>.</text:p>-<text:p text:style-name="Text_20_body">Subscripts:-H<text:span text:style-name="T8">2</text:span>O,-H<text:span text:style-name="T8">23</text:span>O,-H<text:span text:style-name="T8">many of them</text:span>O.</text:p>-<text:p text:style-name="Text_20_body">These should not be superscripts or-subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.</text:p>-<text:p text:style-name="Horizontal_20_Line" />-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="smart-quotes-ellipses-dashes" />Smart-quotes, ellipses,-dashes<text:bookmark-end text:name="smart-quotes-ellipses-dashes" /></text:h>-<text:p text:style-name="First_20_paragraph">“Hello,” said the spider. “‘Shelob’-is my name.”</text:p>-<text:p text:style-name="Text_20_body">‘A’, ‘B’, and ‘C’ are letters.</text:p>-<text:p text:style-name="Text_20_body">‘Oak,’ ‘elm,’ and ‘beech’ are names of-trees. So is ‘pine.’</text:p>-<text:p text:style-name="Text_20_body">‘He said, “I want to go.”’ Were you alive-in the 70’s?</text:p>-<text:p text:style-name="Text_20_body">Here is some quoted-‘<text:span text:style-name="Source_Text">code</text:span>’ and a-“<text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">quoted-link</text:span></text:a>”.</text:p>-<text:p text:style-name="Text_20_body">Some dashes: one—two — three—four —-five.</text:p>-<text:p text:style-name="Text_20_body">Dashes between numbers: 5–7, 255–66,-1987–1999.</text:p>-<text:p text:style-name="Text_20_body">Ellipses…and…and….</text:p>-<text:p text:style-name="Horizontal_20_Line" />-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="latex" />LaTeX<text:bookmark-end text:name="latex" /></text:h>-<text:list text:style-name="L26">-  <text:list-item>-    <text:p text:style-name="P51"></text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P51">2 + 2 = 4</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P51"><text:span text:style-name="T1">x</text:span> ∈ <text:span text:style-name="T1">y</text:span></text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P51"><text:span text:style-name="T1">α</text:span> ∧ <text:span text:style-name="T1">ω</text:span></text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P51">223</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P51"><text:span text:style-name="T1">p</text:span>-Tree</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P51">Here’s some display math:-    $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P51">Here’s one that has a line break in it:-    <text:span text:style-name="T1">α</text:span> + <text:span text:style-name="T1">ω</text:span> × <text:span text:style-name="T1">x</text:span><text:span text:style-name="T6">2</text:span>.</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">These shouldn’t be math:</text:p>-<text:list text:style-name="L27">-  <text:list-item>-    <text:p text:style-name="P52">To get the famous equation, write-    <text:span text:style-name="Source_Text">$e = mc^2$</text:span>.</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P52">$22,000 is a-    <text:span text:style-name="T1">lot</text:span> of money. So is $34,000. (It-    worked if “lot” is emphasized.)</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P52">Shoes ($20) and socks ($5).</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P52">Escaped-    <text:span text:style-name="Source_Text">$</text:span>: $73-    <text:span text:style-name="T1">this should be emphasized</text:span>-    23$.</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">Here’s a LaTeX table:</text:p>-<text:p text:style-name="Horizontal_20_Line" />-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="special-characters" />Special-Characters<text:bookmark-end text:name="special-characters" /></text:h>-<text:p text:style-name="First_20_paragraph">Here is some unicode:</text:p>-<text:list text:style-name="L28">-  <text:list-item>-    <text:p text:style-name="P53">I hat: Î</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P53">o umlaut: ö</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P53">section: §</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P53">set membership: ∈</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P53">copyright: ©</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">AT&amp;T has an ampersand in their-name.</text:p>-<text:p text:style-name="Text_20_body">AT&amp;T is another way to write-it.</text:p>-<text:p text:style-name="Text_20_body">This &amp; that.</text:p>-<text:p text:style-name="Text_20_body">4 &lt; 5.</text:p>-<text:p text:style-name="Text_20_body">6 &gt; 5.</text:p>-<text:p text:style-name="Text_20_body">Backslash: \</text:p>-<text:p text:style-name="Text_20_body">Backtick: `</text:p>-<text:p text:style-name="Text_20_body">Asterisk: *</text:p>-<text:p text:style-name="Text_20_body">Underscore: _</text:p>-<text:p text:style-name="Text_20_body">Left brace: {</text:p>-<text:p text:style-name="Text_20_body">Right brace: }</text:p>-<text:p text:style-name="Text_20_body">Left bracket: [</text:p>-<text:p text:style-name="Text_20_body">Right bracket: ]</text:p>-<text:p text:style-name="Text_20_body">Left paren: (</text:p>-<text:p text:style-name="Text_20_body">Right paren: )</text:p>-<text:p text:style-name="Text_20_body">Greater-than: &gt;</text:p>-<text:p text:style-name="Text_20_body">Hash: #</text:p>-<text:p text:style-name="Text_20_body">Period: .</text:p>-<text:p text:style-name="Text_20_body">Bang: !</text:p>-<text:p text:style-name="Text_20_body">Plus: +</text:p>-<text:p text:style-name="Text_20_body">Minus: -</text:p>-<text:p text:style-name="Horizontal_20_Line" />-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="links" />Links<text:bookmark-end text:name="links" /></text:h>-<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="explicit" />Explicit<text:bookmark-end text:name="explicit" /></text:h>-<text:p text:style-name="First_20_paragraph">Just a-<text:a xlink:type="simple" xlink:href="/url/" office:name=""><text:span text:style-name="Definition">URL</text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/" office:name="title"><text:span text:style-name="Definition">URL-and title</text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/" office:name="title preceded by two spaces"><text:span text:style-name="Definition">URL-and title</text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/" office:name="title preceded by a tab"><text:span text:style-name="Definition">URL-and title</text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/" office:name="title with &quot;quotes&quot; in it"><text:span text:style-name="Definition">URL-and title</text:span></text:a></text:p>-<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/" office:name="title with single quotes"><text:span text:style-name="Definition">URL-and title</text:span></text:a></text:p>-<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/with_underscore" office:name=""><text:span text:style-name="Definition">with_underscore</text:span></text:a></text:p>-<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="mailto:nobody@nowhere.net" office:name=""><text:span text:style-name="Definition">Email-link</text:span></text:a></text:p>-<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="" office:name=""><text:span text:style-name="Definition">Empty</text:span></text:a>.</text:p>-<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="reference" />Reference<text:bookmark-end text:name="reference" /></text:h>-<text:p text:style-name="First_20_paragraph">Foo-<text:a xlink:type="simple" xlink:href="/url/" office:name=""><text:span text:style-name="Definition">bar</text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body">With-<text:a xlink:type="simple" xlink:href="/url/" office:name=""><text:span text:style-name="Definition">embedded-[brackets]</text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/" office:name=""><text:span text:style-name="Definition">b</text:span></text:a>-by itself should be a link.</text:p>-<text:p text:style-name="Text_20_body">Indented-<text:a xlink:type="simple" xlink:href="/url" office:name=""><text:span text:style-name="Definition">once</text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body">Indented-<text:a xlink:type="simple" xlink:href="/url" office:name=""><text:span text:style-name="Definition">twice</text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body">Indented-<text:a xlink:type="simple" xlink:href="/url" office:name=""><text:span text:style-name="Definition">thrice</text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body">This should [not][] be a link.</text:p>-<text:p text:style-name="P54">[not]: /url</text:p>-<text:p text:style-name="First_20_paragraph">Foo-<text:a xlink:type="simple" xlink:href="/url/" office:name="Title with &quot;quotes&quot; inside"><text:span text:style-name="Definition">bar</text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body">Foo-<text:a xlink:type="simple" xlink:href="/url/" office:name="Title with &quot;quote&quot; inside"><text:span text:style-name="Definition">biz</text:span></text:a>.</text:p>-<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="with-ampersands" />With-ampersands<text:bookmark-end text:name="with-ampersands" /></text:h>-<text:p text:style-name="First_20_paragraph">Here’s a-<text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">link-with an ampersand in the URL</text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body">Here’s a link with an amersand in the-link text:-<text:a xlink:type="simple" xlink:href="http://att.com/" office:name="AT&amp;T"><text:span text:style-name="Definition">AT&amp;T</text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body">Here’s an-<text:a xlink:type="simple" xlink:href="/script?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">inline-link</text:span></text:a>.</text:p>-<text:p text:style-name="Text_20_body">Here’s an-<text:a xlink:type="simple" xlink:href="/script?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">inline-link in pointy braces</text:span></text:a>.</text:p>-<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="autolinks" />Autolinks<text:bookmark-end text:name="autolinks" /></text:h>-<text:p text:style-name="First_20_paragraph">With an ampersand:-<text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">http://example.com/?foo=1&amp;bar=2</text:span></text:a></text:p>-<text:list text:style-name="L29">-  <text:list-item>-    <text:p text:style-name="P55">In a list?</text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P55"><text:a xlink:type="simple" xlink:href="http://example.com/" office:name=""><text:span text:style-name="Definition">http://example.com/</text:span></text:a></text:p>-  </text:list-item>-  <text:list-item>-    <text:p text:style-name="P55">It should.</text:p>-  </text:list-item>-</text:list>-<text:p text:style-name="First_20_paragraph">An e-mail address:-<text:a xlink:type="simple" xlink:href="mailto:nobody@nowhere.net" office:name=""><text:span text:style-name="Definition">nobody@nowhere.net</text:span></text:a></text:p>-<text:p text:style-name="P56">Blockquoted:-<text:a xlink:type="simple" xlink:href="http://example.com/" office:name=""><text:span text:style-name="Definition">http://example.com/</text:span></text:a></text:p>-<text:p text:style-name="First_20_paragraph">Auto-links should not occur here:-<text:span text:style-name="Source_Text">&lt;http://example.com/&gt;</text:span></text:p>-<text:p text:style-name="P57">or here: &lt;http://example.com/&gt;</text:p>-<text:p text:style-name="Horizontal_20_Line" />-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="images" />Images<text:bookmark-end text:name="images" /></text:h>-<text:p text:style-name="First_20_paragraph">From “Voyage dans la Lune” by-Georges Melies (1902):</text:p>-<text:p text:style-name="FigureWithCaption"><draw:frame draw:name="img1"><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p>-<text:p text:style-name="FigureCaption">lalune</text:p>-<text:p text:style-name="Text_20_body">Here is a movie-<draw:frame draw:name="img2"><draw:image xlink:href="movie.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame>-icon.</text:p>-<text:p text:style-name="Horizontal_20_Line" />-<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="footnotes" />Footnotes<text:bookmark-end text:name="footnotes" /></text:h>-<text:p text:style-name="First_20_paragraph">Here is a footnote-reference,<text:note text:id="ftn0" text:note-class="footnote"><text:note-citation>1</text:note-citation><text:note-body><text:p text:style-name="Footnote">Here-is the footnote. It can go anywhere after the footnote reference. It need not be-placed at the end of the document.</text:p></text:note-body></text:note> and-another.<text:note text:id="ftn1" text:note-class="footnote"><text:note-citation>2</text:note-citation><text:note-body><text:p text:style-name="Footnote">Here’s-the long note. This one contains multiple-blocks.</text:p><text:p text:style-name="Footnote">Subsequent blocks are-indented to show that they belong to the footnote (as with list-items).</text:p><text:p text:style-name="P58"><text:s text:c="2" />{ &lt;code&gt; }</text:p><text:p text:style-name="Footnote">If-you want, you can indent every line, but you can also be lazy and just indent-the first line of each block.</text:p></text:note-body></text:note> This should-<text:span text:style-name="T1">not</text:span> be a footnote reference, because-it contains a space.[^my note] Here is an inline-note.<text:note text:id="ftn2" text:note-class="footnote"><text:note-citation>3</text:note-citation><text:note-body><text:p text:style-name="Footnote">This-is <text:span text:style-name="T1">easier</text:span> to type. Inline notes may-contain-<text:a xlink:type="simple" xlink:href="http://google.com" office:name=""><text:span text:style-name="Definition">links</text:span></text:a>-and <text:span text:style-name="Source_Text">]</text:span> verbatim characters,-as well as [bracketed text].</text:p></text:note-body></text:note></text:p>-<text:p text:style-name="P59">Notes can go in-quotes.<text:note text:id="ftn3" text:note-class="footnote"><text:note-citation>4</text:note-citation><text:note-body><text:p text:style-name="Footnote">In-quote.</text:p></text:note-body></text:note></text:p>-<text:list text:style-name="L30">-  <text:list-item>-    <text:p text:style-name="P60">And in list+    <style:style style:name="T1" style:family="text"><style:text-properties fo:font-style="italic" fo:font-weight="bold" style:font-style-asian="italic" style:font-style-complex="italic" style:font-weight-asian="bold" style:font-weight-complex="bold" /></style:style>+    <style:style style:name="T2" style:family="text"><style:text-properties fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic" style:text-line-through-style="solid" /></style:style>+    <style:style style:name="T3" style:family="text"><style:text-properties fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic" style:text-position="super 58%" /></style:style>+    <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Formula"><style:graphic-properties style:vertical-pos="middle" style:vertical-rel="text" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" style:wrap="none" /></style:style>+    <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Formula"><style:graphic-properties style:vertical-pos="middle" style:vertical-rel="text" /></style:style>+    <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Quotations">+      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />+    </style:style>+    <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Quotations">+      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />+    </style:style>+    <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Quotations">+      <style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />+    </style:style>+    <text:list-style style:name="Pandoc_5f_Numbering_5f_1">+      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="1" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.0000in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="1" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.1972in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="1" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.3944in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-format="1" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.5916in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="5" text:style-name="Numbering_20_Symbols" style:num-format="1" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.7888in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="6" text:style-name="Numbering_20_Symbols" style:num-format="1" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.9860in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="7" text:style-name="Numbering_20_Symbols" style:num-format="1" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="1.1832in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="8" text:style-name="Numbering_20_Symbols" style:num-format="1" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="1.3804in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="9" text:style-name="Numbering_20_Symbols" style:num-format="1" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="1.5776in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="10" text:style-name="Numbering_20_Symbols" style:num-format="1" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="1.7748in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+    </text:list-style>+    <text:list-style style:name="Pandoc_5f_Numbering_5f_2">+      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="i" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.0000in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="i" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.1972in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="i" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.3944in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-format="i" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.5916in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="5" text:style-name="Numbering_20_Symbols" style:num-format="i" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.7888in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="6" text:style-name="Numbering_20_Symbols" style:num-format="i" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.9860in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="7" text:style-name="Numbering_20_Symbols" style:num-format="i" style:num-suffix=".">+        <style:list-level-properties text:space-before="1.1832in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="8" text:style-name="Numbering_20_Symbols" style:num-format="i" style:num-suffix=".">+        <style:list-level-properties text:space-before="1.3804in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="9" text:style-name="Numbering_20_Symbols" style:num-format="i" style:num-suffix=".">+        <style:list-level-properties text:space-before="1.5776in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="10" text:style-name="Numbering_20_Symbols" style:num-format="i" style:num-suffix=".">+        <style:list-level-properties text:space-before="1.7748in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+    </text:list-style>+    <text:list-style style:name="Pandoc_5f_Numbering_5f_5">+      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="I" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.0000in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="I" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.1972in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="I" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.3944in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-format="I" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.5916in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="5" text:style-name="Numbering_20_Symbols" style:num-format="I" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.7888in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="6" text:style-name="Numbering_20_Symbols" style:num-format="I" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.9860in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="7" text:style-name="Numbering_20_Symbols" style:num-format="I" style:num-suffix=".">+        <style:list-level-properties text:space-before="1.1832in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="8" text:style-name="Numbering_20_Symbols" style:num-format="I" style:num-suffix=".">+        <style:list-level-properties text:space-before="1.3804in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="9" text:style-name="Numbering_20_Symbols" style:num-format="I" style:num-suffix=".">+        <style:list-level-properties text:space-before="1.5776in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="10" text:style-name="Numbering_20_Symbols" style:num-format="I" style:num-suffix=".">+        <style:list-level-properties text:space-before="1.7748in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+    </text:list-style>+    <text:list-style style:name="Pandoc_5f_Numbering_5f_6">+      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="a" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.0000in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="a" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.1972in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="a" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.3944in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-format="a" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.5916in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="5" text:style-name="Numbering_20_Symbols" style:num-format="a" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.7888in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="6" text:style-name="Numbering_20_Symbols" style:num-format="a" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.9860in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="7" text:style-name="Numbering_20_Symbols" style:num-format="a" style:num-suffix=")">+        <style:list-level-properties text:space-before="1.1832in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="8" text:style-name="Numbering_20_Symbols" style:num-format="a" style:num-suffix=")">+        <style:list-level-properties text:space-before="1.3804in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="9" text:style-name="Numbering_20_Symbols" style:num-format="a" style:num-suffix=")">+        <style:list-level-properties text:space-before="1.5776in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="10" text:style-name="Numbering_20_Symbols" style:num-format="a" style:num-suffix=")">+        <style:list-level-properties text:space-before="1.7748in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+    </text:list-style>+    <text:list-style style:name="Pandoc_5f_Numbering_5f_4">+      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.0000in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.1972in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.3944in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.5916in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="5" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.7888in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="6" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-suffix=".">+        <style:list-level-properties text:space-before="0.9860in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="7" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-suffix=".">+        <style:list-level-properties text:space-before="1.1832in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="8" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-suffix=".">+        <style:list-level-properties text:space-before="1.3804in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="9" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-suffix=".">+        <style:list-level-properties text:space-before="1.5776in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="10" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-suffix=".">+        <style:list-level-properties text:space-before="1.7748in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+    </text:list-style>+    <text:list-style style:name="Pandoc_5f_Numbering_5f_3">+      <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.0000in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.1972in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.3944in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.5916in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="5" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.7888in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="6" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="0.9860in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="7" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="1.1832in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="8" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="1.3804in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="9" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="1.5776in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+      <text:list-level-style-number text:level="10" text:style-name="Numbering_20_Symbols" style:num-format="A" style:num-prefix="(" style:num-suffix=")">+        <style:list-level-properties text:space-before="1.7748in" text:min-label-width="0.1965in" text:min-label-distance="0.1in" />+      </text:list-level-style-number>+    </text:list-style>+  </office:automatic-styles>+<office:body>+<office:text>+<text:p text:style-name="Title">Pandoc Test Suite</text:p>+<text:p text:style-name="Author">John MacFarlane</text:p>+<text:p text:style-name="Author">Anonymous</text:p>+<text:p text:style-name="Date">July 17, 2006</text:p>+<text:p text:style-name="Text_20_body">This is a set of tests for pandoc. Most+of them are adapted from John Gruber’s markdown test suite.</text:p>+<text:p text:style-name="Horizontal_20_Line" />+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="headers" />Headers<text:bookmark-end text:name="headers" /></text:h>+<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="level-2-with-an-embedded-link" />Level+2 with an+<text:a xlink:type="simple" xlink:href="/url" office:name=""><text:span text:style-name="Definition">embedded+link</text:span></text:a><text:bookmark-end text:name="level-2-with-an-embedded-link" /></text:h>+<text:h text:style-name="Heading_20_3" text:outline-level="3"><text:bookmark-start text:name="level-3-with-emphasis" />Level+3 with+<text:span text:style-name="Emphasis">emphasis</text:span><text:bookmark-end text:name="level-3-with-emphasis" /></text:h>+<text:h text:style-name="Heading_20_4" text:outline-level="4"><text:bookmark-start text:name="level-4" />Level+4<text:bookmark-end text:name="level-4" /></text:h>+<text:h text:style-name="Heading_20_5" text:outline-level="5"><text:bookmark-start text:name="level-5" />Level+5<text:bookmark-end text:name="level-5" /></text:h>+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="level-1" />Level+1<text:bookmark-end text:name="level-1" /></text:h>+<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="level-2-with-emphasis" />Level+2 with+<text:span text:style-name="Emphasis">emphasis</text:span><text:bookmark-end text:name="level-2-with-emphasis" /></text:h>+<text:h text:style-name="Heading_20_3" text:outline-level="3"><text:bookmark-start text:name="level-3" />Level+3<text:bookmark-end text:name="level-3" /></text:h>+<text:p text:style-name="First_20_paragraph">with no blank line</text:p>+<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="level-2" />Level+2<text:bookmark-end text:name="level-2" /></text:h>+<text:p text:style-name="First_20_paragraph">with no blank line</text:p>+<text:p text:style-name="Horizontal_20_Line" />+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="paragraphs" />Paragraphs<text:bookmark-end text:name="paragraphs" /></text:h>+<text:p text:style-name="First_20_paragraph">Here’s a regular+paragraph.</text:p>+<text:p text:style-name="Text_20_body">In Markdown 1.0.0 and earlier. Version 8.+This line turns into a list item. Because a hard-wrapped line in the middle of a+paragraph looked like a list item.</text:p>+<text:p text:style-name="Text_20_body">Here’s one with a bullet. *+criminey.</text:p>+<text:p text:style-name="Text_20_body">There should be a hard line+break<text:line-break />here.</text:p>+<text:p text:style-name="Horizontal_20_Line" />+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="block-quotes" />Block+Quotes<text:bookmark-end text:name="block-quotes" /></text:h>+<text:p text:style-name="First_20_paragraph">E-mail style:</text:p>+<text:p text:style-name="Quotations">This is a block quote. It is pretty+short.</text:p>+<text:p text:style-name="Quotations">Code in a block quote:</text:p>+<text:p text:style-name="Preformatted_20_Text">sub status {</text:p>+<text:p text:style-name="Preformatted_20_Text"><text:s text:c="4" />print &quot;working&quot;;</text:p>+<text:p text:style-name="Preformatted_20_Text">}</text:p>+<text:p text:style-name="Quotations">A list:</text:p>+<text:list text:style-name="Numbering_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">item one</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">item two</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="Quotations">Nested block quotes:</text:p>+<text:p text:style-name="P1">nested</text:p>+<text:p text:style-name="P2">nested</text:p>+<text:p text:style-name="First_20_paragraph">This should not be a block quote: 2+&gt; 1.</text:p>+<text:p text:style-name="Text_20_body">And a following paragraph.</text:p>+<text:p text:style-name="Horizontal_20_Line" />+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="code-blocks" />Code+Blocks<text:bookmark-end text:name="code-blocks" /></text:h>+<text:p text:style-name="First_20_paragraph">Code:</text:p>+<text:p text:style-name="Preformatted_20_Text">---- (should be four hyphens)</text:p>+<text:p text:style-name="Preformatted_20_Text"></text:p>+<text:p text:style-name="Preformatted_20_Text">sub status {</text:p>+<text:p text:style-name="Preformatted_20_Text"><text:s text:c="4" />print &quot;working&quot;;</text:p>+<text:p text:style-name="Preformatted_20_Text">}</text:p>+<text:p text:style-name="Preformatted_20_Text"></text:p>+<text:p text:style-name="Preformatted_20_Text">this code block is indented by one tab</text:p>+<text:p text:style-name="First_20_paragraph">And:</text:p>+<text:p text:style-name="Preformatted_20_Text"><text:s text:c="4" />this code block is indented by two tabs</text:p>+<text:p text:style-name="Preformatted_20_Text"></text:p>+<text:p text:style-name="Preformatted_20_Text">These should not be escaped: <text:s text:c="1" />\$ \\ \&gt; \[ \{</text:p>+<text:p text:style-name="Horizontal_20_Line" />+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="lists" />Lists<text:bookmark-end text:name="lists" /></text:h>+<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="unordered" />Unordered<text:bookmark-end text:name="unordered" /></text:h>+<text:p text:style-name="First_20_paragraph">Asterisks tight:</text:p>+<text:list text:style-name="List_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">asterisk 1</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">asterisk 2</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">asterisk 3</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Asterisks loose:</text:p>+<text:list text:style-name="List_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Bullet">asterisk 1</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet">asterisk 2</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet">asterisk 3</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Pluses tight:</text:p>+<text:list text:style-name="List_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">Plus 1</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">Plus 2</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">Plus 3</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Pluses loose:</text:p>+<text:list text:style-name="List_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Bullet">Plus 1</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet">Plus 2</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet">Plus 3</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Minuses tight:</text:p>+<text:list text:style-name="List_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">Minus 1</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">Minus 2</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">Minus 3</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Minuses loose:</text:p>+<text:list text:style-name="List_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Bullet">Minus 1</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet">Minus 2</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet">Minus 3</text:p>+  </text:list-item>+</text:list>+<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="ordered" />Ordered<text:bookmark-end text:name="ordered" /></text:h>+<text:p text:style-name="First_20_paragraph">Tight:</text:p>+<text:list text:style-name="Numbering_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">First</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">Second</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">Third</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">and:</text:p>+<text:list text:style-name="Numbering_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">One</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">Two</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">Three</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Loose using tabs:</text:p>+<text:list text:style-name="Numbering_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Number">First</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number">Second</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number">Third</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">and using spaces:</text:p>+<text:list text:style-name="Numbering_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Number">One</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number">Two</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number">Three</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Multiple paragraphs:</text:p>+<text:list text:style-name="Numbering_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Number">Item 1, graf one.</text:p>+    <text:p text:style-name="List_20_Number">Item 1. graf two. The quick brown+    fox jumped over the lazy dog’s back.</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number">Item 2.</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number">Item 3.</text:p>+  </text:list-item>+</text:list>+<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="nested" />Nested<text:bookmark-end text:name="nested" /></text:h>+<text:list text:style-name="List_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">Tab</text:p><text:list text:style-name="List_20_1">+      <text:list-item>+        <text:p text:style-name="List_20_Bullet_20_Tight">Tab</text:p><text:list text:style-name="List_20_1">+          <text:list-item>+            <text:p text:style-name="List_20_Bullet_20_Tight">Tab</text:p>+          </text:list-item>+        </text:list>+      </text:list-item>+    </text:list>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Here’s another:</text:p>+<text:list text:style-name="Numbering_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">First</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">Second:</text:p>+    <text:list text:style-name="List_20_1">+      <text:list-item>+        <text:p text:style-name="List_20_Bullet_20_Tight">Fee</text:p>+      </text:list-item>+      <text:list-item>+        <text:p text:style-name="List_20_Bullet_20_Tight">Fie</text:p>+      </text:list-item>+      <text:list-item>+        <text:p text:style-name="List_20_Bullet_20_Tight">Foe</text:p>+      </text:list-item>+    </text:list>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">Third</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Same thing but with+paragraphs:</text:p>+<text:list text:style-name="Numbering_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Number">First</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number">Second:</text:p>+    <text:list text:style-name="List_20_1">+      <text:list-item>+        <text:p text:style-name="List_20_Bullet_20_Tight">Fee</text:p>+      </text:list-item>+      <text:list-item>+        <text:p text:style-name="List_20_Bullet_20_Tight">Fie</text:p>+      </text:list-item>+      <text:list-item>+        <text:p text:style-name="List_20_Bullet_20_Tight">Foe</text:p>+      </text:list-item>+    </text:list>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number">Third</text:p>+  </text:list-item>+</text:list>+<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="tabs-and-spaces" />Tabs+and spaces<text:bookmark-end text:name="tabs-and-spaces" /></text:h>+<text:list text:style-name="List_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Bullet">this is a list item indented with+    tabs</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet">this is a list item indented with+    spaces</text:p><text:list text:style-name="List_20_1">+      <text:list-item>+        <text:p text:style-name="List_20_Bullet">this is an example list item+        indented with tabs</text:p>+      </text:list-item>+      <text:list-item>+        <text:p text:style-name="List_20_Bullet">this is an example list item+        indented with spaces</text:p>+      </text:list-item>+    </text:list>+  </text:list-item>+</text:list>+<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="fancy-list-markers" />Fancy+list markers<text:bookmark-end text:name="fancy-list-markers" /></text:h>+<text:list text:style-name="Pandoc_5f_Numbering_5f_1" text:start-value="2">+  <text:list-item>+    <text:p text:style-name="List_20_Number">begins with 2</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number">and now 3</text:p>+    <text:p text:style-name="List_20_Number">with a continuation</text:p>+    <text:list text:style-name="Pandoc_5f_Numbering_5f_2">+      <text:list-item>+        <text:p text:style-name="List_20_Number_20_Tight">sublist with roman+        numerals starting with i.</text:p>+      </text:list-item>+      <text:list-item>+        <text:p text:style-name="List_20_Number_20_Tight">more items</text:p>+        <text:list text:style-name="Pandoc_5f_Numbering_5f_3">+          <text:list-item>+            <text:p text:style-name="List_20_Number_20_Tight">a+            subsublist</text:p>+          </text:list-item>+          <text:list-item>+            <text:p text:style-name="List_20_Number_20_Tight">a+            subsublist</text:p>+          </text:list-item>+        </text:list>+      </text:list-item>+    </text:list>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Nesting:</text:p>+<text:list text:style-name="Pandoc_5f_Numbering_5f_4" text:start-value="4">+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">Upper Alpha</text:p>+    <text:list text:style-name="Pandoc_5f_Numbering_5f_5">+      <text:list-item>+        <text:p text:style-name="List_20_Number_20_Tight">Upper Roman.</text:p>+        <text:list text:style-name="Pandoc_5f_Numbering_5f_1">+          <text:list-item>+            <text:p text:style-name="List_20_Number_20_Tight">Decimal start with+            1</text:p>+            <text:list text:style-name="Pandoc_5f_Numbering_5f_6">+              <text:list-item>+                <text:p text:style-name="List_20_Number_20_Tight">Lower alpha+                with paren</text:p>+              </text:list-item>+            </text:list>+          </text:list-item>+        </text:list>+      </text:list-item>+    </text:list>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Autonumbering:</text:p>+<text:list text:style-name="Numbering_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">Autonumber.</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">More.</text:p>+    <text:list text:style-name="Numbering_20_1">+      <text:list-item>+        <text:p text:style-name="List_20_Number_20_Tight">Nested.</text:p>+      </text:list-item>+    </text:list>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Should not be a list item:</text:p>+<text:p text:style-name="Text_20_body">M.A. 2007</text:p>+<text:p text:style-name="Text_20_body">B. Williams</text:p>+<text:p text:style-name="Horizontal_20_Line" />+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="definition-lists" />Definition+Lists<text:bookmark-end text:name="definition-lists" /></text:h>+<text:p text:style-name="First_20_paragraph">Tight using spaces:</text:p>+<text:p text:style-name="Definition_20_Term_20_Tight">apple</text:p>+<text:p text:style-name="Definition_20_Definition_20_Tight">red fruit</text:p>+<text:p text:style-name="Definition_20_Term_20_Tight">orange</text:p>+<text:p text:style-name="Definition_20_Definition_20_Tight">orange+fruit</text:p>+<text:p text:style-name="Definition_20_Term_20_Tight">banana</text:p>+<text:p text:style-name="Definition_20_Definition_20_Tight">yellow+fruit</text:p>+<text:p text:style-name="First_20_paragraph">Tight using tabs:</text:p>+<text:p text:style-name="Definition_20_Term_20_Tight">apple</text:p>+<text:p text:style-name="Definition_20_Definition_20_Tight">red fruit</text:p>+<text:p text:style-name="Definition_20_Term_20_Tight">orange</text:p>+<text:p text:style-name="Definition_20_Definition_20_Tight">orange+fruit</text:p>+<text:p text:style-name="Definition_20_Term_20_Tight">banana</text:p>+<text:p text:style-name="Definition_20_Definition_20_Tight">yellow+fruit</text:p>+<text:p text:style-name="First_20_paragraph">Loose:</text:p>+<text:p text:style-name="Definition_20_Term">apple</text:p>+<text:p text:style-name="Definition_20_Definition">red fruit</text:p>+<text:p text:style-name="Definition_20_Term">orange</text:p>+<text:p text:style-name="Definition_20_Definition">orange fruit</text:p>+<text:p text:style-name="Definition_20_Term">banana</text:p>+<text:p text:style-name="Definition_20_Definition">yellow fruit</text:p>+<text:p text:style-name="First_20_paragraph">Multiple blocks with+italics:</text:p>+<text:p text:style-name="Definition_20_Term"><text:span text:style-name="Emphasis">apple</text:span></text:p>+<text:p text:style-name="Definition_20_Definition">red+fruit</text:p><text:p text:style-name="Definition_20_Definition">contains seeds,+crisp, pleasant to taste</text:p>+<text:p text:style-name="Definition_20_Term"><text:span text:style-name="Emphasis">orange</text:span></text:p>+<text:p text:style-name="Definition_20_Definition">orange+fruit</text:p><text:p text:style-name="Preformatted_20_Text">{ orange code block }</text:p><text:p text:style-name="P3">orange+block quote</text:p>+<text:p text:style-name="First_20_paragraph">Multiple definitions,+tight:</text:p>+<text:p text:style-name="Definition_20_Term_20_Tight">apple</text:p>+<text:p text:style-name="Definition_20_Definition_20_Tight">red fruit</text:p>+<text:p text:style-name="Definition_20_Definition_20_Tight">computer</text:p>+<text:p text:style-name="Definition_20_Term_20_Tight">orange</text:p>+<text:p text:style-name="Definition_20_Definition_20_Tight">orange+fruit</text:p>+<text:p text:style-name="Definition_20_Definition_20_Tight">bank</text:p>+<text:p text:style-name="First_20_paragraph">Multiple definitions,+loose:</text:p>+<text:p text:style-name="Definition_20_Term">apple</text:p>+<text:p text:style-name="Definition_20_Definition">red fruit</text:p>+<text:p text:style-name="Definition_20_Definition">computer</text:p>+<text:p text:style-name="Definition_20_Term">orange</text:p>+<text:p text:style-name="Definition_20_Definition">orange fruit</text:p>+<text:p text:style-name="Definition_20_Definition">bank</text:p>+<text:p text:style-name="First_20_paragraph">Blank line after term, indented+marker, alternate markers:</text:p>+<text:p text:style-name="Definition_20_Term">apple</text:p>+<text:p text:style-name="Definition_20_Definition">red fruit</text:p>+<text:p text:style-name="Definition_20_Definition">computer</text:p>+<text:p text:style-name="Definition_20_Term">orange</text:p>+<text:p text:style-name="Definition_20_Definition">orange+fruit</text:p><text:list text:style-name="Numbering_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">sublist</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">sublist</text:p>+  </text:list-item>+</text:list>+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="html-blocks" />HTML+Blocks<text:bookmark-end text:name="html-blocks" /></text:h>+<text:p text:style-name="First_20_paragraph">Simple block on one line:</text:p>+<text:p text:style-name="Text_20_body">foo</text:p>+<text:p text:style-name="Text_20_body">And nested without indentation:</text:p>+<text:p text:style-name="Text_20_body">foo</text:p>+<text:p text:style-name="Text_20_body">bar</text:p>+<text:p text:style-name="Text_20_body">Interpreted markdown in a table:</text:p>+<text:p text:style-name="Text_20_body">This is+<text:span text:style-name="Emphasis">emphasized</text:span></text:p>+<text:p text:style-name="Text_20_body">And this is+<text:span text:style-name="Strong_20_Emphasis">strong</text:span></text:p>+<text:p text:style-name="Text_20_body">Here’s a simple block:</text:p>+<text:p text:style-name="Text_20_body">foo</text:p>+<text:p text:style-name="Text_20_body">This should be a code block,+though:</text:p>+<text:p text:style-name="Preformatted_20_Text">&lt;div&gt;</text:p>+<text:p text:style-name="Preformatted_20_Text"><text:s text:c="4" />foo</text:p>+<text:p text:style-name="Preformatted_20_Text">&lt;/div&gt;</text:p>+<text:p text:style-name="First_20_paragraph">As should this:</text:p>+<text:p text:style-name="Preformatted_20_Text">&lt;div&gt;foo&lt;/div&gt;</text:p>+<text:p text:style-name="First_20_paragraph">Now, nested:</text:p>+<text:p text:style-name="Text_20_body">foo</text:p>+<text:p text:style-name="Text_20_body">This should just be an HTML+comment:</text:p>+<text:p text:style-name="Text_20_body">Multiline:</text:p>+<text:p text:style-name="Text_20_body">Code block:</text:p>+<text:p text:style-name="Preformatted_20_Text">&lt;!-- Comment --&gt;</text:p>+<text:p text:style-name="First_20_paragraph">Just plain comment, with trailing+spaces on the line:</text:p>+<text:p text:style-name="Text_20_body">Code:</text:p>+<text:p text:style-name="Preformatted_20_Text">&lt;hr /&gt;</text:p>+<text:p text:style-name="First_20_paragraph">Hr’s:</text:p>+<text:p text:style-name="Horizontal_20_Line" />+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="inline-markup" />Inline+Markup<text:bookmark-end text:name="inline-markup" /></text:h>+<text:p text:style-name="First_20_paragraph">This is+<text:span text:style-name="Emphasis">emphasized</text:span>, and so+<text:span text:style-name="Emphasis">is this</text:span>.</text:p>+<text:p text:style-name="Text_20_body">This is+<text:span text:style-name="Strong_20_Emphasis">strong</text:span>, and so+<text:span text:style-name="Strong_20_Emphasis">is this</text:span>.</text:p>+<text:p text:style-name="Text_20_body">An+<text:a xlink:type="simple" xlink:href="/url" office:name=""><text:span text:style-name="Definition"><text:span text:style-name="Emphasis">emphasized+link</text:span></text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body"><text:span text:style-name="T1">This is+strong and em.</text:span></text:p>+<text:p text:style-name="Text_20_body">So is+<text:span text:style-name="T1">this</text:span> word.</text:p>+<text:p text:style-name="Text_20_body"><text:span text:style-name="T1">This is+strong and em.</text:span></text:p>+<text:p text:style-name="Text_20_body">So is+<text:span text:style-name="T1">this</text:span> word.</text:p>+<text:p text:style-name="Text_20_body">This is code:+<text:span text:style-name="Source_20_Text">&gt;</text:span>,+<text:span text:style-name="Source_20_Text">$</text:span>,+<text:span text:style-name="Source_20_Text">\</text:span>,+<text:span text:style-name="Source_20_Text">\$</text:span>,+<text:span text:style-name="Source_20_Text">&lt;html&gt;</text:span>.</text:p>+<text:p text:style-name="Text_20_body"><text:span text:style-name="Strikeout">This+is+</text:span><text:span text:style-name="T2">strikeout</text:span><text:span text:style-name="Strikeout">.</text:span></text:p>+<text:p text:style-name="Text_20_body">Superscripts:+a<text:span text:style-name="Superscript">bc</text:span>d+a<text:span text:style-name="T3">hello</text:span>+a<text:span text:style-name="Superscript">hello there</text:span>.</text:p>+<text:p text:style-name="Text_20_body">Subscripts:+H<text:span text:style-name="Subscript">2</text:span>O,+H<text:span text:style-name="Subscript">23</text:span>O,+H<text:span text:style-name="Subscript">many of them</text:span>O.</text:p>+<text:p text:style-name="Text_20_body">These should not be superscripts or+subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.</text:p>+<text:p text:style-name="Horizontal_20_Line" />+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="smart-quotes-ellipses-dashes" />Smart+quotes, ellipses,+dashes<text:bookmark-end text:name="smart-quotes-ellipses-dashes" /></text:h>+<text:p text:style-name="First_20_paragraph">“Hello,” said the spider. “‘Shelob’+is my name.”</text:p>+<text:p text:style-name="Text_20_body">‘A’, ‘B’, and ‘C’ are letters.</text:p>+<text:p text:style-name="Text_20_body">‘Oak,’ ‘elm,’ and ‘beech’ are names of+trees. So is ‘pine.’</text:p>+<text:p text:style-name="Text_20_body">‘He said, “I want to go.”’ Were you alive+in the 70’s?</text:p>+<text:p text:style-name="Text_20_body">Here is some quoted+‘<text:span text:style-name="Source_20_Text">code</text:span>’ and a+“<text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">quoted+link</text:span></text:a>”.</text:p>+<text:p text:style-name="Text_20_body">Some dashes: one—two — three—four —+five.</text:p>+<text:p text:style-name="Text_20_body">Dashes between numbers: 5–7, 255–66,+1987–1999.</text:p>+<text:p text:style-name="Text_20_body">Ellipses…and…and….</text:p>+<text:p text:style-name="Horizontal_20_Line" />+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="latex" />LaTeX<text:bookmark-end text:name="latex" /></text:h>+<text:list text:style-name="List_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight"></text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">2 + 2 = 4</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight"><text:span text:style-name="Emphasis">x</text:span> ∈ <text:span text:style-name="Emphasis">y</text:span></text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight"><text:span text:style-name="Emphasis">α</text:span> ∧ <text:span text:style-name="Emphasis">ω</text:span></text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">223</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight"><text:span text:style-name="Emphasis">p</text:span>-Tree</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">Here’s some display math:+    $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">Here’s one that has a line+    break in it:+    <text:span text:style-name="Emphasis">α</text:span> + <text:span text:style-name="Emphasis">ω</text:span> × <text:span text:style-name="Emphasis">x</text:span><text:span text:style-name="Superscript">2</text:span>.</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">These shouldn’t be math:</text:p>+<text:list text:style-name="List_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">To get the famous+    equation, write+    <text:span text:style-name="Source_20_Text">$e = mc^2$</text:span>.</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">$22,000 is a+    <text:span text:style-name="Emphasis">lot</text:span> of money. So is+    $34,000. (It worked if “lot” is emphasized.)</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">Shoes ($20) and socks+    ($5).</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">Escaped+    <text:span text:style-name="Source_20_Text">$</text:span>: $73+    <text:span text:style-name="Emphasis">this should be emphasized</text:span>+    23$.</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">Here’s a LaTeX table:</text:p>+<text:p text:style-name="Horizontal_20_Line" />+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="special-characters" />Special+Characters<text:bookmark-end text:name="special-characters" /></text:h>+<text:p text:style-name="First_20_paragraph">Here is some unicode:</text:p>+<text:list text:style-name="List_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">I hat: Î</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">o umlaut: ö</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">section: §</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">set membership: ∈</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">copyright: ©</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">AT&amp;T has an ampersand in their+name.</text:p>+<text:p text:style-name="Text_20_body">AT&amp;T is another way to write+it.</text:p>+<text:p text:style-name="Text_20_body">This &amp; that.</text:p>+<text:p text:style-name="Text_20_body">4 &lt; 5.</text:p>+<text:p text:style-name="Text_20_body">6 &gt; 5.</text:p>+<text:p text:style-name="Text_20_body">Backslash: \</text:p>+<text:p text:style-name="Text_20_body">Backtick: `</text:p>+<text:p text:style-name="Text_20_body">Asterisk: *</text:p>+<text:p text:style-name="Text_20_body">Underscore: _</text:p>+<text:p text:style-name="Text_20_body">Left brace: {</text:p>+<text:p text:style-name="Text_20_body">Right brace: }</text:p>+<text:p text:style-name="Text_20_body">Left bracket: [</text:p>+<text:p text:style-name="Text_20_body">Right bracket: ]</text:p>+<text:p text:style-name="Text_20_body">Left paren: (</text:p>+<text:p text:style-name="Text_20_body">Right paren: )</text:p>+<text:p text:style-name="Text_20_body">Greater-than: &gt;</text:p>+<text:p text:style-name="Text_20_body">Hash: #</text:p>+<text:p text:style-name="Text_20_body">Period: .</text:p>+<text:p text:style-name="Text_20_body">Bang: !</text:p>+<text:p text:style-name="Text_20_body">Plus: +</text:p>+<text:p text:style-name="Text_20_body">Minus: -</text:p>+<text:p text:style-name="Horizontal_20_Line" />+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="links" />Links<text:bookmark-end text:name="links" /></text:h>+<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="explicit" />Explicit<text:bookmark-end text:name="explicit" /></text:h>+<text:p text:style-name="First_20_paragraph">Just a+<text:a xlink:type="simple" xlink:href="/url/" office:name=""><text:span text:style-name="Definition">URL</text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/" office:name="title"><text:span text:style-name="Definition">URL+and title</text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/" office:name="title preceded by two spaces"><text:span text:style-name="Definition">URL+and title</text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/" office:name="title preceded by a tab"><text:span text:style-name="Definition">URL+and title</text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/" office:name="title with &quot;quotes&quot; in it"><text:span text:style-name="Definition">URL+and title</text:span></text:a></text:p>+<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/" office:name="title with single quotes"><text:span text:style-name="Definition">URL+and title</text:span></text:a></text:p>+<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/with_underscore" office:name=""><text:span text:style-name="Definition">with_underscore</text:span></text:a></text:p>+<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="mailto:nobody@nowhere.net" office:name=""><text:span text:style-name="Definition">Email+link</text:span></text:a></text:p>+<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="" office:name=""><text:span text:style-name="Definition">Empty</text:span></text:a>.</text:p>+<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="reference" />Reference<text:bookmark-end text:name="reference" /></text:h>+<text:p text:style-name="First_20_paragraph">Foo+<text:a xlink:type="simple" xlink:href="/url/" office:name=""><text:span text:style-name="Definition">bar</text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body">With+<text:a xlink:type="simple" xlink:href="/url/" office:name=""><text:span text:style-name="Definition">embedded+[brackets]</text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body"><text:a xlink:type="simple" xlink:href="/url/" office:name=""><text:span text:style-name="Definition">b</text:span></text:a>+by itself should be a link.</text:p>+<text:p text:style-name="Text_20_body">Indented+<text:a xlink:type="simple" xlink:href="/url" office:name=""><text:span text:style-name="Definition">once</text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body">Indented+<text:a xlink:type="simple" xlink:href="/url" office:name=""><text:span text:style-name="Definition">twice</text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body">Indented+<text:a xlink:type="simple" xlink:href="/url" office:name=""><text:span text:style-name="Definition">thrice</text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body">This should [not][] be a link.</text:p>+<text:p text:style-name="Preformatted_20_Text">[not]: /url</text:p>+<text:p text:style-name="First_20_paragraph">Foo+<text:a xlink:type="simple" xlink:href="/url/" office:name="Title with &quot;quotes&quot; inside"><text:span text:style-name="Definition">bar</text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body">Foo+<text:a xlink:type="simple" xlink:href="/url/" office:name="Title with &quot;quote&quot; inside"><text:span text:style-name="Definition">biz</text:span></text:a>.</text:p>+<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="with-ampersands" />With+ampersands<text:bookmark-end text:name="with-ampersands" /></text:h>+<text:p text:style-name="First_20_paragraph">Here’s a+<text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">link+with an ampersand in the URL</text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body">Here’s a link with an amersand in the+link text:+<text:a xlink:type="simple" xlink:href="http://att.com/" office:name="AT&amp;T"><text:span text:style-name="Definition">AT&amp;T</text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body">Here’s an+<text:a xlink:type="simple" xlink:href="/script?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">inline+link</text:span></text:a>.</text:p>+<text:p text:style-name="Text_20_body">Here’s an+<text:a xlink:type="simple" xlink:href="/script?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">inline+link in pointy braces</text:span></text:a>.</text:p>+<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="autolinks" />Autolinks<text:bookmark-end text:name="autolinks" /></text:h>+<text:p text:style-name="First_20_paragraph">With an ampersand:+<text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">http://example.com/?foo=1&amp;bar=2</text:span></text:a></text:p>+<text:list text:style-name="List_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">In a list?</text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight"><text:a xlink:type="simple" xlink:href="http://example.com/" office:name=""><text:span text:style-name="Definition">http://example.com/</text:span></text:a></text:p>+  </text:list-item>+  <text:list-item>+    <text:p text:style-name="List_20_Bullet_20_Tight">It should.</text:p>+  </text:list-item>+</text:list>+<text:p text:style-name="First_20_paragraph">An e-mail address:+<text:a xlink:type="simple" xlink:href="mailto:nobody@nowhere.net" office:name=""><text:span text:style-name="Definition">nobody@nowhere.net</text:span></text:a></text:p>+<text:p text:style-name="Quotations">Blockquoted:+<text:a xlink:type="simple" xlink:href="http://example.com/" office:name=""><text:span text:style-name="Definition">http://example.com/</text:span></text:a></text:p>+<text:p text:style-name="First_20_paragraph">Auto-links should not occur here:+<text:span text:style-name="Source_20_Text">&lt;http://example.com/&gt;</text:span></text:p>+<text:p text:style-name="Preformatted_20_Text">or here: &lt;http://example.com/&gt;</text:p>+<text:p text:style-name="Horizontal_20_Line" />+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="images" />Images<text:bookmark-end text:name="images" /></text:h>+<text:p text:style-name="First_20_paragraph">From “Voyage dans la Lune” by+Georges Melies (1902):</text:p>+<text:p text:style-name="FigureWithCaption"><draw:frame draw:name="img1" text:anchor-type="as-char"><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p>+<text:p text:style-name="FigureCaption">lalune</text:p>+<text:p text:style-name="Text_20_body">Here is a movie+<draw:frame draw:name="img2" text:anchor-type="as-char"><draw:image xlink:href="movie.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame>+icon.</text:p>+<text:p text:style-name="Horizontal_20_Line" />+<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="footnotes" />Footnotes<text:bookmark-end text:name="footnotes" /></text:h>+<text:p text:style-name="First_20_paragraph">Here is a footnote+reference,<text:note text:id="ftn0" text:note-class="footnote"><text:note-citation>1</text:note-citation><text:note-body><text:p text:style-name="Footnote">Here+is the footnote. It can go anywhere after the footnote reference. It need not be+placed at the end of the document.</text:p></text:note-body></text:note> and+another.<text:note text:id="ftn1" text:note-class="footnote"><text:note-citation>2</text:note-citation><text:note-body><text:p text:style-name="Footnote">Here’s+the long note. This one contains multiple+blocks.</text:p><text:p text:style-name="Footnote">Subsequent blocks are+indented to show that they belong to the footnote (as with list+items).</text:p><text:p text:style-name="Preformatted_20_Text"><text:s text:c="2" />{ &lt;code&gt; }</text:p><text:p text:style-name="Footnote">If+you want, you can indent every line, but you can also be lazy and just indent+the first line of each block.</text:p></text:note-body></text:note> This should+<text:span text:style-name="Emphasis">not</text:span> be a footnote reference,+because it contains a space.[^my note] Here is an inline+note.<text:note text:id="ftn2" text:note-class="footnote"><text:note-citation>3</text:note-citation><text:note-body><text:p text:style-name="Footnote">This+is <text:span text:style-name="Emphasis">easier</text:span> to type. Inline+notes may contain+<text:a xlink:type="simple" xlink:href="http://google.com" office:name=""><text:span text:style-name="Definition">links</text:span></text:a>+and <text:span text:style-name="Source_20_Text">]</text:span> verbatim+characters, as well as [bracketed+text].</text:p></text:note-body></text:note></text:p>+<text:p text:style-name="Quotations">Notes can go in+quotes.<text:note text:id="ftn3" text:note-class="footnote"><text:note-citation>4</text:note-citation><text:note-body><text:p text:style-name="Footnote">In+quote.</text:p></text:note-body></text:note></text:p>+<text:list text:style-name="Numbering_20_1">+  <text:list-item>+    <text:p text:style-name="List_20_Number_20_Tight">And in list     items.<text:note text:id="ftn4" text:note-class="footnote"><text:note-citation>5</text:note-citation><text:note-body><text:p text:style-name="Footnote">In     list.</text:p></text:note-body></text:note></text:p>   </text:list-item>
test/writer.opml view
@@ -39,10 +39,10 @@   </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>-  <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 text="Fancy list markers" _note="(2) begins with 2&#10;&#10;(3) and now 3&#10;&#10;    with a continuation&#10;&#10;    i.  sublist with roman numerals starting with i.&#10;    ii. more items&#10;        (A) a subsublist&#10;        (B) a subsublist&#10;&#10;Nesting:&#10;&#10;D.  Upper Alpha&#10;    I.  Upper Roman.&#10;        (1) Decimal start with 1&#10;            a)  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> </outline>-<outline text="Definition Lists" _note="Tight using spaces:&#10;&#10;apple&#10;:   red fruit&#10;&#10;orange&#10;:   orange fruit&#10;&#10;banana&#10;:   yellow fruit&#10;&#10;Tight using tabs:&#10;&#10;apple&#10;:   red fruit&#10;&#10;orange&#10;:   orange fruit&#10;&#10;banana&#10;:   yellow fruit&#10;&#10;Loose:&#10;&#10;apple&#10;&#10;:   red fruit&#10;&#10;orange&#10;&#10;:   orange fruit&#10;&#10;banana&#10;&#10;:   yellow fruit&#10;&#10;Multiple blocks with italics:&#10;&#10;*apple*&#10;&#10;:   red fruit&#10;&#10;    contains seeds, crisp, pleasant to taste&#10;&#10;*orange*&#10;&#10;:   orange fruit&#10;&#10;        { orange code block }&#10;&#10;    &gt; orange block quote&#10;&#10;Multiple definitions, tight:&#10;&#10;apple&#10;:   red fruit&#10;:   computer&#10;&#10;orange&#10;:   orange fruit&#10;:   bank&#10;&#10;Multiple definitions, loose:&#10;&#10;apple&#10;&#10;:   red fruit&#10;&#10;:   computer&#10;&#10;orange&#10;&#10;:   orange fruit&#10;&#10;:   bank&#10;&#10;Blank line after term, indented marker, alternate markers:&#10;&#10;apple&#10;&#10;:   red fruit&#10;&#10;:   computer&#10;&#10;orange&#10;&#10;:   orange fruit&#10;&#10;    1.  sublist&#10;    2.  sublist">+<outline text="Definition Lists" _note="Tight using spaces:&#10;&#10;apple&#10;: red fruit&#10;&#10;orange&#10;: orange fruit&#10;&#10;banana&#10;: yellow fruit&#10;&#10;Tight using tabs:&#10;&#10;apple&#10;: red fruit&#10;&#10;orange&#10;: orange fruit&#10;&#10;banana&#10;: yellow fruit&#10;&#10;Loose:&#10;&#10;apple&#10;&#10;: red fruit&#10;&#10;orange&#10;&#10;: orange fruit&#10;&#10;banana&#10;&#10;: yellow fruit&#10;&#10;Multiple blocks with italics:&#10;&#10;*apple*&#10;&#10;: red fruit&#10;&#10;  contains seeds, crisp, pleasant to taste&#10;&#10;*orange*&#10;&#10;: orange fruit&#10;&#10;      { orange code block }&#10;&#10;  &gt; orange block quote&#10;&#10;Multiple definitions, tight:&#10;&#10;apple&#10;: red fruit&#10;: computer&#10;&#10;orange&#10;: orange fruit&#10;: bank&#10;&#10;Multiple definitions, loose:&#10;&#10;apple&#10;&#10;: red fruit&#10;&#10;: computer&#10;&#10;orange&#10;&#10;: orange fruit&#10;&#10;: bank&#10;&#10;Blank line after term, indented marker, alternate markers:&#10;&#10;apple&#10;&#10;: red fruit&#10;&#10;: computer&#10;&#10;orange&#10;&#10;: orange fruit&#10;&#10;  1.  sublist&#10;  2.  sublist"> </outline> <outline text="HTML Blocks" _note="Simple block on one line:&#10;&#10;::: {}&#10;foo&#10;:::&#10;&#10;And nested without indentation:&#10;&#10;:::::: {}&#10;:::: {}&#10;::: {}&#10;foo&#10;:::&#10;::::&#10;&#10;::: {}&#10;bar&#10;:::&#10;::::::&#10;&#10;Interpreted markdown in a table:&#10;&#10;&lt;table&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;&#10;This is *emphasized*&#10;&lt;/td&gt;&#10;&lt;td&gt;&#10;And this is **strong**&#10;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;/table&gt;&#10;&lt;script type=&quot;text/javascript&quot;&gt;document.write('This *should not* be interpreted as markdown');&lt;/script&gt;&#10;&#10;Here's a simple block:&#10;&#10;::: {}&#10;foo&#10;:::&#10;&#10;This should be a code block, though:&#10;&#10;    &lt;div&gt;&#10;        foo&#10;    &lt;/div&gt;&#10;&#10;As should this:&#10;&#10;    &lt;div&gt;foo&lt;/div&gt;&#10;&#10;Now, nested:&#10;&#10;::::: {}&#10;:::: {}&#10;::: {}&#10;foo&#10;:::&#10;::::&#10;:::::&#10;&#10;This should just be an HTML comment:&#10;&#10;&lt;!-- Comment --&gt;&#10;&#10;Multiline:&#10;&#10;&lt;!--&#10;Blah&#10;Blah&#10;--&gt;&#10;&lt;!--&#10;    This is another comment.&#10;--&gt;&#10;&#10;Code block:&#10;&#10;    &lt;!-- Comment --&gt;&#10;&#10;Just plain comment, with trailing spaces on the line:&#10;&#10;&lt;!-- foo --&gt;&#10;&#10;Code:&#10;&#10;    &lt;hr /&gt;&#10;&#10;Hr's:&#10;&#10;&lt;hr&gt;&#10;&lt;hr /&gt;&#10;&lt;hr /&gt;&#10;&lt;hr&gt;&#10;&lt;hr /&gt;&#10;&lt;hr /&gt;&#10;&lt;hr class=&quot;foo&quot; id=&quot;bar&quot; /&gt;&#10;&lt;hr class=&quot;foo&quot; id=&quot;bar&quot; /&gt;&#10;&lt;hr class=&quot;foo&quot; id=&quot;bar&quot;&gt;&#10;&#10;--------------------------------------------------------------------------------"> </outline>
test/writer.org view
@@ -277,17 +277,17 @@     with a continuation -   4. [@4] sublist with roman numerals, starting with 4-   5. more items+   1. sublist with roman numerals starting with i.+   2. more items       1) a subsublist       2) a subsublist  Nesting: -1. Upper Alpha+4. [@4] Upper Alpha    1. Upper Roman.-      6) [@6] Decimal start with 6-         3) [@3] Lower alpha with paren+      1) Decimal start with 1+         1) Lower alpha with paren  Autonumbering: 
test/writer.plain view
@@ -226,17 +226,17 @@      with a continuation -    iv. sublist with roman numerals, starting with 4-    v.  more items+    i.  sublist with roman numerals starting with i.+    ii. more items         (A) a subsublist         (B) a subsublist  Nesting: -A.  Upper Alpha+D.  Upper Alpha     I.  Upper Roman.-        (6) Decimal start with 6-            c)  Lower alpha with paren+        (1) Decimal start with 1+            a)  Lower alpha with paren  Autonumbering: @@ -257,93 +257,93 @@ Tight using spaces:  apple-    red fruit+  red fruit  orange-    orange fruit+  orange fruit  banana-    yellow fruit+  yellow fruit  Tight using tabs:  apple-    red fruit+  red fruit  orange-    orange fruit+  orange fruit  banana-    yellow fruit+  yellow fruit  Loose:  apple -    red fruit+  red fruit  orange -    orange fruit+  orange fruit  banana -    yellow fruit+  yellow fruit  Multiple blocks with italics:  apple -    red fruit+  red fruit -    contains seeds, crisp, pleasant to taste+  contains seeds, crisp, pleasant to taste  orange -    orange fruit+  orange fruit -        { orange code block }+      { orange code block } -      orange block quote+    orange block quote  Multiple definitions, tight:  apple-    red fruit-    computer+  red fruit+  computer  orange-    orange fruit-    bank+  orange fruit+  bank  Multiple definitions, loose:  apple -    red fruit+  red fruit -    computer+  computer  orange -    orange fruit+  orange fruit -    bank+  bank  Blank line after term, indented marker, alternate markers:  apple -    red fruit+  red fruit -    computer+  computer  orange -    orange fruit+  orange fruit -    1.  sublist-    2.  sublist+  1.  sublist+  2.  sublist  HTML Blocks 
test/writer.rst view
@@ -266,21 +266,21 @@      with a continuation -    iv. sublist with roman numerals, starting with 4-    v.  more items+    i.  sublist with roman numerals starting with i.+    ii. more items          (A) a subsublist         (B) a subsublist  Nesting: -A. Upper Alpha+D. Upper Alpha     I. Upper Roman. -      (6) Decimal start with 6+      (1) Decimal start with 1 -          c) Lower alpha with paren+          a) Lower alpha with paren  Autonumbering: 
test/writer.rtf view
@@ -1,5 +1,42 @@ {\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 \fmodern Courier;}} {\colortbl;\red255\green0\blue0;\red0\green0\blue255;}+{\*\listtable{\list\listtemplateid1{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid1}+{\list\listtemplateid2{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid2}+{\list\listtemplateid3{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid3}+{\list\listtemplateid4{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid4}+{\list\listtemplateid5{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid5}+{\list\listtemplateid6{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid6}+{\list\listtemplateid7{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid7}+{\list\listtemplateid8{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid8}+{\list\listtemplateid9{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid9}+{\list\listtemplateid10{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid10}+{\list\listtemplateid11{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid11}+{\list\listtemplateid12{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid12}+{\list\listtemplateid13{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid13}+{\list\listtemplateid14{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid14}+{\list\listtemplateid15{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li1080\lin1080 }{\listname ;}\listid15}+{\list\listtemplateid16{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid16}+{\list\listtemplateid17{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid17}+{\list\listtemplateid18{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid18}+{\list\listtemplateid19{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid19}+{\list\listtemplateid20{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid20}+{\list\listtemplateid21{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid21}+{\list\listtemplateid22{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat2\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid22}+{\list\listtemplateid23{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid23}+{\list\listtemplateid24{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li720\lin720 }{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li1080\lin1080 }{\listname ;}\listid24}+{\list\listtemplateid25{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat4\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid25}+{\list\listtemplateid26{\listlevel\levelnfc1\levelnfcn1\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listlevel\levelnfc1\levelnfcn1\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid26}+{\list\listtemplateid27{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li720\lin720 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li1080\lin1080 }{\listname ;}\listid27}+{\list\listtemplateid28{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li1080\lin1080 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li1440\lin1440 }{\listname ;}\listid28}+{\list\listtemplateid29{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid29}+{\list\listtemplateid30{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid30}+{\list\listtemplateid31{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid31}+{\list\listtemplateid32{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid32}+{\list\listtemplateid33{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid33}+{\list\listtemplateid34{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid34}+{\list\listtemplateid35{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelindent0{\leveltext\'01\u8226 ?;}{\levelnumbers;}\fi-360\li360\lin360 }{\listname ;}\listid35}+}+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}{\listoverride\listid6\listoverridecount0\ls6}{\listoverride\listid7\listoverridecount0\ls7}{\listoverride\listid8\listoverridecount0\ls8}{\listoverride\listid9\listoverridecount0\ls9}{\listoverride\listid10\listoverridecount0\ls10}{\listoverride\listid11\listoverridecount0\ls11}{\listoverride\listid12\listoverridecount0\ls12}{\listoverride\listid13\listoverridecount0\ls13}{\listoverride\listid14\listoverridecount0\ls14}{\listoverride\listid15\listoverridecount0\ls15}{\listoverride\listid16\listoverridecount0\ls16}{\listoverride\listid17\listoverridecount0\ls17}{\listoverride\listid18\listoverridecount0\ls18}{\listoverride\listid19\listoverridecount0\ls19}{\listoverride\listid20\listoverridecount0\ls20}{\listoverride\listid21\listoverridecount0\ls21}{\listoverride\listid22\listoverridecount0\ls22}{\listoverride\listid23\listoverridecount0\ls23}{\listoverride\listid24\listoverridecount0\ls24}{\listoverride\listid25\listoverridecount0\ls25}{\listoverride\listid26\listoverridecount0\ls26}{\listoverride\listid27\listoverridecount0\ls27}{\listoverride\listid28\listoverridecount0\ls28}{\listoverride\listid29\listoverridecount0\ls29}{\listoverride\listid30\listoverridecount0\ls30}{\listoverride\listid31\listoverridecount0\ls31}{\listoverride\listid32\listoverridecount0\ls32}{\listoverride\listid33\listoverridecount0\ls33}{\listoverride\listid34\listoverridecount0\ls34}{\listoverride\listid35\listoverridecount0\ls35}} \widowctrl\hyphauto  {\pard \qc \f0 \sa180 \li0 \fi0 \b \fs36 Pandoc Test Suite\par}@@ -7,438 +44,438 @@ {\pard \qc \f0 \sa180 \li0 \fi0  Anonymous\par} {\pard \qc \f0 \sa180 \li0 \fi0  July 17, 2006\par} {\pard \ql \f0 \sa180 \li0 \fi0 \par}-{\pard \ql \f0 \sa180 \li0 \fi0 This is a set of tests for pandoc. Most of them are adapted from John Gruber\u8217's markdown test suite.\par}-{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Headers\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Level 2 with an {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 This is a set of tests for pandoc. Most of them are adapted from John Gruber\u8217's markdown test suite.\par}+{\pard \qc \f0 \fs24 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 Headers\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Level 2 with an {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul embedded link }}} \par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel2 \b \fs28 Level 3 with {\i emphasis}\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel3 \b \fs24 Level 4\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel4 \b \fs20 Level 5\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Level 1\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Level 2 with {\i emphasis}\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel2 \b \fs28 Level 3\par}-{\pard \ql \f0 \sa180 \li0 \fi0 with no blank line\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Level 2\par}-{\pard \ql \f0 \sa180 \li0 \fi0 with no blank line\par}-{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Paragraphs\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a regular paragraph.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's one with a bullet. * criminey.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 There should be a hard line break\line here.\par}-{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Block Quotes\par}-{\pard \ql \f0 \sa180 \li0 \fi0 E-mail style:\par}-{\pard \ql \f0 \sa180 \li720 \fi0 This is a block quote. It is pretty short.\par}-{\pard \ql \f0 \sa180 \li720 \fi0 Code in a block quote:\par}-{\pard \ql \f0 \sa180 \li720 \fi0 \f1 sub status \{\line+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel2 \b \fs30 Level 3 with {\i emphasis}\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel3 \b \fs28 Level 4\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel4 \b \fs26 Level 5\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 Level 1\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Level 2 with {\i emphasis}\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel2 \b \fs30 Level 3\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 with no blank line\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Level 2\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 with no blank line\par}+{\pard \qc \f0 \fs24 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 Paragraphs\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here\u8217's a regular paragraph.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here\u8217's one with a bullet. * criminey.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 There should be a hard line break\line here.\par}+{\pard \qc \f0 \fs24 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 Block Quotes\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 E-mail style:\par}+{\pard \ql \f0 \fs24 \sa180 \li720 \fi0 This is a block quote. It is pretty short.\par}+{\pard \ql \f0 \fs24 \sa180 \li720 \fi0 Code in a block quote:\par}+{\pard \ql \f0 \fs24 \sa180 \li720 \fi0 \f1 \fs24 sub status \{\line     print "working";\line \}\par}-{\pard \ql \f0 \sa180 \li720 \fi0 A list:\par}-{\pard \ql \f0 \sa0 \li1080 \fi-360 1.\tx360\tab item one\par}-{\pard \ql \f0 \sa0 \li1080 \fi-360 2.\tx360\tab item two\sa180\par}-{\pard \ql \f0 \sa180 \li720 \fi0 Nested block quotes:\par}-{\pard \ql \f0 \sa180 \li1440 \fi0 nested\par}-{\pard \ql \f0 \sa180 \li1440 \fi0 nested\par}-{\pard \ql \f0 \sa180 \li0 \fi0 This should not be a block quote: 2 > 1.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 And a following paragraph.\par}-{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Code Blocks\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Code:\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \f1 ---- (should be four hyphens)\line+{\pard \ql \f0 \fs24 \sa180 \li720 \fi0 A list:\par}+{\pard \ql \f0 \fs24 \sa0 \li1080 \fi-360\ls1\ilvl0\tx360 {\listtext\tab 1.\tab} item one\par}+{\pard \ql \f0 \fs24 \sa0 \li1080 \fi-360\ls1\ilvl0\tx360 {\listtext\tab 2.\tab} item two\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li720 \fi0 Nested block quotes:\par}+{\pard \ql \f0 \fs24 \sa180 \li1440 \fi0 nested\par}+{\pard \ql \f0 \fs24 \sa180 \li1440 \fi0 nested\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 This should not be a block quote: 2 > 1.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 And a following paragraph.\par}+{\pard \qc \f0 \fs24 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 Code Blocks\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Code:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \f1 \fs24 ---- (should be four hyphens)\line \line sub status \{\line     print "working";\line \}\line \line this code block is indented by one tab\par}-{\pard \ql \f0 \sa180 \li0 \fi0 And:\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \f1     this code block is indented by two tabs\line+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 And:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \f1 \fs24     this code block is indented by two tabs\line \line These should not be escaped:  \\$ \\\\ \\> \\[ \\\{\par}-{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Lists\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Unordered\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Asterisks tight:\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab asterisk 1\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab asterisk 2\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab asterisk 3\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Asterisks loose:\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab asterisk 1\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab asterisk 2\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab asterisk 3\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Pluses tight:\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Plus 1\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Plus 2\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Plus 3\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Pluses loose:\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Plus 1\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Plus 2\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Plus 3\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Minuses tight:\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Minus 1\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Minus 2\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Minus 3\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Minuses loose:\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Minus 1\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Minus 2\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Minus 3\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Ordered\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Tight:\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab First\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab Second\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 3.\tx360\tab Third\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 and:\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab One\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab Two\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 3.\tx360\tab Three\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Loose using tabs:\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 1.\tx360\tab First\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab Second\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Third\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 and using spaces:\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 1.\tx360\tab One\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab Two\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Three\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Multiple paragraphs:\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 1.\tx360\tab Item 1, graf one.\par}-{\pard \ql \f0 \sa180 \li360 \fi0 Item 1. graf two. The quick brown fox jumped over the lazy dog\u8217's back.\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab Item 2.\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Item 3.\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Nested\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Tab\par}-{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Tab\par}-{\pard \ql \f0 \sa0 \li1080 \fi-360 \bullet \tx360\tab Tab\sa180\sa180\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's another:\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab First\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab Second:\par}-{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Fee\par}-{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Fie\par}-{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Foe\sa180\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 3.\tx360\tab Third\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Same thing but with paragraphs:\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 1.\tx360\tab First\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab Second:\par}-{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Fee\par}-{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Fie\par}-{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Foe\sa180\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Third\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Tabs and spaces\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab this is a list item indented with tabs\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab this is a list item indented with spaces\par}-{\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with tabs\par}-{\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with spaces\sa180\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Fancy list markers\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 (2)\tx360\tab begins with 2\par}-{\pard \ql \f0 \sa180 \li360 \fi-360 (3)\tx360\tab and now 3\par}-{\pard \ql \f0 \sa180 \li360 \fi0 with a continuation\par}-{\pard \ql \f0 \sa0 \li720 \fi-360 iv.\tx360\tab sublist with roman numerals, starting with 4\par}-{\pard \ql \f0 \sa0 \li720 \fi-360 v.\tx360\tab more items\par}-{\pard \ql \f0 \sa0 \li1080 \fi-360 (A)\tx360\tab a subsublist\par}-{\pard \ql \f0 \sa0 \li1080 \fi-360 (B)\tx360\tab a subsublist\sa180\sa180\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Nesting:\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 A.\tx360\tab Upper Alpha\par}-{\pard \ql \f0 \sa0 \li720 \fi-360 I.\tx360\tab Upper Roman.\par}-{\pard \ql \f0 \sa0 \li1080 \fi-360 (6)\tx360\tab Decimal start with 6\par}-{\pard \ql \f0 \sa0 \li1440 \fi-360 c)\tx360\tab Lower alpha with paren\sa180\sa180\sa180\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Autonumbering:\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab Autonumber.\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab More.\par}-{\pard \ql \f0 \sa0 \li720 \fi-360 a.\tx360\tab Nested.\sa180\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Should not be a list item:\par}-{\pard \ql \f0 \sa180 \li0 \fi0 M.A.\u160 ?2007\par}-{\pard \ql \f0 \sa180 \li0 \fi0 B. Williams\par}-{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Definition Lists\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Tight using spaces:\par}-{\pard \ql \f0 \sa0 \li0 \fi0 apple\par}-{\pard \ql \f0 \sa0 \li360 \fi0 red fruit\par}-{\pard \ql \f0 \sa0 \li0 \fi0 orange\par}-{\pard \ql \f0 \sa0 \li360 \fi0 orange fruit\par}-{\pard \ql \f0 \sa0 \li0 \fi0 banana\par}-{\pard \ql \f0 \sa0 \li360 \fi0 yellow fruit\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Tight using tabs:\par}-{\pard \ql \f0 \sa0 \li0 \fi0 apple\par}-{\pard \ql \f0 \sa0 \li360 \fi0 red fruit\par}-{\pard \ql \f0 \sa0 \li0 \fi0 orange\par}-{\pard \ql \f0 \sa0 \li360 \fi0 orange fruit\par}-{\pard \ql \f0 \sa0 \li0 \fi0 banana\par}-{\pard \ql \f0 \sa0 \li360 \fi0 yellow fruit\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Loose:\par}-{\pard \ql \f0 \sa0 \li0 \fi0 apple\par}-{\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par}-{\pard \ql \f0 \sa0 \li0 \fi0 orange\par}-{\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par}-{\pard \ql \f0 \sa0 \li0 \fi0 banana\par}-{\pard \ql \f0 \sa180 \li360 \fi0 yellow fruit\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Multiple blocks with italics:\par}-{\pard \ql \f0 \sa0 \li0 \fi0 {\i apple}\par}-{\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par}-{\pard \ql \f0 \sa180 \li360 \fi0 contains seeds, crisp, pleasant to taste\par}-{\pard \ql \f0 \sa0 \li0 \fi0 {\i orange}\par}-{\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par}-{\pard \ql \f0 \sa180 \li360 \fi0 \f1 \{ orange code block \}\par}-{\pard \ql \f0 \sa180 \li1080 \fi0 orange block quote\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Multiple definitions, tight:\par}-{\pard \ql \f0 \sa0 \li0 \fi0 apple\par}-{\pard \ql \f0 \sa0 \li360 \fi0 red fruit\par}-{\pard \ql \f0 \sa0 \li360 \fi0 computer\par}-{\pard \ql \f0 \sa0 \li0 \fi0 orange\par}-{\pard \ql \f0 \sa0 \li360 \fi0 orange fruit\par}-{\pard \ql \f0 \sa0 \li360 \fi0 bank\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Multiple definitions, loose:\par}-{\pard \ql \f0 \sa0 \li0 \fi0 apple\par}-{\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par}-{\pard \ql \f0 \sa180 \li360 \fi0 computer\par}-{\pard \ql \f0 \sa0 \li0 \fi0 orange\par}-{\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par}-{\pard \ql \f0 \sa180 \li360 \fi0 bank\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Blank line after term, indented marker, alternate markers:\par}-{\pard \ql \f0 \sa0 \li0 \fi0 apple\par}-{\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par}-{\pard \ql \f0 \sa180 \li360 \fi0 computer\par}-{\pard \ql \f0 \sa0 \li0 \fi0 orange\par}-{\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par}-{\pard \ql \f0 \sa0 \li720 \fi-360 1.\tx360\tab sublist\par}-{\pard \ql \f0 \sa0 \li720 \fi-360 2.\tx360\tab sublist\sa180\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 HTML Blocks\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Simple block on one line:\par}-{\pard \ql \f0 \sa0 \li0 \fi0 foo\par}-{\pard \ql \f0 \sa180 \li0 \fi0 And nested without indentation:\par}-{\pard \ql \f0 \sa180 \li0 \fi0 foo\par}-{\pard \ql \f0 \sa0 \li0 \fi0 bar\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Interpreted markdown in a table:\par}-{\pard \ql \f0 \sa0 \li0 \fi0 This is {\i emphasized}\par}-{\pard \ql \f0 \sa0 \li0 \fi0 And this is {\b strong}\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a simple block:\par}-{\pard \ql \f0 \sa180 \li0 \fi0 foo\par}-{\pard \ql \f0 \sa180 \li0 \fi0 This should be a code block, though:\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \f1 <div>\line+{\pard \qc \f0 \fs24 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 Lists\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Unordered\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Asterisks tight:\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls2\ilvl0\tx360 {\listtext\tab \bullet \tab} asterisk 1\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls2\ilvl0\tx360 {\listtext\tab \bullet \tab} asterisk 2\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls2\ilvl0\tx360 {\listtext\tab \bullet \tab} asterisk 3\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Asterisks loose:\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls3\ilvl0\tx360 {\listtext\tab \bullet \tab} asterisk 1\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls3\ilvl0\tx360 {\listtext\tab \bullet \tab} asterisk 2\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls3\ilvl0\tx360 {\listtext\tab \bullet \tab} asterisk 3\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Pluses tight:\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls4\ilvl0\tx360 {\listtext\tab \bullet \tab} Plus 1\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls4\ilvl0\tx360 {\listtext\tab \bullet \tab} Plus 2\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls4\ilvl0\tx360 {\listtext\tab \bullet \tab} Plus 3\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Pluses loose:\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls5\ilvl0\tx360 {\listtext\tab \bullet \tab} Plus 1\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls5\ilvl0\tx360 {\listtext\tab \bullet \tab} Plus 2\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls5\ilvl0\tx360 {\listtext\tab \bullet \tab} Plus 3\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Minuses tight:\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls6\ilvl0\tx360 {\listtext\tab \bullet \tab} Minus 1\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls6\ilvl0\tx360 {\listtext\tab \bullet \tab} Minus 2\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls6\ilvl0\tx360 {\listtext\tab \bullet \tab} Minus 3\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Minuses loose:\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls7\ilvl0\tx360 {\listtext\tab \bullet \tab} Minus 1\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls7\ilvl0\tx360 {\listtext\tab \bullet \tab} Minus 2\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls7\ilvl0\tx360 {\listtext\tab \bullet \tab} Minus 3\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Ordered\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Tight:\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls8\ilvl0\tx360 {\listtext\tab 1.\tab} First\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls8\ilvl0\tx360 {\listtext\tab 2.\tab} Second\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls8\ilvl0\tx360 {\listtext\tab 3.\tab} Third\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 and:\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls9\ilvl0\tx360 {\listtext\tab 1.\tab} One\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls9\ilvl0\tx360 {\listtext\tab 2.\tab} Two\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls9\ilvl0\tx360 {\listtext\tab 3.\tab} Three\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Loose using tabs:\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls10\ilvl0\tx360 {\listtext\tab 1.\tab} First\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls10\ilvl0\tx360 {\listtext\tab 2.\tab} Second\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls10\ilvl0\tx360 {\listtext\tab 3.\tab} Third\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 and using spaces:\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls11\ilvl0\tx360 {\listtext\tab 1.\tab} One\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls11\ilvl0\tx360 {\listtext\tab 2.\tab} Two\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls11\ilvl0\tx360 {\listtext\tab 3.\tab} Three\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Multiple paragraphs:\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls12\ilvl0\tx360 {\listtext\tab 1.\tab} Item 1, graf one.\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \ls12\ilvl0\fi0 Item 1. graf two. The quick brown fox jumped over the lazy dog\u8217's back.\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls12\ilvl0\tx360 {\listtext\tab 2.\tab} Item 2.\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls12\ilvl0\tx360 {\listtext\tab 3.\tab} Item 3.\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Nested\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls13\ilvl0\tx360 {\listtext\tab \bullet \tab} Tab\par}+{\pard \ql \f0 \fs24 \sa0 \li720 \fi-360\ls14\ilvl1\tx360 {\listtext\tab \endash \tab} Tab\par}+{\pard \ql \f0 \fs24 \sa0 \li1080 \fi-360\ls15\ilvl2\tx360 {\listtext\tab \bullet \tab} Tab\sa180\sa180\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here\u8217's another:\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls16\ilvl0\tx360 {\listtext\tab 1.\tab} First\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls16\ilvl0\tx360 {\listtext\tab 2.\tab} Second:\par}+{\pard \ql \f0 \fs24 \sa0 \li720 \fi-360\ls17\ilvl1\tx360 {\listtext\tab \endash \tab} Fee\par}+{\pard \ql \f0 \fs24 \sa0 \li720 \fi-360\ls17\ilvl1\tx360 {\listtext\tab \endash \tab} Fie\par}+{\pard \ql \f0 \fs24 \sa0 \li720 \fi-360\ls17\ilvl1\tx360 {\listtext\tab \endash \tab} Foe\sa180\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls16\ilvl0\tx360 {\listtext\tab 3.\tab} Third\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Same thing but with paragraphs:\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls18\ilvl0\tx360 {\listtext\tab 1.\tab} First\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls18\ilvl0\tx360 {\listtext\tab 2.\tab} Second:\par}+{\pard \ql \f0 \fs24 \sa0 \li720 \fi-360\ls19\ilvl1\tx360 {\listtext\tab \endash \tab} Fee\par}+{\pard \ql \f0 \fs24 \sa0 \li720 \fi-360\ls19\ilvl1\tx360 {\listtext\tab \endash \tab} Fie\par}+{\pard \ql \f0 \fs24 \sa0 \li720 \fi-360\ls19\ilvl1\tx360 {\listtext\tab \endash \tab} Foe\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls18\ilvl0\tx360 {\listtext\tab 3.\tab} Third\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Tabs and spaces\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls20\ilvl0\tx360 {\listtext\tab \bullet \tab} this is a list item indented with tabs\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls20\ilvl0\tx360 {\listtext\tab \bullet \tab} this is a list item indented with spaces\par}+{\pard \ql \f0 \fs24 \sa180 \li720 \fi-360\ls21\ilvl1\tx360 {\listtext\tab \endash \tab} this is an example list item indented with tabs\par}+{\pard \ql \f0 \fs24 \sa180 \li720 \fi-360\ls21\ilvl1\tx360 {\listtext\tab \endash \tab} this is an example list item indented with spaces\sa180\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Fancy list markers\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls22\ilvl0\tx360 {\listtext\tab (2)\tab} begins with 2\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi-360\ls22\ilvl0\tx360 {\listtext\tab (3)\tab} and now 3\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \ls22\ilvl0\fi0 with a continuation\par}+{\pard \ql \f0 \fs24 \sa0 \li720 \fi-360\ls23\ilvl1\tx360 {\listtext\tab i.\tab} sublist with roman numerals starting with i.\par}+{\pard \ql \f0 \fs24 \sa0 \li720 \fi-360\ls23\ilvl1\tx360 {\listtext\tab ii.\tab} more items\par}+{\pard \ql \f0 \fs24 \sa0 \li1080 \fi-360\ls24\ilvl2\tx360 {\listtext\tab (A)\tab} a subsublist\par}+{\pard \ql \f0 \fs24 \sa0 \li1080 \fi-360\ls24\ilvl2\tx360 {\listtext\tab (B)\tab} a subsublist\sa180\sa180\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Nesting:\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls25\ilvl0\tx360 {\listtext\tab D.\tab} Upper Alpha\par}+{\pard \ql \f0 \fs24 \sa0 \li720 \fi-360\ls26\ilvl1\tx360 {\listtext\tab I.\tab} Upper Roman.\par}+{\pard \ql \f0 \fs24 \sa0 \li1080 \fi-360\ls27\ilvl2\tx360 {\listtext\tab (1)\tab} Decimal start with 1\par}+{\pard \ql \f0 \fs24 \sa0 \li1440 \fi-360\ls28\ilvl3\tx360 {\listtext\tab a)\tab} Lower alpha with paren\sa180\sa180\sa180\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Autonumbering:\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls29\ilvl0\tx360 {\listtext\tab 1.\tab} Autonumber.\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls29\ilvl0\tx360 {\listtext\tab 2.\tab} More.\par}+{\pard \ql \f0 \fs24 \sa0 \li720 \fi-360\ls30\ilvl1\tx360 {\listtext\tab a.\tab} Nested.\sa180\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Should not be a list item:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 M.A.\u160 ?2007\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 B. Williams\par}+{\pard \qc \f0 \fs24 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 Definition Lists\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Tight using spaces:\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 apple\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi0 red fruit\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 orange\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi0 orange fruit\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 banana\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi0 yellow fruit\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Tight using tabs:\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 apple\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi0 red fruit\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 orange\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi0 orange fruit\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 banana\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi0 yellow fruit\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Loose:\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 apple\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 red fruit\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 orange\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 orange fruit\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 banana\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 yellow fruit\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Multiple blocks with italics:\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 {\i apple}\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 red fruit\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 contains seeds, crisp, pleasant to taste\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 {\i orange}\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 orange fruit\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 \f1 \fs24 \{ orange code block \}\par}+{\pard \ql \f0 \fs24 \sa180 \li1080 \fi0 orange block quote\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Multiple definitions, tight:\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 apple\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi0 red fruit\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi0 computer\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 orange\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi0 orange fruit\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi0 bank\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Multiple definitions, loose:\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 apple\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 red fruit\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 computer\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 orange\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 orange fruit\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 bank\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Blank line after term, indented marker, alternate markers:\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 apple\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 red fruit\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 computer\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 orange\par}+{\pard \ql \f0 \fs24 \sa180 \li360 \fi0 orange fruit\par}+{\pard \ql \f0 \fs24 \sa0 \li720 \fi-360 1.\tx360\tab sublist\par}+{\pard \ql \f0 \fs24 \sa0 \li720 \fi-360 2.\tx360\tab sublist\sa180\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 HTML Blocks\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Simple block on one line:\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 foo\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 And nested without indentation:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 foo\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 bar\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Interpreted markdown in a table:\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 This is {\i emphasized}\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 And this is {\b strong}\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here\u8217's a simple block:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 foo\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 This should be a code block, though:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \f1 \fs24 <div>\line     foo\line </div>\par}-{\pard \ql \f0 \sa180 \li0 \fi0 As should this:\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \f1 <div>foo</div>\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Now, nested:\par}-{\pard \ql \f0 \sa0 \li0 \fi0 foo\par}-{\pard \ql \f0 \sa180 \li0 \fi0 This should just be an HTML comment:\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Multiline:\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Code block:\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \f1 <!-- Comment -->\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Just plain comment, with trailing spaces on the line:\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Code:\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \f1 <hr />\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Hr\u8217's:\par}-{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Inline Markup\par}-{\pard \ql \f0 \sa180 \li0 \fi0 This is {\i emphasized}, and so {\i is this}.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 This is {\b strong}, and so {\b is this}.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 An {\i {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 As should this:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \f1 \fs24 <div>foo</div>\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Now, nested:\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 foo\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 This should just be an HTML comment:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Multiline:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Code block:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \f1 \fs24 <!-- Comment -->\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Just plain comment, with trailing spaces on the line:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Code:\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \f1 \fs24 <hr />\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Hr\u8217's:\par}+{\pard \qc \f0 \fs24 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 Inline Markup\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 This is {\i emphasized}, and so {\i is this}.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 This is {\b strong}, and so {\b is this}.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 An {\i {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul emphasized link }}} }.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 {\b {\i This is strong and em.}}\par}-{\pard \ql \f0 \sa180 \li0 \fi0 So is {\b {\i this}} word.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 {\b {\i This is strong and em.}}\par}-{\pard \ql \f0 \sa180 \li0 \fi0 So is {\b {\i this}} word.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 This is code: {\f1 >}, {\f1 $}, {\f1 \\}, {\f1 \\$}, {\f1 <html>}.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 {\strike This is {\i strikeout}.}\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Superscripts: a{\super bc}d a{\super {\i hello}} a{\super hello\u160 ?there}.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Subscripts: H{\sub 2}O, H{\sub 23}O, H{\sub many\u160 ?of\u160 ?them}O.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.\par}-{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Smart quotes, ellipses, dashes\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \u8220"Hello,\u8221" said the spider. \u8220"\u8216'Shelob\u8217' is my name.\u8221"\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \u8216'A\u8217', \u8216'B\u8217', and \u8216'C\u8217' are letters.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \u8216'Oak,\u8217' \u8216'elm,\u8217' and \u8216'beech\u8217' are names of trees. So is \u8216'pine.\u8217'\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \u8216'He said, \u8220"I want to go.\u8221"\u8217' Were you alive in the 70\u8217's?\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Here is some quoted \u8216'{\f1 code}\u8217' and a \u8220"{\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 {\b {\i This is strong and em.}}\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 So is {\b {\i this}} word.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 {\b {\i This is strong and em.}}\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 So is {\b {\i this}} word.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 This is code: {\f1 \fs24 >}, {\f1 \fs24 $}, {\f1 \fs24 \\}, {\f1 \fs24 \\$}, {\f1 \fs24 <html>}.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 {\strike This is {\i strikeout}.}\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Superscripts: a{\super bc}d a{\super {\i hello}} a{\super hello\u160 ?there}.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Subscripts: H{\sub 2}O, H{\sub 23}O, H{\sub many\u160 ?of\u160 ?them}O.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.\par}+{\pard \qc \f0 \fs24 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 Smart quotes, ellipses, dashes\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \u8220"Hello,\u8221" said the spider. \u8220"\u8216'Shelob\u8217' is my name.\u8221"\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \u8216'A\u8217', \u8216'B\u8217', and \u8216'C\u8217' are letters.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \u8216'Oak,\u8217' \u8216'elm,\u8217' and \u8216'beech\u8217' are names of trees. So is \u8216'pine.\u8217'\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \u8216'He said, \u8220"I want to go.\u8221"\u8217' Were you alive in the 70\u8217's?\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here is some quoted \u8216'{\f1 \fs24 code}\u8217' and a \u8220"{\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul quoted link }}} \u8221".\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Some dashes: one\u8212-two \u8212- three\u8212-four \u8212- five.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Dashes between numbers: 5\u8211-7, 255\u8211-66, 1987\u8211-1999.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Ellipses\u8230 ?and\u8230 ?and\u8230 ?.\par}-{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 LaTeX\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab \par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab 2\u8197 ?+\u8197 ?2\u8196 ?=\u8196 ?4\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\i x}\u8196 ?\u8712 ?\u8196 ?{\i y}\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\i \u945 ?}\u8197 ?\u8743 ?\u8197 ?{\i \u969 ?}\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab 223\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\i p}-Tree\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Here\u8217's some display math: $$\\frac\{d\}\{dx\}f(x)=\\lim_\{h\\to 0\}\\frac\{f(x+h)-f(x)\}\{h\}$$\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Here\u8217's one that has a line break in it: {\i \u945 ?}\u8197 ?+\u8197 ?{\i \u969 ?}\u8197 ?\u215 ?\u8197 ?{\i x}{\super 2}.\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 These shouldn\u8217't be math:\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab To get the famous equation, write {\f1 $e = mc^2$}.\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab $22,000 is a {\i lot} of money. So is $34,000. (It worked if \u8220"lot\u8221" is emphasized.)\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Shoes ($20) and socks ($5).\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Escaped {\f1 $}: $73 {\i this should be emphasized} 23$.\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a LaTeX table:\par}-{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Special Characters\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Here is some unicode:\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab I hat: \u206 ?\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab o umlaut: \u246 ?\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab section: \u167 ?\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab set membership: \u8712 ?\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab copyright: \u169 ?\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 AT&T has an ampersand in their name.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 AT&T is another way to write it.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 This & that.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 4 < 5.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 6 > 5.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Backslash: \\\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Backtick: `\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Asterisk: *\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Underscore: _\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Left brace: \{\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Right brace: \}\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Left bracket: [\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Right bracket: ]\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Left paren: (\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Right paren: )\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Greater-than: >\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Hash: #\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Period: .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Bang: !\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Plus: +\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Minus: -\par}-{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Links\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Explicit\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Just a {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Some dashes: one\u8212-two \u8212- three\u8212-four \u8212- five.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Dashes between numbers: 5\u8211-7, 255\u8211-66, 1987\u8211-1999.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Ellipses\u8230 ?and\u8230 ?and\u8230 ?.\par}+{\pard \qc \f0 \fs24 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 LaTeX\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls31\ilvl0\tx360 {\listtext\tab \bullet \tab} \par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls31\ilvl0\tx360 {\listtext\tab \bullet \tab} 2\u8197 ?+\u8197 ?2\u8196 ?=\u8196 ?4\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls31\ilvl0\tx360 {\listtext\tab \bullet \tab} {\i x}\u8196 ?\u8712 ?\u8196 ?{\i y}\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls31\ilvl0\tx360 {\listtext\tab \bullet \tab} {\i \u945 ?}\u8197 ?\u8743 ?\u8197 ?{\i \u969 ?}\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls31\ilvl0\tx360 {\listtext\tab \bullet \tab} 223\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls31\ilvl0\tx360 {\listtext\tab \bullet \tab} {\i p}-Tree\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls31\ilvl0\tx360 {\listtext\tab \bullet \tab} Here\u8217's some display math: $$\\frac\{d\}\{dx\}f(x)=\\lim_\{h\\to 0\}\\frac\{f(x+h)-f(x)\}\{h\}$$\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls31\ilvl0\tx360 {\listtext\tab \bullet \tab} Here\u8217's one that has a line break in it: {\i \u945 ?}\u8197 ?+\u8197 ?{\i \u969 ?}\u8197 ?\u215 ?\u8197 ?{\i x}{\super 2}.\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 These shouldn\u8217't be math:\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls32\ilvl0\tx360 {\listtext\tab \bullet \tab} To get the famous equation, write {\f1 \fs24 $e = mc^2$}.\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls32\ilvl0\tx360 {\listtext\tab \bullet \tab} $22,000 is a {\i lot} of money. So is $34,000. (It worked if \u8220"lot\u8221" is emphasized.)\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls32\ilvl0\tx360 {\listtext\tab \bullet \tab} Shoes ($20) and socks ($5).\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls32\ilvl0\tx360 {\listtext\tab \bullet \tab} Escaped {\f1 \fs24 $}: $73 {\i this should be emphasized} 23$.\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here\u8217's a LaTeX table:\par}+{\pard \qc \f0 \fs24 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 Special Characters\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here is some unicode:\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls33\ilvl0\tx360 {\listtext\tab \bullet \tab} I hat: \u206 ?\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls33\ilvl0\tx360 {\listtext\tab \bullet \tab} o umlaut: \u246 ?\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls33\ilvl0\tx360 {\listtext\tab \bullet \tab} section: \u167 ?\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls33\ilvl0\tx360 {\listtext\tab \bullet \tab} set membership: \u8712 ?\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls33\ilvl0\tx360 {\listtext\tab \bullet \tab} copyright: \u169 ?\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 AT&T has an ampersand in their name.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 AT&T is another way to write it.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 This & that.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 4 < 5.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 6 > 5.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Backslash: \\\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Backtick: `\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Asterisk: *\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Underscore: _\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Left brace: \{\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Right brace: \}\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Left bracket: [\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Right bracket: ]\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Left paren: (\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Right paren: )\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Greater-than: >\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Hash: #\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Period: .\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Bang: !\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Plus: +\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Minus: -\par}+{\pard \qc \f0 \fs24 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 Links\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Explicit\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Just a {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul URL }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul URL and title }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul URL and title }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul URL and title }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul URL and title }}} \par}-{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul URL and title }}} \par}-{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/with_underscore"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/with_underscore"}}{\fldrslt{\ul with_underscore }}} \par}-{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "mailto:nobody@nowhere.net"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "mailto:nobody@nowhere.net"}}{\fldrslt{\ul Email link }}} \par}-{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK ""}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK ""}}{\fldrslt{\ul Empty }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Reference\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Reference\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul bar }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 With {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 With {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul embedded [brackets] }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul b }}}  by itself should be a link.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Indented {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Indented {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul once }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Indented {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Indented {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul twice }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Indented {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Indented {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul thrice }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 This should [not][] be a link.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \f1 [not]: /url\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 This should [not][] be a link.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \f1 \fs24 [not]: /url\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul bar }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul biz }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 With ampersands\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a {\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 With ampersands\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here\u8217's a {\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul link with an ampersand in the URL }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a link with an amersand in the link text: {\field{\*\fldinst{HYPERLINK "http://att.com/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here\u8217's a link with an amersand in the link text: {\field{\*\fldinst{HYPERLINK "http://att.com/"}}{\fldrslt{\ul AT&T }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's an {\field{\*\fldinst{HYPERLINK "/script?foo=1&bar=2"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here\u8217's an {\field{\*\fldinst{HYPERLINK "/script?foo=1&bar=2"}}{\fldrslt{\ul inline link }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's an {\field{\*\fldinst{HYPERLINK "/script?foo=1&bar=2"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here\u8217's an {\field{\*\fldinst{HYPERLINK "/script?foo=1&bar=2"}}{\fldrslt{\ul inline link in pointy braces }}} .\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Autolinks\par}-{\pard \ql \f0 \sa180 \li0 \fi0 With an ampersand: {\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Autolinks\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 With an ampersand: {\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul http://example.com/?foo=1&bar=2 }}} \par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab In a list?\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "http://example.com/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls34\ilvl0\tx360 {\listtext\tab \bullet \tab} In a list?\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls34\ilvl0\tx360 {\listtext\tab \bullet \tab} {\field{\*\fldinst{HYPERLINK "http://example.com/"}}{\fldrslt{\ul http://example.com/ }}} \par}-{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab It should.\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 An e-mail address: {\field{\*\fldinst{HYPERLINK "mailto:nobody@nowhere.net"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls34\ilvl0\tx360 {\listtext\tab \bullet \tab} It should.\sa180\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 An e-mail address: {\field{\*\fldinst{HYPERLINK "mailto:nobody@nowhere.net"}}{\fldrslt{\ul nobody@nowhere.net }}} \par}-{\pard \ql \f0 \sa180 \li720 \fi0 Blockquoted: {\field{\*\fldinst{HYPERLINK "http://example.com/"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li720 \fi0 Blockquoted: {\field{\*\fldinst{HYPERLINK "http://example.com/"}}{\fldrslt{\ul http://example.com/ }}} \par}-{\pard \ql \f0 \sa180 \li0 \fi0 Auto-links should not occur here: {\f1 <http://example.com/>}\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \f1 or here: <http://example.com/>\par}-{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Images\par}-{\pard \ql \f0 \sa180 \li0 \fi0 From \u8220"Voyage dans la Lune\u8221" by Georges Melies (1902):\par}-{\pard \ql \f0 \sa0 \li0 \fi0 {\pict\jpegblip\picw250\pich250\picwgoal3000\pichgoal3000 ffd8ffe000104a46494600010101007800780000ffdb00430006040506050406060506070706080a100a0a09090a140e0f0c1017141818171416161a1d251f1a1b231c1616202c20232627292a29191f2d302d283025282928ffdb0043010707070a080a130a0a13281a161a2828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828ffc000110800fa00fa03011100021101031101ffc4001c0000000701010000000000000000000000010203040506070008ffc4003e100002010303020404040502050500030001020300041105122106311322415107617181143291a1234252b1c115f016336272d1082443e1f1265382ffc40017010101010100000000000000000000000000010204ffc4001b11010101010003010000000000000000000001110212213141ffda000c03010002110311003f00dadd18a10a704f6a95ccc57e37750782b0d8d9ea0cd32e7c5446e07e9f4ad723119a7b89e61e348f260719278aad613cbb640002938c76a182b264fc87bd13009c0c019c76e3d68a072e1cf6f4cd502d330c28269a61bb39c923923d4fad44c08dccb95cfd28b8280769ee08a263891e1808739e4f1d8d149392172cc714050dbb9fde8960ed8c60b79b1ed44103b05c331dbdb1dc5026ac1946d20ff8140aa631c773ec738a0346a003bf93e9cf02801895e7b9a01886796c923bd0090a06393c76a0142003ce3d86680d8dd9392303f5341ccc1b3cf7a2c812c37e4923d381429757013209fa511c18146c9247a0f6a007900c0c671c6280854e086c673eb45c27c038fd68aedff2fda836ef881f136f25d5e6b7d1262964aa02b03f98fbf153131935edcc97576f35c33349212cc4f39f7ab26186dfce5b200f73451f7600dcb8cf27e7400c0b291914046c9e0718fde81371b8e7273f4ef4007691919240e714097f31f376e7b5008caee27807b0f5a02c8e1b3c6d27d33cd0201d839523144d1a149ae084b78da47638211771fd050d582c3a0faab5119b6d12f8ab1c06788a0fd4e2ac356fd1fe08754ddccaba849696309e598c9e2103fed1dcfdeadc44fea5ff00a7f956366d375e492403ca935bedcf1eea4ff6ac68a55efc1beb3b552574f8e7009ff933a927ec715bc82b3a8f4d6bba5ca1352d22fe061cf9a0383f71dea5119cc6c0baed3eaac0f1fad40897dcc3d81f7a052366c1007df3400f21edefc5008c28f30c9c5170ee4fc37830086395250a7c66770c18e78da31c0c63de8609b41f7c515c5172a30c3b76344a3e377cb2339cf7a242aea89808cce368272b8c1a2e107c672a49f5c1a181c9c7ae7da8a2119e7b1f5068099ffa68258a132062d8f9e0f34059502b61bf2824e681bb297ced2a71efda80f19c47b9c77fdbe74057c13e539cf3c1a0eeeb9c73f33405ddb4f18249c1e28062b79ae242902024465b9214614649e7bd0362a7249eddc513456e5720f38f5a1a98e96e95d6baa6ebc2d1ad1e65521649bb469f563534d6d7d31f04347d2a2fc5f535db6a0e83718906c887cbbe5a9a8bef44dce9f731ca9a2e89169d6d6f2184b1455dc07b11dcfeb4d16f119c649a681285b03d3e5500f87820ff006a0e098191de80ac9b8904647b55d11da9681a56a31f87a869f6970b8ffe4883629a289aefc16e92d441682da5b098f21ed9f033f353914d19b751fc08d66cc16d12fe2bf45ec92ff0df1fdbfb559ec667aff4eeb1a04db359d3ae6d40eccebe53f46ec7f5ab82263da7dcf3eb5174e5181076918c7de869503232491ee4515c1803824f03b51287f30e0e7d803449494832c157278a2e8c71fcb9f9d144639236824d01e142efb1768cfb9c7ef40512a818de78ff00a682518e7cc30ab9e00a02cce9953247bd41e467191ed9a04205ee99da4e4e3d283a524b0427b5026c18a8e082067db8341ce0e39ed409b6502907391edda80f2dfdc496f0c124ac6184b144cf0a4e338fd2894f7a7342d4ba9b568f4fd261f12571966270a8bfd47d8511bae85f02b47b7fc34bac5d5c5dc88a0c90ab6c8d9bedce3ef4d1ad691a6dae976a96d616d15b409f9638d70054a1dbc68ea51d4329f4619a8022b78e04548515117b05000a035c5c4702a995c26e3819f534047bcb68a458cce866719540724d02e41c0f7a012a40f6141cbc8e7bd01719e38e6838af1c0a04ca8206d3cd037bdb082fad9e0bd8a39e0718649141047d0d5d18f759fc0cd3af164b8e9999acae4e4f81236e898f7c0f55fed574615aee83a96817ef67abda3db4ebdb7f66f983d88a061bb8db9e3d45165076db83c1f950a53780d8247c80a2398f182724f1c7ad080c608cfa7a51a0062adc7afbd0130173bb9c5070f071cb37e82826106e8f615e01c9e680d6b35bc534be3c1e3831b2aa962bb188f2b71df1de819ae4b1048c7f57bd01a58268e332642ae0704f7cf6207af6a01b99e17b7b6416e227407c494139909ed9f4c0a04a4e501e0f1eb40d263e53dce7fa682c9d0bd13abf58dd6db18bc2b157c4975270ab8ef8f563f21447a73a03a1f4de8eb031582b497328066b97fcd21ff038edfde88b7e32703bd64188e7e6283864b73400cd804b67ca3268317eacea6d56ff005233592f8b6303f953fa4af7c2fa93417fe98b763e0ea171297bab98558068f695ce0e08fdbd281e5c6a57ba5e9d14d716ef7774f2ec112601da4f27ec2827ada74bab559a20e148fcae36b0f91140283729c77a0e0a7777a01dac68395719e39a029607cb901b19c501480ab9279f4a086ea8d0b48d76c0586b7143224a76c61ce1831fe93e86b43cd1f12fe19ea7d2533dcdbeebcd20b612651e68f9ece3fcf6fa5067cbcf20ff009a051724905411e94032799060723da8406d6c67e7ea68d0e1770fe5cfb5026c37039ef9a02eca098c91e6e01e71c500b1d8a49c12786cf6a06a4e256008e3d050119958007920e2801154e32fb4120927b014017eb1c523ac5209a356215c291b87be28957ef853f0d66eaa99352d515e1d190f947669ce7b0ffa7e74a8f4be996569a5d9c56b6704705b46bb5238d42851f2ac875712bc70b3c30f892019540704d01ad2669a0491936330c95ce7140b2e4939a03638c7e8680ae485e33bbe540d60d3ada162c90a02c7270a39340a4f28b68da4645007a8f6a069a746f73235ddcefc391e12b2e1916824948742c99382473c73404791c617695279dc0640f9502c578c9efeb4095cb4cb0830ba21cf999c6401f4f5a05061d430c8079a02e03b3004311c7d281b5e3cd676c65489ee594e4aafe6c7ae07a9a0a075bbea3a8ea96f047d3935ebc404f04ad29411e08e011d98fed416fd212ee5b05b4d5ad6300c615807f1171eaa49eff5ad418c7c55f8466dd66d57a521f20cbcd66a7247a9283dbe5418a63862479877cf1f6c5008e400bdf1ce684016fe53dfbd1a73794600e08ce3d6800377c8c7d6800a9cf75fd4503d91492460f7ee3d28247a7b459f5fd592d22711c206f9e563858a31f99cfd050583518ba75247b1d134f9aed21396d4669769931dc01c003f7a329c4d17458ac5b55d36c12e040a3f1da75c1cb04ede2447f7f6a94567ad7a66db4fbbb29ba7d65b8b4bd8ccd09c8231eaa07b8ab04a7c2cf87b3f53ea8d77abc72c1a5dabe2452bb5a561fc83e5ee7e541e988218ed2dd22b7855228d76a46a00000ec00a510bd4dd511f4fe84da95cc31f880022da4902b1e7d3e99ac86fd03d631f565b4ee6d4dbbc649009cab2e48c83f514165b8b94b6895c44f279c280839e78ce28178ae6de46748a789e453865570483ec6812d42e85a421fc37918b00a883924d024c6e99b7a2a966c0009e17dc9f9fed40f81c77e28139218e4ff9815b9cf23340a01c907b9140201038ed402fcafd28386464e4fd33c50272bc60032609cf00fbd024f722dc66f24822ddf972f8feff00e280f69b24844919cac9ce7de83a447f30ded823007b50459d6ecacb528349b979127651b1dc795f1f3f7a0990148054823dc5015d491c0a0c3be337c2ff00c489b5ee9c87172016b9b541c49ff5a8f7f71eb560c1fc43e0a47e1aa94277310431f91fa551c1727f29ed409b641c86e31839a3454805739c1f6a026f1fd740f64665fc8c31cfde82db79bb40e9e8f49b62eb7d7e8b717ec832c91ff247fa1dc7df2281bcc9369d671493c422b7911654c1215f92bb8827bf068624ba635392df5eb4b9924558ee5bc19b71cee43c6dc7cf34c657be8db0b0b9d0f51d2afe668934dbf9628ddb8c2b8c0073f3a80da37546a7d25174fd95dc125c69f7313ee5655dfc313bd483cf07b1f6a68d5b48d5ec758b612e9d7293211c8fe653f35ee2a084eb9e8bb1eafb3582fe496278f3e1c919fcb9f97ad03ee8dd017a6741b6d3229dae161057c5750a48249ec3eb4139238568f6a9e7b103b5037934cb3793c610a2cd9277a8da73f5140ee38f6280c4b11c65b934023006d50050030e4647de80c846de3b500fcf9fbd0197273ed4007b91400e580c8e45074a82400e72682b36fd2162b7f25ddc09af2766ceeb872db79cf00f6a0b3229550140e07007a50092db860673de818df473c862686dad6470d9cce3b7b63e740fa1de6252ebb5bd81cd00bee2d800d003a6464004763ce683ce9f1cbe1f1d3a67ea1d1a30b68edffba814708c7f9c63d0fafceaca31e6dc71e1f07daa82608c83819f7a1a11ce149238fd68d0a579ec682cfd27a7c3a86bd10bc38b3b756b8b93c1fe1a8c91f7381f7a034f752ea5aa5c5eb292f732128037619c018f6ec282e5a2cb047abda74d5ce9b6da80f136de4a496219b3e48c92000323ea73467519d3da5bb757dbda410ac90c77c23058f99007ee7ec31416882ee47d23acb5185caf8bab4691b1efe57fff0038a9457ee75a82f6e7429350466b482f2742c0f74241c80c38c64541a9cfa1e89ac0177d33ab3d8de28f2b5bca429f91140e2c7a9b5ae9fb85b6ea9b46b9b3c796fe040768f76ec0fafb1f9505df4ebdb3d4edd6e74db98ee216fe68ce47d280648f75e2485a44da385ddc13f4a025ddbdbea16a633286566ce55f9c8f6c502ad750db2c514f30dec428247e6340bbf04100b73402afb943ed2b9e30683836defe9403bc1e06734020e06280cafe8683a375941d841c77c1a0151b467b50159f00e4127e5402872371040c5046eb5aadbe9b1c02e2f6dad25b89047099c677b7b0140fe3f1010afc803f3018e68160c3041ee2823f5dba92d34db89a1d9e2843b03b6d05bd013560c1748d57aa2797c6b35bab78e6959dc47231580ff336dcfb03c1a58364b5bbb7d7fa7b7427f1f673830c8664285bd1815238fad20f2c7c41e979ba43aa2e2c1cb1b663bede438f3a13c7dc76fb5515e9065b851f7a02950002a09c51a1b83cf14176e90d3645e9ad7752752aac23b3439c066665c827e944d29a6410aea725c4567135bd840d3c88a723728c29c9efe6c50d3ee9545b0bf8ef2e6e3c2fc2c6f72f2920e5f19039ee4938a9a875d03278377acf52ddf867f036ef71923932bfe51fbd3475cdc369df0db4fb389d4ea37970fa9cc0b00511795ce7d4f181eb4cd2451755fc45ac16d637381b14ca36b641dfce723e4053170d6cb52bbb362f6d3cb19241f2b9029862f09f143549ba7e7d2eef6caf2797c66ee17fdfd69862d1a069da7dfdac579d17adcda5ea9e1a992376c4723e39e3b024fd7e94c458ac3e25dee8d31d3bae74e7b79002bf8b8549471db38f5f4ed4c165e943a06a328d4ba605b4b22a1523c420c64fbaf38a82d36f0ce7cf7463790729b53017e940e0b0ceceed8ce0500e1b70daa08f5c9ed41d271cd0132476e7d7ff00aa069797d2411168ed9a41fcc858211f73c5075acb25ca6fb82aa31e58a36c81f561dcd033d42169e158ac64b98151b3981c2966cf639f4a064c7a8ac55e4865b7d493701e1c8e52403ea3cbfda827e390ca3f2c914aa81991bd281cdacc2747215c60e0ee5c67e940cb51b0b2bcbd824bfb08ee1a252d1caea1821cfa67b1fa504982b2283ce08f518a08abb82f6dd0369a5662081e14ce40c7ae1b04fda82275cb0bfd4f4536f7114589a5412461f3e4ce4e0e060f63f6ab2893d3b4b5b5b78e22ed22aae3cc3cc7e64fad3449a22a461500007602a0cd7e3b74c26b5d2ad79147baf34eccca40e4a7f30ff3f6aba3cd0543267eb5427b86f1f4c76ef45d0eca1ad5ef224d13e1cf4fd9b22192fa67bc955f8c8c617fba9fb510d7a6ed3fd43a735e5b54964be658c048fb6cdd9e7eb8a186bac97d174e6d22e23437b7ac26b95e77c68bf950fa7279e2b22dba45b59e97a669fa4ea36aeff89cea9a90451fc355ff0096ad9f4ce3f41570675d4fa8c77da8de5cde5be26bc653171ca47dc1f6c9fed5562b97f70276808da7c24f0c1c63804e33fa8a2928c0e0383c8f7ed41d92a41393f4a2548595c2c37493db4cd04e8a08f139566edfef3445b6e7aeaf65d2df48ea2b11776ae02a93e564c772adef409f4ee8ba9a21d73a36fa579ad9f325afe599171ed9c30a960d5ba0fe2843abb47a6f510fc26a4c36890f9558fcc6783506a1147b510024e30339ce680d2c6ae9861eb9a009178a0205443b989e39cd01d8075e3047ce80563057ca381ed4011c4531e503d85013c91b804a21279c903341131cda8c3abdc8650f6d20c4321232adec3dc504bab2c113c9293bb1963df3408dd4b75e1efb2856463dbc43b4631fad047e9177ad4fe32ea16b1db4b8fe1aa92571f5f5a0916bc8e0895af5c46c17cd8c9ff7da80f6d736f7f6915c59cab35bc837238ed8a072a31c1ef4062870718a06f7702dc5b3c522ee4752ae0fa8230683c75d6ba3b74ef535fe984929149e4278ca9e47edfdab42058003763ed409f88ffd6dfad06b1f12ae612fa0c76e0b471e9916d23f973eb4158d3efeff004a984da5debc1295d8e4018dbf3145d583a2ad96f356bbd7f5d90dc59587f1e79a6392f28fcaa3ee47159444ea3aa5ddfc7acf50dcdc344d7a4dbc317f52641200f6000fdeb41b5ef51d8eab672ffa9e971c97c11638268e431a46000012a3b9a351567db823b11f3ef40948e428048207a8340ab48ae83cb83ee0f3428a982719edf3e68c9cc97d3fe15ad8c9be138f2bf38e7b8f6ef40f7a5f55bdd3f56b46d3649127f1405f08e7249c76f5fa50689d48ba5f545cdcbdb462cba9206411b2b055bb07d4fb1c73528d4fa8f52d62cf47b6b8d2e65fc458c49f8a818795c151939f977a823ba0fe253750eb7fe937b04293f9f6c90be41dbdc7ff006283473c1efc1a06f69776d73bbf0f2aca32572bc80470450284a46dfca19f819f5a04e799614def26c0bdce09cfd85045dc75769d12dc3c3e2491db0dd3c85195235f7c91cfd066ae0cdba9be31f4ec61a386c1ef9d4ee473e45cfb1cf34c101d3ff1ac9d481d46c628ed24751881880833f988e7b0fa5328dfed2f2def2ce2b9b79925b791772ca87208f7a60182ee2b95cc0c48f53823fbd40ac658b30f4f4a086d4ee1d75bb6b78f4e965596366fc5211b23238008fde81f43692da5bc30d97831a0397dc09e3d714087506bf61a2c4cd77324726d2caaec141f9fd2ae0c435bf8c57173ad7876f7a2daca10489121244cdf319ce3dbf5a834fe81f881a6f57bcb6ba7c53c72c11873e28cee1db391dbef4199ff00ea4348116a5a66a8a8a04aad04847a90723f6ad7d18c312ddc02a3815423ba0f63fa541687bd9efe1b533b3c9e0a78473e899e318a09bd0ba6eef543e3b2bd8e9b10064bd9e4da001dc81401aeeb29a984d0ba7d5e1d06d4e6594f06523bc8e7f5c0ac8af752dfc17d7090d9218ec6d9447129ee71fcc4fb9cd6842ab10dc0014f3e5a2c1704b671dfdc734525226dc939e283a362c7f940344a380393df144733e2276e38f5efcd01b4bbbfc3dda4a9298a44395902e4a9c70682660d4265d62de40b1bdc1545054f95c8fe627df141af7c3af8808f3dd68dd5d2a45765884b8908d8c3b6c27b7a77a945d7a5fa474bd2ba8e4d5748b28624955d5d8b13b79ee9e983d8d40a753758c7a46b96f6114725dc92279a2810b3a64f94900763cfafa503fd3b59b79ed84da34713c0cd890f0a158fa1f981de826e1b548959fc4dc5cee24b6467e59ed4101ff19e9f676baa5d6a72c50adb4ad1ac790ccc076200f7ad41e7df881d79a87576a5f87b0f161d381db1c2a36e7e6d8ff3416bf87ff082c6f208ef7a82f22b9761bd6d619785f6dc477fa53705ab57f83bd297ceb1e9caf67708db9c4526723e849e3e94f212dd25d117fd29a8c09a76b534fa39cf8b6b71ced38e36fb73417f52e64548e34007e673e9f21ef590a1c918c90718dc281a69b68f67118d9da5058b798f6fa7fe280daadd1b2d36eae70710c4d263df0a4d583cc7a668fd4bf11b5837d7c93dcd9a3146959822a0e781f4cfa55161e9dd7fa67a4f55b9e9aea3e9f81fc09ca0ba118998fcdb2338c7b528d39f4cd2ba76e2d357d292df4eb391809963420ce1b1b576fa1e7359119f1eb4e17dd033ca172d6b2a4df303383fdeb5c8f2eef3bce4e0e335684cb0c9f354160d36f64b0baf16072b91b5f03391f43c51aab23a5debe91c4fad4d73689e6fc3a290573ff4f03e59f4a3280d67581ce916567f84b58ce0a1fccec3d58fa9a084de08c90464e4d1a8e419059b201f4a05630a176918efc50176293872c17bf14042aa0125b03db14046c60b60123fde6827fa0c68edd5365ff11346ba6292ee64194240c807e59a32b7fc51bfe8bd5ed5db424860beb62b89218422ce09c11c01dbbd0660ae110bf1bf2154838dbebfefeb41a8f4cdac7f117458f4d9ecd2df53b4cf81a822808c47255c0f7c8e7fb54a2ec2cfabba3b4b4b8d3af12eedad40926b0f070a13f9b633649f7a82eba6ea4357d321d4ecad512daf20df26e016507fa4fbfaf3e98f9d067dd2bd2faac9aa4d72d72d1e9510ca46a7631c7a320e18f1dfd7bd059afb7da816d23de4ba5de211346a1e4785f190548e4648c63b64e6b43ce9d5baafe3b539c5b452dbda46c638a167cb281c73ee4ff9340e3a3fa5f5aea4ba58f4bb57dbfcf2b02a8bf7f7a0de3a5fa0b50d2a2d92eb3e048c0a97c867dbedcf6a944e5cf4f6b76d1b3d8ea42795066266c87c81c65b9cfaf15048e83af3cd64abac08edaf01546c38dae4e0657ee6826e5b892de3702292e2545ddb55700fd0fbfca81c4b3bc718716eef9eeaa402280d14ab3c0b2c65c06fe571823ed40df56b217fa6dd5ab9216689a33f2c8c558307e83b8d77a37aaa7d22f2512c28768800c9954671b3d33ebef568d0ef7a7749eb0b5bbbb162d657b32b46d2e1564c8ed9c5644d1b0b9bbd261d2a440af6cb0e2e5b1e7dbc1238e0f7a0375b696daa7496a3a4dac8a92cf078685b271db04d391e40d5ec4586a1716de2a49e0c8c85d3b120f715ba1899173ff305413070abd89cfe9f5a2d3ee9c8639fa874eb6b804c52dc46b20c9f302c3bd11e84d47e1af4d5dc6521d3e3b662c19a58721ff5a9a321f89bd27a374b456d158dccd34d333332c9b4b2afbe47a7cb1f7aa33d2bc0d8c0f1c8f6a2c14b6d501b39cf63450897380c319e3de8065031c038f7ed40d8faf1ce41e4d004876a8dc3cc7e743025c956c818028c904579e7f0e15695c9c0541924f6c00283d0bf07f42d6b48820b8d62d20b2b58d656404959e52f83c8ff00fcfafbd4a35bb06f12391a48dd55cee2b2f3818ed8f6a8158a159890f02242079147623e631c502b0db436d1ecb7458d4738038fb0a087d6eeb508f48bb7d32d95750752b6c26c905b3ddb6f61eb574794f5cb6b9d0fa9678b512b25d24bbe52b8c1638278fbd582c57ff12afaed45b5bc0d0d8a8c08a2731ee3eec5793f40450466a1d59af446293c186cd53ca0c36eab93dc649e49fbd048e89f1675ed35e301e293919dcbf9867b37cbe94a35fe94ea4d33aba6824306dc48015750d86c6e247b0cf63591a40b8dc23fc30f14138dcac3000f9d03687547f12e8dd5af816b13148dddbcd29039c0f6f6f7a0eb5d62caf5636825db70c9bc4328f0dc0271c8a090627d3073ce681acf6505ccf14d35bc2f2c2731bb28254fb8a075144a83ca806792400334049ee6281e2496408656d880ff0031f61fa50446bd76058ea1b9e21025a3bb48afe71df9c7b71de9c8f196a0de23ca7b827d4f7add117e0cbfd4b5059392369663ff004e71c51aa97e8f555eadd258f2bf8a889cff00dc28cbd0bf123a926e96d163bdb74490bca2321c678209ff001591e71eafd7a7d7ef45cde2c20aae144638033fb9ad2e1b5e69d058da431ccf21d4a5c3b4631b62523807feaf5c7a50222f2d648c25f5aeec8c2cd19dae3d3e87e944d3eb7e90d425b49ef2292de38224f1505c3f8724a9eeaa7bd0d57a60406059436306868a7803839c7ad1a158039c13f4a33a716767f8cb9b6b55e1ae2458813e9938cd07a9f42d0b4de99b4b7d1f41b58ff19b03c93ba06607fa8b1f5f619a5b8266d74a65d42da6ba90cce996dcdc8c9fff006a5a2c2635083b05ef83eb5028076341db4b1ed9f7a04651fc41db18ed419d75b744dbea335fcb0db0335f2057901c05da73c8f9d5d18a75174a3f4c47335e35da4ce418a489374254f707d463d33565d1529b569a489a17944b06ec8057d71dcd037b4b6b8bfba31584124b27e62a8a4f1ea68357f83da7ea5a76bfe0912453ccabb49194653cb60f6ce3dfda983d196cd108c2401711f9768e306b2297d73fc6d02773a8b591922693c5004bb9d72542fa2f6efde8314ff867aeeec27500b77bb5670e36ca19b1dff2e7f2fd2837ce8bd5dd348b78b552219022870d9c46e792a4f6c608a0b846c8e03232b29ec41cd0199f1410fd4b24b1e8f712c0a5e4452d851e6c639dbf3238a0afa42ba77475e4ba8470896681da45180b18da76af3c9029c8f26dc1df2b9c606e273e86b743331924f27f4a82c12280e59b008e79f6a2d4d74188ff00e30d203a82ad7519c1ff00b860d11ba7c5e86c9fa3afae6f4091e043e021270b21e01c7dcd6479ab4dd3aeb56be4b7b184cf2b301b57d07bfd2b4bad0fe25e9f6960ba7c7a55ac50cd750335ccaade7723b83b8f6e38a2207a5ba4e7ea3d93780cb616ca53781f99fbff009a0b675a5be9765d43a75a6ad3b25adb4185429b831c70303dfdfd2831eb8954ca48f3827819c71ed406b2b1b9bf9a5fc1c4ce2253238047957dc9345d122b792eee522811a495ce1157b93ed444ff0049f476b1aaf51c761345269d25be269259570c833c6077249e062a68f53e8ef0da69509d4ae225b92a04af232ab16f98cf1f4a5a266d4dbca8af13a329ecca723f51502d14f0cb9f05d1c8ee01c91f6a0393b4edfe63c8a031608859b38f97340d84d04e5846eae50f9829ce3eb400fb24466041f5e3d2823f56d22db57b192d6e61468a41c823ff0035651916bbf04ada7badda5cad6d1b72c09dc33f2a6875d25f0865d06fe2bc6d4c4d3282026cca8cfafcfd29a34cd234a10c768f711a78f1bb392a3001208e3ec69a26a58d640c832091c90706a084ea1d3eeafdadf4f86da3166c0b4b397c18f046140f5ce4d04f4702436e91c28a9122e028ed8a0a9f5a5b6a09a1bc5a135bc72cce048b3c5bc15c638f9d59043fc2db997481aa69dae49e1cb6bb643239211939e467818f97bd305965ebce9a10bc8da9dbaa2679dd9ce3d8530572cfac87566ab05ae9f1490692b9696e1f833738555f96793504df5f25945d2576b7ec16dc46792381c7b7ad5e60f234980e42f6c9c56a82ec3eff00bd4124e49700f1c646e3cd169ce9575f83d52cee324347323f6e3861ff008a23d47d4ba6a75074fdcd8ef317e2e2ff0098bdd4706a60c3f4ae8cd5f44eb8fc3e97248a638cbc73bf90483d463b373e9574685abf42a6b5649fea72bbdeac4a8d3b018cfae31f7a6895b6b29b41d30d8e9f6bbed9213e1b7a994e724fcbb5064bd7835a9752d3af75d8116354778f660788cbd9483dbb0a0cd20b2b8d43528ad2088bdcccf854039cff00e2827a0d34e9da1de896f2182492efc0976f998aa827d3d334113a74aa9a9298628e74570478bc0c7cf1da83724bb8246d3e6416b0384da61b5501c9f5c3704f152c037561a95f5fce61d3ad6db4ab950f34b331dd9f4191db8fdcd406d67a675ab4b6d325d1af248272a43430315ddec7038f6ad4b3f448bf47eb71cb69abddebf21d5e26896203846c30c8603b9c6452d9835901405660376319ac84bf13180779d8bb82827d4fb0a06f777367a75acd7170f1430a9f331200cfceae061a0cf6dac692d7365266191db0578f5edf3a6075a6c9278b3433188a467860d96fbd40fe540471409aa0c1140750001ed8ed4058e15133c983960077edf6a06faade5c5b7822d2d926766cb967da2341dd8f0727d85033d27597d62e2ee3163756915bbf8799d71e2f19dcbf2a092b88dd9a311950a0e5b70ce47fe6ac18af53f5b69da9752dd69da9ca906876e24465d9e69881c6ff005c679c0aa2bfd267a347512c93dbb5d42d90d3c800b68c9ce0ec3cfa528db74ad034db5905ee8be1ac728dc153984f3f980f4fb56453be2de8f647a6aff53796596f0aed46798ec033ce149c0fb0ad71479c9bb9dc3bf3c55a0b95f65a825150b481a407b93c0fda8a29c06671dc93803bd131eafd0af6dffe18d2ee25982a4b04603b7a9c631fad03bbe586381bc5945b96385718c827db3eb5288eb8ba934eb15fc3c535f05427796dcccdec7150637d5bd55d5362b7975aa4d0d919018adec8637807bb60723000e4f7cd58203538aefa8aeb478a7b9beba924547b8774cf8608036a80704639cf1f9855d1a7f4c68b67a03de5e5d59dad8d988c62e1c0f107a1e7fdf7a082ea6d07a6e3e99375a7cb6b3db093c727701e2360f7f53dfb50653d4130d42ee18f48b3f0232a15218936963ebf5fbd06dbf0cfa74855b9d46e04b730c6144691e12307d33ea7de8348ba6b5478a279a004f98c479247b81f5a9438805ac0be2e02e73c9ef8fbd40c2346d43578eefc40da7da1dc8b8eefea4fcb9fef419beabf12a4bcebcb2d2fa7ee0dc58492084b30236bb6467dce383f6a0b87556a67a7f4d95a0bbb5468816f0a69c78b2e072572719ce78357079dfab3af2e7a92c963b88d94abbbf91cedc93edf418aa2c5f0dbe2a6a9a0c90d8de34773a6a8da1186d6403fa48fec682d9adeb7a9b4c9d572dacc9a6c9700456e5ca910e000ecbd8e580352fb1ae7476bd6dd49a325e5a9f3025245fe961dea097523cc0919a032af039a006936c81423104649c703ef40dcce64bc3035a87b6f0c378f9fe7cf2b8fdf340a4b6e25962915d94a67807839f7a043586922b5636ec44c061063f31f6ab079d7fe19b7eb2d4efeef55d5d74f992e9a0fc3a441dcb13927b838c9aa2d4bf042c618e178efee6e18104870172318edf5c1e6945bbe1a748ea7d2315edbea3a99bcb190030c401010e4e783ee0fa56455be3d6b90c1a6268d69e17f1486900ee98ec29ccc183119419e7e55ba11f089f523ef5058363a8059fb8e31e9421b491056c01819e28d3d0ff07eea3d53a1e3b6b8db235aca63c139c0eea68ca47a9fa6ef757b83ff00bf68ad428c2f248c7a8f9fcea518df516adac74e7544f63a2ea172f1800291e6cee19ec78cd5826344e85b6bad25ba8fade5b99dae0ee11efc71e858f7e7d054a2d7d39a75ae8f7b6b00b8917f1516624b78429da327cec493db1db1d8540cf4aea28f58d6aeae2f6dd64b498082d880488d149fcea7d4939ab04175e6850a8d32de3b78e380c8de32c4db4e18e430fef543cf86fd0d691b4fabdf6648b3b2db69ce7dd87be68342d2f4fb9b5b891af1a28a2dc05bc5036d001e0eef7352884b961a2ea9aa7555c885e08d45b5bc52b61b686c120fb939fb541276bd4b61d53624d942e2f6200bc32290633e99f4233416dd3ad3f0d611c0c77b632e71dc9ef41156dd27a45addcb3dbd9c513b1dd941821bdc7b558333b9f873757fd69a85e3f813e9c7723b5d93265d872473c11544a68ff08fa75e290b42ec4e4124e70738fa5048e89f0f745d2aeadd2decedda6525c975121183c77f7a945c754d0e0d563682ed43425369403bff00bcd58308ba7d5fe13f5a05889974a9d8b46aede4914f707d88ff001528ddf4fd7edb54d1a1d56c312dab2e64dbc9418e78f5c541296d70b716d1cd6f8789977230ecc280cb7519b816f212b205de4e0843ce300f6cfcb39a0545c42cee88e0b458ddec33ee680eac92266360debc7b5056fad2d354b9b189745744be121daf27e550548ce3d4d58324d07a725e98ea2b7ff5381f5169a7579d021fe13904ee43ddfbe49038ab46e76cf05cc714f6d309232a4a98ce54fd6b2196bb7f2e9b631b2c427b891b6851db3eff002007341e5bf887aa2ea3d4f77378be381e42fdb711ed5a1554395caf1cd07617dcd04fc85402101da791421b49920331381c60d1a69bf02f56f03a925b12c162b98c955f775e47df19a32d99b518268e4491668704a79d4aeec7b7bd4a30feb7e9144d76e265697c3e2693631674273803e556087d76f35fd49859e9925ccf611141106f2e182e3241f727f5a94681a268f79ad1b1b8b9dd66b1c2b1ce9bb06361c1e7bf3fe6a096b0d3ba57488e485b52b40909c386901607d47bf7a0ae758eb69ac4d15be81a748f0a9c35cc90b2eff4c03c1c638a0b77405c5d5d45f87be5fe359a88b81b401dc1c7d38fb50586fed18ea3015790091591e447c1518c8c7a0a0a5754d8c9d49a8d9f4ee9dba0b3b5224b9692327728f627e7c6682f9a7e996b6b3a8b6b748a348820c7720761412c064e3041ce282b5d4bd73d3bd3f33daea97ac2e540dd0a292dc8cd043c1f15ba2a7923b65bb910371b9a12141f9d02edf13ba2ade56857551e5e77244c54fd0e280746ebfe99bbbd655d56dcdc9ce08465565f4ee3bfca82d53eb3a6dac3e25c5f5ba646402e33fa77a0aff5b74ad8757e9ca972844aa37c520fcca7d3f5ab067bd369a8f467544d626c98e9f7118f0200e4465c903049c8c9e6ad1b24334b6fa6249716cab20037c309dd83db03b5640dddac3764a4f02cb1103863919fa7a1a06d6f600c37162911b7b252b87dc773f1927393f4a079f868edae1ae6328a8b1ed38e30050226e85d5dc1f879011b3c47c2f604719f9d01eff4f4b83e3c6b18bb452b1cac9b8a83de80b16e8208a3b7b58e1407cc061427cc0ff1560ce7a8f592d69a97504cad2dac01a2b53900c3e9e51ea58f727d0551e73bfb86b99a49a46dcf21c96340dc13804f20f6f9501c0e3b8a0963316fcc4607007f57bd084d64dec01200ce483468ff0040d525d1755b4d4206ff0095207c11dc67ff0019a18f56584f6daad9dade4211e39104a8ded9152b235cd8c530613229c8c1c8ef50472e81690ee00322b0c100f0debdbb7ca8111ace856371358cba85aa5cc407891ccf83f2ef4048b4ad2e59bf116769672c72f99dd1437239078e2824a4d3e1b94559234110e781839fa0a0561b38ad532a12319c86c6307e740a9732a3a00cac870cd8e0faf0681be8b6db965bb909df3c85806eeabced5a09523647e6e0fef419a6adf116daf7ac34be9dd1da686e7f1ca2e243b76320ce57df9ff1560cc3e3f470ff00c78255b842b35bc6c4af9b6e323d3e95467b6365f8dbcf062beb68c119595d8aaff6e282422e9899b4f6bb5d46cda2562a76316c1078f4a0859e1b9b762c0bf94f0e84feb4125a57505c58ea70dd5d0174a986d92b1c13f6f5a0de7a5be366877260b5d42dee2d2423124a487507ebdf15289dd3fac7a7bab6feded74d61733473acdb5a162142ff00313d81ed505fa58fc6d809380c1b9f5c502e0e05040ea367a85dea454de2ff00a610375b04c16c7a16ef8340b5f6930dce9375636acf6a278f04c5dd4f1dbf4a084e91d06f3a52dee62bbd4a2b882494ced3c8a448063b63b638fde803ab7ae749b2b3096d792c93c8c109b55dcd18ce3710473ffdd043dc758dc5869044565aa5dda4c3c2b7bc78c1f14e3963db03e7c0ab066bf1327d41ba76ca6bc48ecad24c456f6b0c87cf8e4bbfa138c0fa9aa3297c83dd4e28395811cf2680a5b93c7ed413cd1ff0f3c797b8031406645236b0508406f30e68ba49c051b97d0e0e7d28ad57e19f575c5be8f269515dac772877c11bc464dea7ba8c739ce78f9d3193bb8ebfea2bcbd6b5b6b8b58bb7f13c2f0ce31cf0deb4c0f2dbad6d743d2ee99efae752d6c02a86e0054524f6383c7ff94c0b6af274c75149a46a5a82c46f1e1479fc3190bd8156fbe7f4a960bf74e9d253f1167a3ac09e0856610e3041ec7f6c540f67b892cee7f8d18368232ef2af2508c7047cf340ead5bf130accc9b1186541e723d09ffc5033bbb1b82d74d6b37f1244daa1b38073df3f4a08eeb1d3b50d4fa6a5b4d32f12cef1902ee73e523d476fde8306eb0d3fabfa4ba92c278af67bb7281606472f90bdd58558253a6afb40ea1d62283a8b461a66a6f931cf6a7c2466f7cfb939e7b5515fbed3747b5eb8f06eb78d35080a2ec9719c76f98049a0b4ebdd37d1bad869acbf0b03c5c16b29444adf50ded41995f68564a263a66b31cd02be152505493f51c1a088bab69ad1bc179e320f07c37c8a0692b46c4995f0381db39a0b2fc34e971d57d4705bc8db6c50ef9dd97b81fcbf7381528f5ae97a1d8e996d1db69b0c7648855b10a81b80f43c739c54134147b9a036063279fb5046e957726a0f2cfe04915b06db1788305ffeac7a0a00d72f8d9c491c06337533050ac7185cf2df6a06da2da4293488f34973328c34aea428c9ec3eded40ee7d2ad249448f6b133820ee2833df3fde819ea96897461b05b87815f2ee919e5d47704fa039ab079b3e326b70eafd4ef6d6650d8e9ebf868b69c8247723efebf2aa280eb9193ebedc5002a124e015340018fb8fde82cf32b1603d0678cd02406dce3008e47ce81b499c331383c9c9f5a2e9c69377369f7d6f796a4acf148acb83fb511e91b3b3d0bab745b7d45acedd8e3732b71b1fd73f7a5a19eafd09a56a0a96b1c705b49c48510761ce4fcfbd4d0d752826b2b583476fc3daacb295b79d768de8a32b1e71f989e49f6a7d14dd1af5ba275a45b8b093c054492ea769092373765c1da4679fbd306e36ba9595fe9f0dcdbcc92c33e1579cf27d0d409ea178f68521b6b76926ee8a7853f7ff140bc768d78f6f73748d1cd103b543f0091cf6efc502f7319dac194371d8b6326829f0c501d7ae6fa568d5d4942c806d4db81839f53c8cd59456fae6e628749b5bab8b1865b08e4726588ec11e7f2e49071c93da9a31dd4341d675e9a5bad374f9858162d0b4ac70e18f0573df35a0c759f87bd53a404f174f965dfff00f479b1ef570576e34bd4b4cc0bdb3b9b7258a00e846e3f2a94376475cee4914af7ca9150685f09ba61efb52fc7dd69bf8eb7c158d1d0b47bb38f37efde968d6eeb4eb5e91d6ad25b660aee59974db6881690918e31ce39279e062a5a34bb57b88adedd1e379679065d80036679e6a07e8391bce7e940c659ef5afe1286de3b16f2b8903094b7b2fa7ce81eb380c4260ed193f2a0cd6fa5d4a4ea0fc7bdadcce923158a3039db83c038e3ef41a0e96b2ad8a35e009291b8a939d9f227e43bd590436bbd6fa269202c974b7123602c76e779624e00e29833bf897d493e896525dbcb2a6b5a9c3e1456b91b6d60cf989c7f31f7a60c02490961ebcf3eb541308e39e067b507007b96007a67fb50178f97eb4165ce18165c2927b773fad023202d9c8dbb7818ff003408300b87f2f1c107d0d0c15a4f2e339c90467f6a18bdfc2cea8ff4bd561b4b9ba686d6e64552c4f954e7d7e46a60f4688d240af1b2bc6cbf5047ca960617ba658de1b792f2d94a5ab33461b18524633fa1a81b5c8b5168967369d23c0e0a24622dc981d81c76aba29df0bb48d660d52fceb88d069f04aeb69130037127f37b9c0ed9a8350781240bbc06da72323b1f7a0eb8816e633192ebc8c9472a78fa50349b4c83c068e24f0ddbcc1c13b837be4d055b57e98b996d4db5b4a893dc1e6620b6ccf2c467efc504ce97a38d3f4d874bf09af6d46e2f25cb82724e791db15650a43f878b51fc34f3da8f132b6d6a98c80a39ff007e99aba249631b58b9047239ec3e55368aeeb7d2da6f52c0eb7f16e87f2c6e836ba90724ab7a67b55d115ac7c3e8aed2182def4c56a14096368959a423d77e3229a27b41e9d8343b01069c8a8dc9660aa3713df3c64d4a1c695d3d6b67a8cba94b9b8d4e61869e4e4a8c636a7f4afcaa09a485519caae19b966f7a0435196582c656b74df3e308beec7b50629375775b691ac5bdb6b16d6378779f019b00a31cf391c9c2f1daae0b35ef52f5374de88d77aa45a6cd25ddc0108694ee2188c28007603d6a0d16c92430a4b2ed3230dc401855cfa0a0a07c45d7b5db9d462e9ee960b14b2ee134ef8c850012147ec78ab0670b643a2efae753d72686e6e2da211db42176079c8e768f65e39f7aa332d6f58bbd635096f6fe6692695b24f603d801e82823cb900ee00e68006460051dfd680ed9f0c905b713d8d006d5f5419fa505a18f94e40501b1b81a04186d62402c87be3d6810b81290aea8467201231cd1749dbc437f9f1e201db3de8ba07dc0175c027f28a335b17c26f888d6b6d0e8fabf892a29c453b1e547f49f7a946d6424f08236491c833ee0835073294888894120700f0280813c40a6711bc8843e00fca7d3ef40e41dc081f9a811681c6f7565329185623b7e9de812b3bcf11ff0b74563bd50494cf120071b97e5fda80d7577046c9019d5669dbc340324eec67fb734103d5da96bf67a7cf0e916f6e2765f25ddc4c11107ab1c8c647cce2816d3ec7f0f6564cae6e67da375e6d52cc4af2e4fb13ed4145f899d47b3499f4bb6d46cda49b69b92921565c3648e3dd40c81cd5c0ae89f13ec246d3e379ed2d6da180b5d34849da1780b128e49271c9f4a60ba685d5fa36bc42d95c324ec7090cc9b1d87b81ed50588958977cacaaa3b9341c655f12348d1dcb8dc1946540f99a019e2134454eeda7bed3839cd052fe2136b536b5d3563a1ca53c49da4b9507198940ce7e5c9fbe281c6b7a974cf4ee4ea7242d76dc784a3c595b3e9b464e3f6ad0ac745ccbd4fadcbabea42da56959a382ce7460d6b1a93c01f97272093ebf6a82f1ad6af0e9da5cb3cecf6902216919f82aa3818c7a9f4c530649a9f5269ba7429d472239bc991a1b0d3c3152880f0f23039e7bf3de90635ab6a377aa5ebdcdecef2c9239e59f3827e5ed54302195fcc38cd01245395c1f5f4a05b606538e483c501b6939e3b5077860f3914165754c33e549000dbe87de813b820c27fa7baafb8a04a69c98e281e42618c795338033df1f3a06c03e4e029247007ad010093c35674da71f977640340081a190658e41c820f141b0fc33f8926c218b4ed609366a02249bb2d19ce3ea4528dbece68eead926b7916689c643a9e0d643387521fea2f693c2d6efc786ee46d9bfed3eff2a04669edf5295ff057a60bd865309246d3bbbedc1efef41d63a8dec9ab4fa7dd4510fc3c69234ca186e2d9c003b7a67bd034bad0a5bb96e25d575267889cc1b54446d9bd0a37bfbfbd02925945a72cba8dddc48b3f87b1e58f23c623f292bdb7fa7cf38a0a5750f54ebba56a9a67fc516b6d6fd3970ea9234677c8dc7f38f6e4640ce282d1ac4b16bfa72c1d2bad430cd1ba822061865f5007d3daac19cf547c189357d561bbd3eee683c62cd786e9b73337b8c7bd512bd39f06adedec2de0d5ae639da372e6485363107f97767b505cee755d03a5e58ac228659af123184b7b733322e38c91dbf5a943ab3d52e64b49ee755d2e64950e238e35f10c884e17cbe87dc540e6d7509a4f110e9f7566a471712850abf6ce463e6280bacea36fd33a4497f773cf32c698dcc4beee33938edc7ad05534aea683ae61d64c4d2a69b6b88d16d5ca5c303f3e386cf61db140e27b5e99e96b64bdd562b6b30aa36c6c37cac7dc9eec6b42c1a66a962fa70beb6b516d0cbe76322f86c78f6c66831bf8b5d5d2dfa35a5dce60b1933b6ce3c788769f2b331ec1b8fd2831b79649984b239773c1dc68129725c1c640e73400ec781d8fb1a03c4a85d0c8582640257bd01e51fc42236263c9c67be280429c6037eb405dbf5fd682c2a0bb976cf07d3fc5009279ef8ec4e68193a9902b28e7dc71fb501d95b098e0f6dd9e0d0049131019b047b8390281bb292484e47c8500c4f242c3076bf704704739a0be7c3febfbae9a5daf23cd017c7e19fb107bb67d0f6fd6837cd2757d1fab34f4f05e37dde630b1c3a91edf4f7159103d6eb7da65fdbdf59dadb5e2460ac876ed9e1c8c060f9efe9c8a0a75cfc42d5742d2ee5a7e9dbb494b6d6b9bc930cce4f940e3cd81ed4160e98f88315e689fff0022b57664199cc5196f0c7a164ef8f98cd0589baffa68590985eb15c0db1985839f6c2919340b69d03f5285bdd6f4bf021424db4329cb153fccc3d09c76a090d3340d2f479a7bab3b38e2924e5e451cfd280d7dafe936f6c5e4bd89813b02a36589ce318a0358dc35cc4e17f9bf234cdbb78fa0c607a7340e6cec20b1596610c6934b8323226379edda81da8dcb9ec40a042f50b5bb21645473b58b11dbd7bfca8304f8add5d67a9ea8ba5d8ea72c1a4d8a952f10f2c920e368cf71e99fad5833dd0754d6ed66bdb2e9a91a5babb2a310465a57c1ddc1038e7bd5171d3748b8d46ee1ff005298dc6a764c27d4eeaee7fe1c01795881c9e7804fe940dbe287c4b6d75a1b1d1c986d62277c91bf131f4c0f6fad0663737135d3b497124924871f98e7803007d2811dc5b83903dc0a0333f03be7de8122df2c9a05a11e5f51f7a05ce7071804fca8033e5da0734020b0183bb23e5416269577ed0e5323078ceeefdff6a03dbcd62914c2f629a47c622689800879e4fbd046f9d8a2a03e31385c0e73da8b83ca590947dcaead8208e73da8849b3e19ce704f7c5015586d006431f5cf61f3a04ee586ff002481c8fe6191408f0011eb8e30682774dea9bbb5784492ca6385832e1ca95e3d2834be9df8c312e2db5eb4375080337000f1303d18763591a469baef4d755989ec6f6dae5a23e20b599406dd8e080ddbed41272f4dd8caf1c86d163910f9595882a3d718a035edd695d3b6a926b57d0ac65b10b4e06eedd863bf141077fd7af2782bd3fa26a1a8891d57c630948c0279393dcd04cf5875258f4de9f0cb7b7b6d66d2b81ba752d85f5214724fed41036bd79d2fe319d7a8f4b9c81e58de2f04827b9ce09a07a3acecf54b790685ace8697606009e52c377b7f2e682b097d7d36acf0f55df5edbdc0977412468cb6ce3be10af3c63b9c8a0b0751f505be9690dd5d752436f62a3fe4c6448f3b7b0c64e38f615734651f107e3045ac42b67a7693018633b965bc1bc838ee173807bf7cd33065baaeb1a95f2c11dfcd2bc51fe48880aa3e8a062a8b059f595df4ae9a74de9e9ec499d43c97b1427c6e47e525bb63e4282ad3ea3712893c599dbc4259c1627713c927de81043950df97db1406da8411c92063be280230839627078e79a0390a71b5bb5003a8c1232338e4507025573e9fbd02a0e41dc0e680c3691cf714053bb34160895dc16f291d98d02322aa39f3e14707ffaa06f202a5bb0c7201f4a343aca51090497efdfbfce89840c8db8e46573923ff14410b00490d9f5c1a0425dd8ce4673e873cd0265e4dbe7041ed814009b8cbb8e5863bd07163b7716e0607b6698060b96b7b9478dc8643918247ee39a60b7e97f133a8b4e0c63d4ee597380923970a3ef4c0e13e25dfcfab457ba95bdbddb212016501867b9cfbfda982f907c74b282da34874a9048aa479c83838edc62982b7ac7c42d235cd67f15ac5b40c366418a2cb0c1c81e6f5e31db14c160d035de8cd4a3f18ea96562cc37359dfe9cac887fef039fd6b39446f56ea5d13a9dca4579a922496b1975b8d22dfc3566cf9557230703be715ac1431d4d2275325d7fae6b4f6f182a93ef1e32a9f41938f6a60afeb1a95c5fea53dccf772cf2c8c489240031f627e7565c0d67bbf160487c1801073bc0c31f91f953420f2bc8c7c52cc540032738a809905c0f4fa501940208e73df34028e703938a0577ae013f4a001300db4f03b71407461ce0502dca8c9c7dcf6a003fafcbdcd0070bc1e0fd734070db467b8a04cb9c9e68274b93bcb1daa40200ed4099765249ec476cf340849b8b264823bf34689ee009cb671df1409bc8e8b8e770e3ec68984d9c953cf97be2860b248caaebc107dc67f7a184c31232db88fd451031ce50e76039f5c8045026efb8f93279e0fd680b239504f0483d88ef409ee25bb90c79c0e050151c6e21b39ce783eb40adbcc2cefa17bdb61322387781c950e3dbdf9c8a066f28790b22e013db3dbef54726081e63c6460d34191b1bb0720f634060e7600412c781502409c8e3d7b500ed71dbef8ed40243f181c0a02e5d4e0fad006f644e4819e3b501f7e3049e7b501bc43b4e391da80558003392d40a23305e320d02e64cf998e1bf5a032b0c927b8e68049c8c8e71c6280377043118f4e680bbff00de0504ddbb3128371c1c64668024e59f3cd02521254e4fad1a2107e48fe6a6809ddb9e78a029e1463d05027ffc744a6c3857c7b1a205ff00e637fbf4a02b12b1794e39f4a02024e7249ed409924720906800005173fd7404989698ee39e4f7a04cf723d07a501fff0097ed406ffe36a018ff00281e99a037f4d0731f3bfd28007e53400ff99a810248c0cf140bc60123233cff008a0557f9beb4056eff007a07109243e79a03778b27bfbd02b128c27039a054001b818a06609de793da815006070283ffd9}\par}-{\pard \ql \f0 \sa0 \li0 \fi0 lalune\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Here is a movie {\pict\jpegblip\picw20\pich22\picwgoal400\pichgoal440 ffd8ffe000104a46494600010101004800480000fffe0050546869732061727420697320696e20746865207075626c696320646f6d61696e2e204b6576696e204875676865732c206b6576696e68406569742e636f6d2c2053657074656d6265722031393935ffdb00430001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101ffdb00430101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101ffc00011080016001403012200021101031101ffc4001a000100020301000000000000000000000000080905060a07ffc400231000010501000300010500000000000000060304050708020001090a11153976b7ffc400160101010100000000000000000000000000060800ffc400261101000102050109000000000000000000010200030405061121b33134365154717475b4ffda000c03010002110311003f00a90cf388f366a62aa720ed6ae07f96901f3831d973452b8cf36fe3570fc908e46d466433e5dd954f2e96992d9e498c7753faa44916e016ca91cc7d88b38fe60a5b97737defcbcc539c98d336a57f4fc2ca9a486bf07ab575ad9a3af4df221d8215e36df86c4504ff0024574551b3d687ee0575757b3ad64e311ee62bd94158d37e24198c43973099f1fc0c41614d950246513a081abf76cfe7061f6863281e6352fd1670949c148dd6dfb0d25f5b3689b1d5c965b0eacbf4e0932ad28e22ab9ae945633f4744bd3c8cee0a7fdf085b9000f449c5f7afa30b83e0b6fd7b0c8429c9467ff9715347c891e25fa24a205861aa715e6a09bd0488237dc2723414d9891381524e8ca7c0894664f835653631ab55ee7e3de433e4ff001b30949124e4c10c8b6ad0a479b3f9c937b2cf5bc0095ad600a0a41a0e9faee174a1c605e161c6c7a313539650b0113190f1a8368e60d5b24f30ff008ea7f0bf867fa6595feeb6978f1fe0f9c26177f4d63a51a9235184750e7d18811339cd000000c75f000e00380380ae390c350def826ed42ad051fa6f501c50f9b699c3b69cbeb76476d202bf3ac985b6e0e968be66572893e6a744540bd9722e5c87956848629bc2559306bd113e8653d3b6aff651dfad7a3ac8b02958cba02a93ccf525757039bae6cff090e1d90688e8aa233ee86a4c4a3e0586d6b2340522e47dcb7d0046d8a5acb05a123ee25d2b230b2ada6e2e2f9ede3c05202520ec2487b0d56562529d8b3393bca76adca4ec1bca508abb001babc007915d84fe3dd14e207e3c62f8379da2a3b861fb6629d28dba53b6ea388ebfed866bf6dfb553455e91ed547ae92e9445253a4fdf3efb4f8ebdfbe7d3c78f1ee0bb9e13e358e942a4ed49e22cff00eeb35fdd7ebfffd9} icon.\par}-{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Footnotes\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Here is a footnote reference,{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.\par}-} and another.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's the long note. This one contains multiple blocks.\par}-{\pard \ql \f0 \sa180 \li0 \fi0 Subsequent blocks are indented to show that they belong to the footnote (as with list items).\par}-{\pard \ql \f0 \sa180 \li0 \fi0 \f1   \{ <code> \}\par}-{\pard \ql \f0 \sa180 \li0 \fi0 If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.\par}-} This should {\i not} be a footnote reference, because it contains a space.[^my note] Here is an inline note.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 This is {\i easier} to type. Inline notes may contain {\field{\*\fldinst{HYPERLINK "http://google.com"}}{\fldrslt{\ul+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Auto-links should not occur here: {\f1 \fs24 <http://example.com/>}\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \f1 \fs24 or here: <http://example.com/>\par}+{\pard \qc \f0 \fs24 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 Images\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 From \u8220"Voyage dans la Lune\u8221" by Georges Melies (1902):\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 {\pict\jpegblip\picw250\pich250\picwgoal3000\pichgoal3000 ffd8ffe000104a46494600010101007800780000ffdb00430006040506050406060506070706080a100a0a09090a140e0f0c1017141818171416161a1d251f1a1b231c1616202c20232627292a29191f2d302d283025282928ffdb0043010707070a080a130a0a13281a161a2828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828ffc000110800fa00fa03011100021101031101ffc4001c0000000701010000000000000000000000010203040506070008ffc4003e100002010303020404040502050500030001020300041105122106311322415107617181143291a1234252b1c115f016336272d1082443e1f1265382ffc40017010101010100000000000000000000000000010204ffc4001b11010101010003010000000000000000000001110212213141ffda000c03010002110311003f00dadd18a10a704f6a95ccc57e37750782b0d8d9ea0cd32e7c5446e07e9f4ad723119a7b89e61e348f260719278aad613cbb640002938c76a182b264fc87bd13009c0c019c76e3d68a072e1cf6f4cd502d330c28269a61bb39c923923d4fad44c08dccb95cfd28b8280769ee08a263891e1808739e4f1d8d149392172cc714050dbb9fde8960ed8c60b79b1ed44103b05c331dbdb1dc5026ac1946d20ff8140aa631c773ec738a0346a003bf93e9cf02801895e7b9a01886796c923bd0090a06393c76a0142003ce3d86680d8dd9392303f5341ccc1b3cf7a2c812c37e4923d381429757013209fa511c18146c9247a0f6a007900c0c671c6280854e086c673eb45c27c038fd68aedff2fda836ef881f136f25d5e6b7d1262964aa02b03f98fbf153131935edcc97576f35c33349212cc4f39f7ab26186dfce5b200f73451f7600dcb8cf27e7400c0b291914046c9e0718fde81371b8e7273f4ef4007691919240e714097f31f376e7b5008caee27807b0f5a02c8e1b3c6d27d33cd0201d839523144d1a149ae084b78da47638211771fd050d582c3a0faab5119b6d12f8ab1c06788a0fd4e2ac356fd1fe08754ddccaba849696309e598c9e2103fed1dcfdeadc44fea5ff00a7f956366d375e492403ca935bedcf1eea4ff6ac68a55efc1beb3b552574f8e7009ff933a927ec715bc82b3a8f4d6bba5ca1352d22fe061cf9a0383f71dea5119cc6c0baed3eaac0f1fad40897dcc3d81f7a052366c1007df3400f21edefc5008c28f30c9c5170ee4fc37830086395250a7c66770c18e78da31c0c63de8609b41f7c515c5172a30c3b76344a3e377cb2339cf7a242aea89808cce368272b8c1a2e107c672a49f5c1a181c9c7ae7da8a2119e7b1f5068099ffa68258a132062d8f9e0f34059502b61bf2824e681bb297ced2a71efda80f19c47b9c77fdbe74057c13e539cf3c1a0eeeb9c73f33405ddb4f18249c1e28062b79ae242902024465b9214614649e7bd0362a7249eddc513456e5720f38f5a1a98e96e95d6baa6ebc2d1ad1e65521649bb469f563534d6d7d31f04347d2a2fc5f535db6a0e83718906c887cbbe5a9a8bef44dce9f731ca9a2e89169d6d6f2184b1455dc07b11dcfeb4d16f119c649a681285b03d3e5500f87820ff006a0e098191de80ac9b8904647b55d11da9681a56a31f87a869f6970b8ffe4883629a289aefc16e92d441682da5b098f21ed9f033f353914d19b751fc08d66cc16d12fe2bf45ec92ff0df1fdbfb559ec667aff4eeb1a04db359d3ae6d40eccebe53f46ec7f5ab82263da7dcf3eb5174e5181076918c7de869503232491ee4515c1803824f03b51287f30e0e7d803449494832c157278a2e8c71fcb9f9d144639236824d01e142efb1768cfb9c7ef40512a818de78ff00a682518e7cc30ab9e00a02cce9953247bd41e467191ed9a04205ee99da4e4e3d283a524b0427b5026c18a8e082067db8341ce0e39ed409b6502907391edda80f2dfdc496f0c124ac6184b144cf0a4e338fd2894f7a7342d4ba9b568f4fd261f12571966270a8bfd47d8511bae85f02b47b7fc34bac5d5c5dc88a0c90ab6c8d9bedce3ef4d1ad691a6dae976a96d616d15b409f9638d70054a1dbc68ea51d4329f4619a8022b78e04548515117b05000a035c5c4702a995c26e3819f534047bcb68a458cce866719540724d02e41c0f7a012a40f6141cbc8e7bd01719e38e6838af1c0a04ca8206d3cd037bdb082fad9e0bd8a39e0718649141047d0d5d18f759fc0cd3af164b8e9999acae4e4f81236e898f7c0f55fed574615aee83a96817ef67abda3db4ebdb7f66f983d88a061bb8db9e3d45165076db83c1f950a53780d8247c80a2398f182724f1c7ad080c608cfa7a51a0062adc7afbd0130173bb9c5070f071cb37e82826106e8f615e01c9e680d6b35bc534be3c1e3831b2aa962bb188f2b71df1de819ae4b1048c7f57bd01a58268e332642ae0704f7cf6207af6a01b99e17b7b6416e227407c494139909ed9f4c0a04a4e501e0f1eb40d263e53dce7fa682c9d0bd13abf58dd6db18bc2b157c4975270ab8ef8f563f21447a73a03a1f4de8eb031582b497328066b97fcd21ff038edfde88b7e32703bd64188e7e6283864b73400cd804b67ca3268317eacea6d56ff005233592f8b6303f953fa4af7c2fa93417fe98b763e0ea171297bab98558068f695ce0e08fdbd281e5c6a57ba5e9d14d716ef7774f2ec112601da4f27ec2827ada74bab559a20e148fcae36b0f91140283729c77a0e0a7777a01dac68395719e39a029607cb901b19c501480ab9279f4a086ea8d0b48d76c0586b7143224a76c61ce1831fe93e86b43cd1f12fe19ea7d2533dcdbeebcd20b612651e68f9ece3fcf6fa5067cbcf20ff009a051724905411e94032799060723da8406d6c67e7ea68d0e1770fe5cfb5026c37039ef9a02eca098c91e6e01e71c500b1d8a49c12786cf6a06a4e256008e3d050119958007920e2801154e32fb4120927b014017eb1c523ac5209a356215c291b87be28957ef853f0d66eaa99352d515e1d190f947669ce7b0ffa7e74a8f4be996569a5d9c56b6704705b46bb5238d42851f2ac875712bc70b3c30f892019540704d01ad2669a0491936330c95ce7140b2e4939a03638c7e8680ae485e33bbe540d60d3ada162c90a02c7270a39340a4f28b68da4645007a8f6a069a746f73235ddcefc391e12b2e1916824948742c99382473c73404791c617695279dc0640f9502c578c9efeb4095cb4cb0830ba21cf999c6401f4f5a05061d430c8079a02e03b3004311c7d281b5e3cd676c65489ee594e4aafe6c7ae07a9a0a075bbea3a8ea96f047d3935ebc404f04ad29411e08e011d98fed416fd212ee5b05b4d5ad6300c615807f1171eaa49eff5ad418c7c55f8466dd66d57a521f20cbcd66a7247a9283dbe5418a63862479877cf1f6c5008e400bdf1ce684016fe53dfbd1a73794600e08ce3d6800377c8c7d6800a9cf75fd4503d91492460f7ee3d28247a7b459f5fd592d22711c206f9e563858a31f99cfd050583518ba75247b1d134f9aed21396d4669769931dc01c003f7a329c4d17458ac5b55d36c12e040a3f1da75c1cb04ede2447f7f6a94567ad7a66db4fbbb29ba7d65b8b4bd8ccd09c8231eaa07b8ab04a7c2cf87b3f53ea8d77abc72c1a5dabe2452bb5a561fc83e5ee7e541e988218ed2dd22b7855228d76a46a00000ec00a510bd4dd511f4fe84da95cc31f880022da4902b1e7d3e99ac86fd03d631f565b4ee6d4dbbc649009cab2e48c83f514165b8b94b6895c44f279c280839e78ce28178ae6de46748a789e453865570483ec6812d42e85a421fc37918b00a883924d024c6e99b7a2a966c0009e17dc9f9fed40f81c77e28139218e4ff9815b9cf23340a01c907b9140201038ed402fcafd28386464e4fd33c50272bc60032609cf00fbd024f722dc66f24822ddf972f8feff00e280f69b24844919cac9ce7de83a447f30ded823007b50459d6ecacb528349b979127651b1dc795f1f3f7a0990148054823dc5015d491c0a0c3be337c2ff00c489b5ee9c87172016b9b541c49ff5a8f7f71eb560c1fc43e0a47e1aa94277310431f91fa551c1727f29ed409b641c86e31839a3454805739c1f6a026f1fd740f64665fc8c31cfde82db79bb40e9e8f49b62eb7d7e8b717ec832c91ff247fa1dc7df2281bcc9369d671493c422b7911654c1215f92bb8827bf068624ba635392df5eb4b9924558ee5bc19b71cee43c6dc7cf34c657be8db0b0b9d0f51d2afe668934dbf9628ddb8c2b8c0073f3a80da37546a7d25174fd95dc125c69f7313ee5655dfc313bd483cf07b1f6a68d5b48d5ec758b612e9d7293211c8fe653f35ee2a084eb9e8bb1eafb3582fe496278f3e1c919fcb9f97ad03ee8dd017a6741b6d3229dae161057c5750a48249ec3eb4139238568f6a9e7b103b5037934cb3793c610a2cd9277a8da73f5140ee38f6280c4b11c65b934023006d50050030e4647de80c846de3b500fcf9fbd0197273ed4007b91400e580c8e45074a82400e72682b36fd2162b7f25ddc09af2766ceeb872db79cf00f6a0b3229550140e07007a50092db860673de818df473c862686dad6470d9cce3b7b63e740fa1de6252ebb5bd81cd00bee2d800d003a6464004763ce683ce9f1cbe1f1d3a67ea1d1a30b68edffba814708c7f9c63d0fafceaca31e6dc71e1f07daa82608c83819f7a1a11ce149238fd68d0a579ec682cfd27a7c3a86bd10bc38b3b756b8b93c1fe1a8c91f7381f7a034f752ea5aa5c5eb292f732128037619c018f6ec282e5a2cb047abda74d5ce9b6da80f136de4a496219b3e48c92000323ea73467519d3da5bb757dbda410ac90c77c23058f99007ee7ec31416882ee47d23acb5185caf8bab4691b1efe57fff0038a9457ee75a82f6e7429350466b482f2742c0f74241c80c38c64541a9cfa1e89ac0177d33ab3d8de28f2b5bca429f91140e2c7a9b5ae9fb85b6ea9b46b9b3c796fe040768f76ec0fafb1f9505df4ebdb3d4edd6e74db98ee216fe68ce47d280648f75e2485a44da385ddc13f4a025ddbdbea16a633286566ce55f9c8f6c502ad750db2c514f30dec428247e6340bbf04100b73402afb943ed2b9e30683836defe9403bc1e06734020e06280cafe8683a375941d841c77c1a0151b467b50159f00e4127e5402872371040c5046eb5aadbe9b1c02e2f6dad25b89047099c677b7b0140fe3f1010afc803f3018e68160c3041ee2823f5dba92d34db89a1d9e2843b03b6d05bd013560c1748d57aa2797c6b35bab78e6959dc47231580ff336dcfb03c1a58364b5bbb7d7fa7b7427f1f673830c8664285bd1815238fad20f2c7c41e979ba43aa2e2c1cb1b663bede438f3a13c7dc76fb5515e9065b851f7a02950002a09c51a1b83cf14176e90d3645e9ad7752752aac23b3439c066665c827e944d29a6410aea725c4567135bd840d3c88a723728c29c9efe6c50d3ee9545b0bf8ef2e6e3c2fc2c6f72f2920e5f19039ee4938a9a875d03278377acf52ddf867f036ef71923932bfe51fbd3475cdc369df0db4fb389d4ea37970fa9cc0b00511795ce7d4f181eb4cd2451755fc45ac16d637381b14ca36b641dfce723e4053170d6cb52bbb362f6d3cb19241f2b9029862f09f143549ba7e7d2eef6caf2797c66ee17fdfd69862d1a069da7dfdac579d17adcda5ea9e1a992376c4723e39e3b024fd7e94c458ac3e25dee8d31d3bae74e7b79002bf8b8549471db38f5f4ed4c165e943a06a328d4ba605b4b22a1523c420c64fbaf38a82d36f0ce7cf7463790729b53017e940e0b0ceceed8ce0500e1b70daa08f5c9ed41d271cd0132476e7d7ff00aa069797d2411168ed9a41fcc858211f73c5075acb25ca6fb82aa31e58a36c81f561dcd033d42169e158ac64b98151b3981c2966cf639f4a064c7a8ac55e4865b7d493701e1c8e52403ea3cbfda827e390ca3f2c914aa81991bd281cdacc2747215c60e0ee5c67e940cb51b0b2bcbd824bfb08ee1a252d1caea1821cfa67b1fa504982b2283ce08f518a08abb82f6dd0369a5662081e14ce40c7ae1b04fda82275cb0bfd4f4536f7114589a5412461f3e4ce4e0e060f63f6ab2893d3b4b5b5b78e22ed22aae3cc3cc7e64fad3449a22a461500007602a0cd7e3b74c26b5d2ad79147baf34eccca40e4a7f30ff3f6aba3cd0543267eb5427b86f1f4c76ef45d0eca1ad5ef224d13e1cf4fd9b22192fa67bc955f8c8c617fba9fb510d7a6ed3fd43a735e5b54964be658c048fb6cdd9e7eb8a186bac97d174e6d22e23437b7ac26b95e77c68bf950fa7279e2b22dba45b59e97a669fa4ea36aeff89cea9a90451fc355ff0096ad9f4ce3f41570675d4fa8c77da8de5cde5be26bc653171ca47dc1f6c9fed5562b97f70276808da7c24f0c1c63804e33fa8a2928c0e0383c8f7ed41d92a41393f4a2548595c2c37493db4cd04e8a08f139566edfef3445b6e7aeaf65d2df48ea2b11776ae02a93e564c772adef409f4ee8ba9a21d73a36fa579ad9f325afe599171ed9c30a960d5ba0fe2843abb47a6f510fc26a4c36890f9558fcc6783506a1147b510024e30339ce680d2c6ae9861eb9a009178a0205443b989e39cd01d8075e3047ce80563057ca381ed4011c4531e503d85013c91b804a21279c903341131cda8c3abdc8650f6d20c4321232adec3dc504bab2c113c9293bb1963df3408dd4b75e1efb2856463dbc43b4631fad047e9177ad4fe32ea16b1db4b8fe1aa92571f5f5a0916bc8e0895af5c46c17cd8c9ff7da80f6d736f7f6915c59cab35bc837238ed8a072a31c1ef4062870718a06f7702dc5b3c522ee4752ae0fa8230683c75d6ba3b74ef535fe984929149e4278ca9e47edfdab42058003763ed409f88ffd6dfad06b1f12ae612fa0c76e0b471e9916d23f973eb4158d3efeff004a984da5debc1295d8e4018dbf3145d583a2ad96f356bbd7f5d90dc59587f1e79a6392f28fcaa3ee47159444ea3aa5ddfc7acf50dcdc344d7a4dbc317f52641200f6000fdeb41b5ef51d8eab672ffa9e971c97c11638268e431a46000012a3b9a351567db823b11f3ef40948e428048207a8340ab48ae83cb83ee0f3428a982719edf3e68c9cc97d3fe15ad8c9be138f2bf38e7b8f6ef40f7a5f55bdd3f56b46d3649127f1405f08e7249c76f5fa50689d48ba5f545cdcbdb462cba9206411b2b055bb07d4fb1c73528d4fa8f52d62cf47b6b8d2e65fc458c49f8a818795c151939f977a823ba0fe253750eb7fe937b04293f9f6c90be41dbdc7ff006283473c1efc1a06f69776d73bbf0f2aca32572bc80470450284a46dfca19f819f5a04e799614def26c0bdce09cfd85045dc75769d12dc3c3e2491db0dd3c85195235f7c91cfd066ae0cdba9be31f4ec61a386c1ef9d4ee473e45cfb1cf34c101d3ff1ac9d481d46c628ed24751881880833f988e7b0fa5328dfed2f2def2ce2b9b79925b791772ca87208f7a60182ee2b95cc0c48f53823fbd40ac658b30f4f4a086d4ee1d75bb6b78f4e965596366fc5211b23238008fde81f43692da5bc30d97831a0397dc09e3d714087506bf61a2c4cd77324726d2caaec141f9fd2ae0c435bf8c57173ad7876f7a2daca10489121244cdf319ce3dbf5a834fe81f881a6f57bcb6ba7c53c72c11873e28cee1db391dbef4199ff00ea4348116a5a66a8a8a04aad04847a90723f6ad7d18c312ddc02a3815423ba0f63fa541687bd9efe1b533b3c9e0a78473e899e318a09bd0ba6eef543e3b2bd8e9b10064bd9e4da001dc81401aeeb29a984d0ba7d5e1d06d4e6594f06523bc8e7f5c0ac8af752dfc17d7090d9218ec6d9447129ee71fcc4fb9cd6842ab10dc0014f3e5a2c1704b671dfdc734525226dc939e283a362c7f940344a380393df144733e2276e38f5efcd01b4bbbfc3dda4a9298a44395902e4a9c70682660d4265d62de40b1bdc1545054f95c8fe627df141af7c3af8808f3dd68dd5d2a45765884b8908d8c3b6c27b7a77a945d7a5fa474bd2ba8e4d5748b28624955d5d8b13b79ee9e983d8d40a753758c7a46b96f6114725dc92279a2810b3a64f94900763cfafa503fd3b59b79ed84da34713c0cd890f0a158fa1f981de826e1b548959fc4dc5cee24b6467e59ed4101ff19e9f676baa5d6a72c50adb4ad1ac790ccc076200f7ad41e7df881d79a87576a5f87b0f161d381db1c2a36e7e6d8ff3416bf87ff082c6f208ef7a82f22b9761bd6d619785f6dc477fa53705ab57f83bd297ceb1e9caf67708db9c4526723e849e3e94f212dd25d117fd29a8c09a76b534fa39cf8b6b71ced38e36fb73417f52e64548e34007e673e9f21ef590a1c918c90718dc281a69b68f67118d9da5058b798f6fa7fe280daadd1b2d36eae70710c4d263df0a4d583cc7a668fd4bf11b5837d7c93dcd9a3146959822a0e781f4cfa55161e9dd7fa67a4f55b9e9aea3e9f81fc09ca0ba118998fcdb2338c7b528d39f4cd2ba76e2d357d292df4eb391809963420ce1b1b576fa1e7359119f1eb4e17dd033ca172d6b2a4df303383fdeb5c8f2eef3bce4e0e335684cb0c9f354160d36f64b0baf16072b91b5f03391f43c51aab23a5debe91c4fad4d73689e6fc3a290573ff4f03e59f4a3280d67581ce916567f84b58ce0a1fccec3d58fa9a084de08c90464e4d1a8e419059b201f4a05630a176918efc50176293872c17bf14042aa0125b03db14046c60b60123fde6827fa0c68edd5365ff11346ba6292ee64194240c807e59a32b7fc51bfe8bd5ed5db424860beb62b89218422ce09c11c01dbbd0660ae110bf1bf2154838dbebfefeb41a8f4cdac7f117458f4d9ecd2df53b4cf81a822808c47255c0f7c8e7fb54a2ec2cfabba3b4b4b8d3af12eedad40926b0f070a13f9b633649f7a82eba6ea4357d321d4ecad512daf20df26e016507fa4fbfaf3e98f9d067dd2bd2faac9aa4d72d72d1e9510ca46a7631c7a320e18f1dfd7bd059afb7da816d23de4ba5de211346a1e4785f190548e4648c63b64e6b43ce9d5baafe3b539c5b452dbda46c638a167cb281c73ee4ff9340e3a3fa5f5aea4ba58f4bb57dbfcf2b02a8bf7f7a0de3a5fa0b50d2a2d92eb3e048c0a97c867dbedcf6a944e5cf4f6b76d1b3d8ea42795066266c87c81c65b9cfaf15048e83af3cd64abac08edaf01546c38dae4e0657ee6826e5b892de3702292e2545ddb55700fd0fbfca81c4b3bc718716eef9eeaa402280d14ab3c0b2c65c06fe571823ed40df56b217fa6dd5ab9216689a33f2c8c558307e83b8d77a37aaa7d22f2512c28768800c9954671b3d33ebef568d0ef7a7749eb0b5bbbb162d657b32b46d2e1564c8ed9c5644d1b0b9bbd261d2a440af6cb0e2e5b1e7dbc1238e0f7a0375b696daa7496a3a4dac8a92cf078685b271db04d391e40d5ec4586a1716de2a49e0c8c85d3b120f715ba1899173ff305413070abd89cfe9f5a2d3ee9c8639fa874eb6b804c52dc46b20c9f302c3bd11e84d47e1af4d5dc6521d3e3b662c19a58721ff5a9a321f89bd27a374b456d158dccd34d333332c9b4b2afbe47a7cb1f7aa33d2bc0d8c0f1c8f6a2c14b6d501b39cf63450897380c319e3de8065031c038f7ed40d8faf1ce41e4d004876a8dc3cc7e743025c956c818028c904579e7f0e15695c9c0541924f6c00283d0bf07f42d6b48820b8d62d20b2b58d656404959e52f83c8ff00fcfafbd4a35bb06f12391a48dd55cee2b2f3818ed8f6a8158a159890f02242079147623e631c502b0db436d1ecb7458d4738038fb0a087d6eeb508f48bb7d32d95750752b6c26c905b3ddb6f61eb574794f5cb6b9d0fa9678b512b25d24bbe52b8c1638278fbd582c57ff12afaed45b5bc0d0d8a8c08a2731ee3eec5793f40450466a1d59af446293c186cd53ca0c36eab93dc649e49fbd048e89f1675ed35e301e293919dcbf9867b37cbe94a35fe94ea4d33aba6824306dc48015750d86c6e247b0cf63591a40b8dc23fc30f14138dcac3000f9d03687547f12e8dd5af816b13148dddbcd29039c0f6f6f7a0eb5d62caf5636825db70c9bc4328f0dc0271c8a090627d3073ce681acf6505ccf14d35bc2f2c2731bb28254fb8a075144a83ca806792400334049ee6281e2496408656d880ff0031f61fa50446bd76058ea1b9e21025a3bb48afe71df9c7b71de9c8f196a0de23ca7b827d4f7add117e0cbfd4b5059392369663ff004e71c51aa97e8f555eadd258f2bf8a889cff00dc28cbd0bf123a926e96d163bdb74490bca2321c678209ff001591e71eafd7a7d7ef45cde2c20aae144638033fb9ad2e1b5e69d058da431ccf21d4a5c3b4631b62523807feaf5c7a50222f2d648c25f5aeec8c2cd19dae3d3e87e944d3eb7e90d425b49ef2292de38224f1505c3f8724a9eeaa7bd0d57a60406059436306868a7803839c7ad1a158039c13f4a33a716767f8cb9b6b55e1ae2458813e9938cd07a9f42d0b4de99b4b7d1f41b58ff19b03c93ba06607fa8b1f5f619a5b8266d74a65d42da6ba90cce996dcdc8c9fff006a5a2c2635083b05ef83eb5028076341db4b1ed9f7a04651fc41db18ed419d75b744dbea335fcb0db0335f2057901c05da73c8f9d5d18a75174a3f4c47335e35da4ce418a489374254f707d463d33565d1529b569a489a17944b06ec8057d71dcd037b4b6b8bfba31584124b27e62a8a4f1ea68357f83da7ea5a76bfe0912453ccabb49194653cb60f6ce3dfda983d196cd108c2401711f9768e306b2297d73fc6d02773a8b591922693c5004bb9d72542fa2f6efde8314ff867aeeec27500b77bb5670e36ca19b1dff2e7f2fd2837ce8bd5dd348b78b552219022870d9c46e792a4f6c608a0b846c8e03232b29ec41cd0199f1410fd4b24b1e8f712c0a5e4452d851e6c639dbf3238a0afa42ba77475e4ba8470896681da45180b18da76af3c9029c8f26dc1df2b9c606e273e86b743331924f27f4a82c12280e59b008e79f6a2d4d74188ff00e30d203a82ad7519c1ff00b860d11ba7c5e86c9fa3afae6f4091e043e021270b21e01c7dcd6479ab4dd3aeb56be4b7b184cf2b301b57d07bfd2b4bad0fe25e9f6960ba7c7a55ac50cd750335ccaade7723b83b8f6e38a2207a5ba4e7ea3d93780cb616ca53781f99fbff009a0b675a5be9765d43a75a6ad3b25adb4185429b831c70303dfdfd2831eb8954ca48f3827819c71ed406b2b1b9bf9a5fc1c4ce2253238047957dc9345d122b792eee522811a495ce1157b93ed444ff0049f476b1aaf51c761345269d25be269259570c833c6077249e062a68f53e8ef0da69509d4ae225b92a04af232ab16f98cf1f4a5a266d4dbca8af13a329ecca723f51502d14f0cb9f05d1c8ee01c91f6a0393b4edfe63c8a031608859b38f97340d84d04e5846eae50f9829ce3eb400fb24466041f5e3d2823f56d22db57b192d6e61468a41c823ff0035651916bbf04ada7badda5cad6d1b72c09dc33f2a6875d25f0865d06fe2bc6d4c4d3282026cca8cfafcfd29a34cd234a10c768f711a78f1bb392a3001208e3ec69a26a58d640c832091c90706a084ea1d3eeafdadf4f86da3166c0b4b397c18f046140f5ce4d04f4702436e91c28a9122e028ed8a0a9f5a5b6a09a1bc5a135bc72cce048b3c5bc15c638f9d59043fc2db997481aa69dae49e1cb6bb643239211939e467818f97bd305965ebce9a10bc8da9dbaa2679dd9ce3d8530572cfac87566ab05ae9f1490692b9696e1f833738555f96793504df5f25945d2576b7ec16dc46792381c7b7ad5e60f234980e42f6c9c56a82ec3eff00bd4124e49700f1c646e3cd169ce9575f83d52cee324347323f6e3861ff008a23d47d4ba6a75074fdcd8ef317e2e2ff0098bdd4706a60c3f4ae8cd5f44eb8fc3e97248a638cbc73bf90483d463b373e9574685abf42a6b5649fea72bbdeac4a8d3b018cfae31f7a6895b6b29b41d30d8e9f6bbed9213e1b7a994e724fcbb5064bd7835a9752d3af75d8116354778f660788cbd9483dbb0a0cd20b2b8d43528ad2088bdcccf854039cff00e2827a0d34e9da1de896f2182492efc0976f998aa827d3d334113a74aa9a9298628e74570478bc0c7cf1da83724bb8246d3e6416b0384da61b5501c9f5c3704f152c037561a95f5fce61d3ad6db4ab950f34b331dd9f4191db8fdcd406d67a675ab4b6d325d1af248272a43430315ddec7038f6ad4b3f448bf47eb71cb69abddebf21d5e26896203846c30c8603b9c6452d9835901405660376319ac84bf13180779d8bb82827d4fb0a06f777367a75acd7170f1430a9f331200cfceae061a0cf6dac692d7365266191db0578f5edf3a6075a6c9278b3433188a467860d96fbd40fe540471409aa0c1140750001ed8ed4058e15133c983960077edf6a06faade5c5b7822d2d926766cb967da2341dd8f0727d85033d27597d62e2ee3163756915bbf8799d71e2f19dcbf2a092b88dd9a311950a0e5b70ce47fe6ac18af53f5b69da9752dd69da9ca906876e24465d9e69881c6ff005c679c0aa2bfd267a347512c93dbb5d42d90d3c800b68c9ce0ec3cfa528db74ad034db5905ee8be1ac728dc153984f3f980f4fb56453be2de8f647a6aff53796596f0aed46798ec033ce149c0fb0ad71479c9bb9dc3bf3c55a0b95f65a825150b481a407b93c0fda8a29c06671dc93803bd131eafd0af6dffe18d2ee25982a4b04603b7a9c631fad03bbe586381bc5945b96385718c827db3eb5288eb8ba934eb15fc3c535f05427796dcccdec7150637d5bd55d5362b7975aa4d0d919018adec8637807bb60723000e4f7cd58203538aefa8aeb478a7b9beba924547b8774cf8608036a80704639cf1f9855d1a7f4c68b67a03de5e5d59dad8d988c62e1c0f107a1e7fdf7a082ea6d07a6e3e99375a7cb6b3db093c727701e2360f7f53dfb50653d4130d42ee18f48b3f0232a15218936963ebf5fbd06dbf0cfa74855b9d46e04b730c6144691e12307d33ea7de8348ba6b5478a279a004f98c479247b81f5a9438805ac0be2e02e73c9ef8fbd40c2346d43578eefc40da7da1dc8b8eefea4fcb9fef419beabf12a4bcebcb2d2fa7ee0dc58492084b30236bb6467dce383f6a0b87556a67a7f4d95a0bbb5468816f0a69c78b2e072572719ce78357079dfab3af2e7a92c963b88d94abbbf91cedc93edf418aa2c5f0dbe2a6a9a0c90d8de34773a6a8da1186d6403fa48fec682d9adeb7a9b4c9d572dacc9a6c9700456e5ca910e000ecbd8e580352fb1ae7476bd6dd49a325e5a9f3025245fe961dea097523cc0919a032af039a006936c81423104649c703ef40dcce64bc3035a87b6f0c378f9fe7cf2b8fdf340a4b6e25962915d94a67807839f7a043586922b5636ec44c061063f31f6ab079d7fe19b7eb2d4efeef55d5d74f992e9a0fc3a441dcb13927b838c9aa2d4bf042c618e178efee6e18104870172318edf5c1e6945bbe1a748ea7d2315edbea3a99bcb190030c401010e4e783ee0fa56455be3d6b90c1a6268d69e17f1486900ee98ec29ccc183119419e7e55ba11f089f523ef5058363a8059fb8e31e9421b491056c01819e28d3d0ff07eea3d53a1e3b6b8db235aca63c139c0eea68ca47a9fa6ef757b83ff00bf68ad428c2f248c7a8f9fcea518df516adac74e7544f63a2ea172f1800291e6cee19ec78cd5826344e85b6bad25ba8fade5b99dae0ee11efc71e858f7e7d054a2d7d39a75ae8f7b6b00b8917f1516624b78429da327cec493db1db1d8540cf4aea28f58d6aeae2f6dd64b498082d880488d149fcea7d4939ab04175e6850a8d32de3b78e380c8de32c4db4e18e430fef543cf86fd0d691b4fabdf6648b3b2db69ce7dd87be68342d2f4fb9b5b891af1a28a2dc05bc5036d001e0eef7352884b961a2ea9aa7555c885e08d45b5bc52b61b686c120fb939fb541276bd4b61d53624d942e2f6200bc32290633e99f4233416dd3ad3f0d611c0c77b632e71dc9ef41156dd27a45addcb3dbd9c513b1dd941821bdc7b558333b9f873757fd69a85e3f813e9c7723b5d93265d872473c11544a68ff08fa75e290b42ec4e4124e70738fa5048e89f0f745d2aeadd2decedda6525c975121183c77f7a945c754d0e0d563682ed43425369403bff00bcd58308ba7d5fe13f5a05889974a9d8b46aede4914f707d88ff001528ddf4fd7edb54d1a1d56c312dab2e64dbc9418e78f5c541296d70b716d1cd6f8789977230ecc280cb7519b816f212b205de4e0843ce300f6cfcb39a0545c42cee88e0b458ddec33ee680eac92266360debc7b5056fad2d354b9b189745744be121daf27e550548ce3d4d58324d07a725e98ea2b7ff5381f5169a7579d021fe13904ee43ddfbe49038ab46e76cf05cc714f6d309232a4a98ce54fd6b2196bb7f2e9b631b2c427b891b6851db3eff002007341e5bf887aa2ea3d4f77378be381e42fdb711ed5a1554395caf1cd07617dcd04fc85402101da791421b49920331381c60d1a69bf02f56f03a925b12c162b98c955f775e47df19a32d99b518268e4491668704a79d4aeec7b7bd4a30feb7e9144d76e265697c3e2693631674273803e556087d76f35fd49859e9925ccf611141106f2e182e3241f727f5a94681a268f79ad1b1b8b9dd66b1c2b1ce9bb06361c1e7bf3fe6a096b0d3ba57488e485b52b40909c386901607d47bf7a0ae758eb69ac4d15be81a748f0a9c35cc90b2eff4c03c1c638a0b77405c5d5d45f87be5fe359a88b81b401dc1c7d38fb50586fed18ea3015790091591e447c1518c8c7a0a0a5754d8c9d49a8d9f4ee9dba0b3b5224b9692327728f627e7c6682f9a7e996b6b3a8b6b748a348820c7720761412c064e3041ce282b5d4bd73d3bd3f33daea97ac2e540dd0a292dc8cd043c1f15ba2a7923b65bb910371b9a12141f9d02edf13ba2ade56857551e5e77244c54fd0e280746ebfe99bbbd655d56dcdc9ce08465565f4ee3bfca82d53eb3a6dac3e25c5f5ba646402e33fa77a0aff5b74ad8757e9ca972844aa37c520fcca7d3f5ab067bd369a8f467544d626c98e9f7118f0200e4465c903049c8c9e6ad1b24334b6fa6249716cab20037c309dd83db03b5640dddac3764a4f02cb1103863919fa7a1a06d6f600c37162911b7b252b87dc773f1927393f4a079f868edae1ae6328a8b1ed38e30050226e85d5dc1f879011b3c47c2f604719f9d01eff4f4b83e3c6b18bb452b1cac9b8a83de80b16e8208a3b7b58e1407cc061427cc0ff1560ce7a8f592d69a97504cad2dac01a2b53900c3e9e51ea58f727d0551e73bfb86b99a49a46dcf21c96340dc13804f20f6f9501c0e3b8a0963316fcc4607007f57bd084d64dec01200ce483468ff0040d525d1755b4d4206ff0095207c11dc67ff0019a18f56584f6daad9dade4211e39104a8ded9152b235cd8c530613229c8c1c8ef50472e81690ee00322b0c100f0debdbb7ca8111ace856371358cba85aa5cc407891ccf83f2ef4048b4ad2e59bf116769672c72f99dd1437239078e2824a4d3e1b94559234110e781839fa0a0561b38ad532a12319c86c6307e740a9732a3a00cac870cd8e0faf0681be8b6db965bb909df3c85806eeabced5a09523647e6e0fef419a6adf116daf7ac34be9dd1da686e7f1ca2e243b76320ce57df9ff1560cc3e3f470ff00c78255b842b35bc6c4af9b6e323d3e95467b6365f8dbcf062beb68c119595d8aaff6e282422e9899b4f6bb5d46cda2562a76316c1078f4a0859e1b9b762c0bf94f0e84feb4125a57505c58ea70dd5d0174a986d92b1c13f6f5a0de7a5be366877260b5d42dee2d2423124a487507ebdf15289dd3fac7a7bab6feded74d61733473acdb5a162142ff00313d81ed505fa58fc6d809380c1b9f5c502e0e05040ea367a85dea454de2ff00a610375b04c16c7a16ef8340b5f6930dce9375636acf6a278f04c5dd4f1dbf4a084e91d06f3a52dee62bbd4a2b882494ced3c8a448063b63b638fde803ab7ae749b2b3096d792c93c8c109b55dcd18ce3710473ffdd043dc758dc5869044565aa5dda4c3c2b7bc78c1f14e3963db03e7c0ab066bf1327d41ba76ca6bc48ecad24c456f6b0c87cf8e4bbfa138c0fa9aa3297c83dd4e28395811cf2680a5b93c7ed413cd1ff0f3c797b8031406645236b0508406f30e68ba49c051b97d0e0e7d28ad57e19f575c5be8f269515dac772877c11bc464dea7ba8c739ce78f9d3193bb8ebfea2bcbd6b5b6b8b58bb7f13c2f0ce31cf0deb4c0f2dbad6d743d2ee99efae752d6c02a86e0054524f6383c7ff94c0b6af274c75149a46a5a82c46f1e1479fc3190bd8156fbe7f4a960bf74e9d253f1167a3ac09e0856610e3041ec7f6c540f67b892cee7f8d18368232ef2af2508c7047cf340ead5bf130accc9b1186541e723d09ffc5033bbb1b82d74d6b37f1244daa1b38073df3f4a08eeb1d3b50d4fa6a5b4d32f12cef1902ee73e523d476fde8306eb0d3fabfa4ba92c278af67bb7281606472f90bdd58558253a6afb40ea1d62283a8b461a66a6f931cf6a7c2466f7cfb939e7b5515fbed3747b5eb8f06eb78d35080a2ec9719c76f98049a0b4ebdd37d1bad869acbf0b03c5c16b29444adf50ded41995f68564a263a66b31cd02be152505493f51c1a088bab69ad1bc179e320f07c37c8a0692b46c4995f0381db39a0b2fc34e971d57d4705bc8db6c50ef9dd97b81fcbf7381528f5ae97a1d8e996d1db69b0c7648855b10a81b80f43c739c54134147b9a036063279fb5046e957726a0f2cfe04915b06db1788305ffeac7a0a00d72f8d9c491c06337533050ac7185cf2df6a06da2da4293488f34973328c34aea428c9ec3eded40ee7d2ad249448f6b133820ee2833df3fde819ea96897461b05b87815f2ee919e5d47704fa039ab079b3e326b70eafd4ef6d6650d8e9ebf868b69c8247723efebf2aa280eb9193ebedc5002a124e015340018fb8fde82cf32b1603d0678cd02406dce3008e47ce81b499c331383c9c9f5a2e9c69377369f7d6f796a4acf148acb83fb511e91b3b3d0bab745b7d45acedd8e3732b71b1fd73f7a5a19eafd09a56a0a96b1c705b49c48510761ce4fcfbd4d0d752826b2b583476fc3daacb295b79d768de8a32b1e71f989e49f6a7d14dd1af5ba275a45b8b093c054492ea769092373765c1da4679fbd306e36ba9595fe9f0dcdbcc92c33e1579cf27d0d409ea178f68521b6b76926ee8a7853f7ff140bc768d78f6f73748d1cd103b543f0091cf6efc502f7319dac194371d8b6326829f0c501d7ae6fa568d5d4942c806d4db81839f53c8cd59456fae6e628749b5bab8b1865b08e4726588ec11e7f2e49071c93da9a31dd4341d675e9a5bad374f9858162d0b4ac70e18f0573df35a0c759f87bd53a404f174f965dfff00f479b1ef570576e34bd4b4cc0bdb3b9b7258a00e846e3f2a94376475cee4914af7ca9150685f09ba61efb52fc7dd69bf8eb7c158d1d0b47bb38f37efde968d6eeb4eb5e91d6ad25b660aee59974db6881690918e31ce39279e062a5a34bb57b88adedd1e379679065d80036679e6a07e8391bce7e940c659ef5afe1286de3b16f2b8903094b7b2fa7ce81eb380c4260ed193f2a0cd6fa5d4a4ea0fc7bdadcce923158a3039db83c038e3ef41a0e96b2ad8a35e009291b8a939d9f227e43bd590436bbd6fa269202c974b7123602c76e779624e00e29833bf897d493e896525dbcb2a6b5a9c3e1456b91b6d60cf989c7f31f7a60c02490961ebcf3eb541308e39e067b507007b96007a67fb50178f97eb4165ce18165c2927b773fad023202d9c8dbb7818ff003408300b87f2f1c107d0d0c15a4f2e339c90467f6a18bdfc2cea8ff4bd561b4b9ba686d6e64552c4f954e7d7e46a60f4688d240af1b2bc6cbf5047ca960617ba658de1b792f2d94a5ab33461b18524633fa1a81b5c8b5168967369d23c0e0a24622dc981d81c76aba29df0bb48d660d52fceb88d069f04aeb69130037127f37b9c0ed9a8350781240bbc06da72323b1f7a0eb8816e633192ebc8c9472a78fa50349b4c83c068e24f0ddbcc1c13b837be4d055b57e98b996d4db5b4a893dc1e6620b6ccf2c467efc504ce97a38d3f4d874bf09af6d46e2f25cb82724e791db15650a43f878b51fc34f3da8f132b6d6a98c80a39ff007e99aba249631b58b9047239ec3e55368aeeb7d2da6f52c0eb7f16e87f2c6e836ba90724ab7a67b55d115ac7c3e8aed2182def4c56a14096368959a423d77e3229a27b41e9d8343b01069c8a8dc9660aa3713df3c64d4a1c695d3d6b67a8cba94b9b8d4e61869e4e4a8c636a7f4afcaa09a485519caae19b966f7a0435196582c656b74df3e308beec7b50629375775b691ac5bdb6b16d6378779f019b00a31cf391c9c2f1daae0b35ef52f5374de88d77aa45a6cd25ddc0108694ee2188c28007603d6a0d16c92430a4b2ed3230dc401855cfa0a0a07c45d7b5db9d462e9ee960b14b2ee134ef8c850012147ec78ab0670b643a2efae753d72686e6e2da211db42176079c8e768f65e39f7aa332d6f58bbd635096f6fe6692695b24f603d801e82823cb900ee00e68006460051dfd680ed9f0c905b713d8d006d5f5419fa505a18f94e40501b1b81a04186d62402c87be3d6810b81290aea8467201231cd1749dbc437f9f1e201db3de8ba07dc0175c027f28a335b17c26f888d6b6d0e8fabf892a29c453b1e547f49f7a946d6424f08236491c833ee0835073294888894120700f0280813c40a6711bc8843e00fca7d3ef40e41dc081f9a811681c6f7565329185623b7e9de812b3bcf11ff0b74563bd50494cf120071b97e5fda80d7577046c9019d5669dbc340324eec67fb734103d5da96bf67a7cf0e916f6e2765f25ddc4c11107ab1c8c647cce2816d3ec7f0f6564cae6e67da375e6d52cc4af2e4fb13ed4145f899d47b3499f4bb6d46cda49b69b92921565c3648e3dd40c81cd5c0ae89f13ec246d3e379ed2d6da180b5d34849da1780b128e49271c9f4a60ba685d5fa36bc42d95c324ec7090cc9b1d87b81ed50588958977cacaaa3b9341c655f12348d1dcb8dc1946540f99a019e2134454eeda7bed3839cd052fe2136b536b5d3563a1ca53c49da4b9507198940ce7e5c9fbe281c6b7a974cf4ee4ea7242d76dc784a3c595b3e9b464e3f6ad0ac745ccbd4fadcbabea42da56959a382ce7460d6b1a93c01f97272093ebf6a82f1ad6af0e9da5cb3cecf6902216919f82aa3818c7a9f4c530649a9f5269ba7429d472239bc991a1b0d3c3152880f0f23039e7bf3de90635ab6a377aa5ebdcdecef2c9239e59f3827e5ed54302195fcc38cd01245395c1f5f4a05b606538e483c501b6939e3b5077860f3914165754c33e549000dbe87de813b820c27fa7baafb8a04a69c98e281e42618c795338033df1f3a06c03e4e029247007ad010093c35674da71f977640340081a190658e41c820f141b0fc33f8926c218b4ed609366a02249bb2d19ce3ea4528dbece68eead926b7916689c643a9e0d643387521fea2f693c2d6efc786ee46d9bfed3eff2a04669edf5295ff057a60bd865309246d3bbbedc1efef41d63a8dec9ab4fa7dd4510fc3c69234ca186e2d9c003b7a67bd034bad0a5bb96e25d575267889cc1b54446d9bd0a37bfbfbd02925945a72cba8dddc48b3f87b1e58f23c623f292bdb7fa7cf38a0a5750f54ebba56a9a67fc516b6d6fd3970ea9234677c8dc7f38f6e4640ce282d1ac4b16bfa72c1d2bad430cd1ba822061865f5007d3daac19cf547c189357d561bbd3eee683c62cd786e9b73337b8c7bd512bd39f06adedec2de0d5ae639da372e6485363107f97767b505cee755d03a5e58ac228659af123184b7b733322e38c91dbf5a943ab3d52e64b49ee755d2e64950e238e35f10c884e17cbe87dc540e6d7509a4f110e9f7566a471712850abf6ce463e6280bacea36fd33a4497f773cf32c698dcc4beee33938edc7ad05534aea683ae61d64c4d2a69b6b88d16d5ca5c303f3e386cf61db140e27b5e99e96b64bdd562b6b30aa36c6c37cac7dc9eec6b42c1a66a962fa70beb6b516d0cbe76322f86c78f6c66831bf8b5d5d2dfa35a5dce60b1933b6ce3c788769f2b331ec1b8fd2831b79649984b239773c1dc68129725c1c640e73400ec781d8fb1a03c4a85d0c8582640257bd01e51fc42236263c9c67be280429c6037eb405dbf5fd682c2a0bb976cf07d3fc5009279ef8ec4e68193a9902b28e7dc71fb501d95b098e0f6dd9e0d0049131019b047b8390281bb292484e47c8500c4f242c3076bf704704739a0be7c3febfbae9a5daf23cd017c7e19fb107bb67d0f6fd6837cd2757d1fab34f4f05e37dde630b1c3a91edf4f7159103d6eb7da65fdbdf59dadb5e2460ac876ed9e1c8c060f9efe9c8a0a75cfc42d5742d2ee5a7e9dbb494b6d6b9bc930cce4f940e3cd81ed4160e98f88315e689fff0022b57664199cc5196f0c7a164ef8f98cd0589baffa68590985eb15c0db1985839f6c2919340b69d03f5285bdd6f4bf021424db4329cb153fccc3d09c76a090d3340d2f479a7bab3b38e2924e5e451cfd280d7dafe936f6c5e4bd89813b02a36589ce318a0358dc35cc4e17f9bf234cdbb78fa0c607a7340e6cec20b1596610c6934b8323226379edda81da8dcb9ec40a042f50b5bb21645473b58b11dbd7bfca8304f8add5d67a9ea8ba5d8ea72c1a4d8a952f10f2c920e368cf71e99fad5833dd0754d6ed66bdb2e9a91a5babb2a310465a57c1ddc1038e7bd5171d3748b8d46ee1ff005298dc6a764c27d4eeaee7fe1c01795881c9e7804fe940dbe287c4b6d75a1b1d1c986d62277c91bf131f4c0f6fad0663737135d3b497124924871f98e7803007d2811dc5b83903dc0a0333f03be7de8122df2c9a05a11e5f51f7a05ce7071804fca8033e5da0734020b0183bb23e5416269577ed0e5323078ceeefdff6a03dbcd62914c2f629a47c622689800879e4fbd046f9d8a2a03e31385c0e73da8b83ca590947dcaead8208e73da8849b3e19ce704f7c5015586d006431f5cf61f3a04ee586ff002481c8fe6191408f0011eb8e30682774dea9bbb5784492ca6385832e1ca95e3d2834be9df8c312e2db5eb4375080337000f1303d18763591a469baef4d755989ec6f6dae5a23e20b599406dd8e080ddbed41272f4dd8caf1c86d163910f9595882a3d718a035edd695d3b6a926b57d0ac65b10b4e06eedd863bf141077fd7af2782bd3fa26a1a8891d57c630948c0279393dcd04cf5875258f4de9f0cb7b7b6d66d2b81ba752d85f5214724fed41036bd79d2fe319d7a8f4b9c81e58de2f04827b9ce09a07a3acecf54b790685ace8697606009e52c377b7f2e682b097d7d36acf0f55df5edbdc0977412468cb6ce3be10af3c63b9c8a0b0751f505be9690dd5d752436f62a3fe4c6448f3b7b0c64e38f615734651f107e3045ac42b67a7693018633b965bc1bc838ee173807bf7cd33065baaeb1a95f2c11dfcd2bc51fe48880aa3e8a062a8b059f595df4ae9a74de9e9ec499d43c97b1427c6e47e525bb63e4282ad3ea3712893c599dbc4259c1627713c927de81043950df97db1406da8411c92063be280230839627078e79a0390a71b5bb5003a8c1232338e4507025573e9fbd02a0e41dc0e680c3691cf714053bb34160895dc16f291d98d02322aa39f3e14707ffaa06f202a5bb0c7201f4a343aca51090497efdfbfce89840c8db8e46573923ff14410b00490d9f5c1a0425dd8ce4673e873cd0265e4dbe7041ed814009b8cbb8e5863bd07163b7716e0607b6698060b96b7b9478dc8643918247ee39a60b7e97f133a8b4e0c63d4ee597380923970a3ef4c0e13e25dfcfab457ba95bdbddb212016501867b9cfbfda982f907c74b282da34874a9048aa479c83838edc62982b7ac7c42d235cd67f15ac5b40c366418a2cb0c1c81e6f5e31db14c160d035de8cd4a3f18ea96562cc37359dfe9cac887fef039fd6b39446f56ea5d13a9dca4579a922496b1975b8d22dfc3566cf9557230703be715ac1431d4d2275325d7fae6b4f6f182a93ef1e32a9f41938f6a60afeb1a95c5fea53dccf772cf2c8c489240031f627e7565c0d67bbf160487c1801073bc0c31f91f953420f2bc8c7c52cc540032738a809905c0f4fa501940208e73df34028e703938a0577ae013f4a001300db4f03b71407461ce0502dca8c9c7dcf6a003fafcbdcd0070bc1e0fd734070db467b8a04cb9c9e68274b93bcb1daa40200ed4099765249ec476cf340849b8b264823bf34689ee009cb671df1409bc8e8b8e770e3ec68984d9c953cf97be2860b248caaebc107dc67f7a184c31232db88fd451031ce50e76039f5c8045026efb8f93279e0fd680b239504f0483d88ef409ee25bb90c79c0e050151c6e21b39ce783eb40adbcc2cefa17bdb61322387781c950e3dbdf9c8a066f28790b22e013db3dbef54726081e63c6460d34191b1bb0720f634060e7600412c781502409c8e3d7b500ed71dbef8ed40243f181c0a02e5d4e0fad006f644e4819e3b501f7e3049e7b501bc43b4e391da80558003392d40a23305e320d02e64cf998e1bf5a032b0c927b8e68049c8c8e71c6280377043118f4e680bbff00de0504ddbb3128371c1c64668024e59f3cd02521254e4fad1a2107e48fe6a6809ddb9e78a029e1463d05027ffc744a6c3857c7b1a205ff00e637fbf4a02b12b1794e39f4a02024e7249ed409924720906800005173fd7404989698ee39e4f7a04cf723d07a501fff0097ed406ffe36a018ff00281e99a037f4d0731f3bfd28007e53400ff99a810248c0cf140bc60123233cff008a0557f9beb4056eff007a07109243e79a03778b27bfbd02b128c27039a054001b818a06609de793da815006070283ffd9}\par}+{\pard \ql \f0 \fs24 \sa0 \li0 \fi0 lalune\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here is a movie {\pict\jpegblip\picw20\pich22\picwgoal400\pichgoal440 ffd8ffe000104a46494600010101004800480000fffe0050546869732061727420697320696e20746865207075626c696320646f6d61696e2e204b6576696e204875676865732c206b6576696e68406569742e636f6d2c2053657074656d6265722031393935ffdb00430001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101ffdb00430101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101ffc00011080016001403012200021101031101ffc4001a000100020301000000000000000000000000080905060a07ffc400231000010501000300010500000000000000060304050708020001090a11153976b7ffc400160101010100000000000000000000000000060800ffc400261101000102050109000000000000000000010200030405061121b33134365154717475b4ffda000c03010002110311003f00a90cf388f366a62aa720ed6ae07f96901f3831d973452b8cf36fe3570fc908e46d466433e5dd954f2e96992d9e498c7753faa44916e016ca91cc7d88b38fe60a5b97737defcbcc539c98d336a57f4fc2ca9a486bf07ab575ad9a3af4df221d8215e36df86c4504ff0024574551b3d687ee0575757b3ad64e311ee62bd94158d37e24198c43973099f1fc0c41614d950246513a081abf76cfe7061f6863281e6352fd1670949c148dd6dfb0d25f5b3689b1d5c965b0eacbf4e0932ad28e22ab9ae945633f4744bd3c8cee0a7fdf085b9000f449c5f7afa30b83e0b6fd7b0c8429c9467ff9715347c891e25fa24a205861aa715e6a09bd0488237dc2723414d9891381524e8ca7c0894664f835653631ab55ee7e3de433e4ff001b30949124e4c10c8b6ad0a479b3f9c937b2cf5bc0095ad600a0a41a0e9faee174a1c605e161c6c7a313539650b0113190f1a8368e60d5b24f30ff008ea7f0bf867fa6595feeb6978f1fe0f9c26177f4d63a51a9235184750e7d18811339cd000000c75f000e00380380ae390c350def826ed42ad051fa6f501c50f9b699c3b69cbeb76476d202bf3ac985b6e0e968be66572893e6a744540bd9722e5c87956848629bc2559306bd113e8653d3b6aff651dfad7a3ac8b02958cba02a93ccf525757039bae6cff090e1d90688e8aa233ee86a4c4a3e0586d6b2340522e47dcb7d0046d8a5acb05a123ee25d2b230b2ada6e2e2f9ede3c05202520ec2487b0d56562529d8b3393bca76adca4ec1bca508abb001babc007915d84fe3dd14e207e3c62f8379da2a3b861fb6629d28dba53b6ea388ebfed866bf6dfb553455e91ed547ae92e9445253a4fdf3efb4f8ebdfbe7d3c78f1ee0bb9e13e358e942a4ed49e22cff00eeb35fdd7ebfffd9} icon.\par}+{\pard \qc \f0 \fs24 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \outlinelevel0 \b \fs34 Footnotes\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here is a footnote reference,{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.\par}+} and another.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Here\u8217's the long note. This one contains multiple blocks.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 Subsequent blocks are indented to show that they belong to the footnote (as with list items).\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 \f1 \fs24   \{ <code> \}\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.\par}+} This should {\i not} be a footnote reference, because it contains a space.[^my note] Here is an inline note.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \fs24 \sa180 \li0 \fi0 This is {\i easier} to type. Inline notes may contain {\field{\*\fldinst{HYPERLINK "http://google.com"}}{\fldrslt{\ul links }}}- and {\f1 ]} verbatim characters, as well as [bracketed text].\par}+ and {\f1 \fs24 ]} verbatim characters, as well as [bracketed text].\par} }\par}-{\pard \ql \f0 \sa180 \li720 \fi0 Notes can go in quotes.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 In quote.\par}+{\pard \ql \f0 \fs24 \sa180 \li720 \fi0 Notes can go in quotes.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \fs24 \sa180 \li0 \fi0 In quote.\par} }\par}-{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab And in list items.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 In list.\par}+{\pard \ql \f0 \fs24 \sa0 \li360 \fi-360\ls35\ilvl0\tx360 {\listtext\tab 1.\tab} And in list items.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \fs24 \sa180 \li0 \fi0 In list.\par} }\sa180\par}-{\pard \ql \f0 \sa180 \li0 \fi0 This paragraph should not be part of the note, as it is not indented.\par}+{\pard \ql \f0 \fs24 \sa180 \li0 \fi0 This paragraph should not be part of the note, as it is not indented.\par} }
+ test/writer.t2t view
@@ -0,0 +1,662 @@+Pandoc Test Suite+John MacFarlane; Anonymous+July 17, 2006++This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite.+++--------------------++= Headers =++== Level 2 with an embedded link ==++=== Level 3 with emphasis ===++==== Level 4 ====++===== Level 5 =====++= Level 1 =++== Level 2 with emphasis ==++=== Level 3 ===++with no blank line++== Level 2 ==++with no blank line+++--------------------++= Paragraphs =++Here’s a regular paragraph.++In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.++Here’s one with a bullet. * criminey.++There should be a hard line break\\+here.+++--------------------++= Block Quotes =++E-mail style:++This is a block quote. It is pretty short.++Code in a block quote:++```+sub status {+    print "working";+}+```++A list:+++ item one++ item two++Nested block quotes:++nested++nested++This should not be a block quote: 2 > 1.++And a following paragraph.+++--------------------++= Code Blocks =++Code:++```+---- (should be four hyphens)++sub status {+    print "working";+}++this code block is indented by one tab+```++And:++```+    this code block is indented by two tabs++These should not be escaped:  \$ \\ \> \[ \{+```+++--------------------++= Lists =++== Unordered ==++Asterisks tight:++- asterisk 1+- asterisk 2+- asterisk 3++Asterisks loose:++- asterisk 1+- asterisk 2+- asterisk 3++Pluses tight:++- Plus 1+- Plus 2+- Plus 3++Pluses loose:++- Plus 1+- Plus 2+- Plus 3++Minuses tight:++- Minus 1+- Minus 2+- Minus 3++Minuses loose:++- Minus 1+- Minus 2+- Minus 3++== Ordered ==++Tight:+++ First++ Second++ Third++and:+++ One++ Two++ Three++Loose using tabs:+++ First++ Second++ Third++and using spaces:+++ One++ Two++ Three++Multiple paragraphs:+++ Item 1, graf one.+Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.++ Item 2.++ Item 3.++== Nested ==++- Tab+  - Tab+    - Tab++Here’s another:+++ First++ Second:+  - Fee+  - Fie+  - Foe++ Third++Same thing but with paragraphs:+++ First++ Second:+  - Fee+  - Fie+  - Foe++ Third++== Tabs and spaces ==++- this is a list item indented with tabs+- this is a list item indented with spaces+  - this is an example list item indented with tabs+  - this is an example list item indented with spaces++== Fancy list markers ==+++ begins with 2++ and now 3+with a continuation+  + sublist with roman numerals starting with i.+  + more items+    + a subsublist+    + a subsublist++Nesting:+++ Upper Alpha+  + Upper Roman.+    + Decimal start with 1+      + Lower alpha with paren++Autonumbering:+++ Autonumber.++ More.+  + Nested.++Should not be a list item:++M.A. 2007++B. Williams+++--------------------++= Definition Lists =++Tight using spaces:++: **apple**+  red fruit+: **orange**+  orange fruit+: **banana**+  yellow fruit++Tight using tabs:++: **apple**+  red fruit+: **orange**+  orange fruit+: **banana**+  yellow fruit++Loose:++: **apple**+  red fruit+: **orange**+  orange fruit+: **banana**+  yellow fruit++Multiple blocks with italics:++: **//apple//**+  red fruit+contains seeds, crisp, pleasant to taste+: **//orange//**+  orange fruit+```+{ orange code block }+```++orange block quote++Multiple definitions, tight:++: **apple**+  red fruit+  computer+: **orange**+  orange fruit+  bank++Multiple definitions, loose:++: **apple**+  red fruit+  computer+: **orange**+  orange fruit+  bank++Blank line after term, indented marker, alternate markers:++: **apple**+  red fruit+  computer+: **orange**+  orange fruit+  + sublist+  + sublist++= HTML Blocks =++Simple block on one line:++foo++And nested without indentation:++foo++++bar+++Interpreted markdown in a table:++"""+<table>+<tr>+<td>+"""++This is //emphasized//+"""+</td>+<td>+"""++And this is **strong**+"""+</td>+</tr>+</table>+<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>+"""++Here’s a simple block:++foo+++This should be a code block, though:++```+<div>+    foo+</div>+```++As should this:++```+<div>foo</div>+```++Now, nested:++foo++++This should just be an HTML comment:++"""+<!-- Comment -->+"""++Multiline:++"""+<!--+Blah+Blah+-->+<!--+    This is another comment.+-->+"""++Code block:++```+<!-- Comment -->+```++Just plain comment, with trailing spaces on the line:++"""+<!-- foo -->+"""++Code:++```+<hr />+```++Hr’s:++"""+<hr>+<hr />+<hr />+<hr>+<hr />+<hr />+<hr class="foo" id="bar" />+<hr class="foo" id="bar" />+<hr class="foo" id="bar">+"""+++--------------------++= Inline Markup =++This is //emphasized//, and so //is this//.++This is **strong**, and so **is this**.++An //[emphasized link url]//.++**//This is strong and em.//**++So is **//this//** word.++**//This is strong and em.//**++So is **//this//** word.++This is code: ``>``, ``$``, ``\``, ``\$``, ``<html>``.++--This is //strikeout//.--++Superscripts: a<sup>bc</sup>d a<sup>//hello//</sup> a<sup>hello there</sup>.++Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many of them</sub>O.++These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.+++--------------------++= Smart quotes, ellipses, dashes =++“Hello,” said the spider. “‘Shelob’ is my name.”++‘A’, ‘B’, and ‘C’ are letters.++‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’++‘He said, “I want to go.”’ Were you alive in the 70’s?++Here is some quoted ‘``code``’ and a “[quoted link http://example.com/?foo=1&bar=2]”.++Some dashes: one—two — three—four — five.++Dashes between numbers: 5–7, 255–66, 1987–1999.++Ellipses…and…and….+++--------------------++= LaTeX =++- +- $2+2=4$+- $x \in y$+- $\alpha \wedge \omega$+- $223$+- $p$-Tree+- Here’s some display math: $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$+- Here’s one that has a line break in it: $\alpha + \omega \times x^2$.++These shouldn’t be math:++- To get the famous equation, write ``$e = mc^2$``.+- $22,000 is a //lot// of money. So is $34,000. (It worked if “lot” is emphasized.)+- Shoes ($20) and socks ($5).+- Escaped ``$``: $73 //this should be emphasized// 23$.++Here’s a LaTeX table:++++--------------------++= Special Characters =++Here is some unicode:++- I hat: Î+- o umlaut: ö+- section: §+- set membership: ∈+- copyright: ©++AT&T has an ampersand in their name.++AT&T is another way to write it.++This & that.++4 < 5.++6 > 5.++Backslash: \++Backtick: `++Asterisk: *++Underscore: _++Left brace: {++Right brace: }++Left bracket: [++Right bracket: ]++Left paren: (++Right paren: )++Greater-than: >++Hash: #++Period: .++Bang: !++Plus: +++Minus: -+++--------------------++= Links =++== Explicit ==++Just a [URL url/].++[URL and title url/].++[URL and title url/].++[URL and title url/].++[URL and title url/]++[URL and title url/]++[with_underscore url/with_underscore]++[Email link mailto:nobody@nowhere.net]++[Empty ].++== Reference ==++Foo [bar url/].++With [embedded [brackets] url/].++[b url/] by itself should be a link.++Indented [once url].++Indented [twice url].++Indented [thrice url].++This should [not][] be a link.++```+[not]: /url+```++Foo [bar url/].++Foo [biz url/].++== With ampersands ==++Here’s a [link with an ampersand in the URL http://example.com/?foo=1&bar=2].++Here’s a link with an amersand in the link text: [AT&T http://att.com/].++Here’s an [inline link script?foo=1&bar=2].++Here’s an [inline link in pointy braces script?foo=1&bar=2].++== Autolinks ==++With an ampersand: http://example.com/?foo=1&bar=2++- In a list?+- http://example.com/+- It should.++An e-mail address: <nobody@nowhere.net>++Blockquoted: http://example.com/++Auto-links should not occur here: ``<http://example.com/>``++```+or here: <http://example.com/>+```+++--------------------++= Images =++From “Voyage dans la Lune” by Georges Melies (1902):++[lalune.jpg|Voyage dans la Lune]+lalune+++Here is a movie [movie.jpg|movie] icon.+++--------------------++= Footnotes =++Here is a footnote reference,(Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.) and another.(Here’s the long note. This one contains multiple blocks.++Subsequent blocks are indented to show that they belong to the footnote (as with list items).++```+  { <code> }+```++If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.) This should //not// be a footnote reference, because it contains a space.[^my note] Here is an inline note.(This is //easier// to type. Inline notes may contain [links http://google.com] and ``]`` verbatim characters, as well as [bracketed text].)++Notes can go in quotes.(In quote.)+++ And in list items.(In list.)++This paragraph should not be part of the note, as it is not indented.
test/writer.tei view
@@ -350,8 +350,8 @@         <p>and now 3</p>         <p>with a continuation</p>         <list type="ordered:lowerroman">-          <item n="4">-            <p>sublist with roman numerals, starting with 4</p>+          <item>+            <p>sublist with roman numerals starting with i.</p>           </item>           <item>             <p>more items</p>@@ -369,16 +369,16 @@     </list>     <p>Nesting:</p>     <list type="ordered:upperalpha">-      <item>+      <item n="4">         <p>Upper Alpha</p>         <list type="ordered:upperroman">           <item>             <p>Upper Roman.</p>             <list type="ordered:arabic">-              <item n="6">-                <p>Decimal start with 6</p>+              <item>+                <p>Decimal start with 1</p>                 <list type="ordered:loweralpha">-                  <item n="3">+                  <item>                     <p>Lower alpha with paren</p>                   </item>                 </list>
test/writer.texinfo view
@@ -444,9 +444,9 @@  with a continuation -@enumerate 4+@enumerate  @item-sublist with roman numerals, starting with 4+sublist with roman numerals starting with i. @item more items @enumerate A@@ -462,16 +462,16 @@  Nesting: -@enumerate A+@enumerate D @item Upper Alpha @enumerate  @item Upper Roman.-@enumerate 6+@enumerate  @item-Decimal start with 6-@enumerate c+Decimal start with 1+@enumerate a @item Lower alpha with paren @end enumerate@@ -948,7 +948,7 @@ It should. @end itemize -An e-mail address: @uref{mailto:nobody@@nowhere.net,nobody@@nowherenet}+An e-mail address: @uref{mailto:nobody@@nowhere.net,nobody@@nowhere.net}  @quotation Blockquoted: @url{http://example.com/}
test/writer.textile view
@@ -215,8 +215,8 @@ <li><p>begins with 2</p></li> <li><p>and now 3</p> <p>with a continuation</p>-<ol start="4" style="list-style-type: lower-roman;">-<li>sublist with roman numerals, starting with 4</li>+<ol style="list-style-type: lower-roman;">+<li>sublist with roman numerals starting with i.</li> <li>more items <ol style="list-style-type: upper-alpha;"> <li>a subsublist</li>@@ -229,13 +229,13 @@  Nesting: -<ol style="list-style-type: upper-alpha;">+<ol start="4" style="list-style-type: upper-alpha;"> <li>Upper Alpha <ol style="list-style-type: upper-roman;"> <li>Upper Roman.-<ol start="6" style="list-style-type: decimal;">-<li>Decimal start with 6-<ol start="3" style="list-style-type: lower-alpha;">+<ol style="list-style-type: decimal;">+<li>Decimal start with 1+<ol style="list-style-type: lower-alpha;"> <li>Lower alpha with paren</li> </ol> </li>
test/writer.typst view
@@ -1,19 +1,14 @@-#let horizontalrule = line(start: (25%,0%), end: (75%,0%))--#show terms: it => {-  it.children-    .map(child => [-      #strong[#child.term]-      #block(inset: (left: 1.5em, top: -0.4em))[#child.description]-      ])-    .join()-}+#set terms(hanging-indent: 1.5em)  #set table(   inset: 6pt,   stroke: none ) +#let horizontalrule = line(start: (25%,0%), end: (75%,0%))+// Polyfill divider to allow compiling with typst < 0.15:+#let divider = if "divider" in std { divider } else { horizontalRule }+ #show figure.where(   kind: table ): set figure.caption(position: top)@@ -97,48 +92,49 @@     }   } -  block(below: 1em, width: 100%)[-    #if title != none {-      align(center, block[-          #text(weight: "bold", size: 1.5em)[#title #if thanks != none {-              footnote(thanks, numbering: "*")-              counter(footnote).update(n => n - 1)-            }]-          #(-            if subtitle != none {-              parbreak()-              text(weight: "bold", size: 1.25em)[#subtitle]-            }-           )])-    }--    #if authors != none and authors != [] {-      let count = authors.len()-      let ncols = calc.min(count, 3)-      grid(-        columns: (1fr,) * ncols,-        row-gutter: 1.5em,-        ..authors.map(author => align(center)[-          #author.name \-          #author.affiliation \-          #author.email-        ])-      )-    }+  if title != none {+    place(top, float: true, scope: "parent", clearance: 4mm, block(below: 1em, width: 100%)[+      #if title != none {+        align(center, block[+            #text(weight: "bold", size: 1.5em, hyphenate: false)[#title #if thanks != none {+                footnote(thanks, numbering: "*")+                counter(footnote).update(n => n - 1)+              }]+            #(+              if subtitle != none {+                parbreak()+                text(weight: "bold", size: 1.25em, hyphenate: false)[#subtitle]+              }+             )])+      } -    #if date != none {-      align(center)[#block(inset: 1em)[-          #date-        ]]-    }+      #if authors != none and authors != [] {+        let count = authors.len()+        let ncols = calc.min(count, 3)+        grid(+          columns: (1fr,) * ncols,+          row-gutter: 1.5em,+          ..authors.map(author => align(center)[+            #author.name \+            #author.affiliation \+            #author.email+          ])+        )+      } -    #if abstract != none {-      block(inset: 2em)[-        #text(weight: "semibold")[#abstract-title] #h(1em) #abstract-      ]-    }-  ]+      #if date != none {+        align(center)[#block(inset: 1em)[+            #date+          ]]+      } +      #if abstract != none {+        block(inset: 2em)[+          #text(weight: "semibold")[#abstract-title] #h(1em) #abstract+        ]+      }+    ])+  }   doc } #show: doc => conf(@@ -162,7 +158,7 @@ This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite. -#horizontalrule+#divider()  = Headers <headers>@@ -186,7 +182,7 @@ <level-2> with no blank line -#horizontalrule+#divider()  = Paragraphs <paragraphs>@@ -198,10 +194,9 @@  Here's one with a bullet. \* criminey. -There should be a hard line break \-here.+There should be a hard line break \ here. -#horizontalrule+#divider()  = Block Quotes <block-quotes>@@ -240,7 +235,7 @@  And a following paragraph. -#horizontalrule+#divider()  = Code Blocks <code-blocks>@@ -264,7 +259,7 @@ These should not be escaped:  \$ \\ \> \[ \{ ``` -#horizontalrule+#divider()  = Lists <lists>@@ -400,8 +395,8 @@   with a continuation    #block[-  #set enum(numbering: "i.", start: 4)-  + sublist with roman numerals, starting with 4+  #set enum(numbering: "i.", start: 1)+  + sublist with roman numerals starting with i.   + more items     #block[     #set enum(numbering: "(A)", start: 1)@@ -414,16 +409,16 @@ Nesting:  #block[-#set enum(numbering: "A.", start: 1)+#set enum(numbering: "A.", start: 4) + Upper Alpha   #block[   #set enum(numbering: "I.", start: 1)   + Upper Roman.     #block[-    #set enum(numbering: "(1)", start: 6)-    + Decimal start with 6+    #set enum(numbering: "(1)", start: 1)+    + Decimal start with 1       #block[-      #set enum(numbering: "a)", start: 3)+      #set enum(numbering: "a)", start: 1)       + Lower alpha with paren       ]     ]@@ -442,37 +437,21 @@  B. Williams -#horizontalrule+#divider()  = Definition Lists <definition-lists> Tight using spaces: -/ apple: #block[-red fruit-]--/ orange: #block[-orange fruit-]--/ banana: #block[-yellow fruit-]+/ apple: red fruit+/ orange: orange fruit+/ banana: yellow fruit  Tight using tabs: -/ apple: #block[-red fruit-]--/ orange: #block[-orange fruit-]--/ banana: #block[-yellow fruit-]+/ apple: red fruit+/ orange: orange fruit+/ banana: yellow fruit  Loose: @@ -515,7 +494,6 @@  computer ]- / orange: #block[ orange fruit @@ -624,7 +602,7 @@  Hr's: -#horizontalrule+#divider()  = Inline Markup <inline-markup>@@ -653,7 +631,7 @@ These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a\~b c\~d. -#horizontalrule+#divider()  = Smart quotes, ellipses, dashes <smart-quotes-ellipses-dashes>@@ -674,7 +652,7 @@  Ellipses…and…and…. -#horizontalrule+#divider()  = LaTeX <latex>@@ -685,7 +663,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:@@ -698,7 +676,7 @@  Here's a LaTeX table: -#horizontalrule+#divider()  = Special Characters <special-characters>@@ -752,7 +730,7 @@  Minus: - -#horizontalrule+#divider()  = Links <links>@@ -831,21 +809,21 @@ or here: <http://example.com/> ``` -#horizontalrule+#divider()  = Images <images> From "Voyage dans la Lune" by Georges Melies (1902): -#figure(image("lalune.jpg"),+#figure(image("lalune.jpg", alt: "lalune"),   caption: [     lalune   ] ) -Here is a movie #box(image("movie.jpg")) icon.+Here is a movie #box(image("movie.jpg", alt: "movie")) icon. -#horizontalrule+#divider()  = Footnotes <footnotes>
test/writer.vimdoc view
@@ -245,17 +245,17 @@      with a continuation -    iv. sublist with roman numerals, starting with 4-    v. more items-       (A) a subsublist-       (B) a subsublist+    i. sublist with roman numerals starting with i.+    ii. more items+        (A) a subsublist+        (B) a subsublist  Nesting: -A. Upper Alpha+D. Upper Alpha    I. Upper Roman.-      (6) Decimal start with 6-          c) Lower alpha with paren+      (1) Decimal start with 1+          a) Lower alpha with paren  Autonumbering: 
test/writer.xwiki view
@@ -215,7 +215,7 @@  with a continuation -11. sublist with roman numerals, starting with 4+11. sublist with roman numerals starting with i. 11. more items 111. a subsublist 111. a subsublist@@ -224,7 +224,7 @@  1. Upper Alpha 11. Upper Roman.-111. Decimal start with 6+111. Decimal start with 1 1111. Lower alpha with paren  Autonumbering:
test/writer.zimwiki view
@@ -211,7 +211,7 @@ 1. begins with 2 2. and now 3 with a continuation-	1. sublist with roman numerals, starting with 4+	1. sublist with roman numerals starting with i. 	2. more items 		1. a subsublist 		2. a subsublist@@ -220,7 +220,7 @@  1. Upper Alpha 	1. Upper Roman.-		1. Decimal start with 6+		1. Decimal start with 1 			1. Lower alpha with paren  Autonumbering:
test/writers-lang-and-dir.latex view
@@ -69,6 +69,10 @@ \usepackage{bookmark} \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available \urlstyle{same}+% fallback for those not using the hyperref driver hyperxmp:+\makeatletter+\@ifundefined{xmpquote}{\newcommand{\xmpquote}[1]{#1}}{}+\makeatother \hypersetup{   pdflang={en},   hidelinks,